projects
/
firefly-linux-kernel-4.4.55.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1872a3f
)
KVM: VMX: don't clobber segment AR if emulating invalid state
author
Avi Kivity
<avi@redhat.com>
Sun, 4 Jan 2009 21:43:42 +0000
(23:43 +0200)
committer
Avi Kivity
<avi@redhat.com>
Tue, 24 Mar 2009 09:03:00 +0000
(11:03 +0200)
The ususable bit is important for determining state validity; don't
clobber it.
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/vmx.c
patch
|
blob
|
history
diff --git
a/arch/x86/kvm/vmx.c
b/arch/x86/kvm/vmx.c
index be9441056ff208389a538a0e96c54f7ea7c19585..a6598cbaa001cccc64cecf2c0021a11ffd1e5f75 100644
(file)
--- a/
arch/x86/kvm/vmx.c
+++ b/
arch/x86/kvm/vmx.c
@@
-1649,7
+1649,7
@@
static void vmx_get_segment(struct kvm_vcpu *vcpu,
var->limit = vmcs_read32(sf->limit);
var->selector = vmcs_read16(sf->selector);
ar = vmcs_read32(sf->ar_bytes);
- if (
ar & AR_UNUSABLE_MASK
)
+ if (
(ar & AR_UNUSABLE_MASK) && !emulate_invalid_guest_state
)
ar = 0;
var->type = ar & 15;
var->s = (ar >> 4) & 1;