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

Re: [Xen-devel] [PATCH] pvh: Fix regression caused by assumption that HVM paths MUST use io-backend device.



>>> On 03.02.14 at 18:03, Konrad Rzeszutek Wilk <konrad@xxxxxxxxxx> wrote:
> --- a/xen/arch/x86/hvm/vmx/vvmx.c
> +++ b/xen/arch/x86/hvm/vmx/vvmx.c
> @@ -1400,7 +1400,7 @@ void nvmx_switch_guest(void)
>       * no virtual vmswith is allowed. Or else, the following IO
>       * emulation will handled in a wrong VCPU context.
>       */
> -    if ( get_ioreq(v)->state != STATE_IOREQ_NONE )
> +    if ( get_ioreq(v) && get_ioreq(v)->state != STATE_IOREQ_NONE )

As Mukesh pointed out, calling get_ioreq() twice is inefficient.

But to me it's not clear whether a PVH vCPU getting here is wrong
in the first place, i.e. I would think the above condition should be
|| rather than && (after all, even if nested HVM one day became
supported for PVH, there not being an ioreq would still seem to be
a clear indication of no further work to be done here).

Of course, if done that way, the corresponding comment would
benefit from being extended accordingly.

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®.