Queued patch 1 with just a small change: diff --git a/target/i386/kvm/kvm.c b/target/i386/kvm/kvm.c index 599faf0ac6e..023af31ba3e 100644 --- a/target/i386/kvm/kvm.c +++ b/target/i386/kvm/kvm.c @@ -3064,10 +3064,9 @@ static int kvm_vm_set_nr_mmu_pages(KVMState *s) return ret; } -static int kvm_vm_set_tss_addr(KVMState *s, uint64_t identity_base) +static int kvm_vm_set_tss_addr(KVMState *s, uint64_t tss_base) { - /* Set TSS base one page after EPT identity map. */ - return kvm_vm_ioctl(s, KVM_SET_TSS_ADDR, identity_base); + return kvm_vm_ioctl(s, KVM_SET_TSS_ADDR, tss_base); } static int kvm_vm_enable_disable_exits(KVMState *s) @@ -3268,6 +3267,7 @@ int kvm_arch_init(MachineState *ms, KVMState *s) return ret; } + /* Set TSS base one page after EPT identity map. */ ret = kvm_vm_set_tss_addr(s, identity_base + 0x1000); if (ret < 0) { return ret; For patch 2, it's better to remove the variable completely and make it a constant. I'll send a patch. Paolo