qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Weil <weil@mail.berlios.de>
To: "Michael S. Tsirkin" <mst@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>,
	Markus Armbruster <armbru@redhat.com>,
	QEMU Developers <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Re: [PATCH 1/2] pci: Automatically patch PCI vendor id and device id in PCI ROM
Date: Mon, 18 Oct 2010 21:36:11 +0200	[thread overview]
Message-ID: <4CBCA1AB.5010701@mail.berlios.de> (raw)
In-Reply-To: <20101018190325.GB27606@redhat.com>

Am 18.10.2010 21:03, schrieb Michael S. Tsirkin:
> On Mon, Oct 18, 2010 at 01:42:06PM -0500, Anthony Liguori wrote:
>>>> +/* Patch the PCI vendor and device ids in a PCI rom image if 
>>>> necessary.
>>>> + This is needed for an option rom which is used for more than one 
>>>> device. */
>>>> +static void pci_patch_ids(PCIDevice *pdev, uint8_t *ptr, int size)
>>> let's return an error code on malformed roms so management can 
>>> detect errors?
>>
>> A bad/missing PnP header does not mean it's an invalid ROM.
>
> I don't see this as a generic capability - rather a specific
> hack that helps reduce some duplication for eepro100 and friends.
> As such, if we can't patch the id we know it's an invalid file.

There is already some kind of error feedback: the rom will not work.
For etherboot roms, booting from network won't work.

This is a qemu internal error, so more error handling is not needed.

Users who configure a device with their own rom file don't
need an id patch, and their rom data will not be patched
because they normally specify a rom file with correct ids.
For the rare case where they configure a rom with a "wrong"
id, their rom data will be patched (something they don't expect)
or not modified because of the sanity checks (then the rom
is ignored by the bios).

Maybe a more perfect solution would only patch the preconfigured
rom files but not user configured files, but I don't think we
need this degree of perfection.

Regards,
Stefan

  reply	other threads:[~2010-10-18 19:36 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-12 12:41 [Qemu-devel] Where's gpxe-eepro100-80862449.rom ? Markus Armbruster
2010-10-12 16:18 ` [Qemu-devel] " Stefan Weil
2010-10-13  7:13   ` Markus Armbruster
2010-10-15 20:51     ` [Qemu-devel] [PATCH 1/2] pci: Automatically patch PCI device id in PCI ROM Stefan Weil
2010-10-15 21:05       ` Anthony Liguori
2010-10-18 10:09         ` Gerd Hoffmann
2010-10-18 18:39           ` Anthony Liguori
2010-10-21 10:09             ` [SeaBIOS] " Avi Kivity
2010-10-21 13:14               ` Anthony Liguori
2010-10-21 15:34                 ` Avi Kivity
2010-10-18 10:04       ` Gerd Hoffmann
2010-10-18 11:16         ` Stefan Weil
2010-10-18 11:54           ` Gerd Hoffmann
2010-10-18 13:16             ` Stefan Weil
2010-10-18 13:30               ` Gerd Hoffmann
2010-10-18 15:50                 ` Gerd Hoffmann
2010-10-18 17:54                   ` Stefan Weil
2010-10-18 17:55                   ` [Qemu-devel] [PATCH 1/2] pci: Automatically patch PCI vendor id and " Stefan Weil
2010-10-18 17:58                     ` [Qemu-devel] " Michael S. Tsirkin
2010-10-18 18:42                       ` Anthony Liguori
2010-10-18 19:03                         ` Michael S. Tsirkin
2010-10-18 19:36                           ` Stefan Weil [this message]
2010-10-18 19:59                             ` Anthony Liguori
2010-10-19  6:40                             ` Gerd Hoffmann
2010-10-18 19:56                           ` Anthony Liguori
2010-10-18 18:44                     ` [Qemu-devel] " Anthony Liguori
2010-10-18 18:53                       ` Anthony Liguori
2010-10-18 19:11                         ` Stefan Weil
2010-10-19  8:37                           ` Michael S. Tsirkin
2010-10-19 21:15                             ` Stefan Weil
2010-10-19 21:22                               ` Anthony Liguori
2010-10-19 21:25                                 ` Michael S. Tsirkin
2010-10-19 21:08                         ` Stefan Weil
2010-10-20  7:19                           ` [Qemu-devel] " Gerd Hoffmann
2010-10-20 20:30                             ` Stefan Weil
2010-11-22  6:29                           ` Michael S. Tsirkin
2010-10-15 20:51     ` [Qemu-devel] [PATCH 2/2] eepro100: Use a single rom file for all i825xx devices Stefan Weil
2010-11-22  6:29       ` [Qemu-devel] " Michael S. Tsirkin
2010-10-15 21:03     ` [Qemu-devel] Re: Where's gpxe-eepro100-80862449.rom ? Stefan Weil
2010-10-25 12:11       ` Markus Armbruster
2010-10-25 16:23         ` Stefan Weil
2010-10-25 16:54           ` Michael S. Tsirkin
2010-11-15 17:06             ` Stefan Weil

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=4CBCA1AB.5010701@mail.berlios.de \
    --to=weil@mail.berlios.de \
    --cc=armbru@redhat.com \
    --cc=kraxel@redhat.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).