[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/2] x86/hvm: Always do SMAP check when updating runstate_guest(v)



>>> On 09.07.14 at 03:33, <feng.wu@xxxxxxxxx> wrote:
>> From: Andrew Cooper [mailto:andrew.cooper3@xxxxxxxxxx]
>> On 08/07/14 00:18, Feng Wu wrote:
>> > In the current implementation, we honor the guest's CPL and AC
>> > to determain whether do the SMAP check or not for runstate_guest(v).
>> > However, this doesn't work. The VMCS feild is invalid when we try
>> > to get geust's SS by hvm_get_segment_register(), since the
>> > right VMCS has not beed loaded for the current VCPU.
>> >
>> > In this patch, we always do the SMAP check when updating
>> > runstate_guest(v) for the guest when SMAP is enabled by it.
>> >
>> > Reported-by: Sander Eikelenboom <linux@xxxxxxxxxxxxxx>
>> > Signed-off-by: Feng Wu <feng.wu@xxxxxxxxx>
>> 
>> Why can't the VMCS be reloaded in vmx_ctxt_switch_to() rather than
>> vmx_do_resume() ?  The problem is not with updating the runstate area
>> persay, but due to using guest_walk_tables() during a context switch
>> before the VMCS has been loaded.
> 
> This is another option in the discussion with Jan. However, seems
> the current option is preferred by Jan.

I don't think I ever said so. What I probably did say is that doing it
the alternative way, while presumably better, will need quite a bit
more care (i.e. is overall more risky than the change here).

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.