Suggested-by: Vitaly Kuznetsov <vkuznets@xxxxxxxxxx> Suggested-by: Paolo Bonzini <pbonzini@xxxxxxxxxx> Signed-off-by: Sean Christopherson <sean.j.christopherson@xxxxxxxxx> Signed-off-by: Krish Sadhukhan <krish.sadhukhan@xxxxxxxxxx> --- target/i386/sev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/i386/sev.c b/target/i386/sev.c index c3ecf86..0913782 100644 --- a/target/i386/sev.c +++ b/target/i386/sev.c @@ -113,7 +113,7 @@ sev_ioctl(int fd, int cmd, void *data, int *error) input.sev_fd = fd; input.data = (__u64)(unsigned long)data; - r = kvm_vm_ioctl(kvm_state, KVM_MEMORY_ENCRYPT_OP, &input); + r = kvm_vm_ioctl(kvm_state, KVM_MEM_ENC_OP, &input); if (error) { *error = input.error; @@ -187,7 +187,7 @@ sev_ram_block_added(RAMBlockNotifier *n, void *host, size_t size) range.size = size; trace_kvm_memcrypt_register_region(host, size); - r = kvm_vm_ioctl(kvm_state, KVM_MEMORY_ENCRYPT_REG_REGION, &range); + r = kvm_vm_ioctl(kvm_state, KVM_MEM_ENC_REGISTER_REGION, &range); if (r) { error_report("%s: failed to register region (%p+%#zx) error '%s'", __func__, host, size, strerror(errno)); @@ -216,7 +216,7 @@ sev_ram_block_removed(RAMBlockNotifier *n, void *host, size_t size) range.size = size; trace_kvm_memcrypt_unregister_region(host, size); - r = kvm_vm_ioctl(kvm_state, KVM_MEMORY_ENCRYPT_UNREG_REGION, &range); + r = kvm_vm_ioctl(kvm_state, KVM_MEM_ENC_UNREGISTER_REGION, &range); if (r) { error_report("%s: failed to unregister region (%p+%#zx)", __func__, host, size); @@ -454,7 +454,7 @@ sev_get_capabilities(Error **errp) error_setg(errp, "KVM not enabled"); return NULL; } - if (kvm_vm_ioctl(kvm_state, KVM_MEMORY_ENCRYPT_OP, NULL) < 0) { + if (kvm_vm_ioctl(kvm_state, KVM_MEM_ENC_OP, NULL) < 0) { error_setg(errp, "SEV is not enabled in KVM"); return NULL; } -- 1.8.3.1