From nobody Sun Feb 8 22:07:45 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.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 216.205.24.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=1623682718; cv=none; d=zohomail.com; s=zohoarc; b=K04QpFHBk8W3Ad2kVcoIYpUhB8rXEPW5ydmdNqDF7xWpLLdEZD0yh+9UeuTkGdZ5vJ34C091wElaDPADukX7POuIEfqIC7obQUbsJSqYWMqyxs2kRj/ORkEUErk9lpHftDMP8RZOuTQ65UlZNTHBig8kJ8dwW5OJMtJIxRy415E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1623682718; 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=kY20W3SATAfFgfI5Axx37uzTUWv48/EHX815TGeAOU4=; b=Q5QMbKk0pZB1HB34rHE8vJH0hILEgvbbpb7V/X9mCwGcR/HPBPAfJnXjz1aqtA6Ydv7JktEjhhZJu6me6nRFLDOHD5fbAECije4qIOef5J86eYAdeqPTilIPn+QSXBMRA7Ig7+nNzRrZetbwTanJbKhi3skJVQjqkBhsHhgTs34= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.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 [216.205.24.124]) by mx.zohomail.com with SMTPS id 1623682718945338.5158645426159; Mon, 14 Jun 2021 07:58:38 -0700 (PDT) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-49-g1CWQscVOquClARTeOpwaw-1; Mon, 14 Jun 2021 10:58:36 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id DC6838049ED; Mon, 14 Jun 2021 14:58:29 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B91A35C22B; Mon, 14 Jun 2021 14:58:29 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 8E41B1809CAF; Mon, 14 Jun 2021 14:58:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 15EEwOEr007927 for ; Mon, 14 Jun 2021 10:58:24 -0400 Received: by smtp.corp.redhat.com (Postfix) id 2236060C0F; Mon, 14 Jun 2021 14:58:24 +0000 (UTC) Received: from antique-laptop.redhat.com (unknown [10.40.208.47]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5114860E3A for ; Mon, 14 Jun 2021 14:58:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1623682718; 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=kY20W3SATAfFgfI5Axx37uzTUWv48/EHX815TGeAOU4=; b=BBUJXFvrLLRlnYN3DUvF6//WYS+UdasX6MUC9QQEfusT7dRXwJ3rb4AD/sucZ0c1tIC2rw buVaDhO+2JRo4FVn1IR3tdE5bd8CUCBulnoGEcXlNrJJOZyTO1wSz/9Qo36hA7QJhsl/ql AibkVNhtl8qIzEUDoA0T74KtYZjFwMY= X-MC-Unique: g1CWQscVOquClARTeOpwaw-1 From: Pavel Hrdina To: libvir-list@redhat.com Subject: [libvirt PATCH v2 1/6] qemu_capabilities: introduce confidential-guest-support capability Date: Mon, 14 Jun 2021 16:58:09 +0200 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-loop: libvir-list@redhat.com X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" In libvirt we already use `query-command-line-options` QMP command but that is useless as it doesn't provide correct data for `-machine` option. So we need a new and better way to get that data. We already use `qom-list-properties` to get options for specific machine types so we can reuse it to get options for special `none` machine type as a generic arch independent machine type. Signed-off-by: Pavel Hrdina Reviewed-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 10 ++++++++++ src/qemu/qemu_capabilities.h | 3 +++ 2 files changed, 13 insertions(+) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 2b9ab9af60..da1ca34129 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -632,6 +632,9 @@ VIR_ENUM_IMPL(virQEMUCaps, "input-linux", "virtio-gpu-gl-pci", "virtio-vga-gl", + + /* 405 */ + "confidential-guest-support", ); =20 =20 @@ -1756,6 +1759,10 @@ static struct virQEMUCapsStringFlags virQEMUCapsMach= inePropsVirt[] =3D { { "iommu", QEMU_CAPS_MACHINE_VIRT_IOMMU }, }; =20 +static struct virQEMUCapsStringFlags virQEMUCapsMachinePropsGeneric[] =3D { + { "confidential-guest-support", QEMU_CAPS_MACHINE_CONFIDENTAL_GUEST_SU= PPORT }, +}; + static virQEMUCapsObjectTypeProps virQEMUCapsMachineProps[] =3D { { "pseries", virQEMUCapsMachinePropsPSeries, G_N_ELEMENTS(virQEMUCapsMachinePropsPSeries), @@ -1763,6 +1770,9 @@ static virQEMUCapsObjectTypeProps virQEMUCapsMachineP= rops[] =3D { { "virt", virQEMUCapsMachinePropsVirt, G_N_ELEMENTS(virQEMUCapsMachinePropsVirt), -1 }, + { "none", virQEMUCapsMachinePropsGeneric, + G_N_ELEMENTS(virQEMUCapsMachinePropsGeneric), + -1 }, }; =20 static void diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h index eac3e099b1..8af5251f2e 100644 --- a/src/qemu/qemu_capabilities.h +++ b/src/qemu/qemu_capabilities.h @@ -613,6 +613,9 @@ typedef enum { /* virQEMUCapsFlags grouping marker for = syntax-check */ QEMU_CAPS_VIRTIO_GPU_GL_PCI, /* -device virtio-gpu-gl-pci */ QEMU_CAPS_VIRTIO_VGA_GL, /* -device virtio-vga-gl */ =20 + /* 405 */ + QEMU_CAPS_MACHINE_CONFIDENTAL_GUEST_SUPPORT, /* -machine confidential-= guest-support */ + QEMU_CAPS_LAST /* this must always be the last item */ } virQEMUCapsFlags; =20 --=20 2.31.1