From: "M. Warner Losh" <imp@bsdimp.com>
To: yamahata@valinux.co.jp
Cc: mst@redhat.com, qemu-devel@nongnu.org, armbru@redhat.com
Subject: Re: [Qemu-devel] [PATCH] try to implement complete pci-to-pci bridge emulator.
Date: Fri, 01 May 2009 08:17:50 -0600 (MDT) [thread overview]
Message-ID: <20090501.081750.-2000945085.imp@bsdimp.com> (raw)
In-Reply-To: <1241170436-2800-5-git-send-email-yamahata@valinux.co.jp>
In message: <1241170436-2800-5-git-send-email-yamahata@valinux.co.jp>
Isaku Yamahata <yamahata@valinux.co.jp> writes:
: Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
: ---
: hw/pci.c | 175 +++++++++++++++++++++++++++++++++++++++------------------
: hw/pci.h | 30 ++++++++++
: hw/unin_pci.c | 2 +-
: 3 files changed, 151 insertions(+), 56 deletions(-)
:
: diff --git a/hw/pci.c b/hw/pci.c
: index 0be3662..a1123cb 100644
: --- a/hw/pci.c
: +++ b/hw/pci.c
...
: + case 0x01:
: + case 0x02:
: + case 0x03:
: + case 0x06:
: + case 0x07:
: + case 0x08:
: + case 0x09:
: + case 0x0a:
: + case 0x0b:
: + case 0x0e:
: + case 0x10 ... 0x27: /* base */
This is wrong. BARs are writable, and must be writable to determine
their size.
: + case 0x2c ... 0x2f: /* read-only subsystem ID & vendor ID */
: + case 0x30 ... 0x33: /* rom */
This is wrong too. You have to be able to turn on and off this
mapping by writing bit 0.
: + case 0x3d:
: + can_write = 0;
: break;
General comment: hard coded magic numbers like the above are very hard
to read.
Warner
next prev parent reply other threads:[~2009-05-01 14:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-01 9:33 [Qemu-devel] [PATCH 00/04] RFC: pci bridge clean up and multiple pci bus support Isaku Yamahata
2009-05-01 9:33 ` [Qemu-devel] [PATCH] minor fix of pci_register_bus() Isaku Yamahata
2009-05-01 9:33 ` [Qemu-devel] [PATCH] use PCI_HEADER_TYPE Isaku Yamahata
2009-05-01 9:33 ` [Qemu-devel] [PATCH] pci bus: preliminary for multi pci bus support Isaku Yamahata
2009-05-01 9:33 ` [Qemu-devel] [PATCH] try to implement complete pci-to-pci bridge emulator Isaku Yamahata
2009-05-01 14:17 ` M. Warner Losh [this message]
2009-05-04 16:06 ` Isaku Yamahata
-- strict thread matches above, loose matches on Subject: below --
2009-05-01 13:16 [Qemu-devel] [RFC PATCH 00/04] pci bridge clean up and multiple pci bus support Isaku Yamahata
2009-05-01 13:17 ` [Qemu-devel] [PATCH] try to implement complete pci-to-pci bridge emulator Isaku Yamahata
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=20090501.081750.-2000945085.imp@bsdimp.com \
--to=imp@bsdimp.com \
--cc=armbru@redhat.com \
--cc=mst@redhat.com \
--cc=qemu-devel@nongnu.org \
--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 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).