All of lore.kernel.org
 help / color / mirror / Atom feed
* PATCH v4 00/11] KVM: x86/xen: Add in-kernel Xen event channel delivery
@ 2021-11-20 10:27 ` David Woodhouse
  0 siblings, 0 replies; 74+ messages in thread
From: David Woodhouse @ 2021-11-20 10:27 UTC (permalink / raw)
  To: Paolo Bonzini, kvm
  Cc: Boris Ostrovsky, Joao Martins, jmattson @ google . com,
	wanpengli @ tencent . com, seanjc @ google . com,
	vkuznets @ redhat . com, mtosatti @ redhat . com,
	joro @ 8bytes . org, karahmed, Marc Zyngier, James Morse,
	Alexandru Elisei, Suzuki K Poulose, Catalin Marinas, Will Deacon,
	Huacai Chen, Aleksandar Markovic, Michael Ellerman,
	Benjamin Herrenschmidt, Anup Patel, Christian Borntraeger,
	kvmarm, linux-arm-kernel, linux-mips, linuxppc-dev, kvm-riscv,
	linux-s390

Event channels, yeah. That really is where I started.

It was all so simple in Joao and Ankur's original version at 
https://www.spinics.net/lists/kvm/msg182556.html — just a handful
of simple test_and_set_bit() calls on the mapped page.

When I posted v1 I didn't quite understand how steal time and nesting
were safely using the kvm_map_gfn() function, and I posted the Xen
part declaring that I had "reduced it to a previously solved problem".

Then I frowned at kvm_map_gfn() for a bit longer, concluded it was
basically impossible to use it safely on its own because the page it
maps might belong to another guest by the time it even returns to its
caller, and posted a v2 in which I did something safer for myself by
hooking into the MMU notifiers.

I then fixed the steal time reporting, and killed gfn_to_pfn_cache,
under separate cover.

In v3 of this series I re-introduced a saner gfn_to_pfn_cache with MMU 
notifier support to give it proper invalidation semantics. This can now 
be used for the Xen event channel support and should also be usable for 
fixing the various use-after-free races in the nesting code too — the 
last patch in this series being an untested proof of concept attempt at 
fixing one such.

Since adding a C file in virt/kvm/ was somewhat more painful than it
really should have been, there is a small detour into all the arch
specific Makefiles to make them include a common one.

v4: Rework the dirty marking given the relevation that it can only be 
done from the context of an active vCPU. So just defer it to happen in 
the unmap. Also introduce a lightweight unmap call instead of just the 
full destroy. Document the Xen shared info page as NOT participating in 
dirty tracking. Fix a typo in the CONFIG_HAVE_KVM_DIRTY_RING patch which 
prevented the capability from being advertised.

Intended for merging up to patch 10. Patch 11 is for illustration.




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

end of thread, other threads:[~2021-11-26  2:53 UTC | newest]

Thread overview: 74+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-20 10:27 PATCH v4 00/11] KVM: x86/xen: Add in-kernel Xen event channel delivery David Woodhouse
2021-11-20 10:27 ` David Woodhouse
2021-11-20 10:27 ` David Woodhouse
2021-11-20 10:27 ` David Woodhouse
2021-11-20 10:28 ` [PATCH v4 01/11] KVM: Introduce CONFIG_HAVE_KVM_DIRTY_RING David Woodhouse
2021-11-20 10:28   ` David Woodhouse
2021-11-20 10:28   ` David Woodhouse
2021-11-20 10:28   ` David Woodhouse
2021-11-20 10:28 ` [PATCH v4 02/11] KVM: Add Makefile.kvm for common files, use it for x86 David Woodhouse
2021-11-20 10:28   ` David Woodhouse
2021-11-20 10:28   ` David Woodhouse
2021-11-20 10:28   ` David Woodhouse
2021-11-20 10:28 ` [PATCH v4 03/11] KVM: s390: Use Makefile.kvm for common files David Woodhouse
2021-11-20 10:28   ` David Woodhouse
2021-11-20 10:28   ` David Woodhouse
2021-11-20 10:28   ` David Woodhouse
2021-11-20 10:28 ` [PATCH v4 04/11] KVM: mips: " David Woodhouse
2021-11-20 10:28   ` David Woodhouse
2021-11-20 10:28   ` David Woodhouse
2021-11-20 10:28   ` David Woodhouse
2021-11-20 10:28 ` [PATCH v4 05/11] KVM: RISC-V: " David Woodhouse
2021-11-20 10:28   ` David Woodhouse
2021-11-20 10:28   ` David Woodhouse
2021-11-20 10:28   ` David Woodhouse
2021-11-20 10:28 ` [PATCH v4 06/11] KVM: powerpc: " David Woodhouse
2021-11-20 10:28   ` David Woodhouse
2021-11-20 10:28   ` David Woodhouse
2021-11-20 10:28   ` David Woodhouse
2021-11-20 10:28 ` [PATCH v4 07/11] KVM: arm64: " David Woodhouse
2021-11-20 10:28   ` David Woodhouse
2021-11-20 10:28   ` David Woodhouse
2021-11-20 10:28   ` David Woodhouse
2021-11-20 10:28 ` [PATCH v4 08/11] KVM: Reinstate gfn_to_pfn_cache with invalidation support David Woodhouse
2021-11-20 10:28   ` David Woodhouse
2021-11-20 10:28   ` David Woodhouse
2021-11-20 10:28   ` David Woodhouse
2021-11-20 10:28 ` [PATCH v4 09/11] KVM: x86/xen: Maintain valid mapping of Xen shared_info page David Woodhouse
2021-11-20 10:28   ` David Woodhouse
2021-11-20 10:28   ` David Woodhouse
2021-11-20 10:28   ` David Woodhouse
2021-11-20 10:28 ` [PATCH v4 10/11] KVM: x86/xen: Add KVM_IRQ_ROUTING_XEN_EVTCHN and event channel delivery David Woodhouse
2021-11-20 10:28   ` David Woodhouse
2021-11-20 10:28   ` David Woodhouse
2021-11-20 10:28   ` David Woodhouse
2021-11-20 17:50   ` kernel test robot
2021-11-20 17:50     ` kernel test robot
2021-11-20 10:28 ` [PATCH v4 11/11] KVM: x86: First attempt at converting nested virtual APIC page to gpc David Woodhouse
2021-11-20 10:28   ` David Woodhouse
2021-11-20 10:28   ` David Woodhouse
2021-11-20 10:28   ` David Woodhouse
2021-11-20 15:48   ` Mika Penttilä
2021-11-20 15:48     ` Mika Penttilä
2021-11-20 15:48     ` Mika Penttilä
2021-11-20 15:48     ` Mika Penttilä
2021-11-20 16:21     ` David Woodhouse
2021-11-20 16:21       ` David Woodhouse
2021-11-20 16:21       ` David Woodhouse
2021-11-20 16:21       ` David Woodhouse
2021-11-20 16:30       ` Mika Penttilä
2021-11-20 16:30         ` Mika Penttilä
2021-11-20 16:30         ` Mika Penttilä
2021-11-20 16:30         ` Mika Penttilä
2021-11-20 17:02         ` David Woodhouse
2021-11-20 17:02           ` David Woodhouse
2021-11-20 17:02           ` David Woodhouse
2021-11-20 17:02           ` David Woodhouse
2021-11-24 17:55   ` kernel test robot
2021-11-24 17:55     ` kernel test robot
2021-11-26  2:38   ` kernel test robot
2021-11-26  2:38     ` kernel test robot
2021-11-20 18:20 ` [PATCH v4 12/11] KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty David Woodhouse
2021-11-20 18:20   ` David Woodhouse
2021-11-20 18:20   ` David Woodhouse
2021-11-20 18:20   ` David Woodhouse

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.