From nobody Sat Oct 25 09:04:20 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1520343972971203.0881954940213; Tue, 6 Mar 2018 05:46:12 -0800 (PST) Received: from localhost ([::1]:55854 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etCuu-0004Ef-F2 for importer@patchew.org; Tue, 06 Mar 2018 08:46:08 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48401) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etCVx-0005su-Aw for qemu-devel@nongnu.org; Tue, 06 Mar 2018 08:20:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1etCVr-0006hq-7G for qemu-devel@nongnu.org; Tue, 06 Mar 2018 08:20:21 -0500 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]:50450) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1etCVq-0006gi-KT for qemu-devel@nongnu.org; Tue, 06 Mar 2018 08:20:14 -0500 Received: by mail-wm0-x244.google.com with SMTP id w128so22837638wmw.0 for ; Tue, 06 Mar 2018 05:20:14 -0800 (PST) Received: from 640k.lan (94-36-191-219.adsl-ull.clienti.tiscali.it. [94.36.191.219]) by smtp.gmail.com with ESMTPSA id l38sm25652538wrc.96.2018.03.06.05.20.11 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 06 Mar 2018 05:20:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=/TP6gD5rzLr2rVY7NSla9bSEC1y0SdEvHzyW8Dpf5Z0=; b=dRGvuoJpqbRhc9HSQbgshm4LiqQEeDaelhUqqkk5ZtvcBUH6xintW4o2KH71Q8W6oV CI/QPJ1nVbXeYNg4sY769gdUyZSFLWOjYIaiZrtN4Rqm5zlKoIJQHB+uR7pwwQiAvsZU f/wHNNZOVfdu3Q3v9iT0l6O4ARzaQJFO/o63usYFnzyl0/E4WzvUEKcC7vVPUCNP9aAO lFrIQIOf0zZbuxqeyVbKNrnB8CxHqkctiwIJIF2OtL2/RUcsMdlAKi9Pway+MquBXUJb WJISMGidEs01dHeZLgJawRmyr2xBROvRSuLbcc3TD1funroWJzq9siAx7ozxNlhc7Puk hgvQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=/TP6gD5rzLr2rVY7NSla9bSEC1y0SdEvHzyW8Dpf5Z0=; b=HxDecQ8KofLPCL7JmY/53t56zc+nLhgtFeL4bzsL7ygBFjiWmmxeLPgdBgGlx0q2SU B/kVAacGUqCcPq32e/3DQlzz7aDiuWwBtW3ANSSx6R0uikBTSb1kb4tLWUamaGm2Y7t3 abrx/4qpe9JUg+oiuFUu0QwF6LPjAaB2IvYmW7x9S1/LB4POUJElR531ccMB9lA08sG+ HXEJeQDFnWg+Jvc59opN4x9kLg9pcMk4fyLkb1e0aqJ1BHdz43u3LZiCWhls1rUbW6TP VfXmjPQ1oT2Jm/Sc3xKdy6xCk9j8PEth6WnLfwnDbBlydPp2pwrtlQ/IyVMYwUE0D5aR Rb9A== X-Gm-Message-State: AElRT7Fr8r3Nb0WJSJe1SI7Gbo48sEmWhEdXkqyXe79/y7Jox+q/HpgJ vmdiuMZOLXXXon4BJoOHMi5bWIOk X-Google-Smtp-Source: AG47ELucRjSf6Z7/YbuHawB6UWYOR59tfgXDOIP1b7HKQBUVmDboGjKaOJEab9SmDs9h4PCP5GPBMg== X-Received: by 10.28.197.205 with SMTP id v196mr10622462wmf.141.1520342413134; Tue, 06 Mar 2018 05:20:13 -0800 (PST) From: Paolo Bonzini To: qemu-devel@nongnu.org Date: Tue, 6 Mar 2018 14:19:28 +0100 Message-Id: <1520342370-123606-33-git-send-email-pbonzini@redhat.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1520342370-123606-1-git-send-email-pbonzini@redhat.com> References: <1520342370-123606-1-git-send-email-pbonzini@redhat.com> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:400c:c09::244 Subject: [Qemu-devel] [PULL 32/34] WHPX improve interrupt notification registration X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: "Justin Terry \(VM\)" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" From: "Justin Terry (VM) via Qemu-devel" Improves the usage of the InterruptNotification registration by skipping the additional call to WHvSetVirtualProcessorRegisters if we have already registered for the window exit. Signed-off-by: Justin Terry (VM) Message-Id: <1519665216-1078-9-git-send-email-juterry@microsoft.com> Signed-off-by: Paolo Bonzini Signed-off-by: Justin Terry (VM) via Qemu-devel --- target/i386/whpx-all.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/target/i386/whpx-all.c b/target/i386/whpx-all.c index 24387be..940bbe5 100644 --- a/target/i386/whpx-all.c +++ b/target/i386/whpx-all.c @@ -756,12 +756,11 @@ static void whpx_vcpu_pre_run(CPUState *cpu) } =20 /* Update the state of the interrupt delivery notification */ - if (cpu->interrupt_request & CPU_INTERRUPT_HARD) { + if (!vcpu->window_registered && + cpu->interrupt_request & CPU_INTERRUPT_HARD) { reg_values[reg_count].DeliverabilityNotifications.InterruptNotific= ation =3D 1; - if (vcpu->window_registered !=3D 1) { - vcpu->window_registered =3D 1; - } + vcpu->window_registered =3D 1; reg_names[reg_count] =3D WHvX64RegisterDeliverabilityNotifications; reg_count +=3D 1; } --=20 1.8.3.1