Re: [Qemu-devel] [PATCH] target-i386: add pcid to both Sandy Bridge and Ivy Bridge

2018-01-08 Thread Vincent Bernat
❦ 8 janvier 2018 21:19 -0200, Eduardo Habkost  : >> > 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. > >

Re: [Qemu-devel] [PATCH] target-i386: add pcid to both Sandy Bridge and Ivy Bridge

2018-01-08 Thread Vincent Bernat
❦ 8 janvier 2018 20:56 -0200, Eduardo Habkost  : > (BTW, is PCID useful for KPTI performance without INVPCID?) It seems it is: https://mail-archive.com/linux-kernel@vger.kernel.org/msg1576774.html -- Don't use conditional branches as a substitute for a logical

Re: [Qemu-devel] [PATCH] target-i386: add pcid to both Sandy Bridge and Ivy Bridge

2018-01-08 Thread Vincent Bernat
❦ 8 janvier 2018 17:37 -0500, Paolo Bonzini  : >> 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

Re: [Qemu-devel] [PATCH] target-i386: add pcid to both Sandy Bridge and Ivy Bridge

2018-01-08 Thread Eduardo Habkost
On Mon, Jan 08, 2018 at 06:09:30PM -0500, Paolo Bonzini wrote: > > > - Original Message - > > From: "Eduardo Habkost" > > To: "Paolo Bonzini" > > Cc: "Vincent Bernat" , "Richard Henderson" > > ,

Re: [Qemu-devel] [PATCH] target-i386: add pcid to both Sandy Bridge and Ivy Bridge

2018-01-08 Thread Paolo Bonzini
- Original Message - > From: "Eduardo Habkost" > To: "Paolo Bonzini" > Cc: "Vincent Bernat" , "Richard Henderson" > , qemu-devel@nongnu.org > Sent: Monday, January 8, 2018 11:56:25 PM > Subject: Re: [PATCH]

Re: [Qemu-devel] [PATCH] target-i386: add pcid to both Sandy Bridge and Ivy Bridge

2018-01-08 Thread Eduardo Habkost
On Mon, Jan 08, 2018 at 05:37:16PM -0500, Paolo Bonzini wrote: > > > - Original Message - > > From: "Eduardo Habkost" > > To: "Vincent Bernat" > > Cc: "Paolo Bonzini" , "Richard Henderson" > > ,

Re: [Qemu-devel] [PATCH] target-i386: add pcid to both Sandy Bridge and Ivy Bridge

2018-01-08 Thread Paolo Bonzini
- Original Message - > From: "Eduardo Habkost" > To: "Vincent Bernat" > Cc: "Paolo Bonzini" , "Richard Henderson" > , qemu-devel@nongnu.org > Sent: Monday, January 8, 2018 10:16:23 PM > Subject: Re: [PATCH]

Re: [Qemu-devel] [PATCH] target-i386: add pcid to both Sandy Bridge and Ivy Bridge

2018-01-08 Thread Eduardo Habkost
On Mon, Jan 08, 2018 at 11:22:36PM +0100, Vincent Bernat wrote: > ❦ 8 janvier 2018 20:14 -0200, Eduardo Habkost  : > > >> What are the consequences of running a too old kernel? Would KVM just > >> hide PCID flag? > > > > On an old kernel, the SandyBridge and IvyBridge CPU

Re: [Qemu-devel] [PATCH] target-i386: add pcid to both Sandy Bridge and Ivy Bridge

2018-01-08 Thread Vincent Bernat
❦ 8 janvier 2018 20:14 -0200, Eduardo Habkost  : >> What are the consequences of running a too old kernel? Would KVM just >> hide PCID flag? > > On an old kernel, the SandyBridge and IvyBridge CPU models will > be unexpectedly become not runnable. But, isn't it the same

Re: [Qemu-devel] [PATCH] target-i386: add pcid to both Sandy Bridge and Ivy Bridge

2018-01-08 Thread Eduardo Habkost
On Mon, Jan 08, 2018 at 10:51:48PM +0100, Vincent Bernat wrote: > ❦ 8 janvier 2018 19:16 -0200, Eduardo Habkost  : > > > 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

Re: [Qemu-devel] [PATCH] target-i386: add pcid to both Sandy Bridge and Ivy Bridge

2018-01-08 Thread Vincent Bernat
❦ 8 janvier 2018 19:16 -0200, Eduardo Habkost  : > 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

Re: [Qemu-devel] [PATCH] target-i386: add pcid to both Sandy Bridge and Ivy Bridge

2018-01-08 Thread Eduardo Habkost
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

[Qemu-devel] [PATCH] target-i386: add pcid to both Sandy Bridge and Ivy Bridge

2018-01-08 Thread Vincent Bernat
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 --- target/i386/cpu.c | 5 +++-- 1 file