From patchwork Mon Jun 1 12:24:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Michael S. Tsirkin" X-Patchwork-Id: 478982 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:4830:134:3::11]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 6B1E8140E61 for ; Mon, 1 Jun 2015 22:53:48 +1000 (AEST) Received: from localhost ([::1]:52159 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzPDu-00053i-JN for incoming@patchwork.ozlabs.org; Mon, 01 Jun 2015 08:53:46 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34823) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzOm6-0000rB-A4 for qemu-devel@nongnu.org; Mon, 01 Jun 2015 08:25:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YzOm5-0007sM-D1 for qemu-devel@nongnu.org; Mon, 01 Jun 2015 08:25:02 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53940) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YzOlz-0007qj-LN; Mon, 01 Jun 2015 08:24:55 -0400 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (Postfix) with ESMTPS id 4F1D31BE376; Mon, 1 Jun 2015 12:24:55 +0000 (UTC) Received: from redhat.com (ovpn-116-67.ams2.redhat.com [10.36.116.67]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with SMTP id t51COoi1009725; Mon, 1 Jun 2015 08:24:51 -0400 Date: Mon, 1 Jun 2015 14:24:50 +0200 From: "Michael S. Tsirkin" To: qemu-devel@nongnu.org Message-ID: <1433161230-29421-43-git-send-email-mst@redhat.com> References: <1433161230-29421-1-git-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1433161230-29421-1-git-send-email-mst@redhat.com> X-Mutt-Fcc: =sent X-Scanned-By: MIMEDefang 2.68 on 10.5.11.27 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: Kevin Wolf , Peter Maydell , Eduardo Habkost , qemu-block@nongnu.org, Laszlo Ersek , Markus Armbruster , "Gabriel L. Somlo" , Gerd Hoffmann , Paolo Bonzini , John Snow , Richard Henderson Subject: [Qemu-devel] [PULL v2 42/60] i386/pc_q35: don't insist on board FDC if there's no default floppy X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org From: Laszlo Ersek The "no_floppy = 1" machine class setting causes "default_floppy" in main() to become zero. Consequently, default_drive() will not call drive_add() and drive_new() for IF_FLOPPY, index=0, meaning that no default floppy drive will be created for the virtual machine. In that case, board code should also not insist on the creation of the board-default FDC. The board-default FDC will still be created if the user requests a floppy drive with "-drive if=floppy". Additionally, separate FDCs can be specified manually with "-device isa-fdc". They allow the -device isa-fdc,driveA=... syntax that is more flexible than the one required by the board-default FDC: -global isa-fdc.driveA=... This patch doesn't change the behavior observably, as all Q35 machine types have "no_floppy = 0". Cc: Markus Armbruster Cc: Paolo Bonzini Cc: Gerd Hoffmann Cc: John Snow Cc: "Gabriel L. Somlo" Cc: "Michael S. Tsirkin" Cc: Kevin Wolf Cc: qemu-block@nongnu.org Signed-off-by: Laszlo Ersek Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Markus Armbruster --- hw/i386/pc_q35.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 9ca317c..9f036c8 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -89,6 +89,7 @@ static void pc_q35_init(MachineState *machine) PcGuestInfo *guest_info; ram_addr_t lowmem; DriveInfo *hd[MAX_SATA_PORTS]; + MachineClass *mc = MACHINE_GET_CLASS(machine); /* Check whether RAM fits below 4G (leaving 1/2 GByte for IO memory * and 256 Mbytes for PCI Express Enhanced Configuration Access Mapping @@ -163,7 +164,6 @@ static void pc_q35_init(MachineState *machine) guest_info->legacy_acpi_table_size = 0; if (smbios_defaults) { - MachineClass *mc = MACHINE_GET_CLASS(machine); /* These values are guest ABI, do not change */ smbios_set_defaults("QEMU", "Standard PC (Q35 + ICH9, 2009)", mc->name, smbios_legacy_mode, smbios_uuid_encoded); @@ -250,7 +250,7 @@ static void pc_q35_init(MachineState *machine) } /* init basic PC hardware */ - pc_basic_device_init(isa_bus, gsi, &rtc_state, true, &floppy, + pc_basic_device_init(isa_bus, gsi, &rtc_state, !mc->no_floppy, &floppy, (pc_machine->vmport != ON_OFF_AUTO_ON), 0xff0104); /* connect pm stuff to lpc */