Re: [RFC Part2 PATCH v3 10/26] KVM: Introduce KVM_MEMORY_ENCRYPT_REGISTER/UNREGISTER_RAM ioctl
From: Brijesh Singh
Date: Tue Sep 12 2017 - 16:54:59 EST
On 09/12/2017 03:29 PM, Borislav Petkov wrote:
...
+ int (*memory_encryption_unregister_ram)(struct kvm *kvm,
+ struct kvm_memory_encrypt_ram *ram);
};
You can shorten those prefixes to "mem_enc" or so and struct
kvm_memory_encrypt_ram to struct enc_region - which is exactly what it
is - an encrypted memory region descriptor - and then fit each function
on a single line.
Sure, I can do that. In one of the feedback Paolo recommended
KVM_MEMORY_ENCRYPT_* ioctl name hence I tried to stick with the same name
for structure. I am flexible to use 'struct enc_region' but I personally
prefer to keep "mem" somewhere in the structure naming to indicate its for
*memory* encryption -- maybe struct kvm_mem_enc_region.
...
+ struct kvm_memory_encrypt_ram)
As with KVM_MEMORY_ENCRYPT_OP, those two need to be in the KVM API document.
Yes, I missed updating the Documentation/virtual/kvm/api.txt for these new
ioctls. I will update it.