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

Re: [Xen-devel] [PATCH]: Add handlers for missing exit_reasons documented by Intel SDM 3B



On 03/09/2010 09:29, "Liu, Yuan B" <yuan.b.liu@xxxxxxxxx> wrote:

> According to the SDM, GETSEC, INVEPT, INVVPID can be executed by guests in
> some cases. For e.g.
> 
> GETSEC(SDM 2B 6.2.1)
> System software enables SMX operation by setting CR4.SMXE[Bit 14] = 1 before
> attempting to execute GETSEC. Otherwise, execution of GETSEC results in the
> processor signaling an invalid opcode exception (#UD).
> 
> Since Xen doesn't permit guests to set the SMXE bit in CR4 (refer to
> hvm_set_cr4 in hvm.c) GETSEC should generate an #UD instead of referring to
> default handler.

Well actually given that CR4.SMXE always is 0 when the guest runs, the
VMEXIT will never be taken, since the CPU checks CR4.SMXE before checking
for running in non-root context.

I guess I agree with the patch overall. I would consider putting a
WARN_ON(1) on the GETSEC vmexit path, with a code comment explaining it
should be unreachable currently. What do you think? I can make that change
myself if you agree.

 -- Keir



_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

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