From nobody Sat Apr 20 10:27:08 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=1667912580; cv=none; d=zohomail.com; s=zohoarc; b=ba00Hyu7LRvjGItUkVHmCIKxW/XBt4aYy4deDxQmthweAIIbrOh7kiNvXyc1yu6BYav7Kx+FXHxgttjw6v1ibbElyeOnL/AZ/9PAQTql4rI4i7D9bmjx1DfN068EvFdx3xxcxLu+8aNdNN7IctjkxWSlo2/j2s63VpqfnGfDW9k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667912580; 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=fZ7LrcoUmk2eD5fBmQF6Kha53ArgLnPjB+wqxZYyE1U=; b=ZDSdNMCZ66Qj23/LunUfRC8tJWhelzI7rZsW9Gz3wY0F3n1eyMTbn2QrcvAFRnOFD+l0s9LzGCn4S5El9kX8iY6nR2+RU9k352l5AeddBIby4gxoQjYHW8WeykZyIFz21dsPsOFFgMGBkN1bJQWcGC5/aeUHK/ehI0EtXqn6rrQ= 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 1667912580777541.2342011966748; Tue, 8 Nov 2022 05:03:00 -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-664-ddDL4OKtPGi0hAG83BqGCQ-1; Tue, 08 Nov 2022 08:02:54 -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 421A8800DBF; Tue, 8 Nov 2022 13:02:06 +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 2808640C94EC; Tue, 8 Nov 2022 13:02:06 +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 852C219543B3; Tue, 8 Nov 2022 13:02:05 +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 04E9019274E0 for ; Tue, 8 Nov 2022 13:02:04 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id EFA379E70; Tue, 8 Nov 2022 13:02:03 +0000 (UTC) Received: from speedmetal.redhat.com (ovpn-208-16.brq.redhat.com [10.40.208.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id 687C57AE5 for ; Tue, 8 Nov 2022 13:02:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667912578; 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=fZ7LrcoUmk2eD5fBmQF6Kha53ArgLnPjB+wqxZYyE1U=; b=MjEZ0qj4rG4duUgI6wuVh300XADTlD3RZKlX8m2ydguoMgLuzKK9zVmPRdvg5b5keoDuEL h2oXk5I3LO+8bubE7tXNoXFC2kuki0LuyRI3zSnQec/QtjXspMyH7+gJR570WKBcPcBrbA vlkKMd/2AJV25QDP29LkoPqKesIK7ds= X-MC-Unique: ddDL4OKtPGi0hAG83BqGCQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 1/4] conf: virDomainDefFormatFeatures: Realign line Date: Tue, 8 Nov 2022 14:01:58 +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.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: 1667912627198100001 Content-Type: text/plain; charset="utf-8" Don't break line after opening bracket of a funtion call. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/conf/domain_conf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index fda1c6caa6..dc2281b2bd 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -26440,8 +26440,7 @@ virDomainDefFormatFeatures(virBuffer *buf, virBufferAsprintf(&childBuf, "<%s state=3D'%s'", virDomainHypervTypeToString(j), - virTristateSwitchTypeToString( - def->hyperv_features[j])); + virTristateSwitchTypeToString(def->hyper= v_features[j])); switch ((virDomainHyperv) j) { case VIR_DOMAIN_HYPERV_RELAXED: --=20 2.37.3 From nobody Sat Apr 20 10:27:08 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=1667912575; cv=none; d=zohomail.com; s=zohoarc; b=ZmHaXkfIe74VmNPpozdRjgwOnFFXudOpgLQ/QCeGnBzP6Kh/J/0S5bZTnD1WuLjG+2t6kqX8IaCq6wXsTUkIAQXrcIQQOwa8u7kVosyYsfj4WAt0ZS4fSbN8d5Xvk+IZN9hjanQYYwKRWRnAKJKvUHp8LHp4eZw+Ts/FrfYSqEc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667912575; 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=/W1rZHYLZKbhWmumtAahHz2yLsw9FYbzh4Erh44HpCU=; b=LnN8kT7rM8IWKd85fbtzWwO2vTLFALJiiHWkDgMYpoNBBzBpfxHgpEtbaYrVOnlC/ftwPPP4we+eJ/ThbsAALUUSBdWgWz2vP5ZnR1E5rQw/IQEU7zcyTk7FnmFngF3dUvt66D56jERHTfkzMdWqV4vvwhQSzZ+WYzSLcDXvY3w= 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 1667912575389371.7944070752269; Tue, 8 Nov 2022 05:02:55 -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-389-GK7OXfM-MWiPnEGpk8TRNQ-1; Tue, 08 Nov 2022 08:02:34 -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 07B03857D17; Tue, 8 Nov 2022 13:02: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 E97F540C94AD; Tue, 8 Nov 2022 13:02:06 +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 B28AA1966355; Tue, 8 Nov 2022 13:02:06 +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 2B4ED19543AE for ; Tue, 8 Nov 2022 13:02:05 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id E833A9E70; Tue, 8 Nov 2022 13:02:04 +0000 (UTC) Received: from speedmetal.redhat.com (ovpn-208-16.brq.redhat.com [10.40.208.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5DBB47AE5 for ; Tue, 8 Nov 2022 13:02:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667912574; 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=/W1rZHYLZKbhWmumtAahHz2yLsw9FYbzh4Erh44HpCU=; b=KzNlVRur5x+sEBXWQnpRbsr5u3kZmNc+nFVDgSN8jPYQ5mIILST0GIp7415U38HBV11cT3 KYF0NW+dghurdEmbMw9LQ+UPhUcGm9zA8HVdZjBQRNiyDRaXRuhVjFhZ0NDt0GvTf+10QR v53SUkS6AKXFF/EFGHKrjY5wp2hynyU= X-MC-Unique: GK7OXfM-MWiPnEGpk8TRNQ-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 2/4] cpu: x86: Group and order hyperv enlightenment features by leaf and register Date: Tue, 8 Nov 2022 14:01:59 +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.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: 1667912617087100001 Content-Type: text/plain; charset="utf-8" 'VIR_CPU_x86_HV_STIMER_DIRECT' is reported under leaf 0x40000003, but the data is in the EDX register. Create a new group for such features and move them after the 0x40000003 EAX group. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/cpu/cpu_x86.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index 4d2379803c..034d25bf60 100644 --- a/src/cpu/cpu_x86.c +++ b/src/cpu/cpu_x86.c @@ -94,14 +94,16 @@ KVM_FEATURE_DEF(VIR_CPU_x86_HV_FREQUENCIES, 0x40000003, 0x00000800, 0x0); KVM_FEATURE_DEF(VIR_CPU_x86_HV_REENLIGHTENMENT, 0x40000003, 0x00002000, 0x0); + +KVM_FEATURE_DEF(VIR_CPU_x86_HV_STIMER_DIRECT, + 0x40000003, 0x0, 0x00080000); + KVM_FEATURE_DEF(VIR_CPU_x86_HV_TLBFLUSH, 0x40000004, 0x00000004, 0x0); KVM_FEATURE_DEF(VIR_CPU_x86_HV_IPI, 0x40000004, 0x00000400, 0x0); KVM_FEATURE_DEF(VIR_CPU_x86_HV_EVMCS, 0x40000004, 0x00004000, 0x0); -KVM_FEATURE_DEF(VIR_CPU_x86_HV_STIMER_DIRECT, - 0x40000003, 0x0, 0x00080000); static virCPUx86Feature x86_kvm_features[] =3D { --=20 2.37.3 From nobody Sat Apr 20 10:27:08 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=1667912712; cv=none; d=zohomail.com; s=zohoarc; b=k8wS/4sCKzcRPFVOPm4zCXTmFmSQFsrGBQ+2zhdopTidIZJzDha1CnVrHIWFGCZ3r4BFtBwJj5RrQhblS/jVeN0FbXd/e2XjmtQMhqnjrsJHmve3cuaFoYiWWUF8gepDbl/RNKe0dOEKWpJk6JxbxgT3l+upi96XYCFO5Fjcs6c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667912712; 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=MuL1DmEZ8gM8KRSRQ4XbQh4tIiYyvqaygrAC9cPrKyY=; b=Lcf7/pjckJcD0YfTNz0n4YFlvW1IP+fXpE8c52nnyyu6PbVJOTRpWgBLD2k8skgGjoBFi528WstUI1JykIZq4t7nscxFrjNCsE4BxQXgQ5pqWXuZgNaMywofxBg3HclfNy5fO4XNqA6t0OqaC0XesmGeM56ippOxWl7MiQH3wh8= 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 1667912712064352.6964449389052; Tue, 8 Nov 2022 05:05: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-427-ZcK8A5UQMJuwdbNXZMEzgA-1; Tue, 08 Nov 2022 08:02:53 -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 B244F800B30; Tue, 8 Nov 2022 13:02: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 9B3AE475063; Tue, 8 Nov 2022 13:02: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 84073193769A; Tue, 8 Nov 2022 13:02: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 1625C1926FFF for ; Tue, 8 Nov 2022 13:02:06 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id 012084C819; Tue, 8 Nov 2022 13:02:06 +0000 (UTC) Received: from speedmetal.redhat.com (ovpn-208-16.brq.redhat.com [10.40.208.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id 579067AE5 for ; Tue, 8 Nov 2022 13:02:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667912711; 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=MuL1DmEZ8gM8KRSRQ4XbQh4tIiYyvqaygrAC9cPrKyY=; b=Xxe0/3SMd57jr7XzGBgdqe7hkFoXpwlGsFzkLelIrl+cBiockRz1Cyq/nSI44tYHi4Dqtf izs3+tPLH52LeR4+S3NsuhInSIB528MRaqyEExUEhYCO4zN2RfLY7HbCvlc9o6++lfD+rG ithiTk+vr8kibZJPdsMNfBoiVqpXHiU= X-MC-Unique: ZcK8A5UQMJuwdbNXZMEzgA-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 3/4] cpu: x86: Introduce the 'hv-avic' feature Date: Tue, 8 Nov 2022 14:02:00 +0100 Message-Id: <1ede786bdc05c7d467978325f2742e3dda53dbe3.1667912490.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: 1667912734376100001 Content-Type: text/plain; charset="utf-8" Based on qemu commit e1f9a8e8c90ae54387922e33e5ac4fd759747d01 introduce the hv-avic feature in leaf 0x40000004, EAX 0x00000200 (1 << 9). Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- src/cpu/cpu_x86.c | 3 +++ src/cpu/cpu_x86_data.h | 1 + 2 files changed, 4 insertions(+) diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index 034d25bf60..b3f76f3d79 100644 --- a/src/cpu/cpu_x86.c +++ b/src/cpu/cpu_x86.c @@ -100,6 +100,8 @@ KVM_FEATURE_DEF(VIR_CPU_x86_HV_STIMER_DIRECT, KVM_FEATURE_DEF(VIR_CPU_x86_HV_TLBFLUSH, 0x40000004, 0x00000004, 0x0); +KVM_FEATURE_DEF(VIR_CPU_x86_HV_AVIC, + 0x40000004, 0x00000200, 0x0); KVM_FEATURE_DEF(VIR_CPU_x86_HV_IPI, 0x40000004, 0x00000400, 0x0); KVM_FEATURE_DEF(VIR_CPU_x86_HV_EVMCS, @@ -118,6 +120,7 @@ static virCPUx86Feature x86_kvm_features[] =3D KVM_FEATURE(VIR_CPU_x86_HV_FREQUENCIES), KVM_FEATURE(VIR_CPU_x86_HV_REENLIGHTENMENT), KVM_FEATURE(VIR_CPU_x86_HV_TLBFLUSH), + KVM_FEATURE(VIR_CPU_x86_HV_AVIC), KVM_FEATURE(VIR_CPU_x86_HV_IPI), KVM_FEATURE(VIR_CPU_x86_HV_EVMCS), KVM_FEATURE(VIR_CPU_x86_HV_STIMER_DIRECT), diff --git a/src/cpu/cpu_x86_data.h b/src/cpu/cpu_x86_data.h index 9a4333bf2b..d1ca63db6d 100644 --- a/src/cpu/cpu_x86_data.h +++ b/src/cpu/cpu_x86_data.h @@ -61,6 +61,7 @@ struct _virCPUx86MSR { #define VIR_CPU_x86_HV_TLBFLUSH "hv-tlbflush" #define VIR_CPU_x86_HV_IPI "hv-ipi" #define VIR_CPU_x86_HV_EVMCS "hv-evmcs" +#define VIR_CPU_x86_HV_AVIC "hv-avic" /* Hyper-V Synthetic Timer option */ #define VIR_CPU_x86_HV_STIMER_DIRECT "hv-stimer-direct" --=20 2.37.3 From nobody Sat Apr 20 10:27:08 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=1667912720; cv=none; d=zohomail.com; s=zohoarc; b=NxMqwoBKFs5zvmMBBmbZaynwKAZcK4hqAWKPg9egiFLFiTog8hLPxBUkqTjdqg0eRZqlO+WcT6Jrozj/g2ayI+RI1xP8XD3EFUpWSRIrVTlbUpedt7PjQ6GS/AhDfClwDTDFNiiII+jSideBt77jUCnW7R2bElurD/tES9RoZPw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1667912720; 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=xIIt3r9zhNqWQdO6d0c+AMGyRhkS+xhcaA+hWPKjZMg=; b=NFaKBq3KT91Chp1lSPJRd6hZB015CbF6aE/lSQTEEG/8/l/DKYi3+WTqz7r7im7Nvwen34TOyM48dz1yT8ZLVXiDCopDqSt+IFKfq/JW+wrIgkXwDa8JYbqvQYsTSQ7fGHJW5hDgHI9bQRzjuyOSEYiKIXvKYUyNQ7r99KcwB9M= 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 1667912720499369.04965660051005; Tue, 8 Nov 2022 05:05:20 -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-643-kb-XrVn3NuqUKYKgbJQBrw-1; Tue, 08 Nov 2022 08:02:54 -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 B726186A96D; Tue, 8 Nov 2022 13:02: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 A146E2028E90; Tue, 8 Nov 2022 13:02: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 929E7196636C; Tue, 8 Nov 2022 13:02: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 0EC05196636C for ; Tue, 8 Nov 2022 13:02:07 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id EA84C7AE5; Tue, 8 Nov 2022 13:02:06 +0000 (UTC) Received: from speedmetal.redhat.com (ovpn-208-16.brq.redhat.com [10.40.208.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id 6229F9E70 for ; Tue, 8 Nov 2022 13:02:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1667912719; 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=xIIt3r9zhNqWQdO6d0c+AMGyRhkS+xhcaA+hWPKjZMg=; b=HI3YSMChW4AdRzV3iyWPmHAgZEjAUTTSCkm8TD+RdyMMlVHO01vDdovQryriUSJ9kkoKvY kBnWSCnAavq2pkLx2XZ8RBmxT7XZ0ojPIgzxUxonsCHKD8oAlvA2d7g4lrIyNvKFebS2Y/ OoiOgbs5YExC5L9oXBlZyW02btWb0Ys= X-MC-Unique: kb-XrVn3NuqUKYKgbJQBrw-1 X-Original-To: libvir-list@listman.corp.redhat.com From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 4/4] conf: Introduce support for 'hv-avic' Hyper-V enlightenment Date: Tue, 8 Nov 2022 14:02:01 +0100 Message-Id: <9da610d04a2ffb64ca451638315b1a012e1d7dc2.1667912490.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.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: 1667912745491100001 Content-Type: text/plain; charset="utf-8" qemu-6.2 introduced support for the hv-avic enlightenment which allows to use Hyper-V SynIC with hardware APICv/AVIC enabled. Implement the libvirt support for it. Closes: https://gitlab.com/libvirt/libvirt/-/issues/402 Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- docs/formatdomain.rst | 1 + src/conf/domain_conf.c | 4 ++++ src/conf/domain_conf.h | 1 + src/conf/schemas/domaincommon.rng | 5 +++++ src/qemu/qemu_command.c | 1 + src/qemu/qemu_process.c | 1 + tests/qemuxml2argvdata/hyperv.x86_64-latest.args | 2 +- tests/qemuxml2argvdata/hyperv.xml | 1 + tests/qemuxml2xmloutdata/hyperv.xml | 1 + 9 files changed, 16 insertions(+), 1 deletion(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index acb318520c..488b6be862 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -2016,6 +2016,7 @@ are: tlbflush Enable PV TLB flush support = on, off :since:`4.7.0 = (QEMU 3.0)` ipi Enable PV IPI support = on, off :since:`4.10.0= (QEMU 3.1)` evmcs Enable Enlightened VMCS = on, off :since:`4.10.0= (QEMU 3.1)` + avic Enable use Hyper-V SynIC with hardware APICv/AVIC = on, off :since:`8.10.0= (QEMU 6.2)` =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D :since:`Since 8.0.0` , the hypervisor can be configured further by sett= ing diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index dc2281b2bd..2643f62e03 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -206,6 +206,7 @@ VIR_ENUM_IMPL(virDomainHyperv, "tlbflush", "ipi", "evmcs", + "avic", ); VIR_ENUM_IMPL(virDomainKVM, @@ -15814,6 +15815,7 @@ virDomainFeaturesHyperVDefParse(virDomainDef *def, case VIR_DOMAIN_HYPERV_TLBFLUSH: case VIR_DOMAIN_HYPERV_IPI: case VIR_DOMAIN_HYPERV_EVMCS: + case VIR_DOMAIN_HYPERV_AVIC: break; case VIR_DOMAIN_HYPERV_STIMER: @@ -20134,6 +20136,7 @@ virDomainDefFeaturesCheckABIStability(virDomainDef = *src, case VIR_DOMAIN_HYPERV_TLBFLUSH: case VIR_DOMAIN_HYPERV_IPI: case VIR_DOMAIN_HYPERV_EVMCS: + case VIR_DOMAIN_HYPERV_AVIC: if (src->hyperv_features[i] !=3D dst->hyperv_features[i]) { virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("State of HyperV enlightenment " @@ -26454,6 +26457,7 @@ virDomainDefFormatFeatures(virBuffer *buf, case VIR_DOMAIN_HYPERV_TLBFLUSH: case VIR_DOMAIN_HYPERV_IPI: case VIR_DOMAIN_HYPERV_EVMCS: + case VIR_DOMAIN_HYPERV_AVIC: virBufferAddLit(&childBuf, "/>\n"); break; diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 54dc9098df..a05d4d4b1c 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2149,6 +2149,7 @@ typedef enum { VIR_DOMAIN_HYPERV_TLBFLUSH, VIR_DOMAIN_HYPERV_IPI, VIR_DOMAIN_HYPERV_EVMCS, + VIR_DOMAIN_HYPERV_AVIC, VIR_DOMAIN_HYPERV_LAST } virDomainHyperv; diff --git a/src/conf/schemas/domaincommon.rng b/src/conf/schemas/domaincom= mon.rng index cefe818044..03703148df 100644 --- a/src/conf/schemas/domaincommon.rng +++ b/src/conf/schemas/domaincommon.rng @@ -7461,6 +7461,11 @@ + + + + + diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 256ef4912c..513ff7624f 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -6237,6 +6237,7 @@ qemuBuildCpuCommandLine(virCommand *cmd, case VIR_DOMAIN_HYPERV_TLBFLUSH: case VIR_DOMAIN_HYPERV_IPI: case VIR_DOMAIN_HYPERV_EVMCS: + case VIR_DOMAIN_HYPERV_AVIC: if (def->hyperv_features[i] =3D=3D VIR_TRISTATE_SWITCH_ON) virBufferAsprintf(&buf, ",hv-%s=3Don", virDomainHypervTypeToString(i)); diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index e7f92228f5..0ced2d88ab 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -4245,6 +4245,7 @@ qemuProcessVerifyHypervFeatures(virDomainDef *def, case VIR_DOMAIN_HYPERV_TLBFLUSH: case VIR_DOMAIN_HYPERV_IPI: case VIR_DOMAIN_HYPERV_EVMCS: + case VIR_DOMAIN_HYPERV_AVIC: virReportError(VIR_ERR_CONFIG_UNSUPPORTED, _("host doesn't support hyperv '%s' feature"), virDomainHypervTypeToString(i)); diff --git a/tests/qemuxml2argvdata/hyperv.x86_64-latest.args b/tests/qemux= ml2argvdata/hyperv.x86_64-latest.args index 50329f6e30..0b00102e18 100644 --- a/tests/qemuxml2argvdata/hyperv.x86_64-latest.args +++ b/tests/qemuxml2argvdata/hyperv.x86_64-latest.args @@ -12,7 +12,7 @@ XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ -object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tm= p/lib/domain--1-QEMUGuest1/master-key.aes"}' \ -machine pc,usb=3Doff,dump-guest-core=3Doff,memory-backend=3Dpc.ram \ -accel tcg \ --cpu 'qemu64,hv-relaxed=3Don,hv-vapic=3Don,hv-spinlocks=3D0x2fff,hv-vpinde= x=3Don,hv-runtime=3Don,hv-synic=3Don,hv-stimer=3Don,hv-reset=3Don,hv-vendor= -id=3DKVM Hv,hv-frequencies=3Don,hv-reenlightenment=3Don,hv-tlbflush=3Don,h= v-ipi=3Don,hv-evmcs=3Don' \ +-cpu 'qemu64,hv-relaxed=3Don,hv-vapic=3Don,hv-spinlocks=3D0x2fff,hv-vpinde= x=3Don,hv-runtime=3Don,hv-synic=3Don,hv-stimer=3Don,hv-reset=3Don,hv-vendor= -id=3DKVM Hv,hv-frequencies=3Don,hv-reenlightenment=3Don,hv-tlbflush=3Don,h= v-ipi=3Don,hv-evmcs=3Don,hv-avic=3Don' \ -m 214 \ -object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":224395264}'= \ -overcommit mem-lock=3Doff \ diff --git a/tests/qemuxml2argvdata/hyperv.xml b/tests/qemuxml2argvdata/hyp= erv.xml index e3184b3657..dde091aa9a 100644 --- a/tests/qemuxml2argvdata/hyperv.xml +++ b/tests/qemuxml2argvdata/hyperv.xml @@ -25,6 +25,7 @@ + diff --git a/tests/qemuxml2xmloutdata/hyperv.xml b/tests/qemuxml2xmloutdata= /hyperv.xml index e21c330767..4445c85118 100644 --- a/tests/qemuxml2xmloutdata/hyperv.xml +++ b/tests/qemuxml2xmloutdata/hyperv.xml @@ -25,6 +25,7 @@ + --=20 2.37.3