From: Anthony Liguori <anthony@codemonkey.ws>
To: Gerd Hoffmann <kraxel@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 3/6] pci romfiles: add property, add default to PCIDeviceInfo
Date: Thu, 17 Dec 2009 14:18:20 -0600 [thread overview]
Message-ID: <4B2A920C.1060506@codemonkey.ws> (raw)
In-Reply-To: <1261053168-8079-4-git-send-email-kraxel@redhat.com>
Gerd Hoffmann wrote:
> This patch adds a romfile property to the pci bus. It allows to specify
> a romfile to load into the rom bar of the pci device. The default value
> comes from a new field in PCIDeviceInfo. The property allows to change
> the file and also to disable the rom loading using an empty string.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> hw/cirrus_vga.c | 4 +---
> hw/e1000.c | 9 +--------
> hw/pci.c | 24 +++++++++++++++++++++---
> hw/pci.h | 6 ++++--
> hw/rtl8139.c | 9 +--------
> hw/virtio-pci.c | 9 +--------
> 6 files changed, 29 insertions(+), 32 deletions(-)
>
> diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c
> index b08d2ae..6fe433d 100644
> --- a/hw/cirrus_vga.c
> +++ b/hw/cirrus_vga.c
> @@ -3209,9 +3209,6 @@ static int pci_cirrus_vga_initfn(PCIDevice *dev)
> pci_register_bar((PCIDevice *)d, 1, CIRRUS_PNPMMIO_SIZE,
> PCI_BASE_ADDRESS_SPACE_MEMORY, cirrus_pci_mmio_map);
> }
> -
> - /* ROM BIOS */
> - pci_add_option_rom((PCIDevice *)d, VGABIOS_CIRRUS_FILENAME);
> return 0;
> }
>
> @@ -3226,6 +3223,7 @@ static PCIDeviceInfo cirrus_vga_info = {
> .qdev.size = sizeof(PCICirrusVGAState),
> .qdev.vmsd = &vmstate_pci_cirrus_vga,
> .init = pci_cirrus_vga_initfn,
> + .romfile = VGABIOS_CIRRUS_FILENAME,
> .config_write = pci_cirrus_write_config,
> };
>
Really nice example of qdev in action. Very nice cleanup!
Regards,
Anthony Liguori
next prev parent reply other threads:[~2009-12-17 20:27 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-17 12:32 [Qemu-devel] [PATCH 0/6] option rom patches, next round Gerd Hoffmann
2009-12-17 12:32 ` [Qemu-devel] [PATCH 1/6] patched seabios binary Gerd Hoffmann
2009-12-17 12:32 ` [Qemu-devel] [PATCH 2/6] Support PCI based option rom loading Gerd Hoffmann
2009-12-17 12:32 ` [Qemu-devel] [PATCH 3/6] pci romfiles: add property, add default to PCIDeviceInfo Gerd Hoffmann
2009-12-17 20:18 ` Anthony Liguori [this message]
2009-12-17 12:32 ` [Qemu-devel] [PATCH 4/6] fw_cfg: make calls typesafe Gerd Hoffmann
2009-12-17 12:32 ` [Qemu-devel] [PATCH 5/6] fw_cfg: add API for file transfer Gerd Hoffmann
2009-12-17 12:32 ` [Qemu-devel] [PATCH 6/6] roms: use fw_cfg file Gerd Hoffmann
2009-12-17 14:46 ` [Qemu-devel] Re: [PATCH 0/6] option rom patches, next round Gerd Hoffmann
2009-12-17 20:22 ` Anthony Liguori
2009-12-18 9:30 ` Gerd Hoffmann
2009-12-17 15:34 ` [Qemu-devel] " Anthony Liguori
2009-12-17 15:46 ` Gerd Hoffmann
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=4B2A920C.1060506@codemonkey.ws \
--to=anthony@codemonkey.ws \
--cc=kraxel@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).