[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] target-i386: add pcid to both Sandy Bridge and
From: |
Eduardo Habkost |
Subject: |
Re: [Qemu-devel] [PATCH] target-i386: add pcid to both Sandy Bridge and Ivy Bridge |
Date: |
Mon, 8 Jan 2018 21:19:17 -0200 |
User-agent: |
Mutt/1.9.1 (2017-09-22) |
On Mon, Jan 08, 2018 at 06:09:30PM -0500, Paolo Bonzini wrote:
>
>
> ----- Original Message -----
> > From: "Eduardo Habkost" <address@hidden>
> > To: "Paolo Bonzini" <address@hidden>
> > Cc: "Vincent Bernat" <address@hidden>, "Richard Henderson"
> > <address@hidden>, address@hidden
> > Sent: Monday, January 8, 2018 11:56:25 PM
> > Subject: Re: [PATCH] target-i386: add pcid to both Sandy Bridge and Ivy
> > Bridge
> >
> > On Mon, Jan 08, 2018 at 05:37:16PM -0500, Paolo Bonzini wrote:
> > >
> > >
> > > ----- Original Message -----
> > > > From: "Eduardo Habkost" <address@hidden>
> > > > To: "Vincent Bernat" <address@hidden>
> > > > Cc: "Paolo Bonzini" <address@hidden>, "Richard Henderson"
> > > > <address@hidden>, address@hidden
> > > > Sent: Monday, January 8, 2018 10:16:23 PM
> > > > Subject: Re: [PATCH] target-i386: add pcid to both Sandy Bridge and Ivy
> > > > Bridge
> > > >
> > > > On Mon, Jan 08, 2018 at 09:50:52PM +0100, Vincent Bernat wrote:
> > > > > PCID has been introduced in Sandy Bridge and, currently, KVM doesn't
> > > > > object exposing it to VM as long as it is present on the host. Update
> > > > > CPU model for both Sandy Bridge and Ivy Bridge accordingly.
> > > > >
> > > > > Signed-off-by: Vincent Bernat <address@hidden>
> > > >
> > > > Thanks for your patch.
> > > >
> > > > We need two things, though:
> > > >
> > > > First, confirming that all hosts where the SandyBridge and
> > > > IvyBridge CPU models are runnable will support exposing PCID to
> > > > guests (otherwise updating QEMU can make a runnable VM
> > > > configuration suddenly stop being runnable). This can happen if
> > > > the host kernel is too old.
> > >
> > > I've been reading it's also Westmere. I'll check more carefully tomorrow.
> > > The difference between consumer and server SKUs is important too.
> > >
> > > > One possible way to work around this problem is to declare that
> > > > QEMU 2.12 with KVM will require Linux v3.6 and newer (because we
> > > > need Linux kernel commit ad756a1603c5 "KVM: VMX: Implement
> > > > PCID/INVPCID for guests with EPT").
> > >
> > > Note that PCID is still not supported for guests without EPT, so
> > > this would break ept=0 with recent "-cpu" models. I'm not sure of
> > > a way to fix it; probably it just has to be documented.
> >
> > GET_SUPPORTED_CPUID seems to still return PCID as supported
> > without EPT, doesn't it?
>
> Indeed it is! It will also be useful for KPTI performance without
> INVPCID, but it won't be useful without EPT.
Well, I can live with "not useful without EPT", as long as it
doesn't mean "broken without EPT". It looks like we can safely
enable it, as long as:
2) we confirm if all Intel Westmere/SandyBridge/IvyBridge CPUs
have PCID;
1) QEMU documentation states that it requires Linux v3.6 or newer
for KVM.
--
Eduardo