[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/3] x86/irq: don't disable domain MSI IRQ on force unbind
- To: <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
- Date: Tue, 26 Jan 2021 12:06:05 +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-SenderADCheck; bh=35r293zGi7bEtyf6UwXJ4l7Clf7lDN7gCH2LmyYvRfE=; b=VxvJHthnt0grba5LtwZhHttBu79zOyrlU7rfclDQNFD76YUxEn1BtgWHW3i/F5ny8KlIUNCLqZmxUE+JsZUMcYUe0DDDd08UP/gDTHxy8Q/esdBkvh7ax2JgFiHfYcrOv1/RzSWjgNaurw51ui6j4Z+8L+oiukweK6tEF3YrJOXz8s7Ri2iBx+XsViCjTyt7x+EZa/BR+d/I3+Vcgxcp2CxgQiJwcdRp6hA+HQCliZh7dHtmtdK8tGZ1YJz9jSTlVPYEKiaNthhq+I2YXB+Rnw8oqA2mUyMjPcHIQ6SK8sQ7RKgFsEb0+O6Gd0LW411dWxEP27z4CGme7+rgaGjgKw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HHlkzs4Ym26muNJH4UZfn0PbasHQDNjKjfnRqx9DwP9hphjUIsSVH6sV1Xc6OsgtsX8zsRIZ3A2P5SifHk2SiIMRqGAATj70TBR4TBzfzbz2E/9zvcbHr+G/psN+SCBRWdTDG5wasxqHkVnN/7PBs55A2OKoC2QS3zpunW2ouao5c17foO0xd76YKI+ZEdbvdmKzeVWClcQJLgqJsvdRNSeRPxt521kEuEY1y/Ylic6BlhHNAZ7l018Ju0uzr2vTMgtRZt5VQb1WTH7XS33vTRwV5A6RleUk48S4bMQcvB2Ya//L9C7VVF5K3qCMluan3R1yuu4r9YU30Jbzi10MYQ==
- Authentication-results: esa6.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: Tue, 26 Jan 2021 11:08:18 +0000
- Ironport-sdr: /tecgAs6H4UDCV+/njuDxMCH/oRRHd0toI6QxyLZjQUrEHuHJ+A94xapCMbDBK3ThuzctWmebb 6mOzpMG81kkJkuG32bMsgjg0sEFYWbzrK5LIbQPqASsRKafIoY7xIZ/ewcBd3XM/47+KqYYqn4 shC5Nron5349WwpEG6HEGpQojqwHW2GNW/oI4X2dhPJu4YNi6RQcVaFtfwFQnhLS8Ulv48WPB+ t9AZ1qF9fEpM839STriChK0/8uoR8RYfBCBQ94NyUqaJsKodrmQh5WpSAFWyYU1Or4p7dWzBX4 n9Y=
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
When force unbinding a MSI the used IRQ would get added to the domain
irq-pirq tree as -irq -pirq, thus preventing the same IRQ to be used
by the domain. Doing so for MSI allocated IRQs prevents the same IRQ
to be used for any other device, since MSI IRQs are allocated and
deallocated on demand unlike legacy PCI IRQs.
Ignore forced unbinds for MSI IRQs and just cleanup the irq-pirq
information as normal.
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
It's not clear to me why we add the irq as -irq -pirq to the irq-pirq
domain tree on forced unbind, as allowing to bind the irq again should
just work regardless of whether it has been previously forcefully
unbound?
---
xen/arch/x86/irq.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
index 49849bd7d3..c8e5277eb1 100644
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -2362,7 +2362,7 @@ int unmap_domain_pirq(struct domain *d, int pirq)
{
BUG_ON(irq != domain_pirq_to_irq(d, pirq + i));
- if ( !forced_unbind )
+ if ( !forced_unbind || msi_desc )
clear_domain_irq_pirq(d, irq, info);
else
{
--
2.29.2
|