@@ -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)
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(+)