[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1401031537110.8667@kaball.uk.xensource.com>
Date: Fri, 3 Jan 2014 15:37:21 +0000
From: Stefano Stabellini <stefano.stabellini@...citrix.com>
To: David Vrabel <david.vrabel@...rix.com>
CC: Mukesh Rathor <mukesh.rathor@...cle.com>,
Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>,
<linux-kernel@...r.kernel.org>, <xen-devel@...ts.xenproject.org>,
<boris.ostrovsky@...cle.com>, <stefano.stabellini@...citrix.com>
Subject: Re: [PATCH v12 03/18] xen/pvh: Early bootup changes in PV code
(v2).
On Fri, 3 Jan 2014, David Vrabel wrote:
> On 03/01/14 01:34, Mukesh Rathor wrote:
> > On Thu, 2 Jan 2014 13:32:21 -0500
> > Konrad Rzeszutek Wilk <konrad.wilk@...cle.com> wrote:
> >
> >> On Thu, Jan 02, 2014 at 03:32:33PM +0000, David Vrabel wrote:
> >>> On 01/01/14 04:35, Konrad Rzeszutek Wilk wrote:
> >>>> From: Mukesh Rathor <mukesh.rathor@...cle.com>
> >>>>
> >>>> In the bootup code for PVH we can trap cpuid via vmexit, so don't
> >>>> need to use emulated prefix call. We also check for vector
> >>>> callback early on, as it is a required feature. PVH also runs at
> >>>> default kernel IOPL.
> >>>>
> >>>> Finally, pure PV settings are moved to a separate function that
> >>>> are only called for pure PV, ie, pv with pvmmu. They are also
> >>>> #ifdef with CONFIG_XEN_PVMMU.
> >>> [...]
> >>>> @@ -331,12 +333,15 @@ static void xen_cpuid(unsigned int *ax,
> >>>> unsigned int *bx, break;
> >>>> }
> >>>>
> >>>> - asm(XEN_EMULATE_PREFIX "cpuid"
> >>>> - : "=a" (*ax),
> >>>> - "=b" (*bx),
> >>>> - "=c" (*cx),
> >>>> - "=d" (*dx)
> >>>> - : "0" (*ax), "2" (*cx));
> >>>> + if (xen_pvh_domain())
> >>>> + native_cpuid(ax, bx, cx, dx);
> >>>> + else
> >>>> + asm(XEN_EMULATE_PREFIX "cpuid"
> >>>> + : "=a" (*ax),
> >>>> + "=b" (*bx),
> >>>> + "=c" (*cx),
> >>>> + "=d" (*dx)
> >>>> + : "0" (*ax), "2" (*cx));
> >>>
> >>> For this one off cpuid call it seems preferrable to me to use the
> >>> emulate prefix rather than diverge from PV.
> >>
> >> This was before the PV cpuid was deemed OK to be used on PVH.
> >> Will rip this out to use the same version.
> >
> > Whats wrong with using native cpuid? That is one of the benefits that
> > cpuid can be trapped via vmexit, and also there is talk of making PV
> > cpuid trap obsolete in the future. I suggest leaving it native.
>
> It should either use the PV interface or the HVM one, not a hybrid of
> the two.
I agree
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists