From nobody Mon Feb 9 01:30:47 2026 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=1672907715; cv=none; d=zohomail.com; s=zohoarc; b=eMwv7YeGyWFE+axqZpwkR6GeQHFi1m60JfhhLAXaTG0cVJqUTwOP0jZRcxoU1IgsaUnpz50hz9xV7DDS4EXxe6IoEvEKzkqchv45yVbrnyJwipzvjx/MwD/UWE1sbSIdaQLE08QNufHcLfvUBEVpYTD71gJKc4rt8bC7hOaalBE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1672907715; 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=vUJGGDkuUAUX5SRmLjmm/SGpe3wGSN7/b+Wjc8w7QPA=; b=Ix4z8FGxbhR6U0kwF+S8CwiV2cMLZlWLpQ0cjn7PMPgGRKkf7ME1lj53RnKgs2Kjt3T8hl0mUzQ63TSpQsITYWAhtbkHMYqA498Bj0SoDlckMtxIIYWSTfv9EUpWoLvhT+0nFIXemttduAXUsTX0yGuJ7cqg+BrVGOP5lsdw3CQ= 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 167290771587753.18580737684397; Thu, 5 Jan 2023 00:35:15 -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-342-f9_2Q4_OM2yS-tmcIhzYiQ-1; Thu, 05 Jan 2023 03:35:13 -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 27653858F0E; Thu, 5 Jan 2023 08:35: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 12A7D492B06; Thu, 5 Jan 2023 08:35: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 04737194658C; Thu, 5 Jan 2023 08:35:11 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.rdu2.redhat.com [10.11.54.9]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id ED329194658C for ; Thu, 5 Jan 2023 08:35:07 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id E43F3492B09; Thu, 5 Jan 2023 08:35:07 +0000 (UTC) Received: from maggie.redhat.com (unknown [10.43.2.39]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8D143492B07 for ; Thu, 5 Jan 2023 08:35:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1672907714; 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=vUJGGDkuUAUX5SRmLjmm/SGpe3wGSN7/b+Wjc8w7QPA=; b=J1jjvunoEkFoyXkTqr1gJGsNMcFEOF4JLjhrUH//q4tqH9/dngQM3CetzMUzE49coBYkqa 2hnRJy2sP1KbMzNL1X1iyxXh2dLv3t5qe0I8joT9x9rj4iiYbemcQVP74hk7mHuVRCKq14 uL3aRKY6U87djDYENIaYq7KJ/vEGi2M= X-MC-Unique: f9_2Q4_OM2yS-tmcIhzYiQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Michal Privoznik To: libvir-list@redhat.com Subject: [PATCH v2 7/7] qemu_capabilities: Report Hyper-V Enlightenments in domcapabilities Date: Thu, 5 Jan 2023 09:35:01 +0100 Message-Id: In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.9 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: 1672907717670100005 Content-Type: text/plain; charset="utf-8"; x-default="true" Inside of qemuCaps (for the corresponding accelerator) we have full host CPU expansion stored, among with supported Hyper-V Enlightenments. To report them in the domain capabilities, we just have to pick those starting with "hv-" and see if we know them. You may notice that neither of our domaincapsdata test shows any enlightenment. This is because the test works by parsing corresponding qemucapabilitiesdata/caps_*.xml file and none of these store the full host CPU expansion (hostCPU.fullQEMU) because that is runtime piece of information and not formatted into virQEMUCaps XML. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=3D1717611 Signed-off-by: Michal Privoznik Reviewed-by: Peter Krempa --- src/qemu/qemu_capabilities.c | 11 +++++++++++ .../domaincapsdata/qemu_8.0.0-q35.x86_64.xml | 19 ++++++++++++++++++- .../domaincapsdata/qemu_8.0.0-tcg.x86_64.xml | 19 ++++++++++++++++++- tests/domaincapsdata/qemu_8.0.0.x86_64.xml | 19 ++++++++++++++++++- 4 files changed, 65 insertions(+), 3 deletions(-) diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c index 93585f5af1..b557c737f0 100644 --- a/src/qemu/qemu_capabilities.c +++ b/src/qemu/qemu_capabilities.c @@ -6821,6 +6821,16 @@ virQEMUCapsFillDomainFeatureSGXCaps(virQEMUCaps *qem= uCaps, virQEMUCapsSGXInfoCopy(&domCaps->sgx, qemuCaps->sgxCapabilities); } =20 + +static void +virQEMUCapsFillDomainFeatureHypervCaps(virQEMUCaps *qemuCaps, + virDomainCaps *domCaps) +{ + domCaps->hyperv =3D g_memdup(qemuCaps->hypervCapabilities, + sizeof(virDomainCapsFeatureHyperv)); +} + + int virQEMUCapsFillDomainCaps(virQEMUCaps *qemuCaps, virArch hostarch, @@ -6877,6 +6887,7 @@ virQEMUCapsFillDomainCaps(virQEMUCaps *qemuCaps, virQEMUCapsFillDomainFeatureSEVCaps(qemuCaps, domCaps); virQEMUCapsFillDomainFeatureS390PVCaps(qemuCaps, domCaps); virQEMUCapsFillDomainFeatureSGXCaps(qemuCaps, domCaps); + virQEMUCapsFillDomainFeatureHypervCaps(qemuCaps, domCaps); =20 return 0; } diff --git a/tests/domaincapsdata/qemu_8.0.0-q35.x86_64.xml b/tests/domainc= apsdata/qemu_8.0.0-q35.x86_64.xml index eb18b5c696..4170ae7a97 100644 --- a/tests/domaincapsdata/qemu_8.0.0-q35.x86_64.xml +++ b/tests/domaincapsdata/qemu_8.0.0-q35.x86_64.xml @@ -249,6 +249,23 @@ - + + + relaxed + vapic + spinlocks + vpindex + runtime + synic + stimer + reset + vendor_id + frequencies + reenlightenment + tlbflush + ipi + avic + + diff --git a/tests/domaincapsdata/qemu_8.0.0-tcg.x86_64.xml b/tests/domainc= apsdata/qemu_8.0.0-tcg.x86_64.xml index 471a92693f..3b52eba64f 100644 --- a/tests/domaincapsdata/qemu_8.0.0-tcg.x86_64.xml +++ b/tests/domaincapsdata/qemu_8.0.0-tcg.x86_64.xml @@ -248,6 +248,23 @@ - + + + relaxed + vapic + spinlocks + vpindex + runtime + synic + stimer + reset + vendor_id + frequencies + reenlightenment + tlbflush + ipi + avic + + diff --git a/tests/domaincapsdata/qemu_8.0.0.x86_64.xml b/tests/domaincapsd= ata/qemu_8.0.0.x86_64.xml index 436ca212a8..fac8033f76 100644 --- a/tests/domaincapsdata/qemu_8.0.0.x86_64.xml +++ b/tests/domaincapsdata/qemu_8.0.0.x86_64.xml @@ -249,6 +249,23 @@ - + + + relaxed + vapic + spinlocks + vpindex + runtime + synic + stimer + reset + vendor_id + frequencies + reenlightenment + tlbflush + ipi + avic + + --=20 2.38.2