From: Krish Sadhukhan <krish.sadhukhan@oracle.com>
To: "Sean Christopherson" <sean.j.christopherson@intel.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Radim Krčmář" <rkrcmar@redhat.com>
Cc: kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: x86: Unconditionally call x86 ops that are always implemented
Date: Thu, 1 Aug 2019 14:39:38 -0700 [thread overview]
Message-ID: <3337d56f-de99-6879-96c2-0255db68541d@oracle.com> (raw)
In-Reply-To: <20190801164606.20777-1-sean.j.christopherson@intel.com>
On 08/01/2019 09:46 AM, Sean Christopherson wrote:
> Remove two stale checks for non-NULL ops now that they're implemented by
> both VMX and SVM.
>
> Fixes: 74f169090b6f ("kvm/svm: Setup MCG_CAP on AMD properly")
> Fixes: b31c114b82b2 ("KVM: X86: Provide a capability to disable PAUSE intercepts")
> Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
> ---
> arch/x86/kvm/x86.c | 8 ++------
> 1 file changed, 2 insertions(+), 6 deletions(-)
>
> diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
> index 01e18caac825..2c25a19d436f 100644
> --- a/arch/x86/kvm/x86.c
> +++ b/arch/x86/kvm/x86.c
> @@ -3506,8 +3506,7 @@ static int kvm_vcpu_ioctl_x86_setup_mce(struct kvm_vcpu *vcpu,
> for (bank = 0; bank < bank_num; bank++)
> vcpu->arch.mce_banks[bank*4] = ~(u64)0;
>
> - if (kvm_x86_ops->setup_mce)
> - kvm_x86_ops->setup_mce(vcpu);
> + kvm_x86_ops->setup_mce(vcpu);
> out:
> return r;
> }
> @@ -9313,10 +9312,7 @@ int kvm_arch_init_vm(struct kvm *kvm, unsigned long type)
> kvm_page_track_init(kvm);
> kvm_mmu_init_vm(kvm);
>
> - if (kvm_x86_ops->vm_init)
> - return kvm_x86_ops->vm_init(kvm);
> -
> - return 0;
> + return kvm_x86_ops->vm_init(kvm);
> }
>
> static void kvm_unload_vcpu_mmu(struct kvm_vcpu *vcpu)
The following two ops are also implemented by both VMX and SVM:
update_cr8_intercept
update_pi_irte
next prev parent reply other threads:[~2019-08-01 21:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-08-01 16:46 Sean Christopherson
2019-08-01 21:39 ` Krish Sadhukhan [this message]
2019-08-01 21:42 ` Sean Christopherson
2019-08-02 22:48 ` Sean Christopherson
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=3337d56f-de99-6879-96c2-0255db68541d@oracle.com \
--to=krish.sadhukhan@oracle.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=rkrcmar@redhat.com \
--cc=sean.j.christopherson@intel.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
all inboxes | Powered by JetHome®