qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Isaku Yamahata <yamahata@valinux.co.jp>
To: Alexander Graf <agraf@suse.de>
Cc: Blue Swirl <blauwirbel@gmail.com>,
	QEMU Developers <qemu-devel@nongnu.org>,
	Aurelien Jarno <aurelien@aurel32.net>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] Re: [PATCH 1/6] Make config space accessor host bus trapable
Date: Mon, 4 Jan 2010 20:08:00 +0900	[thread overview]
Message-ID: <20100104110800.GE4672@valinux.co.jp> (raw)
In-Reply-To: <19CAC3E3-2E27-4BCC-9AB3-875E5665ABBE@suse.de>

On Mon, Jan 04, 2010 at 11:55:10AM +0100, Alexander Graf wrote:
> 
> On 04.01.2010, at 11:45, Isaku Yamahata wrote:
> 
> > On Mon, Jan 04, 2010 at 04:26:46AM +0100, Alexander Graf wrote:
> >> 
> >> On 03.01.2010, at 21:50, Benjamin Herrenschmidt wrote:
> >> 
> >>> On Sun, 2010-01-03 at 21:27 +0100, Alexander Graf wrote:
> >>> 
> >>>> I think if unin_pci is the only user, it'd be better to do it hacky
> >>>> inside unin_pci.c. But if there's a chance there's another user, it'd
> >>>> be better to make it generic.
> >>>> 
> >>>> Since this is the first time I ever stumbled across type 0 and type 1
> >>>> PCI config space addresses, I simply don't know if there are any. Blue
> >>>> Swirls comment indicated that there are. Ben also sounded as if it's
> >>>> rather common to not use the x86 format. On the other hand, it looks
> >>>> like nobody in qemu needed it so far - and we're implementing ARM,
> >>>> MIPS and all other sorts of platforms.
> >>>> 
> >>>> So if anyone with knowledge in PCI could shed some light here, please
> >>>> do so.
> >>> 
> >>> My feeling is that what you're better off doing is to have the qemu core
> >>> take an abstract struct to identify a device config space location, that
> >>> consists of separate fields for:
> >>> 
> >>> - The PCI domain (which is what host bridge it hangs off since bus
> >>> numbers are not unique between domains)
> >>> 
> >>> - The bus number
> >> 
> >> Hm, I think it'd make more sense to just store a PCIBus pointer in there. We could then fetch the bus and domain id from there.
> >> 
> >> I'll write something up :-).
> >> 
> >> 
> >> Alex
> >> 
> > 
> > Does the following patch help?
> > I did only compile test though.
> 
> I sent out v2 already, which contains a complete resolution framework. It also allows for incremental cleanup of the users, as I'd rather like to see everyone use pci_host instead of hacky homegrown functions. But I don't think changing all at once is going to fly wrt reviewablity.

Agreed. Anyway that patch is just for discussion, not for commit.
If wanted, I'm willing to split it up into a series of patches or
rebase it on top of your patches. (Or throw it away)


> I'd be really glad if you could take a glimpse at my version. You're definitely more knowledgable in the PCI areas than me :-). I verified that it fixes Uninorth and x86 still works.

I'll have a look at it tomorrow.

-- 
yamahata

  reply	other threads:[~2010-01-04 11:08 UTC|newest]

Thread overview: 48+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-03  1:50 [Qemu-devel] [PATCH 0/6] PPC NewWorld fixery Alexander Graf
2010-01-03  1:50 ` [Qemu-devel] [PATCH 1/6] Make config space accessor host bus trapable Alexander Graf
2010-01-03 15:45   ` [Qemu-devel] " Michael S. Tsirkin
2010-01-03 16:09     ` Alexander Graf
2010-01-03 17:29       ` Michael S. Tsirkin
2010-01-03 17:40         ` Alexander Graf
2010-01-03 17:44           ` Michael S. Tsirkin
2010-01-03 17:50             ` Alexander Graf
2010-01-03 18:06               ` Michael S. Tsirkin
2010-01-03 19:18                 ` Blue Swirl
2010-01-10 18:41                   ` Blue Swirl
2010-01-11 21:29                     ` Blue Swirl
2010-01-11 22:33                       ` Igor Kovalenko
2010-01-12 19:29                         ` Blue Swirl
2010-01-18 19:47                           ` Blue Swirl
2010-01-03 20:27                 ` Alexander Graf
2010-01-03 20:50                   ` Benjamin Herrenschmidt
2010-01-04  3:26                     ` Alexander Graf
2010-01-04 10:45                       ` Isaku Yamahata
2010-01-04 10:55                         ` Alexander Graf
2010-01-04 11:08                           ` Isaku Yamahata [this message]
2010-01-04 11:07                         ` Michael S. Tsirkin
2010-01-04 11:13                           ` Alexander Graf
2010-01-04 20:10                           ` Benjamin Herrenschmidt
2010-01-04 21:12                             ` Michael S. Tsirkin
2010-01-04 21:25                               ` Benjamin Herrenschmidt
2010-01-04 21:30                                 ` Michael S. Tsirkin
2010-01-04 21:53                                   ` Benjamin Herrenschmidt
2010-01-04 22:25                                     ` Michael S. Tsirkin
2010-01-04 22:51                                       ` Benjamin Herrenschmidt
2010-01-04 22:59                                         ` Michael S. Tsirkin
2010-01-04 23:08                                           ` Alexander Graf
2010-01-04 23:12                                             ` Michael S. Tsirkin
2010-01-04 23:39                                             ` Benjamin Herrenschmidt
2010-01-04 23:33                                           ` Benjamin Herrenschmidt
2010-01-03  1:50 ` [Qemu-devel] [PATCH 2/6] Add config space conversion function for uni_north Alexander Graf
2010-01-03 15:32   ` [Qemu-devel] " Michael S. Tsirkin
2010-01-03 15:40     ` Alexander Graf
2010-01-03 15:47       ` Michael S. Tsirkin
2010-01-03 16:13         ` Alexander Graf
2010-01-03 16:20           ` Michael S. Tsirkin
2010-01-03 16:35             ` Alexander Graf
2010-01-03 17:23               ` Michael S. Tsirkin
2010-01-03 15:48       ` Michael S. Tsirkin
2010-01-03  1:50 ` [Qemu-devel] [PATCH 3/6] Use Mac99_U3 type on ppc64 Alexander Graf
2010-01-03  1:50 ` [Qemu-devel] [PATCH 4/6] Include dump of lspci -nn on real G5 Alexander Graf
2010-01-03  1:50 ` [Qemu-devel] [PATCH 5/6] Make interrupts work Alexander Graf
2010-01-03  1:50 ` [Qemu-devel] [PATCH 6/6] Enable secondary cmd64x Alexander Graf

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=20100104110800.GE4672@valinux.co.jp \
    --to=yamahata@valinux.co.jp \
    --cc=agraf@suse.de \
    --cc=aurelien@aurel32.net \
    --cc=blauwirbel@gmail.com \
    --cc=mst@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 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).