mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Suthikulpanit, Suravee" <suravee.suthikulpanit@amd.com>
To: Maxim Levitsky <mlevitsk@redhat.com>,
	linux-kernel@vger.kernel.org, kvm@vger.kernel.org,
	x86@kernel.org
Cc: pbonzini@redhat.com, joro@8bytes.org, seanjc@google.com,
	tglx@linutronix.de, mingo@redhat.com, bp@alien8.de,
	peterz@infradead.org, hpa@zytor.com, thomas.lendacky@amd.com,
	jon.grimm@amd.com
Subject: Re: [PATCH v2 1/3] KVM: SVM: Refactor AVIC hardware setup logic into helper function
Date: Tue, 7 Dec 2021 20:01:04 +0700	[thread overview]
Message-ID: <bf7c4447-8474-d0da-3692-b6447e6c3e1a@amd.com> (raw)
In-Reply-To: <6a97d0ab100e596c3f4c26c64aaf945018d82a5e.camel@redhat.com>

Hi Maxim,

On 12/3/2021 2:39 PM, Maxim Levitsky wrote:
> On Thu, 2021-12-02 at 17:58 -0600, Suravee Suthikulpanit wrote:
>> To prepare for upcoming AVIC changes. There is no functional change.
>>
>> Signed-off-by: Suravee Suthikulpanit<suravee.suthikulpanit@amd.com>
>> ---
>>   arch/x86/kvm/svm/avic.c | 10 ++++++++++
>>   arch/x86/kvm/svm/svm.c  |  8 +-------
>>   arch/x86/kvm/svm/svm.h  |  1 +
>>   3 files changed, 12 insertions(+), 7 deletions(-)
>>
>> diff --git a/arch/x86/kvm/svm/avic.c b/arch/x86/kvm/svm/avic.c
>> index 8052d92069e0..6aca1682f4b7 100644
>> --- a/arch/x86/kvm/svm/avic.c
>> +++ b/arch/x86/kvm/svm/avic.c
>> @@ -1011,3 +1011,13 @@ void svm_vcpu_unblocking(struct kvm_vcpu *vcpu)
>>   		kvm_vcpu_update_apicv(vcpu);
>>   	avic_set_running(vcpu, true);
>>   }
>> +
>> +bool avic_hardware_setup(bool avic, bool npt)
>> +{
>> +	if (!avic || !npt || !boot_cpu_has(X86_FEATURE_AVIC))
>> +		return false;
>
> Nitpick: Why to pass these as local variables? npt_enabled for example is
> used in many places directly.

Good point. I didn't see that it's already declared as extern in the svm.h. I'll update this in V3.

Thanks,
Suravee

  reply	other threads:[~2021-12-07 13:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-02 23:58 [PATCH v2 0/3] svm: avic: Allow AVIC support on system w/ physical APIC ID > 255 Suravee Suthikulpanit
2021-12-02 23:58 ` [PATCH v2 1/3] KVM: SVM: Refactor AVIC hardware setup logic into helper function Suravee Suthikulpanit
2021-12-03  7:39   ` Maxim Levitsky
2021-12-07 13:01     ` Suthikulpanit, Suravee [this message]
2021-12-02 23:58 ` [PATCH v2 2/3] x86/apic: Add helper function to get maximum physical APIC ID Suravee Suthikulpanit
2021-12-02 23:58 ` [PATCH v2 3/3] KVM: SVM: Extend host physical APIC ID field to support more than 8-bit Suravee Suthikulpanit
2021-12-03  7:46   ` Maxim Levitsky
2021-12-03 16:34     ` Tom Lendacky
2021-12-13 10:46       ` Suthikulpanit, Suravee
2021-12-13 10:45     ` Suthikulpanit, Suravee

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=bf7c4447-8474-d0da-3692-b6447e6c3e1a@amd.com \
    --to=suravee.suthikulpanit@amd.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=jon.grimm@amd.com \
    --cc=joro@8bytes.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=mlevitsk@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterz@infradead.org \
    --cc=seanjc@google.com \
    --cc=tglx@linutronix.de \
    --cc=thomas.lendacky@amd.com \
    --cc=x86@kernel.org \
    /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®