From nobody Sun Feb 8 19:57:48 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1644942534; cv=none; d=zohomail.com; s=zohoarc; b=dLjPT54IsTNOdUrgTeZX1N8Cbg7WA1vQ7goXdkqxfLSbeC5Melx3RrAdyHtJkZFJZ78v9VmXtFZt9qVxnrMv8In4BeE9PIimHNJafVozBVtLNpXVDkpsGUft9JW7lSRnyZf8U5LlAlgF/5JfO7K1finUyeTfjlocP+EM5t56fWc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1644942534; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=F5zVHW8Wa7G3Hzkr8Lj29+WtfvQrMl4IZkfnFMsX+ys=; b=FbHpx6dnwnGJE2+0vUBfzijwlCN83zpz8Nx0uYn5VZ9GqcLjXXNQzPjawQ2e25fVDKoIGB1fnnQpHEZohyDbm8ieuR3Bt9XcewSF5CQb+P8v/yqoUuR7u33fmOy9nhhE6gV6IbfSb2q3g92Za7A673F1mdU49CI6cyg1yo7g9eE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1644942534700212.98752673958256; Tue, 15 Feb 2022 08:28:54 -0800 (PST) Received: from localhost ([::1]:59710 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nK0hB-00067u-Na for importer@patchew.org; Tue, 15 Feb 2022 11:28:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51896) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nK0f8-0003eN-Pp for qemu-devel@nongnu.org; Tue, 15 Feb 2022 11:26:47 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:35089) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nK0f4-0001ZA-B6 for qemu-devel@nongnu.org; Tue, 15 Feb 2022 11:26:45 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-196-QPwbdCPiMtm2rkjtpx9pyA-1; Tue, 15 Feb 2022 11:26:38 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 65B778189CF; Tue, 15 Feb 2022 16:26:37 +0000 (UTC) Received: from dgilbert-t580.localhost (unknown [10.39.195.175]) by smtp.corp.redhat.com (Postfix) with ESMTP id D773710A48D8; Tue, 15 Feb 2022 16:26:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644942401; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=F5zVHW8Wa7G3Hzkr8Lj29+WtfvQrMl4IZkfnFMsX+ys=; b=bQdQgsaWyWYlT4jREVqDkt1AvBv9INxA++doKWG9TuDeJtzflsm6pnQGwFYUS6SImmQuZc +04CSv/rtwv6PFMYe+xU5ZOl3Dq5bDnJKgR86a8bUgHNeVR6VKYHlW6j5lMv1cMAOHI9Iu jYz+B8jNMLB2GcgMEVUIHHzbpSJjsBA= X-MC-Unique: QPwbdCPiMtm2rkjtpx9pyA-1 From: "Dr. David Alan Gilbert (git)" To: qemu-devel@nongnu.org, pbonzini@redhat.com, eduardo@habkost.net, mst@redhat.com, thuth@redhat.com, berrange@redhat.com, quintela@redhat.com Subject: [PATCH 1/3] tests/x86: Use 'pc' machine type for old hardware tests Date: Tue, 15 Feb 2022 16:25:31 +0000 Message-Id: <20220215162537.605030-2-dgilbert@redhat.com> In-Reply-To: <20220215162537.605030-1-dgilbert@redhat.com> References: <20220215162537.605030-1-dgilbert@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dgilbert@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=dgilbert@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.083, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1644942536368100001 Content-Type: text/plain; charset="utf-8" From: "Dr. David Alan Gilbert" For tests that rely on old hardware, e.g. floppies or IDE drives, explicitly select the 'pc' machine type. Signed-off-by: Dr. David Alan Gilbert Acked-by: Michael S. Tsirkin Reviewed-by: Thomas Huth --- tests/qtest/fdc-test.c | 2 +- tests/qtest/hd-geo-test.c | 12 +++++++++--- tests/qtest/i440fx-test.c | 2 +- tests/qtest/ide-test.c | 3 ++- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/tests/qtest/fdc-test.c b/tests/qtest/fdc-test.c index 8f6eee84a4..b0d40012e6 100644 --- a/tests/qtest/fdc-test.c +++ b/tests/qtest/fdc-test.c @@ -598,7 +598,7 @@ int main(int argc, char **argv) /* Run the tests */ g_test_init(&argc, &argv, NULL); =20 - qtest_start("-device floppy,id=3Dfloppy0"); + qtest_start("-machine pc -device floppy,id=3Dfloppy0"); qtest_irq_intercept_in(global_qtest, "ioapic"); qtest_add_func("/fdc/cmos", test_cmos); qtest_add_func("/fdc/no_media_on_start", test_no_media_on_start); diff --git a/tests/qtest/hd-geo-test.c b/tests/qtest/hd-geo-test.c index 771eaa741b..3554b5d500 100644 --- a/tests/qtest/hd-geo-test.c +++ b/tests/qtest/hd-geo-test.c @@ -178,9 +178,15 @@ static int append_arg(int argc, char *argv[], int argv= _sz, char *arg) =20 static int setup_common(char *argv[], int argv_sz) { + int new_argc; memset(cur_ide, 0, sizeof(cur_ide)); - return append_arg(0, argv, argv_sz, - g_strdup("-nodefaults")); + new_argc =3D append_arg(0, argv, argv_sz, + g_strdup("-nodefaults")); + new_argc =3D append_arg(new_argc, argv, argv_sz, + g_strdup("-machine")); + new_argc =3D append_arg(new_argc, argv, argv_sz, + g_strdup("pc")); + return new_argc; } =20 static void setup_mbr(int img_idx, MBRcontents mbr) @@ -697,7 +703,7 @@ static void test_override(TestArgs *args, CHSResult exp= ected[]) =20 joined_args =3D g_strjoinv(" ", args->argv); =20 - qts =3D qtest_init(joined_args); + qts =3D qtest_initf("-machine pc %s", joined_args); fw_cfg =3D pc_fw_cfg_init(qts); =20 read_bootdevices(fw_cfg, expected); diff --git a/tests/qtest/i440fx-test.c b/tests/qtest/i440fx-test.c index 1f57d9684b..6d7d4d8d8f 100644 --- a/tests/qtest/i440fx-test.c +++ b/tests/qtest/i440fx-test.c @@ -35,7 +35,7 @@ static QPCIBus *test_start_get_bus(const TestData *s) { char *cmdline; =20 - cmdline =3D g_strdup_printf("-smp %d", s->num_cpus); + cmdline =3D g_strdup_printf("-machine pc -smp %d", s->num_cpus); qtest_start(cmdline); g_free(cmdline); return qpci_new_pc(global_qtest, NULL); diff --git a/tests/qtest/ide-test.c b/tests/qtest/ide-test.c index 3f8081e77d..84935578fb 100644 --- a/tests/qtest/ide-test.c +++ b/tests/qtest/ide-test.c @@ -128,10 +128,11 @@ static char debug_path[] =3D "/tmp/qtest-blkdebug.XXX= XXX"; static QTestState *ide_test_start(const char *cmdline_fmt, ...) { QTestState *qts; + g_autofree char *full_fmt =3D g_strdup_printf("-machine pc %s", cmdlin= e_fmt); va_list ap; =20 va_start(ap, cmdline_fmt); - qts =3D qtest_vinitf(cmdline_fmt, ap); + qts =3D qtest_vinitf(full_fmt, ap); va_end(ap); =20 pc_alloc_init(&guest_malloc, qts, 0); --=20 2.35.1 From nobody Sun Feb 8 19:57:48 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1644942750; cv=none; d=zohomail.com; s=zohoarc; b=A3+AyUSJgOcrHPzkB4OQMLjA5MB8TR3eV6NF/lR5CGaRo0EZWLOnT0cMpeg5ImKs2hUYJt9dyqz/7ZO7LGJ8BL9LirMpUQ1X40LdZ/Yq4bmU9PdaUV9eoM5Jt8g1F/ISJfCxeDi9nAWnmAhAIK1nBiHRmjwMUEP17a5yr6yRyyY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1644942750; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=F5zVHW8Wa7G3Hzkr8Lj29+WtfvQrMl4IZkfnFMsX+ys=; b=OUQQECoDx+TUsgBz9lwI1ps5eo4L1vVH+ZjZaO9eiGLa2Z95NLbYmGJkKOuFnwLZU4RhVkngLYRlxxZVqsyfPk6RweigkaEb2skJg30jQ9LcoJ4vTcK3P3JwaDWRfgUrxr0E4vxCk47lUDfj2/FH2uWsqTca5SeseA2dwSgNSKI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1644942750355148.65274143649071; Tue, 15 Feb 2022 08:32:30 -0800 (PST) Received: from localhost ([::1]:38590 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nK0kf-0002dY-8p for importer@patchew.org; Tue, 15 Feb 2022 11:32:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51974) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nK0fI-0003lC-4M for qemu-devel@nongnu.org; Tue, 15 Feb 2022 11:26:56 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:42639) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nK0fE-0001bL-2m for qemu-devel@nongnu.org; Tue, 15 Feb 2022 11:26:55 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-344-_70nNyXLPwiot4EbcK0AJA-1; Tue, 15 Feb 2022 11:26:50 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 74339814243; Tue, 15 Feb 2022 16:26:49 +0000 (UTC) Received: from dgilbert-t580.localhost (unknown [10.39.195.175]) by smtp.corp.redhat.com (Postfix) with ESMTP id CE1A810A48D2; Tue, 15 Feb 2022 16:26:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644942411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=F5zVHW8Wa7G3Hzkr8Lj29+WtfvQrMl4IZkfnFMsX+ys=; b=ZxIuHwb8+SUEis8dS4hXWOQul0iPcmpP7VbSvUgDvo4ugNl+LJDqHJ5kErC+zCtjqUNH+I K9wYaWzyPcneLQwmciuIYw5FCKFOZLIV20JLzWKqnJyVkVLY+6cTOPB3GXkzYC5DflPNRu A06BNorvhTUvx0dBP16j47EQapRkd6U= X-MC-Unique: _70nNyXLPwiot4EbcK0AJA-1 From: "Dr. David Alan Gilbert (git)" To: qemu-devel@nongnu.org, pbonzini@redhat.com, eduardo@habkost.net, mst@redhat.com, thuth@redhat.com, berrange@redhat.com, quintela@redhat.com Subject: [PATCH 1/3] tests/x86: Use 'pc' machine type for old hardware tests Date: Tue, 15 Feb 2022 16:25:35 +0000 Message-Id: <20220215162537.605030-6-dgilbert@redhat.com> In-Reply-To: <20220215162537.605030-1-dgilbert@redhat.com> References: <20220215162537.605030-1-dgilbert@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dgilbert@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=dgilbert@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.083, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1644942752056100003 Content-Type: text/plain; charset="utf-8" From: "Dr. David Alan Gilbert" For tests that rely on old hardware, e.g. floppies or IDE drives, explicitly select the 'pc' machine type. Signed-off-by: Dr. David Alan Gilbert --- tests/qtest/fdc-test.c | 2 +- tests/qtest/hd-geo-test.c | 12 +++++++++--- tests/qtest/i440fx-test.c | 2 +- tests/qtest/ide-test.c | 3 ++- 4 files changed, 13 insertions(+), 6 deletions(-) diff --git a/tests/qtest/fdc-test.c b/tests/qtest/fdc-test.c index 8f6eee84a4..b0d40012e6 100644 --- a/tests/qtest/fdc-test.c +++ b/tests/qtest/fdc-test.c @@ -598,7 +598,7 @@ int main(int argc, char **argv) /* Run the tests */ g_test_init(&argc, &argv, NULL); =20 - qtest_start("-device floppy,id=3Dfloppy0"); + qtest_start("-machine pc -device floppy,id=3Dfloppy0"); qtest_irq_intercept_in(global_qtest, "ioapic"); qtest_add_func("/fdc/cmos", test_cmos); qtest_add_func("/fdc/no_media_on_start", test_no_media_on_start); diff --git a/tests/qtest/hd-geo-test.c b/tests/qtest/hd-geo-test.c index 771eaa741b..3554b5d500 100644 --- a/tests/qtest/hd-geo-test.c +++ b/tests/qtest/hd-geo-test.c @@ -178,9 +178,15 @@ static int append_arg(int argc, char *argv[], int argv= _sz, char *arg) =20 static int setup_common(char *argv[], int argv_sz) { + int new_argc; memset(cur_ide, 0, sizeof(cur_ide)); - return append_arg(0, argv, argv_sz, - g_strdup("-nodefaults")); + new_argc =3D append_arg(0, argv, argv_sz, + g_strdup("-nodefaults")); + new_argc =3D append_arg(new_argc, argv, argv_sz, + g_strdup("-machine")); + new_argc =3D append_arg(new_argc, argv, argv_sz, + g_strdup("pc")); + return new_argc; } =20 static void setup_mbr(int img_idx, MBRcontents mbr) @@ -697,7 +703,7 @@ static void test_override(TestArgs *args, CHSResult exp= ected[]) =20 joined_args =3D g_strjoinv(" ", args->argv); =20 - qts =3D qtest_init(joined_args); + qts =3D qtest_initf("-machine pc %s", joined_args); fw_cfg =3D pc_fw_cfg_init(qts); =20 read_bootdevices(fw_cfg, expected); diff --git a/tests/qtest/i440fx-test.c b/tests/qtest/i440fx-test.c index 1f57d9684b..6d7d4d8d8f 100644 --- a/tests/qtest/i440fx-test.c +++ b/tests/qtest/i440fx-test.c @@ -35,7 +35,7 @@ static QPCIBus *test_start_get_bus(const TestData *s) { char *cmdline; =20 - cmdline =3D g_strdup_printf("-smp %d", s->num_cpus); + cmdline =3D g_strdup_printf("-machine pc -smp %d", s->num_cpus); qtest_start(cmdline); g_free(cmdline); return qpci_new_pc(global_qtest, NULL); diff --git a/tests/qtest/ide-test.c b/tests/qtest/ide-test.c index 3f8081e77d..84935578fb 100644 --- a/tests/qtest/ide-test.c +++ b/tests/qtest/ide-test.c @@ -128,10 +128,11 @@ static char debug_path[] =3D "/tmp/qtest-blkdebug.XXX= XXX"; static QTestState *ide_test_start(const char *cmdline_fmt, ...) { QTestState *qts; + g_autofree char *full_fmt =3D g_strdup_printf("-machine pc %s", cmdlin= e_fmt); va_list ap; =20 va_start(ap, cmdline_fmt); - qts =3D qtest_vinitf(cmdline_fmt, ap); + qts =3D qtest_vinitf(full_fmt, ap); va_end(ap); =20 pc_alloc_init(&guest_malloc, qts, 0); --=20 2.35.1 From nobody Sun Feb 8 19:57:48 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1644942702; cv=none; d=zohomail.com; s=zohoarc; b=dHFBIl/deRBQgbm8zrUtgT1KteNa+cZax6YqYwVtcJF7M1G0tYFDC2/j+FvWDq+ykhPunOEuoL/O16hP/nsFhyH4Z1UGRgkd5R32tR4hmmSbKAOEkHTTfmYcNt8RlYMp30pujSzVPRIXotGNrJ0UpL3dqOcppsD2A2NJBSU7src= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1644942702; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=hCecIkSfLDbD9L4WU/0h5uVxpUqPhLXRetd8WA8JqGw=; b=TESgQjd7W1pjkxjfBodvLa9amEbfXnHTCdWBpyZiTFyWK8/dmVxxo22IyonAHD2IqOxbjS+qmQz/y96jqGaXdPRqSZr7YFmKi/ApRfkDqkKf6k/jM3EnB1XOGpGgpm+oZiKgeTyxzl/B2/INtKppdyeSa4ZX4OfTvh3rnvM8nKw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1644942702235786.2147825381311; Tue, 15 Feb 2022 08:31:42 -0800 (PST) Received: from localhost ([::1]:38102 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nK0js-0002Io-UI for importer@patchew.org; Tue, 15 Feb 2022 11:31:40 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51912) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nK0f8-0003fC-I4 for qemu-devel@nongnu.org; Tue, 15 Feb 2022 11:26:47 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:60591) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nK0f6-0001a8-0O for qemu-devel@nongnu.org; Tue, 15 Feb 2022 11:26:46 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-327-M73fEd_qOlOgwcs1i3uHrA-1; Tue, 15 Feb 2022 11:26:40 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 41EDB1091DA0; Tue, 15 Feb 2022 16:26:39 +0000 (UTC) Received: from dgilbert-t580.localhost (unknown [10.39.195.175]) by smtp.corp.redhat.com (Postfix) with ESMTP id B338910A48D2; Tue, 15 Feb 2022 16:26:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644942403; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hCecIkSfLDbD9L4WU/0h5uVxpUqPhLXRetd8WA8JqGw=; b=Pj56V35LM0eOtXVuqjUbSh3slhEQTKhX0ecou04SuVTLuShEbEhiiPp6mn6+x6LrmcCQku PxnejvmaeCEcV5Uno43czDn7xVf91mOEogtWRPwDqSUgnU3C92khbkZtbAAuW0JbQO38Dx RIwayhQsJIJYCfcuCvRYubeC7S34X+8= X-MC-Unique: M73fEd_qOlOgwcs1i3uHrA-1 From: "Dr. David Alan Gilbert (git)" To: qemu-devel@nongnu.org, pbonzini@redhat.com, eduardo@habkost.net, mst@redhat.com, thuth@redhat.com, berrange@redhat.com, quintela@redhat.com Subject: [PATCH 2/3] tests/x86: Use 'pc' machine type for hotplug tests Date: Tue, 15 Feb 2022 16:25:32 +0000 Message-Id: <20220215162537.605030-3-dgilbert@redhat.com> In-Reply-To: <20220215162537.605030-1-dgilbert@redhat.com> References: <20220215162537.605030-1-dgilbert@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dgilbert@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=dgilbert@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.083, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1644942703887100001 Content-Type: text/plain; charset="utf-8" From: "Dr. David Alan Gilbert" Hotplug tests need a bridge setting up on q35, for now keep them on 'pc'. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Thomas Huth --- tests/qtest/device-plug-test.c | 20 +++++++++++++++++-- tests/qtest/drive_del-test.c | 35 +++++++++++++++++++++++++++++----- tests/qtest/hd-geo-test.c | 4 ++-- tests/qtest/ivshmem-test.c | 7 ++++++- 4 files changed, 56 insertions(+), 10 deletions(-) diff --git a/tests/qtest/device-plug-test.c b/tests/qtest/device-plug-test.c index ad79bd4c14..404a92e132 100644 --- a/tests/qtest/device-plug-test.c +++ b/tests/qtest/device-plug-test.c @@ -63,7 +63,15 @@ static void wait_device_deleted_event(QTestState *qtest,= const char *id) =20 static void test_pci_unplug_request(void) { - QTestState *qtest =3D qtest_initf("-device virtio-mouse-pci,id=3Ddev0"= ); + const char *arch =3D qtest_get_arch(); + const char *machine_addition =3D ""; + + if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { + machine_addition =3D "-machine pc"; + } + + QTestState *qtest =3D qtest_initf("%s -device virtio-mouse-pci,id=3Dde= v0", + machine_addition); =20 /* * Request device removal. As the guest is not running, the request wo= n't @@ -79,8 +87,16 @@ static void test_pci_unplug_request(void) =20 static void test_pci_unplug_json_request(void) { + const char *arch =3D qtest_get_arch(); + const char *machine_addition =3D ""; + + if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { + machine_addition =3D "-machine pc"; + } + QTestState *qtest =3D qtest_initf( - "-device '{\"driver\": \"virtio-mouse-pci\", \"id\": \"dev0\"}'"); + "%s -device '{\"driver\": \"virtio-mouse-pci\", \"id\": \"dev0\"}'= ", + machine_addition); =20 /* * Request device removal. As the guest is not running, the request wo= n't diff --git a/tests/qtest/drive_del-test.c b/tests/qtest/drive_del-test.c index 8d08ee9995..0cc18dfa4a 100644 --- a/tests/qtest/drive_del-test.c +++ b/tests/qtest/drive_del-test.c @@ -235,14 +235,21 @@ static void test_drive_del_device_del(void) static void test_cli_device_del(void) { QTestState *qts; + const char *arch =3D qtest_get_arch(); + const char *machine_addition =3D ""; + + if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { + machine_addition =3D "-machine pc"; + } =20 /* * -drive/-device and device_del. Start with a drive used by a * device that unplugs after reset. */ - qts =3D qtest_initf("-drive if=3Dnone,id=3Ddrive0,file=3Dnull-co://," + qts =3D qtest_initf("%s -drive if=3Dnone,id=3Ddrive0,file=3Dnull-co://= ," "file.read-zeroes=3Don,format=3Draw" " -device virtio-blk-%s,drive=3Ddrive0,id=3Ddev0", + machine_addition, qvirtio_get_dev_type()); =20 device_del(qts, true); @@ -266,13 +273,19 @@ static void test_empty_device_del(void) static void test_device_add_and_del(void) { QTestState *qts; + const char *arch =3D qtest_get_arch(); + const char *machine_addition =3D ""; + + if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { + machine_addition =3D "-machine pc"; + } =20 /* * -drive/device_add and device_del. Start with a drive used by a * device that unplugs after reset. */ - qts =3D qtest_init("-drive if=3Dnone,id=3Ddrive0,file=3Dnull-co://," - "file.read-zeroes=3Don,format=3Draw"); + qts =3D qtest_initf("%s -drive if=3Dnone,id=3Ddrive0,file=3Dnull-co://= ," + "file.read-zeroes=3Don,format=3Draw", machine_additio= n); =20 device_add(qts); device_del(qts, true); @@ -284,8 +297,14 @@ static void test_device_add_and_del(void) static void test_drive_add_device_add_and_del(void) { QTestState *qts; + const char *arch =3D qtest_get_arch(); + const char *machine_addition =3D ""; + + if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { + machine_addition =3D "-machine pc"; + } =20 - qts =3D qtest_init(""); + qts =3D qtest_init(machine_addition); =20 /* * drive_add/device_add and device_del. The drive is used by a @@ -302,8 +321,14 @@ static void test_drive_add_device_add_and_del(void) static void test_blockdev_add_device_add_and_del(void) { QTestState *qts; + const char *arch =3D qtest_get_arch(); + const char *machine_addition =3D ""; + + if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { + machine_addition =3D "-machine pc"; + } =20 - qts =3D qtest_init(""); + qts =3D qtest_init(machine_addition); =20 /* * blockdev_add/device_add and device_del. The it drive is used by a diff --git a/tests/qtest/hd-geo-test.c b/tests/qtest/hd-geo-test.c index 3554b5d500..64023c0574 100644 --- a/tests/qtest/hd-geo-test.c +++ b/tests/qtest/hd-geo-test.c @@ -839,7 +839,7 @@ static void test_override_scsi_hot_unplug(void) =20 joined_args =3D g_strjoinv(" ", args->argv); =20 - qts =3D qtest_init(joined_args); + qts =3D qtest_initf("-machine pc %s", joined_args); fw_cfg =3D pc_fw_cfg_init(qts); =20 read_bootdevices(fw_cfg, expected); @@ -899,7 +899,7 @@ static void test_override_virtio_hot_unplug(void) =20 joined_args =3D g_strjoinv(" ", args->argv); =20 - qts =3D qtest_init(joined_args); + qts =3D qtest_initf("-machine pc %s", joined_args); fw_cfg =3D pc_fw_cfg_init(qts); =20 read_bootdevices(fw_cfg, expected); diff --git a/tests/qtest/ivshmem-test.c b/tests/qtest/ivshmem-test.c index fe94dd3b96..4e8af42a9d 100644 --- a/tests/qtest/ivshmem-test.c +++ b/tests/qtest/ivshmem-test.c @@ -385,7 +385,12 @@ static void test_ivshmem_hotplug(void) QTestState *qts; const char *arch =3D qtest_get_arch(); =20 - qts =3D qtest_init("-object memory-backend-ram,size=3D1M,id=3Dmb1"); + if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { + qts =3D qtest_init("-object memory-backend-ram,size=3D1M,id=3Dmb1" + " -machine pc"); + } else { + qts =3D qtest_init("-object memory-backend-ram,size=3D1M,id=3Dmb1"= ); + } =20 qtest_qmp_device_add(qts, "ivshmem-plain", "iv1", "{'addr': %s, 'memdev': 'mb1'}", --=20 2.35.1 From nobody Sun Feb 8 19:57:48 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1644942881; cv=none; d=zohomail.com; s=zohoarc; b=VcmgQpTMj2qT2qwRnH/Y9JkFqCmmWB5nMf36CyCQqU/z1L4B2zV8Kd2fdqzDuLk/hMqCyqF4UBgUNnnsdex9W1N7rV4vWCMWKycArGhIn4Vvbci0Rv7JkPaAMjgQq+DzKoFqZgYv8g9YWhnOplrv6hkqCiBJk3zHycwYFVZ95EY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1644942881; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=hCecIkSfLDbD9L4WU/0h5uVxpUqPhLXRetd8WA8JqGw=; b=NDvMFjLK5wnw3RIOha5eV0mvLeOviGmBuezmNL/76Q7+H1RETL3/9hCl/cN1PDYEomrqW/cA2uuKe0UeOw97tNJitR0YtUQpXCYRMIDBz2gtB4E4c1jaLLSK6q+nKHPwqCPis+w48WPIy8EgUaVZTyA/P5NCUlvRdlwAmsunrM8= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1644942881539668.0695685820187; Tue, 15 Feb 2022 08:34:41 -0800 (PST) Received: from localhost ([::1]:43520 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nK0mm-00061z-Gd for importer@patchew.org; Tue, 15 Feb 2022 11:34:40 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52000) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nK0fM-0003xs-TJ for qemu-devel@nongnu.org; Tue, 15 Feb 2022 11:27:00 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:58861) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nK0fK-0001ch-It for qemu-devel@nongnu.org; Tue, 15 Feb 2022 11:27:00 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-511-ENjzx1-tP7uOAhXzFFD7Wg-1; Tue, 15 Feb 2022 11:26:56 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E3951814243; Tue, 15 Feb 2022 16:26:55 +0000 (UTC) Received: from dgilbert-t580.localhost (unknown [10.39.195.175]) by smtp.corp.redhat.com (Postfix) with ESMTP id ABEC810A48CD; Tue, 15 Feb 2022 16:26:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644942418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=hCecIkSfLDbD9L4WU/0h5uVxpUqPhLXRetd8WA8JqGw=; b=PQAvYHUTUcxsjxMaX7BWf39JDWkpnPQ/2hzQ4puj3Tt8MTSKAke/Y8bpqIY92zZazUa85R EMVv789PBIgiqgKRt3PFGWDwXutrYNbQOmRnZBft5ZE5NUoZ7TIOQh+cDIrxae2qhd9UsR lCdOpTMqjnpWrXYw+LCTOjvaMCYrV4g= X-MC-Unique: ENjzx1-tP7uOAhXzFFD7Wg-1 From: "Dr. David Alan Gilbert (git)" To: qemu-devel@nongnu.org, pbonzini@redhat.com, eduardo@habkost.net, mst@redhat.com, thuth@redhat.com, berrange@redhat.com, quintela@redhat.com Subject: [PATCH 2/3] tests/x86: Use 'pc' machine type for hotplug tests Date: Tue, 15 Feb 2022 16:25:36 +0000 Message-Id: <20220215162537.605030-7-dgilbert@redhat.com> In-Reply-To: <20220215162537.605030-1-dgilbert@redhat.com> References: <20220215162537.605030-1-dgilbert@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dgilbert@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=dgilbert@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.083, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1644942883051100001 Content-Type: text/plain; charset="utf-8" From: "Dr. David Alan Gilbert" Hotplug tests need a bridge setting up on q35, for now keep them on 'pc'. Signed-off-by: Dr. David Alan Gilbert --- tests/qtest/device-plug-test.c | 20 +++++++++++++++++-- tests/qtest/drive_del-test.c | 35 +++++++++++++++++++++++++++++----- tests/qtest/hd-geo-test.c | 4 ++-- tests/qtest/ivshmem-test.c | 7 ++++++- 4 files changed, 56 insertions(+), 10 deletions(-) diff --git a/tests/qtest/device-plug-test.c b/tests/qtest/device-plug-test.c index ad79bd4c14..404a92e132 100644 --- a/tests/qtest/device-plug-test.c +++ b/tests/qtest/device-plug-test.c @@ -63,7 +63,15 @@ static void wait_device_deleted_event(QTestState *qtest,= const char *id) =20 static void test_pci_unplug_request(void) { - QTestState *qtest =3D qtest_initf("-device virtio-mouse-pci,id=3Ddev0"= ); + const char *arch =3D qtest_get_arch(); + const char *machine_addition =3D ""; + + if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { + machine_addition =3D "-machine pc"; + } + + QTestState *qtest =3D qtest_initf("%s -device virtio-mouse-pci,id=3Dde= v0", + machine_addition); =20 /* * Request device removal. As the guest is not running, the request wo= n't @@ -79,8 +87,16 @@ static void test_pci_unplug_request(void) =20 static void test_pci_unplug_json_request(void) { + const char *arch =3D qtest_get_arch(); + const char *machine_addition =3D ""; + + if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { + machine_addition =3D "-machine pc"; + } + QTestState *qtest =3D qtest_initf( - "-device '{\"driver\": \"virtio-mouse-pci\", \"id\": \"dev0\"}'"); + "%s -device '{\"driver\": \"virtio-mouse-pci\", \"id\": \"dev0\"}'= ", + machine_addition); =20 /* * Request device removal. As the guest is not running, the request wo= n't diff --git a/tests/qtest/drive_del-test.c b/tests/qtest/drive_del-test.c index 8d08ee9995..0cc18dfa4a 100644 --- a/tests/qtest/drive_del-test.c +++ b/tests/qtest/drive_del-test.c @@ -235,14 +235,21 @@ static void test_drive_del_device_del(void) static void test_cli_device_del(void) { QTestState *qts; + const char *arch =3D qtest_get_arch(); + const char *machine_addition =3D ""; + + if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { + machine_addition =3D "-machine pc"; + } =20 /* * -drive/-device and device_del. Start with a drive used by a * device that unplugs after reset. */ - qts =3D qtest_initf("-drive if=3Dnone,id=3Ddrive0,file=3Dnull-co://," + qts =3D qtest_initf("%s -drive if=3Dnone,id=3Ddrive0,file=3Dnull-co://= ," "file.read-zeroes=3Don,format=3Draw" " -device virtio-blk-%s,drive=3Ddrive0,id=3Ddev0", + machine_addition, qvirtio_get_dev_type()); =20 device_del(qts, true); @@ -266,13 +273,19 @@ static void test_empty_device_del(void) static void test_device_add_and_del(void) { QTestState *qts; + const char *arch =3D qtest_get_arch(); + const char *machine_addition =3D ""; + + if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { + machine_addition =3D "-machine pc"; + } =20 /* * -drive/device_add and device_del. Start with a drive used by a * device that unplugs after reset. */ - qts =3D qtest_init("-drive if=3Dnone,id=3Ddrive0,file=3Dnull-co://," - "file.read-zeroes=3Don,format=3Draw"); + qts =3D qtest_initf("%s -drive if=3Dnone,id=3Ddrive0,file=3Dnull-co://= ," + "file.read-zeroes=3Don,format=3Draw", machine_additio= n); =20 device_add(qts); device_del(qts, true); @@ -284,8 +297,14 @@ static void test_device_add_and_del(void) static void test_drive_add_device_add_and_del(void) { QTestState *qts; + const char *arch =3D qtest_get_arch(); + const char *machine_addition =3D ""; + + if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { + machine_addition =3D "-machine pc"; + } =20 - qts =3D qtest_init(""); + qts =3D qtest_init(machine_addition); =20 /* * drive_add/device_add and device_del. The drive is used by a @@ -302,8 +321,14 @@ static void test_drive_add_device_add_and_del(void) static void test_blockdev_add_device_add_and_del(void) { QTestState *qts; + const char *arch =3D qtest_get_arch(); + const char *machine_addition =3D ""; + + if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { + machine_addition =3D "-machine pc"; + } =20 - qts =3D qtest_init(""); + qts =3D qtest_init(machine_addition); =20 /* * blockdev_add/device_add and device_del. The it drive is used by a diff --git a/tests/qtest/hd-geo-test.c b/tests/qtest/hd-geo-test.c index 3554b5d500..64023c0574 100644 --- a/tests/qtest/hd-geo-test.c +++ b/tests/qtest/hd-geo-test.c @@ -839,7 +839,7 @@ static void test_override_scsi_hot_unplug(void) =20 joined_args =3D g_strjoinv(" ", args->argv); =20 - qts =3D qtest_init(joined_args); + qts =3D qtest_initf("-machine pc %s", joined_args); fw_cfg =3D pc_fw_cfg_init(qts); =20 read_bootdevices(fw_cfg, expected); @@ -899,7 +899,7 @@ static void test_override_virtio_hot_unplug(void) =20 joined_args =3D g_strjoinv(" ", args->argv); =20 - qts =3D qtest_init(joined_args); + qts =3D qtest_initf("-machine pc %s", joined_args); fw_cfg =3D pc_fw_cfg_init(qts); =20 read_bootdevices(fw_cfg, expected); diff --git a/tests/qtest/ivshmem-test.c b/tests/qtest/ivshmem-test.c index fe94dd3b96..4e8af42a9d 100644 --- a/tests/qtest/ivshmem-test.c +++ b/tests/qtest/ivshmem-test.c @@ -385,7 +385,12 @@ static void test_ivshmem_hotplug(void) QTestState *qts; const char *arch =3D qtest_get_arch(); =20 - qts =3D qtest_init("-object memory-backend-ram,size=3D1M,id=3Dmb1"); + if (strcmp(arch, "i386") =3D=3D 0 || strcmp(arch, "x86_64") =3D=3D 0) { + qts =3D qtest_init("-object memory-backend-ram,size=3D1M,id=3Dmb1" + " -machine pc"); + } else { + qts =3D qtest_init("-object memory-backend-ram,size=3D1M,id=3Dmb1"= ); + } =20 qtest_qmp_device_add(qts, "ivshmem-plain", "iv1", "{'addr': %s, 'memdev': 'mb1'}", --=20 2.35.1 From nobody Sun Feb 8 19:57:48 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1644942558; cv=none; d=zohomail.com; s=zohoarc; b=P28NN5ThXzCPAL3mM1Y9+ExMfOZ3KbX9DWnWPaErFZxu13P3vcSSadBW6ozIqbtITQs+0NmNmbz6ZlEeTApW23AtsIw4IK2mqHEKGN7FwWGcQaBp64RCpS+G45MTJYcwuNe8gHGLpfW12vmYvYPqKAjQ0wfbqf1TFC8DJXifnvo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1644942558; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5jI9pWeGRC+NCecONkAqQzwBbY8Az7U40BhcS6Z4hps=; b=kA9MEuI6hxAVCAgcKiritK4jElJLb0/4S5HvBZCLuhVKBxwI5qYYx8/C/82EzS8a8d5GKRUHk3EmtNAubXlBU+LdkD4thBF2mT7YfOQrY0BpAlxPIzniXIyTGdutvS4e/ZGtx9xABfgRDny7uSxk5zqmV0qxpPBbY5I51xqBWLc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1644942558321947.9178539463708; Tue, 15 Feb 2022 08:29:18 -0800 (PST) Received: from localhost ([::1]:60052 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nK0hX-0006ME-H9 for importer@patchew.org; Tue, 15 Feb 2022 11:29:16 -0500 Received: from eggs.gnu.org ([209.51.188.92]:51954) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nK0fG-0003iz-2s for qemu-devel@nongnu.org; Tue, 15 Feb 2022 11:26:54 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:48598) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nK0fD-0001bH-N0 for qemu-devel@nongnu.org; Tue, 15 Feb 2022 11:26:53 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-317-Hq07yqdNPLubMouiUB3pHQ-1; Tue, 15 Feb 2022 11:26:46 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id A307E1091DA0; Tue, 15 Feb 2022 16:26:45 +0000 (UTC) Received: from dgilbert-t580.localhost (unknown [10.39.195.175]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8F86510A48D8; Tue, 15 Feb 2022 16:26:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644942410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5jI9pWeGRC+NCecONkAqQzwBbY8Az7U40BhcS6Z4hps=; b=Kig3tMwPplQBhSuOwC6IKe53ese38xIRvAfabuiO36C1mhq6gt+GXSDu8OBy9r3OOjjiOu SjJCpvxUIizWWz9963oJRA+gpp6c7rqAJmRGuBzIIteo5oJEMW0wKvT0snc7wd+GQZwzWC 19C9TyF2h2krZwU7CZTdMeVKJVrFqmQ= X-MC-Unique: Hq07yqdNPLubMouiUB3pHQ-1 From: "Dr. David Alan Gilbert (git)" To: qemu-devel@nongnu.org, pbonzini@redhat.com, eduardo@habkost.net, mst@redhat.com, thuth@redhat.com, berrange@redhat.com, quintela@redhat.com Subject: [PATCH 3/3] x86: Switch to q35 as the default machine type Date: Tue, 15 Feb 2022 16:25:33 +0000 Message-Id: <20220215162537.605030-4-dgilbert@redhat.com> In-Reply-To: <20220215162537.605030-1-dgilbert@redhat.com> References: <20220215162537.605030-1-dgilbert@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dgilbert@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=dgilbert@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.083, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1644942560121100001 Content-Type: text/plain; charset="utf-8" From: "Dr. David Alan Gilbert" The 'q35' machine type series has been around for a few years now, and is getting heavily used downstream without many problems; lets flip to using it as the default. While it is of course newer and shinier than it's old i440fx cousin, the main reasons are: * PCIe support * No default floppy or IDE * More modern defaults for NIC * Better OVMF support Signed-off-by: Dr. David Alan Gilbert --- hw/i386/pc_piix.c | 12 +----------- hw/i386/pc_q35.c | 2 ++ 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index d9b344248d..50c7e6c2c0 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -420,7 +420,7 @@ static void pc_i440fx_7_0_machine_options(MachineClass = *m) PCMachineClass *pcmc =3D PC_MACHINE_CLASS(m); pc_i440fx_machine_options(m); m->alias =3D "pc"; - m->is_default =3D true; + m->is_default =3D false; pcmc->default_cpu_version =3D 1; } =20 @@ -431,7 +431,6 @@ static void pc_i440fx_6_2_machine_options(MachineClass = *m) { pc_i440fx_7_0_machine_options(m); m->alias =3D NULL; - m->is_default =3D false; compat_props_add(m->compat_props, hw_compat_6_2, hw_compat_6_2_len); compat_props_add(m->compat_props, pc_compat_6_2, pc_compat_6_2_len); } @@ -443,7 +442,6 @@ static void pc_i440fx_6_1_machine_options(MachineClass = *m) { pc_i440fx_6_2_machine_options(m); m->alias =3D NULL; - m->is_default =3D false; compat_props_add(m->compat_props, hw_compat_6_1, hw_compat_6_1_len); compat_props_add(m->compat_props, pc_compat_6_1, pc_compat_6_1_len); m->smp_props.prefer_sockets =3D true; @@ -456,7 +454,6 @@ static void pc_i440fx_6_0_machine_options(MachineClass = *m) { pc_i440fx_6_1_machine_options(m); m->alias =3D NULL; - m->is_default =3D false; compat_props_add(m->compat_props, hw_compat_6_0, hw_compat_6_0_len); compat_props_add(m->compat_props, pc_compat_6_0, pc_compat_6_0_len); } @@ -468,7 +465,6 @@ static void pc_i440fx_5_2_machine_options(MachineClass = *m) { pc_i440fx_6_0_machine_options(m); m->alias =3D NULL; - m->is_default =3D false; compat_props_add(m->compat_props, hw_compat_5_2, hw_compat_5_2_len); compat_props_add(m->compat_props, pc_compat_5_2, pc_compat_5_2_len); } @@ -482,7 +478,6 @@ static void pc_i440fx_5_1_machine_options(MachineClass = *m) =20 pc_i440fx_5_2_machine_options(m); m->alias =3D NULL; - m->is_default =3D false; compat_props_add(m->compat_props, hw_compat_5_1, hw_compat_5_1_len); compat_props_add(m->compat_props, pc_compat_5_1, pc_compat_5_1_len); pcmc->kvmclock_create_always =3D false; @@ -496,7 +491,6 @@ static void pc_i440fx_5_0_machine_options(MachineClass = *m) { pc_i440fx_5_1_machine_options(m); m->alias =3D NULL; - m->is_default =3D false; m->numa_mem_supported =3D true; compat_props_add(m->compat_props, hw_compat_5_0, hw_compat_5_0_len); compat_props_add(m->compat_props, pc_compat_5_0, pc_compat_5_0_len); @@ -510,7 +504,6 @@ static void pc_i440fx_4_2_machine_options(MachineClass = *m) { pc_i440fx_5_0_machine_options(m); m->alias =3D NULL; - m->is_default =3D false; compat_props_add(m->compat_props, hw_compat_4_2, hw_compat_4_2_len); compat_props_add(m->compat_props, pc_compat_4_2, pc_compat_4_2_len); } @@ -522,7 +515,6 @@ static void pc_i440fx_4_1_machine_options(MachineClass = *m) { pc_i440fx_4_2_machine_options(m); m->alias =3D NULL; - m->is_default =3D false; compat_props_add(m->compat_props, hw_compat_4_1, hw_compat_4_1_len); compat_props_add(m->compat_props, pc_compat_4_1, pc_compat_4_1_len); } @@ -535,7 +527,6 @@ static void pc_i440fx_4_0_machine_options(MachineClass = *m) PCMachineClass *pcmc =3D PC_MACHINE_CLASS(m); pc_i440fx_4_1_machine_options(m); m->alias =3D NULL; - m->is_default =3D false; pcmc->default_cpu_version =3D CPU_VERSION_LEGACY; compat_props_add(m->compat_props, hw_compat_4_0, hw_compat_4_0_len); compat_props_add(m->compat_props, pc_compat_4_0, pc_compat_4_0_len); @@ -549,7 +540,6 @@ static void pc_i440fx_3_1_machine_options(MachineClass = *m) PCMachineClass *pcmc =3D PC_MACHINE_CLASS(m); =20 pc_i440fx_4_0_machine_options(m); - m->is_default =3D false; pcmc->do_not_add_smb_acpi =3D true; m->smbus_no_migration_support =3D true; m->alias =3D NULL; diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 1780f79bc1..aec4e09c9f 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -365,6 +365,7 @@ static void pc_q35_7_0_machine_options(MachineClass *m) PCMachineClass *pcmc =3D PC_MACHINE_CLASS(m); pc_q35_machine_options(m); m->alias =3D "q35"; + m->is_default =3D true; pcmc->default_cpu_version =3D 1; } =20 @@ -375,6 +376,7 @@ static void pc_q35_6_2_machine_options(MachineClass *m) { pc_q35_7_0_machine_options(m); m->alias =3D NULL; + m->is_default =3D false; compat_props_add(m->compat_props, hw_compat_6_2, hw_compat_6_2_len); compat_props_add(m->compat_props, pc_compat_6_2, pc_compat_6_2_len); } --=20 2.35.1 From nobody Sun Feb 8 19:57:48 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1644943033; cv=none; d=zohomail.com; s=zohoarc; b=Ym+KCI1eluFQ3U4mN3A3s4nFHSGUIYoZXyenCIwzAEFZXAw0WSzlltIgFaR923J7R2/AdHZV9gS5P3W090QYR1tyDmfSVcTUgE8WYLQCqSmPQ4U/d0WAaSManUf1ckg11lTxDHoeCOeCpqTB3hNdr5uAnO9QgxkxYre7dA0+8EM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1644943033; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=5jI9pWeGRC+NCecONkAqQzwBbY8Az7U40BhcS6Z4hps=; b=ac6sAyexZHyTCSfHSJOoxtJHjOTExx5HaCkvmKbr9/Au6HeKHkxIEyFEAxsCDOA9v/TP2uXl/Q8NzAjfNaSOLfUjIz51ohe9HyeBGLNQYRmaOwjefXoBSpr1daKoKKbdcZX9g5RKYh4iLGzgz7Nv50bhr4aI6k7U8d5x9ipvu7g= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 164494303377375.47853261783337; Tue, 15 Feb 2022 08:37:13 -0800 (PST) Received: from localhost ([::1]:45896 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nK0pE-0007pM-FL for importer@patchew.org; Tue, 15 Feb 2022 11:37:12 -0500 Received: from eggs.gnu.org ([209.51.188.92]:52026) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nK0fQ-00047Q-Jg for qemu-devel@nongnu.org; Tue, 15 Feb 2022 11:27:05 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:48452) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nK0fO-0001fU-KP for qemu-devel@nongnu.org; Tue, 15 Feb 2022 11:27:04 -0500 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-587-tLKQJL_IMOK1nKxMp-c-IQ-1; Tue, 15 Feb 2022 11:26:58 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C22FE1091DA0; Tue, 15 Feb 2022 16:26:57 +0000 (UTC) Received: from dgilbert-t580.localhost (unknown [10.39.195.175]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3E0A610A48D2; Tue, 15 Feb 2022 16:26:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1644942422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=5jI9pWeGRC+NCecONkAqQzwBbY8Az7U40BhcS6Z4hps=; b=GB5o62902IyYT9wzvK9H/x8Q/HxSi+ZKIVWDrTO+inHpOJ1j3vg/iwU+2KimpOqHdSPiPN 9yKjQafHvBYdOwkWreTNEFKJBhqgGi2TowMmBwEINN1/C42HA7/m4TM33yoQFJxAeSUYDD OEp1ehfR7yfPCzp2QkEaz5kyKv1Mesw= X-MC-Unique: tLKQJL_IMOK1nKxMp-c-IQ-1 From: "Dr. David Alan Gilbert (git)" To: qemu-devel@nongnu.org, pbonzini@redhat.com, eduardo@habkost.net, mst@redhat.com, thuth@redhat.com, berrange@redhat.com, quintela@redhat.com Subject: [PATCH 3/3] x86: Switch to q35 as the default machine type Date: Tue, 15 Feb 2022 16:25:37 +0000 Message-Id: <20220215162537.605030-8-dgilbert@redhat.com> In-Reply-To: <20220215162537.605030-1-dgilbert@redhat.com> References: <20220215162537.605030-1-dgilbert@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dgilbert@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=dgilbert@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -28 X-Spam_score: -2.9 X-Spam_bar: -- X-Spam_report: (-2.9 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.083, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1644943034192100001 Content-Type: text/plain; charset="utf-8" From: "Dr. David Alan Gilbert" The 'q35' machine type series has been around for a few years now, and is getting heavily used downstream without many problems; lets flip to using it as the default. While it is of course newer and shinier than it's old i440fx cousin, the main reasons are: * PCIe support * No default floppy or IDE * More modern defaults for NIC * Better OVMF support Signed-off-by: Dr. David Alan Gilbert --- hw/i386/pc_piix.c | 12 +----------- hw/i386/pc_q35.c | 2 ++ 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index d9b344248d..50c7e6c2c0 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -420,7 +420,7 @@ static void pc_i440fx_7_0_machine_options(MachineClass = *m) PCMachineClass *pcmc =3D PC_MACHINE_CLASS(m); pc_i440fx_machine_options(m); m->alias =3D "pc"; - m->is_default =3D true; + m->is_default =3D false; pcmc->default_cpu_version =3D 1; } =20 @@ -431,7 +431,6 @@ static void pc_i440fx_6_2_machine_options(MachineClass = *m) { pc_i440fx_7_0_machine_options(m); m->alias =3D NULL; - m->is_default =3D false; compat_props_add(m->compat_props, hw_compat_6_2, hw_compat_6_2_len); compat_props_add(m->compat_props, pc_compat_6_2, pc_compat_6_2_len); } @@ -443,7 +442,6 @@ static void pc_i440fx_6_1_machine_options(MachineClass = *m) { pc_i440fx_6_2_machine_options(m); m->alias =3D NULL; - m->is_default =3D false; compat_props_add(m->compat_props, hw_compat_6_1, hw_compat_6_1_len); compat_props_add(m->compat_props, pc_compat_6_1, pc_compat_6_1_len); m->smp_props.prefer_sockets =3D true; @@ -456,7 +454,6 @@ static void pc_i440fx_6_0_machine_options(MachineClass = *m) { pc_i440fx_6_1_machine_options(m); m->alias =3D NULL; - m->is_default =3D false; compat_props_add(m->compat_props, hw_compat_6_0, hw_compat_6_0_len); compat_props_add(m->compat_props, pc_compat_6_0, pc_compat_6_0_len); } @@ -468,7 +465,6 @@ static void pc_i440fx_5_2_machine_options(MachineClass = *m) { pc_i440fx_6_0_machine_options(m); m->alias =3D NULL; - m->is_default =3D false; compat_props_add(m->compat_props, hw_compat_5_2, hw_compat_5_2_len); compat_props_add(m->compat_props, pc_compat_5_2, pc_compat_5_2_len); } @@ -482,7 +478,6 @@ static void pc_i440fx_5_1_machine_options(MachineClass = *m) =20 pc_i440fx_5_2_machine_options(m); m->alias =3D NULL; - m->is_default =3D false; compat_props_add(m->compat_props, hw_compat_5_1, hw_compat_5_1_len); compat_props_add(m->compat_props, pc_compat_5_1, pc_compat_5_1_len); pcmc->kvmclock_create_always =3D false; @@ -496,7 +491,6 @@ static void pc_i440fx_5_0_machine_options(MachineClass = *m) { pc_i440fx_5_1_machine_options(m); m->alias =3D NULL; - m->is_default =3D false; m->numa_mem_supported =3D true; compat_props_add(m->compat_props, hw_compat_5_0, hw_compat_5_0_len); compat_props_add(m->compat_props, pc_compat_5_0, pc_compat_5_0_len); @@ -510,7 +504,6 @@ static void pc_i440fx_4_2_machine_options(MachineClass = *m) { pc_i440fx_5_0_machine_options(m); m->alias =3D NULL; - m->is_default =3D false; compat_props_add(m->compat_props, hw_compat_4_2, hw_compat_4_2_len); compat_props_add(m->compat_props, pc_compat_4_2, pc_compat_4_2_len); } @@ -522,7 +515,6 @@ static void pc_i440fx_4_1_machine_options(MachineClass = *m) { pc_i440fx_4_2_machine_options(m); m->alias =3D NULL; - m->is_default =3D false; compat_props_add(m->compat_props, hw_compat_4_1, hw_compat_4_1_len); compat_props_add(m->compat_props, pc_compat_4_1, pc_compat_4_1_len); } @@ -535,7 +527,6 @@ static void pc_i440fx_4_0_machine_options(MachineClass = *m) PCMachineClass *pcmc =3D PC_MACHINE_CLASS(m); pc_i440fx_4_1_machine_options(m); m->alias =3D NULL; - m->is_default =3D false; pcmc->default_cpu_version =3D CPU_VERSION_LEGACY; compat_props_add(m->compat_props, hw_compat_4_0, hw_compat_4_0_len); compat_props_add(m->compat_props, pc_compat_4_0, pc_compat_4_0_len); @@ -549,7 +540,6 @@ static void pc_i440fx_3_1_machine_options(MachineClass = *m) PCMachineClass *pcmc =3D PC_MACHINE_CLASS(m); =20 pc_i440fx_4_0_machine_options(m); - m->is_default =3D false; pcmc->do_not_add_smb_acpi =3D true; m->smbus_no_migration_support =3D true; m->alias =3D NULL; diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index 1780f79bc1..aec4e09c9f 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -365,6 +365,7 @@ static void pc_q35_7_0_machine_options(MachineClass *m) PCMachineClass *pcmc =3D PC_MACHINE_CLASS(m); pc_q35_machine_options(m); m->alias =3D "q35"; + m->is_default =3D true; pcmc->default_cpu_version =3D 1; } =20 @@ -375,6 +376,7 @@ static void pc_q35_6_2_machine_options(MachineClass *m) { pc_q35_7_0_machine_options(m); m->alias =3D NULL; + m->is_default =3D false; compat_props_add(m->compat_props, hw_compat_6_2, hw_compat_6_2_len); compat_props_add(m->compat_props, pc_compat_6_2, pc_compat_6_2_len); } --=20 2.35.1