From patchwork Tue Feb 15 16:25:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dr. David Alan Gilbert" X-Patchwork-Id: 12747286 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4F379C433EF for ; Tue, 15 Feb 2022 16:28:32 +0000 (UTC) Received: from localhost ([::1]:59710 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nK0gn-00067u-IC for qemu-devel@archiver.kernel.org; Tue, 15 Feb 2022 11:28:29 -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 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= 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 X-MC-Unique: QPwbdCPiMtm2rkjtpx9pyA-1 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) 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 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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 Reviewed-by: Thomas Huth Acked-by: Michael S. Tsirkin --- 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); - qtest_start("-device floppy,id=floppy0"); + qtest_start("-machine pc -device floppy,id=floppy0"); 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) 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 = append_arg(0, argv, argv_sz, + g_strdup("-nodefaults")); + new_argc = append_arg(new_argc, argv, argv_sz, + g_strdup("-machine")); + new_argc = append_arg(new_argc, argv, argv_sz, + g_strdup("pc")); + return new_argc; } static void setup_mbr(int img_idx, MBRcontents mbr) @@ -697,7 +703,7 @@ static void test_override(TestArgs *args, CHSResult expected[]) joined_args = g_strjoinv(" ", args->argv); - qts = qtest_init(joined_args); + qts = qtest_initf("-machine pc %s", joined_args); fw_cfg = pc_fw_cfg_init(qts); 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; - cmdline = g_strdup_printf("-smp %d", s->num_cpus); + cmdline = 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[] = "/tmp/qtest-blkdebug.XXXXXX"; static QTestState *ide_test_start(const char *cmdline_fmt, ...) { QTestState *qts; + g_autofree char *full_fmt = g_strdup_printf("-machine pc %s", cmdline_fmt); va_list ap; va_start(ap, cmdline_fmt); - qts = qtest_vinitf(cmdline_fmt, ap); + qts = qtest_vinitf(full_fmt, ap); va_end(ap); pc_alloc_init(&guest_malloc, qts, 0); From patchwork Tue Feb 15 16:25:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dr. David Alan Gilbert" X-Patchwork-Id: 12747289 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id EE41DC433F5 for ; Tue, 15 Feb 2022 16:31:35 +0000 (UTC) Received: from localhost ([::1]:38102 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nK0jm-0002Io-Tl for qemu-devel@archiver.kernel.org; Tue, 15 Feb 2022 11:31:34 -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 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= 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 X-MC-Unique: M73fEd_qOlOgwcs1i3uHrA-1 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) 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 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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) static void test_pci_unplug_request(void) { - QTestState *qtest = qtest_initf("-device virtio-mouse-pci,id=dev0"); + const char *arch = qtest_get_arch(); + const char *machine_addition = ""; + + if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) { + machine_addition = "-machine pc"; + } + + QTestState *qtest = qtest_initf("%s -device virtio-mouse-pci,id=dev0", + machine_addition); /* * Request device removal. As the guest is not running, the request won't @@ -79,8 +87,16 @@ static void test_pci_unplug_request(void) static void test_pci_unplug_json_request(void) { + const char *arch = qtest_get_arch(); + const char *machine_addition = ""; + + if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) { + machine_addition = "-machine pc"; + } + QTestState *qtest = qtest_initf( - "-device '{\"driver\": \"virtio-mouse-pci\", \"id\": \"dev0\"}'"); + "%s -device '{\"driver\": \"virtio-mouse-pci\", \"id\": \"dev0\"}'", + machine_addition); /* * Request device removal. As the guest is not running, the request won'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 = qtest_get_arch(); + const char *machine_addition = ""; + + if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) { + machine_addition = "-machine pc"; + } /* * -drive/-device and device_del. Start with a drive used by a * device that unplugs after reset. */ - qts = qtest_initf("-drive if=none,id=drive0,file=null-co://," + qts = qtest_initf("%s -drive if=none,id=drive0,file=null-co://," "file.read-zeroes=on,format=raw" " -device virtio-blk-%s,drive=drive0,id=dev0", + machine_addition, qvirtio_get_dev_type()); 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 = qtest_get_arch(); + const char *machine_addition = ""; + + if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) { + machine_addition = "-machine pc"; + } /* * -drive/device_add and device_del. Start with a drive used by a * device that unplugs after reset. */ - qts = qtest_init("-drive if=none,id=drive0,file=null-co://," - "file.read-zeroes=on,format=raw"); + qts = qtest_initf("%s -drive if=none,id=drive0,file=null-co://," + "file.read-zeroes=on,format=raw", machine_addition); 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 = qtest_get_arch(); + const char *machine_addition = ""; + + if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) { + machine_addition = "-machine pc"; + } - qts = qtest_init(""); + qts = qtest_init(machine_addition); /* * 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 = qtest_get_arch(); + const char *machine_addition = ""; + + if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) { + machine_addition = "-machine pc"; + } - qts = qtest_init(""); + qts = qtest_init(machine_addition); /* * 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) joined_args = g_strjoinv(" ", args->argv); - qts = qtest_init(joined_args); + qts = qtest_initf("-machine pc %s", joined_args); fw_cfg = pc_fw_cfg_init(qts); read_bootdevices(fw_cfg, expected); @@ -899,7 +899,7 @@ static void test_override_virtio_hot_unplug(void) joined_args = g_strjoinv(" ", args->argv); - qts = qtest_init(joined_args); + qts = qtest_initf("-machine pc %s", joined_args); fw_cfg = pc_fw_cfg_init(qts); 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 = qtest_get_arch(); - qts = qtest_init("-object memory-backend-ram,size=1M,id=mb1"); + if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) { + qts = qtest_init("-object memory-backend-ram,size=1M,id=mb1" + " -machine pc"); + } else { + qts = qtest_init("-object memory-backend-ram,size=1M,id=mb1"); + } qtest_qmp_device_add(qts, "ivshmem-plain", "iv1", "{'addr': %s, 'memdev': 'mb1'}", From patchwork Tue Feb 15 16:25:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Dr. David Alan Gilbert" X-Patchwork-Id: 12747288 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1639DC433F5 for ; Tue, 15 Feb 2022 16:29:00 +0000 (UTC) Received: from localhost ([::1]:60052 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nK0hG-0006ME-R0 for qemu-devel@archiver.kernel.org; Tue, 15 Feb 2022 11:28:58 -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 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= 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 X-MC-Unique: Hq07yqdNPLubMouiUB3pHQ-1 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) 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 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+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" 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 = PC_MACHINE_CLASS(m); pc_i440fx_machine_options(m); m->alias = "pc"; - m->is_default = true; + m->is_default = false; pcmc->default_cpu_version = 1; } @@ -431,7 +431,6 @@ static void pc_i440fx_6_2_machine_options(MachineClass *m) { pc_i440fx_7_0_machine_options(m); m->alias = NULL; - m->is_default = 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 = NULL; - m->is_default = 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 = true; @@ -456,7 +454,6 @@ static void pc_i440fx_6_0_machine_options(MachineClass *m) { pc_i440fx_6_1_machine_options(m); m->alias = NULL; - m->is_default = 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 = NULL; - m->is_default = 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) pc_i440fx_5_2_machine_options(m); m->alias = NULL; - m->is_default = 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 = false; @@ -496,7 +491,6 @@ static void pc_i440fx_5_0_machine_options(MachineClass *m) { pc_i440fx_5_1_machine_options(m); m->alias = NULL; - m->is_default = false; m->numa_mem_supported = 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 = NULL; - m->is_default = 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 = NULL; - m->is_default = 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 = PC_MACHINE_CLASS(m); pc_i440fx_4_1_machine_options(m); m->alias = NULL; - m->is_default = false; pcmc->default_cpu_version = 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 = PC_MACHINE_CLASS(m); pc_i440fx_4_0_machine_options(m); - m->is_default = false; pcmc->do_not_add_smb_acpi = true; m->smbus_no_migration_support = true; m->alias = 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 = PC_MACHINE_CLASS(m); pc_q35_machine_options(m); m->alias = "q35"; + m->is_default = true; pcmc->default_cpu_version = 1; } @@ -375,6 +376,7 @@ static void pc_q35_6_2_machine_options(MachineClass *m) { pc_q35_7_0_machine_options(m); m->alias = NULL; + m->is_default = 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); }