Received: from eggs.gnu.org ([2001:4830:134:3::10]:53601) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXnZ7-0004mi-TM for qemu-devel@nongnu.org; Sat, 27 Sep 2014 04:41:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XXnZ1-0002lG-OX for qemu-devel@nongnu.org; Sat, 27 Sep 2014 04:41:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:28866) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XXnZ1-0002l0-Gu for qemu-devel@nongnu.org; Sat, 27 Sep 2014 04:41:11 -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 s8R8f5LL007329 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Sat, 27 Sep 2014 04:41:05 -0400 From: Markus Armbruster References: <1411490885-29782-1-git-send-email-jsnow@redhat.com> <1411490885-29782-5-git-send-email-jsnow@redhat.com> <87egv1ozlt.fsf@blackfin.pond.sub.org> <5422F632.1080401@redhat.com> <87h9zwdy7z.fsf@blackfin.pond.sub.org> <5425958C.1050909@redhat.com> Date: Sat, 27 Sep 2014 10:41:02 +0200 In-Reply-To: <5425958C.1050909@redhat.com> (John Snow's message of "Fri, 26 Sep 2014 12:34:20 -0400") Message-ID: <87sijd317l.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 4/6] ide: Update ide_drive_get to be HBA agnostic List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: John Snow Cc: kwolf@redhat.com, qemu-devel@nongnu.org, stefanha@redhat.com, mst@redhat.com John Snow writes: > On the subject of compatibly broken: > Is there any circumstance where the mapping has *any* effect on the > current working behavior? Since we do not support the shorthand syntax > at all currently, there is no code that USES this mapping to do > anything. > > Even if you specify -drive file=...,index=42; the -device that you > currently *must* add simply ignores any index/bus/unit mappings you've > already given the drive -- it doesn't seem to touch or use any > information within the DriveInfo structure at all. I didn't think this through, and I knew it, so I chose to err on the side of excessive caution by posing the bug-compatibility question. You're right: since -drive if=ide was ignored before, we can change the mapping. > That said, why not make this property retroactive? It won't affect anything. > > Or rather, the property alone won't. What *will* break older command > lines is the fact that we are now supporting the syntactic sugar at > all, but I think this is clearly a bug, and we should not go out of > our way to tolerate broken syntax. Agreed. > Based on the above, I think I will: > > (A) Implement the property for all versions Yes, please. > (B) Change the behavior of ide_drive_get to take the number of > elements in the array, and imply the number of buses instead. If we > decide to roll back older versions to be "compatibly broken," this > will in effect limit us to three drives instead of six (index 0, 2, > and 4) being mapped to ports 0, 1, and 2. > > This requires me touching the board init to adjust the call to > drive_get slightly. Thanks!