[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 6/6] x86/irq: do not set nr_irqs based on nr_irqs_gsi in APIC mode
- To: xen-devel@xxxxxxxxxxxxxxxxxxxx
- From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
- Date: Thu, 23 Jun 2022 10:24:28 +0200
- 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=f+VcW6quQIs1mH4she5NONTPj4PREd8r33VA4ThvE2Y=; b=Vm1JnhpCimwNl09RPPYqhRrqKB6StYkwhHCnxWA9i2y97qBp1c4MTgToOhcIraCGdWo4NR2GxTtcia+Qygnxv8BBk2lI6Bo+9BphEnez/kPqGxJEstqbs+QhZNtMiQzLrSRCqun9gpsW8Mo/SHJ/XPnes3VJIUYVT3moEUgEbNNlQMMKC9Pm0AeLOE8X/GfzmLXxKwDmi3BWW7C9rsJ7tQyuM6yUo7eEr9kV3XkE8sv+iBKEk9cXscIk7FYq4VU6u+xhzbtYK/swYJW+r5Jp45kvueFXTEGI1fHDAOcQryv3UbBMTKFr8MbPjl+DERxDrJ1koRs2fmUFtDB495ghYQ==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AxCIowIDGrOKrX7/eLjIYrjmeMdqBJgDPCf6tzqnlxhmJHMV3lMsbrEbGMXfAKDc96sM6kZzBLE+RaQD2kOFZQYRgCQwlip9I7RDrx4xKtgPWQfUb9KlgQZL0Ilo4nW07DYVDhVh1KJfCtauG+XUJBeo1F78x3fPtx8arGT/yR8JXohG3DJObIejyrvlI356/qKYaP1Kqr1AwHxAN69tYQqJAywXWuzPtkHhgoXGZczF0jFjQsgvCJwl/t4cdfsBaQLbX/ZBHbwv2aGh3QM7wzh5qXKpyOg8fIhUsP8PztgBUYN7I+aSWKbZHRWtpLjDSF4c9wttfiINhi+1YF0/Fg==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=citrix.com;
- Cc: Roger Pau Monne <roger.pau@xxxxxxxxxx>, Jan Beulich <jbeulich@xxxxxxxx>, Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Wei Liu <wl@xxxxxxx>
- Delivery-date: Thu, 23 Jun 2022 08:28:43 +0000
- Ironport-data: A9a23:ayqbl6AJ4h1+cBVW/13iw5YqxClBgxIJ4kV8jS/XYbTApGwnhjYPx jEfDWrQa/fba2b0eYwlYI+y/E0Fv5eDn4JrQQY4rX1jcSlH+JHPbTi7wuYcHM8wwunrFh8PA xA2M4GYRCwMZiaA4E/raNANlFEkvU2ybuOU5NXsZ2YgH2eIdA970Ug5w7Bj2NY06TSEK1jlV e3a8pW31GCNg1aYAkpMg05UgEoy1BhakGpwUm0WPZinjneH/5UmJMt3yZWKB2n5WuFp8tuSH I4v+l0bElTxpH/BAvv9+lryn9ZjrrT6ZWBigVIOM0Sub4QrSoXfHc/XOdJFAXq7hQllkPh/5 8tju5+TRjszGaqPuNYtcCFHLSJhaPguFL/veRBTsOS15mifKT7A5qsrC0s7e4oF5uxwHGdCs +QCLywAZQyCgOTwx6+nTu5rhYIoK8yD0IE34yk8i22GS6t3B8mcH80m5vcBtNs0rtpJEvvEI dIQdBJkbQjaYg0JMVASYH47tLjz2ymnKGAEwL6TjZsbvXb95QJw7IboMPrFZ93bAvx7h1nN8 woq+Ey8WHn2Lue32TeDt36hmOLLtSf6Q54JUq218OZwh1+ezXBVDwcZPXO5q/Skjk+1W/pEN lcZvCEpqMAa60iDXtT7GRqirxa5UgU0XtNRF6g27V+Lw6+NuQKBXDFbEnhGdcAss9IwSXoyz FiVktj1BDtp9rqIVXaa8bTSpjS3UcQIEVI/ieY/ZVNty7HeTEsb03ojkv4L/HaJs+DI
- Ironport-hdrordr: A9a23:o9muhq9dYfPOqit5Bh1uk+FKdb1zdoMgy1knxilNoENuH/Bwxv rFoB1E73TJYVYqN03IV+rwWpVoJkmsj6KdgLNhRotKOTOLhILGFvAH0WKP+V3d8mjFh5dgPM RbAtdD4aPLfD9HZK/BiWHXcurIguP3iJxA7d2us0uFJjsaDp2IgT0JaTpyRSZNNXR77NcCZd Ohz/sCgwDlVWUcb8y9CHVAd+/fp+fTnJajRRIdHRYo5CSHkDvtsdfBYlOl9yZbdwkK7aYp8G DDnQC8zqK/s8ujwhuZ82PI9ZxZlPbo19MGLs2Rjco+LCnql2+TFcxccozHmApwjPCk6V4snt WJixA8P/5r43eURW2xqQuF4XiV7B8er1vZjXOIi3rqpsL0ABggDdBauI5fehzFr2I9odBVys twri2knqsSKSmFsDX25tDOWR0vvFGzu2AenekaiGEaeZcCaYVWsZcU8CpuYds99RrBmcEa+d RVfYHhDK48SyLYU5mZhBgj/DWUZAV8Iv/cKXJy+PB80FBt7QVEJgUjtYkid0w7heMAoql/lp r525tT5cFzp7ctHMRA7cc6MLyK4z/2MGTx2Fz7GyWVKIg3f1TwlrXQ3JIZoMmXRb1g9upBpH 2GaiITiVIP
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
When using an APIC do not set nr_irqs based on a factor of nr_irqs_gsi
(currently x8), and instead do so exclusively based on the amount of
available vectors on the system.
There's no point in setting nr_irqs to a value higher than the
available set of vectors, as vector allocation will fail anyway.
Fixes: e99d45da8a ('x86/x2apic: properly implement cluster mode')
Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
---
xen/arch/x86/irq.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/xen/arch/x86/irq.c b/xen/arch/x86/irq.c
index 7f75ec8bcc..e3b0bee527 100644
--- a/xen/arch/x86/irq.c
+++ b/xen/arch/x86/irq.c
@@ -426,8 +426,7 @@ int __init init_irq_data(void)
(x2apic_enabled && !x2apic_phys) ? x2apic_max_cluster_id + 1
: num_present_cpus();
- nr_irqs = cpu_has_apic ? max(vec_spaces * NR_DYNAMIC_VECTORS,
- 8 * nr_irqs_gsi)
+ nr_irqs = cpu_has_apic ? vec_spaces * NR_DYNAMIC_VECTORS
: nr_irqs_gsi;
}
else if ( nr_irqs < 16 )
--
2.36.1
|