Commit bff98d3b authored by Paolo Bonzini's avatar Paolo Bonzini

Merge branch 'kvm-master' into HEAD

Merge more important SMM fixes.
parents 58f800d5 b10d92a5
...@@ -2418,7 +2418,7 @@ static int rsm_load_state_64(struct x86_emulate_ctxt *ctxt, u64 smbase) ...@@ -2418,7 +2418,7 @@ static int rsm_load_state_64(struct x86_emulate_ctxt *ctxt, u64 smbase)
u64 val, cr0, cr4; u64 val, cr0, cr4;
u32 base3; u32 base3;
u16 selector; u16 selector;
int i; int i, r;
for (i = 0; i < 16; i++) for (i = 0; i < 16; i++)
*reg_write(ctxt, i) = GET_SMSTATE(u64, smbase, 0x7ff8 - i * 8); *reg_write(ctxt, i) = GET_SMSTATE(u64, smbase, 0x7ff8 - i * 8);
...@@ -2460,13 +2460,17 @@ static int rsm_load_state_64(struct x86_emulate_ctxt *ctxt, u64 smbase) ...@@ -2460,13 +2460,17 @@ static int rsm_load_state_64(struct x86_emulate_ctxt *ctxt, u64 smbase)
dt.address = GET_SMSTATE(u64, smbase, 0x7e68); dt.address = GET_SMSTATE(u64, smbase, 0x7e68);
ctxt->ops->set_gdt(ctxt, &dt); ctxt->ops->set_gdt(ctxt, &dt);
r = rsm_enter_protected_mode(ctxt, cr0, cr4);
if (r != X86EMUL_CONTINUE)
return r;
for (i = 0; i < 6; i++) { for (i = 0; i < 6; i++) {
int r = rsm_load_seg_64(ctxt, smbase, i); r = rsm_load_seg_64(ctxt, smbase, i);
if (r != X86EMUL_CONTINUE) if (r != X86EMUL_CONTINUE)
return r; return r;
} }
return rsm_enter_protected_mode(ctxt, cr0, cr4); return X86EMUL_CONTINUE;
} }
static int em_rsm(struct x86_emulate_ctxt *ctxt) static int em_rsm(struct x86_emulate_ctxt *ctxt)
......
...@@ -7564,7 +7564,7 @@ void kvm_arch_sync_events(struct kvm *kvm) ...@@ -7564,7 +7564,7 @@ void kvm_arch_sync_events(struct kvm *kvm)
int __x86_set_memory_region(struct kvm *kvm, int id, gpa_t gpa, u32 size) int __x86_set_memory_region(struct kvm *kvm, int id, gpa_t gpa, u32 size)
{ {
int i, r; int i, r;
u64 hva; unsigned long hva;
struct kvm_memslots *slots = kvm_memslots(kvm); struct kvm_memslots *slots = kvm_memslots(kvm);
struct kvm_memory_slot *slot, old; struct kvm_memory_slot *slot, old;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment