Kernel KVM virtualization development
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] PCI bus/CPU address translation for MMIO
@ 2026-07-01 14:26 Jinyu Tang
  2026-07-01 14:26 ` [RFC PATCH 1/2] pci: translate BAR addresses for MMIO users Jinyu Tang
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Jinyu Tang @ 2026-07-01 14:26 UTC (permalink / raw)
  To: kvm; +Cc: Will Deacon, Julien Thierry, Anup Patel, Andrew Jones, Jinyu Tang

PCI BARs contain PCI bus addresses, while KVM MMIO exits and ioctls use
CPU physical addresses.

kvmtool currently assumes that these two address spaces are identical.
That is true for the existing default layouts, but it breaks once an
architecture exposes a non-identity PCI MMIO window to the guest.

This series adds PCI bus/CPU address translation hooks with an identity
default, then wires up RISC-V to exercise a non-identity PCI MMIO window
through a new --pci-mmio-cpu-base option.

Jinyu Tang (2):
  pci: translate BAR addresses for MMIO users
  riscv: allow a non-identity PCI MMIO CPU base

 include/kvm/pci.h                   | 17 ++++++++++
 riscv/fdt.c                         |  2 +-
 riscv/include/kvm/kvm-arch.h        |  5 ++-
 riscv/include/kvm/kvm-config-arch.h |  4 +++
 riscv/pci.c                         | 49 ++++++++++++++++++++++++++---
 vfio/core.c                         | 25 ++++++++++-----
 vfio/pci.c                          | 31 ++++++++++++------
 virtio/pci-legacy.c                 |  6 ++--
 virtio/pci-modern.c                 |  2 ++
 virtio/pci.c                        | 25 ++++++++++-----
 10 files changed, 133 insertions(+), 33 deletions(-)

-- 
2.43.0


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

end of thread, other threads:[~2026-08-09  3:02 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-01 14:26 [RFC PATCH 0/2] PCI bus/CPU address translation for MMIO Jinyu Tang
2026-07-01 14:26 ` [RFC PATCH 1/2] pci: translate BAR addresses for MMIO users Jinyu Tang
2026-07-01 14:26 ` [RFC PATCH 2/2] riscv: allow a non-identity PCI MMIO CPU base Jinyu Tang
2026-07-15 15:47 ` [RFC PATCH 0/2] PCI bus/CPU address translation for MMIO Will Deacon
2026-08-09  3:02   ` Jinyu Tang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox