Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1678297 > unrolled thread

[PATCH 0/2] Expose VMFUNC to the nested hypervisor

Started byBandan Das <bsd@redhat.com>
First post2017-06-30 01:40 +0200
Last post2017-06-30 21:10 +0200
Articles 4 — 3 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 0/2] Expose VMFUNC to the nested hypervisor Bandan Das <bsd@redhat.com> - 2017-06-30 01:40 +0200
    Re: [PATCH 0/2] Expose VMFUNC to the nested hypervisor Jim Mattson <jmattson@google.com> - 2017-06-30 19:10 +0200
      Re: [PATCH 0/2] Expose VMFUNC to the nested hypervisor Bandan Das <bsd@redhat.com> - 2017-06-30 20:00 +0200
      Re: [PATCH 0/2] Expose VMFUNC to the nested hypervisor Paolo Bonzini <pbonzini@redhat.com> - 2017-06-30 21:10 +0200

#1678297 — [PATCH 0/2] Expose VMFUNC to the nested hypervisor

FromBandan Das <bsd@redhat.com>
Date2017-06-30 01:40 +0200
Subject[PATCH 0/2] Expose VMFUNC to the nested hypervisor
Message-ID<tXRcu-5ZS-5@gated-at.bofh.it>
These patches expose eptp switching/vmfunc to the nested hypervisor. Testing with
kvm-unit-tests seems to work ok.

If the guest hypervisor enables vmfunc/eptp switching, a "shadow" eptp list
address page is written to the VMCS. Initially, it would be unpopulated which
would result in a vmexit with exit reason 59. This hooks to handle_vmfunc()
to rewrite vmcs12->ept_pointer to reload the mmu and get a new root hpa.
This new shadow ept pointer is written to the shadow eptp list in the given
index. A next vmfunc call to switch to the given index would succeed without
an exit.

Bandan Das (2):
  KVM: nVMX: Implement EPTP switching for the L1 hypervisor
  KVM: nVMX: Advertise VMFUNC to L1 hypervisor

 arch/x86/include/asm/vmx.h |   9 ++++
 arch/x86/kvm/vmx.c         | 122 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 131 insertions(+)

-- 
2.9.4

[toc] | [next] | [standalone]


#1679003

FromJim Mattson <jmattson@google.com>
Date2017-06-30 19:10 +0200
Message-ID<tY7AC-8dL-23@gated-at.bofh.it>
In reply to#1678297
Isn't McAfee DeepSAFE defunct? Are there any other consumers of EPTP switching?

On Thu, Jun 29, 2017 at 4:29 PM, Bandan Das <bsd@redhat.com> wrote:
> These patches expose eptp switching/vmfunc to the nested hypervisor. Testing with
> kvm-unit-tests seems to work ok.
>
> If the guest hypervisor enables vmfunc/eptp switching, a "shadow" eptp list
> address page is written to the VMCS. Initially, it would be unpopulated which
> would result in a vmexit with exit reason 59. This hooks to handle_vmfunc()
> to rewrite vmcs12->ept_pointer to reload the mmu and get a new root hpa.
> This new shadow ept pointer is written to the shadow eptp list in the given
> index. A next vmfunc call to switch to the given index would succeed without
> an exit.
>
> Bandan Das (2):
>   KVM: nVMX: Implement EPTP switching for the L1 hypervisor
>   KVM: nVMX: Advertise VMFUNC to L1 hypervisor
>
>  arch/x86/include/asm/vmx.h |   9 ++++
>  arch/x86/kvm/vmx.c         | 122 +++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 131 insertions(+)
>
> --
> 2.9.4
>

[toc] | [prev] | [next] | [standalone]


#1679043

FromBandan Das <bsd@redhat.com>
Date2017-06-30 20:00 +0200
Message-ID<tY8n0-8uh-25@gated-at.bofh.it>
In reply to#1679003
Jim Mattson <jmattson@google.com> writes:

> Isn't McAfee DeepSAFE defunct? Are there any other consumers of EPTP switching?

I don't know of any real users but I think we should be providing this functionality to
the L1 hypervisor :)

IIRC, Xen lets you use EPTP switching as part of VM introspection ?

Bandan


> On Thu, Jun 29, 2017 at 4:29 PM, Bandan Das <bsd@redhat.com> wrote:
>> These patches expose eptp switching/vmfunc to the nested hypervisor. Testing with
>> kvm-unit-tests seems to work ok.
>>
>> If the guest hypervisor enables vmfunc/eptp switching, a "shadow" eptp list
>> address page is written to the VMCS. Initially, it would be unpopulated which
>> would result in a vmexit with exit reason 59. This hooks to handle_vmfunc()
>> to rewrite vmcs12->ept_pointer to reload the mmu and get a new root hpa.
>> This new shadow ept pointer is written to the shadow eptp list in the given
>> index. A next vmfunc call to switch to the given index would succeed without
>> an exit.
>>
>> Bandan Das (2):
>>   KVM: nVMX: Implement EPTP switching for the L1 hypervisor
>>   KVM: nVMX: Advertise VMFUNC to L1 hypervisor
>>
>>  arch/x86/include/asm/vmx.h |   9 ++++
>>  arch/x86/kvm/vmx.c         | 122 +++++++++++++++++++++++++++++++++++++++++++++
>>  2 files changed, 131 insertions(+)
>>
>> --
>> 2.9.4
>>

[toc] | [prev] | [next] | [standalone]


#1679069

FromPaolo Bonzini <pbonzini@redhat.com>
Date2017-06-30 21:10 +0200
Message-ID<tY9sK-WD-11@gated-at.bofh.it>
In reply to#1679003

----- Original Message -----
> From: "Jim Mattson" <jmattson@google.com>
> To: "Bandan Das" <bsd@redhat.com>
> Cc: "kvm list" <kvm@vger.kernel.org>, "Paolo Bonzini" <pbonzini@redhat.com>, "LKML" <linux-kernel@vger.kernel.org>
> Sent: Friday, June 30, 2017 7:06:43 PM
> Subject: Re: [PATCH 0/2] Expose VMFUNC to the nested hypervisor
> 
> Isn't McAfee DeepSAFE defunct? Are there any other consumers of EPTP
> switching?

Xen can use it optionally, and #VE as well.

Paolo

> On Thu, Jun 29, 2017 at 4:29 PM, Bandan Das <bsd@redhat.com> wrote:
> > These patches expose eptp switching/vmfunc to the nested hypervisor.
> > Testing with
> > kvm-unit-tests seems to work ok.
> >
> > If the guest hypervisor enables vmfunc/eptp switching, a "shadow" eptp list
> > address page is written to the VMCS. Initially, it would be unpopulated
> > which
> > would result in a vmexit with exit reason 59. This hooks to handle_vmfunc()
> > to rewrite vmcs12->ept_pointer to reload the mmu and get a new root hpa.
> > This new shadow ept pointer is written to the shadow eptp list in the given
> > index. A next vmfunc call to switch to the given index would succeed
> > without
> > an exit.
> >
> > Bandan Das (2):
> >   KVM: nVMX: Implement EPTP switching for the L1 hypervisor
> >   KVM: nVMX: Advertise VMFUNC to L1 hypervisor
> >
> >  arch/x86/include/asm/vmx.h |   9 ++++
> >  arch/x86/kvm/vmx.c         | 122
> >  +++++++++++++++++++++++++++++++++++++++++++++
> >  2 files changed, 131 insertions(+)
> >
> > --
> > 2.9.4
> >
> 
 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web