Re: [PATCH v2 1/9] KVM: x86: Add AMD SEV specific Hypercall3

2021-01-08 Thread Sean Christopherson
On Thu, Jan 07, 2021, Steve Rutherford wrote: > Supporting merging of consecutive entries (or not) is less important > to get right since it doesn't change any of the APIs. If someone runs > into performance issues, they can loop back and fix this then. I'm > slightly concerned with the behavior fo

Re: [PATCH v2 1/9] KVM: x86: Add AMD SEV specific Hypercall3

2021-01-07 Thread Steve Rutherford
Supporting merging of consecutive entries (or not) is less important to get right since it doesn't change any of the APIs. If someone runs into performance issues, they can loop back and fix this then. I'm slightly concerned with the behavior for overlapping regions. I also have slight concerns wit

Re: [PATCH v2 1/9] KVM: x86: Add AMD SEV specific Hypercall3

2021-01-07 Thread Steve Rutherford
On Thu, Jan 7, 2021 at 4:48 PM Ashish Kalra wrote: > > > On Thu, Jan 07, 2021 at 01:34:14AM +, Ashish Kalra wrote: > > > Hello Steve, > > > > > > My thoughts here ... > > > > > > On Wed, Jan 06, 2021 at 05:01:33PM -0800, Steve Rutherford wrote: > > > > Avoiding an rbtree for such a small (but

Re: [PATCH v2 1/9] KVM: x86: Add AMD SEV specific Hypercall3

2021-01-07 Thread Ashish Kalra
> On Thu, Jan 07, 2021 at 01:34:14AM +, Ashish Kalra wrote: > > Hello Steve, > > > > My thoughts here ... > > > > On Wed, Jan 06, 2021 at 05:01:33PM -0800, Steve Rutherford wrote: > > > Avoiding an rbtree for such a small (but unstable) list seems correct. > > > > > > > I agree. > > > > >

Re: [PATCH v2 1/9] KVM: x86: Add AMD SEV specific Hypercall3

2021-01-07 Thread Sean Christopherson
On Thu, Jan 07, 2021, Ashish Kalra wrote: > On Thu, Jan 07, 2021 at 09:26:25AM -0800, Sean Christopherson wrote: > > On Thu, Jan 07, 2021, Ashish Kalra wrote: > > > Hello Steve, > > > > > > On Wed, Jan 06, 2021 at 05:01:33PM -0800, Steve Rutherford wrote: > > > > Avoiding an rbtree for such a smal

Re: [PATCH v2 1/9] KVM: x86: Add AMD SEV specific Hypercall3

2021-01-07 Thread Ashish Kalra
On Thu, Jan 07, 2021 at 09:26:25AM -0800, Sean Christopherson wrote: > On Thu, Jan 07, 2021, Ashish Kalra wrote: > > Hello Steve, > > > > On Wed, Jan 06, 2021 at 05:01:33PM -0800, Steve Rutherford wrote: > > > Avoiding an rbtree for such a small (but unstable) list seems correct. > > > > > > For

Re: [PATCH v2 1/9] KVM: x86: Add AMD SEV specific Hypercall3

2021-01-07 Thread Sean Christopherson
On Thu, Jan 07, 2021, Ashish Kalra wrote: > Hello Steve, > > On Wed, Jan 06, 2021 at 05:01:33PM -0800, Steve Rutherford wrote: > > Avoiding an rbtree for such a small (but unstable) list seems correct. > > > > For the unencrypted region list strategy, the only questions that I > > have are fairly

Re: [PATCH v2 1/9] KVM: x86: Add AMD SEV specific Hypercall3

2021-01-07 Thread Ashish Kalra
Hello Steve, On Wed, Jan 06, 2021 at 05:01:33PM -0800, Steve Rutherford wrote: > Avoiding an rbtree for such a small (but unstable) list seems correct. > > For the unencrypted region list strategy, the only questions that I > have are fairly secondary. > - How should the kernel upper bound the si

Re: [PATCH v2 1/9] KVM: x86: Add AMD SEV specific Hypercall3

2021-01-07 Thread Ashish Kalra
Hello Steve, Sorry, i realized later that i replied to this email with regard to the current bitmap implementation and not the unencrpyted region list strategy. I am now looking at your thoughts/questions with regard to the unencrypted region list strategy and will reply to them accordingly. Tha

Re: [PATCH v2 1/9] KVM: x86: Add AMD SEV specific Hypercall3

2021-01-06 Thread Ashish Kalra
Hello Steve, My thoughts here ... On Wed, Jan 06, 2021 at 05:01:33PM -0800, Steve Rutherford wrote: > Avoiding an rbtree for such a small (but unstable) list seems correct. > I agree. > For the unencrypted region list strategy, the only questions that I > have are fairly secondary. > - How sho

Re: [PATCH v2 1/9] KVM: x86: Add AMD SEV specific Hypercall3

2021-01-06 Thread Steve Rutherford
Avoiding an rbtree for such a small (but unstable) list seems correct. For the unencrypted region list strategy, the only questions that I have are fairly secondary. - How should the kernel upper bound the size of the list in the face of malicious guests, but still support large guests? (Something

Re: [PATCH v2 1/9] KVM: x86: Add AMD SEV specific Hypercall3

2021-01-06 Thread Ashish Kalra
On Fri, Dec 18, 2020 at 07:56:41PM +, Dr. David Alan Gilbert wrote: > * Kalra, Ashish (ashish.ka...@amd.com) wrote: > > Hello Dave, > > > > On Dec 18, 2020, at 1:40 PM, Dr. David Alan Gilbert > > wrote: > > > > * Ashish Kalra (ashish.ka...@amd.com) wrote: > > On Fri, Dec 11, 2020 at 10:55:

Re: [PATCH v2 1/9] KVM: x86: Add AMD SEV specific Hypercall3

2020-12-18 Thread Dr. David Alan Gilbert
* Kalra, Ashish (ashish.ka...@amd.com) wrote: > Hello Dave, > > On Dec 18, 2020, at 1:40 PM, Dr. David Alan Gilbert > wrote: > > * Ashish Kalra (ashish.ka...@amd.com) wrote: > On Fri, Dec 11, 2020 at 10:55:42PM +, Ashish Kalra wrote: > Hello All, > > On Tue, Dec 08, 2020 at 10:29:05AM -06

Re: [PATCH v2 1/9] KVM: x86: Add AMD SEV specific Hypercall3

2020-12-18 Thread Dr. David Alan Gilbert
* Ashish Kalra (ashish.ka...@amd.com) wrote: > On Fri, Dec 11, 2020 at 10:55:42PM +, Ashish Kalra wrote: > > Hello All, > > > > On Tue, Dec 08, 2020 at 10:29:05AM -0600, Brijesh Singh wrote: > > > > > > On 12/7/20 9:09 PM, Steve Rutherford wrote: > > > > On Mon, Dec 7, 2020 at 12:42 PM Sean C

Re: [PATCH v2 1/9] KVM: x86: Add AMD SEV specific Hypercall3

2020-12-11 Thread Ashish Kalra
Hello All, On Tue, Dec 08, 2020 at 10:29:05AM -0600, Brijesh Singh wrote: > > On 12/7/20 9:09 PM, Steve Rutherford wrote: > > On Mon, Dec 7, 2020 at 12:42 PM Sean Christopherson > > wrote: > >> On Sun, Dec 06, 2020, Paolo Bonzini wrote: > >>> On 03/12/20 01:34, Sean Christopherson wrote: >

Re: [PATCH v2 1/9] KVM: x86: Add AMD SEV specific Hypercall3

2020-12-08 Thread Brijesh Singh
On 12/7/20 9:09 PM, Steve Rutherford wrote: > On Mon, Dec 7, 2020 at 12:42 PM Sean Christopherson wrote: >> On Sun, Dec 06, 2020, Paolo Bonzini wrote: >>> On 03/12/20 01:34, Sean Christopherson wrote: On Tue, Dec 01, 2020, Ashish Kalra wrote: > From: Brijesh Singh > > KVM hyper

Re: [PATCH v2 1/9] KVM: x86: Add AMD SEV specific Hypercall3

2020-12-07 Thread Kalra, Ashish
> >> I suspect a list >> would consume far less memory, hopefully without impacting performance. And how much host memory are we talking about for here, say for a 4gb guest, the bitmap will be using just using something like 128k+. Thanks, Ashish > On Dec 7, 2020, at 10:16 PM, Kalra, Ashish

Re: [PATCH v2 1/9] KVM: x86: Add AMD SEV specific Hypercall3

2020-12-07 Thread Kalra, Ashish
I don’t think that the bitmap by itself is really a performance bottleneck here. Thanks, Ashish > On Dec 7, 2020, at 9:10 PM, Steve Rutherford wrote: > > On Mon, Dec 7, 2020 at 12:42 PM Sean Christopherson > wrote: >> >>> On Sun, Dec 06, 2020, Paolo Bonzini wrote: >>> On 03/12/20 01:34, Sea

Re: [PATCH v2 1/9] KVM: x86: Add AMD SEV specific Hypercall3

2020-12-07 Thread Steve Rutherford
On Mon, Dec 7, 2020 at 12:42 PM Sean Christopherson wrote: > > On Sun, Dec 06, 2020, Paolo Bonzini wrote: > > On 03/12/20 01:34, Sean Christopherson wrote: > > > On Tue, Dec 01, 2020, Ashish Kalra wrote: > > > > From: Brijesh Singh > > > > > > > > KVM hypercall framework relies on alternative fra

Re: [PATCH v2 1/9] KVM: x86: Add AMD SEV specific Hypercall3

2020-12-07 Thread Sean Christopherson
On Sun, Dec 06, 2020, Paolo Bonzini wrote: > On 03/12/20 01:34, Sean Christopherson wrote: > > On Tue, Dec 01, 2020, Ashish Kalra wrote: > > > From: Brijesh Singh > > > > > > KVM hypercall framework relies on alternative framework to patch the > > > VMCALL -> VMMCALL on AMD platform. If a hyperca

Re: [PATCH v2 1/9] KVM: x86: Add AMD SEV specific Hypercall3

2020-12-06 Thread Paolo Bonzini
On 03/12/20 01:34, Sean Christopherson wrote: On Tue, Dec 01, 2020, Ashish Kalra wrote: From: Brijesh Singh KVM hypercall framework relies on alternative framework to patch the VMCALL -> VMMCALL on AMD platform. If a hypercall is made before apply_alternative() is called then it defaults to VM

Re: [PATCH v2 1/9] KVM: x86: Add AMD SEV specific Hypercall3

2020-12-04 Thread Brijesh Singh
On 12/2/20 6:34 PM, Sean Christopherson wrote: > On Tue, Dec 01, 2020, Ashish Kalra wrote: >> From: Brijesh Singh >> >> KVM hypercall framework relies on alternative framework to patch the >> VMCALL -> VMMCALL on AMD platform. If a hypercall is made before >> apply_alternative() is called then i

Re: [PATCH v2 1/9] KVM: x86: Add AMD SEV specific Hypercall3

2020-12-02 Thread Sean Christopherson
On Tue, Dec 01, 2020, Ashish Kalra wrote: > From: Brijesh Singh > > KVM hypercall framework relies on alternative framework to patch the > VMCALL -> VMMCALL on AMD platform. If a hypercall is made before > apply_alternative() is called then it defaults to VMCALL. The approach > works fine on non

[PATCH v2 1/9] KVM: x86: Add AMD SEV specific Hypercall3

2020-11-30 Thread Ashish Kalra
From: Brijesh Singh KVM hypercall framework relies on alternative framework to patch the VMCALL -> VMMCALL on AMD platform. If a hypercall is made before apply_alternative() is called then it defaults to VMCALL. The approach works fine on non SEV guest. A VMCALL would causes #UD, and hypervisor w