History

KVM: Introduce KVM_MEMORY_ENCRYPT_{UN,}REG_REGION ioctl

If hardware supports memory encryption then KVM_MEMORY_ENCRYPT_REG_REGION and KVM_MEMORY_ENCRYPT_UNREG_REGION ioctl's can be used by userspace to register/unregister the guest memory regions which may contain the encrypted data (e.g guest RAM, PCI BAR, SMRAM etc).

Brijesh Singh committed 8 years ago

Commit 69eaede1 parent 5acc5c04 files · +68 −0Browse files

Showing the changes to include/uapi/linux (1 of 4 files). Show all

Unified · Split

include/uapi/linux/kvm.h+8−0
@@ -1361,6 +1361,14 @@ struct kvm_s390_ucas_mapping { · 1360 unmodified lines
13611361 /* Memory Encryption Commands */
13621362 #define KVM_MEMORY_ENCRYPT_OP _IOWR(KVMIO, 0xba, unsigned long)
13631363
1364+struct kvm_enc_region {
1365+ __u64 addr;
1366+ __u64 size;
1367+};
1368+
1369+#define KVM_MEMORY_ENCRYPT_REG_REGION _IOR(KVMIO, 0xbb, struct kvm_enc_region)
1370+#define KVM_MEMORY_ENCRYPT_UNREG_REGION _IOR(KVMIO, 0xbc, struct kvm_enc_region)
1371+
13641372 #define KVM_DEV_ASSIGN_ENABLE_IOMMU (1 << 0)
13651373 #define KVM_DEV_ASSIGN_PCI_2_3 (1 << 1)
13661374 #define KVM_DEV_ASSIGN_MASK_INTX (1 << 2)