diff options
author | Uri Lublin <uril@qumranet.com> | 2006-12-13 00:34:00 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.osdl.org> | 2006-12-13 09:05:47 -0800 |
commit | f7fbf1fdf0d79241f5cc95310b96f0c52452ab39 (patch) | |
tree | e56bcb3ccb56517279a8727603087813722eb7f4 /drivers/kvm | |
parent | acd19499e9724615d720b29c74be6b218ce765c6 (diff) | |
download | op-kernel-dev-f7fbf1fdf0d79241f5cc95310b96f0c52452ab39.zip op-kernel-dev-f7fbf1fdf0d79241f5cc95310b96f0c52452ab39.tar.gz |
[PATCH] KVM: Make the GET_SREGS and SET_SREGS ioctls symmetric
This makes the SET_SREGS ioctl behave symmetrically to the GET_SREGS ioctl wrt
the segment access rights flag.
Signed-off-by: Uri Lublin <uril@qumranet.com>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/kvm')
-rw-r--r-- | drivers/kvm/vmx.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/kvm/vmx.c b/drivers/kvm/vmx.c index ad97014..fc01c4b 100644 --- a/drivers/kvm/vmx.c +++ b/drivers/kvm/vmx.c @@ -884,6 +884,8 @@ static void vmx_set_segment(struct kvm_vcpu *vcpu, ar |= (var->db & 1) << 14; ar |= (var->g & 1) << 15; } + if (ar == 0) /* a 0 value means unusable */ + ar = AR_UNUSABLE_MASK; vmcs_write32(sf->ar_bytes, ar); } |