Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2021-03-25 Thread Borislav Petkov
On Wed, Mar 24, 2021 at 07:43:29PM -0700, Hugh Dickins wrote: > Right, after looking into it more, I completely agree with you: > the Kaiser series (in both 4.4-stable and 4.9-stable) was simply > wrong to lose that invlpg - fine in the kaiser case when we don't > enable Globals at all, but plain

Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2021-03-24 Thread Hugh Dickins
On Wed, 24 Mar 2021, Hugh Dickins wrote: > On Wed, 24 Mar 2021, Borislav Petkov wrote: > > > Ok, > > > > some more experimenting Babu and I did lead us to: > > > > --- > > diff --git a/arch/x86/include/asm/tlbflush.h > > b/arch/x86/include/asm/tlbflush.h > > index f5ca15622dc9..259aa4889cad

Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2021-03-24 Thread Hugh Dickins
On Wed, 24 Mar 2021, Borislav Petkov wrote: > Ok, > > some more experimenting Babu and I did lead us to: > > --- > diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h > index f5ca15622dc9..259aa4889cad 100644 > --- a/arch/x86/include/asm/tlbflush.h > +++

Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2021-03-24 Thread Paolo Bonzini
On 24/03/21 22:21, Borislav Petkov wrote: if (kaiser_enabled) invpcid_flush_one(X86_CR3_PCID_ASID_USER, addr); + else + asm volatile("invlpg (%0)" ::"r" (addr) : "memory"); + invpcid_flush_one(X86_CR3_PCID_ASID_KERN, addr); } I think the

Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2021-03-24 Thread Borislav Petkov
Ok, some more experimenting Babu and I did lead us to: --- diff --git a/arch/x86/include/asm/tlbflush.h b/arch/x86/include/asm/tlbflush.h index f5ca15622dc9..259aa4889cad 100644 --- a/arch/x86/include/asm/tlbflush.h +++ b/arch/x86/include/asm/tlbflush.h @@ -250,6 +250,9 @@ static inline void

RE: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2021-03-12 Thread Babu Moger
t;; Ingo Molnar ; H . Peter Anvin > ; Thomas Gleixner ; Makarand Sonare > ; Sean Christopherson > Subject: Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support > > On Thu, Mar 11, 2021 at 04:15:37PM -0600, Babu Moger wrote: > > My host is > > # cat /etc/redhat-r

Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2021-03-11 Thread Borislav Petkov
On Thu, Mar 11, 2021 at 04:15:37PM -0600, Babu Moger wrote: > My host is > # cat /etc/redhat-release > Red Hat Enterprise Linux release 8.3 (Ootpa) > # uname -r > 5.12.0-rc2+ Please upload host and guest .config. Thx. -- Regards/Gruss, Boris.

Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2021-03-11 Thread Babu Moger
On 3/11/21 4:04 PM, Babu Moger wrote: > > > On 3/11/21 3:40 PM, Borislav Petkov wrote: >> On Thu, Mar 11, 2021 at 02:57:04PM -0600, Babu Moger wrote: >>> It is related PCID and INVPCID combination. Few more details. >>> 1. System comes up fine with "noinvpid". So, it happens when invpcid is

Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2021-03-11 Thread Babu Moger
On 3/11/21 3:40 PM, Borislav Petkov wrote: > On Thu, Mar 11, 2021 at 02:57:04PM -0600, Babu Moger wrote: >> It is related PCID and INVPCID combination. Few more details. >> 1. System comes up fine with "noinvpid". So, it happens when invpcid is >> enabled. > > Which system, host or guest? >

Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2021-03-11 Thread Babu Moger
On 3/11/21 3:36 PM, Borislav Petkov wrote: > On Thu, Mar 11, 2021 at 01:23:47PM -0800, Jim Mattson wrote: >> I would expect kaiser_enabled to be false (and PCIDs not to be used), >> since AMD CPUs are not vulnerable to Meltdown. > > Ah, of course. The guest dmesg should have > > "Kernel/User

Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2021-03-11 Thread Borislav Petkov
On Thu, Mar 11, 2021 at 02:57:04PM -0600, Babu Moger wrote: > It is related PCID and INVPCID combination. Few more details. > 1. System comes up fine with "noinvpid". So, it happens when invpcid is > enabled. Which system, host or guest? > 2. Host is coming up fine. Problem is with the guest.

Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2021-03-11 Thread Borislav Petkov
On Thu, Mar 11, 2021 at 01:23:47PM -0800, Jim Mattson wrote: > I would expect kaiser_enabled to be false (and PCIDs not to be used), > since AMD CPUs are not vulnerable to Meltdown. Ah, of course. The guest dmesg should have "Kernel/User page tables isolation: disabled." Lemme see if I can

Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2021-03-11 Thread Jim Mattson
On Thu, Mar 11, 2021 at 12:32 PM Borislav Petkov wrote: > > On Thu, Mar 11, 2021 at 09:07:55PM +0100, Borislav Petkov wrote: > > On Wed, Mar 10, 2021 at 07:21:23PM -0600, Babu Moger wrote: > > > # git bisect good > > > 59094faf3f618b2d2b2a45acb916437d611cede6 is the first bad commit > > > commit

Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2021-03-11 Thread Babu Moger
On 3/11/21 2:32 PM, Borislav Petkov wrote: > On Thu, Mar 11, 2021 at 09:07:55PM +0100, Borislav Petkov wrote: >> On Wed, Mar 10, 2021 at 07:21:23PM -0600, Babu Moger wrote: >>> # git bisect good >>> 59094faf3f618b2d2b2a45acb916437d611cede6 is the first bad commit >>> commit

Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2021-03-11 Thread Borislav Petkov
On Thu, Mar 11, 2021 at 09:07:55PM +0100, Borislav Petkov wrote: > On Wed, Mar 10, 2021 at 07:21:23PM -0600, Babu Moger wrote: > > # git bisect good > > 59094faf3f618b2d2b2a45acb916437d611cede6 is the first bad commit > > commit 59094faf3f618b2d2b2a45acb916437d611cede6 > > Author: Borislav Petkov

Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2021-03-11 Thread Borislav Petkov
On Wed, Mar 10, 2021 at 07:21:23PM -0600, Babu Moger wrote: > # git bisect good > 59094faf3f618b2d2b2a45acb916437d611cede6 is the first bad commit > commit 59094faf3f618b2d2b2a45acb916437d611cede6 > Author: Borislav Petkov > Date: Mon Dec 25 13:57:16 2017 +0100 > > x86/kaiser: Move feature

Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2021-03-10 Thread Babu Moger
On 3/10/21 9:31 AM, Paolo Bonzini wrote: > On 10/03/21 15:58, Babu Moger wrote: >> There is no upstream version 4.9.258. > > Sure there is, check out >

Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2021-03-10 Thread Paolo Bonzini
On 10/03/21 15:58, Babu Moger wrote: There is no upstream version 4.9.258. Sure there is, check out https://cdn.kernel.org/pub/linux/kernel/v4.x/ The easiest way to do it is to bisect on the linux-4.9.y branch of git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git. paolo

Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2021-03-10 Thread Babu Moger
oedel >> ; the arch/x86 maintainers ; LKML > ker...@vger.kernel.org>; Ingo Molnar ; Borislav Petkov >> ; H . Peter Anvin ; Thomas Gleixner >> ; Makarand Sonare ; Sean >> Christopherson >> Subject: Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support >> >

RE: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2021-03-10 Thread Babu Moger
nar ; Borislav Petkov > ; H . Peter Anvin ; Thomas Gleixner > ; Makarand Sonare ; Sean > Christopherson > Subject: Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support > > On 10/03/21 02:04, Babu Moger wrote: > > Debian kernel 4.10(tag 4.10~rc6-1~exp1) also works fine.

Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2021-03-10 Thread Paolo Bonzini
On 10/03/21 02:04, Babu Moger wrote: Debian kernel 4.10(tag 4.10~rc6-1~exp1) also works fine. It appears the problem is on Debian 4.9 kernel. I am not sure how to run git bisect on Debian kernel. Tried anyway. It is pointing to 47811c66356d875e76a6ca637a9d384779a659bb is the first bad commit

RE: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2021-03-09 Thread Babu Moger
H . Peter > Anvin ; Thomas Gleixner ; Makarand > Sonare ; Sean Christopherson > > Subject: RE: [PATCH v6 00/12] SVM cleanup and INVPCID feature support > > > > > -Original Message- > > From: Jim Mattson > > Sent: Tuesday, February 23, 2021 6:1

RE: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2021-02-24 Thread Babu Moger
H . Peter Anvin > ; Thomas Gleixner ; Makarand Sonare > ; Sean Christopherson > Subject: Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support > > Any updates? What should we be telling customers with Debian 9 guests? :-) Found another problem with pcid feature om SVM. I

Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2021-02-23 Thread Jim Mattson
Any updates? What should we be telling customers with Debian 9 guests? :-) On Fri, Jan 22, 2021 at 5:52 PM Babu Moger wrote: > > > > On 1/21/21 5:51 PM, Babu Moger wrote: > > > > > > On 1/20/21 9:10 PM, Babu Moger wrote: > >> > >> > >> On 1/20/21 3:45 PM, Babu Moger wrote: > >>> > >>> > >>> On

Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2021-01-22 Thread Babu Moger
On 1/21/21 5:51 PM, Babu Moger wrote: > > > On 1/20/21 9:10 PM, Babu Moger wrote: >> >> >> On 1/20/21 3:45 PM, Babu Moger wrote: >>> >>> >>> On 1/20/21 3:14 PM, Jim Mattson wrote: On Tue, Jan 19, 2021 at 3:45 PM Babu Moger wrote: > > > > On 1/19/21 5:01 PM, Jim Mattson

Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2021-01-21 Thread Babu Moger
On 1/20/21 9:10 PM, Babu Moger wrote: > > > On 1/20/21 3:45 PM, Babu Moger wrote: >> >> >> On 1/20/21 3:14 PM, Jim Mattson wrote: >>> On Tue, Jan 19, 2021 at 3:45 PM Babu Moger wrote: On 1/19/21 5:01 PM, Jim Mattson wrote: > On Mon, Sep 14, 2020 at 11:33 AM Babu Moger

Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2021-01-20 Thread Babu Moger
On 1/20/21 3:45 PM, Babu Moger wrote: > > > On 1/20/21 3:14 PM, Jim Mattson wrote: >> On Tue, Jan 19, 2021 at 3:45 PM Babu Moger wrote: >>> >>> >>> >>> On 1/19/21 5:01 PM, Jim Mattson wrote: On Mon, Sep 14, 2020 at 11:33 AM Babu Moger wrote: > Thanks Paolo. Tested Guest/nested

Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2021-01-20 Thread Babu Moger
On 1/20/21 3:14 PM, Jim Mattson wrote: > On Tue, Jan 19, 2021 at 3:45 PM Babu Moger wrote: >> >> >> >> On 1/19/21 5:01 PM, Jim Mattson wrote: >>> On Mon, Sep 14, 2020 at 11:33 AM Babu Moger wrote: >>> Thanks Paolo. Tested Guest/nested guest/kvm units tests. Everything works as

Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2021-01-20 Thread Jim Mattson
On Tue, Jan 19, 2021 at 3:45 PM Babu Moger wrote: > > > > On 1/19/21 5:01 PM, Jim Mattson wrote: > > On Mon, Sep 14, 2020 at 11:33 AM Babu Moger wrote: > > > >> Thanks Paolo. Tested Guest/nested guest/kvm units tests. Everything works > >> as expected. > > > > Debian 9 does not like this patch

Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2021-01-19 Thread Babu Moger
On 1/19/21 5:01 PM, Jim Mattson wrote: > On Mon, Sep 14, 2020 at 11:33 AM Babu Moger wrote: > >> Thanks Paolo. Tested Guest/nested guest/kvm units tests. Everything works >> as expected. > > Debian 9 does not like this patch set. As a kvm guest, it panics on a > Milan CPU unless booted with

Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2021-01-19 Thread Jim Mattson
On Mon, Sep 14, 2020 at 11:33 AM Babu Moger wrote: > Thanks Paolo. Tested Guest/nested guest/kvm units tests. Everything works > as expected. Debian 9 does not like this patch set. As a kvm guest, it panics on a Milan CPU unless booted with 'nopcid'. Gmail mangles long lines, so please see the

Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2020-09-14 Thread Babu Moger
On 9/12/20 12:08 PM, Paolo Bonzini wrote: > On 11/09/20 21:27, Babu Moger wrote: >> The following series adds the support for PCID/INVPCID on AMD guests. >> While doing it re-structured the vmcb_control_area data structure to >> combine all the intercept vectors into one 32 bit array. Makes it

Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2020-09-14 Thread Sean Christopherson
On Sat, Sep 12, 2020 at 07:08:05PM +0200, Paolo Bonzini wrote: > Queued except for patch 9 with only some changes to the names (mostly > replacing "vector" with "word"). It should get to kvm.git on Monday or > Tuesday, please give it a shot. Belated vote for s/vector/word, I found

Re: [PATCH v6 00/12] SVM cleanup and INVPCID feature support

2020-09-12 Thread Paolo Bonzini
On 11/09/20 21:27, Babu Moger wrote: > The following series adds the support for PCID/INVPCID on AMD guests. > While doing it re-structured the vmcb_control_area data structure to > combine all the intercept vectors into one 32 bit array. Makes it easy > for future additions. Re-arranged few pcid

[PATCH v6 00/12] SVM cleanup and INVPCID feature support

2020-09-11 Thread Babu Moger
The following series adds the support for PCID/INVPCID on AMD guests. While doing it re-structured the vmcb_control_area data structure to combine all the intercept vectors into one 32 bit array. Makes it easy for future additions. Re-arranged few pcid related code to make it common between SVM