powerpc.c (d93618da6b6d453c6a9684a3460ffd51b9b4ef2e) | powerpc.c (d663b8a285986072428a6a145e5994bc275df994) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * 4 * Copyright IBM Corp. 2007 5 * 6 * Authors: Hollis Blanchard <hollisb@us.ibm.com> 7 * Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com> 8 */ --- 22 unchanged lines hidden (view full) --- 31#ifdef CONFIG_PPC_PSERIES 32#include <asm/hvcall.h> 33#include <asm/plpar_wrappers.h> 34#endif 35#include <asm/ultravisor.h> 36#include <asm/setup.h> 37 38#include "timing.h" | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * 4 * Copyright IBM Corp. 2007 5 * 6 * Authors: Hollis Blanchard <hollisb@us.ibm.com> 7 * Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com> 8 */ --- 22 unchanged lines hidden (view full) --- 31#ifdef CONFIG_PPC_PSERIES 32#include <asm/hvcall.h> 33#include <asm/plpar_wrappers.h> 34#endif 35#include <asm/ultravisor.h> 36#include <asm/setup.h> 37 38#include "timing.h" |
39#include "irq.h" | |
40#include "../mm/mmu_decl.h" 41 42#define CREATE_TRACE_POINTS 43#include "trace.h" 44 45struct kvmppc_ops *kvmppc_hv_ops; 46EXPORT_SYMBOL_GPL(kvmppc_hv_ops); 47struct kvmppc_ops *kvmppc_pr_ops; --- 2112 unchanged lines hidden (view full) --- 2160 pvinfo->hcall[3] = cpu_to_be32(inst_nop); 2161#endif 2162 2163 pvinfo->flags = KVM_PPC_PVINFO_FLAGS_EV_IDLE; 2164 2165 return 0; 2166} 2167 | 39#include "../mm/mmu_decl.h" 40 41#define CREATE_TRACE_POINTS 42#include "trace.h" 43 44struct kvmppc_ops *kvmppc_hv_ops; 45EXPORT_SYMBOL_GPL(kvmppc_hv_ops); 46struct kvmppc_ops *kvmppc_pr_ops; --- 2112 unchanged lines hidden (view full) --- 2159 pvinfo->hcall[3] = cpu_to_be32(inst_nop); 2160#endif 2161 2162 pvinfo->flags = KVM_PPC_PVINFO_FLAGS_EV_IDLE; 2163 2164 return 0; 2165} 2166 |
2167bool kvm_arch_irqchip_in_kernel(struct kvm *kvm) 2168{ 2169 int ret = 0; 2170 2171#ifdef CONFIG_KVM_MPIC 2172 ret = ret || (kvm->arch.mpic != NULL); 2173#endif 2174#ifdef CONFIG_KVM_XICS 2175 ret = ret || (kvm->arch.xics != NULL); 2176 ret = ret || (kvm->arch.xive != NULL); 2177#endif 2178 smp_rmb(); 2179 return ret; 2180} 2181 |
|
2168int kvm_vm_ioctl_irq_line(struct kvm *kvm, struct kvm_irq_level *irq_event, 2169 bool line_status) 2170{ | 2182int kvm_vm_ioctl_irq_line(struct kvm *kvm, struct kvm_irq_level *irq_event, 2183 bool line_status) 2184{ |
2171 if (!irqchip_in_kernel(kvm)) | 2185 if (!kvm_arch_irqchip_in_kernel(kvm)) |
2172 return -ENXIO; 2173 2174 irq_event->status = kvm_set_irq(kvm, KVM_USERSPACE_IRQ_SOURCE_ID, 2175 irq_event->irq, irq_event->level, 2176 line_status); 2177 return 0; 2178} 2179 --- 372 unchanged lines hidden --- | 2186 return -ENXIO; 2187 2188 irq_event->status = kvm_set_irq(kvm, KVM_USERSPACE_IRQ_SOURCE_ID, 2189 irq_event->irq, irq_event->level, 2190 line_status); 2191 return 0; 2192} 2193 --- 372 unchanged lines hidden --- |