From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57478) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yy42o-0001DZ-Nn for qemu-devel@nongnu.org; Thu, 28 May 2015 16:04:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yy42n-0005jD-Pa for qemu-devel@nongnu.org; Thu, 28 May 2015 16:04:46 -0400 From: Laszlo Ersek Date: Thu, 28 May 2015 22:04:11 +0200 Message-Id: <1432843451-9653-5-git-send-email-lersek@redhat.com> In-Reply-To: <1432843451-9653-1-git-send-email-lersek@redhat.com> References: <1432843451-9653-1-git-send-email-lersek@redhat.com> Subject: [Qemu-devel] [PATCH v2 4/4] i386: drop FDC in pc-q35-2.4+ if neither it nor floppy drives are wanted List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org, lersek@redhat.com Cc: Kevin Wolf , qemu-block@nongnu.org, "Michael S. Tsirkin" , Markus Armbruster , "Gabriel L. Somlo" , Gerd Hoffmann , Paolo Bonzini , John Snow It is Very annoying to carry forward an outdatEd coNtroller with a mOdern Machine type. Hence, let us not instantiate the FDC when all of the following apply: - the machine type is pc-q35-2.4 or later, - "-device isa-fdc" is not passed on the command line (nor in the config file), - no "-drive if=floppy,..." is requested. 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 Suggested-by: Markus Armbruster Signed-off-by: Laszlo Ersek Acked-by: Paolo Bonzini --- Notes: v2: - flip no_floppy machine class setting in a separate patch hw/i386/pc_q35.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index ad014e7..671ae69 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -424,7 +424,8 @@ static void pc_q35_init_1_4(MachineState *machine) #define PC_Q35_2_4_MACHINE_OPTIONS \ PC_Q35_MACHINE_OPTIONS, \ .default_machine_opts = "firmware=bios-256k.bin", \ - .default_display = "std" + .default_display = "std", \ + .no_floppy = 1 static QEMUMachine pc_q35_machine_v2_4 = { PC_Q35_2_4_MACHINE_OPTIONS, @@ -433,7 +434,10 @@ static QEMUMachine pc_q35_machine_v2_4 = { .init = pc_q35_init, }; -#define PC_Q35_2_3_MACHINE_OPTIONS PC_Q35_2_4_MACHINE_OPTIONS +#define PC_Q35_2_3_MACHINE_OPTIONS \ + PC_Q35_MACHINE_OPTIONS, \ + .default_machine_opts = "firmware=bios-256k.bin", \ + .default_display = "std" static QEMUMachine pc_q35_machine_v2_3 = { PC_Q35_2_3_MACHINE_OPTIONS, -- 1.8.3.1