From: Paolo Bonzini <pbonzini@redhat.com>
To: Vitaly Kuznetsov <vkuznets@redhat.com>,
Li RongQing <lirongqing@baidu.com>
Cc: seanjc@google.com, wanpengli@tencent.com, jmattson@google.com,
joro@8bytes.org, tglx@linutronix.de, mingo@redhat.com,
bp@alien8.de, x86@kernel.org, hpa@zytor.com, kvm@vger.kernel.org
Subject: Re: [PATCH] KVM: Clear pv eoi pending bit only when it is set
Date: Tue, 19 Oct 2021 09:29:12 +0200 [thread overview]
Message-ID: <876df534-a280-dc26-6a70-a1464bacad5f@redhat.com> (raw)
In-Reply-To: <87y26pwk96.fsf@vitty.brq.redhat.com>
On 19/10/21 09:23, Vitaly Kuznetsov wrote:
>>
>> -static void pv_eoi_clr_pending(struct kvm_vcpu *vcpu)
>> +static void pv_eoi_clr_pending(struct kvm_vcpu *vcpu, bool pending)
> Nitpick (and probably a matter of personal taste): pv_eoi_clr_pending()
> has only one user and the change doesn't make its interface much nicer,
> I'd suggest we just inline in instead. (we can probably do the same to
> pv_eoi_get_pending()/pv_eoi_set_pending() too).
Alternatively, merge pv_eoi_get_pending and pv_eoi_clr_pending into a
single function pv_eoi_test_and_clear_pending, which returns the value
of the pending bit.
So the caller can do essentially:
- pending = pv_eoi_get_pending(vcpu);
- pv_eoi_clr_pending(vcpu);
- if (pending)
+ if (pv_eoi_test_and_clear_pending(vcpu))
return;
Paolo
next prev parent reply other threads:[~2021-10-19 7:29 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-19 2:05 [PATCH] KVM: Clear pv eoi pending bit only when it is set Li RongQing
2021-10-19 7:23 ` Vitaly Kuznetsov
2021-10-19 7:29 ` Paolo Bonzini [this message]
2021-10-20 3:36 ` 答复: " Li,Rongqing
2021-10-20 11:15 ` Li,Rongqing
2021-10-20 3:43 ` Li,Rongqing
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=876df534-a280-dc26-6a70-a1464bacad5f@redhat.com \
--to=pbonzini@redhat.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=lirongqing@baidu.com \
--cc=mingo@redhat.com \
--cc=seanjc@google.com \
--cc=tglx@linutronix.de \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.