Re: [PATCH] KVM: Clear pv eoi pending bit only when it is set

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux