[PATCH 0/2] Ajust lockdep static allocations

2016-09-22 Thread Babu Moger
tic allocations"). Added new CONFIG_PROVE_LOCKING_PLUS in case someone needs more entries to debug their large configuration. Patch 1 : Adjusts the sizes based on the new config parameter patch 2 : Adds new config parameter Babu Moger (2): lockdep: Keep the default static allocations sma

[PATCH 1/2] lockdep: Keep the default static allocations small

2016-09-22 Thread Babu Moger
needs to enable more static space for lockdep entries, lock chains and stack traces to debug large configurations. Signed-off-by: Babu Moger --- kernel/locking/lockdep_internals.h | 14 +++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/kernel/locking/lockdep_internals

[PATCH 2/2] config: Add new CONFIG_PROVE_LOCKING_PLUS

2016-09-22 Thread Babu Moger
Adding the new config parameter CONFIG_PROVE_LOCKING_PLUS in case someone needs to enable more static space for lockdep entries, lock chains and stack traces to debug large configurations. The default size is kept small to cover majority of the configs. Signed-off-by: Babu Moger --- lib

Re: [PATCH 0/2] Ajust lockdep static allocations

2016-09-23 Thread Babu Moger
On 9/23/2016 2:12 AM, Peter Zijlstra wrote: On Thu, Sep 22, 2016 at 11:43:34AM -0700, Babu Moger wrote: These patches adjust the static allocations for lockdep data structures used for debugging locking correctness. The current code reserves about 4MB extra space for these data structures. Most

Re: [PATCH 0/2] Ajust lockdep static allocations

2016-09-23 Thread Babu Moger
On 9/23/2016 9:34 AM, Peter Zijlstra wrote: On Fri, Sep 23, 2016 at 09:04:42AM -0500, Babu Moger wrote: On 9/23/2016 2:12 AM, Peter Zijlstra wrote: On Thu, Sep 22, 2016 at 11:43:34AM -0700, Babu Moger wrote: These patches adjust the static allocations for lockdep data structures used for

Re: [PATCH 0/2] Ajust lockdep static allocations

2016-09-23 Thread Babu Moger
On 9/23/2016 10:04 AM, Peter Zijlstra wrote: On Fri, Sep 23, 2016 at 09:50:52AM -0500, Babu Moger wrote: Why can't you boot? You have that little memories? 4MB doesn't seem like a worthwhile amount of memory. Also, you didn't say. This seems a somewhat crucial point. Co

Re: [PATCH 0/2] Ajust lockdep static allocations

2016-09-23 Thread Babu Moger
On 9/23/2016 10:40 AM, Peter Zijlstra wrote: On Fri, Sep 23, 2016 at 10:15:46AM -0500, Babu Moger wrote: Correct, We can't boot with lockdep. Sorry I did not make that clear. We have a limit on static size of the kernel. This stuff should be in .bss not .data. It should not affec

Re: [PATCH 0/2] Ajust lockdep static allocations

2016-09-23 Thread Babu Moger
On 9/23/2016 3:17 PM, Peter Zijlstra wrote: On Fri, Sep 23, 2016 at 02:57:39PM -0500, Babu Moger wrote: We checked again. Yes, It goes in .bss section. But in sparc we have to fit .text, .data, .bss in 7 permanent TLBs(that is totally 28MB). It was fine so far. But the commit

[PATCH v2 2/2] lockdep: Keep the static allocations small for PROVE_LOCKING_SMALL

2016-09-26 Thread Babu Moger
Reduce the size of data structure for lockdep entries half if PROVE_LOCKING_SMALL if defined. This is used for sparc. This config variable is disabled by default. Signed-off-by: Babu Moger --- kernel/locking/lockdep_internals.h | 13 ++--- 1 files changed, 10 insertions(+), 3

[PATCH v2 0/2] Ajust lockdep static allocations for sparc

2016-09-26 Thread Babu Moger
As suggested by Peter Zijlstra, keeping the default as is. Introduced new config variable CONFIG_PROVE_LOCKING_SMALL to handle sparc specific case. v0: Initial revision. Babu Moger (2): config: Add new CONFIG_PROVE_LOCKING_SMALL lockdep: Keep the static allocations small

[PATCH v2 1/2] config: Add new CONFIG_PROVE_LOCKING_SMALL

2016-09-26 Thread Babu Moger
ions. With PROVE_LOCKING feature, the kernel size could grow beyond this limit and causing system bootup issues. With this option, kernel limits the size of the entries of lock_chains, stack_trace etc. so that kernel fits in required size limit. This is only visible for sparc. Signed-off-by: Babu Moger

Re: [PATCH v2 1/2] config: Add new CONFIG_PROVE_LOCKING_SMALL

2016-09-27 Thread Babu Moger
On 9/27/2016 6:40 AM, Peter Zijlstra wrote: On Tue, Sep 27, 2016 at 06:46:25AM +0200, Sam Ravnborg wrote: Since this is only relevant for sparc, and for sparc this is "select"ed, then there is limited/no gain having this as a visible menu config option. How about adding just a simple non-visib

Re: [PATCH v2 1/2] config: Add new CONFIG_PROVE_LOCKING_SMALL

2016-09-27 Thread Babu Moger
On 9/27/2016 10:43 AM, Sam Ravnborg wrote: On Tue, Sep 27, 2016 at 09:51:40AM -0500, Babu Moger wrote: On 9/27/2016 6:40 AM, Peter Zijlstra wrote: On Tue, Sep 27, 2016 at 06:46:25AM +0200, Sam Ravnborg wrote: Since this is only relevant for sparc, and for sparc this is "select&quo

[PATCH v3 0/2] Ajust lockdep static allocations for sparc

2016-09-27 Thread Babu Moger
ggested by Peter Zijlstra, keeping the default as is. Introduced new config variable CONFIG_PROVE_LOCKING_SMALL to handle sparc specific case. v0: Initial revision. Babu Moger (2): config: Adding the new config parameter CONFIG_PROVE_LOCKING_SMALL for sparc lockdep: Limit stati

[PATCH v3 1/2] config: Adding the new config parameter CONFIG_PROVE_LOCKING_SMALL for sparc

2016-09-27 Thread Babu Moger
eyond this limit and causing system boot-up issues. With this option, kernel limits the size of the entries of lock_chains, stack_trace etc., so that kernel fits in required size limit. This is not visible to user and only used for sparc. Signed-off-by: Babu Moger --- arch/sparc/Kconfig |

[PATCH v3 2/2] lockdep: Limit static allocations if PROVE_LOCKING_SMALL is defined

2016-09-27 Thread Babu Moger
Reduce the size of data structure for lockdep entries by half if PROVE_LOCKING_SMALL if defined. This is used only for sparc. Signed-off-by: Babu Moger --- kernel/locking/lockdep_internals.h | 20 +--- 1 files changed, 17 insertions(+), 3 deletions(-) diff --git a/kernel

Filesystem slow write performance

2016-08-06 Thread Babu Moger
s with latest upstream kernel. Looked at the upstream patches and tried most of the upstream patches which appear to be related and nothing helped. Problem is fairly easy to reproduce. Let me know if you want me to try something. Thanks Babu Moger

Re: Filesystem slow write performance

2016-08-08 Thread Babu Moger
I wasn't able to repro this with mainline. Sorry for the noise. On 8/6/2016 1:49 PM, Babu Moger wrote: Hi, Seeing some terrible write performance with ext3/4 writes. Reads are fine. I have a created loop device and mounted as ext3(tried ext4 also). Here is iostat output. await ti

[PATCH] KVM:x86: AMD Processor Topology Information

2018-01-29 Thread Babu Moger
From: Stanislav Lanci This patch allow to enable x86 feature TOPOEXT. This is needed to provide information about SMT on AMD Zen CPUs to the guest. Signed-off-by: Stanislav Lanci Tested-by: Nick Sarnie Reviewed-by: Paolo Bonzini Signed-off-by: Babu Moger --- Rebased on top of linux-next

Re: [PATCH v4 2/2] KVM: SVM: Add support for Virtual SPEC_CTRL

2021-02-11 Thread Babu Moger
On 2/11/21 2:56 AM, Paolo Bonzini wrote: > On 29/01/21 01:43, Babu Moger wrote: >> This support also fixes an issue where a guest may sometimes see an >> inconsistent value for the SPEC_CTRL MSR on processors that support this >> feature. With the current SPEC_CTRL suppor

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

2021-02-24 Thread Babu Moger
t is do with CR4 flags reset during bootup. Problem was showing up with kexec loading on VM. I am not sure if this is related to that. Will send the patch soon. > > On Fri, Jan 22, 2021 at 5:52 PM Babu Moger wrote: > > > > > > > > On 1/21/21 5:51 PM,

Re: [PATCH v4 0/2] x86: Add the feature Virtual SPEC_CTRL

2021-02-10 Thread Babu Moger
Paolo/Sean, Any comments on these patches? Thanks Babu On 1/28/21 6:43 PM, Babu Moger wrote: > Newer AMD processors have a feature to virtualize the use of the > SPEC_CTRL MSR on the guest. The series adds the feature support > and enables the feature on SVM. > --- > v4: >

[PATCH v4 0/2] x86: Add the feature Virtual SPEC_CTRL

2021-01-28 Thread Babu Moger
git@bmoger-ubuntu/ v1: https://lore.kernel.org/kvm/160738054169.28590.5171339079028237631.stgit@bmoger-ubuntu/ Babu Moger (2): x86/cpufeatures: Add the Virtual SPEC_CTRL feature KVM: SVM: Add support for Virtual SPEC_CTRL arch/x86/include/asm/cpufeatures.h |1 + arch/x86/include

[PATCH v4 1/2] x86/cpufeatures: Add the Virtual SPEC_CTRL feature

2021-01-28 Thread Babu Moger
Newer AMD processors have a feature to virtualize the use of the SPEC_CTRL MSR. Presence of this feature is indicated via CPUID function 0x800A_EDX[20]: GuestSpecCtrl. When present, the SPEC_CTRL MSR is automatically virtualized. Signed-off-by: Babu Moger Acked-by: Borislav Petkov --- arch

[PATCH v4 2/2] KVM: SVM: Add support for Virtual SPEC_CTRL

2021-01-28 Thread Babu Moger
d. So, the guest will always see the proper value when it is read back. Signed-off-by: Babu Moger --- arch/x86/include/asm/svm.h |4 +++- arch/x86/kvm/svm/nested.c |2 ++ arch/x86/kvm/svm/svm.c | 27 ++- 3 files changed, 27 insertions(+), 6 deletions(-) diff --

[PATCH] x86/resctrl: Fix memory bandwidth counter width for AMD

2020-06-01 Thread Babu Moger
ffset. AMD future products will implement the CPUID 0xF.[ECX=1]:EAX. Signed-off-by: Babu Moger --- - Sending it second time. Email client had some issues first time. - Generated the patch on top of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git (x86/cache). arch/x86/kernel/cpu/re

RE: [PATCH v3 02/11] KVM: SVM: Change intercept_cr to generic intercepts

2020-07-29 Thread Babu Moger
; Borislav Petkov ; H . Peter Anvin > ; Thomas Gleixner > Subject: Re: [PATCH v3 02/11] KVM: SVM: Change intercept_cr to generic > intercepts > > On Tue, Jul 28, 2020 at 4:38 PM Babu Moger wrote: > > > > Change intercept_cr to generic intercepts in vmcb_control_a

RE: [PATCH v3 03/11] KVM: SVM: Change intercept_dr to generic intercepts

2020-07-29 Thread Babu Moger
; Borislav Petkov ; H . Peter Anvin > ; Thomas Gleixner > Subject: Re: [PATCH v3 03/11] KVM: SVM: Change intercept_dr to generic > intercepts > > On Tue, Jul 28, 2020 at 4:38 PM Babu Moger wrote: > > > > Modify intercept_dr to generic intercepts in vmcb_control_a

RE: [PATCH v3 04/11] KVM: SVM: Modify intercept_exceptions to generic intercepts

2020-07-29 Thread Babu Moger
; Molnar ; Borislav Petkov ; H . Peter Anvin > ; Thomas Gleixner > Subject: Re: [PATCH v3 04/11] KVM: SVM: Modify intercept_exceptions to > generic intercepts > > On Tue, Jul 28, 2020 at 4:38 PM Babu Moger wrote: > > > > Modify intercept_exceptions to generic intercepts

RE: [PATCH v3 05/11] KVM: SVM: Modify 64 bit intercept field to two 32 bit vectors

2020-07-29 Thread Babu Moger
; Molnar ; Borislav Petkov ; H . Peter Anvin > ; Thomas Gleixner > Subject: Re: [PATCH v3 05/11] KVM: SVM: Modify 64 bit intercept field to two > 32 > bit vectors > > On Tue, Jul 28, 2020 at 4:38 PM Babu Moger wrote: > > > > Convert all the intercepts to one array of 32

RE: [PATCH v3 06/11] KVM: SVM: Add new intercept vector in vmcb_control_area

2020-07-29 Thread Babu Moger
; Molnar ; Borislav Petkov ; H . Peter Anvin > ; Thomas Gleixner > Subject: Re: [PATCH v3 06/11] KVM: SVM: Add new intercept vector in > vmcb_control_area > > On Tue, Jul 28, 2020 at 4:38 PM Babu Moger wrote: > > > > The new intercept bits have been added in vmcb control area

RE: [PATCH v3 11/11] KVM:SVM: Enable INVPCID feature on AMD

2020-07-30 Thread Babu Moger
ch/x86 > maintainers ; LKML ; Ingo > Molnar ; Borislav Petkov ; H . Peter Anvin > ; Thomas Gleixner > Subject: Re: [PATCH v3 11/11] KVM:SVM: Enable INVPCID feature on AMD > > On Tue, Jul 28, 2020 at 4:39 PM Babu Moger wrote: > > > > The following intercept bit has

RE: [PATCH v3 01/11] KVM: SVM: Introduce __set_intercept, __clr_intercept and __is_intercept

2020-07-30 Thread Babu Moger
k...@vger.kernel.org; j...@8bytes.org; x...@kernel.org; linux- > ker...@vger.kernel.org; mi...@redhat.com; b...@alien8.de; h...@zytor.com; > t...@linutronix.de > Subject: Re: [PATCH v3 01/11] KVM: SVM: Introduce __set_intercept, > __clr_intercept and __is_intercept > > On 29/07/20 01:37, Ba

RE: [PATCH v3 03/11] KVM: SVM: Change intercept_dr to generic intercepts

2020-07-30 Thread Babu Moger
> -Original Message- > From: Paolo Bonzini > Sent: Wednesday, July 29, 2020 6:12 PM > To: Jim Mattson ; Moger, Babu > > Cc: Vitaly Kuznetsov ; Wanpeng Li > ; Sean Christopherson > ; kvm list ; Joerg > Roedel ; the arch/x86 maintainers ; LKML > ; Ingo Molnar ; Borislav > Petkov ; H . Pe

RE: [PATCH v3 03/11] KVM: SVM: Change intercept_dr to generic intercepts

2020-07-30 Thread Babu Moger
> -Original Message- > From: kvm-ow...@vger.kernel.org On Behalf > Of Babu Moger > Sent: Thursday, July 30, 2020 11:38 AM > To: Paolo Bonzini ; Jim Mattson > > Cc: Vitaly Kuznetsov ; Wanpeng Li > ; Sean Christopherson > ; kvm list ; Joerg > Roedel ; t

[PATCH v4 06/12] KVM: SVM: Add new intercept vector in vmcb_control_area

2020-08-06 Thread Babu Moger
the links below: Link: https://www.amd.com/system/files/TechDocs/24593.pdf Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537 Signed-off-by: Babu Moger Reviewed-by: Jim Mattson --- arch/x86/include/asm/svm.h |7 +++ arch/x86/kvm/svm/nested.c |3 ++- arch/x86/kvm/trace.h

[PATCH v4 05/12] KVM: SVM: Modify 64 bit intercept field to two 32 bit vectors

2020-08-06 Thread Babu Moger
Convert all the intercepts to one array of 32 bit vectors in vmcb_control_area. This makes it easy for future intercept vector additions. Also update trace functions. Signed-off-by: Babu Moger Reviewed-by: Jim Mattson --- arch/x86/include/asm/svm.h | 14 +++--- arch/x86/kvm/svm

[PATCH v4 02/12] KVM: SVM: Change intercept_cr to generic intercepts

2020-08-06 Thread Babu Moger
Change intercept_cr to generic intercepts in vmcb_control_area. Use the new vmcb_set_intercept, vmcb_clr_intercept and vmcb_is_intercept where applicable. Signed-off-by: Babu Moger --- arch/x86/include/asm/svm.h | 42 -- arch/x86/kvm/svm/nested.c

[PATCH v4 04/12] KVM: SVM: Modify intercept_exceptions to generic intercepts

2020-08-06 Thread Babu Moger
Modify intercept_exceptions to generic intercepts in vmcb_control_area. Use the generic vmcb_set_intercept, vmcb_clr_intercept and vmcb_is_intercept to set/clear/test the intercept_exceptions bits. Signed-off-by: Babu Moger Reviewed-by: Jim Mattson --- arch/x86/include/asm/svm.h | 22

[PATCH v4 03/12] KVM: SVM: Change intercept_dr to generic intercepts

2020-08-06 Thread Babu Moger
Modify intercept_dr to generic intercepts in vmcb_control_area. Use the generic vmcb_set_intercept, vmcb_clr_intercept and vmcb_is_intercept to set/clear/test the intercept_dr bits. Signed-off-by: Babu Moger --- arch/x86/include/asm/svm.h | 36 ++-- arch/x86

[PATCH v4 01/12] KVM: SVM: Introduce vmcb_set_intercept, vmcb_clr_intercept and vmcb_is_intercept

2020-08-06 Thread Babu Moger
This is in preparation for the future intercept vector additions. Add new functions vmcb_set_intercept, vmcb_clr_intercept and vmcb_is_intercept using kernel APIs __set_bit, __clear_bit and test_bit espectively. Signed-off-by: Babu Moger --- arch/x86/kvm/svm/svm.h | 15 +++ 1

[PATCH v4 00/12] SVM cleanup and INVPCID support for the AMD guests

2020-08-06 Thread Babu Moger
inal order in VMX. v1: https://lore.kernel.org/lkml/159191202523.31436.11959784252237488867.stgit@bmoger-ubuntu/ Babu Moger (12): KVM: SVM: Introduce vmcb_set_intercept, vmcb_clr_intercept and vmcb_is_intercept KVM: SVM: Change intercept_cr to generic intercepts KVM: SVM: Chang

[PATCH v4 09/12] KVM: SVM: Remove set_exception_intercept and clr_exception_intercept

2020-08-06 Thread Babu Moger
Remove set_exception_intercept and clr_exception_intercept. Replace with generic set_intercept and clr_intercept for these calls. Signed-off-by: Babu Moger Reviewed-by: Jim Mattson --- arch/x86/kvm/svm/svm.c | 20 ++-- arch/x86/kvm/svm/svm.h | 18 -- 2 files

[PATCH v4 07/12] KVM: nSVM: Cleanup nested_state data structure

2020-08-06 Thread Babu Moger
host_intercept_exceptions is not used anywhere. Clean it up. Signed-off-by: Babu Moger Reviewed-by: Jim Mattson --- arch/x86/kvm/svm/nested.c |2 -- arch/x86/kvm/svm/svm.h|1 - 2 files changed, 3 deletions(-) diff --git a/arch/x86/kvm/svm/nested.c b/arch/x86/kvm/svm/nested.c index

[PATCH v4 11/12] KVM: X86: Move handling of INVPCID types to x86

2020-08-06 Thread Babu Moger
INVPCID instruction handling is mostly same across both VMX and SVM. So, move the code to common x86.c. Signed-off-by: Babu Moger Reviewed-by: Jim Mattson --- arch/x86/kvm/vmx/vmx.c | 68 +- arch/x86/kvm/x86.c | 78

[PATCH v4 08/12] KVM: SVM: Remove set_cr_intercept, clr_cr_intercept and is_cr_intercept

2020-08-06 Thread Babu Moger
Remove set_cr_intercept, clr_cr_intercept and is_cr_intercept. Instead call generic set_intercept, clr_intercept and is_intercept for all cr intercepts. Signed-off-by: Babu Moger Reviewed-by: Jim Mattson --- arch/x86/kvm/svm/svm.c | 34 +- arch/x86/kvm/svm

[PATCH v4 12/12] KVM:SVM: Enable INVPCID feature on AMD

2020-08-06 Thread Babu Moger
com/system/files/TechDocs/24593.pdf Link: https://bugzilla.kernel.org/show_bug.cgi?id=206537 Signed-off-by: Babu Moger --- arch/x86/include/uapi/asm/svm.h |2 ++ arch/x86/kvm/svm/svm.c | 51 +++ 2 files changed, 53 insertions(+) diff --git a/arch/x

[PATCH v4 10/12] KVM: X86: Rename and move the function vmx_handle_memory_failure to x86.c

2020-08-06 Thread Babu Moger
Handling of kvm_read/write_guest_virt*() errors can be moved to common code. The same code can be used by both VMX and SVM. Signed-off-by: Babu Moger --- arch/x86/kvm/vmx/nested.c | 12 ++-- arch/x86/kvm/vmx/vmx.c| 29 + arch/x86/kvm/vmx/vmx.h

Re: [PATCH 2/2] KVM: SVM: Add support for Virtual SPEC_CTRL

2020-12-10 Thread Babu Moger
Sean, Your response did not land in my mailbox for some reason. Replying using In-reply-to option. >Hrm, is MSR_AMD64_VIRT_SPEC_CTRL only for SSBD? Should that MSR be renamed to >avoid confusion with the new form of VIRT_SPEC_CTRL? We can rename it to MSR_AMD64_VIRT_SSBD_SPEC_CTRL if that is an

RE: [PATCH 2/2] KVM: SVM: Add support for Virtual SPEC_CTRL

2020-12-10 Thread Babu Moger
CH 2/2] KVM: SVM: Add support for Virtual SPEC_CTRL > > On Mon, Dec 7, 2020 at 2:38 PM Babu Moger wrote: > > > > Newer AMD processors have a feature to virtualize the use of the > > SPEC_CTRL MSR. When supported, the SPEC_CTRL MSR is automatically > > virtualized and

Re: [PATCH 2/2] KVM: SVM: Add support for Virtual SPEC_CTRL

2020-12-10 Thread Babu Moger
On 12/10/20 3:36 PM, Jim Mattson wrote: > On Thu, Dec 10, 2020 at 1:26 PM Babu Moger wrote: >> >> Hi Jim, >> >>> -Original Message- >>> From: Jim Mattson >>> Sent: Monday, December 7, 2020 5:06 PM >>> To: Moger, Babu

Re: [PATCH 2/2] KVM: SVM: Add support for Virtual SPEC_CTRL

2020-12-22 Thread Babu Moger
On 12/7/20 5:06 PM, Jim Mattson wrote: > On Mon, Dec 7, 2020 at 2:38 PM Babu Moger wrote: >> >> Newer AMD processors have a feature to virtualize the use of the >> SPEC_CTRL MSR. When supported, the SPEC_CTRL MSR is automatically >> virtualized and no longer requi

Re: [PATCH 1/2] x86/cpufeatures: Add the Virtual SPEC_CTRL feature

2020-12-22 Thread Babu Moger
On 12/9/20 5:11 PM, Jim Mattson wrote: > On Wed, Dec 9, 2020 at 2:39 PM Babu Moger wrote: >> >> >> >> On 12/7/20 5:22 PM, Jim Mattson wrote: >>> On Mon, Dec 7, 2020 at 2:38 PM Babu Moger wrote: >>>> >>>> Newer AMD processors have a f

Re: [PATCH 1/2] x86/cpufeatures: Add the Virtual SPEC_CTRL feature

2020-12-22 Thread Babu Moger
On 12/22/20 11:41 AM, Sean Christopherson wrote: > On Tue, Dec 22, 2020, Babu Moger wrote: >> >> On 12/9/20 5:11 PM, Jim Mattson wrote: >>> On Wed, Dec 9, 2020 at 2:39 PM Babu Moger wrote: >>>> >>>> On 12/7/20 5:22 PM, Jim Mattson wrote: >&g

[PATCH v2 1/2] x86/cpufeatures: Add the Virtual SPEC_CTRL feature

2020-12-22 Thread Babu Moger
Newer AMD processors have a feature to virtualize the use of the SPEC_CTRL MSR. Presence of this feature is indicated via CPUID function 0x800A_EDX[20]: GuestSpecCtrl. When preset, the SPEC_CTRL MSR is automatically virtualized. Signed-off-by: Babu Moger --- arch/x86/include/asm

[PATCH v2 0/2] x86: Add the feature Virtual SPEC_CTRL

2020-12-22 Thread Babu Moger
f renaming MSR_AMD64_VIRT_SPEC_CTRL. But, it might create even more confusion, so dropped the idea for now. v1: https://lore.kernel.org/kvm/160738054169.28590.5171339079028237631.stgit@bmoger-ubuntu/ --- Babu Moger (2): x86/cpufeatures: Add the Virtual SPEC_CTRL feature KVM: SVM: Add support for Virtual

[PATCH v2 2/2] KVM: SVM: Add support for Virtual SPEC_CTRL

2020-12-22 Thread Babu Moger
b_init, so this will no longer be an issue. Signed-off-by: Babu Moger --- arch/x86/include/asm/svm.h |4 +++- arch/x86/kvm/svm/svm.c | 29 + 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/arch/x86/include/asm/svm.h b/arch/x86/include/asm/s

[PATCH 0/2] x86: Add the feature Virtual SPEC_CTRL

2020-12-07 Thread Babu Moger
Newer AMD processors have a feature to virtualize the use of the SPEC_CTRL MSR. The series adds the feature support and enables the feature on SVM. --- Babu Moger (2): x86/cpufeatures: Add the Virtual SPEC_CTRL feature KVM: SVM: Add support for Virtual SPEC_CTRL arch/x86/include

[PATCH 1/2] x86/cpufeatures: Add the Virtual SPEC_CTRL feature

2020-12-07 Thread Babu Moger
Newer AMD processors have a feature to virtualize the use of the SPEC_CTRL MSR. This feature is identified via CPUID 0x800A_EDX[20]. When present, the SPEC_CTRL MSR is automatically virtualized and no longer requires hypervisor intervention. Signed-off-by: Babu Moger --- arch/x86/include

[PATCH 2/2] KVM: SVM: Add support for Virtual SPEC_CTRL

2020-12-07 Thread Babu Moger
ned-off-by: Babu Moger --- arch/x86/kvm/svm/svm.c | 17 ++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c index 79b3a564f1c9..3d73ec0cdb87 100644 --- a/arch/x86/kvm/svm/svm.c +++ b/arch/x86/kvm/svm/svm.c @@ -1230,

Re: [PATCH v3 2/2] KVM: SVM: Add support for Virtual SPEC_CTRL

2021-01-19 Thread Babu Moger
On 1/19/21 12:31 PM, Sean Christopherson wrote: > On Fri, Jan 15, 2021, Babu Moger wrote: >> --- >> arch/x86/include/asm/svm.h |4 +++- >> arch/x86/kvm/svm/sev.c |4 >> arch/x86/kvm/svm/svm.c | 19 +++ >> 3 files chang

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 > M

Re: [PATCH] x86/tlb: Flush global mappings when KAISER is disabled

2021-03-25 Thread Babu Moger
ss from both PCIDs in the KAISER-enabled case. But if > KAISER is not enabled and the machine has global mappings in the TLB, > then those global mappings do not get invalidated, which would lead to > the above mismatch from using a stale TLB entry. > > So make sure to flush those

Re: [PATCH v2 00/24] x86/resctrl: Merge the CDP resources

2021-03-30 Thread Babu Moger
Hi James, Thanks for the patches. Few comments below. On 3/12/21 11:58 AM, James Morse wrote: > Hi folks, > > Thanks to Reinette and Jamie for the comments on v1. Major changes in v2 are > to keep the closid in resctrl_arch_update_domains(), eliminating one patch, > splitting another that was mak

Re: [PATCH] KVM: SVM: Clear the CR4 register on reset

2021-03-02 Thread Babu Moger
On 3/2/21 1:20 PM, Sean Christopherson wrote: > On Tue, Mar 02, 2021, Babu Moger wrote: >> This problem was reported on a SVM guest while executing kexec. >> Kexec fails to load the new kernel when the PCID feature is enabled. >> >> When kexec starts loading th

Re: [PATCH v2 00/24] x86/resctrl: Merge the CDP resources

2021-04-06 Thread Babu Moger
On 4/6/21 12:19 PM, James Morse wrote: > Hi Babu, > > On 30/03/2021 21:36, Babu Moger wrote: >> On 3/12/21 11:58 AM, James Morse wrote: >>> This series re-folds the resctrl code so the CDP resources (L3CODE et al) >>> behaviour is all contained in the filesy

Re: [PATCH 1/2] x86/cpufeatures: Add the Virtual SPEC_CTRL feature

2020-12-09 Thread Babu Moger
On 12/7/20 5:22 PM, Jim Mattson wrote: > On Mon, Dec 7, 2020 at 2:38 PM Babu Moger wrote: >> >> Newer AMD processors have a feature to virtualize the use of the SPEC_CTRL >> MSR. This feature is identified via CPUID 0x800A_EDX[20]. When present, >> the SPE

Re: [PATCH] x86/resctrl: Fix AMD L3 QOS CDP enable/disable

2020-11-19 Thread Babu Moger
Hi Reinette, On 11/18/20 4:18 PM, Reinette Chatre wrote: > Hi Babu, > > On 11/6/2020 12:14 PM, Babu Moger wrote: >> When the AMD QoS feature CDP(code and data prioritization) is enabled >> or disabled, the CDP bit in MSR _0C81 is written on one of the >> cpu

RE: [PATCH v2] x86/resctrl: Fix AMD L3 QOS CDP enable/disable

2020-11-30 Thread Babu Moger
; Subject: Re: [PATCH v2] x86/resctrl: Fix AMD L3 QOS CDP enable/disable > > Hi Babu, > > On 11/20/2020 9:25 AM, Babu Moger wrote: > > When the AMD QoS feature CDP(code and data prioritization) is enabled > > or disabled, the CDP bit in MSR _0C81 is written on one of

[PATCH v3] x86/resctrl: Fix AMD L3 QOS CDP enable/disable

2020-11-30 Thread Babu Moger
quot;) Signed-off-by: Babu Moger Reviewed-by: Reinette Chatre --- v3: Fixed checkpatch suggestions. Addred Reviewed-by from Reinette. v2: Taken care of Reinette's comments. Changed the field name to arch_has_per_cpu_cfg to be bit more meaningful about the CPU scope. Also fixed

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

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 p

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

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 "noi

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 v5 02/21] selftests/resctrl: Fix compilation issues for global variables

2021-03-12 Thread Babu Moger
> -Original Message- > From: Fenghua Yu > Sent: Sunday, March 7, 2021 8:55 AM > To: Shuah Khan ; Tony Luck ; > Reinette Chatre ; Moger, Babu > > Cc: linux-kselftest ; linux-kernel ker...@vger.kernel.org>; Fenghua Yu > Subject: [PATCH v5 02/21] selftests/resctrl: Fix compilation issue

RE: [PATCH v5 00/21] Miscellaneous fixes for resctrl selftests

2021-03-12 Thread Babu Moger
Hi Fenghua, Thanks for the patches. Sanity tested them on AMD systems. Appears to work fine. Few minor comments in few patches. Tested-by: Babu Moger Thanks Babu > -Original Message- > From: Fenghua Yu > Sent: Sunday, March 7, 2021 8:55 AM > To: Shuah Khan ; Tony Luck

RE: [PATCH v5 04/21] selftests/resctrl: Clean up resctrl features check

2021-03-12 Thread Babu Moger
> -Original Message- > From: Fenghua Yu > Sent: Sunday, March 7, 2021 8:55 AM > To: Shuah Khan ; Tony Luck ; > Reinette Chatre ; Moger, Babu > > Cc: linux-kselftest ; linux-kernel ker...@vger.kernel.org>; Fenghua Yu > Subject: [PATCH v5 04/21] selftests/resctrl: Clean up resctrl feat

RE: [PATCH v5 07/21] selftests/resctrl: Rename CQM test as CMT test

2021-03-12 Thread Babu Moger
> -Original Message- > From: Fenghua Yu > Sent: Sunday, March 7, 2021 8:55 AM > To: Shuah Khan ; Tony Luck ; > Reinette Chatre ; Moger, Babu > > Cc: linux-kselftest ; linux-kernel ker...@vger.kernel.org>; Fenghua Yu > Subject: [PATCH v5 07/21] selftests/resctrl: Rename CQM test as CM

RE: [PATCH v5 08/21] selftests/resctrl: Call kselftest APIs to log test results

2021-03-12 Thread Babu Moger
> -Original Message- > From: Fenghua Yu > Sent: Sunday, March 7, 2021 8:55 AM > To: Shuah Khan ; Tony Luck ; > Reinette Chatre ; Moger, Babu > > Cc: linux-kselftest ; linux-kernel ker...@vger.kernel.org>; Fenghua Yu > Subject: [PATCH v5 08/21] selftests/resctrl: Call kselftest APIs t

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 Gue

Re: [PATCH v3 2/2] KVM: SVM: Add support for Virtual SPEC_CTRL

2021-01-20 Thread Babu Moger
On 1/19/21 5:45 PM, Sean Christopherson wrote: > On Tue, Jan 19, 2021, Babu Moger wrote: >> >> On 1/19/21 12:31 PM, Sean Christopherson wrote: >>> On Fri, Jan 15, 2021, Babu Moger wrote: >>>> @@ -3789,7 +3792,10 @@ static __no_kcsan fastpath_t svm_

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

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 Babu Moger
On 3/10/21 8:55 AM, Babu Moger wrote: > > >> -Original Message- >> From: Paolo Bonzini >> Sent: Wednesday, March 10, 2021 3:09 AM >> To: Moger, Babu ; Jim Mattson >> >> Cc: Vitaly Kuznetsov ; Wanpeng Li >> ; kvm list ; Joerg R

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 > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fcdn.kernel.org%2Fpub%2Flinux%2Fkernel%2Fv4.x%2F&dat

[PATCH] KVM: SVM: Clear the CR4 register on reset

2021-03-02 Thread Babu Moger
much later in SMP initialization. Having the X86_CR4_PCIDE bit set during SMP boot can cause a boot failures. Fix the issue by resetting the CR4 register in init_vmcb(). Signed-off-by: Babu Moger --- arch/x86/kvm/svm/svm.c |1 + 1 file changed, 1 insertion(+) diff --git a/arch/x86/kv

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

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

2021-03-09 Thread Babu Moger
> -Original Message- > From: Babu Moger > Sent: Wednesday, February 24, 2021 4:17 PM > To: Jim Mattson > Cc: Paolo Bonzini ; Vitaly Kuznetsov > ; Wanpeng Li ; kvm list > ; Joerg Roedel ; the arch/x86 > maintainers ; LKML ; Ingo > Molnar ; Borislav Petkov ;

RE: [PATCH v2 2/2] KVM: SVM: Add support for Virtual SPEC_CTRL

2021-01-04 Thread Babu Moger
oogle.com > Subject: Re: [PATCH v2 2/2] KVM: SVM: Add support for Virtual SPEC_CTRL > > On 12/22/20 4:31 PM, Babu Moger wrote: > > Newer AMD processors have a feature to virtualize the use of the > > SPEC_CTRL MSR. A hypervisor may wish to impose speculation controls on

RE: [PATCH v2 2/2] KVM: SVM: Add support for Virtual SPEC_CTRL

2021-01-04 Thread Babu Moger
> jmatt...@google.com > Subject: Re: [PATCH v2 2/2] KVM: SVM: Add support for Virtual SPEC_CTRL > > On Wed, Dec 30, 2020, Borislav Petkov wrote: > > On Tue, Dec 22, 2020 at 04:31:55PM -0600, Babu Moger wrote: > > > @@ -2549,7 +2559,10 @@ static int

[PATCH v3 0/2] x86: Add the feature Virtual SPEC_CTRL

2021-01-15 Thread Babu Moger
ea for now. v1: https://lore.kernel.org/kvm/160738054169.28590.5171339079028237631.stgit@bmoger-ubuntu/ Babu Moger (2): x86/cpufeatures: Add the Virtual SPEC_CTRL feature KVM: SVM: Add support for Virtual SPEC_CTRL arch/x86/include/asm/cpufeatures.h |1 + arch/x86/include

[PATCH v3 1/2] x86/cpufeatures: Add the Virtual SPEC_CTRL feature

2021-01-15 Thread Babu Moger
Newer AMD processors have a feature to virtualize the use of the SPEC_CTRL MSR. Presence of this feature is indicated via CPUID function 0x800A_EDX[20]: GuestSpecCtrl. When present, the SPEC_CTRL MSR is automatically virtualized. Signed-off-by: Babu Moger Acked-by: Borislav Petkov --- arch

[PATCH v3 2/2] KVM: SVM: Add support for Virtual SPEC_CTRL

2021-01-15 Thread Babu Moger
d. So, the guest will always see the proper value when it is read back. Signed-off-by: Babu Moger --- arch/x86/include/asm/svm.h |4 +++- arch/x86/kvm/svm/sev.c |4 arch/x86/kvm/svm/svm.c | 19 +++ 3 files changed, 22 insertions(+), 5 deletions(-) diff --git

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 Mog

[PATCH v2] x86/resctrl: Fix AMD L3 QOS CDP enable/disable

2020-11-20 Thread Babu Moger
quot;) Signed-off-by: Babu Moger --- v2: Taken care of Reinette's comments. Changed the field name to arch_has_per_cpu_cfg to be bit more meaningful about the CPU scope. Also fixed some wordings. v1: https://lore.kernel.org/lkml/160469365104.21002.2901190946502347327.stgit@bmoger-ubun

[PATCH v2] pci: Limit VPD length for megaraid_sas adapter

2015-11-11 Thread Babu Moger
tch fixes the issue by setting the vpd length to 0. Signed-off-by: Babu Moger --- drivers/pci/quirks.c | 38 ++ 1 files changed, 38 insertions(+), 0 deletions(-) diff --git a/drivers/pci/quirks.c b/drivers/pci/quirks.c index b03373f..f739e47 100644 ---

Re: [PATCH v2] pci: Limit VPD length for megaraid_sas adapter

2015-11-11 Thread Babu Moger
On 11/11/2015 1:30 PM, Myron Stowe wrote: > On Wed, Nov 11, 2015 at 8:54 AM, Babu Moger wrote: >> Changes since v1 -> v2 >> Removed the changes in pci_id.h. Kept all the vendor >> ids in quirks.c >> >> Reading or Writing of PCI VPD data causes system pani

Re: [PATCH v4] pci: Limit VPD length for megaraid_sas adapter

2015-12-07 Thread Babu Moger
Hi Bjorn, My old logs were lost. So, I had to recreate the issue again. So it took sometime. On 12/7/2015 11:29 AM, Bjorn Helgaas wrote: > Hi Babu, > > On Thu, Dec 03, 2015 at 12:25:19PM -0800, Babu Moger wrote: >> Reading or Writing of PCI VPD data causes system panic. >>

[PATCH v3] pci: Limit VPD length for megaraid_sas adapter

2015-11-19 Thread Babu Moger
patchwork.ozlabs.org/patch/534843/ or https://lkml.org/lkml/2015/10/23/97 Tried to fix it this way, but problem is I dont see the proper start/end TAGs(at least for this adapter) at all. The data is mostly junk or zeros. This patch fixes the issue by setting the vpd length to 0x80. Signed-off-by:

  1   2   3   4   >