[GIT PULL] Please pull powerpc/linux.git powerpc-5.16-2 tag

2021-11-20 Thread Michael Ellerman
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hi Linus, Please pull some powerpc fixes for 5.16: The following changes since commit 158ea2d2b2ff8fb49f39209a31b4920f13193a3d: kbuild: Fix -Wimplicit-fallthrough=5 error for GCC 5.x and 6.x (2021-11-14 18:59:49 -0800) are available in the git

Re: [PATCH] powerpc/xive: Change IRQ domain to a tree domain

2021-11-20 Thread Michael Ellerman
On Tue, 16 Nov 2021 14:40:22 +0100, Cédric Le Goater wrote: > Commit 4f86a06e2d6e ("irqdomain: Make normal and nomap irqdomains > exclusive") introduced an IRQ_DOMAIN_FLAG_NO_MAP flag to isolate the > 'nomap' domains still in use under the powerpc arch. With this new > flag, the revmap_tree of the

[PATCH v4 12/11] KVM: x86: Fix wall clock writes in Xen shared_info not to mark page dirty

2021-11-20 Thread David Woodhouse
From: David Woodhouse When dirty ring logging is enabled, any dirty logging without an active vCPU context will cause a kernel oops. But we've already declared that the shared_info page doesn't get dirty tracking anyway, since it would be kind of insane to mark it dirty every time we deliver an e

Re: [PATCH v4 11/11] KVM: x86: First attempt at converting nested virtual APIC page to gpc

2021-11-20 Thread David Woodhouse
On Sat, 2021-11-20 at 18:30 +0200, Mika Penttilä wrote: > > On 20.11.2021 18.21, David Woodhouse wrote: > > On Sat, 2021-11-20 at 17:48 +0200, Mika Penttilä wrote: > > > > @@ -9785,6 +9787,14 @@ static int vcpu_enter_guest(struct kvm_vcpu > > > > *vcpu) > > > > local_irq_disable(); > > >

Re: [PATCH v4 11/11] KVM: x86: First attempt at converting nested virtual APIC page to gpc

2021-11-20 Thread Mika Penttilä
On 20.11.2021 18.21, David Woodhouse wrote: On Sat, 2021-11-20 at 17:48 +0200, Mika Penttilä wrote: @@ -9785,6 +9787,14 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu) local_irq_disable(); vcpu->mode = IN_GUEST_MODE; + /* + * If the guest requires direct a

Re: [PATCH v4 11/11] KVM: x86: First attempt at converting nested virtual APIC page to gpc

2021-11-20 Thread David Woodhouse
On Sat, 2021-11-20 at 17:48 +0200, Mika Penttilä wrote: > > @@ -9785,6 +9787,14 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu) > >local_irq_disable(); > >vcpu->mode = IN_GUEST_MODE; > > > > + /* > > + * If the guest requires direct access to mapped L1 pages, chec

Re: [PATCH v4 11/11] KVM: x86: First attempt at converting nested virtual APIC page to gpc

2021-11-20 Thread Mika Penttilä
Hi, On 20.11.2021 12.28, David Woodhouse wrote: From: David Woodhouse This is what evolved during the discussion at https://lore.kernel.org/kvm/960e233f-ec0b-4fb5-ba2e-c8d2ccb38...@infradead.org/T/#m11d75fcfe2da357ec1dabba0d0e3abb91fd13665 As discussed, an alternative approach might be to aug

[PATCH v4 02/11] KVM: Add Makefile.kvm for common files, use it for x86

2021-11-20 Thread David Woodhouse
From: David Woodhouse Splitting kvm_main.c out into smaller and better-organized files is slightly non-trivial when it involves editing a bunch of per-arch KVM makefiles. Provide virt/kvm/Makefile.kvm for them to include. Signed-off-by: David Woodhouse Acked-by: Marc Zyngier --- arch/x86/kvm/

PATCH v4 00/11] KVM: x86/xen: Add in-kernel Xen event channel delivery

2021-11-20 Thread David Woodhouse
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 an

[PATCH v4 05/11] KVM: RISC-V: Use Makefile.kvm for common files

2021-11-20 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse --- arch/riscv/kvm/Makefile | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/arch/riscv/kvm/Makefile b/arch/riscv/kvm/Makefile index 30cdd1df0098..300590225348 100644 --- a/arch/riscv/kvm/Makefile +++ b/arch/riscv/kvm/

[PATCH v4 09/11] KVM: x86/xen: Maintain valid mapping of Xen shared_info page

2021-11-20 Thread David Woodhouse
From: David Woodhouse Use the newly reinstated gfn_to_pfn_cache to maintain a kernel mapping of the Xen shared_info page so that it can be accessed in atomic context. Note that we do not participate in dirty tracking for the shared info page and we do not explicitly mark it dirty every single ti

[PATCH v4 10/11] KVM: x86/xen: Add KVM_IRQ_ROUTING_XEN_EVTCHN and event channel delivery

2021-11-20 Thread David Woodhouse
From: David Woodhouse This adds basic support for delivering 2 level event channels to a guest. Initially, it only supports delivery via the IRQ routing table, triggered by an eventfd. In order to do so, it has a kvm_xen_set_evtchn_fast() function which will use the pre-mapped shared_info page i

[PATCH v4 11/11] KVM: x86: First attempt at converting nested virtual APIC page to gpc

2021-11-20 Thread David Woodhouse
From: David Woodhouse This is what evolved during the discussion at https://lore.kernel.org/kvm/960e233f-ec0b-4fb5-ba2e-c8d2ccb38...@infradead.org/T/#m11d75fcfe2da357ec1dabba0d0e3abb91fd13665 As discussed, an alternative approach might be to augment kvm_arch_memslots_updated() to raise KVM_REQ_G

[PATCH v4 04/11] KVM: mips: Use Makefile.kvm for common files

2021-11-20 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse --- arch/mips/kvm/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/mips/kvm/Makefile b/arch/mips/kvm/Makefile index d3710959da55..21ff75bcdbc4 100644 --- a/arch/mips/kvm/Makefile +++ b/arch/mips/kvm/Makefile

[PATCH v4 06/11] KVM: powerpc: Use Makefile.kvm for common files

2021-11-20 Thread David Woodhouse
From: David Woodhouse It's all fairly baroque but in the end, I don't think there's any reason for $(KVM)/irqchip.o to have been handled differently, as they all end up in $(kvm-y) in the end anyway, regardless of whether they get there via $(common-objs-y) and the CPU-specific object lists. Sig

[PATCH v4 01/11] KVM: Introduce CONFIG_HAVE_KVM_DIRTY_RING

2021-11-20 Thread David Woodhouse
From: David Woodhouse I'd like to make the build include dirty_ring.c based on whether the arch wants it or not. That's a whole lot simpler if there's a config symbol instead of doing it implicitly on KVM_DIRTY_LOG_PAGE_OFFSET being set to something non-zero. Signed-off-by: David Woodhouse ---

[PATCH v4 03/11] KVM: s390: Use Makefile.kvm for common files

2021-11-20 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Reviewed-by: Christian Borntraeger --- arch/s390/kvm/Makefile | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/s390/kvm/Makefile b/arch/s390/kvm/Makefile index b3aaadc60ead..e4f50453cf7f 100644 --- a/arch/s390/k

[PATCH v4 08/11] KVM: Reinstate gfn_to_pfn_cache with invalidation support

2021-11-20 Thread David Woodhouse
From: David Woodhouse This can be used in two modes. There is an atomic mode where the cached mapping is accessed while holding the rwlock, and a mode where the physical address is used by a vCPU in guest mode. For the latter case, an invalidation will wake the vCPU with the new KVM_REQ_GPC_INVA

[PATCH v4 07/11] KVM: arm64: Use Makefile.kvm for common files

2021-11-20 Thread David Woodhouse
From: David Woodhouse Signed-off-by: David Woodhouse Acked-by: Marc Zyngier --- arch/arm64/kvm/Makefile | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/arch/arm64/kvm/Makefile b/arch/arm64/kvm/Makefile index 989bb5dad2c8..04a53f71a6b6 100644 --- a/arch/arm64/kvm/Makef