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

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

 



On Fri, Aug 24, 2018 at 05:18:45PM +0800, peng.hao2@xxxxxxxxxx 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



[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