qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: "Michael S. Tsirkin" <mst@redhat.com>,
	Marcel Apfelbaum <marcel.a@redhat.com>
Cc: pbonzini@redhat.com, alex.williamson@redhat.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v2] hw/pci: fixed crash when using rombar=0 with romfile=path for hotplugged devices
Date: Mon, 27 Oct 2014 11:06:38 -0600	[thread overview]
Message-ID: <544E7B9E.20408@redhat.com> (raw)
In-Reply-To: <20141027160324.GC17923@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1652 bytes --]

On 10/27/2014 10:03 AM, Michael S. Tsirkin wrote:
> On Mon, Oct 27, 2014 at 05:04:03PM +0200, Marcel Apfelbaum wrote:
>> On Mon, 2014-10-27 at 16:52 +0200, Michael S. Tsirkin wrote:
>>> On Mon, Oct 27, 2014 at 03:44:04PM +0200, Marcel Apfelbaum wrote:
>>>> Combining rombar=0 with romfile=<path> is an user error,
>>>> silently dropping the romfile is a reasonable thing to do.
>>>>
>>>> Signed-off-by: Marcel Apfelbaum <marcel.a@redhat.com>
>>>
>>> How about failing adding the device instead?
>>> Return error from pci_add_option_rom, and check at
>>> calling sites?
>>
>> This was was the prev version of this patch has done,
>> we have only one calling site:  pci_qdev_init.
>> I could tweak the prev version to return error on both
>> rom_add_vga/rom_add_option, but I was under the impression
>> that silently drop the romfile was discussion's decision.
>>
>> I am fine both ways, as it is a user error and hopefully
>> used correctly by libvirt. I only want to avoid the crash.
>>
>> Thanks,
>> Marcel
> 
> Let's try the non silent error.
> If someone is unhappy we can make it silent again, but
> if it succeeds we'll have to keep it working forever.

I agree - from the libvirt perspective, it is better to be conservative
and have a noisy failure on an incompatible combination, to prove no one
is using it (or give us reason to relax it later), than to accidentally
silently accept it and change from what was requested, and then find out
people were relying on the silent change in semantics.


-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 539 bytes --]

  reply	other threads:[~2014-10-27 17:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-27 13:44 [Qemu-devel] [PATCH v2] hw/pci: fixed crash when using rombar=0 with romfile=path for hotplugged devices Marcel Apfelbaum
2014-10-27 13:50 ` Marcel Apfelbaum
2014-10-27 14:52 ` Michael S. Tsirkin
2014-10-27 15:04   ` Marcel Apfelbaum
2014-10-27 16:03     ` Michael S. Tsirkin
2014-10-27 17:06       ` Eric Blake [this message]
2014-10-27 14:59 ` Markus Armbruster
2014-10-27 15:04   ` Marcel Apfelbaum
2014-10-27 15:54     ` Markus Armbruster

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=544E7B9E.20408@redhat.com \
    --to=eblake@redhat.com \
    --cc=alex.williamson@redhat.com \
    --cc=marcel.a@redhat.com \
    --cc=mst@redhat.com \
    --cc=pbonzini@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).