All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/9] x86/hvm: Add Extended MSI destination ID support
@ 2026-04-27 13:53 Julian Vetter
  0 siblings, 0 replies; 34+ messages in thread
From: Julian Vetter @ 2026-04-27 13:53 UTC (permalink / raw)
  To: xen-devel
  Cc: Anthony PERARD, Juergen Gross, Andrew Cooper, Michal Orzel,
	Jan Beulich, Julien Grall, Roger Pau Monné,
	Stefano Stabellini, Bertrand Marquis, Volodymyr Babchuk,
	Teddy Astie, Julian Vetter

[-- Attachment #1: Type: text/plain, Size: 4241 bytes --]

Thank you very much Roger and Jan for your feedback! I have addressed
your feedback, see below. For me there is only one question, I'm not
sure if this is what you had in mind Roger when you wrote:
"Retrofitting the new interface into the old one seems weird.  I would
do it the other way around - implement the old bind domctl on top of
an interface that's more suited for the new DM op."
It requires some preparatory work. But I tried to make the
restructunring diffs as easy to review as possible by splitting the
refactoring into mutliple steps.

Signed-off-by: Julian Vetter <julian.vetter@vates.tech>
---
Changes in v4:
- Replaced the v3 approach of extending the XEN_DOMCTL_bind_pt_irq
  gflags ABI (XEN_DOMCTL_VMSI_X86_EXT_DEST_ID_MASK / VMSI_X86_FULL_DEST)
  with raw MSI addr + data storage throughout. pt_irq_bind_msi() now
  accepts the raw address + data values and decodes the destination
  internally. No public domctl ABI changes
- As suggested by Roger, replaced XEN_DMOP_enable_ext_dest_id (v3 patch
  6, a separate call before domain start) with a flags byte from the
  existing pad[3] field of XEN_DMOP_create_ioreq_server. The new
  XEN_DMOP_IOREQ_SERVER_EXT_DEST_ID flag lets each server signal support
  at registration time and allows the feature to be levelled across all
  servers before arch_domain_creation_finished()
- Redirect xc_domain_{update,unbind}_msi_irq() in libxenctrl to use the
  new DM ops, and reject PT_IRQ_TYPE_MSI in
  XEN_DOMCTL_{bind,unbind}_pt_irq (as suggested by Jan)
- Add three preparatory no-functional-change commits (patches 2-4) that
  wrap the restart block in braces, extract pt_irq_dpci_setup(), and
  extract the PT_IRQ_TYPE_MSI case body into pt_irq_bind_msi(), making
  the interface change in patch 5 reviewable as a clean diff
- Rework ioapic_check() to validate named fields (base_address, APIC ID
  width, ioregsel range) instead of rejecting any non-zero reserved
  bits, which would have falsely rejected RTEs carrying extended
  destination IDs
---
Julian Vetter (9):
  x86/vioapic: Add ioapic_check() to validate IO-APIC state before
    restore
  x86/passthrough: Wrap pt_irq_create_bind() restart block in braces
  x86/passthrough: Extract pt_irq_dpci_setup() from pt_irq_create_bind()
  x86/passthrough: Extract PT_IRQ_TYPE_MSI body into pt_irq_bind_msi()
  x86/passthrough: Introduce pt_irq_bind_msi() as canonical MSI bind
    path
  x86/hvm: Support extended destination IDs in virtual MSI and IO-APIC
  x86/dmop: Add XEN_DMOP_{bind,unbind}_pt_msi_irq DM ops
  hvm/ioreq: Negotiate extended destination ID support per ioreq server
  x86/cpuid: Advertise XEN_HVM_CPUID_EXT_DEST_ID when device model opts
    in

 tools/include/xendevicemodel.h          |  34 +-
 tools/libs/ctrl/xc_devicemodel_compat.c |   2 +-
 tools/libs/ctrl/xc_domain.c             |  52 ++--
 tools/libs/devicemodel/core.c           |  41 ++-
 xen/arch/arm/ioreq.c                    |   5 +
 xen/arch/x86/cpuid.c                    |  13 +
 xen/arch/x86/domain.c                   |  10 +
 xen/arch/x86/domctl.c                   |  10 +-
 xen/arch/x86/hvm/dm.c                   |  68 ++++
 xen/arch/x86/hvm/ioreq.c                |  37 +++
 xen/arch/x86/hvm/irq.c                  |   9 +-
 xen/arch/x86/hvm/vioapic.c              |  50 ++-
 xen/arch/x86/hvm/vmsi.c                 |  54 +---
 xen/arch/x86/include/asm/hvm/domain.h   |   9 +
 xen/arch/x86/include/asm/hvm/hvm.h      |   4 +-
 xen/arch/x86/include/asm/hvm/irq.h      |   4 +-
 xen/arch/x86/include/asm/hvm/vioapic.h  |  12 +
 xen/arch/x86/include/asm/msi.h          |  18 +-
 xen/common/ioreq.c                      |  13 +-
 xen/drivers/passthrough/x86/hvm.c       | 396 ++++++++++++++----------
 xen/include/public/arch-x86/hvm/save.h  |  21 +-
 xen/include/public/hvm/dm_op.h          |  53 +++-
 xen/include/xen/iommu.h                 |   3 +
 xen/include/xen/ioreq.h                 |  27 ++
 xen/include/xlat.lst                    |   2 +
 25 files changed, 703 insertions(+), 244 deletions(-)

-- 
2.53.0



--
Julian Vetter | Vates Hypervisor & Kernel Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech

^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2026-08-28  9:22 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20260427135406.1281424-1-julian.vetter@vates.tech>
2026-04-27 13:53 ` [PATCH v4 1/9] x86/vioapic: Add ioapic_check() to validate IO-APIC state before restore Julian Vetter
2026-04-28 12:06   ` Teddy Astie
2026-06-25 14:46   ` Jan Beulich
2026-04-27 13:53 ` [PATCH v4 2/9] x86/passthrough: Wrap pt_irq_create_bind() restart block in braces Julian Vetter
2026-04-28 12:40   ` Teddy Astie
2026-06-25 15:56   ` Jan Beulich
2026-04-27 13:54 ` [PATCH v4 3/9] x86/passthrough: Extract pt_irq_dpci_setup() from pt_irq_create_bind() Julian Vetter
2026-04-28 12:53   ` Teddy Astie
2026-08-18 14:45   ` Jan Beulich
2026-04-27 13:54 ` [PATCH v4 4/9] x86/passthrough: Extract PT_IRQ_TYPE_MSI body into pt_irq_bind_msi() Julian Vetter
2026-04-28 14:01   ` Teddy Astie
2026-08-18 15:10   ` Jan Beulich
2026-04-27 13:54 ` [PATCH v4 5/9] x86/passthrough: Introduce pt_irq_bind_msi() as canonical MSI bind path Julian Vetter
2026-04-28 15:15   ` Teddy Astie
2026-06-25 15:58   ` Jan Beulich
2026-08-18 16:05   ` Jan Beulich
2026-04-27 13:54 ` [PATCH v4 6/9] x86/hvm: Support extended destination IDs in virtual MSI and IO-APIC Julian Vetter
2026-04-28 15:27   ` Teddy Astie
2026-08-19 12:14   ` Jan Beulich
2026-04-27 13:54 ` [PATCH v4 7/9] x86/dmop: Add XEN_DMOP_{bind,unbind}_pt_msi_irq DM ops Julian Vetter
2026-04-28 16:02   ` Teddy Astie
2026-08-19 12:21     ` Jan Beulich
2026-08-19 13:37   ` Jan Beulich
2026-04-27 13:54 ` [PATCH v4 8/9] hvm/ioreq: Negotiate extended destination ID support per ioreq server Julian Vetter
2026-04-28 16:35   ` Teddy Astie
2026-05-04 13:35     ` Jan Beulich
2026-08-19 14:38   ` Jan Beulich
2026-08-28  8:52     ` Julian Vetter
2026-08-28  9:22       ` Jan Beulich
2026-04-27 13:54 ` [PATCH v4 9/9] x86/cpuid: Advertise XEN_HVM_CPUID_EXT_DEST_ID when device model opts in Julian Vetter
2026-08-19 15:01   ` Jan Beulich
2026-06-02 12:08 ` [PATCH v4 0/9] x86/hvm: Add Extended MSI destination ID support Julian Vetter
2026-06-02 12:21   ` Jan Beulich
2026-04-27 13:53 Julian Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.