From: "Michael S. Tsirkin" <mst@redhat.com>
To: Sebastian Herbszt <herbszt@gmx.de>
Cc: qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH] piix: use pci_config_set_prog_interface()
Date: Wed, 29 Dec 2010 16:55:18 +0200 [thread overview]
Message-ID: <20101229145518.GA8974@redhat.com> (raw)
In-Reply-To: <E50C67A27A814C6BA948269CFEB5F49A@FSCPC>
On Wed, Dec 29, 2010 at 11:26:32AM +0100, Sebastian Herbszt wrote:
> Michael S. Tsirkin wrote:
> >On Tue, Dec 28, 2010 at 07:48:23PM +0100, Sebastian Herbszt wrote:
> >>Michael S. Tsirkin wrote:
> >>>On Tue, Dec 28, 2010 at 05:24:06PM +0100, Sebastian Herbszt wrote:
> >>>>Michael S. Tsirkin wrote:
> >>>>>On Mon, Dec 20, 2010 at 10:18:01PM +0100, Sebastian Herbszt wrote:
> >>>>>>Use pci_config_set_prog_interface().
> >>>>>>
> >>>>>>Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>
> >>>>>
> >>>>>Since I was asked explicitly - I don't have a problem
> >>>>>with these changes: both class and prog interface.
> >>>>>However, they aren't all that useful in themselves.
> >>>>>
> >>>>>For class, what I would like to see is a system where
> >>>>>the device class is put in the qdev info table,
> >>>>>and where -device ?
> >>>>>(and hopefully the legacy -help, -nic etc as well)
> >>>>>use this information.
> >>>>
> >>>>I am not sure if you mean something like the patch below.
> >>>
> >>>Not exactly
> >>>
> >>>- I'd like to keep the pci_config_set_class in the devices,
> >>> just make it do an assert.
> >>
> >>Assert on which condition?
> >
> >That PCI class matches device type defined in qdev.
> >This will serve to verify that all devices are converted properly.
> >
> >>>- Nics already have DEFINE_NIC_PROPERTIES - can this be used somehow?
> >>> Same for other devices ...
> >>
> >>We got DEFINE_NIC_PROPERTIES and DEFINE_BLOCK_PROPERTIES.
> >>Something like DEFINE_PCI_PROPERTIES could be introduced, but i am not sure
> >
> >This shouldn't have to do anything with PCI.
> >We should define the device type as NIC,
> >PCI class can be derived from that.
>
> So you want to introduce a device property like "device_type" and set it to "NIC" and
> then translate "NIC" to the correct PCI class code. Are you sure this is unambiguous?
> "NIC" could be ethernet or token ring. A generic name like "HBA" could translate to even
> more codes (scsi, ide, raid, sata, ...).
>
> >>which device properties it should hold (vendor_id, device_id, class, etc?).
> >>Those will then be user-modifiable with e.g. -device e1000,pci_class=1234.
> >>
> >>Sebastian
> >
> >Why is this helpful?
> >- tweaking class will just break guests
> >- binary representation is unfriendly, let's not require users to read
> > pci spec just to run qemu.
>
> "pci_class" is optional.
> I just wanted to show that qdev device properties are
> user-modifiable and i didn't find a way to prevent this.
Ah, ok.
I think properties starting with x- are internal.
It's a kind of undocumented thing.
--
MST
prev parent reply other threads:[~2010-12-29 14:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-20 21:18 [Qemu-devel] [PATCH] piix: use pci_config_set_prog_interface() Sebastian Herbszt
2010-12-27 14:01 ` [Qemu-devel] " Michael S. Tsirkin
2010-12-28 16:24 ` Sebastian Herbszt
2010-12-28 17:19 ` Michael S. Tsirkin
2010-12-28 18:48 ` Sebastian Herbszt
2010-12-28 21:08 ` Michael S. Tsirkin
2010-12-29 10:26 ` Sebastian Herbszt
2010-12-29 11:21 ` Michael S. Tsirkin
2010-12-29 14:55 ` Michael S. Tsirkin [this message]
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=20101229145518.GA8974@redhat.com \
--to=mst@redhat.com \
--cc=herbszt@gmx.de \
--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).