[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>
This commit is contained in:
Uri Lublin 2006-12-13 00:34:00 -08:00 committed by Linus Torvalds
parent acd19499e9
commit f7fbf1fdf0
1 changed files with 2 additions and 0 deletions

View File

@ -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);
}