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
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
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
> -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
> -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
> -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
> -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
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
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
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
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.
&
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
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
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
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
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.
> -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 ;
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
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
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,
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
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:
>
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 --
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
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
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
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
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
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_
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
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
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
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
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
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
> 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
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
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
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
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
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
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
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
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
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
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
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
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,
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
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
The following commit has been merged into the x86/urgent branch of tip:
Commit-ID: fae3a13d2a3d49a89391889808428cf1e72afbd7
Gitweb:
https://git.kernel.org/tip/fae3a13d2a3d49a89391889808428cf1e72afbd7
Author:Babu Moger
AuthorDate:Mon, 30 Nov 2020 09:57:20 -06:00
Committer
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
; 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
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
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
kvm_vcpu_arch
to hold the reserved bits in cr3_lm_rsvd_bits.
v1:
https://lore.kernel.org/lkml/160514082171.31583.9995411273370528911.stgit@bmoger-ubuntu/
Babu Moger (2):
KVM: x86: Introduce cr3_lm_rsvd_bits in kvm_vcpu_arch
KVM:SVM: Update cr3_lm_rsvd_bits for AMD SEV guests
arch/x86
For AMD SEV guests, update the cr3_lm_rsvd_bits to mask
the memory encryption bit in reserved bits.
Signed-off-by: Babu Moger
---
arch/x86/kvm/svm/svm.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/arch/x86/kvm/svm/svm.c b/arch/x86/kvm/svm/svm.c
index 2f32fd09e259
kvm_x86_ops.vcpu_after_set_cpuid handler.
Fixes: a780a3ea628268b2 ("KVM: X86: Fix reserved bits check for MOV to CR3")
Signed-off-by: Babu Moger
---
arch/x86/include/asm/kvm_host.h |1 +
arch/x86/kvm/cpuid.c|2 ++
arch/x86/kvm/x86.c |2 +-
3 files
On 11/12/20 2:32 AM, Paolo Bonzini wrote:
> On 12/11/20 01:28, Babu Moger wrote:
>> Add support to the mask_cr3_rsvd_bits() callback to mask the
>> encryption bit from the CR3 value when SEV is enabled.
>>
>> Additionally, cache the encryption mask for quick
Add support to the mask_cr3_rsvd_bits() callback to mask the
encryption bit from the CR3 value when SEV is enabled.
Additionally, cache the encryption mask for quick access during
the check.
Fixes: a780a3ea628268b2 ("KVM: X86: Fix reserved bits check for MOV to CR3")
Signed-off-by:
that can be used to mask bits
within the CR3 value before being checked by kvm_set_cr3().
Fixes: a780a3ea628268b2 ("KVM: X86: Fix reserved bits check for MOV to CR3")
Signed-off-by: Babu Moger
---
arch/x86/include/asm/kvm_host.h |2 ++
arch/x86/kvm/svm/svm.c |6 ++
callback
function to detect the encryption bit and mask it during the check.
---
Babu Moger (2):
KVM: x86: Introduce mask_cr3_rsvd_bits to mask memory encryption bit
KVM:SVM: Mask SEV encryption bit from CR3 reserved bits
arch/x86/include/asm/kvm_host.h |2 ++
arch/x86/kvm/svm/svm.c
Hi Cathy,
I was going to test these patches. But it did not apply on my tree.
Tried on kvm(https://git.kernel.org/pub/scm/virt/kvm/kvm.git) and
Mainline
(https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git). What
is your base tree?
thanks
Babu
> -Original Message-
> From: Ca
uot;)
Signed-off-by: Babu Moger
---
arch/x86/kernel/cpu/resctrl/core.c |3 +++
arch/x86/kernel/cpu/resctrl/internal.h |3 +++
arch/x86/kernel/cpu/resctrl/rdtgroup.c |9 +++--
3 files changed, 13 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/cpu/resctrl/core.c
b
nel.org; linux-
> ker...@vger.kernel.org; mi...@redhat.com; b...@alien8.de; h...@zytor.com;
> t...@linutronix.de
> Subject: Re: [PATCH v6 04/12] KVM: SVM: Modify intercept_exceptions to
> generic intercepts
>
> On 22/09/20 21:11, Babu Moger wrote:
> >
> >
> >> -Origin
> -Original Message-
> From: Paolo Bonzini
> Sent: Tuesday, September 22, 2020 8:39 AM
> To: Sean Christopherson
> Cc: Moger, Babu ; vkuzn...@redhat.com;
> jmatt...@google.com; wanpen...@tencent.com; k...@vger.kernel.org;
> j...@8bytes.org; x...@kernel.org; linux-kernel@vger.kernel.org
e vmcb for the nested L2 guest
>
> On 9/18/20 11:16 AM, Babu Moger wrote:
> > Cathy,
> > Thanks for the patches. It cleans up the code nicely.
> > But there are some issues with the patch. I was able to bring the L1
> > guest with your patch. But when I tried to load
Cathy,
Thanks for the patches. It cleans up the code nicely.
But there are some issues with the patch. I was able to bring the L1 guest
with your patch. But when I tried to load L2 guest it crashed. I am
thinking It is mostly due to save/restore part of vmcb. Few comments below.
> -Original Me
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 3
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
Reviewed-by: Jim Mattson
---
arch/x86/include/asm/svm.h | 42 --
arch
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
Reviewed-by: Jim Mattson
---
arch/x86/kvm/svm/svm.h
tions added only when tdp is off. No interceptions
when tdp is on.
- Reverted the fault priority to original order in VMX.
v1:
https://lore.kernel.org/lkml/159191202523.31436.11959784252237488867.stgit@bmoger-ubuntu/
Babu Moger (12):
KVM: SVM: Introduce vmcb_(set_intercept/cl
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/uapi/asm/svm.h |2 ++
arch/x86/kvm/svm/svm.c | 51 +++
2 files changed, 53
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
Reviewed-by: Jim Mattson
---
arch/x86/include/asm/svm.h | 36
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
Remove set_cr_intercept, clr_cr_intercept and is_cr_intercept. Instead
call generic svm_set_intercept, svm_clr_intercept an dsvm_is_intercep
tfor all cr intercepts.
Signed-off-by: Babu Moger
Reviewed-by: Jim Mattson
---
arch/x86/kvm/svm/svm.c | 34 +-
arch/x86
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
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
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
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
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
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
Reviewed-by: Jim Mattson
---
arch/x86/kvm/vmx/nested.c | 12 ++--
arch/x86/kvm/vmx/vmx.c| 29 +
arch
> https://lore.kernel.org/lkml/159234483706.6230.13753828995249423191.stgit
> @bmoger-ubuntu/
> - Taken care of few comments from Jim Mattson.
> - KVM interceptions added only when tdp is off. No interceptions
> when tdp is on.
> - Reverted the fault priority to o
On 8/26/20 3:55 PM, Jim Mattson wrote:
> On Wed, Aug 26, 2020 at 12:14 PM Babu Moger wrote:
>>
>> Modify intercept_exceptions to generic intercepts in vmcb_control_area. Use
>> the generic vmcb_set_intercept, vmcb_clr_intercept and vmcb_is_intercept to
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/uapi/asm/svm.h |2 ++
arch/x86/kvm/svm/svm.c | 51 +++
2 files changed, 53
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
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
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
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
Remove set_cr_intercept, clr_cr_intercept and is_cr_intercept. Instead
call generic svm_set_intercept, svm_clr_intercept an dsvm_is_intercep
tfor all cr intercepts.
Signed-off-by: Babu Moger
Reviewed-by: Jim Mattson
---
arch/x86/kvm/svm/svm.c | 34 +-
arch/x86
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
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
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
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
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
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
1959784252237488867.stgit@bmoger-ubuntu/
Babu Moger (12):
KVM: SVM: Introduce vmcb_(set_intercept/clr_intercept/_is_intercept)
KVM: SVM: Change intercept_cr to generic intercepts
KVM: SVM: Change intercept_dr to generic intercepts
KVM: SVM: Modify intercept_exceptions to gen
ger-ubuntu/
> - Taken care of few comments from Jim Mattson.
> - KVM interceptions added only when tdp is off. No interceptions
> when tdp is on.
> - Reverted the fault priority to original order in VMX.
>
> v1:
>
> https://lore.kernel.org/lkml/159191202523.314
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
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
1 - 100 of 384 matches
Mail list logo