From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51503) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xinkj-00005l-H3 for qemu-devel@nongnu.org; Mon, 27 Oct 2014 13:06:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xinke-0000UR-D8 for qemu-devel@nongnu.org; Mon, 27 Oct 2014 13:06:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:46113) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xinke-0000UH-6C for qemu-devel@nongnu.org; Mon, 27 Oct 2014 13:06:40 -0400 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s9RH6di3007180 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Mon, 27 Oct 2014 13:06:39 -0400 Message-ID: <544E7B9E.20408@redhat.com> Date: Mon, 27 Oct 2014 11:06:38 -0600 From: Eric Blake MIME-Version: 1.0 References: <1414417444-32158-1-git-send-email-marcel.a@redhat.com> <20141027145233.GA20023@redhat.com> <1414422243.29756.56.camel@localhost.localdomain> <20141027160324.GC17923@redhat.com> In-Reply-To: <20141027160324.GC17923@redhat.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="EQ8VmV6xXpDUDxr67EuvOLf0VXsoM63EQ" Subject: Re: [Qemu-devel] [PATCH v2] hw/pci: fixed crash when using rombar=0 with romfile=path for hotplugged devices List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" , Marcel Apfelbaum Cc: pbonzini@redhat.com, alex.williamson@redhat.com, qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --EQ8VmV6xXpDUDxr67EuvOLf0VXsoM63EQ Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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=3D0 with romfile=3D is an user error, >>>> silently dropping the romfile is a reasonable thing to do. >>>> >>>> Signed-off-by: Marcel Apfelbaum >>> >>> 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 >=20 > 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. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --EQ8VmV6xXpDUDxr67EuvOLf0VXsoM63EQ Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg iQEcBAEBCAAGBQJUTnueAAoJEKeha0olJ0NqNNgH/3OjVYWshpP+/LdrVGhCHVTX GW/HOUjeJGYvXQqKY+nNeTQz7z/L6V5syAa9i7sGZv3j1iUt3rYR7bybzOVVeAhr M3G+ZExSHuEcSmrrQ96Jx8kH/JChzmvJaoGTnVfoxBRZUb2FTsSD6lTD176zWuOD 6ca5aXclY+90m4nbZhAtcqfwZnFSsDBwNDDg4rE3VG0yVoO7PZISB0VeXPMm95t4 igiRzNdjpTjsRLK7l3D/V3tcHH/hf/ByFiVK5kLC9BxfkJxvaqi/WWVE/ewDfrRG 8OrC5/v+BuitzS/k/A/dt1itolnP4YltDhxvD5upbpebh2JANP7LGwlxgZmEKIg= =ZxYN -----END PGP SIGNATURE----- --EQ8VmV6xXpDUDxr67EuvOLf0VXsoM63EQ--