From: Paolo Bonzini <pbonzini@redhat.com>
To: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>,
linux-kernel@vger.kernel.org, kvm@vger.kernel.org
Cc: joro@8bytes.org, jon.grimm@amd.com, mlevitsk@redhat.com
Subject: Re: [PATCH 2/4] KVM: SVM: Fixes setting V_IRQ while AVIC is still enabled
Date: Wed, 6 May 2020 18:29:49 +0200 [thread overview]
Message-ID: <a963a336-4096-b53a-276b-6509f5cb9402@redhat.com> (raw)
In-Reply-To: <1588771076-73790-3-git-send-email-suravee.suthikulpanit@amd.com>
On 06/05/20 15:17, Suravee Suthikulpanit wrote:
> */
> -void kvm_request_apicv_update(struct kvm *kvm, bool activate, ulong bit)
> +void kvm_request_apicv_update(struct kvm *kvm, bool activate, ulong bit,
> + struct kvm_vcpu *except)
> {
> unsigned long old, new, expected;
>
> @@ -8110,7 +8111,16 @@ void kvm_request_apicv_update(struct kvm *kvm, bool activate, ulong bit)
> trace_kvm_apicv_update_request(activate, bit);
> if (kvm_x86_ops.pre_update_apicv_exec_ctrl)
> kvm_x86_ops.pre_update_apicv_exec_ctrl(kvm, activate);
> - kvm_make_all_cpus_request(kvm, KVM_REQ_APICV_UPDATE);
> +
> + /*
> + * Sending request to update APICV for all other vcpus,
> + * while update the calling vcpu immediately instead of
> + * waiting for another #VMEXIT to handle the request.
> + */
> + kvm_make_all_cpus_request_except(kvm, KVM_REQ_APICV_UPDATE,
> + except);
> + if (except)
> + kvm_vcpu_update_apicv(except);
Can you use kvm_get_running_vcpu() instead of touching all callers?
Also a slightly better subject would be "KVM: SVM: Disable AVIC before
setting V_IRQ".
Paolo
next prev parent reply other threads:[~2020-05-06 16:29 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-06 13:17 [PATCH 0/4] KVM: SVM: Fix AVIC warning when enable irq window Suravee Suthikulpanit
2020-05-06 13:17 ` [PATCH 1/4] KVM: Introduce kvm_make_all_cpus_request_except() Suravee Suthikulpanit
2020-05-06 13:17 ` [PATCH 2/4] KVM: SVM: Fixes setting V_IRQ while AVIC is still enabled Suravee Suthikulpanit
2020-05-06 16:29 ` Paolo Bonzini [this message]
2020-05-07 1:29 ` Suravee Suthikulpanit
2020-05-06 13:17 ` [PATCH 3/4] KVM: SVM: Merge svm_enable_vintr into svm_set_vintr Suravee Suthikulpanit
2020-05-06 13:17 ` [PATCH 4/4] KVM: SVM: Remove unnecessary V_IRQ unsetting Suravee Suthikulpanit
2020-05-06 16:30 ` [PATCH 0/4] KVM: SVM: Fix AVIC warning when enable irq window Paolo Bonzini
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=a963a336-4096-b53a-276b-6509f5cb9402@redhat.com \
--to=pbonzini@redhat.com \
--cc=jon.grimm@amd.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mlevitsk@redhat.com \
--cc=suravee.suthikulpanit@amd.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®