[PATCH 0/9] AMD SEV: Cleanup state handling

David Gibson posted 9 patches 3 years, 11 months ago
Test docker-mingw@fedora passed
Test checkpatch passed
Test asan passed
Test docker-quick@centos7 passed
Test FreeBSD passed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20200604064219.436242-1-david@gibson.dropbear.id.au
Maintainers: Paolo Bonzini <pbonzini@redhat.com>, Eduardo Habkost <ehabkost@redhat.com>, Richard Henderson <rth@twiddle.net>
target/i386/sev.c      | 257 +++++++++++++++++++++++------------------
target/i386/sev_i386.h |  49 --------
2 files changed, 143 insertions(+), 163 deletions(-)
[PATCH 0/9] AMD SEV: Cleanup state handling
Posted by David Gibson 3 years, 11 months ago
This series has an assortment of cleanups to the AMD SEV memory
encryption code.  Amongst other things it:
  * Removes the confusion between struct SEVState and enum SevState
  * Reduces use of global variables
  * Unifies some ad-hoc structures with an existing QOM object

I made these changes along the way to building a framework for common
handling of mechanisms for protecting guests from compromised hosts
(such as AMD SEV, IBM's PEF and others).  However, I think the changes
make sense on their own, so I'm sending them for inclusion now, while
finishing the polish on the rest of those patches.

Please apply.

David Gibson (9):
  target/i386: sev: Remove unused QSevGuestInfoClass
  target/i386: sev: Move local structure definitions into .c file
  target/i386: sev: Rename QSevGuestInfo
  target/i386: sev: Embed SEVState in SevGuestState
  target/i386: sev: Partial cleanup to sev_state global
  target/i386: sev: Remove redundant cbitpos and reduced_phys_bits
    fields
  target/i386: sev: Remove redundant policy field
  target/i386: sev: Remove redundant handle field
  target/i386: sev: Unify SEVState and SevGuestState

 target/i386/sev.c      | 257 +++++++++++++++++++++++------------------
 target/i386/sev_i386.h |  49 --------
 2 files changed, 143 insertions(+), 163 deletions(-)

-- 
2.26.2


Re: [PATCH 0/9] AMD SEV: Cleanup state handling
Posted by Paolo Bonzini 3 years, 11 months ago
On 04/06/20 08:42, David Gibson wrote:
> This series has an assortment of cleanups to the AMD SEV memory
> encryption code.  Amongst other things it:
>   * Removes the confusion between struct SEVState and enum SevState
>   * Reduces use of global variables
>   * Unifies some ad-hoc structures with an existing QOM object
> 
> I made these changes along the way to building a framework for common
> handling of mechanisms for protecting guests from compromised hosts
> (such as AMD SEV, IBM's PEF and others).  However, I think the changes
> make sense on their own, so I'm sending them for inclusion now, while
> finishing the polish on the rest of those patches.
> 
> Please apply.
> 
> David Gibson (9):
>   target/i386: sev: Remove unused QSevGuestInfoClass
>   target/i386: sev: Move local structure definitions into .c file
>   target/i386: sev: Rename QSevGuestInfo
>   target/i386: sev: Embed SEVState in SevGuestState
>   target/i386: sev: Partial cleanup to sev_state global
>   target/i386: sev: Remove redundant cbitpos and reduced_phys_bits
>     fields
>   target/i386: sev: Remove redundant policy field
>   target/i386: sev: Remove redundant handle field
>   target/i386: sev: Unify SEVState and SevGuestState
> 
>  target/i386/sev.c      | 257 +++++++++++++++++++++++------------------
>  target/i386/sev_i386.h |  49 --------
>  2 files changed, 143 insertions(+), 163 deletions(-)
> 

Queued, thanks.

Paolo


Re: [PATCH 0/9] AMD SEV: Cleanup state handling
Posted by David Gibson 3 years, 10 months ago
On Thu, Jun 04, 2020 at 08:37:47PM +0200, Paolo Bonzini wrote:
> On 04/06/20 08:42, David Gibson wrote:
> > This series has an assortment of cleanups to the AMD SEV memory
> > encryption code.  Amongst other things it:
> >   * Removes the confusion between struct SEVState and enum SevState
> >   * Reduces use of global variables
> >   * Unifies some ad-hoc structures with an existing QOM object
> > 
> > I made these changes along the way to building a framework for common
> > handling of mechanisms for protecting guests from compromised hosts
> > (such as AMD SEV, IBM's PEF and others).  However, I think the changes
> > make sense on their own, so I'm sending them for inclusion now, while
> > finishing the polish on the rest of those patches.
> > 
> > Please apply.
> > 
> > David Gibson (9):
> >   target/i386: sev: Remove unused QSevGuestInfoClass
> >   target/i386: sev: Move local structure definitions into .c file
> >   target/i386: sev: Rename QSevGuestInfo
> >   target/i386: sev: Embed SEVState in SevGuestState
> >   target/i386: sev: Partial cleanup to sev_state global
> >   target/i386: sev: Remove redundant cbitpos and reduced_phys_bits
> >     fields
> >   target/i386: sev: Remove redundant policy field
> >   target/i386: sev: Remove redundant handle field
> >   target/i386: sev: Unify SEVState and SevGuestState
> > 
> >  target/i386/sev.c      | 257 +++++++++++++++++++++++------------------
> >  target/i386/sev_i386.h |  49 --------
> >  2 files changed, 143 insertions(+), 163 deletions(-)
> 
> Queued, thanks.

Do you have a best guess at when these might merge?  I have another
series based on this one I'd like to move forward with.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
Re: [PATCH 0/9] AMD SEV: Cleanup state handling
Posted by Paolo Bonzini 3 years, 10 months ago
On 10/06/20 07:04, David Gibson wrote:
>>>  target/i386/sev.c      | 257 +++++++++++++++++++++++------------------
>>>  target/i386/sev_i386.h |  49 --------
>>>  2 files changed, 143 insertions(+), 163 deletions(-)
>> Queued, thanks.
> Do you have a best guess at when these might merge?  I have another
> series based on this one I'd like to move forward with.

Sorry, I am seeing a hang with my pull request that I have had issues
bisecting.

Paolo