qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH V3 2/4] target-i386:add coalesced_pio API


From: Eduardo Habkost
Subject: Re: [Qemu-devel] [PATCH V3 2/4] target-i386:add coalesced_pio API
Date: Fri, 24 Aug 2018 07:42:46 -0300
User-agent: Mutt/1.9.2 (2017-12-15)

On Fri, Aug 24, 2018 at 05:18:45PM +0800, address@hidden wrote:
[...]
> > > -            cpu_physical_memory_write(ent->phys_addr, ent->data, 
> > > ent->len);
> > > +            if (ent->pio == 1) {
> > > +                address_space_rw(&address_space_io, ent->phys_addr,
> > > +                                 MEMTXATTRS_NONE, ent->data, ent->len, 
> > > true);
> 
> > Why exactly MEMTXATTRS_NONE is the right attrs argument here?
> > Why MEMTXATTRS_UNSPECIFIED wouldn't work?
> 
> I didn't notice MEMTXATTRS_NONE is the same as MEMTXATTRS_UNSPECIFIED.
> MEMTXATTRS_NONE is redundant.

They are not exactly the same (see below), but in either case I'm
not sure it would make any difference for PIO.


> >> +            } else {
> >> +                cpu_physical_memory_write(ent->phys_addr, ent->data, 
> >> ent->len);
> >> +            }
> >>              smp_wmb();
> >>              ring->first = (ring->first + 1) % KVM_COALESCED_MMIO_MAX;
> >>          }
> >> diff --git a/include/exec/memattrs.h b/include/exec/memattrs.h
> >> index d4a1642..12fd64f 100644
> >> --- a/include/exec/memattrs.h
> >> +++ b/include/exec/memattrs.h
> >> @@ -45,7 +45,7 @@ typedef struct MemTxAttrs {
> >>   * from "didn't specify" if necessary).
> >>   */
> >>  #define MEMTXATTRS_UNSPECIFIED ((MemTxAttrs) { .unspecified = 1 })
> >> -
> >> +#define MEMTXATTRS_NONE ((MemTxAttrs) { 0 })


-- 
Eduardo



reply via email to

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