[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] Re: [PATCH] piix: use pci_config_set_prog_interface()
From: |
Michael S. Tsirkin |
Subject: |
[Qemu-devel] Re: [PATCH] piix: use pci_config_set_prog_interface() |
Date: |
Mon, 27 Dec 2010 16:01:38 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Mon, Dec 20, 2010 at 10:18:01PM +0100, Sebastian Herbszt wrote:
> Use pci_config_set_prog_interface().
>
> Signed-off-by: Sebastian Herbszt <address@hidden>
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.
pci_config_set_prog_interface can then have an assert to
verify that value.
Maybe we can even make e.g. -device nic work.
In a similar way, pci_config_set_prog_interface
would really become useful if we put the handling
for the legacy classes in a central place
(e.g. pci_class.c)
Any chance of doing something like the above?
I'd be happy to apply such patches.
> diff --git a/hw/ide/piix.c b/hw/ide/piix.c
> index 1cad906..2772e08 100644
> --- a/hw/ide/piix.c
> +++ b/hw/ide/piix.c
> @@ -135,7 +135,7 @@ static int pci_piix_ide_initfn(PCIIDEState *d)
> {
> uint8_t *pci_conf = d->dev.config;
>
> - pci_conf[PCI_CLASS_PROG] = 0x80; // legacy ATA mode
> + pci_config_set_prog_interface(pci_conf, 0x80); // legacy ATA mode
> pci_config_set_class(pci_conf, PCI_CLASS_STORAGE_IDE);
>
> qemu_register_reset(piix3_reset, d);
>
- [Qemu-devel] [PATCH] piix: use pci_config_set_prog_interface(), Sebastian Herbszt, 2010/12/20
- [Qemu-devel] Re: [PATCH] piix: use pci_config_set_prog_interface(),
Michael S. Tsirkin <=
- [Qemu-devel] Re: [PATCH] piix: use pci_config_set_prog_interface(), Sebastian Herbszt, 2010/12/28
- [Qemu-devel] Re: [PATCH] piix: use pci_config_set_prog_interface(), Michael S. Tsirkin, 2010/12/28
- [Qemu-devel] Re: [PATCH] piix: use pci_config_set_prog_interface(), Sebastian Herbszt, 2010/12/28
- [Qemu-devel] Re: [PATCH] piix: use pci_config_set_prog_interface(), Michael S. Tsirkin, 2010/12/28
- [Qemu-devel] Re: [PATCH] piix: use pci_config_set_prog_interface(), Sebastian Herbszt, 2010/12/29
- [Qemu-devel] Re: [PATCH] piix: use pci_config_set_prog_interface(), Michael S. Tsirkin, 2010/12/29
- [Qemu-devel] Re: [PATCH] piix: use pci_config_set_prog_interface(), Michael S. Tsirkin, 2010/12/29