igvm: add support for initial register state load in native mode

Add IgvmNativeVpContextX64 struct holding the register state (see igvm
spec), and the qigvm_x86_load_context() function to load the register
state.

Wire up using two new functions: qigvm_x86_set_vp_context() is called
from igvm file handling code and stores the boot processor context.
qigvm_x86_bsp_reset() is called from i386 target cpu reset code and
loads the context into the cpu registers.

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-5-kraxel@redhat.com>
This commit is contained in:
Gerd Hoffmann 2025-10-29 11:55:54 +01:00
parent 13abf2fcb7
commit 593fe98d74
6 changed files with 165 additions and 15 deletions

View file

@ -19,3 +19,8 @@ int qigvm_x86_get_mem_map_entry(int index,
{
return -1;
}
int qigvm_x86_set_vp_context(void *data, int index, Error **errp)
{
return -1;
}