From nobody Sat May 18 03:46:17 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) client-ip=170.10.133.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=quarantine dis=quarantine) header.from=suse.com ARC-Seal: i=1; a=rsa-sha256; t=1662620870; cv=none; d=zohomail.com; s=zohoarc; b=caYdh9dRf9IzUfA84MpNiWehTTtiEx9k9C5Qgjxf3hpCD4sFWfEXPkGapyW0ePQB+Q2IGzAHwnna2r7yZtNABUMw4QOJC4juALobqpKqhmapNPS6GyNteh//fOSXbEChIDotpKAIL2bNQvdqqxqJKabWO5qexqYFSbir2HsMF0A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1662620870; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=vGVRHA01IneQXh4C9WoBP3IQ2BfDWvV5ICgBLCbvM+c=; b=nYoH59wtoxDn4mH6mSaC7bsjPbw8YE0VmmvLIJTd3HUAD1Pttl9m2X7vp6Ww4MWORplBkVnnOrnAEk2W9OcY3eIMx9RrJWMHhX+IRy19KB/JHAM6s3NBcRY/a6tluHjRZ93qjdDVv+BzsLSH4oOcQE9aqauOTbCObiqvEGJGJwM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail header.from= (p=quarantine dis=quarantine) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.zohomail.com with SMTPS id 1662620870495746.3226448342349; Thu, 8 Sep 2022 00:07:50 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-626-eodPy0XhMdKVAHuj3uwu6A-1; Thu, 08 Sep 2022 03:07:45 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2BEB02A5955B; Thu, 8 Sep 2022 07:07:43 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (unknown [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id DB9B12026D64; Thu, 8 Sep 2022 07:07:40 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id B0B1B1946A48; Thu, 8 Sep 2022 07:07:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 42C0B1946A44 for ; Thu, 8 Sep 2022 07:07:39 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id DA1AE2166B29; Thu, 8 Sep 2022 07:07:38 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast08.extmail.prod.ext.rdu2.redhat.com [10.11.55.24]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D56032166B26 for ; Thu, 8 Sep 2022 07:07:38 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B18CF3826A45 for ; Thu, 8 Sep 2022 07:07:38 +0000 (UTC) Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2051.outbound.protection.outlook.com [40.107.104.51]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-349-MlVy16OQO1Cl_EDUwasbZw-1; Thu, 08 Sep 2022 03:07:31 -0400 Received: from AM9PR04MB8602.eurprd04.prod.outlook.com (2603:10a6:20b:439::12) by DB6PR0401MB2566.eurprd04.prod.outlook.com (2603:10a6:4:39::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.14; Thu, 8 Sep 2022 07:07:27 +0000 Received: from AM9PR04MB8602.eurprd04.prod.outlook.com ([fe80::b479:ba12:cf3d:b340]) by AM9PR04MB8602.eurprd04.prod.outlook.com ([fe80::b479:ba12:cf3d:b340%5]) with mapi id 15.20.5612.016; Thu, 8 Sep 2022 07:07:27 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1662620869; h=from:from:sender:sender: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:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=vGVRHA01IneQXh4C9WoBP3IQ2BfDWvV5ICgBLCbvM+c=; b=X3lgtjjn3PNS5XIGKSdSeP/whvICVn2/Fi8IRpLY++aOeCdqDeeKcmWFQr5LZ1zuu5x+wb f+bl/iCpXeuzJfW40xz4g9owD5DMCE1ikydKrVz8YREJzEJxVjcq8XISIrkh5T81DatGr8 poHLzSBAlihKE2Lc4y1GSNLC+mtR5XU= X-MC-Unique: eodPy0XhMdKVAHuj3uwu6A-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: MlVy16OQO1Cl_EDUwasbZw-1 From: Lin Ma To: libvir-list@redhat.com Subject: [libvirt] [PATCH v2] qemu: Remove host-passthrough validation check for host-phys-bits=on Date: Thu, 8 Sep 2022 15:07:22 +0800 Message-ID: <20220908070722.3978-1-lma@suse.com> X-ClientProxiedBy: FR3P281CA0025.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1c::23) To AM9PR04MB8602.eurprd04.prod.outlook.com (2603:10a6:20b:439::12) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM9PR04MB8602:EE_|DB6PR0401MB2566:EE_ X-MS-Office365-Filtering-Correlation-Id: fb5a179d-6d7a-47f6-0137-08da9168c993 X-LD-Processed: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba,ExtFwd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0 X-Microsoft-Antispam-Message-Info: apSgpYjbU1i2WE1gWxWyCjE4A/t4DB1C1rGCS9ScX+vUM4QfSof8BEbRTCXQlFlhRPJ5/OsNN65teyU4BQ4nwyei9ZRCx/b0/im6nS2qViyLq2jkGdpsP7iYvPwC9LCUSQAweEZQ0Ubo/O/keR+i3WgCkmMBtMAt9lGO5fUYMUITRmEvdolXLz8jdZRzvUqgsBVWBwsNFHk24oJzn/ltTnOjUJ85F47sXLNFCrieSdwJZb4m2E3XS2Xsq3FPmUvc7t2vgtXtSnlJrOSwbneXUi2vJSRO4kT9gquZW98df94wcN+XoQA+1+FDLnZOYp+X9NVX55giM1pSnVn75/P+Ccj0iYPGBtvelLAQMemiP6Jy8VMst55Ni5FY6b3hj/7q/odNKpV4q5OjnL+EmdRLKfuZkSay9z7zFgqYGSxcnHflY+7u/h4fXuPTVHHCF2LqexaGcDE7iNf6ULLVOrn2DRf5mei59/y5nvwaheo4CYfTh2EprwD8v5QMLVWqBjKLEtl/X3VCl4R3hU/hiet60uHhIaNIPKcmkzhEIlDq3ynwH0FMwfPnwnIaeVhmJIeUI6cTk/om+VBOXxCD2takQZumhTz+cC1R37HhnuxJjcL78NQ77Cc560L2MhWYZ0IuyUq+jeEU4gkNo8qUG5W4VzLL2KbVCW66LPksc5Qtrpr6ScOkhG1YumOzqVNzGzWudfNER5N5Zq4xyptQLarnJQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM9PR04MB8602.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(39860400002)(346002)(366004)(396003)(136003)(376002)(1076003)(186003)(83380400001)(2616005)(86362001)(66556008)(38100700002)(8936002)(8676002)(4326008)(66476007)(66946007)(6916009)(316002)(2906002)(5660300002)(6512007)(41300700001)(26005)(6506007)(478600001)(107886003)(6486002)(6666004)(36756003); DIR:OUT; SFP:1101 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?lqc1hSqxWch+6Uktkf3gSI2Zg36xNcJe8fw0dwjTviycmLlmLz1cFJITFxQw?= =?us-ascii?Q?k99dLuUsnK9Zy+YgAMkz5Zqlmwjc3iHJtBeY98hVCE85G8v7j+FjCUUGIgm7?= =?us-ascii?Q?TR+bcJak79jfr+HTVeK7Ip3uwFEKtr5E+UDTRjf4rv4465GkE0DkcuYYE7RS?= =?us-ascii?Q?Qa1N3WMaA7m1qV5WEOgexGFGklQe6msTjaTSwVzft4qOp5b6ISohlp8tok6t?= =?us-ascii?Q?F737T01PMTn65DVsqPyI4e3HOfe4MGeg6ZgQ5ToQ/ePJ9vNOdbFs3TJFwRnQ?= =?us-ascii?Q?Yu20O385d9G9PeGu1wzit772274bU/3AxoyMZetoZKHzdtyXb+C5uBizQhn0?= =?us-ascii?Q?wmXFkn9V4iRfDnRY6dD8lNTuPVeuWdZVXN83DQxujeZPeD/hlj5hqgx5aP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7jGb0bq8jsz3Sw8lwS6OFwmM308c?= =?us-ascii?Q?+5F3Ke17jB2NtiqEsuWef10Z3BqcXToXJkbsfDbPviLY4uN29shZ+I8kpggs?= =?us-ascii?Q?g1buIaXqZOxMZ5bi3FPVTtWzyHeib+u6WNcM2l1OlpurpuuBFhYNyu67RVZY?= =?us-ascii?Q?hp1F6SHcP4RtifG2rV1n39xjovGJyzlmdtjFJqHEJ1jPUn9p1W+qZQfBXWnI?= =?us-ascii?Q?7UTeugTukjmct5KL3kbMYkQ66SArxEb75xIYUmYozsoTb90TqH0n/Eq13uAs?= =?us-ascii?Q?heaPotAC9S2dimHKPSI=3D?= X-OriginatorOrg: suse.com X-MS-Exchange-CrossTenant-Network-Message-Id: fb5a179d-6d7a-47f6-0137-08da9168c993 X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8602.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Sep 2022 07:07:27.3951 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: f7a17af6-1c5c-4a36-aa8b-f5be247aa4ba X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: YGtozZSGWrT5uVEvLH5Z5C+LfZoV6yX8l6jl3IcOqVPIcfUshB8wMDpHejI1FAK2 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB6PR0401MB2566 X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lin Ma , dfaggioli@suse.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) X-ZM-MESSAGEID: 1662620871251100001 Content-Type: text/plain; charset="utf-8" Besides the -cpu host, The host-phys-bits=3Don applies to custom or max cpu model, So the host-passthrough validation check is unnecessary for maxphysaddr with mode=3D'passthrough'. Signed-off-by: Lin Ma Reviewed-by: Jim Fehlig --- src/qemu/qemu_validate.c | 7 ------- .../cpu-phys-bits-passthrough2.err | 2 +- .../cpu-phys-bits-passthrough2.xml | 4 ++-- .../cpu-phys-bits-passthrough3.err | 1 - .../cpu-phys-bits-passthrough3.xml | 20 ------------------- tests/qemuxml2argvtest.c | 1 - 6 files changed, 3 insertions(+), 32 deletions(-) delete mode 100644 tests/qemuxml2argvdata/cpu-phys-bits-passthrough3.err delete mode 100644 tests/qemuxml2argvdata/cpu-phys-bits-passthrough3.xml diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 3327f6e24f..34fa10ae32 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -344,13 +344,6 @@ qemuValidateDomainDefCpu(virQEMUDriver *driver, =20 switch (addr->mode) { case VIR_CPU_MAX_PHYS_ADDR_MODE_PASSTHROUGH: - if (def->cpu->mode !=3D VIR_CPU_MODE_HOST_PASSTHROUGH) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("CPU maximum physical address bits mode '= %s' can only be used with '%s' CPUs"), - virCPUMaxPhysAddrModeTypeToString(addr->mod= e), - virCPUModeTypeToString(VIR_CPU_MODE_HOST_PA= SSTHROUGH)); - return -1; - } if (addr->bits !=3D -1) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("CPU maximum physical address bits number= specification cannot be used with mode=3D'%s'"), diff --git a/tests/qemuxml2argvdata/cpu-phys-bits-passthrough2.err b/tests/= qemuxml2argvdata/cpu-phys-bits-passthrough2.err index 22009cc6e6..28f2e43432 100644 --- a/tests/qemuxml2argvdata/cpu-phys-bits-passthrough2.err +++ b/tests/qemuxml2argvdata/cpu-phys-bits-passthrough2.err @@ -1 +1 @@ -unsupported configuration: CPU maximum physical address bits mode 'passthr= ough' can only be used with 'host-passthrough' CPUs +unsupported configuration: CPU maximum physical address bits number specif= ication cannot be used with mode=3D'passthrough' diff --git a/tests/qemuxml2argvdata/cpu-phys-bits-passthrough2.xml b/tests/= qemuxml2argvdata/cpu-phys-bits-passthrough2.xml index 511bbf9949..a94e567dcb 100644 --- a/tests/qemuxml2argvdata/cpu-phys-bits-passthrough2.xml +++ b/tests/qemuxml2argvdata/cpu-phys-bits-passthrough2.xml @@ -8,8 +8,8 @@ hvm - - + + destroy diff --git a/tests/qemuxml2argvdata/cpu-phys-bits-passthrough3.err b/tests/= qemuxml2argvdata/cpu-phys-bits-passthrough3.err deleted file mode 100644 index 28f2e43432..0000000000 --- a/tests/qemuxml2argvdata/cpu-phys-bits-passthrough3.err +++ /dev/null @@ -1 +0,0 @@ -unsupported configuration: CPU maximum physical address bits number specif= ication cannot be used with mode=3D'passthrough' diff --git a/tests/qemuxml2argvdata/cpu-phys-bits-passthrough3.xml b/tests/= qemuxml2argvdata/cpu-phys-bits-passthrough3.xml deleted file mode 100644 index a94e567dcb..0000000000 --- a/tests/qemuxml2argvdata/cpu-phys-bits-passthrough3.xml +++ /dev/null @@ -1,20 +0,0 @@ - - foo - c7a5fdbd-edaf-9455-926a-d65c16db1809 - 219136 - 219136 - 1 - - hvm - - - - - - - destroy - restart - destroy - - - diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index b7c3bc0e2d..c8b69bbd7a 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -3240,7 +3240,6 @@ mymain(void) DO_TEST("cpu-phys-bits-emulate2", QEMU_CAPS_KVM); DO_TEST_PARSE_ERROR("cpu-phys-bits-emulate3", QEMU_CAPS_KVM); DO_TEST_PARSE_ERROR("cpu-phys-bits-passthrough2", QEMU_CAPS_KVM); - DO_TEST_PARSE_ERROR("cpu-phys-bits-passthrough3", QEMU_CAPS_KVM); =20 if (getenv("LIBVIRT_SKIP_CLEANUP") =3D=3D NULL) virFileDeleteTree(fakerootdir); --=20 2.26.2