igvm: add support for igvm memory map parameter in native mode

Add and wire up qigvm_x86_get_mem_map_entry function which converts the
e820 table into an igvm memory map parameter.  This makes igvm files for
the native (non-confidential) platform with memory map parameter work.

Reviewed-by: Stefano Garzarella <sgarzare@redhat.com>
Reviewed-by: Luigi Leonardi <leonardi@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-ID: <20251029105555.2492276-4-kraxel@redhat.com>
This commit is contained in:
Gerd Hoffmann
2025-10-29 11:55:53 +01:00
parent dd020b4e6b
commit 13abf2fcb7
6 changed files with 88 additions and 4 deletions

21
stubs/igvm.c Normal file
View File

@@ -0,0 +1,21 @@
/*
* QEMU IGVM, stubs
*
* Copyright (C) 2026 Red Hat
*
* Authors:
* Gerd Hoffmann <kraxel@redhat.com>
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "qemu/osdep.h"
#include "system/igvm.h"
int qigvm_x86_get_mem_map_entry(int index,
ConfidentialGuestMemoryMapEntry *entry,
Error **errp)
{
return -1;
}

View File

@@ -74,6 +74,7 @@ if have_system
stub_ss.add(files('dump.c'))
stub_ss.add(files('cmos.c'))
stub_ss.add(files('fw_cfg.c'))
stub_ss.add(files('igvm.c'))
stub_ss.add(files('target-get-monitor-def.c'))
stub_ss.add(files('target-monitor-defs.c'))
stub_ss.add(files('win32-kbd-hook.c'))