diff options
Diffstat (limited to 'arch/powerpc/kvm/powerpc.c')
| -rw-r--r-- | arch/powerpc/kvm/powerpc.c | 19 | 
1 files changed, 13 insertions, 6 deletions
| diff --git a/arch/powerpc/kvm/powerpc.c b/arch/powerpc/kvm/powerpc.c index 4c5405fc5538..7197c8256668 100644 --- a/arch/powerpc/kvm/powerpc.c +++ b/arch/powerpc/kvm/powerpc.c @@ -304,11 +304,11 @@ int kvmppc_emulate_mmio(struct kvm_vcpu *vcpu)  		break;  	case EMULATE_FAIL:  	{ -		u32 last_inst; +		ppc_inst_t last_inst;  		kvmppc_get_last_inst(vcpu, INST_GENERIC, &last_inst);  		kvm_debug_ratelimited("Guest access to device memory using unsupported instruction (opcode: %#08x)\n", -				      last_inst); +				      ppc_inst_val(last_inst));  		/*  		 * Injecting a Data Storage here is a bit more @@ -321,7 +321,9 @@ int kvmppc_emulate_mmio(struct kvm_vcpu *vcpu)  			if (vcpu->mmio_is_write)  				dsisr |= DSISR_ISSTORE; -			kvmppc_core_queue_data_storage(vcpu, vcpu->arch.vaddr_accessed, dsisr); +			kvmppc_core_queue_data_storage(vcpu, +					kvmppc_get_msr(vcpu) & SRR1_PREFIXED, +					vcpu->arch.vaddr_accessed, dsisr);  		} else {  			/*  			 * BookE does not send a SIGBUS on a bad @@ -576,6 +578,12 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)  		break;  #endif +#ifdef CONFIG_HAVE_KVM_IRQFD +	case KVM_CAP_IRQFD_RESAMPLE: +		r = !xive_enabled(); +		break; +#endif +  	case KVM_CAP_PPC_ALLOC_HTAB:  		r = hv_enabled;  		break; @@ -2371,12 +2379,11 @@ static int kvmppc_get_cpu_char(struct kvm_ppc_cpu_char *cp)  }  #endif -long kvm_arch_vm_ioctl(struct file *filp, -                       unsigned int ioctl, unsigned long arg) +int kvm_arch_vm_ioctl(struct file *filp, unsigned int ioctl, unsigned long arg)  {  	struct kvm *kvm __maybe_unused = filp->private_data;  	void __user *argp = (void __user *)arg; -	long r; +	int r;  	switch (ioctl) {  	case KVM_PPC_GET_PVINFO: { | 
