From nobody Tue Feb 10 02:54:53 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.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 [209.51.188.17]) by mx.zohomail.com with SMTPS id 1630934116147119.02050507465867; Mon, 6 Sep 2021 06:15:16 -0700 (PDT) Received: from localhost ([::1]:53872 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mNESx-0000Sp-3Y for importer@patchew.org; Mon, 06 Sep 2021 09:15:15 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:57186) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mNEP4-0000bG-NE for qemu-devel@nongnu.org; Mon, 06 Sep 2021 09:11:14 -0400 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:38871) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mNEP3-0007MQ-CE for qemu-devel@nongnu.org; Mon, 06 Sep 2021 09:11:14 -0400 Received: by mail-wr1-x432.google.com with SMTP id u16so9794326wrn.5 for ; Mon, 06 Sep 2021 06:11:13 -0700 (PDT) Received: from avogadro.redhat.com ([2001:b07:6468:f312:c8dd:75d4:99ab:290a]) by smtp.gmail.com with ESMTPSA id k4sm7992331wrm.74.2021.09.06.06.11.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 06 Sep 2021 06:11:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=F257kBkfuJl6Q7MoJ0dNQEoRR26oeybWJUiYLakF928=; b=E4fXyTIjpI/LJXmVSN1LtWceHG5RM5rspcRAtTNtuAmgqvwPegPgnxpPH3AAZpO82Z R4KF0reTQsvIK3Ng9gmqjqI13CTGiVa9kIQbQlNenyKgL2WUO4gTQM0ijAyhhURYYh28 vl10HMACgnOQNP+gM/EKlQHLO0NMivAomJLJ/U4LaYCrCv8c9Ig+rMmtaoX4ipL7+RR5 dVJa/Xj4Mbg9C/F+YgpspdskvGkxUr5ctgqj11wcC7B49MwaJWFk60EVOMEwjuWxDQ+S EVAAjiLnBxL2JuMB/xsh7ga/jkOwrdfqCOLMnTW1qeTD3rab/Xybn1K/Mjk0ud474m6v wsEA== 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:mime-version:content-transfer-encoding; bh=F257kBkfuJl6Q7MoJ0dNQEoRR26oeybWJUiYLakF928=; b=RYAK2kOz5jopJ1WDLcMWaNhIrJHocMGX70NQN65DGE+Cg8jScpQqqfIF9UI9vOuVnF SiFDgqwz8MOO9LAe8IV2xyPGGKd5/tPwHUCfbAmCswJTci+iFIpuXhAl2JdPjDoQKaY+ D6Vc2vZ3jLhK62TACloSIC4XetsGsKOXeWV9avOshw+MGw3ltdTk0SqAeFcX3jkH0BKR 8m9HOZ01nPWiYGc5FfCN4b3PErxc7rzj41tmG2qYbOJZ+Ofm9smz6h3BDiAzWUwZ1ems AiilVk3iJfIW1+UnCa11gQkkIjq4mUV/8zKI5oEyhmVP4SrS16RSWhTE2UIN3Tj+23Hv 6X6Q== X-Gm-Message-State: AOAM530OV47RnTBJTN4wzbVZK5HgWf3g4dbtMt/LLGuHLpFCTrETPIMp RsTQ+x2ZK4Cq00YxhSI82Z1pYMDVQYA= X-Google-Smtp-Source: ABdhPJx7/76J+mLZGv7MRuFvO4jQUvBcLUy4pAbKHKvxyJeOOnLe5riGdQeYIYccWquBlUxLppVk6w== X-Received: by 2002:adf:c14c:: with SMTP id w12mr13576649wre.115.1630933872095; Mon, 06 Sep 2021 06:11:12 -0700 (PDT) From: Paolo Bonzini To: qemu-devel@nongnu.org Subject: [PULL 05/36] target/i386: Added ignore TPR check in ctl_has_irq Date: Mon, 6 Sep 2021 15:10:28 +0200 Message-Id: <20210906131059.55234-6-pbonzini@redhat.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210906131059.55234-1-pbonzini@redhat.com> References: <20210906131059.55234-1-pbonzini@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::432; envelope-from=paolo.bonzini@gmail.com; helo=mail-wr1-x432.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lara Lazier Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZM-MESSAGEID: 1630934116912100001 Content-Type: text/plain; charset="utf-8" From: Lara Lazier The APM2 states that if V_IGN_TPR is nonzero, the current virtual interrupt ignores the (virtual) TPR. Signed-off-by: Lara Lazier Signed-off-by: Paolo Bonzini --- target/i386/tcg/sysemu/svm_helper.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/target/i386/tcg/sysemu/svm_helper.c b/target/i386/tcg/sysemu/s= vm_helper.c index 4612dae1ac..a35b79548a 100644 --- a/target/i386/tcg/sysemu/svm_helper.c +++ b/target/i386/tcg/sysemu/svm_helper.c @@ -83,6 +83,11 @@ static inline bool ctl_has_irq(CPUX86State *env) =20 int_prio =3D (env->int_ctl & V_INTR_PRIO_MASK) >> V_INTR_PRIO_SHIFT; tpr =3D env->int_ctl & V_TPR_MASK; + + if (env->int_ctl & V_IGN_TPR_MASK) { + return env->int_ctl & V_IRQ_MASK; + } + return (env->int_ctl & V_IRQ_MASK) && (int_prio >=3D tpr); } =20 --=20 2.31.1