From: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
To: Paolo Bonzini <pbonzini@redhat.com>,
Maxim Levitsky <mlevitsk@redhat.com>,
kvm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: AVIC related warning in enable_irq_window
Date: Wed, 6 May 2020 07:42:35 +0700 [thread overview]
Message-ID: <ce6c3f43-07a4-be37-9d72-5a664d2fb09e@amd.com> (raw)
In-Reply-To: <6e94e9e1-64d1-de62-3bdb-75be99ddbb35@redhat.com>
On 5/5/20 7:12 PM, Paolo Bonzini wrote:
> On 05/05/20 09:55, Suravee Suthikulpanit wrote:
>> On the other hand, would be it useful to implement
>> kvm_make_all_cpus_request_but_self(),
>> which sends request to all other vcpus excluding itself?
>
> Yes, that's also a possibility. It's not too much extra complication if
> we add a new argument to kvm_make_vcpus_request_mask, like this:
>
> diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c
> index 74bdb7bf3295..8f9dadb1ef42 100644
> --- a/virt/kvm/kvm_main.c
> +++ b/virt/kvm/kvm_main.c
> @@ -258,7 +258,7 @@ static inline bool kvm_kick_many_cpus(const struct cpumask *cpus, bool wait)
> return true;
> }
>
> -bool kvm_make_vcpus_request_mask(struct kvm *kvm, unsigned int req,
> +bool kvm_make_vcpus_request_mask(struct kvm *kvm, unsigned int req, struct kvm_vcpu *except,
> unsigned long *vcpu_bitmap, cpumask_var_t tmp)
> {
> int i, cpu, me;
> @@ -270,6 +270,8 @@ bool kvm_make_vcpus_request_mask(struct kvm *kvm, unsigned int req,
> kvm_for_each_vcpu(i, vcpu, kvm) {
> if (vcpu_bitmap && !test_bit(i, vcpu_bitmap))
> continue;
> + if (vcpu == except)
> + continue;
>
> kvm_make_request(req, vcpu);
> cpu = vcpu->cpu;
>
>
> Paolo
>
Sounds good. I'll take care of this today.
Suravee
prev parent reply other threads:[~2020-05-06 0:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-02 13:58 Maxim Levitsky
2020-05-02 16:42 ` Paolo Bonzini
2020-05-02 16:43 ` Maxim Levitsky
2020-05-03 19:18 ` Suravee Suthikulpanit
2020-05-04 8:46 ` Suravee Suthikulpanit
2020-05-04 9:13 ` Maxim Levitsky
2020-05-04 9:25 ` Paolo Bonzini
2020-05-04 10:37 ` Suravee Suthikulpanit
2020-05-04 10:49 ` Paolo Bonzini
2020-05-05 7:55 ` Suravee Suthikulpanit
2020-05-05 11:40 ` Maxim Levitsky
2020-05-05 12:12 ` Paolo Bonzini
2020-05-06 0:42 ` Suravee Suthikulpanit [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=ce6c3f43-07a4-be37-9d72-5a664d2fb09e@amd.com \
--to=suravee.suthikulpanit@amd.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mlevitsk@redhat.com \
--cc=pbonzini@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
all inboxes | Powered by JetHome®