Re: [RFC v2 15/18] guest memory protection: Decouple kvm_memcrypt_*() helpers from KVM

2020-06-03 Thread David Gibson
On Mon, Jun 01, 2020 at 09:13:01PM -0700, Richard Henderson wrote: > On 5/20/20 8:43 PM, David Gibson wrote: > > The kvm_memcrypt_enabled() and kvm_memcrypt_encrypt_data() helper functions > > don't conceptually have any connection to KVM (although it's not possible > > in practice to use them with

Re: [RFC v2 15/18] guest memory protection: Decouple kvm_memcrypt_*() helpers from KVM

2020-06-01 Thread Richard Henderson
On 5/20/20 8:43 PM, David Gibson wrote: > The kvm_memcrypt_enabled() and kvm_memcrypt_encrypt_data() helper functions > don't conceptually have any connection to KVM (although it's not possible > in practice to use them without it). Yet? I would expect TCG implementations of these interfaces even

[RFC v2 15/18] guest memory protection: Decouple kvm_memcrypt_*() helpers from KVM

2020-05-20 Thread David Gibson
The kvm_memcrypt_enabled() and kvm_memcrypt_encrypt_data() helper functions don't conceptually have any connection to KVM (although it's not possible in practice to use them without it). They also rely on looking at the global KVMState. But the same information is available from the machine, and