diff --git a/[refs] b/[refs] index 099fa89c4811..582fb721aa57 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 024aa1c02f0a9f938af83f55c727bcb18187eba4 +refs/heads/master: 038881c8bec0e9a796d1782c56e29e7c2456626d diff --git a/trunk/drivers/kvm/vmx.c b/trunk/drivers/kvm/vmx.c index 027a9625ef90..578dff5424e3 100644 --- a/trunk/drivers/kvm/vmx.c +++ b/trunk/drivers/kvm/vmx.c @@ -864,7 +864,14 @@ static void vmx_set_segment(struct kvm_vcpu *vcpu, vmcs_writel(sf->base, var->base); vmcs_write32(sf->limit, var->limit); vmcs_write16(sf->selector, var->selector); - if (var->unusable) + if (vcpu->rmode.active && var->s) { + /* + * Hack real-mode segments into vm86 compatibility. + */ + if (var->base == 0xffff0000 && var->selector == 0xf000) + vmcs_writel(sf->base, 0xf0000); + ar = 0xf3; + } else if (var->unusable) ar = 1 << 16; else { ar = var->type & 15;