qemu-devel
[Top][All Lists]
Advanced

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

Re: [RFC 4/8] virtio-pci: Batch add/del ioeventfds in a single MR transa


From: Greg Kurz
Subject: Re: [RFC 4/8] virtio-pci: Batch add/del ioeventfds in a single MR transaction
Date: Tue, 30 Mar 2021 12:29:32 +0200

On Mon, 29 Mar 2021 18:24:40 +0100
Stefan Hajnoczi <stefanha@redhat.com> wrote:

> On Thu, Mar 25, 2021 at 04:07:31PM +0100, Greg Kurz wrote:
> > diff --git a/softmmu/memory.c b/softmmu/memory.c
> > index 1b1942d521cc..0279e5671bcb 100644
> > --- a/softmmu/memory.c
> > +++ b/softmmu/memory.c
> > @@ -2368,7 +2368,7 @@ void memory_region_add_eventfd_full(MemoryRegion *mr,
> >      if (size) {
> >          adjust_endianness(mr, &mrfd.data, size_memop(size) | MO_TE);
> >      }
> > -    if (transaction) {
> > +    if (!transaction) {
> >          memory_region_transaction_begin();
> >      }
> >      for (i = 0; i < mr->ioeventfd_nb; ++i) {
> > @@ -2383,7 +2383,7 @@ void memory_region_add_eventfd_full(MemoryRegion *mr,
> >              sizeof(*mr->ioeventfds) * (mr->ioeventfd_nb-1 - i));
> >      mr->ioeventfds[i] = mrfd;
> >      ioeventfd_update_pending |= mr->enabled;
> > -    if (transaction) {
> > +    if (!transaction) {
> >          memory_region_transaction_commit();
> >      }
> 
> Looks like these two hunks belong in a previous patch.

And they are actually wrong... we *do* want a nested
transaction if 'transaction' is true :) This is a
leftover I thought I had removed but obviously not...

Attachment: pgphiMTDCcXPO.pgp
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]