From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51696) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ya7ja-0000bC-W2 for qemu-devel@nongnu.org; Mon, 23 Mar 2015 15:09:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ya7jW-000324-Tk for qemu-devel@nongnu.org; Mon, 23 Mar 2015 15:09:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47197) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ya7jW-00031E-P1 for qemu-devel@nongnu.org; Mon, 23 Mar 2015 15:09:54 -0400 From: Markus Armbruster Date: Mon, 23 Mar 2015 20:09:47 +0100 Message-Id: <1427137790-27265-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH for-2.3 0/3] Contain drive_get() misuse List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: peter.maydell@linaro.org, pbonzini@redhat.com, peter.crosthwaite@xilinx.com, michael@walle.cc, edgar.iglesias@gmail.com Drives defined with if!=none are for board initialization to wire up. Board code calls drive_get() or similar to find them, and creates devices with their qdev drive properties set accordingly. Except a few devices go on a fishing expedition for a suitable backend instead of exposing a drive property for board code to set: they call driver_get() or drive_get_next() in their realize() or init() method. Wrong. We can't fix this in time for the release, so do the next best thing: contain the mistakes as far as possible so they don't become ABI: * Mark them all with suitable FIXME comments [PATCH 1] * sdhci-pci is new, set cannot_instantiate_with_device_add_yet to make it unavailable with -device [PATCH 2] * A few more aren't currently available with -device, set cannot_instantiate_with_device_add_yet to ensure they stay unavailable [PATCH 3] * Left alone: m25p80-generic and its derivatives, ssi-sd, pc87312 Markus Armbruster (3): hw: Mark devices misusing drive_get(), drive_get_next() FIXME sdhci: Make device "sdhci-pci" unavailable with -device sysbus: Contain drive_get_next() misuse hw/arm/spitz.c | 3 +++ hw/block/m25p80.c | 1 + hw/isa/pc87312.c | 2 ++ hw/sd/milkymist-memcard.c | 3 +++ hw/sd/pl181.c | 3 +++ hw/sd/sdhci.c | 6 ++++++ hw/sd/ssi-sd.c | 1 + 7 files changed, 19 insertions(+) -- 1.9.3