From: Paul Mackerras Date: Thu, 27 Apr 2017 22:23:16 +0000 (+1000) Subject: Merge remote-tracking branch 'remotes/powerpc/topic/xive' into kvm-ppc-next X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fb7dcf723dd2cb1d5d8f2f49c3023130938848e3;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Merge remote-tracking branch 'remotes/powerpc/topic/xive' into kvm-ppc-next This merges in the powerpc topic/xive branch to bring in the code for the in-kernel XICS interrupt controller emulation to use the new XIVE (eXternal Interrupt Virtualization Engine) hardware in the POWER9 chip directly, rather than via a XICS emulation in firmware. Signed-off-by: Paul Mackerras --- fb7dcf723dd2cb1d5d8f2f49c3023130938848e3 diff --cc arch/powerpc/include/asm/kvm_host.h index 77c60826d145,5a8ab4a758f1..9c51ac4b8f36 --- a/arch/powerpc/include/asm/kvm_host.h +++ b/arch/powerpc/include/asm/kvm_host.h @@@ -447,13 -448,23 +454,28 @@@ struct mmio_hpte_cache unsigned int index; }; +#define KVMPPC_VSX_COPY_NONE 0 +#define KVMPPC_VSX_COPY_WORD 1 +#define KVMPPC_VSX_COPY_DWORD 2 +#define KVMPPC_VSX_COPY_DWORD_LOAD_DUMP 3 + struct openpic; + /* W0 and W1 of a XIVE thread management context */ + union xive_tma_w01 { + struct { + u8 nsr; + u8 cppr; + u8 ipb; + u8 lsmfb; + u8 ack; + u8 inc; + u8 age; + u8 pipr; + }; + __be64 w01; + }; + struct kvm_vcpu_arch { ulong host_stack; u32 host_pid; diff --cc arch/powerpc/kvm/book3s_hv.c index d42182eb0c26,128efb42ec4e..42b7a4fd57d9 --- a/arch/powerpc/kvm/book3s_hv.c +++ b/arch/powerpc/kvm/book3s_hv.c @@@ -3648,9 -3677,9 +3675,9 @@@ static int kvmppc_clr_passthru_irq(stru * We don't free this structure even when the count goes to * zero. The structure is freed when we destroy the VM. */ - + unlock: mutex_unlock(&kvm->lock); - return 0; + return rc; } static int kvmppc_irq_bypass_add_producer_hv(struct irq_bypass_consumer *cons, @@@ -3928,7 -3957,7 +3955,7 @@@ static int kvmppc_book3s_init_hv(void * indirectly, via OPAL. */ #ifdef CONFIG_SMP - if (!local_paca->kvm_hstate.xics_phys) { - if (!xive_enabled() && !get_paca()->kvm_hstate.xics_phys) { ++ if (!xive_enabled() && !local_paca->kvm_hstate.xics_phys) { struct device_node *np; np = of_find_compatible_node(NULL, NULL, "ibm,opal-intc"); diff --cc arch/powerpc/kvm/powerpc.c index cf725c580fc5,de79bd721ec7..e4b58f2e335e --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c @@@ -37,7 -37,8 +37,9 @@@ #include #include #include +#include + #include + #include "timing.h" #include "irq.h" #include "../mm/mmu_decl.h"