Skip to content

Commit 6c7cb08

Browse files
rbradfordalxiord
authored andcommitted
Add ioctl number for KVM_MEMORY_ENCRYPT_OP
This ioctl is used for handling platform encrypted VMs. e.g. for AMD SEV or for Intel TDX. As it is platform dependent the input parameter is an opaque platform dependent type. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
1 parent e147023 commit 6c7cb08

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

coverage_config_x86_64.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"coverage_score": 91.3,
2+
"coverage_score": 91.2,
33
"exclude_path": "",
44
"crate_features": ""
55
}

src/kvm_ioctls.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ ioctl_ior_nr!(KVM_GET_PIT2, KVMIO, 0x9f, kvm_pit_state2);
9393
/* Available with KVM_CAP_PIT_STATE2 */
9494
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
9595
ioctl_iow_nr!(KVM_SET_PIT2, KVMIO, 0xa0, kvm_pit_state2);
96+
/* KVM_MEMORY_ENCRYPT_OP. Takes opaque platform dependent type: i.e. TDX or SEV */
97+
#[cfg(any(target_arch = "x86", target_arch = "x86_64"))]
98+
ioctl_iowr_nr!(KVM_MEMORY_ENCRYPT_OP, KVMIO, 0xba, std::os::raw::c_ulong);
9699

97100
// Ioctls for VCPU fds.
98101

0 commit comments

Comments
 (0)