[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC PATCH 01/26] linux-headers: Add definitions of KVM page encryption
From: |
Dov Murik |
Subject: |
[RFC PATCH 01/26] linux-headers: Add definitions of KVM page encryption bitmap ioctls |
Date: |
Tue, 2 Mar 2021 15:47:57 -0500 |
Add support for two ioctls KVM_GET_PAGE_ENC_BITMAP and
KVM_SET_PAGE_ENC_BITMAP used to record the encryption state of each
guest page.
This patch will be replaced by a new implementation based on shared
regions list, or by user-space handling of the regions list. However,
these changes do not affect the use of the page encryption indication in
confidential guest migration flow.
Signed-off-by: Dov Murik <dovmurik@linux.vnet.ibm.com>
---
linux-headers/linux/kvm.h | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h
index 020b62a619..836c3776c0 100644
--- a/linux-headers/linux/kvm.h
+++ b/linux-headers/linux/kvm.h
@@ -532,6 +532,16 @@ struct kvm_dirty_log {
};
};
+/* for KVM_GET_PAGE_ENC_BITMAP */
+struct kvm_page_enc_bitmap {
+ __u64 start_gfn;
+ __u64 num_pages;
+ union {
+ void *enc_bitmap; /* one bit per page */
+ __u64 padding2;
+ };
+};
+
/* for KVM_CLEAR_DIRTY_LOG */
struct kvm_clear_dirty_log {
__u32 slot;
@@ -1557,6 +1567,9 @@ struct kvm_pv_cmd {
/* Available with KVM_CAP_S390_PROTECTED */
#define KVM_S390_PV_COMMAND _IOWR(KVMIO, 0xc5, struct kvm_pv_cmd)
+#define KVM_GET_PAGE_ENC_BITMAP _IOW(KVMIO, 0xc6, struct
kvm_page_enc_bitmap)
+#define KVM_SET_PAGE_ENC_BITMAP _IOW(KVMIO, 0xc7, struct
kvm_page_enc_bitmap)
+
/* Available with KVM_CAP_X86_MSR_FILTER */
#define KVM_X86_SET_MSR_FILTER _IOW(KVMIO, 0xc6, struct kvm_msr_filter)
--
2.20.1
- [RFC PATCH 00/26] Confidential guest live migration, Dov Murik, 2021/03/02
- [RFC PATCH 01/26] linux-headers: Add definitions of KVM page encryption bitmap ioctls,
Dov Murik <=
- [RFC PATCH 02/26] kvm: add support to sync the page encryption state bitmap, Dov Murik, 2021/03/02
- [RFC PATCH 12/26] migration: Add helpers to save confidential RAM, Dov Murik, 2021/03/02
- [RFC PATCH 04/26] hw/boards: Add aux flag to CPUArchId, Dov Murik, 2021/03/02
- [RFC PATCH 11/26] softmmu: Add pause_all_vcpus_except_aux, Dov Murik, 2021/03/02
- [RFC PATCH 16/26] migration: Load confidential guest RAM using migration helper, Dov Murik, 2021/03/02
- [RFC PATCH 06/26] hw/acpi: Don't include auxiliary vcpus in ACPI tables, Dov Murik, 2021/03/02
- [RFC PATCH 13/26] migration: Add helpers to load confidential RAM, Dov Murik, 2021/03/02
- [RFC PATCH 07/26] cpu: Add boolean aux field to CPUState, Dov Murik, 2021/03/02
- [RFC PATCH 23/26] target/i386: Re-sync kvm-clock after confidential guest migration, Dov Murik, 2021/03/02
- [RFC PATCH 03/26] machine: Add auxcpus=N suboption to -smp, Dov Murik, 2021/03/02