From nobody Tue Oct 28 17:31:52 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) client-ip=8.43.85.245; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=reject dis=none) header.from=lists.libvirt.org ARC-Seal: i=1; a=rsa-sha256; t=1759758247; cv=none; d=zohomail.com; s=zohoarc; b=EuSQC6HpDKUSuNRTxzG5nYFBAFFzD/l0+/H4CgrPuEfuVunG743Ve7dM3v4TO1Ojqp1Dtcn3VfNw3lNq4qtN/2f+sDEMk62bR6m4hob7Lmqqne+l9qvSRYkCRkWzfMC/xrK9waxDdjRAi9qkc/8TQqw9siGDL3MpURcXHYsuePI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1759758247; h=Content-Type:Content-Transfer-Encoding:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:Reply-To:References:Subject:Subject:To:To:Message-Id:Cc; bh=wpY5lEdSTaMN8M2rvsmCMMcfRbvwOtPefBwQOP4ws+M=; b=CtyRQyyqfZqK1SDXrd4KST4F8mJmyhworyCFeZYauoP4DCydKfMcN53uCKkEbswzvGZcKRzfSZB85llQ1ByRyJtI95wt/xhBG7cqgnhczzHQxtgNS5DpZljyBFMBRGWosycijbBpHw34mmsgcF7bJSjSREgDh7DWdZVuckfmI+E= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of lists.libvirt.org designates 8.43.85.245 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=reject dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [8.43.85.245]) by mx.zohomail.com with SMTPS id 1759758247408725.3129198006948; Mon, 6 Oct 2025 06:44:07 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 2C42B4415A; Mon, 6 Oct 2025 09:44:04 -0400 (EDT) Received: from [172.19.199.17] (lists.libvirt.org [8.43.85.245]) by lists.libvirt.org (Postfix) with ESMTP id 466F944C25; Mon, 6 Oct 2025 09:21:23 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 7D90B41C8C; Mon, 6 Oct 2025 09:15:20 -0400 (EDT) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 0D35941C7F for ; Mon, 6 Oct 2025 09:15:17 -0400 (EDT) Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-201-Yey7DIyfMwO7efj9AhlwbA-1; Mon, 06 Oct 2025 09:15:15 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 4E67A19560BB for ; Mon, 6 Oct 2025 13:15:14 +0000 (UTC) Received: from localhost.localdomain (unknown [10.43.3.236]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 97D6730002CC for ; Mon, 6 Oct 2025 13:15:13 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-3.1 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED,RCVD_IN_VALIDITY_RPBL_BLOCKED, RCVD_IN_VALIDITY_SAFE_BLOCKED,SPF_PASS autolearn=unavailable autolearn_force=no version=4.0.1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1759756516; h=from:from: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; bh=Fl8Q+PgYM++3B798qRQxWFZFfzip6mAoHNtQS94Tkgo=; b=MQw+T0T0aIQoxCUPHzLyPSraZBn17hB03HYl4z6gsVwtBLjg3wLosGDYBPp3k01P6NlQr/ sEdMhkA6tU1oWhT/gADqAMblCUqrtyRUXS26vwkUBf3y7Czp9PpCPfCseDqpCXTzpYU3a4 zjNB2J5zMI5Qryo++zit4KcfsoUm8SI= X-MC-Unique: Yey7DIyfMwO7efj9AhlwbA-1 X-Mimecast-MFC-AGG-ID: Yey7DIyfMwO7efj9AhlwbA_1759756514 To: devel@lists.libvirt.org Subject: [PATCH 15/20] hyperv: Support hv-time enlightenment Date: Mon, 6 Oct 2025 15:14:46 +0200 Message-ID: <2558583ff32a93ad56b394805cd36380fc93883f.1759756003.git.mprivozn@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: 3r_cFVb4gpG7pvgSSrCCl65x1SNKQKv0PM1iL7EAsus_1759756514 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Message-ID-Hash: BPHQHYOAJFAFOQE2JZBOZ5E4BEWUZCQH X-Message-ID-Hash: BPHQHYOAJFAFOQE2JZBOZ5E4BEWUZCQH X-MailFrom: mprivozn@redhat.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Michal Privoznik via Devel Reply-To: Michal Privoznik X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1759758249089116600 Content-Type: text/plain; charset="utf-8"; x-default="true" From: Michal Privoznik QEMU supports this enlightenment since version 2.0. It's required by some other enlightenments (e.g. hv-stimer, hv-stimer-direct). >From QEMU docs: ``hv-time`` Enables two Hyper-V-specific clocksources available to the guest: MSR-bas= ed Hyper-V clocksource (HV_X64_MSR_TIME_REF_COUNT, 0x40000020) and Reference= TSC page (enabled via MSR HV_X64_MSR_REFERENCE_TSC, 0x40000021). Both clockso= urces are per-guest, Reference TSC page clocksource allows for exit-less time s= tamp readings. Using this enlightenment leads to significant speedup of all ti= mestamp related operations. Signed-off-by: Michal Privoznik --- docs/formatdomain.rst | 2 ++ src/conf/domain_conf.c | 4 ++++ src/conf/domain_conf.h | 1 + src/conf/schemas/domaincommon.rng | 5 +++++ src/cpu/cpu_x86.c | 5 +++++ src/cpu/cpu_x86_data.h | 1 + src/libxl/libxl_conf.c | 4 ++++ src/qemu/qemu_command.c | 1 + src/qemu/qemu_process.c | 1 + tests/domaincapsdata/qemu_10.0.0-q35.x86_64+amdsev.xml | 1 + tests/domaincapsdata/qemu_10.0.0-q35.x86_64.xml | 1 + tests/domaincapsdata/qemu_10.0.0-tcg.x86_64+amdsev.xml | 1 + tests/domaincapsdata/qemu_10.0.0-tcg.x86_64.xml | 1 + tests/domaincapsdata/qemu_10.0.0.x86_64+amdsev.xml | 1 + tests/domaincapsdata/qemu_10.0.0.x86_64.xml | 1 + tests/domaincapsdata/qemu_10.1.0-q35.x86_64+inteltdx.xml | 1 + tests/domaincapsdata/qemu_10.1.0-q35.x86_64.xml | 1 + tests/domaincapsdata/qemu_10.1.0-tcg.x86_64+inteltdx.xml | 1 + tests/domaincapsdata/qemu_10.1.0-tcg.x86_64.xml | 1 + tests/domaincapsdata/qemu_10.1.0.x86_64+inteltdx.xml | 1 + tests/domaincapsdata/qemu_10.1.0.x86_64.xml | 1 + tests/domaincapsdata/qemu_10.2.0-q35.x86_64.xml | 1 + tests/domaincapsdata/qemu_10.2.0-tcg.x86_64.xml | 1 + tests/domaincapsdata/qemu_10.2.0.x86_64.xml | 1 + tests/domaincapsdata/qemu_8.0.0-q35.x86_64.xml | 1 + tests/domaincapsdata/qemu_8.0.0-tcg.x86_64.xml | 1 + tests/domaincapsdata/qemu_8.0.0.x86_64.xml | 1 + tests/domaincapsdata/qemu_8.1.0-q35.x86_64.xml | 1 + tests/domaincapsdata/qemu_8.1.0-tcg.x86_64.xml | 1 + tests/domaincapsdata/qemu_8.1.0.x86_64.xml | 1 + tests/domaincapsdata/qemu_8.2.0-q35.x86_64.xml | 1 + tests/domaincapsdata/qemu_8.2.0-tcg.x86_64.xml | 1 + tests/domaincapsdata/qemu_8.2.0.x86_64.xml | 1 + tests/domaincapsdata/qemu_9.0.0-q35.x86_64.xml | 1 + tests/domaincapsdata/qemu_9.0.0-tcg.x86_64.xml | 1 + tests/domaincapsdata/qemu_9.0.0.x86_64.xml | 1 + tests/domaincapsdata/qemu_9.1.0-q35.x86_64.xml | 1 + tests/domaincapsdata/qemu_9.1.0-tcg.x86_64.xml | 1 + tests/domaincapsdata/qemu_9.1.0.x86_64.xml | 1 + tests/domaincapsdata/qemu_9.2.0-q35.x86_64+amdsev.xml | 1 + tests/domaincapsdata/qemu_9.2.0-q35.x86_64.xml | 1 + tests/domaincapsdata/qemu_9.2.0-tcg.x86_64+amdsev.xml | 1 + tests/domaincapsdata/qemu_9.2.0-tcg.x86_64.xml | 1 + tests/domaincapsdata/qemu_9.2.0.x86_64+amdsev.xml | 1 + tests/domaincapsdata/qemu_9.2.0.x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_10.0.0_x86_64+amdsev.xml | 1 + tests/qemucapabilitiesdata/caps_10.0.0_x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_10.1.0_x86_64+inteltdx.xml | 1 + tests/qemucapabilitiesdata/caps_10.1.0_x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_10.2.0_x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_8.0.0_x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_8.1.0_x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_8.2.0_x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_9.0.0_x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_9.1.0_x86_64.xml | 1 + tests/qemucapabilitiesdata/caps_9.2.0_x86_64+amdsev.xml | 1 + tests/qemucapabilitiesdata/caps_9.2.0_x86_64.xml | 1 + tests/qemuxmlconfdata/hyperv.x86_64-latest.args | 2 +- tests/qemuxmlconfdata/hyperv.x86_64-latest.xml | 1 + tests/qemuxmlconfdata/hyperv.xml | 1 + 60 files changed, 75 insertions(+), 1 deletion(-) diff --git a/docs/formatdomain.rst b/docs/formatdomain.rst index f50dce477f..473233c5d1 100644 --- a/docs/formatdomain.rst +++ b/docs/formatdomain.rst @@ -2078,6 +2078,7 @@ Hypervisors may allow certain CPU / machine features = to be toggled on/off. +