Re: [RFC v2 14/18] guest memory protection: Rework the "memory-encryption" property

2020-06-03 Thread David Gibson
On Thu, Jun 04, 2020 at 08:19:41AM +0200, Thomas Huth wrote: > On 04/06/2020 07.56, David Gibson wrote: > > On Mon, Jun 01, 2020 at 08:54:42PM -0700, Richard Henderson wrote: > >> On 5/20/20 8:43 PM, David Gibson wrote: > >>> +++ b/include/hw/boards.h > >>> @@ -12,6 +12,8 @@ > >>> #include "qom/ob

Re: [RFC v2 14/18] guest memory protection: Rework the "memory-encryption" property

2020-06-03 Thread Thomas Huth
On 04/06/2020 07.56, David Gibson wrote: > On Mon, Jun 01, 2020 at 08:54:42PM -0700, Richard Henderson wrote: >> On 5/20/20 8:43 PM, David Gibson wrote: >>> +++ b/include/hw/boards.h >>> @@ -12,6 +12,8 @@ >>> #include "qom/object.h" >>> #include "hw/core/cpu.h" >>> >>> +typedef struct GuestMemo

Re: [RFC v2 14/18] guest memory protection: Rework the "memory-encryption" property

2020-06-03 Thread David Gibson
On Mon, Jun 01, 2020 at 08:54:42PM -0700, Richard Henderson wrote: > On 5/20/20 8:43 PM, David Gibson wrote: > > +++ b/include/hw/boards.h > > @@ -12,6 +12,8 @@ > > #include "qom/object.h" > > #include "hw/core/cpu.h" > > > > +typedef struct GuestMemoryProtection GuestMemoryProtection; > > + >

Re: [RFC v2 14/18] guest memory protection: Rework the "memory-encryption" property

2020-06-01 Thread Richard Henderson
On 5/20/20 8:43 PM, David Gibson wrote: > +++ b/include/hw/boards.h > @@ -12,6 +12,8 @@ > #include "qom/object.h" > #include "hw/core/cpu.h" > > +typedef struct GuestMemoryProtection GuestMemoryProtection; > + I think this needs to be in include/qemu/typedefs.h, and the other typedef in patch

[RFC v2 14/18] guest memory protection: Rework the "memory-encryption" property

2020-05-20 Thread David Gibson
Currently the "memory-encryption" property is only looked at once we get to kvm_init(). Although protection of guest memory from the hypervisor isn't something that could really ever work with TCG, it's not conceptually tied to the KVM accelerator. In addition, the way the string property is reso