From patchwork Mon Feb 21 11:59:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12753524 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 92070C433F5 for ; Mon, 21 Feb 2022 12:07:09 +0000 (UTC) Received: from localhost ([::1]:52534 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nM7TA-0006tx-Dv for qemu-devel@archiver.kernel.org; Mon, 21 Feb 2022 07:07:08 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50118) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7NI-0003pv-NY for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:05 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:43721) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7NG-0000oJ-KT for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645444861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YNT0pBewvhA5Sx8PCEFclNj9/bP2yNqt1mH6cJU4ZsI=; b=F4VNQdn0dddfz4wtHlhSX2UtE+p4ZhLYcMl03Kn6+F2vIiffjyj7hLT6wWVVvYpdk3AZaG 0rx3jbQhpqohZO60vkOhMycxbfb6yj8zduxFB7ya/TqFEpCLPvVFUABu507X9KYNtx8Ap2 7x/Ksba3U0LviPrYPZGMR780aY3WT/M= 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-474-9d-gIXs8PLKMOPpz_FR6Nw-1; Mon, 21 Feb 2022 07:01:00 -0500 X-MC-Unique: 9d-gIXs8PLKMOPpz_FR6Nw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 85DD71853026; Mon, 21 Feb 2022 12:00:59 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id F06BD73169; Mon, 21 Feb 2022 12:00:11 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 01/25] tests/x86: Use 'pc' machine type for old hardware tests Date: Mon, 21 Feb 2022 12:59:44 +0100 Message-Id: <20220221120008.600114-2-thuth@redhat.com> In-Reply-To: <20220221120008.600114-1-thuth@redhat.com> References: <20220221120008.600114-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@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.082, 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: , Cc: Peter Maydell , "Dr. David Alan Gilbert" , "Michael S . Tsirkin" 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 Message-Id: <20220215162537.605030-2-dgilbert@redhat.com> Signed-off-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); - 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 Mon Feb 21 11:59:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12753526 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 05AB3C433F5 for ; Mon, 21 Feb 2022 12:13:10 +0000 (UTC) Received: from localhost ([::1]:60114 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nM7Yy-0004Sk-PL for qemu-devel@archiver.kernel.org; Mon, 21 Feb 2022 07:13:08 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50144) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7NN-0003qS-8d for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:14 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:29949) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7NJ-0000of-Hj for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645444865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7SfeLVQvW3QhCwiN0g1lj2EogeRm2oo4dajVxTWNLuQ=; b=RWSEhQbrtg1ZmJChc5PkMdo9UQaeJJ5roOGIDaFznMju7ByH09GEO5UsEaPyREdja4tNob UCoBZlVPjMuGZzgZ/8JWVi5/hfJPgAzmjjouV6Tj8Tx49TN8LyoFf3tU3F0PmkkV6u5i3i moRlnFl1Xaa3XuRsHAkpucrhx2rfB6E= 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-218-QL-pilqHPcmGmliHs_Q5aw-1; Mon, 21 Feb 2022 07:01:01 -0500 X-MC-Unique: QL-pilqHPcmGmliHs_Q5aw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EB1298144E2; Mon, 21 Feb 2022 12:01:00 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id E2E5773162; Mon, 21 Feb 2022 12:00:59 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 02/25] tests/x86: Use 'pc' machine type for hotplug tests Date: Mon, 21 Feb 2022 12:59:45 +0100 Message-Id: <20220221120008.600114-3-thuth@redhat.com> In-Reply-To: <20220221120008.600114-1-thuth@redhat.com> References: <20220221120008.600114-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@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.082, 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: , Cc: Peter Maydell , "Dr. David Alan Gilbert" 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 Message-Id: <20220215162537.605030-3-dgilbert@redhat.com> Signed-off-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 Mon Feb 21 11:59:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12753523 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 9BE68C433FE for ; Mon, 21 Feb 2022 12:07:09 +0000 (UTC) Received: from localhost ([::1]:52614 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nM7TA-00072E-Et for qemu-devel@archiver.kernel.org; Mon, 21 Feb 2022 07:07:08 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50176) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7NN-0003qY-Vp for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:14 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:44853) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7NL-0000p7-GH for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:09 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645444866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=YerZ32/3jtWzAtNH5XFDIJqtCOfQSUS9OebBdydGUfE=; b=Dg05+QWKPTX82I2gDnJZ44hfqvYQoUV5EcR70PCq64syN5lXaFkv8iDK5cPy9MVVaH8qeD lH0AH2Kadp7ZoHoZlIrUsOFlJGAS+81nWKEHSryRohL5Q9GVtMbNiK3rWey+6bJvRaORh0 I4LU9lvThoDMqg3ng1g7Bf1pBkdqI0E= 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-382-vtdTlKofM4uiaTTmBG7Uww-1; Mon, 21 Feb 2022 07:01:03 -0500 X-MC-Unique: vtdTlKofM4uiaTTmBG7Uww-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9071F1853026; Mon, 21 Feb 2022 12:01:02 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5306373162; Mon, 21 Feb 2022 12:01:01 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 03/25] erst: drop cast to long long Date: Mon, 21 Feb 2022 12:59:46 +0100 Message-Id: <20220221120008.600114-4-thuth@redhat.com> In-Reply-To: <20220221120008.600114-1-thuth@redhat.com> References: <20220221120008.600114-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@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.082, 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: , Cc: Peter Maydell , =?utf-8?q?Philippe_Mathieu-Dau?= =?utf-8?q?d=C3=A9?= , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: "Michael S. Tsirkin" The way to print uint64_t is with PRIx64, not with a cast to long long. Message-Id: <20220206093547.1282513-1-mst@redhat.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Thomas Huth Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: Thomas Huth --- tests/qtest/erst-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/erst-test.c b/tests/qtest/erst-test.c index c6a0ae4013..f94cd8dd8e 100644 --- a/tests/qtest/erst-test.c +++ b/tests/qtest/erst-test.c @@ -75,7 +75,7 @@ static inline uint64_t in_reg64(ERSTState *s, unsigned reg) uint64_t res; res = qpci_io_readq(s->dev, s->reg_bar, reg); - g_test_message("*%s -> %016llx", name, (unsigned long long)res); + g_test_message("*%s -> %016" PRIx64, name, res); return res; } From patchwork Mon Feb 21 11:59:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12753528 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 6C367C433FE for ; Mon, 21 Feb 2022 12:13:18 +0000 (UTC) Received: from localhost ([::1]:60338 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nM7Z7-0004dk-JV for qemu-devel@archiver.kernel.org; Mon, 21 Feb 2022 07:13:17 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50292) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7Np-0003uU-JR for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:44 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:53960) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7Nn-0000r1-Lv for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:37 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645444895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=+3Lz1p644KgHVWMd3sekbEQdSNPLoUHGfUch3LfowgM=; b=c/0fs81zzelhbdyfktMY3EMHh8C5EeZMTow3eKvGxrGQ3o34Eo2hGhAcym7I8InDbfBn1W sna44xuvtfii42FgBvjRgbECmwZZ1Urdsx3YBnGs3giBPxVgDdICozOztn4322U9D/mZgm IM/R10WanXMedyR7rsSlSYF3rbyUTW0= 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-455-e0HCC17vO12EDPofDxKl5w-1; Mon, 21 Feb 2022 07:01:33 -0500 X-MC-Unique: e0HCC17vO12EDPofDxKl5w-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id AAFD41F2DB; Mon, 21 Feb 2022 12:01:32 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id EF56573167; Mon, 21 Feb 2022 12:01:02 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 04/25] tests/qtest/vhost-user-test.c: Use vhostforce=on Date: Mon, 21 Feb 2022 12:59:47 +0100 Message-Id: <20220221120008.600114-5-thuth@redhat.com> In-Reply-To: <20220221120008.600114-1-thuth@redhat.com> References: <20220221120008.600114-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@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.082, 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: , Cc: Peter Maydell , Eric Auger Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Eric Auger -netdev vhost-user,vhostforce is deprecated and vhostforce=on should be used instead. Signed-off-by: Eric Auger Reviewed-by: Thomas Huth Message-Id: <20220210145254.157790-2-eric.auger@redhat.com> Signed-off-by: Thomas Huth --- tests/qtest/vhost-user-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/qtest/vhost-user-test.c b/tests/qtest/vhost-user-test.c index 2a4568cd7d..ee30f54796 100644 --- a/tests/qtest/vhost-user-test.c +++ b/tests/qtest/vhost-user-test.c @@ -42,7 +42,7 @@ #define QEMU_CMD_MEMFD " -m %d -object memory-backend-memfd,id=mem,size=%dM," \ " -numa node,memdev=mem" #define QEMU_CMD_CHR " -chardev socket,id=%s,path=%s%s" -#define QEMU_CMD_NETDEV " -netdev vhost-user,id=hs0,chardev=%s,vhostforce" +#define QEMU_CMD_NETDEV " -netdev vhost-user,id=hs0,chardev=%s,vhostforce=on" #define HUGETLBFS_MAGIC 0x958458f6 From patchwork Mon Feb 21 11:59:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12753527 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 17957C433EF for ; Mon, 21 Feb 2022 12:13:10 +0000 (UTC) Received: from localhost ([::1]:60188 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nM7Yz-0004Vh-Pt for qemu-devel@archiver.kernel.org; Mon, 21 Feb 2022 07:13:09 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50362) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7Nw-0003un-2P for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:48 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:57763) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7Nr-0000rR-Fz for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:41 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645444898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=D4iU0Lo1ZUCPANSsG4BQ2oGgZ+KHVn0z1h3Ym/n+cZQ=; b=eIj6nKoE15mV50LE4sbmbYcdliwAWe4Np3Wrt450qGnvW/oWSf5aDMEbbSRgdkOQctUVFL kqJawVpiyil6EcEsU/K8uVYMhTKDGDww0utKSsW6SL3SoQ3LrIBzNb3rjn0/6seJyq9iIf rNWubEP/ERCTKaUKrQ3KYbMEHpp+7Ik= 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-435-uMGQLiuHMa2szT-z2ytIKg-1; Mon, 21 Feb 2022 07:01:35 -0500 X-MC-Unique: uMGQLiuHMa2szT-z2ytIKg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0ABF51853020; Mon, 21 Feb 2022 12:01:34 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0EBFA73162; Mon, 21 Feb 2022 12:01:32 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 05/25] tests/qtest/ide-test: Remove bad retry_isa test Date: Mon, 21 Feb 2022 12:59:48 +0100 Message-Id: <20220221120008.600114-6-thuth@redhat.com> In-Reply-To: <20220221120008.600114-1-thuth@redhat.com> References: <20220221120008.600114-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@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.082, 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: , Cc: Peter Maydell , John Snow Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" The retry_isa test is not doing what it was intended for: The test_retry_flush() function ignores the machine parameter completely and thus this test does not get run with the "isapc" machine. Moreover, in the course of time, the test_retry_flush() has been changed to depend on PCI-related functions, so this also cannot be fixed by simply using the machine parameter now. The correct fix would be to switch the whole test to libqos, but until someone has time to do this, let's simply drop the retry_isa test for now. Message-Id: <20220121120635.220644-1-thuth@redhat.com> Reviewed-by: John Snow Signed-off-by: Thomas Huth --- tests/qtest/ide-test.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/tests/qtest/ide-test.c b/tests/qtest/ide-test.c index 84935578fb..19de3b4104 100644 --- a/tests/qtest/ide-test.c +++ b/tests/qtest/ide-test.c @@ -702,7 +702,7 @@ static void test_flush(void) free_pci_device(dev); } -static void test_retry_flush(const char *machine) +static void test_pci_retry_flush(void) { QTestState *qts; QPCIDevice *dev; @@ -791,16 +791,6 @@ static void test_flush_empty_drive(void) ide_test_quit(qts); } -static void test_pci_retry_flush(void) -{ - test_retry_flush("pc"); -} - -static void test_isa_retry_flush(void) -{ - test_retry_flush("isapc"); -} - typedef struct Read10CDB { uint8_t opcode; uint8_t flags; @@ -1051,7 +1041,6 @@ int main(int argc, char **argv) qtest_add_func("/ide/flush/nodev", test_flush_nodev); qtest_add_func("/ide/flush/empty_drive", test_flush_empty_drive); qtest_add_func("/ide/flush/retry_pci", test_pci_retry_flush); - qtest_add_func("/ide/flush/retry_isa", test_isa_retry_flush); qtest_add_func("/ide/cdrom/pio", test_cdrom_pio); qtest_add_func("/ide/cdrom/pio_large", test_cdrom_pio_large); From patchwork Mon Feb 21 11:59:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12753569 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 40396C433EF for ; Mon, 21 Feb 2022 12:19:25 +0000 (UTC) Received: from localhost ([::1]:39082 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nM7f2-000195-5O for qemu-devel@archiver.kernel.org; Mon, 21 Feb 2022 07:19:24 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50328) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7Ns-0003ud-Ob for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:46 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:26147) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7Nq-0000rM-G7 for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:40 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645444897; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=qUwhfqiMIQAnYaeboQzHlSFhtseZ+woaQE0w0yZnca4=; b=XM6XMOoQVBIibU47wMnNOblbbpR4kLjDAe+s+L++46d/EB46U04UTWOUgdtrb9f7YMxsoc FN9cTGbtYb6SMqIaZuUShGASo8KgatETEkszdY9dfrmEEw0+GHDL8pxTEj9M9s05RzL/bB /EHeCwC47yXx888foodlL48u4WwGf6s= 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-480-uegzA4BpNf-b0NtJjk88pw-1; Mon, 21 Feb 2022 07:01:36 -0500 X-MC-Unique: uegzA4BpNf-b0NtJjk88pw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 996D4814245; Mon, 21 Feb 2022 12:01:35 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id A07AA73162; Mon, 21 Feb 2022 12:01:34 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 06/25] tests/qtest: failover: clean up pathname of tests Date: Mon, 21 Feb 2022 12:59:49 +0100 Message-Id: <20220221120008.600114-7-thuth@redhat.com> In-Reply-To: <20220221120008.600114-1-thuth@redhat.com> References: <20220221120008.600114-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@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.082, 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: , Cc: Laurent Vivier , Peter Maydell Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Laurent Vivier clearly indentify parameters, hotplug and migration tests Signed-off-by: Laurent Vivier Message-Id: <20220203141537.972317-2-lvivier@redhat.com> Signed-off-by: Thomas Huth --- tests/qtest/virtio-net-failover.c | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/tests/qtest/virtio-net-failover.c b/tests/qtest/virtio-net-failover.c index 22ad54bb95..207c133012 100644 --- a/tests/qtest/virtio-net-failover.c +++ b/tests/qtest/virtio-net-failover.c @@ -1315,6 +1315,7 @@ int main(int argc, char **argv) g_assert_true(ret >= 0); close(ret); + /* parameters tests */ qtest_add_func("failover-virtio-net/params/error/id", test_error_id); qtest_add_func("failover-virtio-net/params/error/pcie", test_error_pcie); qtest_add_func("failover-virtio-net/params/on", test_on); @@ -1322,15 +1323,19 @@ int main(int argc, char **argv) test_on_mismatch); qtest_add_func("failover-virtio-net/params/off", test_off); qtest_add_func("failover-virtio-net/params/enabled", test_enabled); - qtest_add_func("failover-virtio-net/hotplug_1", test_hotplug_1); - qtest_add_func("failover-virtio-net/hotplug_1_reverse", + + /* hotplug tests */ + qtest_add_func("failover-virtio-net/hotplug/1", test_hotplug_1); + qtest_add_func("failover-virtio-net/hotplug/1_reverse", test_hotplug_1_reverse); - qtest_add_func("failover-virtio-net/hotplug_2", test_hotplug_2); - qtest_add_func("failover-virtio-net/hotplug_2_reverse", + qtest_add_func("failover-virtio-net/hotplug/2", test_hotplug_2); + qtest_add_func("failover-virtio-net/hotplug/2_reverse", test_hotplug_2_reverse); - qtest_add_data_func("failover-virtio-net/migrate/out", tmpfile, + + /* migration tests */ + qtest_add_data_func("failover-virtio-net/migrate/on/out", tmpfile, test_migrate_out); - qtest_add_data_func("failover-virtio-net/migrate/in", tmpfile, + qtest_add_data_func("failover-virtio-net/migrate/on/in", tmpfile, test_migrate_in); qtest_add_data_func("failover-virtio-net/migrate/abort/wait-unplug", tmpfile, test_migrate_abort_wait_unplug); @@ -1340,9 +1345,9 @@ int main(int argc, char **argv) qtest_add_data_func("failover-virtio-net/migrate/abort/timeout", tmpfile, test_migrate_abort_timeout); } - qtest_add_data_func("failover-virtio-net/multi/out", + qtest_add_data_func("failover-virtio-net/migrate/multi/out", tmpfile, test_multi_out); - qtest_add_data_func("failover-virtio-net/multi/in", + qtest_add_data_func("failover-virtio-net/migrate/multi/in", tmpfile, test_multi_in); ret = g_test_run(); From patchwork Mon Feb 21 11:59:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12753573 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 F0C9EC433F5 for ; Mon, 21 Feb 2022 12:23:06 +0000 (UTC) Received: from localhost ([::1]:46140 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nM7ib-0006Bf-Uh for qemu-devel@archiver.kernel.org; Mon, 21 Feb 2022 07:23:05 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50420) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7Ny-0003vv-Ui for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:48 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:57401) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7Nw-0000rp-5j for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645444901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wzILVnORyrCUAEcq9KcRbskLTX/U0oDc7w4lvZ/PRQ0=; b=apTAmzF4KEcCmvsryUwZTPFoBy7tgR0R51yQg57sDs/Czh4RgZb4zn5IqYWOb0qyoqpZIa ClG89P+nidulmPNWNknPJ876Wa4gjCuTMugrTgt0tCahS0y1wo+e3+OiNHRopnPQ6bDKDq Tmxcx9S6En7mvv6Vhi42S7Uq9wYa4CA= 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-145-gbDvowx5N7GRaBIYJHtYHg-1; Mon, 21 Feb 2022 07:01:38 -0500 X-MC-Unique: gbDvowx5N7GRaBIYJHtYHg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F30271091DA2; Mon, 21 Feb 2022 12:01:36 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id F260073162; Mon, 21 Feb 2022 12:01:35 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 07/25] tests/qtest: failover: use a macro for check_one_card() Date: Mon, 21 Feb 2022 12:59:50 +0100 Message-Id: <20220221120008.600114-8-thuth@redhat.com> In-Reply-To: <20220221120008.600114-1-thuth@redhat.com> References: <20220221120008.600114-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@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.082, 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: , Cc: Laurent Vivier , Peter Maydell Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Laurent Vivier This allows g_assert() to correctly report the line number of the error in the test case. Signed-off-by: Laurent Vivier Message-Id: <20220203141537.972317-3-lvivier@redhat.com> Signed-off-by: Thomas Huth --- tests/qtest/virtio-net-failover.c | 47 ++++++++++++++----------------- 1 file changed, 21 insertions(+), 26 deletions(-) diff --git a/tests/qtest/virtio-net-failover.c b/tests/qtest/virtio-net-failover.c index 207c133012..070e53de12 100644 --- a/tests/qtest/virtio-net-failover.c +++ b/tests/qtest/virtio-net-failover.c @@ -224,32 +224,27 @@ static char *get_mac(QTestState *qts, const char *name) return mac; } -static void check_one_card(QTestState *qts, bool present, - const char *id, const char *mac) -{ - QDict *device; - QDict *bus; - char *addr; - - bus = get_bus(qts, 0); - device = find_device(bus, id); - if (present) { - char *path; - - g_assert_nonnull(device); - qobject_unref(device); - - path = g_strdup_printf("/machine/peripheral/%s", id); - addr = get_mac(qts, path); - g_free(path); - g_assert_cmpstr(mac, ==, addr); - g_free(addr); - } else { - g_assert_null(device); - } - - qobject_unref(bus); -} +#define check_one_card(qts, present, id, mac) \ +do { \ + QDict *device; \ + QDict *bus; \ + char *addr; \ + bus = get_bus(qts, 0); \ + device = find_device(bus, id); \ + if (present) { \ + char *path; \ + g_assert_nonnull(device); \ + qobject_unref(device); \ + path = g_strdup_printf("/machine/peripheral/%s", id); \ + addr = get_mac(qts, path); \ + g_free(path); \ + g_assert_cmpstr(mac, ==, addr); \ + g_free(addr); \ + } else { \ + g_assert_null(device); \ + } \ + qobject_unref(bus); \ +} while (0) static void test_on(void) { From patchwork Mon Feb 21 11:59:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12753577 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 7FB93C433F5 for ; Mon, 21 Feb 2022 12:27:32 +0000 (UTC) Received: from localhost ([::1]:52198 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nM7mt-00022d-EK for qemu-devel@archiver.kernel.org; Mon, 21 Feb 2022 07:27:31 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50372) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7Nw-0003up-Gn for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:48 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:52724) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7Nt-0000rg-1T for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:43 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645444900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Dvx6Ef+582q1i/JxEPdvrAz0sLY2jzNBfgg7ZyninsI=; b=NTPGx6JtpDyPBIsSYWu9T8mAjsw2hnNrHllToAHp5wj7pfRnDaSfJRrRKERKMw9+EI3HrV 6fHZkuXmdxOT+BC4itiTRqcDlfIuljpCwQHhgnX/DyMTNUxK00tdRNxBPReCjRP5IwwKeB rjW/ZwGAruWNeuP71ICJS1Qfs9JnzxU= 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-321-jemI1EhnPI2P-KQ592fKoQ-1; Mon, 21 Feb 2022 07:01:39 -0500 X-MC-Unique: jemI1EhnPI2P-KQ592fKoQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5EC31801AC5; Mon, 21 Feb 2022 12:01:38 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5AB037316C; Mon, 21 Feb 2022 12:01:37 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 08/25] tests/qtest: failover: check the feature is correctly provided Date: Mon, 21 Feb 2022 12:59:51 +0100 Message-Id: <20220221120008.600114-9-thuth@redhat.com> In-Reply-To: <20220221120008.600114-1-thuth@redhat.com> References: <20220221120008.600114-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@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.082, 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: , Cc: Laurent Vivier , Peter Maydell Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Laurent Vivier Check QEMU provides the VIRTIO_NET_F_STANDBY if failover is on, and doesn't if failover is off Signed-off-by: Laurent Vivier Message-Id: <20220203141537.972317-4-lvivier@redhat.com> Signed-off-by: Thomas Huth --- tests/qtest/virtio-net-failover.c | 139 ++++++++++++++++++------------ 1 file changed, 86 insertions(+), 53 deletions(-) diff --git a/tests/qtest/virtio-net-failover.c b/tests/qtest/virtio-net-failover.c index 070e53de12..4236796368 100644 --- a/tests/qtest/virtio-net-failover.c +++ b/tests/qtest/virtio-net-failover.c @@ -18,6 +18,8 @@ #include "libqos/virtio-pci.h" #include "hw/pci/pci.h" +#define VIRTIO_NET_F_STANDBY 62 + #define ACPI_PCIHP_ADDR_ICH9 0x0cc0 #define PCI_EJ_BASE 0x0008 #define PCI_SEL_BASE 0x0010 @@ -246,6 +248,65 @@ do { \ qobject_unref(bus); \ } while (0) +static QDict *get_failover_negociated_event(QTestState *qts) +{ + QDict *resp; + QDict *data; + + resp = qtest_qmp_eventwait_ref(qts, "FAILOVER_NEGOTIATED"); + g_assert(qdict_haskey(resp, "data")); + + data = qdict_get_qdict(resp, "data"); + g_assert(qdict_haskey(data, "device-id")); + qobject_ref(data); + qobject_unref(resp); + + return data; +} + +static QVirtioPCIDevice *start_virtio_net_internal(QTestState *qts, + int bus, int slot, + uint64_t *features) +{ + QVirtioPCIDevice *dev; + QPCIAddress addr; + + addr.devfn = QPCI_DEVFN((bus << 5) + slot, 0); + dev = virtio_pci_new(pcibus, &addr); + g_assert_nonnull(dev); + qvirtio_pci_device_enable(dev); + qvirtio_start_device(&dev->vdev); + *features &= qvirtio_get_features(&dev->vdev); + qvirtio_set_features(&dev->vdev, *features); + qvirtio_set_driver_ok(&dev->vdev); + return dev; +} + +static QVirtioPCIDevice *start_virtio_net(QTestState *qts, int bus, int slot, + const char *id, bool failover) +{ + QVirtioPCIDevice *dev; + uint64_t features; + + features = ~(QVIRTIO_F_BAD_FEATURE | + (1ull << VIRTIO_RING_F_INDIRECT_DESC) | + (1ull << VIRTIO_RING_F_EVENT_IDX)); + + dev = start_virtio_net_internal(qts, bus, slot, &features); + + g_assert(!!(features & (1ull << VIRTIO_NET_F_STANDBY)) == failover); + + if (failover) { + QDict *resp; + + resp = get_failover_negociated_event(qts); + g_assert_cmpstr(qdict_get_str(resp, "device-id"), ==, id); + qobject_unref(resp); + } + + return dev; +} + static void test_on(void) { QTestState *qts; @@ -254,6 +315,7 @@ static void test_on(void) "-netdev user,id=hs0 " "-device virtio-net,bus=root0,id=standby0," "failover=on,netdev=hs0,mac="MAC_STANDBY0" " + "-netdev user,id=hs1 " "-device virtio-net,bus=root1,id=primary0," "failover_pair_id=standby0,netdev=hs1,mac="MAC_PRIMARY0, 2); @@ -267,6 +329,7 @@ static void test_on(void) static void test_on_mismatch(void) { QTestState *qts; + QVirtioPCIDevice *vdev; qts = machine_start(BASE_MACHINE "-netdev user,id=hs0 " @@ -280,12 +343,19 @@ static void test_on_mismatch(void) check_one_card(qts, true, "standby0", MAC_STANDBY0); check_one_card(qts, true, "primary0", MAC_PRIMARY0); + vdev = start_virtio_net(qts, 1, 0, "standby0", true); + + check_one_card(qts, true, "standby0", MAC_STANDBY0); + check_one_card(qts, true, "primary0", MAC_PRIMARY0); + + qos_object_destroy((QOSGraphObject *)vdev); machine_stop(qts); } static void test_off(void) { QTestState *qts; + QVirtioPCIDevice *vdev; qts = machine_start(BASE_MACHINE "-netdev user,id=hs0 " @@ -299,50 +369,13 @@ static void test_off(void) check_one_card(qts, true, "standby0", MAC_STANDBY0); check_one_card(qts, true, "primary0", MAC_PRIMARY0); - machine_stop(qts); -} + vdev = start_virtio_net(qts, 1, 0, "standby0", false); -static QDict *get_failover_negociated_event(QTestState *qts) -{ - QDict *resp; - QDict *data; - - resp = qtest_qmp_eventwait_ref(qts, "FAILOVER_NEGOTIATED"); - g_assert(qdict_haskey(resp, "data")); - - data = qdict_get_qdict(resp, "data"); - g_assert(qdict_haskey(data, "device-id")); - qobject_ref(data); - qobject_unref(resp); - - return data; -} - -static QVirtioPCIDevice *start_virtio_net(QTestState *qts, int bus, int slot, - const char *id) -{ - QVirtioPCIDevice *dev; - uint64_t features; - QPCIAddress addr; - QDict *resp; - - addr.devfn = QPCI_DEVFN((bus << 5) + slot, 0); - dev = virtio_pci_new(pcibus, &addr); - g_assert_nonnull(dev); - qvirtio_pci_device_enable(dev); - qvirtio_start_device(&dev->vdev); - features = qvirtio_get_features(&dev->vdev); - features = features & ~(QVIRTIO_F_BAD_FEATURE | - (1ull << VIRTIO_RING_F_INDIRECT_DESC) | - (1ull << VIRTIO_RING_F_EVENT_IDX)); - qvirtio_set_features(&dev->vdev, features); - qvirtio_set_driver_ok(&dev->vdev); - - resp = get_failover_negociated_event(qts); - g_assert_cmpstr(qdict_get_str(resp, "device-id"), ==, id); - qobject_unref(resp); + check_one_card(qts, true, "standby0", MAC_STANDBY0); + check_one_card(qts, true, "primary0", MAC_PRIMARY0); - return dev; + qos_object_destroy((QOSGraphObject *)vdev); + machine_stop(qts); } static void test_enabled(void) @@ -362,7 +395,7 @@ static void test_enabled(void) check_one_card(qts, true, "standby0", MAC_STANDBY0); check_one_card(qts, false, "primary0", MAC_PRIMARY0); - vdev = start_virtio_net(qts, 1, 0, "standby0"); + vdev = start_virtio_net(qts, 1, 0, "standby0", true); check_one_card(qts, true, "standby0", MAC_STANDBY0); check_one_card(qts, true, "primary0", MAC_PRIMARY0); @@ -385,7 +418,7 @@ static void test_hotplug_1(void) check_one_card(qts, true, "standby0", MAC_STANDBY0); check_one_card(qts, false, "primary0", MAC_PRIMARY0); - vdev = start_virtio_net(qts, 1, 0, "standby0"); + vdev = start_virtio_net(qts, 1, 0, "standby0", true); check_one_card(qts, true, "standby0", MAC_STANDBY0); check_one_card(qts, false, "primary0", MAC_PRIMARY0); @@ -427,7 +460,7 @@ static void test_hotplug_1_reverse(void) check_one_card(qts, true, "standby0", MAC_STANDBY0); check_one_card(qts, true, "primary0", MAC_PRIMARY0); - vdev = start_virtio_net(qts, 1, 0, "standby0"); + vdev = start_virtio_net(qts, 1, 0, "standby0", true); check_one_card(qts, true, "standby0", MAC_STANDBY0); check_one_card(qts, true, "primary0", MAC_PRIMARY0); @@ -458,7 +491,7 @@ static void test_hotplug_2(void) check_one_card(qts, true, "standby0", MAC_STANDBY0); check_one_card(qts, false, "primary0", MAC_PRIMARY0); - vdev = start_virtio_net(qts, 1, 0, "standby0"); + vdev = start_virtio_net(qts, 1, 0, "standby0", true); check_one_card(qts, true, "standby0", MAC_STANDBY0); check_one_card(qts, false, "primary0", MAC_PRIMARY0); @@ -514,7 +547,7 @@ static void test_hotplug_2_reverse(void) check_one_card(qts, true, "standby0", MAC_STANDBY0); check_one_card(qts, true, "primary0", MAC_PRIMARY0); - vdev = start_virtio_net(qts, 1, 0, "standby0"); + vdev = start_virtio_net(qts, 1, 0, "standby0", true); check_one_card(qts, true, "standby0", MAC_STANDBY0); check_one_card(qts, true, "primary0", MAC_PRIMARY0); @@ -579,7 +612,7 @@ static void test_migrate_out(gconstpointer opaque) check_one_card(qts, true, "standby0", MAC_STANDBY0); check_one_card(qts, false, "primary0", MAC_PRIMARY0); - vdev = start_virtio_net(qts, 1, 0, "standby0"); + vdev = start_virtio_net(qts, 1, 0, "standby0", true); check_one_card(qts, true, "standby0", MAC_STANDBY0); check_one_card(qts, false, "primary0", MAC_PRIMARY0); @@ -775,7 +808,7 @@ static void test_migrate_abort_wait_unplug(gconstpointer opaque) check_one_card(qts, true, "standby0", MAC_STANDBY0); check_one_card(qts, false, "primary0", MAC_PRIMARY0); - vdev = start_virtio_net(qts, 1, 0, "standby0"); + vdev = start_virtio_net(qts, 1, 0, "standby0", true); check_one_card(qts, true, "standby0", MAC_STANDBY0); check_one_card(qts, false, "primary0", MAC_PRIMARY0); @@ -865,7 +898,7 @@ static void test_migrate_abort_active(gconstpointer opaque) check_one_card(qts, true, "standby0", MAC_STANDBY0); check_one_card(qts, false, "primary0", MAC_PRIMARY0); - vdev = start_virtio_net(qts, 1, 0, "standby0"); + vdev = start_virtio_net(qts, 1, 0, "standby0", true); check_one_card(qts, true, "standby0", MAC_STANDBY0); check_one_card(qts, false, "primary0", MAC_PRIMARY0); @@ -959,7 +992,7 @@ static void test_migrate_abort_timeout(gconstpointer opaque) check_one_card(qts, true, "standby0", MAC_STANDBY0); check_one_card(qts, false, "primary0", MAC_PRIMARY0); - vdev = start_virtio_net(qts, 1, 0, "standby0"); + vdev = start_virtio_net(qts, 1, 0, "standby0", true); check_one_card(qts, true, "standby0", MAC_STANDBY0); check_one_card(qts, false, "primary0", MAC_PRIMARY0); @@ -1070,7 +1103,7 @@ static void test_multi_out(gconstpointer opaque) check_one_card(qts, false, "standby1", MAC_STANDBY1); check_one_card(qts, false, "primary1", MAC_PRIMARY1); - vdev0 = start_virtio_net(qts, 1, 0, "standby0"); + vdev0 = start_virtio_net(qts, 1, 0, "standby0", true); check_one_card(qts, true, "standby0", MAC_STANDBY0); check_one_card(qts, true, "primary0", MAC_PRIMARY0); @@ -1101,7 +1134,7 @@ static void test_multi_out(gconstpointer opaque) check_one_card(qts, true, "standby1", MAC_STANDBY1); check_one_card(qts, false, "primary1", MAC_PRIMARY1); - vdev1 = start_virtio_net(qts, 3, 0, "standby1"); + vdev1 = start_virtio_net(qts, 3, 0, "standby1", true); check_one_card(qts, true, "standby0", MAC_STANDBY0); check_one_card(qts, true, "primary0", MAC_PRIMARY0); From patchwork Mon Feb 21 11:59:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12753584 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 BEBF8C433EF for ; Mon, 21 Feb 2022 12:33:15 +0000 (UTC) Received: from localhost ([::1]:60960 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nM7sQ-00088M-B6 for qemu-devel@archiver.kernel.org; Mon, 21 Feb 2022 07:33:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50422) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7Ny-0003vw-Ut for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:50 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:31423) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7Nw-0000rz-6G for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:45 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645444902; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=9C6/1n2umGTiA3cXh0le8Wir29yp3vfsyg12uLeQvpE=; b=iQjXy7ZStZ5Hro70ml/rYIGf27Xtp8frdxh/oOMfJkGzCJelNOJi4jyhrbGDw9i/lPS+tx WJg5ulMHlKzZq1jh8XLvMgZjZDJAXyLMJnF7gjR+K3+toEHdFEop72KXqm73QbfrwYPwu0 V/AQ78H0/3vV7lDm2LeVTlfcdJB1g5M= 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-586-TQE4dWN4NAipBmDJlvuD6w-1; Mon, 21 Feb 2022 07:01:40 -0500 X-MC-Unique: TQE4dWN4NAipBmDJlvuD6w-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B91311853026; Mon, 21 Feb 2022 12:01:39 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id B881973162; Mon, 21 Feb 2022 12:01:38 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 09/25] tests/qtest: failover: check missing guest feature Date: Mon, 21 Feb 2022 12:59:52 +0100 Message-Id: <20220221120008.600114-10-thuth@redhat.com> In-Reply-To: <20220221120008.600114-1-thuth@redhat.com> References: <20220221120008.600114-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@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.082, 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: , Cc: Laurent Vivier , Peter Maydell Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Laurent Vivier If QEMU provides the VIRTIO_NET_F_STANDBY feature but the guest doesn't the primary device must be kept hidden Signed-off-by: Laurent Vivier Message-Id: <20220203141537.972317-5-lvivier@redhat.com> Signed-off-by: Thomas Huth --- tests/qtest/virtio-net-failover.c | 33 +++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/tests/qtest/virtio-net-failover.c b/tests/qtest/virtio-net-failover.c index 4236796368..cbd8585fa8 100644 --- a/tests/qtest/virtio-net-failover.c +++ b/tests/qtest/virtio-net-failover.c @@ -404,6 +404,38 @@ static void test_enabled(void) machine_stop(qts); } +static void test_guest_off(void) +{ + QTestState *qts; + QVirtioPCIDevice *vdev; + uint64_t features; + + qts = machine_start(BASE_MACHINE + "-netdev user,id=hs0 " + "-device virtio-net,bus=root0,id=standby0," + "failover=on,netdev=hs0,mac="MAC_STANDBY0" " + "-netdev user,id=hs1 " + "-device virtio-net,bus=root1,id=primary0," + "failover_pair_id=standby0,netdev=hs1,mac="MAC_PRIMARY0" ", + 2); + + check_one_card(qts, true, "standby0", MAC_STANDBY0); + check_one_card(qts, false, "primary0", MAC_PRIMARY0); + + features = ~(QVIRTIO_F_BAD_FEATURE | + (1ull << VIRTIO_RING_F_INDIRECT_DESC) | + (1ull << VIRTIO_RING_F_EVENT_IDX) | + (1ull << VIRTIO_NET_F_STANDBY)); + + vdev = start_virtio_net_internal(qts, 1, 0, &features); + + check_one_card(qts, true, "standby0", MAC_STANDBY0); + check_one_card(qts, false, "primary0", MAC_PRIMARY0); + + qos_object_destroy((QOSGraphObject *)vdev); + machine_stop(qts); +} + static void test_hotplug_1(void) { QTestState *qts; @@ -1351,6 +1383,7 @@ int main(int argc, char **argv) test_on_mismatch); qtest_add_func("failover-virtio-net/params/off", test_off); qtest_add_func("failover-virtio-net/params/enabled", test_enabled); + qtest_add_func("failover-virtio-net/params/guest_off", test_guest_off); /* hotplug tests */ qtest_add_func("failover-virtio-net/hotplug/1", test_hotplug_1); From patchwork Mon Feb 21 11:59:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12753525 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 D9B96C433EF for ; Mon, 21 Feb 2022 12:07:13 +0000 (UTC) Received: from localhost ([::1]:52790 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nM7TE-0007C8-RC for qemu-devel@archiver.kernel.org; Mon, 21 Feb 2022 07:07:12 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50456) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7O1-0003wT-EI for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:53 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:59979) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7Ny-0000sN-Li for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645444905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bY8J1xHTTnvxZdPnU/flpfrWYHsmP2K7Is9R4CozFSk=; b=Y1RSZCH8EKdp+Gglp+D6fpmzWTRnHlhRRSV+VHc22y417md6KQmt3UgtgnQabLrncJuxbA 1O1bzHgwk2Y51TGL5pt7p5JTtxyNxBSf/gMonHzZCpV+k9Gxq8sHs3BI7rFkK6dKOFRdL0 5bdmRJZXT+zoWvUyopqTappi4Ns8ywI= 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-522-KnyJVzEnOTaUh9gxT_Oagg-1; Mon, 21 Feb 2022 07:01:42 -0500 X-MC-Unique: KnyJVzEnOTaUh9gxT_Oagg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1D0DD100C661; Mon, 21 Feb 2022 12:01:41 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1E15E73162; Mon, 21 Feb 2022 12:01:39 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 10/25] tests/qtest: failover: check migration with failover off Date: Mon, 21 Feb 2022 12:59:53 +0100 Message-Id: <20220221120008.600114-11-thuth@redhat.com> In-Reply-To: <20220221120008.600114-1-thuth@redhat.com> References: <20220221120008.600114-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@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.082, 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: , Cc: Laurent Vivier , Peter Maydell Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Laurent Vivier If failover is off, the primary device is not plugged and the migration is done only with the standby device. On destination, the primary device must not be plugged. Signed-off-by: Laurent Vivier Message-Id: <20220203141537.972317-6-lvivier@redhat.com> Signed-off-by: Thomas Huth --- tests/qtest/virtio-net-failover.c | 133 ++++++++++++++++++++++++++++++ 1 file changed, 133 insertions(+) diff --git a/tests/qtest/virtio-net-failover.c b/tests/qtest/virtio-net-failover.c index cbd8585fa8..c99599bdcc 100644 --- a/tests/qtest/virtio-net-failover.c +++ b/tests/qtest/virtio-net-failover.c @@ -815,6 +815,135 @@ static void test_migrate_in(gconstpointer opaque) machine_stop(qts); } +static void test_off_migrate_out(gconstpointer opaque) +{ + QTestState *qts; + QDict *resp, *args, *ret; + g_autofree gchar *uri = g_strdup_printf("exec: cat > %s", (gchar *)opaque); + const gchar *status; + QVirtioPCIDevice *vdev; + + qts = machine_start(BASE_MACHINE + "-netdev user,id=hs0 " + "-netdev user,id=hs1 ", + 2); + + check_one_card(qts, false, "standby0", MAC_STANDBY0); + check_one_card(qts, false, "primary0", MAC_PRIMARY0); + + qtest_qmp_device_add(qts, "virtio-net", "standby0", + "{'bus': 'root0'," + "'failover': 'off'," + "'netdev': 'hs0'," + "'mac': '"MAC_STANDBY0"'}"); + + check_one_card(qts, true, "standby0", MAC_STANDBY0); + check_one_card(qts, false, "primary0", MAC_PRIMARY0); + + qtest_qmp_device_add(qts, "virtio-net", "primary0", + "{'bus': 'root1'," + "'failover_pair_id': 'standby0'," + "'netdev': 'hs1'," + "'rombar': 0," + "'romfile': ''," + "'mac': '"MAC_PRIMARY0"'}"); + + check_one_card(qts, true, "standby0", MAC_STANDBY0); + check_one_card(qts, true, "primary0", MAC_PRIMARY0); + + vdev = start_virtio_net(qts, 1, 0, "standby0", false); + + check_one_card(qts, true, "standby0", MAC_STANDBY0); + check_one_card(qts, true, "primary0", MAC_PRIMARY0); + + args = qdict_from_jsonf_nofail("{}"); + g_assert_nonnull(args); + qdict_put_str(args, "uri", uri); + + resp = qtest_qmp(qts, "{ 'execute': 'migrate', 'arguments': %p}", args); + g_assert(qdict_haskey(resp, "return")); + qobject_unref(resp); + + while (true) { + ret = migrate_status(qts); + + status = qdict_get_str(ret, "status"); + if (strcmp(status, "completed") == 0) { + qobject_unref(ret); + break; + } + g_assert_cmpstr(status, !=, "failed"); + g_assert_cmpstr(status, !=, "cancelling"); + g_assert_cmpstr(status, !=, "cancelled"); + qobject_unref(ret); + } + + qtest_qmp_eventwait(qts, "STOP"); + + qos_object_destroy((QOSGraphObject *)vdev); + machine_stop(qts); +} + +static void test_off_migrate_in(gconstpointer opaque) +{ + QTestState *qts; + QDict *resp, *args, *ret; + g_autofree gchar *uri = g_strdup_printf("exec: cat %s", (gchar *)opaque); + + qts = machine_start(BASE_MACHINE + "-netdev user,id=hs0 " + "-netdev user,id=hs1 " + "-incoming defer ", + 2); + + check_one_card(qts, false, "standby0", MAC_STANDBY0); + check_one_card(qts, false, "primary0", MAC_PRIMARY0); + + qtest_qmp_device_add(qts, "virtio-net", "standby0", + "{'bus': 'root0'," + "'failover': 'off'," + "'netdev': 'hs0'," + "'mac': '"MAC_STANDBY0"'}"); + + check_one_card(qts, true, "standby0", MAC_STANDBY0); + check_one_card(qts, false, "primary0", MAC_PRIMARY0); + + qtest_qmp_device_add(qts, "virtio-net", "primary0", + "{'bus': 'root1'," + "'failover_pair_id': 'standby0'," + "'netdev': 'hs1'," + "'rombar': 0," + "'romfile': ''," + "'mac': '"MAC_PRIMARY0"'}"); + + check_one_card(qts, true, "standby0", MAC_STANDBY0); + check_one_card(qts, true, "primary0", MAC_PRIMARY0); + + args = qdict_from_jsonf_nofail("{}"); + g_assert_nonnull(args); + qdict_put_str(args, "uri", uri); + + resp = qtest_qmp(qts, "{ 'execute': 'migrate-incoming', 'arguments': %p}", + args); + g_assert(qdict_haskey(resp, "return")); + qobject_unref(resp); + + resp = get_migration_event(qts); + g_assert_cmpstr(qdict_get_str(resp, "status"), ==, "setup"); + qobject_unref(resp); + + check_one_card(qts, true, "standby0", MAC_STANDBY0); + check_one_card(qts, true, "primary0", MAC_PRIMARY0); + + qtest_qmp_eventwait(qts, "RESUME"); + + ret = migrate_status(qts); + g_assert_cmpstr(qdict_get_str(ret, "status"), ==, "completed"); + qobject_unref(ret); + + machine_stop(qts); +} + static void test_migrate_abort_wait_unplug(gconstpointer opaque) { QTestState *qts; @@ -1398,6 +1527,10 @@ int main(int argc, char **argv) test_migrate_out); qtest_add_data_func("failover-virtio-net/migrate/on/in", tmpfile, test_migrate_in); + qtest_add_data_func("failover-virtio-net/migrate/off/out", tmpfile, + test_off_migrate_out); + qtest_add_data_func("failover-virtio-net/migrate/off/in", tmpfile, + test_off_migrate_in); qtest_add_data_func("failover-virtio-net/migrate/abort/wait-unplug", tmpfile, test_migrate_abort_wait_unplug); qtest_add_data_func("failover-virtio-net/migrate/abort/active", tmpfile, From patchwork Mon Feb 21 11:59:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12753579 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 0BCF0C433EF for ; Mon, 21 Feb 2022 12:28:31 +0000 (UTC) Received: from localhost ([::1]:54454 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nM7np-0003cv-0f for qemu-devel@archiver.kernel.org; Mon, 21 Feb 2022 07:28:29 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50450) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7O0-0003wM-HC for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:53 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:23541) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7Ny-0000sJ-LX for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645444904; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=W52uQ+9CMKaRb5Sd1RhbZAT4Z21h4CTZcfBSHccg4p0=; b=TWaTEAuXlKs4xYZxVIXk47W7G7IAFtyX8TFxdSiiiD3as/2byWqXa84cJ/SX4hf8IeUI6Z jsYO84ZXpCowaJ9bhnFjadth5uG/+AAQBai1eQNRSPX826d/sK7ELKtGhFX2L68z4XPSxE uLk/OUFYL1fRPiufZ/eyvhYgswET1cw= 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-570-bp-LfozyPHiIVP_rXFsDzA-1; Mon, 21 Feb 2022 07:01:43 -0500 X-MC-Unique: bp-LfozyPHiIVP_rXFsDzA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6F370814246; Mon, 21 Feb 2022 12:01:42 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id 73F7E73162; Mon, 21 Feb 2022 12:01:41 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 11/25] tests/qtest: failover: test migration if the guest doesn't support failover Date: Mon, 21 Feb 2022 12:59:54 +0100 Message-Id: <20220221120008.600114-12-thuth@redhat.com> In-Reply-To: <20220221120008.600114-1-thuth@redhat.com> References: <20220221120008.600114-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@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.082, 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: , Cc: Laurent Vivier , Peter Maydell Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Laurent Vivier The primary device is not plugged and the migration is done only with the standby device Signed-off-by: Laurent Vivier Message-Id: <20220203141537.972317-7-lvivier@redhat.com> Signed-off-by: Thomas Huth --- tests/qtest/virtio-net-failover.c | 142 ++++++++++++++++++++++++++++++ 1 file changed, 142 insertions(+) diff --git a/tests/qtest/virtio-net-failover.c b/tests/qtest/virtio-net-failover.c index c99599bdcc..54a0a03241 100644 --- a/tests/qtest/virtio-net-failover.c +++ b/tests/qtest/virtio-net-failover.c @@ -944,6 +944,144 @@ static void test_off_migrate_in(gconstpointer opaque) machine_stop(qts); } +static void test_guest_off_migrate_out(gconstpointer opaque) +{ + QTestState *qts; + QDict *resp, *args, *ret; + g_autofree gchar *uri = g_strdup_printf("exec: cat > %s", (gchar *)opaque); + const gchar *status; + QVirtioPCIDevice *vdev; + uint64_t features; + + qts = machine_start(BASE_MACHINE + "-netdev user,id=hs0 " + "-netdev user,id=hs1 ", + 2); + + check_one_card(qts, false, "standby0", MAC_STANDBY0); + check_one_card(qts, false, "primary0", MAC_PRIMARY0); + + qtest_qmp_device_add(qts, "virtio-net", "standby0", + "{'bus': 'root0'," + "'failover': 'on'," + "'netdev': 'hs0'," + "'mac': '"MAC_STANDBY0"'}"); + + check_one_card(qts, true, "standby0", MAC_STANDBY0); + check_one_card(qts, false, "primary0", MAC_PRIMARY0); + + qtest_qmp_device_add(qts, "virtio-net", "primary0", + "{'bus': 'root1'," + "'failover_pair_id': 'standby0'," + "'netdev': 'hs1'," + "'rombar': 0," + "'romfile': ''," + "'mac': '"MAC_PRIMARY0"'}"); + + check_one_card(qts, true, "standby0", MAC_STANDBY0); + check_one_card(qts, false, "primary0", MAC_PRIMARY0); + + features = ~(QVIRTIO_F_BAD_FEATURE | + (1ull << VIRTIO_RING_F_INDIRECT_DESC) | + (1ull << VIRTIO_RING_F_EVENT_IDX) | + (1ull << VIRTIO_NET_F_STANDBY)); + + vdev = start_virtio_net_internal(qts, 1, 0, &features); + + check_one_card(qts, true, "standby0", MAC_STANDBY0); + check_one_card(qts, false, "primary0", MAC_PRIMARY0); + + args = qdict_from_jsonf_nofail("{}"); + g_assert_nonnull(args); + qdict_put_str(args, "uri", uri); + + resp = qtest_qmp(qts, "{ 'execute': 'migrate', 'arguments': %p}", args); + g_assert(qdict_haskey(resp, "return")); + qobject_unref(resp); + + while (true) { + ret = migrate_status(qts); + + status = qdict_get_str(ret, "status"); + if (strcmp(status, "completed") == 0) { + qobject_unref(ret); + break; + } + g_assert_cmpstr(status, !=, "failed"); + g_assert_cmpstr(status, !=, "cancelling"); + g_assert_cmpstr(status, !=, "cancelled"); + qobject_unref(ret); + } + + qtest_qmp_eventwait(qts, "STOP"); + + check_one_card(qts, true, "standby0", MAC_STANDBY0); + check_one_card(qts, false, "primary0", MAC_PRIMARY0); + + qos_object_destroy((QOSGraphObject *)vdev); + machine_stop(qts); +} + +static void test_guest_off_migrate_in(gconstpointer opaque) +{ + QTestState *qts; + QDict *resp, *args, *ret; + g_autofree gchar *uri = g_strdup_printf("exec: cat %s", (gchar *)opaque); + + qts = machine_start(BASE_MACHINE + "-netdev user,id=hs0 " + "-netdev user,id=hs1 " + "-incoming defer ", + 2); + + check_one_card(qts, false, "standby0", MAC_STANDBY0); + check_one_card(qts, false, "primary0", MAC_PRIMARY0); + + qtest_qmp_device_add(qts, "virtio-net", "standby0", + "{'bus': 'root0'," + "'failover': 'on'," + "'netdev': 'hs0'," + "'mac': '"MAC_STANDBY0"'}"); + + check_one_card(qts, true, "standby0", MAC_STANDBY0); + check_one_card(qts, false, "primary0", MAC_PRIMARY0); + + qtest_qmp_device_add(qts, "virtio-net", "primary0", + "{'bus': 'root1'," + "'failover_pair_id': 'standby0'," + "'netdev': 'hs1'," + "'rombar': 0," + "'romfile': ''," + "'mac': '"MAC_PRIMARY0"'}"); + + check_one_card(qts, true, "standby0", MAC_STANDBY0); + check_one_card(qts, false, "primary0", MAC_PRIMARY0); + + args = qdict_from_jsonf_nofail("{}"); + g_assert_nonnull(args); + qdict_put_str(args, "uri", uri); + + resp = qtest_qmp(qts, "{ 'execute': 'migrate-incoming', 'arguments': %p}", + args); + g_assert(qdict_haskey(resp, "return")); + qobject_unref(resp); + + resp = get_migration_event(qts); + g_assert_cmpstr(qdict_get_str(resp, "status"), ==, "setup"); + qobject_unref(resp); + + check_one_card(qts, true, "standby0", MAC_STANDBY0); + check_one_card(qts, false, "primary0", MAC_PRIMARY0); + + qtest_qmp_eventwait(qts, "RESUME"); + + ret = migrate_status(qts); + g_assert_cmpstr(qdict_get_str(ret, "status"), ==, "completed"); + qobject_unref(ret); + + machine_stop(qts); +} + static void test_migrate_abort_wait_unplug(gconstpointer opaque) { QTestState *qts; @@ -1531,6 +1669,10 @@ int main(int argc, char **argv) test_off_migrate_out); qtest_add_data_func("failover-virtio-net/migrate/off/in", tmpfile, test_off_migrate_in); + qtest_add_data_func("failover-virtio-net/migrate/guest_off/out", tmpfile, + test_guest_off_migrate_out); + qtest_add_data_func("failover-virtio-net/migrate/guest_off/in", tmpfile, + test_guest_off_migrate_in); qtest_add_data_func("failover-virtio-net/migrate/abort/wait-unplug", tmpfile, test_migrate_abort_wait_unplug); qtest_add_data_func("failover-virtio-net/migrate/abort/active", tmpfile, From patchwork Mon Feb 21 11:59:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12753570 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 ABB84C433FE for ; Mon, 21 Feb 2022 12:19:27 +0000 (UTC) Received: from localhost ([::1]:39156 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nM7f4-0001By-GZ for qemu-devel@archiver.kernel.org; Mon, 21 Feb 2022 07:19:26 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50454) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7O0-0003wN-O2 for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:53 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:25505) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7Ny-0000sV-Lw for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:48 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645444905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=GClypgfm23IzHWCI6vQG4Tzss5iKBd3jNLj0NYQhd0A=; b=Frq07OHRHY87SUCbgTCGL2YmgzJAAFHksq5ksO2l8TTkZl7JggCc4fbCwrN83R2Ziukpua ow2fuCTbV8zUWuY04stXsooF3qi+SuOP4AV41joWAGgdWS4f5xBCZWt5G8ZkxHLuukm2ps 8X4Jgnfe3yr3syi6YjqFjbu36T01JE4= 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-631-9BqBeQtwOfGq3o8k0m8eYw-1; Mon, 21 Feb 2022 07:01:44 -0500 X-MC-Unique: 9BqBeQtwOfGq3o8k0m8eYw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BED391091DA3; Mon, 21 Feb 2022 12:01:43 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id C354A73160; Mon, 21 Feb 2022 12:01:42 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 12/25] tests/qtest: failover: migration abort test with failover off Date: Mon, 21 Feb 2022 12:59:55 +0100 Message-Id: <20220221120008.600114-13-thuth@redhat.com> In-Reply-To: <20220221120008.600114-1-thuth@redhat.com> References: <20220221120008.600114-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@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.082, 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: , Cc: Laurent Vivier , Peter Maydell Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Laurent Vivier Test abort during active migration when failover is disabled from QEMU or from guest side. Signed-off-by: Laurent Vivier Message-Id: <20220203141537.972317-8-lvivier@redhat.com> Signed-off-by: Thomas Huth --- tests/qtest/virtio-net-failover.c | 180 ++++++++++++++++++++++++++++++ 1 file changed, 180 insertions(+) diff --git a/tests/qtest/virtio-net-failover.c b/tests/qtest/virtio-net-failover.c index 54a0a03241..80292eecf6 100644 --- a/tests/qtest/virtio-net-failover.c +++ b/tests/qtest/virtio-net-failover.c @@ -1082,6 +1082,97 @@ static void test_guest_off_migrate_in(gconstpointer opaque) machine_stop(qts); } +static void test_migrate_guest_off_abort(gconstpointer opaque) +{ + QTestState *qts; + QDict *resp, *args, *ret; + g_autofree gchar *uri = g_strdup_printf("exec: cat > %s", (gchar *)opaque); + const gchar *status; + QVirtioPCIDevice *vdev; + uint64_t features; + + qts = machine_start(BASE_MACHINE + "-netdev user,id=hs0 " + "-netdev user,id=hs1 ", + 2); + + check_one_card(qts, false, "standby0", MAC_STANDBY0); + check_one_card(qts, false, "primary0", MAC_PRIMARY0); + + qtest_qmp_device_add(qts, "virtio-net", "standby0", + "{'bus': 'root0'," + "'failover': 'on'," + "'netdev': 'hs0'," + "'mac': '"MAC_STANDBY0"'}"); + + check_one_card(qts, true, "standby0", MAC_STANDBY0); + check_one_card(qts, false, "primary0", MAC_PRIMARY0); + + qtest_qmp_device_add(qts, "virtio-net", "primary0", + "{'bus': 'root1'," + "'failover_pair_id': 'standby0'," + "'netdev': 'hs1'," + "'rombar': 0," + "'romfile': ''," + "'mac': '"MAC_PRIMARY0"'}"); + + check_one_card(qts, true, "standby0", MAC_STANDBY0); + check_one_card(qts, false, "primary0", MAC_PRIMARY0); + + features = ~(QVIRTIO_F_BAD_FEATURE | + (1ull << VIRTIO_RING_F_INDIRECT_DESC) | + (1ull << VIRTIO_RING_F_EVENT_IDX) | + (1ull << VIRTIO_NET_F_STANDBY)); + + vdev = start_virtio_net_internal(qts, 1, 0, &features); + + check_one_card(qts, true, "standby0", MAC_STANDBY0); + check_one_card(qts, false, "primary0", MAC_PRIMARY0); + + args = qdict_from_jsonf_nofail("{}"); + g_assert_nonnull(args); + qdict_put_str(args, "uri", uri); + + resp = qtest_qmp(qts, "{ 'execute': 'migrate', 'arguments': %p}", args); + g_assert(qdict_haskey(resp, "return")); + qobject_unref(resp); + + while (true) { + ret = migrate_status(qts); + + status = qdict_get_str(ret, "status"); + if (strcmp(status, "active") == 0) { + qobject_unref(ret); + break; + } + g_assert_cmpstr(status, !=, "failed"); + qobject_unref(ret); + } + + resp = qtest_qmp(qts, "{ 'execute': 'migrate_cancel' }"); + g_assert(qdict_haskey(resp, "return")); + qobject_unref(resp); + + while (true) { + ret = migrate_status(qts); + + status = qdict_get_str(ret, "status"); + if (strcmp(status, "cancelled") == 0) { + qobject_unref(ret); + break; + } + g_assert_cmpstr(status, !=, "failed"); + g_assert_cmpstr(status, !=, "active"); + qobject_unref(ret); + } + + check_one_card(qts, true, "standby0", MAC_STANDBY0); + check_one_card(qts, false, "primary0", MAC_PRIMARY0); + + qos_object_destroy((QOSGraphObject *)vdev); + machine_stop(qts); +} + static void test_migrate_abort_wait_unplug(gconstpointer opaque) { QTestState *qts; @@ -1265,6 +1356,91 @@ static void test_migrate_abort_active(gconstpointer opaque) machine_stop(qts); } +static void test_migrate_off_abort(gconstpointer opaque) +{ + QTestState *qts; + QDict *resp, *args, *ret; + g_autofree gchar *uri = g_strdup_printf("exec: cat > %s", (gchar *)opaque); + const gchar *status; + QVirtioPCIDevice *vdev; + + qts = machine_start(BASE_MACHINE + "-netdev user,id=hs0 " + "-netdev user,id=hs1 ", + 2); + + check_one_card(qts, false, "standby0", MAC_STANDBY0); + check_one_card(qts, false, "primary0", MAC_PRIMARY0); + + qtest_qmp_device_add(qts, "virtio-net", "standby0", + "{'bus': 'root0'," + "'failover': 'off'," + "'netdev': 'hs0'," + "'mac': '"MAC_STANDBY0"'}"); + + check_one_card(qts, true, "standby0", MAC_STANDBY0); + check_one_card(qts, false, "primary0", MAC_PRIMARY0); + + vdev = start_virtio_net(qts, 1, 0, "standby0", false); + + check_one_card(qts, true, "standby0", MAC_STANDBY0); + check_one_card(qts, false, "primary0", MAC_PRIMARY0); + + qtest_qmp_device_add(qts, "virtio-net", "primary0", + "{'bus': 'root1'," + "'failover_pair_id': 'standby0'," + "'netdev': 'hs1'," + "'rombar': 0," + "'romfile': ''," + "'mac': '"MAC_PRIMARY0"'}"); + + check_one_card(qts, true, "standby0", MAC_STANDBY0); + check_one_card(qts, true, "primary0", MAC_PRIMARY0); + + args = qdict_from_jsonf_nofail("{}"); + g_assert_nonnull(args); + qdict_put_str(args, "uri", uri); + + resp = qtest_qmp(qts, "{ 'execute': 'migrate', 'arguments': %p}", args); + g_assert(qdict_haskey(resp, "return")); + qobject_unref(resp); + + while (true) { + ret = migrate_status(qts); + + status = qdict_get_str(ret, "status"); + if (strcmp(status, "active") == 0) { + qobject_unref(ret); + break; + } + g_assert_cmpstr(status, !=, "failed"); + qobject_unref(ret); + } + + resp = qtest_qmp(qts, "{ 'execute': 'migrate_cancel' }"); + g_assert(qdict_haskey(resp, "return")); + qobject_unref(resp); + + while (true) { + ret = migrate_status(qts); + + status = qdict_get_str(ret, "status"); + if (strcmp(status, "cancelled") == 0) { + qobject_unref(ret); + break; + } + g_assert_cmpstr(status, !=, "failed"); + g_assert_cmpstr(status, !=, "active"); + qobject_unref(ret); + } + + check_one_card(qts, true, "standby0", MAC_STANDBY0); + check_one_card(qts, true, "primary0", MAC_PRIMARY0); + + qos_object_destroy((QOSGraphObject *)vdev); + machine_stop(qts); +} + static void test_migrate_abort_timeout(gconstpointer opaque) { QTestState *qts; @@ -1669,10 +1845,14 @@ int main(int argc, char **argv) test_off_migrate_out); qtest_add_data_func("failover-virtio-net/migrate/off/in", tmpfile, test_off_migrate_in); + qtest_add_data_func("failover-virtio-net/migrate/off/abort", tmpfile, + test_migrate_off_abort); qtest_add_data_func("failover-virtio-net/migrate/guest_off/out", tmpfile, test_guest_off_migrate_out); qtest_add_data_func("failover-virtio-net/migrate/guest_off/in", tmpfile, test_guest_off_migrate_in); + qtest_add_data_func("failover-virtio-net/migrate/guest_off/abort", tmpfile, + test_migrate_guest_off_abort); qtest_add_data_func("failover-virtio-net/migrate/abort/wait-unplug", tmpfile, test_migrate_abort_wait_unplug); qtest_add_data_func("failover-virtio-net/migrate/abort/active", tmpfile, From patchwork Mon Feb 21 11:59:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12753591 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 F171DC433F5 for ; Mon, 21 Feb 2022 13:02:58 +0000 (UTC) Received: from localhost ([::1]:46794 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nM8LC-0002Ni-0R for qemu-devel@archiver.kernel.org; Mon, 21 Feb 2022 08:02:58 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50494) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7O7-00040e-NE for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:55 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:54572) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7O1-0000u9-QG for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645444909; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=wR6N0WCO3QS1a+gcwPbSNjsf+BBp3Up2l779raX945I=; b=KM7S+ctna+NS/ueQ6iHM2eHMiyQzmEQLKDBlEmFWJNFoSvK0rNR3VhZ2bpaU0RhDN6S9e0 kipNtkKH7mMl30BNod32ApMAaEJZmMwjShiWsdW0neMwQ4fU5yxpsFgogLcV7wbhc5R3pj TX+/2kPi0ID5zSH8Rf7TRQPP5IPoyKc= 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-49-LLdJbdBmNHqDnyu-rpKUew-1; Mon, 21 Feb 2022 07:01:45 -0500 X-MC-Unique: LLdJbdBmNHqDnyu-rpKUew-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EAF07100C662; Mon, 21 Feb 2022 12:01:44 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2250273165; Mon, 21 Feb 2022 12:01:43 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 13/25] scripts: Remove the old switch-timer-api script Date: Mon, 21 Feb 2022 12:59:56 +0100 Message-Id: <20220221120008.600114-14-thuth@redhat.com> In-Reply-To: <20220221120008.600114-1-thuth@redhat.com> References: <20220221120008.600114-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@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.082, 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: , Cc: Peter Maydell Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" This script has been useful for the timer API rewrite in 2013, but it is of no use anymore today. Let's remove it now. Message-Id: <20220124102001.35930-1-thuth@redhat.com> Signed-off-by: Thomas Huth --- scripts/switch-timer-api | 178 --------------------------------------- 1 file changed, 178 deletions(-) delete mode 100755 scripts/switch-timer-api diff --git a/scripts/switch-timer-api b/scripts/switch-timer-api deleted file mode 100755 index 41736d11dd..0000000000 --- a/scripts/switch-timer-api +++ /dev/null @@ -1,178 +0,0 @@ -#!/usr/bin/env perl - -use strict; -use warnings; -use Getopt::Long; -use FindBin; - -my @legacy = qw(qemu_clock_ptr qemu_get_clock_ns qemu_get_clock_ms qemu_register_clock_reset_notifier qemu_unregister_clock_reset_notifier qemu_new_timer qemu_free_timer qemu_del_timer qemu_mod_timer_ns qemu_mod_timer qemu_run_timers qemu_new_timer_ns qemu_new_timer_us qemu_new_timer_ms); -my $legacyre = '\b('.join('|', @legacy).')\b'; -my $option_git; -my $option_dryrun; -my $option_quiet; -my $option_rtc; -my $suffix=".tmp.$$"; -my @files; -my $getfiles = 'git grep -l -E \'\b((host|rt|vm|rtc)_clock\b|qemu_\w*timer)\' | egrep \'\.[ch]$\' | egrep -v \'qemu-timer\.c$|include/qemu/timer\.h$\''; - -sub Syntax -{ - print STDERR < \$option_dryrun, - "git|g" => \$option_git, - "quiet|q" => \$option_quiet, - "rtc|r" => \$option_rtc, - "help|h" => sub { Syntax(); exit(0); } - )) - { - Syntax(); - die "Bad options"; - } - - if ($#ARGV >=0) - { - @files = @ARGV; - } - else - { - @files = split(/\s+/, `$getfiles`); - } - - foreach my $file (@files) - { - die "Cannot find $file" unless (-f $file && -r $file); - } -} - -sub DoWarn -{ - my $text = shift @_; - my $line = shift @_; - return if ($option_quiet); - chomp ($line); - print STDERR "$text\n"; - print STDERR "$line\n\n"; -} - -sub Process -{ - my $ifn = shift @_; - my $ofn = $ifn.$suffix; - - my $intext; - my $outtext; - my $linenum = 0; - - open my $input, "<", $ifn || die "Cannot open $ifn for read: $!"; - - while (<$input>) - { - my $line = $_; - $intext .= $line; - $linenum++; - - # fix the specific uses - unless ($option_rtc) - { - $line =~ s/\bqemu_new_timer(_[num]s)\s*\((vm_|rt_|host_)clock\b/timer_new$1(XXX_$2clock/g; - $line =~ s/\bqemu_new_timer\s*\((vm_|rt_|host_)clock\b/timer_new(XXX_$1clock/g; - $line =~ s/\bqemu_get_clock(_[num]s)\s*\((vm_|rt_|host_)clock\b/qemu_clock_get$1(XXX_$2clock/g; - } - - # rtc is different - $line =~ s/\bqemu_new_timer(_[num]s)\s*\(rtc_clock\b/timer_new$1(rtc_clock/g; - $line =~ s/\bqemu_new_timer\s*\(rtc_clock\b/timer_new(rtc_clock/g; - $line =~ s/\bqemu_get_clock(_[num]s)\s*\(rtc_clock\b/qemu_clock_get$1(rtc_clock/g; - $line =~ s/\bqemu_register_clock_reset_notifier\s*\(rtc_clock\b/qemu_register_clock_reset_notifier(qemu_clock_ptr(rtc_clock)/g; - - unless ($option_rtc) - { - # fix up comments - $line =~ s/\b(vm_|rt_|host_)clock\b/XXX_$1clock/g if ($line =~ m,^[/ ]+\*,); - - # spurious fprintf error reporting - $line =~ s/: qemu_new_timer_ns failed/: timer_new_ns failed/g; - - # these have just changed name - $line =~ s/\bqemu_mod_timer\b/timer_mod/g; - $line =~ s/\bqemu_mod_timer_(ns|us|ms)\b/timer_mod_$1/g; - $line =~ s/\bqemu_free_timer\b/timer_free/g; - $line =~ s/\bqemu_del_timer\b/timer_del/g; - } - - # fix up rtc_clock - $line =~ s/QEMUClock \*rtc_clock;/QEMUClockType rtc_clock;/g; - $line =~ s/\brtc_clock = (vm_|rt_|host_)clock\b/rtc_clock = XXX_$1clock/g; - - unless ($option_rtc) - { - # replace any more general uses - $line =~ s/\b(vm_|rt_|host_)clock\b/qemu_clock_ptr(XXX_$1clock)/g; - } - - # fix up the place holders - $line =~ s/\bXXX_vm_clock\b/QEMU_CLOCK_VIRTUAL/g; - $line =~ s/\bXXX_rt_clock\b/QEMU_CLOCK_REALTIME/g; - $line =~ s/\bXXX_host_clock\b/QEMU_CLOCK_HOST/g; - - unless ($option_rtc) - { - DoWarn("$ifn:$linenum WARNING: timer $1 not fixed up", $line) if ($line =~ /\b((vm_|rt_|host_)clock)\b/); - DoWarn("$ifn:$linenum WARNING: function $1 not fixed up", $line) if ($line =~ /\b(qemu_new_timer\w+)\b/); - DoWarn("$ifn:$linenum WARNING: legacy function $1 remains", $line) if ($line =~ /$legacyre/o); - } - - $outtext .= $line; - } - - close $input; - - if ($intext ne $outtext) - { - print STDERR "Patching $ifn\n" unless ($option_quiet); - unless ($option_dryrun) - { - open my $output, ">", $ofn || die "Cannot open $ofn for write: $!"; - print $output $outtext; - close $output; - rename ($ofn, $ifn) || die "Cannot rename temp file to $ifn: $!"; - return 1; - } - } - return 0; -} - -sub DoCommit -{ - my $file = shift @_; - open (my $git, "| git commit -F - $file") || die "Cannot run git commit on $file: $!"; - print $git "timers api: use new timer api in $file\n\nConvert $file to use new timer API.\nThis is an automated commit made by scripts/switch-timer-api\n"; - close ($git); -} - -ParseOptions; - -foreach my $file (@files) -{ - my $changed = Process ($file); - DoCommit($file) if ($changed && $option_git); -} From patchwork Mon Feb 21 11:59:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12753587 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 AC0F0C433F5 for ; Mon, 21 Feb 2022 12:48:17 +0000 (UTC) Received: from localhost ([::1]:38100 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nM86u-0003iB-8s for qemu-devel@archiver.kernel.org; Mon, 21 Feb 2022 07:48:12 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50490) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7O7-00040D-Eh for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:55 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:26439) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7O5-0000uH-Mg for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645444911; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2zDxyUQCIYSBimr5MnShN2wZxhJ6OCFQSGm+jDm8kcg=; b=bLp5JXgdCBeYo/aDoJrdtBe10VffDfF9gOmu6PU75njdXjwajcdyZVxx1WGdWxvV1qmvIJ BtfLuIOhIuoHkRoN6BV20R1f/B5niNg5PGsihzzOcgaK6OMbD9vX9pT7Pbrd3sDhFZYMhz boG+pGjuHF/KRWfmFaWMZF2iU79GX+s= 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-571-VUsHuQEFPO24RvyLz-hreA-1; Mon, 21 Feb 2022 07:01:47 -0500 X-MC-Unique: VUsHuQEFPO24RvyLz-hreA-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 9F338801AC5; Mon, 21 Feb 2022 12:01:46 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4F2B073160; Mon, 21 Feb 2022 12:01:45 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 14/25] hw/tpm: Clean includes Date: Mon, 21 Feb 2022 12:59:57 +0100 Message-Id: <20220221120008.600114-15-thuth@redhat.com> In-Reply-To: <20220221120008.600114-1-thuth@redhat.com> References: <20220221120008.600114-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@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.082, 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: , Cc: Peter Maydell , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé "tpm_ppi.h" only requires to include "exec/memory.h" to get the MemoryRegion declaration. tpm_ppi.c requires "hw/qdev-core.h" to use the DEVICE() macro, tpm_crb.c is the only source file requiring "exec/address-spaces.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Message-Id: <20220207082756.82600-2-f4bug@amsat.org> Signed-off-by: Thomas Huth --- hw/tpm/tpm_crb.c | 1 + hw/tpm/tpm_ppi.c | 4 ++-- hw/tpm/tpm_ppi.h | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/hw/tpm/tpm_crb.c b/hw/tpm/tpm_crb.c index 58ebd1469c..aa9c00aad3 100644 --- a/hw/tpm/tpm_crb.c +++ b/hw/tpm/tpm_crb.c @@ -18,6 +18,7 @@ #include "qemu/module.h" #include "qapi/error.h" +#include "exec/address-spaces.h" #include "hw/qdev-properties.h" #include "hw/pci/pci_ids.h" #include "hw/acpi/tpm.h" diff --git a/hw/tpm/tpm_ppi.c b/hw/tpm/tpm_ppi.c index 274e9aa4b0..6dbb9f41e4 100644 --- a/hw/tpm/tpm_ppi.c +++ b/hw/tpm/tpm_ppi.c @@ -14,9 +14,9 @@ #include "qemu/osdep.h" #include "qapi/error.h" -#include "cpu.h" #include "sysemu/memory_mapping.h" #include "migration/vmstate.h" +#include "hw/qdev-core.h" #include "hw/acpi/tpm.h" #include "tpm_ppi.h" #include "trace.h" @@ -44,7 +44,7 @@ void tpm_ppi_reset(TPMPPI *tpmppi) } } -void tpm_ppi_init(TPMPPI *tpmppi, struct MemoryRegion *m, +void tpm_ppi_init(TPMPPI *tpmppi, MemoryRegion *m, hwaddr addr, Object *obj) { tpmppi->buf = qemu_memalign(qemu_real_host_page_size, diff --git a/hw/tpm/tpm_ppi.h b/hw/tpm/tpm_ppi.h index 6f773c25a0..bf5d4a300f 100644 --- a/hw/tpm/tpm_ppi.h +++ b/hw/tpm/tpm_ppi.h @@ -12,7 +12,7 @@ #ifndef TPM_TPM_PPI_H #define TPM_TPM_PPI_H -#include "exec/address-spaces.h" +#include "exec/memory.h" typedef struct TPMPPI { MemoryRegion ram; @@ -29,7 +29,7 @@ typedef struct TPMPPI { * Register the TPM PPI memory region at @addr on the given address * space for the object @obj. **/ -void tpm_ppi_init(TPMPPI *tpmppi, struct MemoryRegion *m, +void tpm_ppi_init(TPMPPI *tpmppi, MemoryRegion *m, hwaddr addr, Object *obj); /** From patchwork Mon Feb 21 11:59:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12753571 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 73F8CC433EF for ; Mon, 21 Feb 2022 12:19:39 +0000 (UTC) Received: from localhost ([::1]:39326 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nM7fC-0001JL-V0 for qemu-devel@archiver.kernel.org; Mon, 21 Feb 2022 07:19:35 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50522) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7O8-00042e-Ro for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:57 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:49442) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7O5-0000uS-OK for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645444912; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=h22kKYnmQlSIeibPX1ytXm3gSNWbwQINK5KwHp87Nuw=; b=XI3o7HCRR/06E7Tn4VSxYTnbR6ICxT4901nko3rpngFelcQ83XUfd8kZord+o0gcxxFErJ QVcD6zftLyPWYdopUNRGc8pF9RdTq0kn9IcecFUrdtBIYMvpj57gPbk8iEWATJUoAbxRLQ 45PIYX5rv4cUESTjTcpeMYA1b+XM3O4= 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-100-k74x0YkdPtCS2eLhgOHuBw-1; Mon, 21 Feb 2022 07:01:49 -0500 X-MC-Unique: k74x0YkdPtCS2eLhgOHuBw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6223B1091DA1; Mon, 21 Feb 2022 12:01:48 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id E892F7316D; Mon, 21 Feb 2022 12:01:46 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 15/25] hw/remote: Add missing include Date: Mon, 21 Feb 2022 12:59:58 +0100 Message-Id: <20220221120008.600114-16-thuth@redhat.com> In-Reply-To: <20220221120008.600114-1-thuth@redhat.com> References: <20220221120008.600114-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@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.082, 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: , Cc: Peter Maydell , Richard Henderson , Jagannathan Raman , =?utf-8?q?Philippe_Mathieu-Daud?= =?utf-8?q?=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Currently "qemu/error-report.h" is implicitly included, however if headers in include/ get refactored, we get: hw/remote/proxy-memory-listener.c: In function ‘proxy_memory_listener_commit’: hw/remote/proxy-memory-listener.c:183:9: error: implicit declaration of function ‘error_report’; did you mean ‘error_report_err’? [-Werror=implicit-function-declaration] 183 | error_report("Number of fds is more than %d", REMOTE_MAX_FDS); | ^~~~~~~~~~~~ | error_report_err Add the missing "qemu/error-report.h" header to avoid that. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Jagannathan Raman Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Message-Id: <20220207082756.82600-3-f4bug@amsat.org> Signed-off-by: Thomas Huth --- hw/remote/proxy-memory-listener.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/remote/proxy-memory-listener.c b/hw/remote/proxy-memory-listener.c index 882c9b4854..0e893f3189 100644 --- a/hw/remote/proxy-memory-listener.c +++ b/hw/remote/proxy-memory-listener.c @@ -16,6 +16,7 @@ #include "exec/cpu-common.h" #include "exec/ram_addr.h" #include "qapi/error.h" +#include "qemu/error-report.h" #include "hw/remote/mpqemu-link.h" #include "hw/remote/proxy-memory-listener.h" From patchwork Mon Feb 21 11:59:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12753572 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 13F85C433F5 for ; Mon, 21 Feb 2022 12:23:04 +0000 (UTC) Received: from localhost ([::1]:46064 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nM7iZ-00067I-03 for qemu-devel@archiver.kernel.org; Mon, 21 Feb 2022 07:23:03 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50530) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7O9-000431-3G for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:57 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:43601) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7O5-0000uP-N8 for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645444912; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XtH6N6WrafJ+uhxG9D1RxZyvQ14pn7dlDHZeU+PlqaI=; b=QnUjdn74ITOC5+qGIhtG0BBQ6omI2tYKsosVXL8zvd8ODl3NEFpDAeUv+/kxqVV5Ny+AuR NP3pOGKj5H4qMnwTqwxPemRfgdPRIs26VZmvzA+b2gDoTUXiDeOZH7a4pEp0cijnKzxjMj VKKudI8AOXu71CGHAsJI6+LgYkjrcEg= 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-142-8joO1H5OND-jyW-basCxGw-1; Mon, 21 Feb 2022 07:01:51 -0500 X-MC-Unique: 8joO1H5OND-jyW-basCxGw-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 44CC481424C; Mon, 21 Feb 2022 12:01:50 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id BBA3873160; Mon, 21 Feb 2022 12:01:48 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 16/25] hw/acpi/memory_hotplug: Remove unused 'hw/acpi/pc-hotplug.h' header Date: Mon, 21 Feb 2022 12:59:59 +0100 Message-Id: <20220221120008.600114-17-thuth@redhat.com> In-Reply-To: <20220221120008.600114-1-thuth@redhat.com> References: <20220221120008.600114-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@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.082, 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, TVD_SPACE_RATIO=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: , Cc: Peter Maydell , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Igor Mammedov Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Reviewed-by: Igor Mammedov Message-Id: <20220207082756.82600-4-f4bug@amsat.org> Signed-off-by: Thomas Huth --- hw/acpi/memory_hotplug.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/acpi/memory_hotplug.c b/hw/acpi/memory_hotplug.c index a581a2183b..0a7e89a13e 100644 --- a/hw/acpi/memory_hotplug.c +++ b/hw/acpi/memory_hotplug.c @@ -1,6 +1,5 @@ #include "qemu/osdep.h" #include "hw/acpi/memory_hotplug.h" -#include "hw/acpi/pc-hotplug.h" #include "hw/mem/pc-dimm.h" #include "hw/qdev-core.h" #include "migration/vmstate.h" From patchwork Mon Feb 21 12:00:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12753609 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 85495C433F5 for ; Mon, 21 Feb 2022 13:10:02 +0000 (UTC) Received: from localhost ([::1]:55366 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nM8Rz-0008UM-4n for qemu-devel@archiver.kernel.org; Mon, 21 Feb 2022 08:09:59 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50558) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7OA-00045r-L7 for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:58 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:46695) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7O8-0000va-Lo for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645444916; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2zAqBqtgrFSt48jCJWqeZ2YbzpF4L0FKHwROYYlVarY=; b=FsnNI2jswAjs5Y0KgQGmIXpHQ9ewGz+p6AkO+t49wqMhM83cwtioFTdLUUP5/zBsMG46gi JD0KK1Mu02qErjdXKA4TQv0OFk9Sk2N2+aTP+1lWyaVSMUWiiTLULGJOYkDidabwX5VcEW sFo5/nWqLMrH7vXdHfUWVt3tYCsrgr8= 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-641-rpCs6wzjMhmyD5ojtX9ywQ-1; Mon, 21 Feb 2022 07:01:52 -0500 X-MC-Unique: rpCs6wzjMhmyD5ojtX9ywQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C76931091DA0; Mon, 21 Feb 2022 12:01:51 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9BDE673160; Mon, 21 Feb 2022 12:01:50 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 17/25] qtest: Add missing 'hw/qdev-core.h' include Date: Mon, 21 Feb 2022 13:00:00 +0100 Message-Id: <20220221120008.600114-18-thuth@redhat.com> In-Reply-To: <20220221120008.600114-1-thuth@redhat.com> References: <20220221120008.600114-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@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.082, 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: , Cc: Peter Maydell , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Add "hw/qdev-core.h" to avoid when refactoring include/: softmmu/qtest.c:404:9: error: use of undeclared identifier 'NamedGPIOList' NamedGPIOList *ngl; ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Message-Id: <20220207082756.82600-5-f4bug@amsat.org> Signed-off-by: Thomas Huth --- softmmu/qtest.c | 1 + 1 file changed, 1 insertion(+) diff --git a/softmmu/qtest.c b/softmmu/qtest.c index 72751e1fd8..8b7cb6aa8e 100644 --- a/softmmu/qtest.c +++ b/softmmu/qtest.c @@ -19,6 +19,7 @@ #include "chardev/char-fe.h" #include "exec/ioport.h" #include "exec/memory.h" +#include "hw/qdev-core.h" #include "hw/irq.h" #include "qemu/accel.h" #include "sysemu/cpu-timers.h" From patchwork Mon Feb 21 12:00:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12753634 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 BD861C433F5 for ; Mon, 21 Feb 2022 13:29:05 +0000 (UTC) Received: from localhost ([::1]:44082 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nM8kS-0003vt-GF for qemu-devel@archiver.kernel.org; Mon, 21 Feb 2022 08:29:04 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50580) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7OC-00049N-30 for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:02:00 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:22519) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7OA-0000vw-BI for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645444917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=SpeSQVF9GaiikK4x2yRillYZqbqQ/eyOHDBV8JXq8ao=; b=AIWUuEutUGNiq2FdwjxERxmXCWev2DRauqxBrtlJEpP7GMI4ZkZPOSkl9fse5ApvW19ykY L9pn/p9RSmPpGQK5giP/WSyuTOynyKYA7kWlGmB74K56FvIme47q0wjKde8FsXseMmFdlj VWg32jXb49y5AxZ/u1ghKeJpccmvQ4s= 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-488-_siQ2iTmOSaaOcWJHXXpwQ-1; Mon, 21 Feb 2022 07:01:54 -0500 X-MC-Unique: _siQ2iTmOSaaOcWJHXXpwQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 57C6B1F2DA; Mon, 21 Feb 2022 12:01:53 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2F1E473160; Mon, 21 Feb 2022 12:01:52 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 18/25] exec/ramblock: Add missing includes Date: Mon, 21 Feb 2022 13:00:01 +0100 Message-Id: <20220221120008.600114-19-thuth@redhat.com> In-Reply-To: <20220221120008.600114-1-thuth@redhat.com> References: <20220221120008.600114-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@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.082, 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: , Cc: Peter Maydell , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé "exec/ramblock.h" requires "qemu/rcu.h" for the definition of rcu_head, and "exec/ramlist.h" for the definition of RAMBlockNotifier. Add them to avoid when when refactoring include/: include/exec/ramblock.h:26:21: error: field has incomplete type 'struct rcu_head' struct rcu_head rcu; ^ Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Message-Id: <20220207082756.82600-6-f4bug@amsat.org> Signed-off-by: Thomas Huth --- include/exec/ramblock.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/exec/ramblock.h b/include/exec/ramblock.h index 664701b759..6cbedf9e0c 100644 --- a/include/exec/ramblock.h +++ b/include/exec/ramblock.h @@ -21,6 +21,8 @@ #ifndef CONFIG_USER_ONLY #include "cpu-common.h" +#include "qemu/rcu.h" +#include "exec/ramlist.h" struct RAMBlock { struct rcu_head rcu; From patchwork Mon Feb 21 12:00:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12753625 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 CF578C433EF for ; Mon, 21 Feb 2022 13:18:40 +0000 (UTC) Received: from localhost ([::1]:35524 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nM8aN-000621-Jh for qemu-devel@archiver.kernel.org; Mon, 21 Feb 2022 08:18:39 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50576) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7OC-00048t-0k for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:02:00 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:48527) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7OA-0000vs-1z for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:01:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645444917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=v+gaGm0ZvBOu/ICEj0kewLFsgctrDDVnaUKJH44vgYo=; b=SpvoHf9reR0EH5PkQp4QDQ6EmpSCAiojRs2pV+2ZrfRlbqt9C2/LSd6xis7wVdOWj0u2fP JD1A9/swcLxl4Ohm40oHhjuZ8e00P+h6iEdzrUXI/DtbYigQzyHj2Ab7yBFzT0dsLDknwg tpGOQsVnYJgODy3KOXlbE/EHs9nJfC4= 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-615-xvW3BmlOOqaPEHPqotNGyQ-1; Mon, 21 Feb 2022 07:01:56 -0500 X-MC-Unique: xvW3BmlOOqaPEHPqotNGyQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E58BC1091DA0; Mon, 21 Feb 2022 12:01:54 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id ACFC473160; Mon, 21 Feb 2022 12:01:53 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 19/25] core/ptimers: Remove unnecessary 'sysemu/cpus.h' include Date: Mon, 21 Feb 2022 13:00:02 +0100 Message-Id: <20220221120008.600114-20-thuth@redhat.com> In-Reply-To: <20220221120008.600114-1-thuth@redhat.com> References: <20220221120008.600114-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@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.082, 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: , Cc: Peter Maydell , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Message-Id: <20220207082756.82600-7-f4bug@amsat.org> Signed-off-by: Thomas Huth --- hw/core/ptimer.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/core/ptimer.c b/hw/core/ptimer.c index 6ba19fd965..eb5ba1aff7 100644 --- a/hw/core/ptimer.c +++ b/hw/core/ptimer.c @@ -14,7 +14,6 @@ #include "sysemu/cpu-timers.h" #include "sysemu/qtest.h" #include "block/aio.h" -#include "sysemu/cpus.h" #include "hw/clock.h" #define DELTA_ADJUST 1 From patchwork Mon Feb 21 12:00:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12753574 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 8B72CC433F5 for ; Mon, 21 Feb 2022 12:23:12 +0000 (UTC) Received: from localhost ([::1]:46214 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nM7id-0006Ei-QR for qemu-devel@archiver.kernel.org; Mon, 21 Feb 2022 07:23:07 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50658) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7OJ-0004QC-QR for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:02:07 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:22097) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7OH-0000wt-J0 for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:02:07 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645444924; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=TKXos97Q8L92+zP8MP4iLwBvbJCMJlvYVA4wypHnKXI=; b=XJqazEP1hw6aJZdLupNppEs80nKtXtfwKow08C58t/eKEj+j5/WFQKzpDJjzTGkxrzUi6C wQTznv0wYtpai/85Ba90aW3SeG8qjeTPq27tS0zvvgw5wgliAap2hi0rQ0k6kjOMqi2iSM Vxp3PT3QMHDOoZaEFynDWRfNGpAZXSg= 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-230-F3TuscotMvikYB8NvxPmGg-1; Mon, 21 Feb 2022 07:01:58 -0500 X-MC-Unique: F3TuscotMvikYB8NvxPmGg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id BD6E0801AC5; Mon, 21 Feb 2022 12:01:56 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5378F73165; Mon, 21 Feb 2022 12:01:55 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 20/25] target: Add missing "qemu/timer.h" include Date: Mon, 21 Feb 2022 13:00:03 +0100 Message-Id: <20220221120008.600114-21-thuth@redhat.com> In-Reply-To: <20220221120008.600114-1-thuth@redhat.com> References: <20220221120008.600114-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@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.082, 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: , Cc: Peter Maydell , Alistair Francis , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé timer_new_ns(), cpu_get_host_ticks() and NANOSECONDS_PER_SECOND are declared in "qemu/timer.h". Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Reviewed-by: Alistair Francis Message-Id: <20220207082756.82600-8-f4bug@amsat.org> Signed-off-by: Thomas Huth --- target/arm/cpu.c | 1 + target/arm/helper.c | 1 + target/hppa/cpu.c | 1 + target/riscv/csr.c | 1 + target/sparc/helper.c | 1 + 5 files changed, 5 insertions(+) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index 5a9c02a256..525974b936 100644 --- a/target/arm/cpu.c +++ b/target/arm/cpu.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "qemu/qemu-print.h" +#include "qemu/timer.h" #include "qemu-common.h" #include "target/arm/idau.h" #include "qemu/module.h" diff --git a/target/arm/helper.c b/target/arm/helper.c index b5f80988c9..795b35532f 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -15,6 +15,7 @@ #include "exec/helper-proto.h" #include "qemu/host-utils.h" #include "qemu/main-loop.h" +#include "qemu/timer.h" #include "qemu/bitops.h" #include "qemu/crc32c.h" #include "qemu/qemu-print.h" diff --git a/target/hppa/cpu.c b/target/hppa/cpu.c index 37b763fca0..5f46ba801e 100644 --- a/target/hppa/cpu.c +++ b/target/hppa/cpu.c @@ -21,6 +21,7 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "qemu/qemu-print.h" +#include "qemu/timer.h" #include "cpu.h" #include "qemu/module.h" #include "exec/exec-all.h" diff --git a/target/riscv/csr.c b/target/riscv/csr.c index fe2c8dd40e..a938760a3f 100644 --- a/target/riscv/csr.c +++ b/target/riscv/csr.c @@ -19,6 +19,7 @@ #include "qemu/osdep.h" #include "qemu/log.h" +#include "qemu/timer.h" #include "cpu.h" #include "qemu/main-loop.h" #include "exec/exec-all.h" diff --git a/target/sparc/helper.c b/target/sparc/helper.c index c7bcaa3a20..c4358bba84 100644 --- a/target/sparc/helper.c +++ b/target/sparc/helper.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "cpu.h" #include "exec/exec-all.h" +#include "qemu/timer.h" #include "qemu/host-utils.h" #include "exec/helper-proto.h" From patchwork Mon Feb 21 12:00:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12753578 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 0246BC433F5 for ; Mon, 21 Feb 2022 12:28:23 +0000 (UTC) Received: from localhost ([::1]:54128 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nM7nj-0003PI-1m for qemu-devel@archiver.kernel.org; Mon, 21 Feb 2022 07:28:23 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50612) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7OH-0004Ir-CM for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:02:05 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:46200) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7OF-0000wg-5L for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:02:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645444922; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Qz4Utmcb36D+GeT2YpbLSiZuBL7d/3KXIiCYF/5iFnU=; b=H3j5m44k1Abhu+Ak+6vvKTwfMOwkTyEcqlOcEjHzIHNp+y52c+DVMXhu44SDdKI6ouHwid dpv0Rwu4okxPzHAPAUs3cZQe2sQ6AULG0OdYD1FqR/1bDdJKk4UnmTugqM1wkO35PTiloJ Zqslz6pT3t6bk0j/5/ygOcvaySOgp1s= 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-422-lu4OAXtiPfG56PmI1_Jzrg-1; Mon, 21 Feb 2022 07:01:59 -0500 X-MC-Unique: lu4OAXtiPfG56PmI1_Jzrg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4E93A100C661; Mon, 21 Feb 2022 12:01:58 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1F4A973160; Mon, 21 Feb 2022 12:01:56 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 21/25] linux-user: Add missing "qemu/timer.h" include Date: Mon, 21 Feb 2022 13:00:04 +0100 Message-Id: <20220221120008.600114-22-thuth@redhat.com> In-Reply-To: <20220221120008.600114-1-thuth@redhat.com> References: <20220221120008.600114-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@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.082, 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: , Cc: Peter Maydell , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé "qemu/timer.h" declares cpu_get_host_ticks(). Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Thomas Huth Reviewed-by: Richard Henderson Message-Id: <20220207082756.82600-9-f4bug@amsat.org> Signed-off-by: Thomas Huth --- linux-user/i386/cpu_loop.c | 1 + linux-user/ppc/cpu_loop.c | 1 + 2 files changed, 2 insertions(+) diff --git a/linux-user/i386/cpu_loop.c b/linux-user/i386/cpu_loop.c index 29dfd7cd0c..90bffc1956 100644 --- a/linux-user/i386/cpu_loop.c +++ b/linux-user/i386/cpu_loop.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" #include "qemu.h" +#include "qemu/timer.h" #include "user-internals.h" #include "cpu_loop-common.h" #include "signal-common.h" diff --git a/linux-user/ppc/cpu_loop.c b/linux-user/ppc/cpu_loop.c index 38097b02ff..c5d809916f 100644 --- a/linux-user/ppc/cpu_loop.c +++ b/linux-user/ppc/cpu_loop.c @@ -20,6 +20,7 @@ #include "qemu/osdep.h" #include "qemu-common.h" #include "qemu.h" +#include "qemu/timer.h" #include "user-internals.h" #include "cpu_loop-common.h" #include "signal-common.h" From patchwork Mon Feb 21 12:00:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12753585 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 289D2C4332F for ; Mon, 21 Feb 2022 12:36:15 +0000 (UTC) Received: from localhost ([::1]:34420 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nM7vK-0000tG-9Q for qemu-devel@archiver.kernel.org; Mon, 21 Feb 2022 07:36:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50644) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7OJ-0004NS-4A for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:02:07 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:39861) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7OH-0000wo-0j for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:02:06 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645444924; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=2f5TuqMDLl63qi5MelAUJwA0P80bG4KDuZy1oibWWB0=; b=dHOP6iA0Q9l3uT6zZ8YqmyqsrwwOKdR4RRp7BVF9aYWPt/x84p3ewyhXr8n5jVrnSDwjBP rp0yIZS9YxqPORV8dSntzuNXIM1Gh3vQnSSWilJipN0jU3EeDeXYS4NbsZEV0rTPISuw32 xyQyQf64tjPL7gNKqCRnBY9dMwcdTY4= 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-340-srjjehNoNVWr_VIwsTr9MQ-1; Mon, 21 Feb 2022 07:02:01 -0500 X-MC-Unique: srjjehNoNVWr_VIwsTr9MQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 0FFA61F2DC; Mon, 21 Feb 2022 12:02:00 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id AA7EC73160; Mon, 21 Feb 2022 12:01:58 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 22/25] softmmu/runstate: Clean headers Date: Mon, 21 Feb 2022 13:00:05 +0100 Message-Id: <20220221120008.600114-23-thuth@redhat.com> In-Reply-To: <20220221120008.600114-1-thuth@redhat.com> References: <20220221120008.600114-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@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.082, 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: , Cc: Peter Maydell , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= , Paolo Bonzini Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Add the missing 'qemu/log.h' header and remove the unused 'exec/exec-all.h' one. Reviewed-by: Richard Henderson Reviewed-by: Paolo Bonzini Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20220207075426.81934-14-f4bug@amsat.org> Signed-off-by: Thomas Huth --- softmmu/runstate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/softmmu/runstate.c b/softmmu/runstate.c index 10d9b7365a..3cb2758b33 100644 --- a/softmmu/runstate.c +++ b/softmmu/runstate.c @@ -30,7 +30,6 @@ #include "crypto/cipher.h" #include "crypto/init.h" #include "exec/cpu-common.h" -#include "exec/exec-all.h" #include "exec/gdbstub.h" #include "hw/boards.h" #include "migration/misc.h" @@ -44,6 +43,7 @@ #include "qemu-common.h" #include "qemu/error-report.h" #include "qemu/job.h" +#include "qemu/log.h" #include "qemu/module.h" #include "qemu/plugin.h" #include "qemu/sockets.h" From patchwork Mon Feb 21 12:00:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12753590 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 3BAD5C433F5 for ; Mon, 21 Feb 2022 12:59:25 +0000 (UTC) Received: from localhost ([::1]:43428 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nM8Hj-0008P0-W6 for qemu-devel@archiver.kernel.org; Mon, 21 Feb 2022 07:59:24 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50674) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7OM-0004Uw-Ev for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:02:10 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:50215) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7OJ-0000zw-0C for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:02:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645444926; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Rdiek3RVnzMt3SjtE4JPWvGLnUaV2ZIpghmArxqYI/Y=; b=fc5m3X7SmMdgGABf8VQ33IzTdm7Zft7nHI2amI8D1tKftcWtlyPtPivpcWONR13P1YGXjv Feq2taLdug30iClUWMmR0klhBACK2sshfqJN90YqWA2xFJd4EM8xBMeqqRR0KYqrqHlWM4 rIq+Eawy/GVcEzapwj20WEbtzht5O40= 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-353-Kr7ec-s1MvW0G_uM7z23XQ-1; Mon, 21 Feb 2022 07:02:02 -0500 X-MC-Unique: Kr7ec-s1MvW0G_uM7z23XQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C2764100C662; Mon, 21 Feb 2022 12:02:01 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6638C73160; Mon, 21 Feb 2022 12:02:00 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 23/25] exec/exec-all: Move 'qemu/log.h' include in units requiring it Date: Mon, 21 Feb 2022 13:00:06 +0100 Message-Id: <20220221120008.600114-24-thuth@redhat.com> In-Reply-To: <20220221120008.600114-1-thuth@redhat.com> References: <20220221120008.600114-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@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.082, 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: , Cc: Peter Maydell , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé Many files use "qemu/log.h" declarations but neglect to include it (they inherit it via "exec/exec-all.h"). "exec/exec-all.h" is a core component and shouldn't be used that way. Move the "qemu/log.h" inclusion locally to each unit requiring it. Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: Richard Henderson Acked-by: Thomas Huth Message-Id: <20220207082756.82600-10-f4bug@amsat.org> Signed-off-by: Thomas Huth --- bsd-user/signal.c | 1 + hw/arm/omap1.c | 1 + hw/display/omap_dss.c | 1 + hw/gpio/omap_gpio.c | 1 + hw/input/tsc210x.c | 1 + include/exec/exec-all.h | 2 -- monitor/misc.c | 1 + plugins/api.c | 1 + softmmu/runstate.c | 1 + target/alpha/helper.c | 2 +- target/arm/helper.c | 1 + target/arm/m_helper.c | 1 + target/arm/mte_helper.c | 1 + target/avr/helper.c | 1 + target/cris/helper.c | 1 + target/hexagon/internal.h | 2 ++ target/hexagon/translate.h | 1 + target/hppa/helper.c | 2 +- target/hppa/mem_helper.c | 1 + target/hppa/op_helper.c | 1 + target/i386/helper.c | 1 + target/i386/tcg/int_helper.c | 1 + target/i386/tcg/misc_helper.c | 1 + target/i386/tcg/sysemu/seg_helper.c | 1 + target/i386/tcg/sysemu/svm_helper.c | 1 + target/m68k/op_helper.c | 1 + target/microblaze/cpu.c | 1 + target/microblaze/mmu.c | 1 + target/microblaze/op_helper.c | 1 + target/mips/tcg/exception.c | 1 + target/mips/tcg/sysemu/special_helper.c | 1 + target/mips/tcg/translate.h | 1 + target/openrisc/interrupt.c | 1 + target/openrisc/mmu.c | 1 + target/ppc/excp_helper.c | 1 + target/ppc/misc_helper.c | 1 + target/s390x/tcg/excp_helper.c | 1 + target/s390x/tcg/mem_helper.c | 1 + target/sparc/ldst_helper.c | 1 + target/sparc/mmu_helper.c | 1 + target/tricore/helper.c | 2 +- target/xtensa/dbg_helper.c | 1 + target/xtensa/exc_helper.c | 1 + target/xtensa/fpu_helper.c | 1 + target/xtensa/helper.c | 1 + target/xtensa/mmu_helper.c | 1 + target/xtensa/win_helper.c | 1 + 47 files changed, 47 insertions(+), 5 deletions(-) diff --git a/bsd-user/signal.c b/bsd-user/signal.c index 0bc6d2edbd..8a36b696d8 100644 --- a/bsd-user/signal.c +++ b/bsd-user/signal.c @@ -19,6 +19,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "qemu.h" #include "signal-common.h" #include "trace.h" diff --git a/hw/arm/omap1.c b/hw/arm/omap1.c index 9852c2a07e..f693faa43e 100644 --- a/hw/arm/omap1.c +++ b/hw/arm/omap1.c @@ -18,6 +18,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "qemu/error-report.h" #include "qemu/main-loop.h" #include "qapi/error.h" diff --git a/hw/display/omap_dss.c b/hw/display/omap_dss.c index 21fde58a26..8c0e9ee700 100644 --- a/hw/display/omap_dss.c +++ b/hw/display/omap_dss.c @@ -19,6 +19,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "hw/hw.h" #include "hw/irq.h" #include "ui/console.h" diff --git a/hw/gpio/omap_gpio.c b/hw/gpio/omap_gpio.c index e25084b40c..bd0841d57f 100644 --- a/hw/gpio/omap_gpio.c +++ b/hw/gpio/omap_gpio.c @@ -19,6 +19,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "hw/irq.h" #include "hw/qdev-properties.h" #include "hw/arm/omap.h" diff --git a/hw/input/tsc210x.c b/hw/input/tsc210x.c index 182d3725fc..b0d5c2dd74 100644 --- a/hw/input/tsc210x.c +++ b/hw/input/tsc210x.c @@ -20,6 +20,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "hw/hw.h" #include "audio/audio.h" #include "qemu/timer.h" diff --git a/include/exec/exec-all.h b/include/exec/exec-all.h index 35d8e93976..227e10ba56 100644 --- a/include/exec/exec-all.h +++ b/include/exec/exec-all.h @@ -40,8 +40,6 @@ typedef ram_addr_t tb_page_addr_t; #define TB_PAGE_ADDR_FMT RAM_ADDR_FMT #endif -#include "qemu/log.h" - void gen_intermediate_code(CPUState *cpu, TranslationBlock *tb, int max_insns); void restore_state_to_opc(CPUArchState *env, TranslationBlock *tb, target_ulong *data); diff --git a/monitor/misc.c b/monitor/misc.c index a3a6e47844..b1839cb8ee 100644 --- a/monitor/misc.c +++ b/monitor/misc.c @@ -41,6 +41,7 @@ #include "disas/disas.h" #include "sysemu/balloon.h" #include "qemu/timer.h" +#include "qemu/log.h" #include "sysemu/hw_accel.h" #include "sysemu/runstate.h" #include "authz/list.h" diff --git a/plugins/api.c b/plugins/api.c index 91e0c7074c..7bf71b189d 100644 --- a/plugins/api.c +++ b/plugins/api.c @@ -36,6 +36,7 @@ #include "qemu/osdep.h" #include "qemu/plugin.h" +#include "qemu/log.h" #include "tcg/tcg.h" #include "exec/exec-all.h" #include "exec/ram_addr.h" diff --git a/softmmu/runstate.c b/softmmu/runstate.c index 3cb2758b33..e0d869b21a 100644 --- a/softmmu/runstate.c +++ b/softmmu/runstate.c @@ -42,6 +42,7 @@ #include "qapi/qapi-events-run-state.h" #include "qemu-common.h" #include "qemu/error-report.h" +#include "qemu/log.h" #include "qemu/job.h" #include "qemu/log.h" #include "qemu/module.h" diff --git a/target/alpha/helper.c b/target/alpha/helper.c index b7e7f73b15..dcaa2d03ad 100644 --- a/target/alpha/helper.c +++ b/target/alpha/helper.c @@ -18,7 +18,7 @@ */ #include "qemu/osdep.h" - +#include "qemu/log.h" #include "cpu.h" #include "exec/exec-all.h" #include "fpu/softfloat-types.h" diff --git a/target/arm/helper.c b/target/arm/helper.c index 795b35532f..7bf50fdd76 100644 --- a/target/arm/helper.c +++ b/target/arm/helper.c @@ -8,6 +8,7 @@ #include "qemu/osdep.h" #include "qemu/units.h" +#include "qemu/log.h" #include "target/arm/idau.h" #include "trace.h" #include "cpu.h" diff --git a/target/arm/m_helper.c b/target/arm/m_helper.c index b11e927df1..648a3b3fc1 100644 --- a/target/arm/m_helper.c +++ b/target/arm/m_helper.c @@ -19,6 +19,7 @@ #include "qemu/bitops.h" #include "qemu/crc32c.h" #include "qemu/qemu-print.h" +#include "qemu/log.h" #include "exec/exec-all.h" #include /* For crc32 */ #include "semihosting/semihost.h" diff --git a/target/arm/mte_helper.c b/target/arm/mte_helper.c index e09b7e46a2..d11a8c70d0 100644 --- a/target/arm/mte_helper.c +++ b/target/arm/mte_helper.c @@ -18,6 +18,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "internals.h" #include "exec/exec-all.h" diff --git a/target/avr/helper.c b/target/avr/helper.c index 981c29da45..c27f702901 100644 --- a/target/avr/helper.c +++ b/target/avr/helper.c @@ -19,6 +19,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "hw/core/tcg-cpu-ops.h" #include "exec/exec-all.h" diff --git a/target/cris/helper.c b/target/cris/helper.c index a0d6ecdcd3..91e4aeb178 100644 --- a/target/cris/helper.c +++ b/target/cris/helper.c @@ -19,6 +19,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "hw/core/tcg-cpu-ops.h" #include "mmu.h" diff --git a/target/hexagon/internal.h b/target/hexagon/internal.h index 82ac3042ab..b1bfadc3f5 100644 --- a/target/hexagon/internal.h +++ b/target/hexagon/internal.h @@ -18,6 +18,8 @@ #ifndef HEXAGON_INTERNAL_H #define HEXAGON_INTERNAL_H +#include "qemu/log.h" + /* * Change HEX_DEBUG to 1 to turn on debugging output */ diff --git a/target/hexagon/translate.h b/target/hexagon/translate.h index fccfb94340..a245172827 100644 --- a/target/hexagon/translate.h +++ b/target/hexagon/translate.h @@ -19,6 +19,7 @@ #define HEXAGON_TRANSLATE_H #include "qemu/bitmap.h" +#include "qemu/log.h" #include "cpu.h" #include "exec/translator.h" #include "tcg/tcg-op.h" diff --git a/target/hppa/helper.c b/target/hppa/helper.c index 1ccff5765a..e2758d8df3 100644 --- a/target/hppa/helper.c +++ b/target/hppa/helper.c @@ -18,7 +18,7 @@ */ #include "qemu/osdep.h" - +#include "qemu/log.h" #include "cpu.h" #include "fpu/softfloat.h" #include "exec/exec-all.h" diff --git a/target/hppa/mem_helper.c b/target/hppa/mem_helper.c index bf07445cd1..5046cc8f9d 100644 --- a/target/hppa/mem_helper.c +++ b/target/hppa/mem_helper.c @@ -18,6 +18,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "exec/exec-all.h" #include "exec/helper-proto.h" diff --git a/target/hppa/op_helper.c b/target/hppa/op_helper.c index b0dec4ebf4..2810361be0 100644 --- a/target/hppa/op_helper.c +++ b/target/hppa/op_helper.c @@ -18,6 +18,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "exec/exec-all.h" #include "exec/helper-proto.h" diff --git a/target/i386/helper.c b/target/i386/helper.c index 533b29cb91..0639aea11b 100644 --- a/target/i386/helper.c +++ b/target/i386/helper.c @@ -27,6 +27,7 @@ #include "sysemu/hw_accel.h" #include "monitor/monitor.h" #endif +#include "qemu/log.h" void cpu_sync_bndcs_hflags(CPUX86State *env) { diff --git a/target/i386/tcg/int_helper.c b/target/i386/tcg/int_helper.c index 87fa7280ee..599ac968b0 100644 --- a/target/i386/tcg/int_helper.c +++ b/target/i386/tcg/int_helper.c @@ -18,6 +18,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "exec/exec-all.h" #include "qemu/host-utils.h" diff --git a/target/i386/tcg/misc_helper.c b/target/i386/tcg/misc_helper.c index 5769db5ace..24a0eaa3d5 100644 --- a/target/i386/tcg/misc_helper.c +++ b/target/i386/tcg/misc_helper.c @@ -18,6 +18,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "exec/helper-proto.h" #include "exec/exec-all.h" diff --git a/target/i386/tcg/sysemu/seg_helper.c b/target/i386/tcg/sysemu/seg_helper.c index 824b9a5a26..2c9bd007ad 100644 --- a/target/i386/tcg/sysemu/seg_helper.c +++ b/target/i386/tcg/sysemu/seg_helper.c @@ -19,6 +19,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "exec/helper-proto.h" #include "exec/cpu_ldst.h" diff --git a/target/i386/tcg/sysemu/svm_helper.c b/target/i386/tcg/sysemu/svm_helper.c index 6d39611eb6..2b6f450af9 100644 --- a/target/i386/tcg/sysemu/svm_helper.c +++ b/target/i386/tcg/sysemu/svm_helper.c @@ -18,6 +18,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "exec/helper-proto.h" #include "exec/exec-all.h" diff --git a/target/m68k/op_helper.c b/target/m68k/op_helper.c index acbd473515..8decc61240 100644 --- a/target/m68k/op_helper.c +++ b/target/m68k/op_helper.c @@ -17,6 +17,7 @@ * License along with this library; if not, see . */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "exec/helper-proto.h" #include "exec/exec-all.h" diff --git a/target/microblaze/cpu.c b/target/microblaze/cpu.c index b9c888b87e..aed200dcff 100644 --- a/target/microblaze/cpu.c +++ b/target/microblaze/cpu.c @@ -22,6 +22,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "qapi/error.h" #include "cpu.h" #include "qemu/module.h" diff --git a/target/microblaze/mmu.c b/target/microblaze/mmu.c index cc40f275ea..75651979a9 100644 --- a/target/microblaze/mmu.c +++ b/target/microblaze/mmu.c @@ -19,6 +19,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "exec/exec-all.h" diff --git a/target/microblaze/op_helper.c b/target/microblaze/op_helper.c index 58d633584d..5b745d0928 100644 --- a/target/microblaze/op_helper.c +++ b/target/microblaze/op_helper.c @@ -19,6 +19,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "exec/helper-proto.h" #include "qemu/host-utils.h" diff --git a/target/mips/tcg/exception.c b/target/mips/tcg/exception.c index 7b3026b105..0b21e0872b 100644 --- a/target/mips/tcg/exception.c +++ b/target/mips/tcg/exception.c @@ -19,6 +19,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "internal.h" #include "exec/helper-proto.h" diff --git a/target/mips/tcg/sysemu/special_helper.c b/target/mips/tcg/sysemu/special_helper.c index 2a2afb49e8..f4f8fe8afc 100644 --- a/target/mips/tcg/sysemu/special_helper.c +++ b/target/mips/tcg/sysemu/special_helper.c @@ -19,6 +19,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "exec/helper-proto.h" #include "exec/exec-all.h" diff --git a/target/mips/tcg/translate.h b/target/mips/tcg/translate.h index ae01515efe..9997fe2f3c 100644 --- a/target/mips/tcg/translate.h +++ b/target/mips/tcg/translate.h @@ -8,6 +8,7 @@ #ifndef TARGET_MIPS_TRANSLATE_H #define TARGET_MIPS_TRANSLATE_H +#include "qemu/log.h" #include "exec/translator.h" #define MIPS_DEBUG_DISAS 0 diff --git a/target/openrisc/interrupt.c b/target/openrisc/interrupt.c index 19223e3f25..e5724f5371 100644 --- a/target/openrisc/interrupt.c +++ b/target/openrisc/interrupt.c @@ -18,6 +18,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "exec/exec-all.h" #include "exec/gdbstub.h" diff --git a/target/openrisc/mmu.c b/target/openrisc/mmu.c index e561ef245b..d7e1320998 100644 --- a/target/openrisc/mmu.c +++ b/target/openrisc/mmu.c @@ -19,6 +19,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "exec/exec-all.h" #include "exec/gdbstub.h" diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index f44b9da2a5..6538c56ab0 100644 --- a/target/ppc/excp_helper.c +++ b/target/ppc/excp_helper.c @@ -18,6 +18,7 @@ */ #include "qemu/osdep.h" #include "qemu/main-loop.h" +#include "qemu/log.h" #include "cpu.h" #include "exec/exec-all.h" #include "internal.h" diff --git a/target/ppc/misc_helper.c b/target/ppc/misc_helper.c index 29e73a6ffd..06aa716cab 100644 --- a/target/ppc/misc_helper.c +++ b/target/ppc/misc_helper.c @@ -18,6 +18,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "exec/exec-all.h" #include "exec/helper-proto.h" diff --git a/target/s390x/tcg/excp_helper.c b/target/s390x/tcg/excp_helper.c index 4e7648f301..be6c966cfa 100644 --- a/target/s390x/tcg/excp_helper.c +++ b/target/s390x/tcg/excp_helper.c @@ -19,6 +19,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "s390x-internal.h" #include "exec/helper-proto.h" diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c index 406578d105..b5523ef3c7 100644 --- a/target/s390x/tcg/mem_helper.c +++ b/target/s390x/tcg/mem_helper.c @@ -19,6 +19,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "s390x-internal.h" #include "tcg_s390x.h" diff --git a/target/sparc/ldst_helper.c b/target/sparc/ldst_helper.c index a3e1cf9b6e..ec4fae78c3 100644 --- a/target/sparc/ldst_helper.c +++ b/target/sparc/ldst_helper.c @@ -18,6 +18,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "tcg/tcg.h" #include "exec/helper-proto.h" diff --git a/target/sparc/mmu_helper.c b/target/sparc/mmu_helper.c index f2668389b0..346a6dfa35 100644 --- a/target/sparc/mmu_helper.c +++ b/target/sparc/mmu_helper.c @@ -18,6 +18,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "exec/exec-all.h" #include "qemu/qemu-print.h" diff --git a/target/tricore/helper.c b/target/tricore/helper.c index c5e997f321..1db32808e8 100644 --- a/target/tricore/helper.c +++ b/target/tricore/helper.c @@ -16,7 +16,7 @@ */ #include "qemu/osdep.h" - +#include "qemu/log.h" #include "cpu.h" #include "exec/exec-all.h" #include "fpu/softfloat-helpers.h" diff --git a/target/xtensa/dbg_helper.c b/target/xtensa/dbg_helper.c index be1f81107b..ce2a820c60 100644 --- a/target/xtensa/dbg_helper.c +++ b/target/xtensa/dbg_helper.c @@ -26,6 +26,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "qemu/main-loop.h" #include "cpu.h" #include "exec/helper-proto.h" diff --git a/target/xtensa/exc_helper.c b/target/xtensa/exc_helper.c index 9bc7f50d35..d4823a65cd 100644 --- a/target/xtensa/exc_helper.c +++ b/target/xtensa/exc_helper.c @@ -26,6 +26,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "qemu/main-loop.h" #include "cpu.h" #include "exec/helper-proto.h" diff --git a/target/xtensa/fpu_helper.c b/target/xtensa/fpu_helper.c index ba3c29d19d..d2a10cc797 100644 --- a/target/xtensa/fpu_helper.c +++ b/target/xtensa/fpu_helper.c @@ -26,6 +26,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "qemu/main-loop.h" #include "cpu.h" #include "exec/helper-proto.h" diff --git a/target/xtensa/helper.c b/target/xtensa/helper.c index 29d216ec1b..e0a9caab4b 100644 --- a/target/xtensa/helper.c +++ b/target/xtensa/helper.c @@ -26,6 +26,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "cpu.h" #include "exec/exec-all.h" #include "exec/gdbstub.h" diff --git a/target/xtensa/mmu_helper.c b/target/xtensa/mmu_helper.c index 57e319a1af..fa66e8e867 100644 --- a/target/xtensa/mmu_helper.c +++ b/target/xtensa/mmu_helper.c @@ -26,6 +26,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "qemu/main-loop.h" #include "qemu/qemu-print.h" #include "qemu/units.h" diff --git a/target/xtensa/win_helper.c b/target/xtensa/win_helper.c index f6f96a64c3..5a1555360a 100644 --- a/target/xtensa/win_helper.c +++ b/target/xtensa/win_helper.c @@ -26,6 +26,7 @@ */ #include "qemu/osdep.h" +#include "qemu/log.h" #include "qemu/main-loop.h" #include "cpu.h" #include "exec/helper-proto.h" From patchwork Mon Feb 21 12:00:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12753589 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 B930BC433F5 for ; Mon, 21 Feb 2022 12:57:42 +0000 (UTC) Received: from localhost ([::1]:41730 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nM8G5-00075K-IX for qemu-devel@archiver.kernel.org; Mon, 21 Feb 2022 07:57:41 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50660) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7OK-0004RT-GZ for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:02:08 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:20921) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7OI-0000xq-9C for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:02:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645444925; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=3SKUrD2tcuSxGW7XYT6Oiv7FEIGl4n5li/VYozanA0w=; b=R+m+4nQeS0A3fftoOh6byf+DSjwQXTRiEjT0by549jAsHQ0g5OEGAxS5/gemCCyQhIM2L1 0Y89y0t9uR0pM/tWOgep7pEh7jKvfNrvU4VvM435Svx2G7DTwgWt1t6roi1YH4wbjXxcMR nm8XNiwYKsYUlECHRs5xfhaxM14WGME= 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-445-TGsuIum-OZCOKtEPHvgnHg-1; Mon, 21 Feb 2022 07:02:04 -0500 X-MC-Unique: TGsuIum-OZCOKtEPHvgnHg-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 55F00814246; Mon, 21 Feb 2022 12:02:03 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id 275E773165; Mon, 21 Feb 2022 12:02:01 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 24/25] hw/m68k/mcf: Add missing 'exec/hwaddr.h' header Date: Mon, 21 Feb 2022 13:00:07 +0100 Message-Id: <20220221120008.600114-25-thuth@redhat.com> In-Reply-To: <20220221120008.600114-1-thuth@redhat.com> References: <20220221120008.600114-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@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.082, 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: , Cc: Peter Maydell , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé hwaddr type is defined in "exec/hwaddr.h". Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20220209215446.58402-3-f4bug@amsat.org> Reviewed-by: Richard Henderson Signed-off-by: Thomas Huth --- include/hw/m68k/mcf.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/hw/m68k/mcf.h b/include/hw/m68k/mcf.h index decf17ce42..8cbd587bbf 100644 --- a/include/hw/m68k/mcf.h +++ b/include/hw/m68k/mcf.h @@ -2,6 +2,7 @@ #define HW_MCF_H /* Motorola ColdFire device prototypes. */ +#include "exec/hwaddr.h" #include "target/m68k/cpu-qom.h" /* mcf_uart.c */ From patchwork Mon Feb 21 12:00:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 12753596 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 BA934C433F5 for ; Mon, 21 Feb 2022 13:06:03 +0000 (UTC) Received: from localhost ([::1]:50172 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nM8OA-0004qt-PY for qemu-devel@archiver.kernel.org; Mon, 21 Feb 2022 08:06:02 -0500 Received: from eggs.gnu.org ([209.51.188.92]:50696) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7OU-0004Zg-0w for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:02:18 -0500 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]:37923) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nM7OO-00013J-AD for qemu-devel@nongnu.org; Mon, 21 Feb 2022 07:02:15 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1645444931; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=lyQKbEFOVUQqoRR3+fdJ7I9N2ssLxTllW4bYfe6KHYA=; b=exPqv/scpVy2IGthP64z4gjiB3fslVqj575Ai4h7CvqgrNTj9VcetBZQroh9cTw5SyD0j2 QNlRLRT1jrJlvqu4TOAQBwlTqCIiy5OYsKsazlFh7WA6+VZsKMbP+RzNCfDoNFDULnpnaj xcX1AiJ2Z4u4d/vD8NHrZZoc7rlK4Nk= 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-369-d4eCRp9EP62JA9QpFbYT8Q-1; Mon, 21 Feb 2022 07:02:06 -0500 X-MC-Unique: d4eCRp9EP62JA9QpFbYT8Q-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DD979100C660; Mon, 21 Feb 2022 12:02:04 +0000 (UTC) Received: from thuth.com (unknown [10.39.195.168]) by smtp.corp.redhat.com (Postfix) with ESMTP id AF0F373167; Mon, 21 Feb 2022 12:02:03 +0000 (UTC) From: Thomas Huth To: qemu-devel@nongnu.org Subject: [PULL 25/25] hw/tricore: Remove unused and incorrect header Date: Mon, 21 Feb 2022 13:00:08 +0100 Message-Id: <20220221120008.600114-26-thuth@redhat.com> In-Reply-To: <20220221120008.600114-1-thuth@redhat.com> References: <20220221120008.600114-1-thuth@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=thuth@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Received-SPF: pass client-ip=170.10.129.124; envelope-from=thuth@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.082, 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: , Cc: Peter Maydell , Richard Henderson , =?utf-8?q?Philippe_Mathie?= =?utf-8?q?u-Daud=C3=A9?= Errors-To: qemu-devel-bounces+qemu-devel=archiver.kernel.org@nongnu.org Sender: "Qemu-devel" From: Philippe Mathieu-Daudé TriCore boards certainly don't need the ARM loader API :) Reviewed-by: Richard Henderson Reviewed-by: Thomas Huth Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20220214183144.27402-4-f4bug@amsat.org> Signed-off-by: Thomas Huth --- include/hw/tricore/triboard.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/hw/tricore/triboard.h b/include/hw/tricore/triboard.h index f3844be447..094c8bd563 100644 --- a/include/hw/tricore/triboard.h +++ b/include/hw/tricore/triboard.h @@ -21,7 +21,6 @@ #include "qemu/osdep.h" #include "qapi/error.h" #include "hw/boards.h" -#include "hw/arm/boot.h" #include "sysemu/sysemu.h" #include "exec/address-spaces.h" #include "qom/object.h"