From nobody Fri Apr 26 09:48:47 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1678135622; cv=none; d=zohomail.com; s=zohoarc; b=i1QyA5gVLhQatpMBnqNAOF/w/aqsQllIMmQxpEUISMM/TXLGO93cKpSYwkyNaWmqiR/q/LA4ZF29xM5EUz5G1SFwDaLGxDVB9lQhyfTr3mfbYHmYEQXpy+x2TdAM1zjlYAPtM3OFMhV3AyZFdqveEVTc1MRgsdn5QChKygkJK7o= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678135622; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=jhD/vUEh4pZ22JuLrNLFIW/sbG0k9LfNoV1HqJEHNHs=; b=mN/NvCotLL2za6ajuOr6U99DElcMd98Kxdw4NXhM8E9Uh5DtzYh6nEbflaz8nO3jKe4MeN3ta3nWwFHVfFE+YM9X9jxjvxvrZn/0maIy8xpERpxM+hmzUcW5OQs6dxlNAS8MIJu/EXOAPBKkX9hAvK7F+r9mzY6YmXMt9sbBnjI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1678135622057995.2365903344742; Mon, 6 Mar 2023 12:47:02 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-231-UJqkFfj4MOiiPyjGp016yQ-1; Mon, 06 Mar 2023 15:46:55 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3FDFD100F917; Mon, 6 Mar 2023 20:46:51 +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 985A64035707; Mon, 6 Mar 2023 20:46:50 +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 8F2C819465B6; Mon, 6 Mar 2023 20:46:49 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id BFF31194658F for ; Mon, 6 Mar 2023 20:46:48 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id B0FDC440E0; Mon, 6 Mar 2023 20:46:48 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1106751FF for ; Mon, 6 Mar 2023 20:46:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678135621; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=jhD/vUEh4pZ22JuLrNLFIW/sbG0k9LfNoV1HqJEHNHs=; b=b5wJaPExOmrauE2QBV381sneJCCGUoHY02/478mjiyA0CiGeYWIhwEvn/fSkNStP9OHBr8 ib5V8w4wJPEmU/t0Da/9t61qRtnLxJC9s7C9O3/E3qBp7fXF22VtNq7Jha3Ud4hj1B+h/M QeXLZUazlTCbScIYCE3xASJeUy9Ge4k= X-MC-Unique: UJqkFfj4MOiiPyjGp016yQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 01/15] qemu: validate: Fix logic for validating precence of the HPET timer Date: Mon, 6 Mar 2023 21:46:29 +0100 Message-Id: <4f9afb93d7b310fd88e59e9d2495079eabf9b0f3.1678135546.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 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: 1678135623055100006 Content-Type: text/plain; charset="utf-8" Commit 24cc9cda826 switched over to use -machine hpet, but one of the steps it did was to clear the QEMU_CAPS_NO_HPET capability. The validation check still uses the old capability though which means that for configs which would explicitly enable HPET we'd report an error. Since HPET is an x86(_64) platform specific device, convert the validation check to an architecture check as all supported qemu versions actually support it. Modify a test case to request HPET to catch posible future problems. Fixes: 24cc9cda826 Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_validate.c | 14 +++++++------- .../q35-virt-manager-basic.x86_64-4.2.0.args | 1 - .../q35-virt-manager-basic.x86_64-latest.args | 2 +- tests/qemuxml2argvdata/q35-virt-manager-basic.xml | 2 +- .../q35-virt-manager-basic.x86_64-latest.xml | 2 +- 5 files changed, 10 insertions(+), 11 deletions(-) diff --git a/src/qemu/qemu_validate.c b/src/qemu/qemu_validate.c index 30c11a567a..93077aadfc 100644 --- a/src/qemu/qemu_validate.c +++ b/src/qemu/qemu_validate.c @@ -599,13 +599,13 @@ qemuValidateDomainDefClockTimers(const virDomainDef *= def, break; case VIR_DOMAIN_TIMER_NAME_HPET: - /* no hpet timer available. The only possible action - is to raise an error if present=3D"yes" */ - if (!virQEMUCapsGet(qemuCaps, QEMU_CAPS_NO_HPET) && - timer->present =3D=3D VIR_TRISTATE_BOOL_YES) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - "%s", _("hpet timer is not supported")); - return -1; + if (timer->present =3D=3D VIR_TRISTATE_BOOL_YES) { + if (def->os.arch !=3D VIR_ARCH_I686 && + def->os.arch !=3D VIR_ARCH_X86_64) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("hpet timer is not supported by this = architecture")); + return -1; + } } break; diff --git a/tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-4.2.0.arg= s b/tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-4.2.0.args index d8b840f171..b59f713101 100644 --- a/tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-4.2.0.args +++ b/tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-4.2.0.args @@ -23,7 +23,6 @@ XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-virt-ma= nager-basic/.config \ -mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ -rtc base=3Dutc,driftfix=3Dslew \ -global kvm-pit.lost_tick_policy=3Ddelay \ --no-hpet \ -no-shutdown \ -global ICH9-LPC.disable_s3=3D1 \ -global ICH9-LPC.disable_s4=3D1 \ diff --git a/tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-latest.ar= gs b/tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-latest.args index 4d029fd55f..5a7b5d7629 100644 --- a/tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-latest.args +++ b/tests/qemuxml2argvdata/q35-virt-manager-basic.x86_64-latest.args @@ -10,7 +10,7 @@ XDG_CONFIG_HOME=3D/var/lib/libvirt/qemu/domain--1-virt-ma= nager-basic/.config \ -name guest=3Dvirt-manager-basic,debug-threads=3Don \ -S \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/va= r/lib/libvirt/qemu/domain--1-virt-manager-basic/master-key.aes"}' \ --machine q35,usb=3Doff,vmport=3Doff,dump-guest-core=3Doff,memory-backend= =3Dpc.ram,hpet=3Doff,acpi=3Don \ +-machine q35,usb=3Doff,vmport=3Doff,dump-guest-core=3Doff,memory-backend= =3Dpc.ram,hpet=3Don,acpi=3Don \ -accel kvm \ -cpu qemu64 \ -m 4096 \ diff --git a/tests/qemuxml2argvdata/q35-virt-manager-basic.xml b/tests/qemu= xml2argvdata/q35-virt-manager-basic.xml index c2d82c2c47..75075d0ab4 100644 --- a/tests/qemuxml2argvdata/q35-virt-manager-basic.xml +++ b/tests/qemuxml2argvdata/q35-virt-manager-basic.xml @@ -16,7 +16,7 @@ - + destroy restart diff --git a/tests/qemuxml2xmloutdata/q35-virt-manager-basic.x86_64-latest.= xml b/tests/qemuxml2xmloutdata/q35-virt-manager-basic.x86_64-latest.xml index 5bb00ceb38..08be45b5a5 100644 --- a/tests/qemuxml2xmloutdata/q35-virt-manager-basic.x86_64-latest.xml +++ b/tests/qemuxml2xmloutdata/q35-virt-manager-basic.x86_64-latest.xml @@ -19,7 +19,7 @@ - + destroy restart --=20 2.39.2 From nobody Fri Apr 26 09:48:47 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1678135617; cv=none; d=zohomail.com; s=zohoarc; b=Clqn+FdXU5xcgNLqAVm5Z3x1DxV59qh6lGmd07izYnwPXgXhuXtv2mwk3pRyGXxSWJ57+kpYvGD216e4tQ1fH6eHqcNegEFS75G1WvwND8iEKy9DXQm+JCnQiJaJ2txQT4a4lFwSnZP6Kv++ZM01X3fh4IfR9YhgI2gY1SJpqeE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678135617; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=qFzP1JRyt0GUBqfmtHcv25RT5E+HDqpkMomooEpE9GM=; b=HyjlNnZvXoCTA/TzlvynYgNjnDT4wNn0OsRkUhB/WHfOVp1C2wpBUZPm5znPVvg/N0iQwhj2LXDB4yasHxCXDDfur8jrh0DyWc5gb9+6CXjkGwUdeeT7Hn/xH7HcXRffHESrt3j3rINVhoS06OPUHIbxGTlMIk5rVGBJ9xvZxx4= 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=pass header.from= (p=none dis=none) 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 1678135617971133.04890998132487; Mon, 6 Mar 2023 12:46:57 -0800 (PST) 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-346-3H9x3sKSOIOUN91JE9lRWg-1; Mon, 06 Mar 2023 15:46:55 -0500 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3EC363811F3B; Mon, 6 Mar 2023 20:46:51 +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 22A6A492C18; Mon, 6 Mar 2023 20:46:51 +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 CA5B81946594; Mon, 6 Mar 2023 20:46:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 294B11946594 for ; Mon, 6 Mar 2023 20:46:50 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 1D45E440E0; Mon, 6 Mar 2023 20:46:50 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1A5AB51FF for ; Mon, 6 Mar 2023 20:46:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678135616; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=qFzP1JRyt0GUBqfmtHcv25RT5E+HDqpkMomooEpE9GM=; b=hB5yj76NJrc2WiPvPnXRmAKNHstWDzC4LTUl2yY9+CUSN5PKpIHbgq57hM6fwcN56PhK0m b556tkovX/kWnOmvlvstC4NsYfG4PxZnTnyNy2jmicCKtOVKTGNZA3jbYcGIUFOmnzpgGE kZV2xaUi33ItEDavYxdvJ6byDdQ1QCg= X-MC-Unique: 3H9x3sKSOIOUN91JE9lRWg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 02/15] NEWS: Mention bug in validation of HPET timer Date: Mon, 6 Mar 2023 21:46:30 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 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: 1678135619215100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- NEWS.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/NEWS.rst b/NEWS.rst index 2ccbf0a62a..a5788417f3 100644 --- a/NEWS.rst +++ b/NEWS.rst @@ -37,6 +37,12 @@ v9.2.0 (unreleased) * **Bug fixes** + * qemu: Fix validation of the HPET timer + + Due to a logic bug when determining support for the HPET timer libvirt= would + starting from version 9.0 we'd reject VM configurations explicitly ena= bling + the HPET timer. + v9.1.0 (2023-03-01) =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --=20 2.39.2 From nobody Fri Apr 26 09:48:47 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1678135621; cv=none; d=zohomail.com; s=zohoarc; b=FMUqE4eT99zF72Nj32u26cwhhJj6CDkJBKmq2oK9r+Ai4EyxBoCjwlwMIKUtWBFcT0S/Yc0WAHMcW9X+vfVvq6PfzslU3ta8AT6Y4k7iL9hQ9wmc2fiwerYFwnqa0hSZSononavqiS/61OtvwmKEi+V9AaRFqHKs1e9wHIwQofk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678135621; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=OYLSAhn1vvhbfvdHzPg9l1XE8tpwdjA/uX8Rrn6MROU=; b=XP/8fLlcETa5zM1fZxUKOGG8AyonI4Rqk23HlOdNDxTDqvs6Jd3Bb4I04JubVd7TdxKjDC+2yKk27rDTVyIdK5V2cp/2rYtCvPmIt0IiJjeLMnEkFAVfHef2kBaFpkFn/JBbvMEyd3z0RU2WmNkZ+ZH25pRxTVRz4CNuJMi9iiI= 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=pass header.from= (p=none dis=none) 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 1678135621575920.1030802978788; Mon, 6 Mar 2023 12:47:01 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-460-EcW5wL-GPiibNqEIDIayAA-1; Mon, 06 Mar 2023 15:46:57 -0500 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 2F64B857A88; Mon, 6 Mar 2023 20:46:52 +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 1E431492C1B; Mon, 6 Mar 2023 20:46:52 +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 12081194658D; Mon, 6 Mar 2023 20:46:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 2BC111946589 for ; Mon, 6 Mar 2023 20:46:51 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 1033B440E1; Mon, 6 Mar 2023 20:46:51 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 78CA551FF for ; Mon, 6 Mar 2023 20:46:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678135620; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=OYLSAhn1vvhbfvdHzPg9l1XE8tpwdjA/uX8Rrn6MROU=; b=GDaJAqPWvzBdjOHD5dB/+NpB+VqZvZ51+wIKbbiBBlf/uoAXgUYjQ8MGUD+op+luzpXExu M4ijSvRy4zFptsavxEgfEQkkIKPwToMlApFON4RGinXcBfOxMIuK7b09+TlQJtpViRHeD7 ma2diXxEcweRN8aj2E7N6tpoVHH0jWo= X-MC-Unique: EcW5wL-GPiibNqEIDIayAA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 03/15] qemu: command: Replace check using QEMU_CAPS_NO_ACPI with architecture check Date: Mon, 6 Mar 2023 21:46:31 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 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: 1678135623031100005 Content-Type: text/plain; charset="utf-8" QEMU_CAPS_NO_ACPI is asserted based on architecture, so it can be replaced by a non-capability check. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_command.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 7a1cff1fd0..189be55537 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -5969,7 +5969,9 @@ qemuBuildPMCommandLine(virCommand *cmd, /* Use old syntax of -no-acpi only if qemu didn't report that it suppo= rts the * new syntax */ if (virQEMUCapsMachineSupportsACPI(qemuCaps, def->virtType, def->os.ma= chine) =3D=3D VIR_TRISTATE_BOOL_ABSENT && - virQEMUCapsGet(qemuCaps, QEMU_CAPS_NO_ACPI)) { + (def->os.arch =3D=3D VIR_ARCH_I686 || + def->os.arch =3D=3D VIR_ARCH_X86_64 || + def->os.arch =3D=3D VIR_ARCH_AARCH64)) { if (def->features[VIR_DOMAIN_FEATURE_ACPI] !=3D VIR_TRISTATE_SWITC= H_ON) virCommandAddArg(cmd, "-no-acpi"); } --=20 2.39.2 From nobody Fri Apr 26 09:48:47 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1678135685; cv=none; d=zohomail.com; s=zohoarc; b=eLWaq8bArgOeJX6zUdcN2lFDtt4O+szZV9hDbmWRCASWym/2M2uvy+2/nqMI6Xm+ruBl5gSvVURef14EDiWmC6qTvdeKi0vOWmYWblqyLtU3mnDxKczdboC16EMlmQAOISG7I/eZ5XKnAFNZCkSzDZ89BdWbNbIS+UD0/VGEPUs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678135685; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=07hKYVM9Y1p08CSqCgB++i+r5E8beKP+Hiq9oH4IzWw=; b=Gen49b3NXsP6ysnZhisc8B+QeIw2tvgXHhBccEczMaZMHGuJF3JJXPI4l3tYg2DJLshqYP5vDCVE0I0MWpN5bkS7IcVkyXhXUXPCbGYlolAQK/wPx9Vjui1aJKdEkCCxKpv5WGjOUdKD+RqyDvvBlxVImt2jzAn0ZQzInGS2f9w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1678135685379845.2496266095252; Mon, 6 Mar 2023 12:48:05 -0800 (PST) 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-140--B-h92bHOA2yw_6pWJrWXw-1; Mon, 06 Mar 2023 15:47:00 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 355A93811F3A; Mon, 6 Mar 2023 20:46:53 +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 221322166B26; Mon, 6 Mar 2023 20:46:53 +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 0CBD3194658D; Mon, 6 Mar 2023 20:46:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id EB0C01946589 for ; Mon, 6 Mar 2023 20:46:51 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id DCA10440E1; Mon, 6 Mar 2023 20:46:51 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 65EE251FF for ; Mon, 6 Mar 2023 20:46:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678135684; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=07hKYVM9Y1p08CSqCgB++i+r5E8beKP+Hiq9oH4IzWw=; b=a0Kh3b1HRrlsO9EppGMsjZ7+4hX0WilvVJs8IhOlmzEPcZ8vkemnvE/N4WmDTRmbKPL6/c RMGuz/rchwbvujDu5zmnDQ2hbZ1jPwbYY0J6aY6R3BLIrc0ada3qL2MB+hN4RP5oqVpJrF Jm8JZ9W7LLyz7kIj3rJy10HSeH3ixks= X-MC-Unique: -B-h92bHOA2yw_6pWJrWXw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 04/15] qemu: capabilities: Retire QEMU_CAPS_NO_ACPI Date: Mon, 6 Mar 2023 21:46:32 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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: 1678135687516100001 Content-Type: text/plain; charset="utf-8" The capability is based on a platform check rather than what given qemu supports. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_capabilities.c | 8 +------- src/qemu/qemu_capabilities.h | 2 +- tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_8.0.0.x86_64.xml | 1 - 19 files changed, 2 insertions(+), 25 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index c014c3d501..fe0f2f1c4d 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -172,7 +172,7 @@ VIR_ENUM_IMPL(virQEMUCaps, /* 75 */ "ich9-ahci", /* QEMU_CAPS_ICH9_AHCI */ - "no-acpi", /* QEMU_CAPS_NO_ACPI */ + "no-acpi", /* X_QEMU_CAPS_NO_ACPI */ "fsdev-readonly", /* X_QEMU_CAPS_FSDEV_READONLY */ "virtio-blk-pci.scsi", /* QEMU_CAPS_VIRTIO_BLK_SCSI */ "blk-sg-io", /* X_QEMU_CAPS_VIRTIO_BLK_SG_IO */ @@ -5475,17 +5475,11 @@ virQEMUCapsInitQMPBasicArch(virQEMUCaps *qemuCaps) switch (qemuCaps->arch) { case VIR_ARCH_I686: case VIR_ARCH_X86_64: - /* ACPI only works on x86 and aarch64 */ - virQEMUCapsSet(qemuCaps, QEMU_CAPS_NO_ACPI); - /* HPET is x86 specific */ virQEMUCapsSet(qemuCaps, QEMU_CAPS_NO_HPET); break; case VIR_ARCH_AARCH64: - /* ACPI only works on x86 and aarch64 */ - virQEMUCapsSet(qemuCaps, QEMU_CAPS_NO_ACPI); - /* gic is arm specific */ virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACH_VIRT_GIC_VERSION); break; diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 04c7bfc193..0110174fea 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -150,7 +150,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ /* 75 */ QEMU_CAPS_ICH9_AHCI, /* -device ich9-ahci */ - QEMU_CAPS_NO_ACPI, /* -no-acpi */ + X_QEMU_CAPS_NO_ACPI, /* -no-acpi */ X_QEMU_CAPS_FSDEV_READONLY, /* -fsdev readonly supported */ QEMU_CAPS_VIRTIO_BLK_SCSI, /* virtio-blk-pci.scsi */ X_QEMU_CAPS_VIRTIO_BLK_SG_IO, /* SG_IO commands */ diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_4.2.0.aarch64.xml index 3452b275a6..575e4fb98b 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml @@ -14,7 +14,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_4.2.0.x86_64.xml index 5d36e7e49e..6657f7d393 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml @@ -19,7 +19,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_5.0.0.aarch64.xml index d2efacea98..f0dd035263 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml @@ -14,7 +14,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_5.0.0.x86_64.xml index dd79dc309e..8c145d1926 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml @@ -19,7 +19,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_5.1.0.x86_64.xml index 6e218b0c48..d8a49f0664 100644 --- a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml @@ -19,7 +19,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_5.2.0.aarch64.xml index d45dac7aec..783bf39f42 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml @@ -14,7 +14,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_5.2.0.x86_64.xml index f3c77ac1bd..3c0dde9948 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml @@ -19,7 +19,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_6.0.0.aarch64.xml index c17da78d6d..2bd64c9546 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml @@ -13,7 +13,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_6.0.0.x86_64.xml index 067f6632a6..f5977d3e7e 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml @@ -18,7 +18,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_6.1.0.x86_64.xml index be0f713798..d10b4a6b1e 100644 --- a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml @@ -18,7 +18,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_6.2.0.aarch64.xml index 32aa56c4e9..6d3fbac8ab 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml @@ -17,7 +17,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_6.2.0.x86_64.xml index 9b2242d7c2..aa5361d4dd 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml @@ -18,7 +18,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_7.0.0.aarch64.xml index 37157189a2..05aa663b7b 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml @@ -17,7 +17,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_7.0.0.x86_64.xml index 3439050911..17a63d09e6 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml @@ -18,7 +18,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_7.1.0.x86_64.xml index d9028b1c37..c78c2ea293 100644 --- a/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml @@ -18,7 +18,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_7.2.0.x86_64.xml index 46b1d816b5..e55265ee0b 100644 --- a/tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml @@ -18,7 +18,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_8.0.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_8.0.0.x86_64.xml index ee69898a54..d438e0a8c7 100644 --- a/tests/qemucapabilitiesdata/caps_8.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_8.0.0.x86_64.xml @@ -17,7 +17,6 @@ - --=20 2.39.2 From nobody Fri Apr 26 09:48:47 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1678135632; cv=none; d=zohomail.com; s=zohoarc; b=EZr694Kco7CVKRFpe+Q36RNBWtJdJxdt0hCWyy92a7BPZtse7l8FgDopP/QAnUIcgrbU1tQ2oIyLkPfhSow62kEEhP2hGnIIE+z9+jP7VCXCiJ+77POuLA0MhHmVcp7owwsXCbhu6MDou5GCAnsDKNibUuUm+5fIFK4RAbF3IrI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678135632; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=g1U1enCCqhluHpfaG4HHaT7Rre3o7tLWWfcsEuLv2CA=; b=c1aO71cewjxeX78u9u1PCXZ3zO7ftUzlFAT5g0TEvQ+NMe6KsqZK5MJSkFYvFtrjS/TFADK+wApn5ySW26JJg4Fjf0pXmSfkGHyN2qkA8raZlVxQiLVBo1IpxO2vO/i1MfX2hysvtmJFaj7dKPvaOnXWveCZr9udnNr4Lt4LoaU= 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=pass header.from= (p=none dis=none) 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 1678135632273227.15470235693158; Mon, 6 Mar 2023 12:47:12 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-398-iSJcwv6_Nv6GYvZY6iu7VA-1; Mon, 06 Mar 2023 15:47:03 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 8B0F9857F5E; Mon, 6 Mar 2023 20:46:53 +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 725AD2166B2B; Mon, 6 Mar 2023 20:46:53 +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 464D519465B6; Mon, 6 Mar 2023 20:46:53 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id CE0171946589 for ; Mon, 6 Mar 2023 20:46:52 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id C1AEF51FF; Mon, 6 Mar 2023 20:46:52 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 427F944104 for ; Mon, 6 Mar 2023 20:46:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678135631; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=g1U1enCCqhluHpfaG4HHaT7Rre3o7tLWWfcsEuLv2CA=; b=bJvP9gTG3y8QSjS2B4h7W+htWi3Qe6TGOLrPhrdE743vl6Y+tYFz04sQzYrX0BHvaeRdWZ Upvts5hL3DuVXcqQU0mmJ30o/5XlHhjgK500rDDqM/+3ZZZ48jWqfD8+J6WU01e62cJyLA KBrAVf3kLr6f4YJLLTYnNbQpUtjluKA= X-MC-Unique: iSJcwv6_Nv6GYvZY6iu7VA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 05/15] qemu: command: Format '-no-hpet' based on architecture check Date: Mon, 6 Mar 2023 21:46:33 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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: 1678135633068100005 Content-Type: text/plain; charset="utf-8" Rather than asserting a capability based on architecture, format the fallback parameter based on the presence of the newer capability and an explicit architecture check. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_command.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 189be55537..8d96f69f3d 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -5936,9 +5936,11 @@ qemuBuildClockCommandLine(virCommand *cmd, * -no-hpet exists is VIR_TRISTATE_BOOL_YES, and when -no-hpet * doesn't exist is VIR_TRISTATE_BOOL_NO. "confusing"? "yes"= ! */ - if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_NO_HPET)) { - if (def->clock.timers[i]->present =3D=3D VIR_TRISTATE_BOOL= _NO) - virCommandAddArg(cmd, "-no-hpet"); + if (def->clock.timers[i]->present =3D=3D VIR_TRISTATE_BOOL_NO = && + !virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_HPET) && + (def->os.arch =3D=3D VIR_ARCH_I686 || + def->os.arch =3D=3D VIR_ARCH_X86_64)) { + virCommandAddArg(cmd, "-no-hpet"); } break; } --=20 2.39.2 From nobody Fri Apr 26 09:48:47 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1678135625; cv=none; d=zohomail.com; s=zohoarc; b=HJPqcQn68XBVazVE/4uyZWFQgC4FFFoLbQihQhAoKg4dAW3xkrCh7mrltbzw6SkpV846WMtgiV3wyPH7gDHZ90m4o+AZVGn8UkRcRXP8EapDMEXPSmazjLkX1+IbEgervMgnU/EQRuvvAgJHjeYosxGkgrdxdif/W7ScLc+4kXc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678135625; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=9KuM2AAjVvvP/kVQN5ki2O0vgYpAv73E7kzoxcEFbaU=; b=agQk/W9x9djaYOSwmb6J9G+A0kVYh9ompOrIg174BQdAUxNJdwoIcQCsD9A03+NEOjkYdNKUN8lKh/WdGdSTGMpQKSoXp0sJcjdZn8InZUF7TLu3B2lTdrUh7gB+TA0Jyq4jzEBrKOB+/78N6k609J1VIzoVs4uWH4hvimLh8Ms= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 16781356259411020.2857437248189; Mon, 6 Mar 2023 12:47:05 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-619-yxK85rwWPFi1-ihAJA2sUQ-1; Mon, 06 Mar 2023 15:47:02 -0500 Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9C6DA857A8E; Mon, 6 Mar 2023 20:46:54 +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 8A06D492C18; Mon, 6 Mar 2023 20:46:54 +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 7F312194658D; Mon, 6 Mar 2023 20:46:54 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id EC5F21946589 for ; Mon, 6 Mar 2023 20:46:53 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id C1F25440E1; Mon, 6 Mar 2023 20:46:53 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2F23151FF for ; Mon, 6 Mar 2023 20:46:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678135625; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=9KuM2AAjVvvP/kVQN5ki2O0vgYpAv73E7kzoxcEFbaU=; b=LVrCNLP9oAjGw6rPtamHdAp3SQH3y7s/43UCcZchgNVHW6NY8BQxHVTjhpRdBOoZSkC5ZU TcDQ0LOrJY3SboqSUesja+v4YaNGDkjoyWX0/lPBSaT0Sv+DWiEZeRH3I16z/uMjiPdWTQ m6aDGhD4jHEVIAntdbkAZsInWhkZBX4= X-MC-Unique: yxK85rwWPFi1-ihAJA2sUQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 06/15] qemu: capabilities: Retire QEMU_CAPS_NO_HPET Date: Mon, 6 Mar 2023 21:46:34 +0100 Message-Id: <57ae361fdce289d4fed45e7c8ef4e05bf0a18578.1678135546.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 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: 1678135627085100001 Content-Type: text/plain; charset="utf-8" All uses were replaced by an explicit architecture check. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_capabilities.c | 15 +++------------ src/qemu/qemu_capabilities.h | 2 +- tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml | 1 - tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml | 1 - 12 files changed, 4 insertions(+), 23 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index fe0f2f1c4d..4c1f6d11ed 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -110,7 +110,7 @@ VIR_ENUM_IMPL(virQEMUCaps, /* 30 */ "vhost-net", /* X_QEMU_CAPS_VHOST_NET */ "rtc-td-hack", /* X_QEMU_CAPS_RTC_TD_HACK */ - "no-hpet", /* QEMU_CAPS_NO_HPET */ + "no-hpet", /* X_QEMU_CAPS_NO_HPET */ "no-kvm-pit", /* X_QEMU_CAPS_NO_KVM_PIT */ "tdf", /* X_QEMU_CAPS_TDF */ @@ -5473,12 +5473,6 @@ void virQEMUCapsInitQMPBasicArch(virQEMUCaps *qemuCaps) { switch (qemuCaps->arch) { - case VIR_ARCH_I686: - case VIR_ARCH_X86_64: - /* HPET is x86 specific */ - virQEMUCapsSet(qemuCaps, QEMU_CAPS_NO_HPET); - break; - case VIR_ARCH_AARCH64: /* gic is arm specific */ virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACH_VIRT_GIC_VERSION); @@ -5491,6 +5485,8 @@ virQEMUCapsInitQMPBasicArch(virQEMUCaps *qemuCaps) virQEMUCapsSet(qemuCaps, QEMU_CAPS_LOADPARM); break; + case VIR_ARCH_I686: + case VIR_ARCH_X86_64: case VIR_ARCH_ALPHA: case VIR_ARCH_PPC: case VIR_ARCH_PPCEMB: @@ -5568,11 +5564,6 @@ virQEMUCapsInitProcessCapsInterlock(virQEMUCaps *qem= uCaps) * on a not entirely related witness. */ if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_OBJECT_JSON)) virQEMUCapsSet(qemuCaps, QEMU_CAPS_COMPAT_DEPRECATED); - - /* Modern-style config of the HPET timer overrides support for the '-n= o-hpet' - * option */ - if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_MACHINE_HPET)) - virQEMUCapsClear(qemuCaps, QEMU_CAPS_NO_HPET); } diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 0110174fea..2bb7f1d87d 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -88,7 +88,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for sy= ntax-check */ /* 30 */ X_QEMU_CAPS_VHOST_NET, /* vhost-net support available */ X_QEMU_CAPS_RTC_TD_HACK, /* -rtc-td-hack available */ - QEMU_CAPS_NO_HPET, /* -no-hpet flag is supported */ + X_QEMU_CAPS_NO_HPET, /* -no-hpet flag is supported */ X_QEMU_CAPS_NO_KVM_PIT, /* -no-kvm-pit-reinjection supported */ X_QEMU_CAPS_TDF, /* -tdf flag (user-mode pit catchup) */ diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_4.2.0.x86_64.xml index 6657f7d393..e36983da58 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.x86_64.xml @@ -5,7 +5,6 @@ 0 - diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_5.0.0.x86_64.xml index 8c145d1926..89a083dda8 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.x86_64.xml @@ -5,7 +5,6 @@ 0 - diff --git a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_5.1.0.x86_64.xml index d8a49f0664..f02e843248 100644 --- a/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.1.0.x86_64.xml @@ -5,7 +5,6 @@ 0 - diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_5.2.0.x86_64.xml index 3c0dde9948..293447644e 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.x86_64.xml @@ -5,7 +5,6 @@ 0 - diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_6.0.0.x86_64.xml index f5977d3e7e..fc6a3ffd4a 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.x86_64.xml @@ -5,7 +5,6 @@ 0 - diff --git a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_6.1.0.x86_64.xml index d10b4a6b1e..e5fbc91821 100644 --- a/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.1.0.x86_64.xml @@ -5,7 +5,6 @@ 0 - diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_6.2.0.x86_64.xml index aa5361d4dd..fb1ac7a646 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.x86_64.xml @@ -5,7 +5,6 @@ 0 - diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_7.0.0.x86_64.xml index 17a63d09e6..7b77347a31 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.x86_64.xml @@ -5,7 +5,6 @@ 0 - diff --git a/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_7.1.0.x86_64.xml index c78c2ea293..b9d5a665a9 100644 --- a/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.1.0.x86_64.xml @@ -5,7 +5,6 @@ 0 - diff --git a/tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml b/tests/qemuc= apabilitiesdata/caps_7.2.0.x86_64.xml index e55265ee0b..b79700d4f8 100644 --- a/tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml +++ b/tests/qemucapabilitiesdata/caps_7.2.0.x86_64.xml @@ -5,7 +5,6 @@ 0 - --=20 2.39.2 From nobody Fri Apr 26 09:48:47 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1678135629; cv=none; d=zohomail.com; s=zohoarc; b=DctBvKPP5z0TSBIOFDJ5o3Ie6It3i/WYwF9ivzouATaDZqtxMoBOYVZP/v/JJl0aB4nlnLpo28+nwAAY0mlZ2KRT39Tj9WuEAWY7ovUMrF53k+AJXPRiTMy8HhbzrPhby44ivb2DRqgIrwAVyvoTncFfXqMpOCrnfMMEu4XcbP0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678135629; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=w2Yu7njv0sbLQvyCp3cqOiVh0aEGrxaep93QynnRMZY=; b=W4Rx0KD98aXb0ew2C3MAaKQpngzQRMpep2xK+CF6KxiVRTMaN63ZqO8uXACYsMlfo1Dtk+uiJ8pmOaRWgQwogV3B6C/xwa/Z9i9jhH63bJlpBcXrponoeTx3B60PRIw+u376jnHH9T4i9k63KSm6YCzSRTkmtTqc65/DP57yvJw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1678135629180986.7171761690341; Mon, 6 Mar 2023 12:47:09 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-543-qHOwZtpVPxu5mMrxHGyO9A-1; Mon, 06 Mar 2023 15:47:01 -0500 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id E08AD101A521; Mon, 6 Mar 2023 20:46:55 +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 CD7BD492C3E; Mon, 6 Mar 2023 20:46:55 +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 BCF19194658D; Mon, 6 Mar 2023 20:46:55 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E7BE41946589 for ; Mon, 6 Mar 2023 20:46:54 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id DB5C651FF; Mon, 6 Mar 2023 20:46:54 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2A80C440E1 for ; Mon, 6 Mar 2023 20:46:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678135628; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=w2Yu7njv0sbLQvyCp3cqOiVh0aEGrxaep93QynnRMZY=; b=Nq4LwCrBMo/egjRtKmEXhT9MLNQ7a1RjHPmhn6i6l6EH+CXVQwxiC7IFO8idR84Q1UE+Y4 IPiFibpiUthDILYwdh4eW9bGQdRtQURxXD9AD6qVAFLKezA4h0hOhEi0M4I4uxfjnzyyvs RtwrzTckVUdHpdAX1UndySu5jiU+w4w= X-MC-Unique: qHOwZtpVPxu5mMrxHGyO9A-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 07/15] qemuxml2argvtest: Don't set QEMU_CAPS_MACH_VIRT_GIC_VERSION Date: Mon, 6 Mar 2023 21:46:35 +0100 Message-Id: <608e1db3a5fbe43651832b32f75c02b0bffe87c5.1678135546.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 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: 1678135631063100001 Content-Type: text/plain; charset="utf-8" testUpdateQEMUCaps calls virQEMUCapsInitQMPBasicArch which already sets it. Purge the capability from the testing code. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- tests/qemuxml2argvtest.c | 72 ++++++++++++++-------------------------- 1 file changed, 24 insertions(+), 48 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index c0afb8cf27..757d3ee957 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2458,76 +2458,52 @@ mymain(void) QEMU_CAPS_DEVICE_VIRTIO_MMIO, QEMU_CAPS_KVM); DO_TEST_GIC("aarch64-gic-none", GIC_NONE, - QEMU_CAPS_KVM, - QEMU_CAPS_MACH_VIRT_GIC_VERSION); + QEMU_CAPS_KVM); DO_TEST_GIC("aarch64-gic-none-v2", GIC_V2, - QEMU_CAPS_KVM, - QEMU_CAPS_MACH_VIRT_GIC_VERSION); + QEMU_CAPS_KVM); DO_TEST_GIC("aarch64-gic-none-v3", GIC_V3, - QEMU_CAPS_KVM, - QEMU_CAPS_MACH_VIRT_GIC_VERSION); + QEMU_CAPS_KVM); DO_TEST_GIC("aarch64-gic-none-both", GIC_BOTH, - QEMU_CAPS_KVM, - QEMU_CAPS_MACH_VIRT_GIC_VERSION); - DO_TEST_GIC("aarch64-gic-none-tcg", GIC_BOTH, - QEMU_CAPS_MACH_VIRT_GIC_VERSION); + QEMU_CAPS_KVM); + DO_TEST_FULL("aarch64-gic-none-tcg", "", ARG_GIC, GIC_BOTH, ARG_END); DO_TEST_GIC("aarch64-gic-default", GIC_NONE, - QEMU_CAPS_KVM, - QEMU_CAPS_MACH_VIRT_GIC_VERSION); + QEMU_CAPS_KVM); DO_TEST_GIC("aarch64-gic-default-v2", GIC_V2, - QEMU_CAPS_KVM, - QEMU_CAPS_MACH_VIRT_GIC_VERSION); + QEMU_CAPS_KVM); DO_TEST_GIC("aarch64-gic-default-v3", GIC_V3, - QEMU_CAPS_KVM, - QEMU_CAPS_MACH_VIRT_GIC_VERSION); + QEMU_CAPS_KVM); DO_TEST_GIC("aarch64-gic-default-both", GIC_BOTH, - QEMU_CAPS_KVM, - QEMU_CAPS_MACH_VIRT_GIC_VERSION); + QEMU_CAPS_KVM); DO_TEST_GIC("aarch64-gic-v2", GIC_NONE, - QEMU_CAPS_KVM, - QEMU_CAPS_MACH_VIRT_GIC_VERSION); + QEMU_CAPS_KVM); DO_TEST_GIC("aarch64-gic-v2", GIC_V2, - QEMU_CAPS_KVM, - QEMU_CAPS_MACH_VIRT_GIC_VERSION); + QEMU_CAPS_KVM); DO_TEST_GIC("aarch64-gic-v2", GIC_V3, - QEMU_CAPS_KVM, - QEMU_CAPS_MACH_VIRT_GIC_VERSION); + QEMU_CAPS_KVM); DO_TEST_GIC("aarch64-gic-v2", GIC_BOTH, - QEMU_CAPS_KVM, - QEMU_CAPS_MACH_VIRT_GIC_VERSION); + QEMU_CAPS_KVM); DO_TEST_GIC("aarch64-gic-v3", GIC_NONE, - QEMU_CAPS_KVM, - QEMU_CAPS_MACH_VIRT_GIC_VERSION); + QEMU_CAPS_KVM); DO_TEST_GIC("aarch64-gic-v3", GIC_V2, - QEMU_CAPS_KVM, - QEMU_CAPS_MACH_VIRT_GIC_VERSION); + QEMU_CAPS_KVM); DO_TEST_GIC("aarch64-gic-v3", GIC_V3, - QEMU_CAPS_KVM, - QEMU_CAPS_MACH_VIRT_GIC_VERSION); + QEMU_CAPS_KVM); DO_TEST_GIC("aarch64-gic-v3", GIC_BOTH, - QEMU_CAPS_KVM, - QEMU_CAPS_MACH_VIRT_GIC_VERSION); + QEMU_CAPS_KVM); DO_TEST_GIC("aarch64-gic-host", GIC_NONE, - QEMU_CAPS_KVM, - QEMU_CAPS_MACH_VIRT_GIC_VERSION); + QEMU_CAPS_KVM); DO_TEST_GIC("aarch64-gic-host", GIC_V2, - QEMU_CAPS_KVM, - QEMU_CAPS_MACH_VIRT_GIC_VERSION); + QEMU_CAPS_KVM); DO_TEST_GIC("aarch64-gic-host", GIC_V3, - QEMU_CAPS_KVM, - QEMU_CAPS_MACH_VIRT_GIC_VERSION); + QEMU_CAPS_KVM); DO_TEST_GIC("aarch64-gic-host", GIC_BOTH, - QEMU_CAPS_KVM, - QEMU_CAPS_MACH_VIRT_GIC_VERSION); + QEMU_CAPS_KVM); DO_TEST_PARSE_ERROR("aarch64-gic-invalid", - QEMU_CAPS_KVM, - QEMU_CAPS_MACH_VIRT_GIC_VERSION); + QEMU_CAPS_KVM); DO_TEST_PARSE_ERROR("aarch64-gic-not-virt", - QEMU_CAPS_KVM, - QEMU_CAPS_MACH_VIRT_GIC_VERSION); + QEMU_CAPS_KVM); DO_TEST_PARSE_ERROR("aarch64-gic-not-arm", - QEMU_CAPS_KVM, - QEMU_CAPS_MACH_VIRT_GIC_VERSION); + QEMU_CAPS_KVM); DO_TEST_CAPS_ARCH_LATEST("aarch64-kvm-32-on-64", "aarch64"); DO_TEST("aarch64-pci-serial", QEMU_CAPS_DEVICE_PCI_SERIAL, --=20 2.39.2 From nobody Fri Apr 26 09:48:47 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1678135629; cv=none; d=zohomail.com; s=zohoarc; b=lofHv3fbrfj5awaukYiFsRNLa6hXYZSC0yGlvitH3fQLfFgidKvxzKiKmKltycbMTVdei7QMi4Lp5GSFZR2UiZGJikMr5jF5p18kutqAggR+Ti++l8MjlspO9YKTDp3vyiCjZ5m1RMXdqHgO7eo4gcHoGHnF8OEF1KzYRDIgcVs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678135629; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=mW5UK6YVTS0iBeEmo0otMUxNvOCI7ELXTAImoQL28v0=; b=AMDTjsbn/MC1ylPufe6DfJQCt67xCpZVVtU5TWkJAW6pDPMSNNTnnJ4YNdaIvq9kvdTmUXSME9x3HBsCVivxwVcn6Gr0ISvxyMRdH3FMDHhuoQmsUXn7/TTuHtsMktLQe/c0BQe/qJe+IPBA0VjWnlo8GSn7Fgs2MGlGHMd/BYU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 167813562919787.65880727846434; Mon, 6 Mar 2023 12:47:09 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-349-CXN1ylZuOxmUSqmdDjKcJw-1; Mon, 06 Mar 2023 15:47:04 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 3023C8027FD; Mon, 6 Mar 2023 20:46:58 +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 1DC43C16029; Mon, 6 Mar 2023 20:46:58 +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 00471194658D; Mon, 6 Mar 2023 20:46:58 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 05AF51946589 for ; Mon, 6 Mar 2023 20:46:57 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id E1764440E0; Mon, 6 Mar 2023 20:46:56 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5BA1351FF for ; Mon, 6 Mar 2023 20:46:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678135628; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=mW5UK6YVTS0iBeEmo0otMUxNvOCI7ELXTAImoQL28v0=; b=VGWmpoq6p3y+2jT2IVR63MUB7A+Lc5ZLOCRzxc6szqxaRCIqgvBFZVvBF4f6MGuDzVpI9J 4fe+HZFw2GLVY/JL87iPDFMzzUMomvGkFvLw5W84WlvNNfgFzcERPViMfO1EZN/Ow1qlgw Klj3Tfkrn3WMvdq+NfYSdROuvT+40E0= X-MC-Unique: CXN1ylZuOxmUSqmdDjKcJw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 08/15] qemu: command: Replace caps check for QEMU_CAPS_MACH_VIRT_GIC_VERSION by arch check Date: Mon, 6 Mar 2023 21:46:36 +0100 Message-Id: <1e4b4610c71c5181a046f94025822e8da3a8d672.1678135546.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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: 1678135631067100002 Content-Type: text/plain; charset="utf-8" QEMU_CAPS_MACH_VIRT_GIC_VERSION is always asserted for VIR_ARCH_AARCH64. Note that this patch is a direct conversion of the logic originally residing in the capabilities code. A better coversion would be (based on whether it is available for just AARCH64 or also ARM) to base it on the guest architecture. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_command.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 8d96f69f3d..41abecdb05 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6636,8 +6636,7 @@ qemuAppendDomainFeaturesMachineParam(virBuffer *buf, virBufferAsprintf(buf, ",smm=3D%s", virTristateSwitchTypeToString(= smm)); if (def->features[VIR_DOMAIN_FEATURE_GIC] =3D=3D VIR_TRISTATE_SWITCH_O= N) { - bool hasGICVersionOption =3D virQEMUCapsGet(qemuCaps, - QEMU_CAPS_MACH_VIRT_GIC_= VERSION); + bool hasGICVersionOption =3D virQEMUCapsGetArch(qemuCaps) =3D=3D V= IR_ARCH_AARCH64; switch ((virGICVersion) def->gic_version) { case VIR_GIC_VERSION_2: --=20 2.39.2 From nobody Fri Apr 26 09:48:47 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1678135637; cv=none; d=zohomail.com; s=zohoarc; b=SSIndHwB6Ja0kDfjiK9tCjCxeIiAMsgi84CeTiituZiaJVUPIqlim96hpKFXWClbWqSY059wtdDH36mAPdNB/+JPnea4zRQgiNdGPdCxR7F7YRUWE8Li2cAxfaxfc+OMMLnAgb8M5my538PQ3KYRSpKPF0yuErujZoDLDxlDT4A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678135637; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=xuhbar8T3QzprDRJWs3c9a0xnZPXipjmdA3E/H++bTI=; b=LUPcqOVwOXqMCxuxi/m5i3hQPHqb0nl4STIsd8hze4OrZScVP1SZoFcWqyVmkVtFMM+2ZhNOcH2YAWNmb4QkxTNr66S9IyJCpBvGhVcev4fJjslnXHFigWqFqyDNMD+pt3ZRuQRSaRTkH/AofwpbQpvkfcdDigUIjcHGzK/vxMc= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1678135637148825.4669551273739; Mon, 6 Mar 2023 12:47:17 -0800 (PST) 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-655-x5V8BLWQM1SnbN_xCChmxA-1; Mon, 06 Mar 2023 15:47:10 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 831EF38123A7; Mon, 6 Mar 2023 20:47:07 +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 7140240C83B6; Mon, 6 Mar 2023 20:47:07 +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 61FB71946A49; Mon, 6 Mar 2023 20:47:07 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 052B319465A4 for ; Mon, 6 Mar 2023 20:47:05 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id E5C6751FF; Mon, 6 Mar 2023 20:47:05 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5E401440E1 for ; Mon, 6 Mar 2023 20:46:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678135636; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=xuhbar8T3QzprDRJWs3c9a0xnZPXipjmdA3E/H++bTI=; b=aqSjO+r2K5fuG/MU+Gs6QRYpcq5AKrhTjUvEWshYSI7kqvrDhdpnPIhagKOjtVT/SotoR7 RjhEHa2VoUOf9CKfG2bFxCVUK06Djb3RkgyjzAkFKw6iJGwZTGWEhMWMya6ymM0GN/17qM BO39bGDNjzy/Ny/Kd0ZsqhXigjF0y2g= X-MC-Unique: x5V8BLWQM1SnbN_xCChmxA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 09/15] qemu: capabilities: Retire QEMU_CAPS_MACH_VIRT_GIC_VERSION Date: Mon, 6 Mar 2023 21:46:37 +0100 Message-Id: <65943f1fc71b47b98db71c50f7b23cc83505b919.1678135546.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 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: 1678135639098100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_capabilities.c | 8 ++------ src/qemu/qemu_capabilities.h | 2 +- tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml | 1 - tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml | 1 - 8 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 4c1f6d11ed..9777f5b112 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -341,7 +341,7 @@ VIR_ENUM_IMPL(virQEMUCaps, /* 195 */ "e1000", /* QEMU_CAPS_DEVICE_E1000 */ "virtio-net", /* QEMU_CAPS_DEVICE_VIRTIO_NET */ - "gic-version", /* QEMU_CAPS_MACH_VIRT_GIC_VERSION */ + "gic-version", /* X_QEMU_CAPS_MACH_VIRT_GIC_VERSION */ "incoming-defer", /* X_QEMU_CAPS_INCOMING_DEFER */ "virtio-gpu", /* QEMU_CAPS_DEVICE_VIRTIO_GPU */ @@ -5473,11 +5473,6 @@ void virQEMUCapsInitQMPBasicArch(virQEMUCaps *qemuCaps) { switch (qemuCaps->arch) { - case VIR_ARCH_AARCH64: - /* gic is arm specific */ - virQEMUCapsSet(qemuCaps, QEMU_CAPS_MACH_VIRT_GIC_VERSION); - break; - case VIR_ARCH_S390: case VIR_ARCH_S390X: virQEMUCapsSet(qemuCaps, QEMU_CAPS_AES_KEY_WRAP); @@ -5485,6 +5480,7 @@ virQEMUCapsInitQMPBasicArch(virQEMUCaps *qemuCaps) virQEMUCapsSet(qemuCaps, QEMU_CAPS_LOADPARM); break; + case VIR_ARCH_AARCH64: case VIR_ARCH_I686: case VIR_ARCH_X86_64: case VIR_ARCH_ALPHA: diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 2bb7f1d87d..7f4884fc93 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -319,7 +319,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ /* 195 */ QEMU_CAPS_DEVICE_E1000, /* -device e1000 */ QEMU_CAPS_DEVICE_VIRTIO_NET, /* -device virtio-net-* */ - QEMU_CAPS_MACH_VIRT_GIC_VERSION, /* -machine virt,gic-version */ + X_QEMU_CAPS_MACH_VIRT_GIC_VERSION, /* -machine virt,gic-version */ X_QEMU_CAPS_INCOMING_DEFER, /* -incoming defer and migrate_incoming */ QEMU_CAPS_DEVICE_VIRTIO_GPU, /* -device virtio-gpu-* */ diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_4.2.0.aarch64.xml index 575e4fb98b..e0cc16e730 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.aarch64.xml @@ -55,7 +55,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_5.0.0.aarch64.xml index f0dd035263..52529690c3 100644 --- a/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_5.0.0.aarch64.xml @@ -57,7 +57,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_5.2.0.aarch64.xml index 783bf39f42..8657478d86 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.aarch64.xml @@ -56,7 +56,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_6.0.0.aarch64.xml index 2bd64c9546..a71b955266 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.aarch64.xml @@ -55,7 +55,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_6.2.0.aarch64.xml index 6d3fbac8ab..c41bf8fefa 100644 --- a/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_6.2.0.aarch64.xml @@ -60,7 +60,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml b/tests/qemu= capabilitiesdata/caps_7.0.0.aarch64.xml index 05aa663b7b..73dd78b555 100644 --- a/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml +++ b/tests/qemucapabilitiesdata/caps_7.0.0.aarch64.xml @@ -60,7 +60,6 @@ - --=20 2.39.2 From nobody Fri Apr 26 09:48:47 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1678135686; cv=none; d=zohomail.com; s=zohoarc; b=OjjZYLdAUjIzGgTZJlhkCepyxz+6CGkBOYQQmPqwl0VyhP6wRdqqnJ9QzKEU+c+0ulEsCcGvqUzk2Fu+m1M/tOa2BUahNuxtD7d36exx8chsTyPUG8Bm9hgM2rfLygMGcFWLKg7222b0U1FojdetRkG+PtdITVSakJfWKEUoaak= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678135686; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=kgn/PaJsR/Tedbev02SMMYfwmYCB5dullqlnUOlIlcM=; b=bGcX5aXWzcki+/qm8w3mOi2CIZGpRx0VvAp5JVVD1u00R+zobuZuqUFQlRG+5hTGhGPI/sqeYaPDz+mVRe4DIL9EwDKQjvfeXp48lltIby/T6hupYFId8YLVCoaQENkvBTBK/q5v+eQRhwzisKvbkN3A2LJ5ErcZ2umijr2ErQg= 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=pass header.from= (p=none dis=none) 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 1678135686194128.26778753074825; Mon, 6 Mar 2023 12:48:06 -0800 (PST) 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-112-eZpvd07uPmiKXj_I0-fk7A-1; Mon, 06 Mar 2023 15:47:12 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id DAE871C29D48; Mon, 6 Mar 2023 20:47:08 +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 C7682C16029; Mon, 6 Mar 2023 20:47:08 +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 B4ECC1946594; Mon, 6 Mar 2023 20:47:08 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id E5ECA194658D for ; Mon, 6 Mar 2023 20:47:06 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id DB528175AD; Mon, 6 Mar 2023 20:47:06 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6366C51FF for ; Mon, 6 Mar 2023 20:47:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678135685; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=kgn/PaJsR/Tedbev02SMMYfwmYCB5dullqlnUOlIlcM=; b=LU0Gw6f7xse0ucuHzCraCMWKz45wJ1aedSBJJLifjrvfhtH1k93mXQPjVDQPek0PuW5hWt xtu2qOogKwcn9vRolZqu7IqUd/u9/+HTZ+RBHk8LiWJyJprRQRKAipkOdFotTJU5lpgQse mQmIc2cj0yxyOSK5oZ3zu82JYU6r3G4= X-MC-Unique: eZpvd07uPmiKXj_I0-fk7A-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 10/15] qemuxml2argvtest: Remove always asserted s390 capabilities Date: Mon, 6 Mar 2023 21:46:38 +0100 Message-Id: <040469f3c4718f4db12a1678bebbaa72aa8452b6.1678135546.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 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: 1678135687523100002 Content-Type: text/plain; charset="utf-8" QEMU_CAPS_AES_KEY_WRAP, QEMU_CAPS_DEA_KEY_WRAP and QEMU_CAPS_LOADPARM are always asserted via virQEMUCapsInitQMPBasicArch thus don't need to be explicitly enabled by tests. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- tests/qemuxml2argvtest.c | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 757d3ee957..cbb57523e9 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -2599,54 +2599,39 @@ mymain(void) DO_TEST_CAPS_LATEST("memory-hotplug-virtio-mem"); DO_TEST("machine-aeskeywrap-on-caps", - QEMU_CAPS_AES_KEY_WRAP, - QEMU_CAPS_DEA_KEY_WRAP, QEMU_CAPS_VIRTIO_SCSI); DO_TEST("machine-aeskeywrap-on-cap", - QEMU_CAPS_AES_KEY_WRAP, QEMU_CAPS_VIRTIO_SCSI); DO_TEST("machine-aeskeywrap-off-caps", - QEMU_CAPS_AES_KEY_WRAP, QEMU_CAPS_DEA_KEY_WRAP, QEMU_CAPS_VIRTIO_SCSI); DO_TEST("machine-aeskeywrap-off-cap", - QEMU_CAPS_AES_KEY_WRAP, QEMU_CAPS_VIRTIO_SCSI); DO_TEST("machine-deakeywrap-on-caps", - QEMU_CAPS_AES_KEY_WRAP, QEMU_CAPS_DEA_KEY_WRAP, QEMU_CAPS_VIRTIO_SCSI); DO_TEST("machine-deakeywrap-on-cap", - QEMU_CAPS_DEA_KEY_WRAP, QEMU_CAPS_VIRTIO_SCSI); DO_TEST("machine-deakeywrap-off-caps", - QEMU_CAPS_AES_KEY_WRAP, QEMU_CAPS_DEA_KEY_WRAP, QEMU_CAPS_VIRTIO_SCSI); DO_TEST("machine-deakeywrap-off-cap", - QEMU_CAPS_DEA_KEY_WRAP, QEMU_CAPS_VIRTIO_SCSI); DO_TEST("machine-keywrap-none-caps", - QEMU_CAPS_AES_KEY_WRAP, QEMU_CAPS_DEA_KEY_WRAP, QEMU_CAPS_VIRTIO_SCSI); DO_TEST("machine-keywrap-none", QEMU_CAPS_VIRTIO_SCSI); - DO_TEST("machine-loadparm-s390", - QEMU_CAPS_LOADPARM); - DO_TEST("machine-loadparm-net-s390", - QEMU_CAPS_LOADPARM); - DO_TEST("machine-loadparm-multiple-disks-nets-s390", - QEMU_CAPS_LOADPARM); - DO_TEST_PARSE_ERROR("machine-loadparm-s390-char-invalid", - QEMU_CAPS_LOADPARM); - DO_TEST_PARSE_ERROR("machine-loadparm-s390-len-invalid", - QEMU_CAPS_LOADPARM); + DO_TEST_NOCAPS("machine-loadparm-s390"); + DO_TEST_NOCAPS("machine-loadparm-net-s390"); + DO_TEST_NOCAPS("machine-loadparm-multiple-disks-nets-s390"); + DO_TEST_PARSE_ERROR_NOCAPS("machine-loadparm-s390-char-invalid"); + DO_TEST_PARSE_ERROR_NOCAPS("machine-loadparm-s390-len-invalid"); DO_TEST_NOCAPS("qemu-ns-domain-ns0"); DO_TEST_NOCAPS("qemu-ns-domain-commandline"); --=20 2.39.2 From nobody Fri Apr 26 09:48:47 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1678135686; cv=none; d=zohomail.com; s=zohoarc; b=i/q5kQn06vaikZu28Ndvje95fKROxXQJ582WYbvV5GOmxZFtOT+Dn6FOp2ngLisSJwEgxGM4aVyL7tHkfJt8YIPmBrSFc0wP7COjMLRAQU/0LM7ellyCEKhYCicgbIIJI/HOb4yNIqyt+xoNBXIbsQdO+LROD3S5axW683F0Xls= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678135686; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=hrEY0tU2EA/SDHWBw8fWR6iLNGudHAMzFZqSwmHX3NA=; b=c04aI4cR+8pE3fGT0FwsnrR4vcirUyyhnMEjkSa2yAd0hozEHoSLpCtbI5yURnvPJwcYjNkRtf564iUXHILkuKCzHeiU1NahPviaW0NGCpcFgLi3TuE+854vX402/kx8w5t5FgDX1DRJkyL89sY0B7pJTNlpno0KF9thWYd5bdU= 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=pass header.from= (p=none dis=none) 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 1678135686727159.26472893088282; Mon, 6 Mar 2023 12:48:06 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-136-I-akkRmlMNe4ZjEJxR1b8A-1; Mon, 06 Mar 2023 15:47:13 -0500 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5D47185CBEC; Mon, 6 Mar 2023 20:47:09 +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 49AF651FF; Mon, 6 Mar 2023 20:47:09 +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 3F48819465A3; Mon, 6 Mar 2023 20:47:09 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 2CA9319465A3 for ; Mon, 6 Mar 2023 20:47:08 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 20012175AD; Mon, 6 Mar 2023 20:47:08 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5483251FF for ; Mon, 6 Mar 2023 20:47:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678135685; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=hrEY0tU2EA/SDHWBw8fWR6iLNGudHAMzFZqSwmHX3NA=; b=AoTCOv9AWMcweqXID60vxCjejK9mlT4CXXzsVdSeaYs1R94ea5iXBNdbjiVcj75pVd2xxE Ye7G3xHUzaFs1MBnFhkXjDtCx8aDh0Wb7HeP4GdzreFSYGNHMlV9z2xLXOJGz+0s4FndpJ BzopXauK1N4pvD7zeFtVtqxm1H2FiJs= X-MC-Unique: I-akkRmlMNe4ZjEJxR1b8A-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 11/15] qemuAppendKeyWrapMachineParms: Format "keywrap" arguments based on architecture Date: Mon, 6 Mar 2023 21:46:39 +0100 Message-Id: <86c896c33ed64f03aaa66cf3154e13f377549cf6.1678135546.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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: 1678135687526100003 Content-Type: text/plain; charset="utf-8" Use the guest architecture to decide whether to format 'aes-key-wrap'/'dea-key-wrap' rather than QEMU_CAPS_AES_KEY_WRAP/QEMU_CAPS_DEA_KEY_WRAP which were set based on architecture. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_command.c | 50 ++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 28 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 41abecdb05..34ce27bb79 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6534,38 +6534,33 @@ qemuBuildCpuCommandLine(virCommand *cmd, } -static bool -qemuAppendKeyWrapMachineParm(virBuffer *buf, virQEMUCaps *qemuCaps, - virQEMUCapsFlags flag, const char *pname, - virTristateSwitch pstate) +static int +qemuAppendKeyWrapMachineParms(virBuffer *buf, + const virDomainDef *def) { - if (pstate !=3D VIR_TRISTATE_SWITCH_ABSENT) { - if (!virQEMUCapsGet(qemuCaps, flag)) { - virReportError(VIR_ERR_CONFIG_UNSUPPORTED, - _("%s is not available with this QEMU binary"),= pname); - return false; - } + if (!def->keywrap) + return 0; - virBufferAsprintf(buf, ",%s=3D%s", pname, - virTristateSwitchTypeToString(pstate)); - } + if (def->keywrap->aes =3D=3D VIR_TRISTATE_SWITCH_ABSENT && + def->keywrap->dea =3D=3D VIR_TRISTATE_SWITCH_ABSENT) + return 0; - return true; -} + if (def->os.arch !=3D VIR_ARCH_S390 && + def->os.arch !=3D VIR_ARCH_S390X) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s", + _("'aes-key-wrap'/'dea-key-wrap' is not available o= n this architecture")); + return -1; + } -static bool -qemuAppendKeyWrapMachineParms(virBuffer *buf, virQEMUCaps *qemuCaps, - const virDomainKeyWrapDef *keywrap) -{ - if (!qemuAppendKeyWrapMachineParm(buf, qemuCaps, QEMU_CAPS_AES_KEY_WRA= P, - "aes-key-wrap", keywrap->aes)) - return false; + if (def->keywrap->aes !=3D VIR_TRISTATE_SWITCH_ABSENT) + virBufferAsprintf(buf, ",aes-key-wrap=3D%s", + virTristateSwitchTypeToString(def->keywrap->aes)= ); - if (!qemuAppendKeyWrapMachineParm(buf, qemuCaps, QEMU_CAPS_DEA_KEY_WRA= P, - "dea-key-wrap", keywrap->dea)) - return false; + if (def->keywrap->dea !=3D VIR_TRISTATE_SWITCH_ABSENT) + virBufferAsprintf(buf, ",dea-key-wrap=3D%s", + virTristateSwitchTypeToString(def->keywrap->dea)= ); - return true; + return 0; } @@ -6865,8 +6860,7 @@ qemuBuildMachineCommandLine(virCommand *cmd, */ virBufferAddLit(&buf, ",usb=3Doff"); - if (def->keywrap && - !qemuAppendKeyWrapMachineParms(&buf, qemuCaps, def->keywrap)) + if (qemuAppendKeyWrapMachineParms(&buf, def) < 0) return -1; if (qemuAppendDomainFeaturesMachineParam(&buf, def, qemuCaps) < 0) --=20 2.39.2 From nobody Fri Apr 26 09:48:47 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1678135639; cv=none; d=zohomail.com; s=zohoarc; b=DUcIElcwL1QWpbFd6GmfLaJ3znZkT4zYa95sNe1nyff5mhrJletmAqkFst8kJhmlPZrioyo2h3EsqvYbZYvSDTFLPu12S+w4zAGD3FIfwX7LO+9UWFnVBoqBwWHhWsIsgrE654PYZwDP6hHLEHWrXiZaDOX5EX2S+OvBzyBEuJM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678135639; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=M+7fekjKaYXKKPY095VxjA7Y8jkbpmmxemgk8LCy/Is=; b=ek0uli4RoNSy+j/6HYdQxiYAmPXP74pr1cs3Azfl0d8P3g9UvlPPVWy0DjBWl6K64GhvNqtxBlt6pj2hWE9JBzRbR//8Z268Pe8yMWwsQxtxjfMX3wTD0O/2hTBLi5+QnG2fnaoYKBGE2+WVqLC1O/8Q63i4SmysKzlOF7Fd/54= 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=pass header.from= (p=none dis=none) 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 1678135639540633.3975072018693; Mon, 6 Mar 2023 12:47:19 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-44-WLwwAnH-PiK-nQ15uaSM6w-1; Mon, 06 Mar 2023 15:47:16 -0500 Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.rdu2.redhat.com [10.11.54.10]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 510108588E1; Mon, 6 Mar 2023 20:47:11 +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 3E6FA492B00; Mon, 6 Mar 2023 20:47:11 +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 0E8BF194658F; Mon, 6 Mar 2023 20:47:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 56E0A19465A2 for ; Mon, 6 Mar 2023 20:47:09 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 3D642175AD; Mon, 6 Mar 2023 20:47:09 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7211B51FF for ; Mon, 6 Mar 2023 20:47:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678135638; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=M+7fekjKaYXKKPY095VxjA7Y8jkbpmmxemgk8LCy/Is=; b=EgGWat+PBMJrqx1iE9z/uB+PUsX6JAK3e6z7JnfyEBB0niLiaMkpQsy+0x9rCYnZ/N5rMY 60h8Jcz0X305OJaFmI4d5ujhOXt+31HZATs2lH3xI2qa284bZVvyux6S7Ig6ZmsEZnsqz3 DPF0IMOkH7zk4sXsP6aamKZBFLwpSTQ= X-MC-Unique: WLwwAnH-PiK-nQ15uaSM6w-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 12/15] qemu: capabilities: Retire QEMU_CAPS_AES_KEY_WRAP and QEMU_CAPS_DEA_KEY_WRAP Date: Mon, 6 Mar 2023 21:46:40 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.10 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: 1678135641094100003 Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_capabilities.c | 6 ++---- src/qemu/qemu_capabilities.h | 4 ++-- tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml | 2 -- tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml | 2 -- tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml | 2 -- 5 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 9777f5b112..50c303d98f 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -322,10 +322,10 @@ VIR_ENUM_IMPL(virQEMUCaps, "qxl-vga.vgamem_mb", /* X_QEMU_CAPS_QXL_VGA_VGAMEM */ "pc-dimm", /* QEMU_CAPS_DEVICE_PC_DIMM */ "machine-vmport-opt", /* QEMU_CAPS_MACHINE_VMPORT_OPT */ - "aes-key-wrap", /* QEMU_CAPS_AES_KEY_WRAP */ + "aes-key-wrap", /* X_QEMU_CAPS_AES_KEY_WRAP */ /* 185 */ - "dea-key-wrap", /* QEMU_CAPS_DEA_KEY_WRAP */ + "dea-key-wrap", /* X_QEMU_CAPS_DEA_KEY_WRAP */ "pci-serial", /* QEMU_CAPS_DEVICE_PCI_SERIAL */ "aarch64-off", /* X_QEMU_CAPS_CPU_AARCH64_OFF */ "vhost-user-multiqueue", /* X_QEMU_CAPS_VHOSTUSER_MULTIQUEUE= */ @@ -5475,8 +5475,6 @@ virQEMUCapsInitQMPBasicArch(virQEMUCaps *qemuCaps) switch (qemuCaps->arch) { case VIR_ARCH_S390: case VIR_ARCH_S390X: - virQEMUCapsSet(qemuCaps, QEMU_CAPS_AES_KEY_WRAP); - virQEMUCapsSet(qemuCaps, QEMU_CAPS_DEA_KEY_WRAP); virQEMUCapsSet(qemuCaps, QEMU_CAPS_LOADPARM); break; diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index 7f4884fc93..fa068dcbff 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -300,10 +300,10 @@ typedef enum { /* virQEMUCapsFlags grouping marker fo= r syntax-check */ X_QEMU_CAPS_QXL_VGA_VGAMEM, /* -device qxl-vga.vgamem_mb */ QEMU_CAPS_DEVICE_PC_DIMM, /* pc-dimm device */ QEMU_CAPS_MACHINE_VMPORT_OPT, /* -machine xxx,vmport=3Don/off/auto */ - QEMU_CAPS_AES_KEY_WRAP, /* -machine aes_key_wrap */ + X_QEMU_CAPS_AES_KEY_WRAP, /* -machine aes_key_wrap */ /* 185 */ - QEMU_CAPS_DEA_KEY_WRAP, /* -machine dea_key_wrap */ + X_QEMU_CAPS_DEA_KEY_WRAP, /* -machine dea_key_wrap */ QEMU_CAPS_DEVICE_PCI_SERIAL, /* -device pci-serial */ X_QEMU_CAPS_CPU_AARCH64_OFF, /* -cpu ...,aarch64=3Doff */ X_QEMU_CAPS_VHOSTUSER_MULTIQUEUE, /* vhost-user with -netdev queues=3D= */ diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_4.2.0.s390x.xml index cd13201c68..c3fd0e4ce3 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml @@ -23,8 +23,6 @@ - - diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_5.2.0.s390x.xml index ac51cd4c1a..0a74ec9f2c 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml @@ -22,8 +22,6 @@ - - diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_6.0.0.s390x.xml index af03684556..ee9516734a 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml @@ -22,8 +22,6 @@ - - --=20 2.39.2 From nobody Fri Apr 26 09:48:47 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1678135642; cv=none; d=zohomail.com; s=zohoarc; b=BC+dkvztrb5p/l6kP6KsvAAMa3NWJLaznssvNUKmAbauBKvXaDmdFvRaBsduaQ1XV76zAZnGQQoYmYSpYj+yRkTTf4Fcxwoi0JNBzJKh4jG6utMKgb3H/nTT1NkSc3QpcZUmLvwI6yKgM/zmxqfrkOCro9rz7U0Ab5kYKAJnflg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678135642; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=nmuO7Hvp+Y9vdfT+JsmeV8Ha6VeeUsMGJbwzQ17NUkQ=; b=GzPwrM/3Pyyh63Pri3hsBxjscsivTKDeQOunuyDa4JSDbSvuRto6BKLJlElRCvi3zUJijOMHjwNjAgi0QZ0Cq9v1GDeTeQIzqLHZjduczYU/s1s4MWkHdkg8rNKg4Nom11xa1WpfXezvGM9Uq1+BINnVkdMEsWGiZHGGReRDVIg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1678135642057990.2509294097409; Mon, 6 Mar 2023 12:47:22 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-79-qdtbb4jdPF-jiMrwhqnGHw-1; Mon, 06 Mar 2023 15:47:18 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 87FC3811E6E; Mon, 6 Mar 2023 20:47:12 +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 764092166B26; Mon, 6 Mar 2023 20:47:12 +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 561A7194658D; Mon, 6 Mar 2023 20:47:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 70F8619465A4 for ; Mon, 6 Mar 2023 20:47:10 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 63EE951FF; Mon, 6 Mar 2023 20:47:10 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9802744104 for ; Mon, 6 Mar 2023 20:47:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678135641; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=nmuO7Hvp+Y9vdfT+JsmeV8Ha6VeeUsMGJbwzQ17NUkQ=; b=MkdkS8udmpx4/hFy6EzaJTGrSHqB/nkoBfBMd47udkw1A75761oZwRiK8RhcxGRulesE+d 5LKJoP8l47TguD4QobisPgipfkQh3gTsKxYRkCXxeWWZGvrlJb9EdayyXGxXjRSAKbiho7 VnR0n6lLiTcmC9Lx1eXvRputZ5Y/No4= X-MC-Unique: qdtbb4jdPF-jiMrwhqnGHw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 13/15] qemuAppendLoadparmMachineParm: Format 'loadparm' based on architecture Date: Mon, 6 Mar 2023 21:46:41 +0100 Message-Id: <90c34130bf939cb52eba75e141ef7d939b8617b6.1678135546.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.6 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: 1678135643159100005 Content-Type: text/plain; charset="utf-8" Check the architecture of the guest rather than relying on QEMU_CAPS_LOADPARM which is set based on architecture. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_command.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 34ce27bb79..7adcac418f 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6570,6 +6570,10 @@ qemuAppendLoadparmMachineParm(virBuffer *buf, { size_t i =3D 0; + if (def->os.arch !=3D VIR_ARCH_S390 && + def->os.arch !=3D VIR_ARCH_S390X) + return; + for (i =3D 0; i < def->ndisks; i++) { virDomainDiskDef *disk =3D def->disks[i]; @@ -6893,8 +6897,7 @@ qemuBuildMachineCommandLine(virCommand *cmd, virBufferAsprintf(&buf, ",max-cpu-compat=3D%s", cpu->model); } - if (virQEMUCapsGet(qemuCaps, QEMU_CAPS_LOADPARM)) - qemuAppendLoadparmMachineParm(&buf, def); + qemuAppendLoadparmMachineParm(&buf, def); if (def->sec) { switch ((virDomainLaunchSecurity) def->sec->sectype) { --=20 2.39.2 From nobody Fri Apr 26 09:48:47 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=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1678135699; cv=none; d=zohomail.com; s=zohoarc; b=ICYUtwxj+TugonpLgd9ZtmbqgNlsfLh78OkQApl8aRow+FF2Me6jMeUlTpwhTVx6HODokUG8NpRqvszKP6m+DkHQVh+qBk4dHvZEYmvei1PAy8ixNz1zpj/o653IOJPAuPoFadBqUgOfvoe5J2gln6GBKME4M+j8BF7Nny9vW6g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678135699; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=GfcRfLhjVFhgoT8Rz8agTDZEIzOG3FVxew7S4xKPj5w=; b=X8+ydDS53tG0EFakgu5lrjHh8Lkk6WDz7MnwOSRgwj2DAkU6KrUgVkc9Kq12zZLKOAqbIFO7w459JESgZtofOPgupO0wsAweIisLtkFXM0AzqKhh7zGhMKV98RSNSH1NT7Z47yDwVUaHxmevRRkADQtPYTa9qeBNwpT3R2q3+a8= 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=pass header.from= (p=none dis=none) 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 1678135699076189.38869368014286; Mon, 6 Mar 2023 12:48:19 -0800 (PST) Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-502-AtFSH63TPjGDhaMF4sPbpw-1; Mon, 06 Mar 2023 15:47:22 -0500 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 E2FA1801CFB; Mon, 6 Mar 2023 20:47:12 +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 CAC102026D2C; Mon, 6 Mar 2023 20:47:12 +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 94FA119465B5; Mon, 6 Mar 2023 20:47:12 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 72283194658F for ; Mon, 6 Mar 2023 20:47:11 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 63C8344108; Mon, 6 Mar 2023 20:47:11 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id C50E851FF for ; Mon, 6 Mar 2023 20:47:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678135698; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=GfcRfLhjVFhgoT8Rz8agTDZEIzOG3FVxew7S4xKPj5w=; b=BmZ5DkDliysSkzF1luHNvpCthHNmg6qnYPd5GLP/t4PtktKvRBY7NGsw8sOK7BpNwDp4Cm djiHccJHnBplMMYYq42cym1GOavHV2ayD4BBqZCJsPN+SA8pwF46QFGX/i9Vvavk9tAC+w GtVx0/izZihHV83b8GIAuKzsfYnkZGU= X-MC-Unique: AtFSH63TPjGDhaMF4sPbpw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 14/15] qemu: capabilities: Retire QEMU_CAPS_LOADPARM Date: Mon, 6 Mar 2023 21:46:42 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 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: 1678135699589100001 Content-Type: text/plain; charset="utf-8" Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_capabilities.c | 5 +---- src/qemu/qemu_capabilities.h | 2 +- tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml | 1 - tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml | 1 - tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml | 1 - 5 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 50c303d98f..76fb739fbc 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -431,7 +431,7 @@ VIR_ENUM_IMPL(virQEMUCaps, /* 260 */ "virtio.ats", /* X_QEMU_CAPS_VIRTIO_PCI_ATS */ - "loadparm", /* QEMU_CAPS_LOADPARM */ + "loadparm", /* X_QEMU_CAPS_LOADPARM */ "spapr-pci-host-bridge", /* QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_= BRIDGE */ "spapr-pci-host-bridge.numa_node", /* QEMU_CAPS_SPAPR_PCI_HO= ST_BRIDGE_NUMA_NODE */ "vnc-multi-servers", /* X_QEMU_CAPS_VNC_MULTI_SERVERS */ @@ -5475,9 +5475,6 @@ virQEMUCapsInitQMPBasicArch(virQEMUCaps *qemuCaps) switch (qemuCaps->arch) { case VIR_ARCH_S390: case VIR_ARCH_S390X: - virQEMUCapsSet(qemuCaps, QEMU_CAPS_LOADPARM); - break; - case VIR_ARCH_AARCH64: case VIR_ARCH_I686: case VIR_ARCH_X86_64: diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index fa068dcbff..dfa0b806de 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -410,7 +410,7 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ /* 260 */ X_QEMU_CAPS_VIRTIO_PCI_ATS, /* virtio-*-pci.ats */ - QEMU_CAPS_LOADPARM, /* -machine loadparm */ + X_QEMU_CAPS_LOADPARM, /* -machine loadparm */ QEMU_CAPS_DEVICE_SPAPR_PCI_HOST_BRIDGE, /* -device spapr-pci-host-brid= ge */ QEMU_CAPS_SPAPR_PCI_HOST_BRIDGE_NUMA_NODE, /* spapr-pci-host-bridge.nu= ma_node=3D */ X_QEMU_CAPS_VNC_MULTI_SERVERS, /* -vnc vnc=3Dunix:/path */ diff --git a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_4.2.0.s390x.xml index c3fd0e4ce3..08d0993ba3 100644 --- a/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_4.2.0.s390x.xml @@ -35,7 +35,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_5.2.0.s390x.xml index 0a74ec9f2c..3ec0bd4c32 100644 --- a/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_5.2.0.s390x.xml @@ -34,7 +34,6 @@ - diff --git a/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml b/tests/qemuca= pabilitiesdata/caps_6.0.0.s390x.xml index ee9516734a..89420c1e9b 100644 --- a/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml +++ b/tests/qemucapabilitiesdata/caps_6.0.0.s390x.xml @@ -34,7 +34,6 @@ - --=20 2.39.2 From nobody Fri Apr 26 09:48:47 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.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.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1678135692; cv=none; d=zohomail.com; s=zohoarc; b=PfZOw+UkrzncGWviVzRVlbhqVTQjc8Q9gX8ttDmWvRduy2PJj86UxlyGFboK1hCcc/BisWap3MPzYXpZarKJgXAeQfWEgXYksmHyrhSqj0H4jt+3xd2LDw26I2DObVD3zdO3B50kFrkQEKWCX6tgTFgnxKKJm+AjM21hnb1OHX0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1678135692; h=Content-Type:Content-Transfer-Encoding:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=dnlMzq0mFatoEsr3VGKatZnDMUf5S7Aaopfj9ANHaXw=; b=Y6asQTBhclW6FdgjxKmFlrzE7+b2FCaXstZz/khfnD/aMXdT8nsoNZJiYwanVIEHagB1CqRfGDLZtD+ryJ2ccPft7kMB9C3IK3i8AvSoqBQADMMDqXu4xMZZhYG5L3BTgdK+LT1NB8AWrMqx5WM89tO2qBjnkT/Wa+tlPUNIH+w= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1678135692335251.9761696637462; Mon, 6 Mar 2023 12:48:12 -0800 (PST) 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-437-kqdiQPczP9K4uMnMjyqkNg-1; Mon, 06 Mar 2023 15:47:18 -0500 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id AF6ED299E75A; Mon, 6 Mar 2023 20:47:14 +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 9B8324014D1D; Mon, 6 Mar 2023 20:47:14 +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 8D48C194658D; Mon, 6 Mar 2023 20:47:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 150221946595 for ; Mon, 6 Mar 2023 20:47:13 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id DE1B151FF; Mon, 6 Mar 2023 20:47:12 +0000 (UTC) Received: from speedmetal.redhat.com (unknown [10.45.242.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id BFED5175AD for ; Mon, 6 Mar 2023 20:47:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1678135691; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=dnlMzq0mFatoEsr3VGKatZnDMUf5S7Aaopfj9ANHaXw=; b=UuGaZjPs/9yx3VvtSoWfCCYfty0E8bz91K2zQ+N8btU1OBVKR14kxwaWsmLz0Po7Jh9xe9 jLP4xBXW5EqORMKdnRIYk2QL4EOhGLhQOySy0Y5qN6M0z9tmc5lvgzag4341aSNYcMVhrH QXvCYBLwM9goO0ANVeTX5A5uXXEcTF8= X-MC-Unique: kqdiQPczP9K4uMnMjyqkNg-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 15/15] qemu: capabilities: Remove unused virQEMUCapsInitQMPBasicArch Date: Mon, 6 Mar 2023 21:46:43 +0100 Message-Id: <21d654c5e1f035283574272d780d8c266fcedd5f.1678135546.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.5 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: , Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 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: 1678135693546100001 Content-Type: text/plain; charset="utf-8" The function doesn't set any capability and we don't want to add arch-dependent always-peresent capabilities in the future. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_capabilities.c | 57 ------------------------------------ src/qemu/qemu_capspriv.h | 3 -- tests/qemuhotplugtest.c | 2 -- tests/qemuxml2argvtest.c | 2 -- tests/qemuxml2xmltest.c | 3 -- 5 files changed, 67 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 76fb739fbc..18c4c0b1cd 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -5462,61 +5462,6 @@ virQEMUCapsInitQMPArch(virQEMUCaps *qemuCaps, } -/** - * virQEMUCapsInitQMPBasicArch: - * @qemuCaps: QEMU capabilities - * - * Initialize @qemuCaps with basic always present and architecture-depende= nt - * capabilities. - */ -void -virQEMUCapsInitQMPBasicArch(virQEMUCaps *qemuCaps) -{ - switch (qemuCaps->arch) { - case VIR_ARCH_S390: - case VIR_ARCH_S390X: - case VIR_ARCH_AARCH64: - case VIR_ARCH_I686: - case VIR_ARCH_X86_64: - case VIR_ARCH_ALPHA: - case VIR_ARCH_PPC: - case VIR_ARCH_PPCEMB: - case VIR_ARCH_SH4: - case VIR_ARCH_SH4EB: - case VIR_ARCH_RISCV32: - case VIR_ARCH_RISCV64: - case VIR_ARCH_SPARC: - case VIR_ARCH_SPARC64: - case VIR_ARCH_ARMV6L: - case VIR_ARCH_ARMV7L: - case VIR_ARCH_ARMV7B: - case VIR_ARCH_CRIS: - case VIR_ARCH_ITANIUM: - case VIR_ARCH_LM32: - case VIR_ARCH_M68K: - case VIR_ARCH_MICROBLAZE: - case VIR_ARCH_MICROBLAZEEL: - case VIR_ARCH_MIPS: - case VIR_ARCH_MIPSEL: - case VIR_ARCH_MIPS64: - case VIR_ARCH_MIPS64EL: - case VIR_ARCH_OR32: - case VIR_ARCH_PARISC: - case VIR_ARCH_PARISC64: - case VIR_ARCH_PPCLE: - case VIR_ARCH_PPC64: - case VIR_ARCH_PPC64LE: - case VIR_ARCH_UNICORE32: - case VIR_ARCH_XTENSA: - case VIR_ARCH_XTENSAEB: - case VIR_ARCH_NONE: - case VIR_ARCH_LAST: - default: - break; - } -} - - /** * virQEMUCapsInitQMPVersionCaps: * @qemuCaps: QEMU capabilities @@ -5666,8 +5611,6 @@ virQEMUCapsInitQMPMonitor(virQEMUCaps *qemuCaps, if (virQEMUCapsInitQMPArch(qemuCaps, mon) < 0) return -1; - virQEMUCapsInitQMPBasicArch(qemuCaps); - /* initiate all capabilities based on qemu version */ virQEMUCapsInitQMPVersionCaps(qemuCaps); diff --git a/src/qemu/qemu_capspriv.h b/src/qemu/qemu_capspriv.h index 720435f762..60fdf02f06 100644 --- a/src/qemu/qemu_capspriv.h +++ b/src/qemu/qemu_capspriv.h @@ -66,9 +66,6 @@ virQEMUCapsInitCPUModel(virQEMUCaps *qemuCaps, virCPUDef *cpu, bool migratable); -void -virQEMUCapsInitQMPBasicArch(virQEMUCaps *qemuCaps); - qemuMonitorCPUModelInfo * virQEMUCapsGetCPUModelInfo(virQEMUCaps *qemuCaps, virDomainVirtType type); diff --git a/tests/qemuhotplugtest.c b/tests/qemuhotplugtest.c index 3b54a9e957..6a36856d8a 100644 --- a/tests/qemuhotplugtest.c +++ b/tests/qemuhotplugtest.c @@ -70,8 +70,6 @@ qemuHotplugCreateObjects(virDomainXMLOption *xmlopt, priv->qemuCaps =3D virQEMUCapsNew(); - virQEMUCapsInitQMPBasicArch(priv->qemuCaps); - virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_VIRTIO_SCSI); virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_USB_STORAGE); virQEMUCapsSet(priv->qemuCaps, QEMU_CAPS_DEVICE_IVSHMEM_PLAIN); diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index cbb57523e9..740d7a5db5 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -345,8 +345,6 @@ testUpdateQEMUCaps(const struct testQemuInfo *info, virQEMUCapsSetArch(info->qemuCaps, arch); - virQEMUCapsInitQMPBasicArch(info->qemuCaps); - if (testAddCPUModels(info->qemuCaps, !!(info->flags & FLAG_SKIP_LEGACY_CPUS)) < 0) return -1; diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 473031df08..a1f8b004fb 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -41,9 +41,6 @@ testXML2XMLCommon(const struct testQemuInfo *info) else driver.caps =3D linuxCaps; - if (!(info->flags & FLAG_REAL_CAPS)) - virQEMUCapsInitQMPBasicArch(info->qemuCaps); - virFileCacheClear(driver.qemuCapsCache); if (info->args.hostOS =3D=3D HOST_OS_MACOS) --=20 2.39.2