From: "Michael S. Tsirkin" <mst@redhat.com>
To: Isaku Yamahata <yamahata@valinux.co.jp>
Cc: skandasa@cisco.com, adnan@khaleel.us, etmartin@cisco.com,
qemu-devel@nongnu.org, wexu2@cisco.com
Subject: [Qemu-devel] Re: [PATCH v9 1/8] pci: revise pci command register initialization
Date: Wed, 17 Nov 2010 14:02:00 +0200 [thread overview]
Message-ID: <20101117120009.GA10903@redhat.com> (raw)
In-Reply-To: <20101117020314.GB8131@valinux.co.jp>
On Wed, Nov 17, 2010 at 11:03:14AM +0900, Isaku Yamahata wrote:
> On Tue, Nov 16, 2010 at 12:50:19PM +0200, Michael S. Tsirkin wrote:
> > On Tue, Nov 16, 2010 at 05:26:05PM +0900, Isaku Yamahata wrote:
> > > This patch cleans up command register initialization with
> > > comments. It also fixes the initialization of io/memory bit of command register.
> > > Those bits for type 1 device is RW.
> > > Those bits for type 0 device is
> > > RO = 0 if it has no io/memory BAR
> > > RW if it has io/memory BAR
> > >
> > > Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
> >
> > There's a bug here: you can not assume that device that has
> > no io BAR claims no io transactions.
>
> Which device are you mentioning?
Look at appendix D in PCI spec. There are many programming
classes like display controllers that claim specific
addresses without using a BAR. We could code it all
up with a huge table. But what we have is much simpler
and works well AFAIK.
> Such device should set the bit by itself, not by pci generic layer.
Since this is PCI spec specified behaviour, I think it's better
to have it in a common place. Devices are sure to get it wrong.
> > Another bug is that migrating from qemu where a bit is writeable to one
> > where it's RO creates a situation where a RW bit becomes RO, or the
> > reverse, which might confuse guests. So we will need a compatibility
> > flag and set it for old machine types.
>
> We needs to keep compatibility. Which way do you prefer?
>
> - don't care: no way
>
> - introduce global property to indicate compat qemu version or flags
> something like if (compat version <= 0.13) old behaviour...
> or if (flags & ...)
>
> - introduce global-pci property
>
> - introduce pci bus property
> Users needs to specify this property for all pci devices.
>
> - Don't change common code(pci.c), and provide a helper function.
> Each device which needs new behavior like pcie calls it.
> Probably each device may provide property to specify compat behavior
>
> - any other?
- Don't change behaviour at all.
What is the motivation for the change? Why do we bother? What we have
is spec compliant, I think, so it's hard for me to believe pcie *needs*
the new behaviour.
next prev parent reply other threads:[~2010-11-17 12:02 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-16 8:26 [Qemu-devel] [PATCH v9 0/8] pcie port switch emulators Isaku Yamahata
2010-11-16 8:26 ` [Qemu-devel] [PATCH v9 1/8] pci: revise pci command register initialization Isaku Yamahata
2010-11-16 10:50 ` [Qemu-devel] " Michael S. Tsirkin
2010-11-17 2:03 ` Isaku Yamahata
2010-11-17 12:02 ` Michael S. Tsirkin [this message]
2010-11-18 2:08 ` Isaku Yamahata
2010-11-18 6:42 ` Michael S. Tsirkin
2010-11-16 8:26 ` [Qemu-devel] [PATCH v9 2/8] pci: fix accesses to pci status register Isaku Yamahata
2010-11-16 10:52 ` [Qemu-devel] " Michael S. Tsirkin
2010-11-17 4:17 ` Isaku Yamahata
2010-11-16 8:26 ` [Qemu-devel] [PATCH v9 3/8] pci: clean up of " Isaku Yamahata
2010-11-16 14:01 ` [Qemu-devel] " Michael S. Tsirkin
2010-11-16 8:26 ` [Qemu-devel] [PATCH v9 4/8] pcie_regs.h: more constants Isaku Yamahata
2010-11-16 8:26 ` [Qemu-devel] [PATCH v9 5/8] pcie/aer: helper functions for pcie aer capability Isaku Yamahata
2010-11-17 14:06 ` [Qemu-devel] [PATCH 0/2] " Michael S. Tsirkin
2010-11-17 14:06 ` [Qemu-devel] [PATCH 1/2] pcie_aer: get rid of recursion Michael S. Tsirkin
2010-11-17 14:06 ` [Qemu-devel] [PATCH 2/2] pcie_aer: complete unwinding recursion Michael S. Tsirkin
2010-11-18 8:11 ` [Qemu-devel] Re: [PATCH 0/2] Re: [PATCH v9 5/8] pcie/aer: helper functions for pcie aer capability Isaku Yamahata
2010-11-18 8:52 ` Michael S. Tsirkin
2010-11-19 9:42 ` Isaku Yamahata
2010-11-19 12:03 ` Michael S. Tsirkin
2010-11-16 8:26 ` [Qemu-devel] [PATCH v9 6/8] ioh3420: support aer Isaku Yamahata
2010-11-16 8:26 ` [Qemu-devel] [PATCH v9 7/8] x3130/upstream: " Isaku Yamahata
2010-11-16 8:26 ` [Qemu-devel] [PATCH v9 8/8] x3130/downstream: " Isaku Yamahata
[not found] ` <1289930315.27724.18.camel@etmartin-lnx>
2010-11-16 18:57 ` [Qemu-devel] " Etienne Martineau
2010-11-17 4:07 ` Isaku Yamahata
2010-11-17 5:31 ` Etienne Martineau
2010-11-18 2:19 ` Isaku Yamahata
2010-11-17 14:38 ` [Qemu-devel] Re: [PATCH v9 0/8] pcie port switch emulators Michael S. Tsirkin
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=20101117120009.GA10903@redhat.com \
--to=mst@redhat.com \
--cc=adnan@khaleel.us \
--cc=etmartin@cisco.com \
--cc=qemu-devel@nongnu.org \
--cc=skandasa@cisco.com \
--cc=wexu2@cisco.com \
--cc=yamahata@valinux.co.jp \
/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.