From nobody Fri Apr 19 19:24:01 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1565361137; cv=none; d=zoho.com; s=zohoarc; b=eSlFgKXbBw5ZsmcGobDzJeICPvfUozrl/9TAERBBu7hNzyUEN108uvcIucqrJuUKQh8oyTi74NpHeVaCHxVirg9I69e+3CORKu4uWT+CwFUCkyBxn1dAimTXYYrhfGenEJMLkBZd8fzlOH32OhS/wJ9RoV8/icGoA0nLdJjhJQQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565361137; h=Content-Type:Content-Transfer-Encoding:Cc: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:ARC-Authentication-Results; bh=jOwlYEHa2JczFA3sWT+PMOGsRWmkV9DxfRQGwEVNo5c=; b=LYVJOWvwmj1JCAJmtjtQztqh38MEo4JSqXvmsw1RPP8QFSv1Ge9UNfYSOw0MmSkz3/HoYCnSgbXbpCB6MhzNBoZDHDJLQj9fhrQHiKI+jYC4gUKCJOmq1gB1iwBf3Ahx8uVTOCsHOJK8Aa2upB+PA2SL7tljNxYOwu1OQQgbfug= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1565361137095328.31987925381895; Fri, 9 Aug 2019 07:32:17 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7FE1B30C1C3C; Fri, 9 Aug 2019 14:32:15 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 853C2197FC; Fri, 9 Aug 2019 14:32:14 +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 33E4224F30; Fri, 9 Aug 2019 14:32:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x79EWDrR032464 for ; Fri, 9 Aug 2019 10:32:13 -0400 Received: by smtp.corp.redhat.com (Postfix) id 911CC10001BD; Fri, 9 Aug 2019 14:32:13 +0000 (UTC) Received: from mx1.redhat.com (ext-mx07.extmail.prod.ext.phx2.redhat.com [10.5.110.31]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 87251101E248 for ; Fri, 9 Aug 2019 14:31:46 +0000 (UTC) Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D76CBC08EC23 for ; Fri, 9 Aug 2019 14:31:45 +0000 (UTC) Received: by mail-wm1-f72.google.com with SMTP id t76so1369675wmt.9 for ; Fri, 09 Aug 2019 07:31:45 -0700 (PDT) Received: from vitty.brq.redhat.com (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id k1sm4732346wru.49.2019.08.09.07.31.43 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 09 Aug 2019 07:31:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=uzj1ZuqTAakUQANzNNEea993WQBoKm5mdUbYujcoYOc=; b=cVGvt4rLBvwb3stEaP6zFD566YJcEzl6VV3xVUZugMMoek1Pf9b9cmEtiypxY9xWht FLpJfw1qUBJnR4b52FRQBWi/v7CQPG37e+5297aXdHfiCBdxJz/TUzotzNSTRt4BlGr6 pSAi0Azg8w9tNTxlSqkWT0G1RNTeh2Z3+VeUudxLYX18zuyPVvCmvVpYj8KzElaevDh3 DS99yBzzOHHbug2vKVZxoj912hdPV7V6qSo6Izw1XukzsPhLVP38PqFh4dPrIna8Olqv GAnxWhvAjx7tEMYVZyPyJ3f2GAcGXjHLVfRJiDMZg0yiULMIhMIhx6tB+DO+yEoPo2xk JGqQ== X-Gm-Message-State: APjAAAUITf86bHp/IFbky2uIQANDCStUYk27YwjBUVELbjz7TwVJVa5N ipR7h1xf09oD3p0cVeb6aeKdNsZ8xKgzw6VklpouAOfacn1+D4VZk6gsUFxLngp9LKnd7Q3k8Al YVwfwQD4j+AwGXLhPbuw= X-Received: by 2002:a1c:1d86:: with SMTP id d128mr3069673wmd.123.1565361104310; Fri, 09 Aug 2019 07:31:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqw3xZtk/8kynPxRlncR4P99Qblu3RfFHmZFS+LckJqfhZGkNvtHvJBEcmRrc5gGwF3NDMZCJA== X-Received: by 2002:a1c:1d86:: with SMTP id d128mr3069631wmd.123.1565361103922; Fri, 09 Aug 2019 07:31:43 -0700 (PDT) From: Vitaly Kuznetsov To: libvir-list@redhat.com Date: Fri, 9 Aug 2019 16:31:38 +0200 Message-Id: <20190809143141.17349-2-vkuznets@redhat.com> In-Reply-To: <20190809143141.17349-1-vkuznets@redhat.com> References: <20190809143141.17349-1-vkuznets@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-loop: libvir-list@redhat.com Cc: =?UTF-8?q?J=C3=A1n=20Tomko?= , Nikolay Shirokovskiy Subject: [libvirt] [PATCH v4 1/4] tests: qemuxml2argv: switch to DO_TEST_CAPS_LATEST for Hyper-V tests 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.49]); Fri, 09 Aug 2019 14:32:16 +0000 (UTC) In particular, switch to using canonical 'hv-feature' syntax instead of 'hv_feature' aliases. Suggested-by: J=C3=A1n Tomko ~ Signed-off-by: Vitaly Kuznetsov Reviewed-by: J=C3=A1n Tomko --- tests/qemuxml2argvdata/hyperv-off.args | 27 --------------- .../hyperv-off.x86_64-latest.args | 32 +++++++++++++++++ tests/qemuxml2argvdata/hyperv-panic.args | 27 --------------- .../hyperv-panic.x86_64-latest.args | 32 +++++++++++++++++ tests/qemuxml2argvdata/hyperv.args | 29 ---------------- .../hyperv.x86_64-latest.args | 34 +++++++++++++++++++ tests/qemuxml2argvtest.c | 6 ++-- 7 files changed, 101 insertions(+), 86 deletions(-) delete mode 100644 tests/qemuxml2argvdata/hyperv-off.args create mode 100644 tests/qemuxml2argvdata/hyperv-off.x86_64-latest.args delete mode 100644 tests/qemuxml2argvdata/hyperv-panic.args create mode 100644 tests/qemuxml2argvdata/hyperv-panic.x86_64-latest.args delete mode 100644 tests/qemuxml2argvdata/hyperv.args create mode 100644 tests/qemuxml2argvdata/hyperv.x86_64-latest.args diff --git a/tests/qemuxml2argvdata/hyperv-off.args b/tests/qemuxml2argvdat= a/hyperv-off.args deleted file mode 100644 index 59a79376d1..0000000000 --- a/tests/qemuxml2argvdata/hyperv-off.args +++ /dev/null @@ -1,27 +0,0 @@ -LC_ALL=3DC \ -PATH=3D/bin \ -HOME=3D/tmp/lib/domain--1-QEMUGuest1 \ -USER=3Dtest \ -LOGNAME=3Dtest \ -XDG_DATA_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.local/share \ -XDG_CACHE_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.cache \ -XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ -QEMU_AUDIO_DRV=3Dnone \ -/usr/bin/qemu-system-i686 \ --name QEMUGuest1 \ --S \ --machine pc,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ --m 214 \ --realtime mlock=3Doff \ --smp 6,sockets=3D6,cores=3D1,threads=3D1 \ --uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=3Dcharmonitor,path=3D/tmp/lib/domain--1-QEMUGuest1/moni= tor.sock,\ -server,nowait \ --mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ --rtc base=3Dutc \ --no-shutdown \ --usb \ --device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x3 diff --git a/tests/qemuxml2argvdata/hyperv-off.x86_64-latest.args b/tests/q= emuxml2argvdata/hyperv-off.x86_64-latest.args new file mode 100644 index 0000000000..52f7473e14 --- /dev/null +++ b/tests/qemuxml2argvdata/hyperv-off.x86_64-latest.args @@ -0,0 +1,32 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/tmp/lib/domain--1-QEMUGuest1 \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-i686 \ +-name guest=3DQEMUGuest1,debug-threads=3Don \ +-S \ +-object secret,id=3DmasterKey0,format=3Draw,\ +file=3D/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ +-machine pc,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-m 214 \ +-overcommit mem-lock=3Doff \ +-smp 6,sockets=3D6,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-boot strict=3Don \ +-device piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x2 \ +-device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x2 \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ +resourcecontrol=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/hyperv-panic.args b/tests/qemuxml2argvd= ata/hyperv-panic.args deleted file mode 100644 index 1ef5068aca..0000000000 --- a/tests/qemuxml2argvdata/hyperv-panic.args +++ /dev/null @@ -1,27 +0,0 @@ -LC_ALL=3DC \ -PATH=3D/bin \ -HOME=3D/tmp/lib/domain--1-QEMUGuest1 \ -USER=3Dtest \ -LOGNAME=3Dtest \ -XDG_DATA_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.local/share \ -XDG_CACHE_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.cache \ -XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ -QEMU_AUDIO_DRV=3Dnone \ -/usr/bin/qemu-system-i686 \ --name QEMUGuest1 \ --S \ --machine pc,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ --cpu qemu32,hv-crash \ --m 214 \ --realtime mlock=3Doff \ --smp 6,sockets=3D6,cores=3D1,threads=3D1 \ --uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=3Dcharmonitor,path=3D/tmp/lib/domain--1-QEMUGuest1/moni= tor.sock,\ -server,nowait \ --mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ --rtc base=3Dutc \ --no-shutdown \ --usb diff --git a/tests/qemuxml2argvdata/hyperv-panic.x86_64-latest.args b/tests= /qemuxml2argvdata/hyperv-panic.x86_64-latest.args new file mode 100644 index 0000000000..c92df8b79f --- /dev/null +++ b/tests/qemuxml2argvdata/hyperv-panic.x86_64-latest.args @@ -0,0 +1,32 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/tmp/lib/domain--1-QEMUGuest1 \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-i686 \ +-name guest=3DQEMUGuest1,debug-threads=3Don \ +-S \ +-object secret,id=3DmasterKey0,format=3Draw,\ +file=3D/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ +-machine pc,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-cpu qemu32,hv-crash \ +-m 214 \ +-overcommit mem-lock=3Doff \ +-smp 6,sockets=3D6,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-boot strict=3Don \ +-device piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x2 \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ +resourcecontrol=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/hyperv.args b/tests/qemuxml2argvdata/hy= perv.args deleted file mode 100644 index 086adaa349..0000000000 --- a/tests/qemuxml2argvdata/hyperv.args +++ /dev/null @@ -1,29 +0,0 @@ -LC_ALL=3DC \ -PATH=3D/bin \ -HOME=3D/tmp/lib/domain--1-QEMUGuest1 \ -USER=3Dtest \ -LOGNAME=3Dtest \ -XDG_DATA_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.local/share \ -XDG_CACHE_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.cache \ -XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ -QEMU_AUDIO_DRV=3Dnone \ -/usr/bin/qemu-system-i686 \ --name QEMUGuest1 \ --S \ --machine pc,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ --cpu 'qemu32,hv_relaxed,hv_vapic,hv-spinlocks=3D0x2fff,hv_vpindex,hv_runti= me,\ -hv_synic,hv_stimer,hv_reset,hv-vendor-id=3DKVM Hv,hv_frequencies,\ -hv_reenlightenment,hv_tlbflush,hv_ipi,hv_evmcs' \ --m 214 \ --realtime mlock=3Doff \ --smp 6,sockets=3D6,cores=3D1,threads=3D1 \ --uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ --display none \ --no-user-config \ --nodefaults \ --chardev socket,id=3Dcharmonitor,path=3D/tmp/lib/domain--1-QEMUGuest1/moni= tor.sock,\ -server,nowait \ --mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ --rtc base=3Dutc \ --no-shutdown \ --usb diff --git a/tests/qemuxml2argvdata/hyperv.x86_64-latest.args b/tests/qemux= ml2argvdata/hyperv.x86_64-latest.args new file mode 100644 index 0000000000..33c70bb7e7 --- /dev/null +++ b/tests/qemuxml2argvdata/hyperv.x86_64-latest.args @@ -0,0 +1,34 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/tmp/lib/domain--1-QEMUGuest1 \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-i686 \ +-name guest=3DQEMUGuest1,debug-threads=3Don \ +-S \ +-object secret,id=3DmasterKey0,format=3Draw,\ +file=3D/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ +-machine pc,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-cpu 'qemu32,hv-relaxed,hv-vapic,hv-spinlocks=3D0x2fff,hv-vpindex,hv-runti= me,\ +hv-synic,hv-stimer,hv-reset,hv-vendor-id=3DKVM Hv,hv-frequencies,\ +hv-reenlightenment,hv-tlbflush,hv-ipi,hv-evmcs' \ +-m 214 \ +-overcommit mem-lock=3Doff \ +-smp 6,sockets=3D6,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-boot strict=3Don \ +-device piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x2 \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ +resourcecontrol=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index c166fd18d6..4c3aeffe76 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -911,9 +911,9 @@ mymain(void) DO_TEST_CAPS_VER("kvmclock+eoi-disabled", "4.0.0"); DO_TEST_CAPS_LATEST("kvmclock+eoi-disabled"); =20 - DO_TEST("hyperv", NONE); - DO_TEST("hyperv-off", NONE); - DO_TEST("hyperv-panic", NONE); + DO_TEST_CAPS_LATEST("hyperv"); + DO_TEST_CAPS_LATEST("hyperv-off"); + DO_TEST_CAPS_LATEST("hyperv-panic"); =20 DO_TEST("kvm-features", NONE); DO_TEST("kvm-features-off", NONE); --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri Apr 19 19:24:01 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1565361115; cv=none; d=zoho.com; s=zohoarc; b=OFYCDTAr8F3BZz8XtqzUh9u99zV3oiv/X7uJSi3Kirx44QtuKkmXutSXOdAabdAzwy1/rsX+RK+AX6xqiECGmUfd3EiKeDMG5j3xqWoAlPxUH4Ri99KssuoqET+SSqoVXeWFbkymt7sCttWyTo9Wb/Z6e6ZszSeNhqt98S7e0so= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565361115; h=Content-Type:Content-Transfer-Encoding:Cc: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:ARC-Authentication-Results; bh=R9YQ6NeCo+xbQCXfTNv6Fid0bYw+pu+73kz/MqZEJiQ=; b=BMN1Wk1VDwrFGfdwR9TPjydBO5Mmw1zgbh2AAIg1HdNcHhPKfN8RCy5uLOxkj0oICevnb91EO0jL5WrmEgeBcGtJm/fJiPYtPMa6LACRZaXJpyUaDYbRJAFclPNgMSCxtDIvtmXQvr/8lX+SZBmzh7opNX5E12GQDKhWQzS7ygM= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 15653611150201012.8646481600597; Fri, 9 Aug 2019 07:31:55 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 7AB13C08EC14; Fri, 9 Aug 2019 14:31:53 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2C9C85D6A5; Fri, 9 Aug 2019 14:31:53 +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 6F2922551C; Fri, 9 Aug 2019 14:31:51 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x79EVnjb032096 for ; Fri, 9 Aug 2019 10:31:49 -0400 Received: by smtp.corp.redhat.com (Postfix) id CD60C5D6A5; Fri, 9 Aug 2019 14:31:49 +0000 (UTC) Received: from mx1.redhat.com (ext-mx03.extmail.prod.ext.phx2.redhat.com [10.5.110.27]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C607861F44 for ; Fri, 9 Aug 2019 14:31:46 +0000 (UTC) Received: from mail-wr1-f70.google.com (mail-wr1-f70.google.com [209.85.221.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 93AB580F81 for ; Fri, 9 Aug 2019 14:31:46 +0000 (UTC) Received: by mail-wr1-f70.google.com with SMTP id f9so46716766wrq.14 for ; Fri, 09 Aug 2019 07:31:46 -0700 (PDT) Received: from vitty.brq.redhat.com (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id k1sm4732346wru.49.2019.08.09.07.31.43 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 09 Aug 2019 07:31:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QnVoWUTOj2+xNZUDLDk6S69661Beg1fyJLuWdvGh+kM=; b=jOYGV6D00eDHdhig+EdLmzPONi9qB9EZGPrwATGYo38jZ6bGgoR/83O0nKOWtAltiH tnbrQNBL4X/SZN10UlsQm0RP5JQi6nQ0Vb0Z1NOld0nMSpp5NQHDS/qf/8aB0ufMgWjT RfCbPrdCGN6LzgYR7/DA4icaIeAvGvfHky8NSiQJpfa02K4eDPJsba+S2gBTus2T0FVi yINrcZuyvSF/27/+UaD5UkxS+iBvBt11rmmKMOFi+t5liyaiGvFfNJnGn9oNfn/LjPFW rX1cOGAN6E3c0uOOAx3lOKB54MaIK1MLDUpLJMLvmhmJCA3RLXZYm3lknxGYoSMPoSZ6 d53w== X-Gm-Message-State: APjAAAXGMRT4EAFuoV8GYkYT1erS8ROOBWV0rnSyLM//Cvb26ox59y6b iMb0sbmFBjpZwCeYAoQK4mTMhmwH65vO5cOhDMpfzdKvEUSxVP+1DMVLFKLfJGArCkKzjtDnHQy akXyImV2TCetAsOCvUV0= X-Received: by 2002:adf:9ccf:: with SMTP id h15mr25102039wre.241.1565361104983; Fri, 09 Aug 2019 07:31:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqxs9jIKK3uXLUAx46MzfqJGgaRhEUEI030tBRYku/HL9Wo+e5W4PTdk4A1/9pXB5GbrEphPLA== X-Received: by 2002:adf:9ccf:: with SMTP id h15mr25102001wre.241.1565361104725; Fri, 09 Aug 2019 07:31:44 -0700 (PDT) From: Vitaly Kuznetsov To: libvir-list@redhat.com Date: Fri, 9 Aug 2019 16:31:39 +0200 Message-Id: <20190809143141.17349-3-vkuznets@redhat.com> In-Reply-To: <20190809143141.17349-1-vkuznets@redhat.com> References: <20190809143141.17349-1-vkuznets@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: =?UTF-8?q?J=C3=A1n=20Tomko?= , Nikolay Shirokovskiy Subject: [libvirt] [PATCH v4 2/4] conf: add support for Direct Mode for Hyper-V Synthetic timers 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 09 Aug 2019 14:31:54 +0000 (UTC) Support 'Direct Mode' for Hyper-V Synthetic Timers in domain config. Make it 'stimer' enlightenment option as it is not a separate thing. Reviewed-by: J=C3=A1n Tomko Signed-off-by: Vitaly Kuznetsov --- docs/formatdomain.html.in | 10 +++--- docs/schemas/domaincommon.rng | 16 ++++++++- src/conf/domain_conf.c | 62 ++++++++++++++++++++++++++++++++++- src/conf/domain_conf.h | 1 + src/cpu/cpu_x86.c | 3 ++ src/cpu/cpu_x86_data.h | 2 ++ 6 files changed, 88 insertions(+), 6 deletions(-) diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in index f5c882141a..de577e5755 100644 --- a/docs/formatdomain.html.in +++ b/docs/formatdomain.html.in @@ -2033,7 +2033,9 @@ <vpindex state=3D'on'/> <runtime state=3D'on'/> <synic state=3D'on'/> - <stimer state=3D'on'/> + <stimer state=3D'on'> + <direct state=3D'on'/> + </stimer> <reset state=3D'on'/> <vendor_id state=3D'on' value=3D'KVM Hv'/> <frequencies state=3D'on'/> @@ -2148,9 +2150,9 @@ stimer - Enable SynIC timers - on, off - 1.3.3 (QEMU 2.6) + Enable SynIC timers, optionally with Direct Mode support + on, off; direct - on,off + 1.3.3 (QEMU 2.6), direct mode 5.7.0 (Q= EMU 4.1) reset diff --git a/docs/schemas/domaincommon.rng b/docs/schemas/domaincommon.rng index a0771da45b..6707dcc634 100644 --- a/docs/schemas/domaincommon.rng +++ b/docs/schemas/domaincommon.rng @@ -5907,7 +5907,7 @@ - + @@ -5956,6 +5956,20 @@ =20 + + + + + + + + + + + + + + diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c index 0456369d55..f56e850ade 100644 --- a/src/conf/domain_conf.c +++ b/src/conf/domain_conf.c @@ -20388,6 +20388,39 @@ virDomainDefParseXML(xmlDocPtr xml, ctxt->node =3D node; } =20 + if (def->features[VIR_DOMAIN_HYPERV_STIMER] =3D=3D VIR_TRISTATE_SWITCH= _ON) { + int value; + if ((n =3D virXPathNodeSet("./features/hyperv/stimer/*", ctxt, &no= des)) < 0) + goto error; + + for (i =3D 0; i < n; i++) { + if (STRNEQ((const char *)nodes[i]->name, "direct")) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("unsupported Hyper-V stimer feature: %s"), + nodes[i]->name); + goto error; + } + + if (!(tmp =3D virXMLPropString(nodes[i], "state"))) { + virReportError(VIR_ERR_XML_ERROR, + _("missing 'state' attribute for " + "Hyper-V stimer '%s' feature"), "direct"); + goto error; + } + + if ((value =3D virTristateSwitchTypeFromString(tmp)) < 0) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("invalid value of state argument " + "for Hyper-V stimer '%s' feature"), "dire= ct"); + goto error; + } + + VIR_FREE(tmp); + def->hyperv_stimer_direct =3D value; + } + VIR_FREE(nodes); + } + if (def->features[VIR_DOMAIN_FEATURE_KVM] =3D=3D VIR_TRISTATE_SWITCH_O= N) { int feature; int value; @@ -22612,6 +22645,17 @@ virDomainDefFeaturesCheckABIStability(virDomainDef= Ptr src, } } =20 + if (src->hyperv_features[VIR_DOMAIN_HYPERV_STIMER] =3D=3D VIR_TRISTATE= _SWITCH_ON) { + if (src->hyperv_stimer_direct !=3D dst->hyperv_stimer_direct) { + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("State of HyperV stimer direct feature differ= s: " + "source: '%s', destination: '%s'"), + virTristateSwitchTypeToString(src->hyperv_stime= r_direct), + virTristateSwitchTypeToString(dst->hyperv_stime= r_direct)); + return false; + } + } + /* kvm */ if (src->features[VIR_DOMAIN_FEATURE_KVM] =3D=3D VIR_TRISTATE_SWITCH_O= N) { for (i =3D 0; i < VIR_DOMAIN_KVM_LAST; i++) { @@ -28071,7 +28115,6 @@ virDomainDefFormatFeatures(virBufferPtr buf, case VIR_DOMAIN_HYPERV_VPINDEX: case VIR_DOMAIN_HYPERV_RUNTIME: case VIR_DOMAIN_HYPERV_SYNIC: - case VIR_DOMAIN_HYPERV_STIMER: case VIR_DOMAIN_HYPERV_RESET: case VIR_DOMAIN_HYPERV_FREQUENCIES: case VIR_DOMAIN_HYPERV_REENLIGHTENMENT: @@ -28090,6 +28133,23 @@ virDomainDefFormatFeatures(virBufferPtr buf, def->hyperv_spinlocks); break; =20 + case VIR_DOMAIN_HYPERV_STIMER: + if (def->hyperv_features[j] !=3D VIR_TRISTATE_SWITCH_O= N) { + virBufferAddLit(&childBuf, "/>\n"); + break; + } + if (def->hyperv_stimer_direct =3D=3D VIR_TRISTATE_SWIT= CH_ON) { + virBufferAddLit(&childBuf, ">\n"); + virBufferAdjustIndent(&childBuf, 2); + virBufferAddLit(&childBuf, "= \n"); + virBufferAdjustIndent(&childBuf, -2); + virBufferAddLit(&childBuf, "\n"); + } else { + virBufferAddLit(&childBuf, "/>\n"); + } + + break; + case VIR_DOMAIN_HYPERV_VENDOR_ID: if (def->hyperv_features[j] !=3D VIR_TRISTATE_SWITCH_O= N) { virBufferAddLit(&childBuf, "/>\n"); diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h index 57ca2a8ad1..8434f1fd0b 100644 --- a/src/conf/domain_conf.h +++ b/src/conf/domain_conf.h @@ -2400,6 +2400,7 @@ struct _virDomainDef { int kvm_features[VIR_DOMAIN_KVM_LAST]; int msrs_features[VIR_DOMAIN_MSRS_LAST]; unsigned int hyperv_spinlocks; + int hyperv_stimer_direct; virGICVersion gic_version; virDomainHPTResizing hpt_resizing; unsigned long long hpt_maxpagesize; /* Stored in KiB */ diff --git a/src/cpu/cpu_x86.c b/src/cpu/cpu_x86.c index d2d9537c32..32b9836dd5 100644 --- a/src/cpu/cpu_x86.c +++ b/src/cpu/cpu_x86.c @@ -100,6 +100,8 @@ 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); =20 static virCPUx86Feature x86_kvm_features[] =3D { @@ -116,6 +118,7 @@ static virCPUx86Feature x86_kvm_features[] =3D KVM_FEATURE(VIR_CPU_x86_HV_TLBFLUSH), KVM_FEATURE(VIR_CPU_x86_HV_IPI), KVM_FEATURE(VIR_CPU_x86_HV_EVMCS), + KVM_FEATURE(VIR_CPU_x86_HV_STIMER_DIRECT), }; =20 typedef struct _virCPUx86Model virCPUx86Model; diff --git a/src/cpu/cpu_x86_data.h b/src/cpu/cpu_x86_data.h index cc0c93dff0..cebf3b6669 100644 --- a/src/cpu/cpu_x86_data.h +++ b/src/cpu/cpu_x86_data.h @@ -64,6 +64,8 @@ struct _virCPUx86MSR { #define VIR_CPU_x86_HV_IPI "hv-ipi" #define VIR_CPU_x86_HV_EVMCS "hv-evmcs" =20 +/* Hyper-V Synthetic Timer option */ +#define VIR_CPU_x86_HV_STIMER_DIRECT "hv-stimer-direct" =20 #define VIR_CPU_X86_DATA_INIT { 0 } =20 --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri Apr 19 19:24:01 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1565361123; cv=none; d=zoho.com; s=zohoarc; b=Y6cnZPslmXsnHXL3xCrmIGUgTMJz75Y36iDtUms/sPTIo0nJLw6HLMXZL8uUckDOGIf5bDxKZDmbGgH6HhqIoRXDf/fFCjRUboM6SkyRrZf0requMYB3eRRSPUHW6sIOZIXMLmPBIMGtFxa9dz9OwqCwtbAMI+0jXhnVN3gACw4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565361123; h=Content-Type:Content-Transfer-Encoding:Cc: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:ARC-Authentication-Results; bh=OCbg0XiPzZD1v/QS0Mw6r4j4VTcIk75gY43YqavB9S4=; b=WOPAqNd6dwphPD/Ph0/fah0aSsG8GVSTTRa7sWtAmIQZJTZ8hfSx5T8GnEp5glTeaPrXCmZJVdCPKlKzo+rP/4M4k8mowU1CHTuS36/ZzlzGIMZqDeE/5Gj5iAqo06bsR+s5S65hYoYuznH+3rhb81qKThZYORYGELy8Ppnv5WI= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1565361123472547.379663271817; Fri, 9 Aug 2019 07:32:03 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 241FD3172D94; Fri, 9 Aug 2019 14:32:02 +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 ECB376CE52; Fri, 9 Aug 2019 14:32:01 +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 A2634180085A; Fri, 9 Aug 2019 14:32:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x79EVx7D032175 for ; Fri, 9 Aug 2019 10:31:59 -0400 Received: by smtp.corp.redhat.com (Postfix) id E8C512619E; Fri, 9 Aug 2019 14:31:59 +0000 (UTC) Received: from mx1.redhat.com (ext-mx05.extmail.prod.ext.phx2.redhat.com [10.5.110.29]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DFE832632F for ; Fri, 9 Aug 2019 14:31:47 +0000 (UTC) Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 81ECE2F366F for ; Fri, 9 Aug 2019 14:31:47 +0000 (UTC) Received: by mail-wm1-f70.google.com with SMTP id y127so1372807wmd.0 for ; Fri, 09 Aug 2019 07:31:47 -0700 (PDT) Received: from vitty.brq.redhat.com (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id k1sm4732346wru.49.2019.08.09.07.31.44 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 09 Aug 2019 07:31:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=TtmJ/cZqiIQtE0UVVjU0nmE//UGivANDQz63udfPpoo=; b=jYRDZ/FjBIlmj257gjv0sMR2OQJzA/EOINT8roOe4KHNPiUBgA4fbF7o5h8XXrGY3R oJfanbR25HuIn79GEuXCgSLJT7PTknqf0CV0iJBSSMwd9VLJ5KuLvJMYmn4LuBdMxtSn rHInrSMzU3YIPwLKBK2UNrBB09sCyW7g1kSTNr/C/dNINEpENUbMSbNlNjIjtlN9grzW BvFTK7naTxeLgxRIq+UQ+/CTKx5+8hZLRBY9DvtwSgKdeXJ1axCteEFcSh/hshsHHXp4 4R1j9ITi0FDX2W3uVyaBmVoiBV6w7Fj1sjhBI7ca4pxx3NciZLp3lbC3bysdgjCBzfQg z3lQ== X-Gm-Message-State: APjAAAXDKlUGwnUJOsmqaZU44kmLNsw4ISt1M20S2+V6anlkMczf/NCd Dwu2RS+jPkDszrSpHzm8Df/WVKxL2CwUAI6Uhiu2GAg/uBnGuiUJf+H+jdEXkrMjJceGGV7AKW7 qiX2sqGWWX8a4Ox9cPv0= X-Received: by 2002:a5d:55c2:: with SMTP id i2mr23796565wrw.96.1565361105848; Fri, 09 Aug 2019 07:31:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqzgEQRR5AsCx2Z9NbLATN4YOyuNohO2M6WmZ7m0mEyGoATTY8+9LIz9ClBb23yQl1DMKSTRgA== X-Received: by 2002:a5d:55c2:: with SMTP id i2mr23796544wrw.96.1565361105558; Fri, 09 Aug 2019 07:31:45 -0700 (PDT) From: Vitaly Kuznetsov To: libvir-list@redhat.com Date: Fri, 9 Aug 2019 16:31:40 +0200 Message-Id: <20190809143141.17349-4-vkuznets@redhat.com> In-Reply-To: <20190809143141.17349-1-vkuznets@redhat.com> References: <20190809143141.17349-1-vkuznets@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-loop: libvir-list@redhat.com Cc: =?UTF-8?q?J=C3=A1n=20Tomko?= , Nikolay Shirokovskiy Subject: [libvirt] [PATCH v4 3/4] qemu: add support for Direct Mode for Hyper-V Synthetic timers 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: , Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.41]); Fri, 09 Aug 2019 14:32:02 +0000 (UTC) Content-Type: text/plain; charset="utf-8" QEMU-4.1 supports 'Direct Mode' for Hyper-V synthetic timers (hv-stimer-direct CPU flag): Windows guests can request that timer expiration notifications are delivered as normal interrupts (and not VMBus messages). This is used by Hyper-V on KVM. Signed-off-by: Vitaly Kuznetsov Reviewed-by: J=C3=A1n Tomko --- src/qemu/qemu_command.c | 3 ++ src/qemu/qemu_process.c | 20 +++++++++-- .../hyperv-stimer-direct.x86_64-latest.args | 32 +++++++++++++++++ .../qemuxml2argvdata/hyperv-stimer-direct.xml | 33 +++++++++++++++++ tests/qemuxml2argvtest.c | 1 + .../hyperv-stimer-direct.xml | 35 +++++++++++++++++++ tests/qemuxml2xmltest.c | 1 + 7 files changed, 123 insertions(+), 2 deletions(-) create mode 100644 tests/qemuxml2argvdata/hyperv-stimer-direct.x86_64-late= st.args create mode 100644 tests/qemuxml2argvdata/hyperv-stimer-direct.xml create mode 100644 tests/qemuxml2xmloutdata/hyperv-stimer-direct.xml diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c index 71a36ff63a..9add21b929 100644 --- a/src/qemu/qemu_command.c +++ b/src/qemu/qemu_command.c @@ -7175,6 +7175,9 @@ qemuBuildCpuCommandLine(virCommandPtr cmd, virBufferAsprintf(&buf, ",%s%s", hvPrefix, virDomainHypervTypeToString(i)); + if ((i =3D=3D VIR_DOMAIN_HYPERV_STIMER) && + (def->hyperv_stimer_direct =3D=3D VIR_TRISTATE_SWITCH_= ON)) + virBufferAsprintf(&buf, ",%s", VIR_CPU_x86_HV_STIMER_D= IRECT); break; =20 case VIR_DOMAIN_HYPERV_SPINLOCKS: diff --git a/src/qemu/qemu_process.c b/src/qemu/qemu_process.c index 1ed56457b1..7c6428ea75 100644 --- a/src/qemu/qemu_process.c +++ b/src/qemu/qemu_process.c @@ -4112,10 +4112,26 @@ qemuProcessVerifyHypervFeatures(virDomainDefPtr def, rc =3D virCPUDataCheckFeature(cpu, cpuFeature); VIR_FREE(cpuFeature); =20 - if (rc < 0) + if (rc < 0) { return -1; - else if (rc =3D=3D 1) + } else if (rc =3D=3D 1) { + if (i =3D=3D VIR_DOMAIN_HYPERV_STIMER) { + if (def->hyperv_stimer_direct !=3D VIR_TRISTATE_SWITCH_ON) + continue; + + rc =3D virCPUDataCheckFeature(cpu, VIR_CPU_x86_HV_STIMER_D= IRECT); + if (rc < 0) + return -1; + else if (rc =3D=3D 1) + continue; + + virReportError(VIR_ERR_CONFIG_UNSUPPORTED, + _("host doesn't support hyperv stimer '%s' = feature"), + "direct"); + return -1; + } continue; + } =20 switch ((virDomainHyperv) i) { case VIR_DOMAIN_HYPERV_RELAXED: diff --git a/tests/qemuxml2argvdata/hyperv-stimer-direct.x86_64-latest.args= b/tests/qemuxml2argvdata/hyperv-stimer-direct.x86_64-latest.args new file mode 100644 index 0000000000..34e27c75f0 --- /dev/null +++ b/tests/qemuxml2argvdata/hyperv-stimer-direct.x86_64-latest.args @@ -0,0 +1,32 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/tmp/lib/domain--1-QEMUGuest1 \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-i686 \ +-name guest=3DQEMUGuest1,debug-threads=3Don \ +-S \ +-object secret,id=3DmasterKey0,format=3Draw,\ +file=3D/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ +-machine pc,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-cpu qemu32,hv-vpindex,hv-synic,hv-stimer,hv-stimer-direct \ +-m 214 \ +-overcommit mem-lock=3Doff \ +-smp 6,sockets=3D6,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-boot strict=3Don \ +-device piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x2 \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ +resourcecontrol=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/hyperv-stimer-direct.xml b/tests/qemuxm= l2argvdata/hyperv-stimer-direct.xml new file mode 100644 index 0000000000..9c865f5746 --- /dev/null +++ b/tests/qemuxml2argvdata/hyperv-stimer-direct.xml @@ -0,0 +1,33 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 6 + + hvm + + + + + + + + + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-i686 + + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 4c3aeffe76..235efe0b06 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -914,6 +914,7 @@ mymain(void) DO_TEST_CAPS_LATEST("hyperv"); DO_TEST_CAPS_LATEST("hyperv-off"); DO_TEST_CAPS_LATEST("hyperv-panic"); + DO_TEST_CAPS_LATEST("hyperv-stimer-direct"); =20 DO_TEST("kvm-features", NONE); DO_TEST("kvm-features-off", NONE); diff --git a/tests/qemuxml2xmloutdata/hyperv-stimer-direct.xml b/tests/qemu= xml2xmloutdata/hyperv-stimer-direct.xml new file mode 100644 index 0000000000..806164beea --- /dev/null +++ b/tests/qemuxml2xmloutdata/hyperv-stimer-direct.xml @@ -0,0 +1,35 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 6 + + hvm + + + + + + + + + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-i686 + +
+ + + + + + + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index 525eb9a740..7e14125f97 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -289,6 +289,7 @@ mymain(void) DO_TEST("hyperv", NONE); DO_TEST("hyperv-off", NONE); DO_TEST("hyperv-panic", NONE); + DO_TEST("hyperv-stimer-direct", NONE); =20 DO_TEST("kvm-features", NONE); DO_TEST("kvm-features-off", NONE); --=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list From nobody Fri Apr 19 19:24:01 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 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=1565361114; cv=none; d=zoho.com; s=zohoarc; b=Ouq66ESF4Mjl2zeoleQ/IRqvVbZLWSK3T5LIRq6eiuFNSO7dtc5Gr7Y7Xw7CB+YzNZrMTdGkrAQwauqFyf0zbB7kIiK7wbgrI+/brhGrIVv55i5lUBzRBhyaw4FFPbruC3Y+Zc01RK5DH7vl/qgAGnY2WSG59sP2u2fMfKRBQ6I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1565361114; h=Content-Type:Content-Transfer-Encoding:Cc: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:ARC-Authentication-Results; bh=R/aaAvWhVEdGhISQBUSpmbzrzjhFw/WqJCNCwLEzMrI=; b=XuTYmw1wzfuOvLupp/MH9rgta0xl1e6Xx9vigQcEuGXVWoXfbJeEThF2N9GoB9EXUNC+cX079an6Fm6fsHhU1IP2BM57H11Tewo1EVQp5GgpecnAUCDAxB8g9bgD9FPYV9H7hBN7bi3Ca/wuBAetNfLjhYrUa8Pqi9NADguSLlw= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1565361114740121.19755472843724; Fri, 9 Aug 2019 07:31:54 -0700 (PDT) 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 mx1.redhat.com (Postfix) with ESMTPS id 842E6629C0; Fri, 9 Aug 2019 14:31:53 +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 2D5865E1B0; Fri, 9 Aug 2019 14:31:53 +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 D9795180B536; Fri, 9 Aug 2019 14:31:52 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id x79EVpFM032102 for ; Fri, 9 Aug 2019 10:31:51 -0400 Received: by smtp.corp.redhat.com (Postfix) id 59FE06D280; Fri, 9 Aug 2019 14:31:51 +0000 (UTC) Received: from mx1.redhat.com (ext-mx10.extmail.prod.ext.phx2.redhat.com [10.5.110.39]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 541A66D81B for ; Fri, 9 Aug 2019 14:31:48 +0000 (UTC) Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0B787970E2 for ; Fri, 9 Aug 2019 14:31:48 +0000 (UTC) Received: by mail-wm1-f71.google.com with SMTP id m25so1371386wml.6 for ; Fri, 09 Aug 2019 07:31:47 -0700 (PDT) Received: from vitty.brq.redhat.com (nat-pool-brq-t.redhat.com. [213.175.37.10]) by smtp.gmail.com with ESMTPSA id k1sm4732346wru.49.2019.08.09.07.31.45 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 09 Aug 2019 07:31:45 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=R23cUZxLPjAJX6G5UA07jwhuWVRnE2EQrQ/DA5HXEnw=; b=bLf8nFVGDnGZwuoYDeQ7ipceoKWuSfhMHsnoeIVykTs6TBdTM38f7nS7dkOBj2UnLw 3fPEingDbVEpehjXDUDuOUtxNGl+zWiz34dPRcd9v7l5av66yyrYAQFQSnh72+2RdC3s Lfur2QTiRIvpPiBLknfxQFJG0dJ/A7cC+yyCAmSvMVf3azNrEV43Aonag58l8fPFMbGn Tit+yD0dtEEdDg2q0Oa0SzdKEiJv6Rihx030GoPRm1qOiBbZGmcGO2UZ3uTxcEwUG/Iq IvivNSrFmpIaQn6es/YvJDZq10VJPQ4hONWgS8GTUOkly64INnbiMWVNrURtap1hHJc6 67Qg== X-Gm-Message-State: APjAAAVmJ9s5uyLG836nqiPvPHcTG2ZCk9/e0uZg1dsvh6Wz/92QqNkN OE8MyYywLugoZ+j4+91FCS2Th+3vqC3LlEQ/B1bFc0YAKbavIs41oeT+hd3vr3pmdiGFxDSNPHV wLess2CsQhO/dEQRDIew= X-Received: by 2002:adf:fc8d:: with SMTP id g13mr23356944wrr.234.1565361106586; Fri, 09 Aug 2019 07:31:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqxz3KLUpGF7FUHM3SGCRqI9+a4TOfa4Rt2WnMDLFkptEmNyyyw9ZgtTNvDzYfzA2WhBWYppGA== X-Received: by 2002:adf:fc8d:: with SMTP id g13mr23356930wrr.234.1565361106397; Fri, 09 Aug 2019 07:31:46 -0700 (PDT) From: Vitaly Kuznetsov To: libvir-list@redhat.com Date: Fri, 9 Aug 2019 16:31:41 +0200 Message-Id: <20190809143141.17349-5-vkuznets@redhat.com> In-Reply-To: <20190809143141.17349-1-vkuznets@redhat.com> References: <20190809143141.17349-1-vkuznets@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-loop: libvir-list@redhat.com Cc: =?UTF-8?q?J=C3=A1n=20Tomko?= , Nikolay Shirokovskiy Subject: [libvirt] [PATCH v4 4/4] news: mention Direct Mode for Hyper-V Synthetic timers support 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: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Fri, 09 Aug 2019 14:31:54 +0000 (UTC) The QEMU driver now supports Direct Mode for Hyper-V Synthetic timers for Hyper-V guests. Reviewed-by: J=C3=A1n Tomko Signed-off-by: Vitaly Kuznetsov --- docs/news.xml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/news.xml b/docs/news.xml index a4d727b9c5..d63fca3b48 100644 --- a/docs/news.xml +++ b/docs/news.xml @@ -41,6 +41,15 @@
+ + + qemu: Support Direct Mode for Hyper-V Synthetic timers + + + The QEMU driver now supports Direct Mode for Hyper-V Synthetic t= imers + for Hyper-V guests. + +
--=20 2.20.1 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list