qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Krish Sadhukhan <krish.sadhukhan@oracle.com>
To: kvm@vger.kernel.org
Cc: pbonzini@redhat.com, vkuznets@redhat.com, qemu-devel@nongnu.org,
	sean.j.christopherson@intel.com, jmattson@google.com
Subject: [PATCH 6/6 v3] QEMU: x86: Change KVM_MEMORY_ENCRYPT_* #defines to make them conformant to the kernel
Date: Tue, 28 Jul 2020 00:10:50 +0000	[thread overview]
Message-ID: <1595895050-105504-7-git-send-email-krish.sadhukhan@oracle.com> (raw)
In-Reply-To: <1595895050-105504-1-git-send-email-krish.sadhukhan@oracle.com>

Suggested-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Suggested-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by: Krish Sadhukhan <krish.sadhukhan@oracle.com>
---
 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



      parent reply	other threads:[~2020-07-28  1:12 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-28  0:10 [PATCH 0/6 v3] KVM: x86: Fill in conforming {vmx|svm}_x86_ops and {vmx|svm}_nested_ops via macros Krish Sadhukhan
2020-07-28  0:10 ` [PATCH 1/6 v3] KVM: x86: Change names of some of the kvm_x86_ops functions to make them more semantical and readable Krish Sadhukhan
2020-09-29  4:03   ` Sean Christopherson
2020-07-28  0:10 ` [PATCH 2/6 v3] KVM: SVM: Fill in conforming svm_x86_ops via macro Krish Sadhukhan
2020-09-29  4:06   ` Sean Christopherson
2020-07-28  0:10 ` [PATCH 3/6 v3] KVM: nSVM: Fill in conforming svm_nested_ops " Krish Sadhukhan
2020-07-28  0:10 ` [PATCH 4/6 v3] KVM: VMX: Fill in conforming vmx_x86_ops " Krish Sadhukhan
2020-09-29  4:08   ` Sean Christopherson
2020-07-28  0:10 ` [PATCH 5/6 v3] KVM: nVMX: Fill in conforming vmx_nested_ops " Krish Sadhukhan
2020-07-28  0:10 ` Krish Sadhukhan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1595895050-105504-7-git-send-email-krish.sadhukhan@oracle.com \
    --to=krish.sadhukhan@oracle.com \
    --cc=jmattson@google.com \
    --cc=kvm@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=sean.j.christopherson@intel.com \
    --cc=vkuznets@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).