[tip:x86/pti] KVM/nVMX: Set the CPU_BASED_USE_MSR_BITMAPS if we have a valid L02 MSR bitmap

2018-02-13 Thread tip-bot for KarimAllah Ahmed
Commit-ID: 3712caeb14dcb33fb4d5114f14c0beef10aca101 Gitweb: https://git.kernel.org/tip/3712caeb14dcb33fb4d5114f14c0beef10aca101 Author: KarimAllah Ahmed <karah...@amazon.de> AuthorDate: Sat, 10 Feb 2018 23:39:26 + Committer: Ingo Molnar <mi...@kernel.org> CommitDate: Tue,

[tip:x86/pti] KVM/nVMX: Set the CPU_BASED_USE_MSR_BITMAPS if we have a valid L02 MSR bitmap

2018-02-13 Thread tip-bot for KarimAllah Ahmed
Commit-ID: 3712caeb14dcb33fb4d5114f14c0beef10aca101 Gitweb: https://git.kernel.org/tip/3712caeb14dcb33fb4d5114f14c0beef10aca101 Author: KarimAllah Ahmed AuthorDate: Sat, 10 Feb 2018 23:39:26 + Committer: Ingo Molnar CommitDate: Tue, 13 Feb 2018 09:00:17 +0100 KVM/nVMX: Set

[tip:x86/pti] X86/nVMX: Properly set spec_ctrl and pred_cmd before merging MSRs

2018-02-13 Thread tip-bot for KarimAllah Ahmed
Commit-ID: 206587a9fb764d71f035dc7f6d3b6488f5d5b304 Gitweb: https://git.kernel.org/tip/206587a9fb764d71f035dc7f6d3b6488f5d5b304 Author: KarimAllah Ahmed <karah...@amazon.de> AuthorDate: Sat, 10 Feb 2018 23:39:25 + Committer: Ingo Molnar <mi...@kernel.org> CommitDate: Tue,

[tip:x86/pti] X86/nVMX: Properly set spec_ctrl and pred_cmd before merging MSRs

2018-02-13 Thread tip-bot for KarimAllah Ahmed
Commit-ID: 206587a9fb764d71f035dc7f6d3b6488f5d5b304 Gitweb: https://git.kernel.org/tip/206587a9fb764d71f035dc7f6d3b6488f5d5b304 Author: KarimAllah Ahmed AuthorDate: Sat, 10 Feb 2018 23:39:25 + Committer: Ingo Molnar CommitDate: Tue, 13 Feb 2018 09:00:06 +0100 X86/nVMX: Properly

[tip:x86/pti] X86/nVMX: Properly set spec_ctrl and pred_cmd before merging MSRs

2018-02-11 Thread tip-bot for KarimAllah Ahmed
Commit-ID: fb5b90b795c76e9c10c520fcdb7fe0d7b8334833 Gitweb: https://git.kernel.org/tip/fb5b90b795c76e9c10c520fcdb7fe0d7b8334833 Author: KarimAllah Ahmed <karah...@amazon.de> AuthorDate: Sat, 10 Feb 2018 23:39:25 + Committer: Ingo Molnar <mi...@kernel.org> CommitDate: Sun,

[tip:x86/pti] X86/nVMX: Properly set spec_ctrl and pred_cmd before merging MSRs

2018-02-11 Thread tip-bot for KarimAllah Ahmed
Commit-ID: fb5b90b795c76e9c10c520fcdb7fe0d7b8334833 Gitweb: https://git.kernel.org/tip/fb5b90b795c76e9c10c520fcdb7fe0d7b8334833 Author: KarimAllah Ahmed AuthorDate: Sat, 10 Feb 2018 23:39:25 + Committer: Ingo Molnar CommitDate: Sun, 11 Feb 2018 11:24:16 +0100 X86/nVMX: Properly

[tip:x86/pti] KVM/nVMX: Set the CPU_BASED_USE_MSR_BITMAPS if we have a valid L02 MSR bitmap

2018-02-11 Thread tip-bot for KarimAllah Ahmed
Commit-ID: ff37dc0cd96c266c7700386b7ba48abc32a91b1f Gitweb: https://git.kernel.org/tip/ff37dc0cd96c266c7700386b7ba48abc32a91b1f Author: KarimAllah Ahmed <karah...@amazon.de> AuthorDate: Sat, 10 Feb 2018 23:39:26 + Committer: Ingo Molnar <mi...@kernel.org> CommitDate: Sun,

[tip:x86/pti] KVM/nVMX: Set the CPU_BASED_USE_MSR_BITMAPS if we have a valid L02 MSR bitmap

2018-02-11 Thread tip-bot for KarimAllah Ahmed
Commit-ID: ff37dc0cd96c266c7700386b7ba48abc32a91b1f Gitweb: https://git.kernel.org/tip/ff37dc0cd96c266c7700386b7ba48abc32a91b1f Author: KarimAllah Ahmed AuthorDate: Sat, 10 Feb 2018 23:39:26 + Committer: Ingo Molnar CommitDate: Sun, 11 Feb 2018 11:24:16 +0100 KVM/nVMX: Set

Re: [RFC 00/12] KVM/X86: Introduce a new guest mapping API

2018-02-10 Thread KarimAllah Ahmed
On 02/05/2018 08:26 PM, Mihai Donțu wrote: On Mon, 2018-02-05 at 19:47 +0100, KarimAllah Ahmed wrote: Guest memory can either be directly managed by the kernel (i.e. have a "struct page") or they can simply live outside kernel control (i.e. do not have a "struct page")

Re: [RFC 00/12] KVM/X86: Introduce a new guest mapping API

2018-02-10 Thread KarimAllah Ahmed
On 02/05/2018 08:26 PM, Mihai Donțu wrote: On Mon, 2018-02-05 at 19:47 +0100, KarimAllah Ahmed wrote: Guest memory can either be directly managed by the kernel (i.e. have a "struct page") or they can simply live outside kernel control (i.e. do not have a "struct page")

Re: [PATCH 3/3] X86/nVMX: Update the MSR_BITMAP field with the L02 MSR BITMAP

2018-02-09 Thread KarimAllah Ahmed
On 02/10/2018 12:57 AM, Jim Mattson wrote: On Fri, Feb 9, 2018 at 3:41 PM, KarimAllah Ahmed <karah...@amazon.com> wrote: I assume you are referring to this: https://patchwork.kernel.org/patch/10194819/ .. which is now: commit 904e14fb7cb9 ("KVM: VMX: make MSR bitmaps per-VC

Re: [PATCH 3/3] X86/nVMX: Update the MSR_BITMAP field with the L02 MSR BITMAP

2018-02-09 Thread KarimAllah Ahmed
On 02/10/2018 12:57 AM, Jim Mattson wrote: On Fri, Feb 9, 2018 at 3:41 PM, KarimAllah Ahmed wrote: I assume you are referring to this: https://patchwork.kernel.org/patch/10194819/ .. which is now: commit 904e14fb7cb9 ("KVM: VMX: make MSR bitmaps per-VCPU") right? If this i

Re: [PATCH 3/3] X86/nVMX: Update the MSR_BITMAP field with the L02 MSR BITMAP

2018-02-09 Thread KarimAllah Ahmed
On 02/10/2018 12:26 AM, Jim Mattson wrote: On Thu, Feb 8, 2018 at 2:53 PM, KarimAllah Ahmed <karah...@amazon.de> wrote: ... otherwise we will just be running with the L1 MSR BITMAP! It does not seem that we ever update the MSR_BITMAP when the nested guest is running. The only place wh

Re: [PATCH 3/3] X86/nVMX: Update the MSR_BITMAP field with the L02 MSR BITMAP

2018-02-09 Thread KarimAllah Ahmed
On 02/10/2018 12:26 AM, Jim Mattson wrote: On Thu, Feb 8, 2018 at 2:53 PM, KarimAllah Ahmed wrote: ... otherwise we will just be running with the L1 MSR BITMAP! It does not seem that we ever update the MSR_BITMAP when the nested guest is running. The only place where we update the MSR_BITMAP

Re: [RFC 03/12] KVM/VMX: Use the new host mapping API for virtual_apic_page

2018-02-09 Thread KarimAllah Ahmed
On 02/05/2018 11:26 PM, Jim Mattson wrote: On Mon, Feb 5, 2018 at 10:48 AM KarimAllah Ahmed <karah...@amazon.de> wrote: @@ -5264,9 +5264,8 @@ static void vmx_complete_nested_posted_interrupt(struct kvm_vcpu *vcpu) max_irr = find_last_bit((unsigned long *)vmx->nested.pi_

Re: [RFC 03/12] KVM/VMX: Use the new host mapping API for virtual_apic_page

2018-02-09 Thread KarimAllah Ahmed
On 02/05/2018 11:26 PM, Jim Mattson wrote: On Mon, Feb 5, 2018 at 10:48 AM KarimAllah Ahmed wrote: @@ -5264,9 +5264,8 @@ static void vmx_complete_nested_posted_interrupt(struct kvm_vcpu *vcpu) max_irr = find_last_bit((unsigned long *)vmx->nested.pi_desc->pi

[PATCH 1/3] X86/nVMX: Properly set spec_ctrl and pred_cmd before merging MSRs

2018-02-08 Thread KarimAllah Ahmed
: 086e7d4118cc ("KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL") Signed-off-by: KarimAllah Ahmed <karah...@amazon.de> Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: Radim Krčmář <rkrc...@redhat.com> Cc: k...@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- arch/x8

[PATCH 1/3] X86/nVMX: Properly set spec_ctrl and pred_cmd before merging MSRs

2018-02-08 Thread KarimAllah Ahmed
: 086e7d4118cc ("KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL") Signed-off-by: KarimAllah Ahmed Cc: Paolo Bonzini Cc: Radim Krčmář Cc: k...@vger.kernel.org Cc: linux-kernel@vger.kernel.org --- arch/x86/kvm/vmx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --

[PATCH 2/3] KVM/nVMX: Set the CPU_BASED_USE_MSR_BITMAPS if we have a valid L02 MSR bitmap

2018-02-08 Thread KarimAllah Ahmed
ccess to MSR_IA32_SPEC_CTRL") this was probably OK since the decision was always identical. This is no longer the case now since the MSR bitmap might actually change once we decide to not intercept SPEC_CTRL and PRED_CMD. Signed-off-by: KarimAllah Ahmed <karah...@amazon.de> Cc: Paol

[PATCH 2/3] KVM/nVMX: Set the CPU_BASED_USE_MSR_BITMAPS if we have a valid L02 MSR bitmap

2018-02-08 Thread KarimAllah Ahmed
ccess to MSR_IA32_SPEC_CTRL") this was probably OK since the decision was always identical. This is no longer the case now since the MSR bitmap might actually change once we decide to not intercept SPEC_CTRL and PRED_CMD. Signed-off-by: KarimAllah Ahmed Cc: Paolo Bonzini Cc: Radim Krč

[PATCH 3/3] X86/nVMX: Update the MSR_BITMAP field with the L02 MSR BITMAP

2018-02-08 Thread KarimAllah Ahmed
... otherwise we will just be running with the L1 MSR BITMAP! It does not seem that we ever update the MSR_BITMAP when the nested guest is running. The only place where we update the MSR_BITMAP field in VMCS is for the L1 guest! Signed-off-by: KarimAllah Ahmed <karah...@amazon.de> Cc:

[PATCH 3/3] X86/nVMX: Update the MSR_BITMAP field with the L02 MSR BITMAP

2018-02-08 Thread KarimAllah Ahmed
... otherwise we will just be running with the L1 MSR BITMAP! It does not seem that we ever update the MSR_BITMAP when the nested guest is running. The only place where we update the MSR_BITMAP field in VMCS is for the L1 guest! Signed-off-by: KarimAllah Ahmed Cc: Paolo Bonzini Cc: Radim

Re: [RFC 05/12] KVM/VMX: Use the new host mapping API for mapping nested vmptr

2018-02-08 Thread KarimAllah Ahmed
On 02/05/2018 11:15 PM, Jim Mattson wrote: On Mon, Feb 5, 2018 at 10:49 AM KarimAllah Ahmed <karah...@amazon.de> wrote: @@ -7410,19 +7410,17 @@ static int handle_vmon(struct kvm_vcpu *vcpu) return kvm_skip_emulated_instruction(vcpu); } -

Re: [RFC 05/12] KVM/VMX: Use the new host mapping API for mapping nested vmptr

2018-02-08 Thread KarimAllah Ahmed
On 02/05/2018 11:15 PM, Jim Mattson wrote: On Mon, Feb 5, 2018 at 10:49 AM KarimAllah Ahmed wrote: @@ -7410,19 +7410,17 @@ static int handle_vmon(struct kvm_vcpu *vcpu) return kvm_skip_emulated_instruction(vcpu); } - page = kvm_vcpu_gpa_to_page(vcpu

[RFC 04/12] KVM/VMX: Use the new host mapping API for pi_desc_page

2018-02-05 Thread KarimAllah Ahmed
s use-case as well. Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: Radim Krčmář <rkrc...@redhat.com> Cc: k...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: KarimAllah Ahmed <karah...@amazon.de> --- arch/x86/kvm/vmx.c | 40 ++-- 1

[RFC 04/12] KVM/VMX: Use the new host mapping API for pi_desc_page

2018-02-05 Thread KarimAllah Ahmed
s use-case as well. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: k...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: KarimAllah Ahmed --- arch/x86/kvm/vmx.c | 40 ++-- 1 file changed, 18 insertions(+), 22 deletions(-) diff --git a/arch/x86/kvm/vm

[RFC 01/12] KVM: Introduce helper functions to map/unmap guest memory

2018-02-05 Thread KarimAllah Ahmed
uct page"). Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: Radim Krčmář <rkrc...@redhat.com> Cc: k...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: KarimAllah Ahmed <karah...@amazon.de> --- include/linux/kvm_host.h | 18 +++

[RFC 01/12] KVM: Introduce helper functions to map/unmap guest memory

2018-02-05 Thread KarimAllah Ahmed
uct page"). Cc: Paolo Bonzini Cc: Radim Krčmář Cc: k...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: KarimAllah Ahmed --- include/linux/kvm_host.h | 18 ++ virt/kvm/kvm_main.c | 62 2 files changed, 80 inser

[RFC 06/12] KVM/VMX: Use the new host mapping API for handle_vmptrld

2018-02-05 Thread KarimAllah Ahmed
Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: Radim Krčmář <rkrc...@redhat.com> Cc: k...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: KarimAllah Ahmed <karah...@amazon.de> --- arch/x86/kvm/vmx.c | 16 1 file changed, 8 insertions(+), 8 deleti

[RFC 06/12] KVM/VMX: Use the new host mapping API for handle_vmptrld

2018-02-05 Thread KarimAllah Ahmed
Cc: Paolo Bonzini Cc: Radim Krčmář Cc: k...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: KarimAllah Ahmed --- arch/x86/kvm/vmx.c | 16 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 9e45bd1

[RFC 08/12] KVM/VMX: Use the new host mapping API for mapping nested PML

2018-02-05 Thread KarimAllah Ahmed
s use-case as well. Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: Radim Krčmář <rkrc...@redhat.com> Cc: k...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: KarimAllah Ahmed <karah...@amazon.de> --- arch/x86/kvm/vmx.c | 11 +-- 1 file changed, 5 insertions(+)

[RFC 08/12] KVM/VMX: Use the new host mapping API for mapping nested PML

2018-02-05 Thread KarimAllah Ahmed
s use-case as well. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: k...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: KarimAllah Ahmed --- arch/x86/kvm/vmx.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 717717

[RFC 05/12] KVM/VMX: Use the new host mapping API for mapping nested vmptr

2018-02-05 Thread KarimAllah Ahmed
se as well. Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: Radim Krčmář <rkrc...@redhat.com> Cc: k...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: KarimAllah Ahmed <karah...@amazon.de> --- arch/x86/kvm/vmx.c | 14 ++ 1 file changed, 6 insertions(+)

[RFC 12/12] KVM/VMX: Remove kvm_vcpu_gpa_to_page as it is now unused

2018-02-05 Thread KarimAllah Ahmed
Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: Radim Krčmář <rkrc...@redhat.com> Cc: k...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: KarimAllah Ahmed <karah...@amazon.de> --- include/linux/kvm_host.h | 6 -- 1 file changed, 6 deletions(-) diff --g

[RFC 12/12] KVM/VMX: Remove kvm_vcpu_gpa_to_page as it is now unused

2018-02-05 Thread KarimAllah Ahmed
Cc: Paolo Bonzini Cc: Radim Krčmář Cc: k...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: KarimAllah Ahmed --- include/linux/kvm_host.h | 6 -- 1 file changed, 6 deletions(-) diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 45d2854..44db14a 100644

[RFC 05/12] KVM/VMX: Use the new host mapping API for mapping nested vmptr

2018-02-05 Thread KarimAllah Ahmed
se as well. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: k...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: KarimAllah Ahmed --- arch/x86/kvm/vmx.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 40d73f

[RFC 02/12] KVM/VMX: Use the new host mapping API for apic_access_page

2018-02-05 Thread KarimAllah Ahmed
f this use-case as well. Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: Radim Krčmář <rkrc...@redhat.com> Cc: k...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: KarimAllah Ahmed <karah...@amazon.de> --- arch/x86/kvm/vmx.c | 33 + 1

[RFC 02/12] KVM/VMX: Use the new host mapping API for apic_access_page

2018-02-05 Thread KarimAllah Ahmed
f this use-case as well. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: k...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: KarimAllah Ahmed --- arch/x86/kvm/vmx.c | 33 + 1 file changed, 13 insertions(+), 20 deletions(-) diff --git a/arch/x86/kvm/vmx.c

[RFC 00/12] KVM/X86: Introduce a new guest mapping API

2018-02-05 Thread KarimAllah Ahmed
is is an acceptable API. Most of the offending code paths that has been updated are in the nested code base. Mostly because I stumbled upon this code while looking at the nested MSR bitmap handling for the IBRS patches. There are also offending code paths in SVM code, but I will do that once the inte

[RFC 10/12] KVM/VMX: Use the new host mapping API for synic_clear_sint_msg_pending

2018-02-05 Thread KarimAllah Ahmed
Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: Radim Krčmář <rkrc...@redhat.com> Cc: k...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: KarimAllah Ahmed <karah...@amazon.de> --- arch/x86/kvm/hyperv.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deleti

[RFC 00/12] KVM/X86: Introduce a new guest mapping API

2018-02-05 Thread KarimAllah Ahmed
is is an acceptable API. Most of the offending code paths that has been updated are in the nested code base. Mostly because I stumbled upon this code while looking at the nested MSR bitmap handling for the IBRS patches. There are also offending code paths in SVM code, but I will do that once the inte

[RFC 10/12] KVM/VMX: Use the new host mapping API for synic_clear_sint_msg_pending

2018-02-05 Thread KarimAllah Ahmed
Cc: Paolo Bonzini Cc: Radim Krčmář Cc: k...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: KarimAllah Ahmed --- arch/x86/kvm/hyperv.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c index dc97f25

[RFC 03/12] KVM/VMX: Use the new host mapping API for virtual_apic_page

2018-02-05 Thread KarimAllah Ahmed
f this use-case as well. Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: Radim Krčmář <rkrc...@redhat.com> Cc: k...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: KarimAllah Ahmed <karah...@amazon.de> --- arch/x86/kvm/vmx.c | 34 -- 1

[RFC 03/12] KVM/VMX: Use the new host mapping API for virtual_apic_page

2018-02-05 Thread KarimAllah Ahmed
f this use-case as well. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: k...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: KarimAllah Ahmed --- arch/x86/kvm/vmx.c | 34 -- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/arch/x86/kvm/vm

[RFC 09/12] KVM/VMX: Use the new host mapping API for cmpxchg_emulated

2018-02-05 Thread KarimAllah Ahmed
Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: Radim Krčmář <rkrc...@redhat.com> Cc: k...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: KarimAllah Ahmed <karah...@amazon.de> --- arch/x86/kvm/x86.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-)

[RFC 09/12] KVM/VMX: Use the new host mapping API for cmpxchg_emulated

2018-02-05 Thread KarimAllah Ahmed
Cc: Paolo Bonzini Cc: Radim Krčmář Cc: k...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: KarimAllah Ahmed --- arch/x86/kvm/x86.c | 12 +--- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index ac38143..db0fd24

[RFC 11/12] KVM/VMX: Use the new host mapping API for synic_deliver_msg

2018-02-05 Thread KarimAllah Ahmed
Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: Radim Krčmář <rkrc...@redhat.com> Cc: k...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: KarimAllah Ahmed <karah...@amazon.de> --- arch/x86/kvm/hyperv.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deleti

[RFC 11/12] KVM/VMX: Use the new host mapping API for synic_deliver_msg

2018-02-05 Thread KarimAllah Ahmed
Cc: Paolo Bonzini Cc: Radim Krčmář Cc: k...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: KarimAllah Ahmed --- arch/x86/kvm/hyperv.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/arch/x86/kvm/hyperv.c b/arch/x86/kvm/hyperv.c index 408428a

[RFC 07/12] KVM/VMX: Use the new host mapping API for mapping L12 MSR bitmap

2018-02-05 Thread KarimAllah Ahmed
f this use-case as well. Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: Radim Krčmář <rkrc...@redhat.com> Cc: k...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: KarimAllah Ahmed <karah...@amazon.de> --- arch/x86/kvm/vmx.c | 11 +-- 1 file changed, 5 inserti

[RFC 07/12] KVM/VMX: Use the new host mapping API for mapping L12 MSR bitmap

2018-02-05 Thread KarimAllah Ahmed
f this use-case as well. Cc: Paolo Bonzini Cc: Radim Krčmář Cc: k...@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: KarimAllah Ahmed --- arch/x86/kvm/vmx.c | 11 +-- 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c ind

[tip:x86/pti] KVM/SVM: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-03 Thread tip-bot for KarimAllah Ahmed
Commit-ID: b2ac58f90540e39324e7a29a7ad471407ae0bf48 Gitweb: https://git.kernel.org/tip/b2ac58f90540e39324e7a29a7ad471407ae0bf48 Author: KarimAllah Ahmed <karah...@amazon.de> AuthorDate: Sat, 3 Feb 2018 15:56:23 +0100 Committer: Thomas Gleixner <t...@linutronix.de> CommitDate

[tip:x86/pti] KVM/SVM: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-03 Thread tip-bot for KarimAllah Ahmed
Commit-ID: b2ac58f90540e39324e7a29a7ad471407ae0bf48 Gitweb: https://git.kernel.org/tip/b2ac58f90540e39324e7a29a7ad471407ae0bf48 Author: KarimAllah Ahmed AuthorDate: Sat, 3 Feb 2018 15:56:23 +0100 Committer: Thomas Gleixner CommitDate: Sat, 3 Feb 2018 23:06:52 +0100 KVM/SVM: Allow

[tip:x86/pti] KVM/VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-03 Thread tip-bot for KarimAllah Ahmed
Commit-ID: d28b387fb74da95d69d2615732f50cceb38e9a4d Gitweb: https://git.kernel.org/tip/d28b387fb74da95d69d2615732f50cceb38e9a4d Author: KarimAllah Ahmed <karah...@amazon.de> AuthorDate: Thu, 1 Feb 2018 22:59:45 +0100 Committer: Thomas Gleixner <t...@linutronix.de> CommitDate

[tip:x86/pti] KVM/VMX: Emulate MSR_IA32_ARCH_CAPABILITIES

2018-02-03 Thread tip-bot for KarimAllah Ahmed
Commit-ID: 28c1c9fabf48d6ad596273a11c46e0d0da3e14cd Gitweb: https://git.kernel.org/tip/28c1c9fabf48d6ad596273a11c46e0d0da3e14cd Author: KarimAllah Ahmed <karah...@amazon.de> AuthorDate: Thu, 1 Feb 2018 22:59:44 +0100 Committer: Thomas Gleixner <t...@linutronix.de> CommitDate

[tip:x86/pti] KVM/VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-03 Thread tip-bot for KarimAllah Ahmed
Commit-ID: d28b387fb74da95d69d2615732f50cceb38e9a4d Gitweb: https://git.kernel.org/tip/d28b387fb74da95d69d2615732f50cceb38e9a4d Author: KarimAllah Ahmed AuthorDate: Thu, 1 Feb 2018 22:59:45 +0100 Committer: Thomas Gleixner CommitDate: Sat, 3 Feb 2018 23:06:52 +0100 KVM/VMX: Allow

[tip:x86/pti] KVM/VMX: Emulate MSR_IA32_ARCH_CAPABILITIES

2018-02-03 Thread tip-bot for KarimAllah Ahmed
Commit-ID: 28c1c9fabf48d6ad596273a11c46e0d0da3e14cd Gitweb: https://git.kernel.org/tip/28c1c9fabf48d6ad596273a11c46e0d0da3e14cd Author: KarimAllah Ahmed AuthorDate: Thu, 1 Feb 2018 22:59:44 +0100 Committer: Thomas Gleixner CommitDate: Sat, 3 Feb 2018 23:06:52 +0100 KVM/VMX: Emulate

[tip:x86/pti] KVM/x86: Update the reverse_cpuid list to include CPUID_7_EDX

2018-02-03 Thread tip-bot for KarimAllah Ahmed
Commit-ID: b7b27aa011a1df42728d1768fc181d9ce69e6911 Gitweb: https://git.kernel.org/tip/b7b27aa011a1df42728d1768fc181d9ce69e6911 Author: KarimAllah Ahmed <karah...@amazon.de> AuthorDate: Thu, 1 Feb 2018 22:59:42 +0100 Committer: Thomas Gleixner <t...@linutronix.de> CommitDate

[tip:x86/pti] KVM/x86: Update the reverse_cpuid list to include CPUID_7_EDX

2018-02-03 Thread tip-bot for KarimAllah Ahmed
Commit-ID: b7b27aa011a1df42728d1768fc181d9ce69e6911 Gitweb: https://git.kernel.org/tip/b7b27aa011a1df42728d1768fc181d9ce69e6911 Author: KarimAllah Ahmed AuthorDate: Thu, 1 Feb 2018 22:59:42 +0100 Committer: Thomas Gleixner CommitDate: Sat, 3 Feb 2018 23:06:51 +0100 KVM/x86: Update

[PATCH v7] KVM: SVM: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-03 Thread KarimAllah Ahmed
ion.org> Cc: Andy Lutomirski <l...@kernel.org> Cc: Ashok Raj <ashok@intel.com> Signed-off-by: KarimAllah Ahmed <karah...@amazon.de> Signed-off-by: David Woodhouse <d...@amazon.co.uk> --- v6: - ditch save_spec_ctrl_on_ex

[PATCH v7] KVM: SVM: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-03 Thread KarimAllah Ahmed
Hansen Cc: Andi Kleen Cc: Andrea Arcangeli Cc: Linus Torvalds Cc: Tim Chen Cc: Thomas Gleixner Cc: Dan Williams Cc: Jun Nakajima Cc: Paolo Bonzini Cc: David Woodhouse Cc: Greg KH Cc: Andy Lutomirski Cc: Ashok Raj Signed-off-by: KarimAllah Ahmed Signed-off-by: David Woodhouse --- v6

[tip:x86/pti] x86/spectre: Simplify spectre_v2 command line parsing

2018-02-02 Thread tip-bot for KarimAllah Ahmed
Commit-ID: 9005c6834c0ffdfe46afa76656bd9276cca864f6 Gitweb: https://git.kernel.org/tip/9005c6834c0ffdfe46afa76656bd9276cca864f6 Author: KarimAllah Ahmed <karah...@amazon.de> AuthorDate: Thu, 1 Feb 2018 11:27:21 + Committer: Thomas Gleixner <t...@linutronix.de> CommitDate

[tip:x86/pti] x86/spectre: Simplify spectre_v2 command line parsing

2018-02-02 Thread tip-bot for KarimAllah Ahmed
Commit-ID: 9005c6834c0ffdfe46afa76656bd9276cca864f6 Gitweb: https://git.kernel.org/tip/9005c6834c0ffdfe46afa76656bd9276cca864f6 Author: KarimAllah Ahmed AuthorDate: Thu, 1 Feb 2018 11:27:21 + Committer: Thomas Gleixner CommitDate: Fri, 2 Feb 2018 12:28:27 +0100 x86/spectre

[PATCH v6 1/5] KVM: x86: Update the reverse_cpuid list to include CPUID_7_EDX

2018-02-01 Thread KarimAllah Ahmed
er.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> Reviewed-by: Konrad Rzeszutek Wilk <konrad.w...@oracle.com> Signed-off-by: KarimAllah Ahmed <karah...@amazon.de> Signed-off-by: David Woodhouse <d...@amazon.co.uk> --- arch/x86/k

[PATCH v6 1/5] KVM: x86: Update the reverse_cpuid list to include CPUID_7_EDX

2018-02-01 Thread KarimAllah Ahmed
-by: KarimAllah Ahmed Signed-off-by: David Woodhouse --- arch/x86/kvm/cpuid.c | 8 +++- arch/x86/kvm/cpuid.h | 1 + 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index 0099e10..c0eb337 100644 --- a/arch/x86/kvm/cpuid.c +++ b/arch/x86/kvm

[PATCH v6 5/5] KVM: SVM: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-01 Thread KarimAllah Ahmed
ion.org> Cc: Andy Lutomirski <l...@kernel.org> Cc: Ashok Raj <ashok@intel.com> Signed-off-by: KarimAllah Ahmed <karah...@amazon.de> Signed-off-by: David Woodhouse <d...@amazon.co.uk> --- v5: - Add SPEC_CTRL to direct_access_msrs. --- arch/x86/kvm/svm.c | 59 +++

[PATCH v6 5/5] KVM: SVM: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-01 Thread KarimAllah Ahmed
Hansen Cc: Andi Kleen Cc: Andrea Arcangeli Cc: Linus Torvalds Cc: Tim Chen Cc: Thomas Gleixner Cc: Dan Williams Cc: Jun Nakajima Cc: Paolo Bonzini Cc: David Woodhouse Cc: Greg KH Cc: Andy Lutomirski Cc: Ashok Raj Signed-off-by: KarimAllah Ahmed Signed-off-by: David Woodhouse --- v5

[PATCH v6 0/5] KVM: Expose speculation control feature to guests

2018-02-01 Thread KarimAllah Ahmed
). - Handle nested guests properly. - expose F(IBRS) in kvm_cpuid_8000_0008_ebx_x86_features Ashok Raj (1): KVM: x86: Add IBPB support KarimAllah Ahmed (4): KVM: x86: Update the reverse_cpuid list to include CPUID_7_EDX KVM: VMX: Emulate MSR_IA32_ARCH_CAPABILITIES KVM: VMX: Allow direct access

[PATCH v6 0/5] KVM: Expose speculation control feature to guests

2018-02-01 Thread KarimAllah Ahmed
). - Handle nested guests properly. - expose F(IBRS) in kvm_cpuid_8000_0008_ebx_x86_features Ashok Raj (1): KVM: x86: Add IBPB support KarimAllah Ahmed (4): KVM: x86: Update the reverse_cpuid list to include CPUID_7_EDX KVM: VMX: Emulate MSR_IA32_ARCH_CAPABILITIES KVM: VMX: Allow direct access

[PATCH v6 2/5] KVM: x86: Add IBPB support

2018-02-01 Thread KarimAllah Ahmed
om> Signed-off-by: Ashok Raj <ashok@intel.com> Signed-off-by: Peter Zijlstra (Intel) <pet...@infradead.org> Link: http://lkml.kernel.org/r/1515720739-43819-6-git-send-email-ashok@intel.com Signed-off-by: David Woodhouse <d...@amazon.co.uk> Signed-off-by: Karim

[PATCH v6 2/5] KVM: x86: Add IBPB support

2018-02-01 Thread KarimAllah Ahmed
-6-git-send-email-ashok@intel.com Signed-off-by: David Woodhouse Signed-off-by: KarimAllah Ahmed --- v6: - introduce msr_write_intercepted_l01 v5: - Use MSR_TYPE_W instead of MSR_TYPE_R for the MSR. - Always merge the bitmaps unconditionally. - Add PRED_CMD to direct_access_msrs. - Also

[PATCH v6 3/5] KVM: VMX: Emulate MSR_IA32_ARCH_CAPABILITIES

2018-02-01 Thread KarimAllah Ahmed
: Paolo Bonzini <pbonz...@redhat.com> Cc: Ashok Raj <ashok@intel.com> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: KarimAllah Ahmed <karah...@amazon.de> Signed-off-by: David Woodhouse <d...@amazon.co.uk> --- arch/x86/kvm/cpuid.c | 2 +- arch/x86/kvm/vm

[PATCH v6 3/5] KVM: VMX: Emulate MSR_IA32_ARCH_CAPABILITIES

2018-02-01 Thread KarimAllah Ahmed
-by: KarimAllah Ahmed Signed-off-by: David Woodhouse --- arch/x86/kvm/cpuid.c | 2 +- arch/x86/kvm/vmx.c | 15 +++ arch/x86/kvm/x86.c | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index 033004d..1909635 100644

[PATCH v6 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-01 Thread KarimAllah Ahmed
gt; Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: David Woodhouse <d...@amazon.co.uk> Cc: Greg KH <gre...@linuxfoundation.org> Cc: Andy Lutomirski <l...@kernel.org> Cc: Ashok Raj <ashok@intel.com> Signed-off-by: KarimAllah Ahmed <karah...@amazon.de> Sign

[PATCH v6 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-01 Thread KarimAllah Ahmed
Woodhouse Cc: Greg KH Cc: Andy Lutomirski Cc: Ashok Raj Signed-off-by: KarimAllah Ahmed Signed-off-by: David Woodhouse --- v6: - got rid of save_spec_ctrl_on_exit - introduce msr_write_intercepted v5: - Also check for X86_FEATURE_SPEC_CTRL for the msr reads/writes v4: - Add IBRS

Re: [PATCH v5 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-01 Thread KarimAllah Ahmed
On 02/01/2018 06:37 PM, KarimAllah Ahmed wrote: On 02/01/2018 02:25 PM, David Woodhouse wrote: On Wed, 2018-01-31 at 23:26 -0500, Konrad Rzeszutek Wilk wrote: diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 6a9f4ec..bfc80ff 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm

Re: [PATCH v5 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-01 Thread KarimAllah Ahmed
On 02/01/2018 06:37 PM, KarimAllah Ahmed wrote: On 02/01/2018 02:25 PM, David Woodhouse wrote: On Wed, 2018-01-31 at 23:26 -0500, Konrad Rzeszutek Wilk wrote: diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 6a9f4ec..bfc80ff 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm

Re: [PATCH v5 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-01 Thread KarimAllah Ahmed
On 02/01/2018 02:25 PM, David Woodhouse wrote: On Wed, 2018-01-31 at 23:26 -0500, Konrad Rzeszutek Wilk wrote: diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 6a9f4ec..bfc80ff 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -594,6 +594,14 @@ struct vcpu_vmx {  

Re: [PATCH v5 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-01 Thread KarimAllah Ahmed
On 02/01/2018 02:25 PM, David Woodhouse wrote: On Wed, 2018-01-31 at 23:26 -0500, Konrad Rzeszutek Wilk wrote: diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 6a9f4ec..bfc80ff 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -594,6 +594,14 @@ struct vcpu_vmx {  

Re: [PATCH v5 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-01 Thread KarimAllah Ahmed
On 02/01/2018 03:19 PM, Konrad Rzeszutek Wilk wrote: .snip.. +/* Is SPEC_CTRL intercepted for the currently running vCPU? */ +static bool spec_ctrl_intercepted(struct kvm_vcpu *vcpu) +{ + unsigned long *msr_bitmap; + int f = sizeof(unsigned long); + + if

Re: [PATCH v5 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-02-01 Thread KarimAllah Ahmed
On 02/01/2018 03:19 PM, Konrad Rzeszutek Wilk wrote: .snip.. +/* Is SPEC_CTRL intercepted for the currently running vCPU? */ +static bool spec_ctrl_intercepted(struct kvm_vcpu *vcpu) +{ + unsigned long *msr_bitmap; + int f = sizeof(unsigned long); + + if

Re: [PATCH v5 2/5] KVM: x86: Add IBPB support

2018-01-31 Thread KarimAllah Ahmed
720739-43819-6-git-send-email-ashok@intel.com Signed-off-by: David Woodhouse <d...@amazon.co.uk> Signed-off-by: KarimAllah Ahmed <karah...@amazon.de> --- v6: - introduce pred_cmd_used v5: - Use MSR_TYPE_W instead of MSR_TYPE_R for the MSR. - Always merge the bitmaps unconditionally.

Re: [PATCH v5 2/5] KVM: x86: Add IBPB support

2018-01-31 Thread KarimAllah Ahmed
igned-off-by: Ashok Raj Signed-off-by: Peter Zijlstra (Intel) Link: http://lkml.kernel.org/r/1515720739-43819-6-git-send-email-ashok@intel.com Signed-off-by: David Woodhouse Signed-off-by: KarimAllah Ahmed --- v6: - introduce pred_cmd_used v5: - Use MSR_TYPE_W instead of MSR_TYPE_R for the MSR.

Re: [PATCH v5 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-01-31 Thread KarimAllah Ahmed
On 01/31/2018 11:52 PM, KarimAllah Ahmed wrote: On 01/31/2018 09:18 PM, Jim Mattson wrote: On Wed, Jan 31, 2018 at 12:01 PM, KarimAllah Ahmed <karah...@amazon.com> wrote: but save_spec_ctrl_on_exit is also set for L2 write. So once L2 writes to it, this condition will b

Re: [PATCH v5 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-01-31 Thread KarimAllah Ahmed
On 01/31/2018 11:52 PM, KarimAllah Ahmed wrote: On 01/31/2018 09:18 PM, Jim Mattson wrote: On Wed, Jan 31, 2018 at 12:01 PM, KarimAllah Ahmed wrote: but save_spec_ctrl_on_exit is also set for L2 write. So once L2 writes to it, this condition will be true and then the bitmap will be updated

Re: [PATCH v5 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-01-31 Thread KarimAllah Ahmed
On 01/31/2018 09:18 PM, Jim Mattson wrote: On Wed, Jan 31, 2018 at 12:01 PM, KarimAllah Ahmed <karah...@amazon.com> wrote: but save_spec_ctrl_on_exit is also set for L2 write. So once L2 writes to it, this condition will be true and then the bitmap will be updated. So if L1 or any L2

Re: [PATCH v5 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-01-31 Thread KarimAllah Ahmed
On 01/31/2018 09:18 PM, Jim Mattson wrote: On Wed, Jan 31, 2018 at 12:01 PM, KarimAllah Ahmed wrote: but save_spec_ctrl_on_exit is also set for L2 write. So once L2 writes to it, this condition will be true and then the bitmap will be updated. So if L1 or any L2 writes to the MSR

Re: [PATCH v5 2/5] KVM: x86: Add IBPB support

2018-01-31 Thread KarimAllah Ahmed
On 01/31/2018 09:28 PM, Konrad Rzeszutek Wilk wrote: diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index d46a61b..2e4e8af 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -2285,6 +2285,7 @@ static void vmx_vcpu_load(struct kvm_vcpu *vcpu, int cpu) if

Re: [PATCH v5 2/5] KVM: x86: Add IBPB support

2018-01-31 Thread KarimAllah Ahmed
On 01/31/2018 09:28 PM, Konrad Rzeszutek Wilk wrote: diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index d46a61b..2e4e8af 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c @@ -2285,6 +2285,7 @@ static void vmx_vcpu_load(struct kvm_vcpu *vcpu, int cpu) if

Re: [PATCH v5 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-01-31 Thread KarimAllah Ahmed
On 01/31/2018 08:53 PM, Jim Mattson wrote: On Wed, Jan 31, 2018 at 11:37 AM, KarimAllah Ahmed <karah...@amazon.de> wrote: + + if (to_vmx(vcpu)->save_spec_ctrl_on_exit) { + nested_vmx_disable_intercept_for_msr( + msr_bitmap_l1, msr_

Re: [PATCH v5 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-01-31 Thread KarimAllah Ahmed
On 01/31/2018 08:53 PM, Jim Mattson wrote: On Wed, Jan 31, 2018 at 11:37 AM, KarimAllah Ahmed wrote: + + if (to_vmx(vcpu)->save_spec_ctrl_on_exit) { + nested_vmx_disable_intercept_for_msr( + msr_bitmap_l1, msr_bitmap

[PATCH v5 5/5] KVM: SVM: Allow direct access to MSR_IA32_SPEC_CTRL

2018-01-31 Thread KarimAllah Ahmed
ion.org> Cc: Andy Lutomirski <l...@kernel.org> Cc: Ashok Raj <ashok@intel.com> Signed-off-by: KarimAllah Ahmed <karah...@amazon.de> Signed-off-by: David Woodhouse <d...@amazon.co.uk> --- v5: - Add SPEC_CTRL to direct_access_msrs. --- arch/x86/kvm/svm.c | 59 +++

[PATCH v5 5/5] KVM: SVM: Allow direct access to MSR_IA32_SPEC_CTRL

2018-01-31 Thread KarimAllah Ahmed
Hansen Cc: Andi Kleen Cc: Andrea Arcangeli Cc: Linus Torvalds Cc: Tim Chen Cc: Thomas Gleixner Cc: Dan Williams Cc: Jun Nakajima Cc: Paolo Bonzini Cc: David Woodhouse Cc: Greg KH Cc: Andy Lutomirski Cc: Ashok Raj Signed-off-by: KarimAllah Ahmed Signed-off-by: David Woodhouse --- v5

[PATCH v5 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-01-31 Thread KarimAllah Ahmed
om> Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: David Woodhouse <d...@amazon.co.uk> Cc: Greg KH <gre...@linuxfoundation.org> Cc: Andy Lutomirski <l...@kernel.org> Cc: Ashok Raj <ashok@intel.com> Signed-off-by: KarimAllah Ahmed <karah...@amazon.de> Signed-

[PATCH v5 4/5] KVM: VMX: Allow direct access to MSR_IA32_SPEC_CTRL

2018-01-31 Thread KarimAllah Ahmed
Woodhouse Cc: Greg KH Cc: Andy Lutomirski Cc: Ashok Raj Signed-off-by: KarimAllah Ahmed Signed-off-by: David Woodhouse --- v5: - Also check for X86_FEATURE_SPEC_CTRL for the msr reads/writes v4: - Add IBRS to kvm_cpuid_8000_0008_ebx_x86_features - Handling nested guests v3: - Save/restore

[PATCH v5 3/5] KVM: VMX: Emulate MSR_IA32_ARCH_CAPABILITIES

2018-01-31 Thread KarimAllah Ahmed
ion.org> Cc: Paolo Bonzini <pbonz...@redhat.com> Cc: Ashok Raj <ashok@intel.com> Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: KarimAllah Ahmed <karah...@amazon.de> Signed-off-by: David Woodhouse <d...@amazon.co.uk> --- arch/x86/kvm/cpuid.c | 2 +-

[PATCH v5 3/5] KVM: VMX: Emulate MSR_IA32_ARCH_CAPABILITIES

2018-01-31 Thread KarimAllah Ahmed
Signed-off-by: KarimAllah Ahmed Signed-off-by: David Woodhouse --- arch/x86/kvm/cpuid.c | 2 +- arch/x86/kvm/vmx.c | 15 +++ arch/x86/kvm/x86.c | 1 + 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c index 033004d..1909635

[PATCH v5 2/5] KVM: x86: Add IBPB support

2018-01-31 Thread KarimAllah Ahmed
om> Signed-off-by: Ashok Raj <ashok@intel.com> Signed-off-by: Peter Zijlstra (Intel) <pet...@infradead.org> Link: http://lkml.kernel.org/r/1515720739-43819-6-git-send-email-ashok@intel.com Signed-off-by: David Woodhouse <d...@amazon.co.uk> Signed-off-by: KarimAllah Ah

[PATCH v5 2/5] KVM: x86: Add IBPB support

2018-01-31 Thread KarimAllah Ahmed
-6-git-send-email-ashok@intel.com Signed-off-by: David Woodhouse Signed-off-by: KarimAllah Ahmed v5: - Use MSR_TYPE_W instead of MSR_TYPE_R for the MSR. - Always merge the bitmaps unconditionally. - Add PRED_CMD to direct_access_msrs. - Also check for X86_FEATURE_SPEC_CTRL for the msr reads/

[PATCH v5 1/5] KVM: x86: Update the reverse_cpuid list to include CPUID_7_EDX

2018-01-31 Thread KarimAllah Ahmed
er.kernel.org Cc: linux-kernel@vger.kernel.org Reviewed-by: Paolo Bonzini <pbonz...@redhat.com> Signed-off-by: KarimAllah Ahmed <karah...@amazon.de> Signed-off-by: David Woodhouse <d...@amazon.co.uk> --- arch/x86/kvm/cpuid.c | 8 +++- arch/x86/kvm/cpuid.h | 1 + 2 files chan

[PATCH v5 0/5] KVM: Expose speculation control feature to guests

2018-01-31 Thread KarimAllah Ahmed
for SVM (5/5). - Handle nested guests properly. - expose F(IBRS) in kvm_cpuid_8000_0008_ebx_x86_features Ashok Raj (1): KVM: x86: Add IBPB support KarimAllah Ahmed (4): KVM: x86: Update the reverse_cpuid list to include CPUID_7_EDX KVM: VMX: Emulate MSR_IA32_ARCH_CAPABILITIES KVM: VMX

<    1   2   3   4   5   >