All of lore.kernel.org
 help / color / mirror / Atom feed
From: Li Qiang <liq3ea@gmail.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: 李强 <liq3ea@163.com>, "Laszlo Ersek" <lersek@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@gmail.com>,
	ehabkost@redhat.com, mst@redhat.com,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"P J P" <ppandit@redhat.com>,
	"Qemu Developers" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH 5/8] hw: designware: add read memory region callback
Date: Fri, 14 Sep 2018 13:08:20 +0800	[thread overview]
Message-ID: <CAKXe6S+YmYgv9UkU+ZX_ZJ9fBN=hbnJah_=_JfUEWnuUc0rKtA@mail.gmail.com> (raw)
In-Reply-To: <256edc89-6f54-da5d-10e1-a57ffb4ca613@redhat.com>

Paolo Bonzini <pbonzini@redhat.com> 于2018年9月13日周四 下午11:12写道:

> On 12/09/2018 18:01, Li Qiang wrote:
> > From: Li Qiang <liq3ea@gmail.com>
> >
> > Signed-off-by: Li Qiang <liq3ea@gmail.com>
> > ---
> >  hw/pci-host/designware.c | 7 +++++++
> >  1 file changed, 7 insertions(+)
> >
> > diff --git a/hw/pci-host/designware.c b/hw/pci-host/designware.c
> > index 29ea313798..f5641b5c8c 100644
> > --- a/hw/pci-host/designware.c
> > +++ b/hw/pci-host/designware.c
> > @@ -57,6 +57,12 @@ designware_pcie_root_to_host(DesignwarePCIERoot *root)
> >      return DESIGNWARE_PCIE_HOST(bus->parent);
> >  }
> >
> > +static uint64_t designware_pcie_root_msi_read(void *opaque, hwaddr addr,
> > +                                              unsigned size)
> > +{
> > +    return 0;
> > +}
> > +
> >  static void designware_pcie_root_msi_write(void *opaque, hwaddr addr,
> >                                             uint64_t val, unsigned len)
> >  {
> > @@ -71,6 +77,7 @@ static void designware_pcie_root_msi_write(void
> *opaque, hwaddr addr,
> >  }
> >
> >  static const MemoryRegionOps designware_pci_host_msi_ops = {
> > +    .read = designware_pcie_root_msi_read,
> >      .write = designware_pcie_root_msi_write,
> >      .endianness = DEVICE_LITTLE_ENDIAN,
> >      .valid = {
> >
>
> This probably needs to generate an unassigned access too, because the
> datasheet says that the device basically traps memory writes.
>
> Generating an unassigned access is probably a good idea for the memory
> core; devices can then override the behavior to return zero.  I'm
> queuing patches 1-4, with slightly expanded commit messages.
>
>
Hi Paolo,
Thanks for your review!

These patches has been got a deep discuss, I'm not sure these patches is
necessory.
The discussion can be found in this thread.
-->https://lists.gnu.org/archive/html/qemu-devel/2018-09/msg01391.html


Thanks,
Li Qiang


> Paolo
>

  reply	other threads:[~2018-09-14  5:08 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-12 16:01 [Qemu-devel] [PATCH 0/8] Add missed read callback for some memory region Li Qiang
2018-09-12 16:01 ` [Qemu-devel] [PATCH 1/8] fw_cfg_mem: add read memory region callback Li Qiang
2018-09-12 16:48   ` Eric Blake
2018-09-12 16:01 ` [Qemu-devel] [PATCH 2/8] hw: debugexit: add read callback Li Qiang
2018-09-12 16:01 ` [Qemu-devel] [PATCH 3/8] hw: hyperv_testdev: " Li Qiang
2018-09-12 16:01 ` [Qemu-devel] [PATCH 4/8] hw: pc-testdev: add read memory region callback Li Qiang
2018-09-12 16:01 ` [Qemu-devel] [PATCH 5/8] hw: designware: " Li Qiang
2018-09-13 15:12   ` Paolo Bonzini
2018-09-14  5:08     ` Li Qiang [this message]
2018-09-12 16:01 ` [Qemu-devel] [PATCH 6/8] hw: pvrdma: " Li Qiang
2018-09-12 16:01 ` [Qemu-devel] [PATCH 7/8] hw: sun4c: " Li Qiang
2018-09-12 19:22   ` Artyom Tarasenko
2018-09-12 16:01 ` [Qemu-devel] [PATCH 8/8] exec: add read callback for notdirty memory region Li Qiang
2018-09-13 10:53   ` Paolo Bonzini
2018-09-12 16:13 ` [Qemu-devel] [PATCH 0/8] Add missed read callback for some " Philippe Mathieu-Daudé
2018-09-13  1:41   ` Li Qiang

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='CAKXe6S+YmYgv9UkU+ZX_ZJ9fBN=hbnJah_=_JfUEWnuUc0rKtA@mail.gmail.com' \
    --to=liq3ea@gmail.com \
    --cc=ehabkost@redhat.com \
    --cc=lersek@redhat.com \
    --cc=liq3ea@163.com \
    --cc=marcandre.lureau@gmail.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=ppandit@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.