From: Sean Christopherson <sean.j.christopherson@intel.com>
To: Krish Sadhukhan <krish.sadhukhan@oracle.com>
Cc: pbonzini@redhat.com, vkuznets@redhat.com, qemu-devel@nongnu.org,
kvm@vger.kernel.org, jmattson@google.com
Subject: Re: [PATCH 1/6 v3] KVM: x86: Change names of some of the kvm_x86_ops functions to make them more semantical and readable
Date: Mon, 28 Sep 2020 21:03:11 -0700 [thread overview]
Message-ID: <20200929040309.GI31514@linux.intel.com> (raw)
In-Reply-To: <1595895050-105504-2-git-send-email-krish.sadhukhan@oracle.com>
This needs a changelog.
I would also split the non-x86 parts, i.e. the kvm_arch_* renames, to a
separate patch.
On Tue, Jul 28, 2020 at 12:10:45AM +0000, Krish Sadhukhan wrote:
> 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>
> ---
> @@ -4016,15 +4016,15 @@ static int svm_vm_init(struct kvm *kvm)
> .tlb_flush_gva = svm_flush_tlb_gva,
> .tlb_flush_guest = svm_flush_tlb,
>
> - .run = svm_vcpu_run,
> + .vcpu_run = svm_vcpu_run,
> .handle_exit = handle_exit,
> .skip_emulated_instruction = skip_emulated_instruction,
> .update_emulated_instruction = NULL,
> .set_interrupt_shadow = svm_set_interrupt_shadow,
> .get_interrupt_shadow = svm_get_interrupt_shadow,
> .patch_hypercall = svm_patch_hypercall,
> - .set_irq = svm_set_irq,
> - .set_nmi = svm_inject_nmi,
> + .inject_irq = svm_set_irq,
I would strongly prefer these renames to be fully recursive within a single
patch, i.e. rename svm_set_irq() as well.
Ditto for the unsetup->teardown change.
> + .inject_nmi = svm_inject_nmi,
> .queue_exception = svm_queue_exception,
> .cancel_injection = svm_cancel_injection,
> .interrupt_allowed = svm_interrupt_allowed,
> @@ -4080,8 +4080,8 @@ static int svm_vm_init(struct kvm *kvm)
> .enable_smi_window = enable_smi_window,
>
> .mem_enc_op = svm_mem_enc_op,
> - .mem_enc_reg_region = svm_register_enc_region,
> - .mem_enc_unreg_region = svm_unregister_enc_region,
> + .mem_enc_register_region = svm_register_enc_region,
> + .mem_enc_unregister_region = svm_unregister_enc_region,
>
> .need_emulation_on_page_fault = svm_need_emulation_on_page_fault,
>
...
> diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
> index 4fdf303..cb6f153 100644
> --- a/include/uapi/linux/kvm.h
> +++ b/include/uapi/linux/kvm.h
> @@ -1469,15 +1469,15 @@ struct kvm_s390_ucas_mapping {
> #define KVM_S390_GET_CMMA_BITS _IOWR(KVMIO, 0xb8, struct kvm_s390_cmma_log)
> #define KVM_S390_SET_CMMA_BITS _IOW(KVMIO, 0xb9, struct kvm_s390_cmma_log)
> /* Memory Encryption Commands */
> -#define KVM_MEMORY_ENCRYPT_OP _IOWR(KVMIO, 0xba, unsigned long)
> +#define KVM_MEM_ENC_OP _IOWR(KVMIO, 0xba, unsigned long)
Renaming macros in uapi headers will break userspace.
We could do
#define KVM_MEMORY_ENCRYPT_OP KVM_MEM_ENC_OP
internally, but personally I think it would do more harm than good.
> struct kvm_enc_region {
> __u64 addr;
> __u64 size;
> };
>
> -#define KVM_MEMORY_ENCRYPT_REG_REGION _IOR(KVMIO, 0xbb, struct kvm_enc_region)
> -#define KVM_MEMORY_ENCRYPT_UNREG_REGION _IOR(KVMIO, 0xbc, struct kvm_enc_region)
> +#define KVM_MEM_ENC_REGISTER_REGION _IOR(KVMIO, 0xbb, struct kvm_enc_region)
> +#define KVM_MEM_ENC_UNREGISTER_REGION _IOR(KVMIO, 0xbc, struct kvm_enc_region)
>
> /* Available with KVM_CAP_HYPERV_EVENTFD */
> #define KVM_HYPERV_EVENTFD _IOW(KVMIO, 0xbd, struct kvm_hyperv_eventfd)
next prev parent reply other threads:[~2020-09-29 4:04 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 [this message]
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 ` [PATCH 6/6 v3] QEMU: x86: Change KVM_MEMORY_ENCRYPT_* #defines to make them conformant to the kernel Krish Sadhukhan
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=20200929040309.GI31514@linux.intel.com \
--to=sean.j.christopherson@intel.com \
--cc=jmattson@google.com \
--cc=krish.sadhukhan@oracle.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--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).