KVM: Calculate available entries in coalesced mmio ring
authorAvi Kivity <avi@redhat.com>
Thu, 4 Jun 2009 15:09:08 +0000 (18:09 +0300)
committerAvi Kivity <avi@redhat.com>
Thu, 10 Sep 2009 05:32:47 +0000 (08:32 +0300)
Instead of checking whether we'll wrap around, calculate how many entries
are available, and check whether we have enough (just one) for the pending
mmio.

By itself, this doesn't change anything, but it paves the way for making
this function lockless.

Signed-off-by: Avi Kivity <avi@redhat.com>
virt/kvm/coalesced_mmio.c

Simple merge