qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eduardo Habkost <ehabkost@redhat.com>
To: peng.hao2@zte.com.cn
Cc: pbonzini@redhat.com, mst@redhat.com, rkrcmar@redhat.com,
	kvm@vger.kernel.org, qemu-devel@nongnu.org,
	zhong.weidong@zte.com.cn
Subject: Re: [Qemu-devel] [PATCH V3 2/4] target-i386:add coalesced_pio API
Date: Fri, 24 Aug 2018 07:42:46 -0300	[thread overview]
Message-ID: <20180824104246.GU3778@localhost.localdomain> (raw)
In-Reply-To: <201808241718451351057@zte.com.cn>

On Fri, Aug 24, 2018 at 05:18:45PM +0800, peng.hao2@zte.com.cn 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	other threads:[~2018-08-24 10:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-24  9:18 [Qemu-devel] [PATCH V3 2/4] target-i386:add coalesced_pio API peng.hao2
2018-08-24 10:42 ` Eduardo Habkost [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-08-23 16:14 [Qemu-devel] [PATCH V3 0/4] introduce coalesced pio support Peng Hao
2018-08-23 16:14 ` [Qemu-devel] [PATCH V3 2/4] target-i386:add coalesced_pio API Peng Hao
2018-08-24  3:58   ` Eduardo Habkost

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180824104246.GU3778@localhost.localdomain \
    --to=ehabkost@redhat.com \
    --cc=kvm@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peng.hao2@zte.com.cn \
    --cc=qemu-devel@nongnu.org \
    --cc=rkrcmar@redhat.com \
    --cc=zhong.weidong@zte.com.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).