From patchwork Wed May 8 17:44:55 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= X-Patchwork-Id: 795505 Delivered-To: patch@linaro.org Received: by 2002:a5d:525c:0:b0:34e:ceec:bfcd with SMTP id k28csp904086wrc; Wed, 8 May 2024 10:49:15 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCXdXHbBFOD4cRVIIeTuR9nN/Qns9C5Mm1Tdp961GisE8B8IX0phGHHUhY3UCOupu02+sxWnkmONDDmK6QxYpM6L X-Google-Smtp-Source: AGHT+IEkD6ltFyqXM2ASbnvB/h07ficnFEtuBZzBzmlqlfurTvyorOhI9gTBIYmSppRacNWblHgH X-Received: by 2002:a05:620a:2954:b0:792:909e:cc76 with SMTP id af79cd13be357-792b2852241mr387141785a.77.1715190554194; Wed, 08 May 2024 10:49:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1715190554; cv=none; d=google.com; s=arc-20160816; b=pbDPDrun1HGPXj1PdsR9CVf+oyz8IAycavCqg8MzrBj1402j8kgfD0YqlcVDfu/zWt EB2FX6gRZC4jia0RUMUDMffq6IYHalr73xk9D80/rtbcpPJKdRonXL5/s32pa0Y909cf vMjR2ayan6ZxuHBGQzJk/BzpIkboZ+VomcP9iuGfs/309FylMjjVeMwMpR1pZTsUcNwS Pwllk9diR8uePvVlP+gpw0GmDtnI87Lvj3V3u2O3fKAisZt3Lg8X6I4rFmswJQiie6MS ++gWwAQ8j5NAmjrKsX2upNDuTcLs9u3Ndkv6Mktrfkkgail0Cit9kzx7h9gGlE8WTw/r pu9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=6stDyKXFGIAMi9PnetBYz+6nX0n+ya95MLEN0LwCIIY=; fh=qi6M7+758Hm8qfC4GxHVnK55oMKkCiFOk69X0Z7vtIs=; b=WBcEJgiFURQ+KhO02Q6sHTQTrU4eHB7KT8y9DZmi1G4+lsehSpzvzHl4rhRsPtg0PT qs1mZOjDcyXoTI+H13E7r9lGkhnRu6I9lbal/rxZV2GyVtoQ1gsRCWdhkPfNe1Ks81/V S1QlCSwhf9WnPSf0R2rwMcB/su7qwgTSKTSaQnoBbAySQkvntGaW/BDAn1K7TIf3YcSh wyh39ToepZMtEQBE3nnSUfQxRCkyBqr9GvalYSL4/oEtU++/maz+oZStBLh9gpxXkz6X iNs+nbmJlORYtTBLWl+RITGdDTQxLL/k2m427VjcR5ET0IpLyYIgmCkKmJSduTix6UxA +LMA==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eB0B7BxS; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id bi39-20020a05620a31a700b0078ede2c40d0si11284268qkb.740.2024.05.08.10.49.14 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 08 May 2024 10:49:14 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=eB0B7BxS; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1s4lNL-0001Ix-6V; Wed, 08 May 2024 13:46:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1s4lMw-0000ZY-RS for qemu-devel@nongnu.org; Wed, 08 May 2024 13:46:22 -0400 Received: from mail-lf1-x12c.google.com ([2a00:1450:4864:20::12c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1s4lMu-0007fK-18 for qemu-devel@nongnu.org; Wed, 08 May 2024 13:46:17 -0400 Received: by mail-lf1-x12c.google.com with SMTP id 2adb3069b0e04-51fdc9af005so7098907e87.3 for ; Wed, 08 May 2024 10:46:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1715190373; x=1715795173; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=6stDyKXFGIAMi9PnetBYz+6nX0n+ya95MLEN0LwCIIY=; b=eB0B7BxStzHWRsMhXhbLNWbrDUoA4Xo0mGw2OpZWyUNfFJOLbHmCVVgVVMdHs/F+do PNjxaq6pGdBnEg3vLoE4QbaU1TRHdKimXUzLJgBcC//BDXS54ZpKbT688O1Ug96uI5lN HU3GEXVG0Dvp6XdIopn66w2lGxPntERwLRUU8rt6U93pjx35LrOH0uxf0DCJx6XAOxEo edh76BGFmirj3JtPml/5Uop2e+N+EBjhJ5kC7LN90UARG1BS/deLZWOub6lc0Svfh1Xu zR9PYNBcaEYu0qADEe65rRszCj0yUNX6A1gH20sY0oo6s2AGX2JpKY0RZ0l71dMYTCAL kx2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715190373; x=1715795173; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6stDyKXFGIAMi9PnetBYz+6nX0n+ya95MLEN0LwCIIY=; b=B+FMn6p4mvkgVivavjjbZrWbblSsYNvWpIdykOCBvVodl8XWqv97FuuqKnAWnEESB7 YVkqqtZLUFkzOsNMLZQ8dH0lflSmOVl6pb6J55LOj2kvM1XjuFhM4VORhWwI6P3+8r2p 0eSjcQ0IPITt24kOWxbL7wTS3DI/pxaOaeTJkWrMEELAnuPnd6tj9ONJm+4AQGuHmzMp cGmfF33Zd3YzqzGD7/vuLIKGFYlaOGD1CDrfyKI30y1iB78g9mkU0CNFt4y4QH21bLvC RYB9OMLFZyG4shn2h3W7V0jpSXgULLA0ITC9m54YutN654UZsD8ZSLoJ7k/E7eAuHd9g DQLA== X-Gm-Message-State: AOJu0Yy9A9Ag/ojWRIaAgKKjN0FI4/RdeX2KUxlLJDRmazvavvZs1BQ9 2LsYNFtKbmvHQTzI4czXHZVaKXNXadGkjzb+pYkH/0BAlDXsiAInwI1jmoivdNyFKFdianCDMtH w X-Received: by 2002:ac2:5bc7:0:b0:51f:6ab6:9e5b with SMTP id 2adb3069b0e04-5217c7605e0mr2635058e87.36.1715190373527; Wed, 08 May 2024 10:46:13 -0700 (PDT) Received: from m1x-phil.lan (sar95-h02-176-184-10-250.dsl.sta.abo.bbox.fr. [176.184.10.250]) by smtp.gmail.com with ESMTPSA id wk16-20020a170907055000b00a59db6e54e2sm3290909ejb.85.2024.05.08.10.46.12 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 08 May 2024 10:46:13 -0700 (PDT) From: =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Thomas Huth , =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= Subject: [PULL 11/26] hw/i386: Add the possibility to use i440fx and isapc without FDC Date: Wed, 8 May 2024 19:44:55 +0200 Message-ID: <20240508174510.60470-12-philmd@linaro.org> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20240508174510.60470-1-philmd@linaro.org> References: <20240508174510.60470-1-philmd@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::12c; envelope-from=philmd@linaro.org; helo=mail-lf1-x12c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: qemu-devel-bounces+patch=linaro.org@nongnu.org From: Thomas Huth The i440fx and the isapc machines can be used in binaries without FDC, too. We just have to make sure that they don't try to instantiate the FDC when it is not available. Signed-off-by: Thomas Huth Acked-by: Philippe Mathieu-Daudé Message-ID: <20240425184315.553329-4-thuth@redhat.com> Signed-off-by: Philippe Mathieu-Daudé --- hw/i386/pc_piix.c | 6 ++++-- hw/i386/Kconfig | 2 -- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 8850c49c66..99efb3c45c 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -317,8 +317,8 @@ static void pc_init1(MachineState *machine, const char *pci_type) } /* init basic PC hardware */ - pc_basic_device_init(pcms, isa_bus, x86ms->gsi, x86ms->rtc, true, - 0x4); + pc_basic_device_init(pcms, isa_bus, x86ms->gsi, x86ms->rtc, + !MACHINE_CLASS(pcmc)->no_floppy, 0x4); pc_nic_init(pcmc, isa_bus, pcms->pcibus); @@ -501,6 +501,7 @@ static void pc_i440fx_machine_options(MachineClass *m) m->default_machine_opts = "firmware=bios-256k.bin"; m->default_display = "std"; m->default_nic = "e1000"; + m->no_floppy = !module_object_class_by_name(TYPE_ISA_FDC); m->no_parallel = !module_object_class_by_name(TYPE_ISA_PARALLEL); machine_class_allow_dynamic_sysbus_dev(m, TYPE_RAMFB_DEVICE); machine_class_allow_dynamic_sysbus_dev(m, TYPE_VMBUS_BRIDGE); @@ -931,6 +932,7 @@ static void isapc_machine_options(MachineClass *m) pcmc->has_reserved_memory = false; m->default_nic = "ne2k_isa"; m->default_cpu_type = X86_CPU_TYPE_NAME("486"); + m->no_floppy = !module_object_class_by_name(TYPE_ISA_FDC); m->no_parallel = !module_object_class_by_name(TYPE_ISA_PARALLEL); } diff --git a/hw/i386/Kconfig b/hw/i386/Kconfig index 58ca8f246d..40b1e44580 100644 --- a/hw/i386/Kconfig +++ b/hw/i386/Kconfig @@ -72,7 +72,6 @@ config I440FX imply VMPORT imply VMMOUSE select ACPI_PIIX4 - select FDC_ISA select PC_PCI select PC_ACPI select PCI_I440FX @@ -88,7 +87,6 @@ config ISAPC depends on I386 imply VGA_ISA select ISA_BUS - select FDC_ISA select PC select IDE_ISA # FIXME: it is in the same file as i440fx, and does not compile