[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 00/12] x86/irq: drop interrupt target cpumasks


  • To: xen-devel@xxxxxxxxxxxxxxxxxxxx
  • From: Roger Pau Monne <roger.pau@xxxxxxxxxx>
  • Date: Thu, 20 Nov 2025 10:06:25 +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=arcselector10001; 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=OJWY6M/iBPu1ECyWjTISdlhNaeScyqsFCzJbpWuPU8o=; b=CRKQkG1i8Vi7gMDGhJJTr0i6oi4Hc2C/I2Pby7vLhAzXg3vZPLTW2k90R9+zIQBMv/EZahHx4b82ChXZrfxCRq22FJg3WipLReY6M3VTSd4Whdc8t1CExRxxNrGbmUF+ccVYSgDm0QPpVNf0rn575jUw3znTBWeBtzPJCRMSdrM6ZfcHc0ttog0sNnOrRfj6uzzHfBs0lCUd0kqUtEsnZbjArPHKfuXf36H0jhKThv8UApHjeRe1f5euZ/ImTFgZL1SW2Dy2cMCqfpJsaTGLgQKMj+m9WG8mkcozNY+Z9nJDORj+4KLctB4RafvC2oYAsstFgS+lJMKSp+8/fptF9Q==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=IPqrXBRDgQ/IljmV6IxIFklqlw+ooFb9YA7visHe5mOUWNLL0Lb4D8FH7haStCRKSyTaqXS46D9F1ijryAweHG7a/9mRQTIDD6/QSo21IyOrzhyeZdwnpIV8w/Az2MUQ5oyp0NdZgyZ+RojDi3wPUGldLSkq/SQePgiTMjNvfkA6ygsH8JQ0hfjNsXVqOjApxbywxTXvYe4B8grXgzu79Fn4QnCjzuM88GN3shmnp65eG2q1tY/MbHcwSDFPKJfhsnWFcCdgl1QI2c5/j6VL+VOGhMC3NJ0bhFLD3BeD/+WXjwYb6zry/9lHEmpIXL/jIaHq+WlUFqgptazguzLcJw==
  • 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>, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Michal Orzel <michal.orzel@xxxxxxx>, Julien Grall <julien@xxxxxxx>, Stefano Stabellini <sstabellini@xxxxxxxxxx>, Jason Andryuk <jason.andryuk@xxxxxxx>
  • Delivery-date: Thu, 20 Nov 2025 09:09:30 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

Hello,

After the adjustments that dropped logical delivery mode for all
external interrupts the Xen internal interrupt descriptors no longer
require a cpumask to store the possible targets of the interrupt.  Using
physical delivery mode only allows a single CPU to be the target of the
interrupt, and hence the field can be converted into an unsigned int.

The series contain a bit of cleanup and code adjustments ahead of the
removal of the cpumasks that's done in the last 3 patches.

A couple of notes from the series:

 * It's possible that further simplifications can be applied to
   fixup_irqs() (and other logic) after dropping the cpumasks.  I
   haven't looked closely enough, but in any case that would be a
   followup change(s) on top of this series.

 * Current code seems to confuse interrupt affinity (possible interrupt
   destinations) with the current target of the interrupt.  For example
   irq_set_affinity() doesn't set the interrupt affinity, but rather
   migrates the interrupt from one target CPU to another.

Thanks, Roger.

Roger Pau Monne (12):
  x86/apic: remove cpu_mask_to_apicid hook
  x86/apic: remove vector_allocation_cpumask hook
  x86/irq: introduce local irq_desc
  x86/irq: set accurate cpu_mask for high priority vectors used by
    external interrupts
  x86/io-apic: purge usage of logical mode
  x86/i8259: redo workaround for AMD spurious PIC interrupts
  x86/io-apic: fix usage of setup_ioapic_dest()
  x86/irq: adjust bind_irq_vector() to take a single CPU as parameter
  x86/irq: convert cpumask parameter to integer in
    {,p}irq_set_affinity()
  x86/irq: convert irq_desc cpu_mask field to integer
  x86/irq: convert irq_desc old_cpu_mask field to integer
  x86/irq: convert irq_desc pending_mask field to integer

 xen/arch/x86/genapic/bigsmp.c            |   2 -
 xen/arch/x86/genapic/default.c           |   2 -
 xen/arch/x86/genapic/delivery.c          |   7 +-
 xen/arch/x86/genapic/x2apic.c            |   9 -
 xen/arch/x86/hpet.c                      |  11 +-
 xen/arch/x86/hvm/hvm.c                   |   2 +-
 xen/arch/x86/i8259.c                     |  17 +-
 xen/arch/x86/include/asm/genapic.h       |  17 +-
 xen/arch/x86/include/asm/irq.h           |  22 +-
 xen/arch/x86/include/asm/msi.h           |   3 +-
 xen/arch/x86/io_apic.c                   |  61 +++---
 xen/arch/x86/irq.c                       | 249 ++++++++++-------------
 xen/arch/x86/msi.c                       |  17 +-
 xen/arch/x86/platform_hypercall.c        |   2 +-
 xen/arch/x86/smpboot.c                   |  12 +-
 xen/common/cpu.c                         |   1 +
 xen/common/event_channel.c               |   6 +-
 xen/drivers/passthrough/amd/iommu_init.c |   2 +-
 xen/drivers/passthrough/vtd/iommu.c      |   2 +-
 xen/include/xen/cpumask.h                |   1 +
 xen/include/xen/irq.h                    |   3 +-
 21 files changed, 179 insertions(+), 269 deletions(-)

-- 
2.51.0




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.