All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/13] KVM: x86/xen: Bug fixes and long_mode cleanup
@ 2026-08-31 21:26 David Woodhouse
  2026-08-31 21:26 ` [PATCH v3 01/13] KVM: x86/xen: Rename 'longmode' to 'is_64bit' in hypercall handling David Woodhouse
                   ` (13 more replies)
  0 siblings, 14 replies; 38+ messages in thread
From: David Woodhouse @ 2026-08-31 21:26 UTC (permalink / raw)
  To: seanjc, pbonzini
  Cc: dwmw2, paul, joao.m.martins, boris.ostrovsky, ankur.a.arora, tglx,
	mingo, bp, dave.hansen, hpa, x86, syzbot+208f7f3e5f59c11aeb90,
	syzkaller-bugs, suryasaimadhu369, lkp, nicoyip.dev, frn1furkan10,
	kvm, linux-kernel, imv4bel

Clean up the handling of vcpu->arch.xen.long_mode to be consistent and
correctly handle 32-bit/64-bit alignment. And various other bug fixes
that have accumulated over the months since v1.

v3:
 - Rebase onto kvm/next (7.3 merge window).
 - Add poll_evtchn READ_ONCE/WRITE_ONCE annotation (Chengfeng Ye).
 - Add evtchn_ports IDR to XArray conversion (Furkan Caliskan).

v2: https://lore.kernel.org/all/20260811094829.98794-1-dwmw2@infradead.org/
 - Take kvm->srcu in __kvm_xen_has_interrupt().
 - Add dedicated invalidation sequence for HVA-based caches.
 - Take Sean's version of the 32-bit atomics patch, and his follow-up
   replacing the remaining asm blobs with atomic*() APIs.
 - Use GEN_BINARY_RMWcc() rather than open-coding the btsl.
 - Explain why the pending_bits access in kvm_xen_set_evtchn_fast() does
   not need the same treatment as the vcpu_info one (it is in the page
   aligned per-VM shared_info).
 - Don't require 8-byte alignment of vcpu_info in 64-bit mode; always
   accept 4-byte alignment, so as not to break migration of guests which
   registered while in 32-bit mode.
 - Add Closes: links for the reported issues.
 - Cast to u64 before the >> 32 in the unaligned evtchn_pending_sel
   handling; evtchn_pending_sel is unsigned long, so the shift was
   undefined on 32-bit even though the branch is unreachable there
   (kernel test robot).
 - Rebase onto kvm-x86/next; the mode-aware kvm_<reg>_read() helpers which
   landed in the meantime subsume most of what patch 1 was doing by hand.

v1: https://lore.kernel.org/all/20260605143034.3603-1-dwmw2@infradead.org/

Chengfeng Ye (1):
      KVM: x86/xen: Mark poll_evtchn accesses with READ_ONCE()/WRITE_ONCE()

David Woodhouse (8):
      KVM: x86/xen: Rename 'longmode' to 'is_64bit' in hypercall handling
      KVM: x86/xen: Introduce kvm_xen_has_64bit_shinfo() macro
      KVM: x86/xen: Rename max_evtchn_port() to kvm_max_evtchn_port()
      KVM: x86/xen: Latch shinfo mode in kvm_xen_schedop_poll()
      KVM: x86/xen: Enforce 4-byte alignment of vcpu_info registration
      KVM: x86/xen: Use 32-bit locked bts for vcpu_info evtchn_pending_sel
      KVM: x86/xen: Take kvm->srcu in __kvm_xen_has_interrupt()
      KVM: pfncache: use a dedicated invalidation sequence for cache refresh

Furkan Caliskan (1):
      KVM: x86/xen: Convert evtchn_ports from IDR to XArray

Hyunwoo Kim (1):
      KVM: x86/xen: Latch shinfo mode in kvm_xen_set_evtchn_fast()

Sean Christopherson (2):
      KVM: x86/xen: Use 32-bit atomics if vCPU's evtchn_pending_sel isn't aligned
      KVM: x86/xen: Use atomic*() APIs instead of open coded equivalents

 arch/x86/include/asm/kvm_host.h |   3 +-
 arch/x86/kvm/xen.c              | 212 ++++++++++++++++++++++++----------------
 arch/x86/kvm/xen.h              |   5 +
 include/linux/kvm_host.h        |   2 +
 virt/kvm/kvm_main.c             |  10 ++
 virt/kvm/pfncache.c             |  18 ++--
 6 files changed, 157 insertions(+), 93 deletions(-)


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

end of thread, other threads:[~2026-09-04 15:37 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-31 21:26 [PATCH v3 0/13] KVM: x86/xen: Bug fixes and long_mode cleanup David Woodhouse
2026-08-31 21:26 ` [PATCH v3 01/13] KVM: x86/xen: Rename 'longmode' to 'is_64bit' in hypercall handling David Woodhouse
2026-09-02 12:18   ` Paul Durrant
2026-09-02 18:24     ` David Woodhouse
2026-09-02 18:57       ` Sean Christopherson
2026-09-02 22:00         ` David Woodhouse
2026-08-31 21:26 ` [PATCH v3 02/13] KVM: x86/xen: Introduce kvm_xen_has_64bit_shinfo() macro David Woodhouse
2026-09-02 12:21   ` Paul Durrant
2026-09-02 18:28     ` David Woodhouse
2026-08-31 21:26 ` [PATCH v3 03/13] KVM: x86/xen: Rename max_evtchn_port() to kvm_max_evtchn_port() David Woodhouse
2026-09-02 12:22   ` Paul Durrant
2026-08-31 21:26 ` [PATCH v3 04/13] KVM: x86/xen: Latch shinfo mode in kvm_xen_set_evtchn_fast() David Woodhouse
2026-09-02 12:25   ` Paul Durrant
2026-08-31 21:26 ` [PATCH v3 05/13] KVM: x86/xen: Latch shinfo mode in kvm_xen_schedop_poll() David Woodhouse
2026-09-02 12:27   ` Paul Durrant
2026-08-31 21:26 ` [PATCH v3 06/13] KVM: x86/xen: Enforce 4-byte alignment of vcpu_info registration David Woodhouse
2026-09-02 12:29   ` Paul Durrant
2026-08-31 21:26 ` [PATCH v3 07/13] KVM: x86/xen: Use 32-bit locked bts for vcpu_info evtchn_pending_sel David Woodhouse
2026-08-31 22:50   ` sashiko-bot
2026-08-31 23:18     ` David Woodhouse
2026-09-02 12:33   ` Paul Durrant
2026-08-31 21:26 ` [PATCH v3 08/13] KVM: x86/xen: Use 32-bit atomics if vCPU's evtchn_pending_sel isn't aligned David Woodhouse
2026-09-02 12:38   ` Paul Durrant
2026-08-31 21:26 ` [PATCH v3 09/13] KVM: x86/xen: Use atomic*() APIs instead of open coded equivalents David Woodhouse
2026-09-02 12:41   ` Paul Durrant
2026-09-02 18:32     ` David Woodhouse
2026-09-02 18:59       ` Sean Christopherson
2026-08-31 21:26 ` [PATCH v3 10/13] KVM: x86/xen: Take kvm->srcu in __kvm_xen_has_interrupt() David Woodhouse
2026-09-02 12:43   ` Paul Durrant
2026-08-31 21:26 ` [PATCH v3 11/13] KVM: x86/xen: Mark poll_evtchn accesses with READ_ONCE()/WRITE_ONCE() David Woodhouse
2026-09-02 12:45   ` Paul Durrant
2026-08-31 21:26 ` [PATCH v3 12/13] KVM: pfncache: use a dedicated invalidation sequence for cache refresh David Woodhouse
2026-09-02 12:14   ` Paul Durrant
2026-08-31 21:26 ` [PATCH v3 13/13] KVM: x86/xen: Convert evtchn_ports from IDR to XArray David Woodhouse
2026-08-31 23:36   ` sashiko-bot
2026-09-01  0:07     ` David Woodhouse
2026-09-02 12:48   ` Paul Durrant
2026-09-04 15:37 ` [PATCH v3 0/13] KVM: x86/xen: Bug fixes and long_mode cleanup Paolo Bonzini

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.