mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-01-11 06:25:30 +00:00
KVM: x86: Add support for save/load MSR_SMI_COUNT
This MSR returns the number of #SMIs that occurred on CPU since boot. KVM commit 52797bf9a875 ("KVM: x86: Add emulation of MSR_SMI_COUNT") introduced support for emulating this MSR. This commit adds support for QEMU to save/load this MSR for migration purposes. Backports the relevant parts of commit e13713db5b609d9a83c9cfc8ba389d4215d4ba29 from qemu
This commit is contained in:
parent
97643ff472
commit
c1587be44c
|
@ -3740,6 +3740,7 @@ static void x86_cpu_reset(CPUState *s)
|
|||
cpu_x86_update_cr0(env, 0x60000010);
|
||||
env->a20_mask = ~0x0;
|
||||
env->smbase = 0x30000;
|
||||
env->msr_smi_count = 0;
|
||||
|
||||
env->idt.limit = 0xffff;
|
||||
env->gdt.limit = 0xffff;
|
||||
|
|
|
@ -338,6 +338,7 @@
|
|||
#define MSR_P6_PERFCTR0 0xc1
|
||||
|
||||
#define MSR_IA32_SMBASE 0x9e
|
||||
#define MSR_SMI_COUNT 0x34
|
||||
#define MSR_MTRRcap 0xfe
|
||||
#define MSR_MTRRcap_VCNT 8
|
||||
#define MSR_MTRRcap_FIXRANGE_SUPPORT (1 << 8)
|
||||
|
@ -1098,6 +1099,7 @@ typedef struct CPUX86State {
|
|||
|
||||
uint64_t pat;
|
||||
uint32_t smbase;
|
||||
uint64_t msr_smi_count;
|
||||
|
||||
uint32_t pkru;
|
||||
|
||||
|
|
Loading…
Reference in a new issue