From: Gerd Hoffmann <kraxel@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Blue Swirl <blauwirbel@gmail.com>,
Isaku Yamahata <yamahata@valinux.co.jp>,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: [PATCH] pci: initialize header type register.
Date: Mon, 08 Feb 2010 18:43:51 +0100 [thread overview]
Message-ID: <4B704D57.3030509@redhat.com> (raw)
In-Reply-To: <20100208173741.GB10716@redhat.com>
On 02/08/10 18:37, Michael S. Tsirkin wrote:
> On Mon, Feb 08, 2010 at 06:37:41PM +0100, Gerd Hoffmann wrote:
>> On 02/08/10 18:32, Michael S. Tsirkin wrote:
>>> On Mon, Feb 08, 2010 at 06:24:57PM +0100, Gerd Hoffmann wrote:
>>>> On 02/08/10 17:27, Michael S. Tsirkin wrote:
>>>>> On Mon, Feb 08, 2010 at 12:14:11PM +0100, Gerd Hoffmann wrote:
>>>>>> On 02/08/10 11:17, Michael S. Tsirkin wrote:
>>>>>>> On Mon, Feb 08, 2010 at 03:41:47PM +0900, Isaku Yamahata wrote:
>>>>>>>> initialize header type register in pci generic code.
>>>>>>>>
>>>>>>>> Cc: Blue Swirl<blauwirbel@gmail.com>
>>>>>>>> Cc: "Michael S. Tsirkin"<mst@redhat.com>
>>>>>>>> Signed-off-by: Isaku Yamahata<yamahata@valinux.co.jp>
>>>>>>>
>>>>>>> No objections here, I am assuming this will be followed
>>>>>>> by patches removing header type init from bridges?
>>>>>>> From qdev perspective, it is probably cleaner to make
>>>>>>> multifunction bit a separate qdev property though, right?
>>>>>>
>>>>>> From a qdev perspective it would make *alot* of sense to move a bunch of
>>>>>> pci config stuff (including, but not limited to header type) into
>>>>>> PCIDeviceInfo.
>>>>>>
>>>>>> cheers,
>>>>>> Gerd
>>>>>
>>>>> Actually - won't this make it possible to create broken configurations
>>>>> by tweaking properties from command-line?
>>>>
>>>> Not as property, as struct element in PCIDeviceInfo. i.e.
>>>>
>>>> static PCIDeviceInfo e1000_info = {
>>>> [ stuff which is here right now ]
>>>> .vendor_id = PCI_VENDOR_ID_INTEL,
>>>> .device_id = E1000_DEVID,
>>>> .class = PCI_CLASS_NETWORK_ETHERNET,
>>>> [ probably more stuff which makes sense ]
>>>> }
>>>>
>>>> Then setup this in generic pci code instead of having each driver doing
>>>> a bunch of pci_config_set_*() calls.
>>>>
>>>> cheers,
>>>> Gerd
>>>
>>> We still end up with class, vendor etc duplicated in 2 places.
>>
>> No. The info should be *only* in PCIDeviceInfo then.
>
> That would put a lot of code in pci config cycle path. A single array
> mirroring the whole config space is much cleaner.
>
>>> Why do
>>> we want stuff like vendor id in PCIDeviceInfo at all? Why can't
>>> everyone just use pci_config_set/get calls?
>>
>> You can do nice stuff like printing vendor/device IDs in the '-device ?'
>> list then.
>
> That should use pci functions as well.
Hmm, do you mix up PCIDevice and PCIDeviceInfo structs?
cheers,
Gerd
next prev parent reply other threads:[~2010-02-08 18:11 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-08 6:41 [Qemu-devel] [PATCH] pci: initialize header type register Isaku Yamahata
2010-02-08 10:17 ` [Qemu-devel] " Michael S. Tsirkin
2010-02-08 11:14 ` Gerd Hoffmann
2010-02-08 11:16 ` Michael S. Tsirkin
2010-02-08 12:45 ` Gerd Hoffmann
2010-02-08 16:27 ` Michael S. Tsirkin
2010-02-08 17:24 ` Gerd Hoffmann
2010-02-08 17:32 ` Michael S. Tsirkin
2010-02-08 17:37 ` Gerd Hoffmann
2010-02-08 17:37 ` Michael S. Tsirkin
2010-02-08 17:43 ` Gerd Hoffmann [this message]
2010-02-08 18:23 ` Michael S. Tsirkin
2010-02-08 17:56 ` Blue Swirl
2010-02-08 18:26 ` Michael S. Tsirkin
2010-02-08 19:32 ` Blue Swirl
2010-02-08 19:44 ` Michael S. Tsirkin
2010-02-08 19:55 ` Gerd Hoffmann
2010-02-08 20:19 ` Michael S. Tsirkin
2010-02-08 20:32 ` Anthony Liguori
2010-02-08 20:34 ` Michael S. Tsirkin
2010-02-08 20:54 ` Anthony Liguori
2010-02-08 21:01 ` Michael S. Tsirkin
2010-02-08 21:56 ` Anthony Liguori
2010-02-08 21:58 ` Michael S. Tsirkin
2010-02-08 22:25 ` Anthony Liguori
2010-02-09 12:11 ` Michael S. Tsirkin
2010-02-09 8:21 ` Markus Armbruster
2010-02-09 3:42 ` Isaku Yamahata
2010-02-08 14:19 ` 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=4B704D57.3030509@redhat.com \
--to=kraxel@redhat.com \
--cc=blauwirbel@gmail.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 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.