Commit f7fbf1fd authored by Uri Lublin's avatar Uri Lublin Committed by Linus Torvalds

[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: default avatarUri Lublin <uril@qumranet.com>
Signed-off-by: default avatarAvi Kivity <avi@qumranet.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent acd19499
......@@ -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);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment