[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/3] hvm/irq: tighten check in hvm_domain_use_pirq
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
- Date: Thu, 3 Mar 2022 11:30:56 +0100
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=v3ryk5q8FKUxx6AOhcSeGFHahYVASbk58h3VZK2SFNM=; b=Rv2PMRcXhfviph68PBY0QfD9VhCyIsA8v+xlwnazRpw1+9ZTXPO9ObGdSCGeyF0TO5WEic7BgqxXYNb8X/EByQxe4UMXP2wW6+Idq4UJ1BgHeD/+/RHbJcsSA3B6TX1S4Dguq7rZlvz5Oen/JAc0FimyWq2gLP5Fgbp8w1mjqWKTwQ//c63cL/YZ0/FPIGUjThk5Y69pswBTperEeL8FrGW2e3+qROWp7/KIEdnvZprTDG55I6gBxJAkATYgEcu1hDNrsJljczLuFe/MbFUQZJ9CtXPLcI0wf5BeSNu+BfsZdAc+oBxMJH9UJNHa+wXApY4J42FW3PQ6+DZhuVLymg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=LAzU1OLGrGbU02r+zkbGSmgmkO4IaPOqTm48b7ignoYZ9WUSbW4JtPbdNohyil3/Ca4scEL4c+R+WbRAU2/IOKKHTgckn1tlVccjuBgkuJUou9OJfCpgTuy0ywa0xHO10Cy0nq0UtGNvW2q4cCN28iyTnfB5h/ns81oEVrf8N5DxGCPzaranhOZGMDfZfLzwJkpyRRv+DZjJyLKiRwUswltwNvnvqWh2m1Yxpo9WFe+DkiGUefBvhEeBBVy1wVTufzBpVQEQPnX0ELf7hPvRfYw2SF7Lf3Enav+TPpaTi5WTdurk3dvTZviNjxHzdByMNuL6dk6c23kTemz87JitSw==
- Authentication-results: esa1.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Thu, 03 Mar 2022 10:31:29 +0000
- Ironport-data: A9a23:RCtgeKh7FPKeN0SRFq/KbIEaX161dhAKZh0ujC45NGQN5FlHY01je htvWDqDOqreNmqmc9l3b43j8UMG7J7Xnd4ySgRqrS1mFy4b9cadCdqndUqhZCn6wu8v7a5EA 2fyTvGacajYm1eF/k/F3oDJ9CU6jefSLlbFILas1hpZHGeIcw98z0M78wIFqtQw24LhWFvW4 YqaT/D3YzdJ5RYlagr41IrbwP9flKyaVOQw5wFWiVhj5TcyplFNZH4tDfjZw0jQG+G4KtWSV efbpIxVy0uCl/sb5nFJpZ6gGqECaua60QFjERO6UYD66vRJjnRaPqrWqJPwwKqY4tmEt4kZ9 TlDiXC/YQ0KIrX0uspeahobP3pmIpEc2JTtI0Hq5KR/z2WeG5ft6/BnDUVwNowE4OdnR2pJ8 JT0KhhUMErF3bjvhuvmFK883azPL+GyVG8bkmtnwjzDS+4vXLjIQrnQ5M8e1zA17ixLNaiDO JpCMGEzBPjGSxFLeXMbDMMHp/7r1lf+SB5lpG+z+YNitgA/yyQuieOwYbI5YOeiWsF9jkue4 GXc8AzRABsXKdiewjqt6W+3i6nEmiaTcJIfEvi0++BnhHWXx3cPE1sGWF2ju/67h0WiHdVFJ CQpFjEG9PZoshbxF5+kAkP+8CXsUgMgt8R4Gc4m8Dmv5Ont4EW1XXAbcmRhQ/YkjZpjLdA17 WOhk9TsDD1plbSaT3OB67uZxQ+P1TgpwXwqPnFdE1ZcizX3iMRq10+UEI4/eEKgpoCtQVnNL ya2QD/Sbln5peoCzO2F8F/OmFpATbCZH1dutm07so9Ihz6VhbJJhaT1sTA3Dt4ade51q2VtW lBewaByC8hUUPmweNSlGrllIV1Qz6/t3MfgqVBuBYI90D+m5mSue4tdiBknehs3aJpaJW6yP xKK0e+02HO1FCHwBUOQS9jsY/nGMIC6TYi1PhwqRoAmjmdNmP+vo3g1OB/4M5HFm0kwi6AvU ap3gu73ZUv2/Z9PlWLsL89EiOdD7nlnmQv7GMCqpzz6gOH2TCPEFt843K6mM7lRAFWs+16Or b6y9qKiln1ibQEJSnKPoN5LcAtTdiBT6FKfg5U/S9Nv6zFOQQkJI/TQ3akga8pimaFUnf3P5 XazRglTz1+XuJENAV7ihqxLAF83YatCkA==
- Ironport-hdrordr: A9a23:R5CTkK2IkuJ9mWxwSbs9rAqjBEgkLtp133Aq2lEZdPU0SKGlfg 6V/MjztCWE7Ar5PUtLpTnuAsa9qB/nm6KdgrNhWItKPjOW21dARbsKheffKlXbcBEWndQtt5 uIHZIeNDXxZ2IK8PoT4mODYqodKA/sytHWuQ/cpU0dMz2Dc8tbnmBE4p7wKDwMeOFBb6BJcq a01458iBeLX28YVci/DmltZZm4mzWa/KiWGCLvHnQcmXGzsQ8=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
hvm_domain_use_pirq checking whether the passed domain is an HVM
guests is pointless, as all calls originate from HVM only paths.
Instead check whether the domain has PIRQ support in order to avoid
further checks.
No functional change intended.
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
xen/arch/x86/hvm/irq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/x86/hvm/irq.c b/xen/arch/x86/hvm/irq.c
index 5a7f39b54f..7c5dfd3c3a 100644
--- a/xen/arch/x86/hvm/irq.c
+++ b/xen/arch/x86/hvm/irq.c
@@ -30,7 +30,7 @@
bool hvm_domain_use_pirq(const struct domain *d, const struct pirq *pirq)
{
- return is_hvm_domain(d) && pirq && pirq->arch.hvm.emuirq != IRQ_UNBOUND;
+ return has_pirq(d) && pirq && pirq->arch.hvm.emuirq != IRQ_UNBOUND;
}
/* Must be called with hvm_domain->irq_lock hold */
--
2.34.1
|