Re: [RFC PATCH 25/35] KVM: x86: Update __get_sregs() / __set_sregs() to support SEV-ES

2020-11-30 Thread Sean Christopherson
On Mon, Nov 30, 2020, Paolo Bonzini wrote: > On 16/09/20 00:44, Sean Christopherson wrote: > > > KVM doesn't have control of them. They are part of the guest's encrypted > > > state and that is what the guest uses. KVM can't alter the value that the > > > guest is using for them once the VMSA is en

Re: [RFC PATCH 25/35] KVM: x86: Update __get_sregs() / __set_sregs() to support SEV-ES

2020-11-30 Thread Paolo Bonzini
On 16/09/20 00:44, Sean Christopherson wrote: KVM doesn't have control of them. They are part of the guest's encrypted state and that is what the guest uses. KVM can't alter the value that the guest is using for them once the VMSA is encrypted. However, KVM makes some decisions based on the value

Re: [RFC PATCH 25/35] KVM: x86: Update __get_sregs() / __set_sregs() to support SEV-ES

2020-09-15 Thread Tom Lendacky
On 9/14/20 4:37 PM, Sean Christopherson wrote: > On Mon, Sep 14, 2020 at 03:15:39PM -0500, Tom Lendacky wrote: >> From: Tom Lendacky >> >> Since many of the registers used by the SEV-ES are encrypted and cannot >> be read or written, adjust the __get_sregs() / __set_sregs() to only get >> or set t

Re: [RFC PATCH 25/35] KVM: x86: Update __get_sregs() / __set_sregs() to support SEV-ES

2020-09-15 Thread Sean Christopherson
On Tue, Sep 15, 2020 at 03:37:21PM -0500, Tom Lendacky wrote: > On 9/15/20 11:33 AM, Sean Christopherson wrote: > > On Tue, Sep 15, 2020 at 09:19:46AM -0500, Tom Lendacky wrote: > >> On 9/14/20 4:37 PM, Sean Christopherson wrote: > >>> On Mon, Sep 14, 2020 at 03:15:39PM -0500, Tom Lendacky wrote: >

Re: [RFC PATCH 25/35] KVM: x86: Update __get_sregs() / __set_sregs() to support SEV-ES

2020-09-15 Thread Tom Lendacky
On 9/15/20 11:33 AM, Sean Christopherson wrote: > On Tue, Sep 15, 2020 at 09:19:46AM -0500, Tom Lendacky wrote: >> On 9/14/20 4:37 PM, Sean Christopherson wrote: >>> On Mon, Sep 14, 2020 at 03:15:39PM -0500, Tom Lendacky wrote: From: Tom Lendacky Since many of the registers used by

Re: [RFC PATCH 25/35] KVM: x86: Update __get_sregs() / __set_sregs() to support SEV-ES

2020-09-14 Thread Sean Christopherson
On Mon, Sep 14, 2020 at 03:15:39PM -0500, Tom Lendacky wrote: > From: Tom Lendacky > > Since many of the registers used by the SEV-ES are encrypted and cannot > be read or written, adjust the __get_sregs() / __set_sregs() to only get > or set the registers being tracked (efer, cr0, cr4 and cr8) o

[RFC PATCH 25/35] KVM: x86: Update __get_sregs() / __set_sregs() to support SEV-ES

2020-09-14 Thread Tom Lendacky
From: Tom Lendacky Since many of the registers used by the SEV-ES are encrypted and cannot be read or written, adjust the __get_sregs() / __set_sregs() to only get or set the registers being tracked (efer, cr0, cr4 and cr8) once the VMSA is encrypted. For __get_sregs(), return the actual value t