diff options
Diffstat (limited to 'arch/arm/kvm/guest.c')
| -rw-r--r-- | arch/arm/kvm/guest.c | 14 | 
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/arm/kvm/guest.c b/arch/arm/kvm/guest.c index 684cf64b4033..0e6f23504c26 100644 --- a/arch/arm/kvm/guest.c +++ b/arch/arm/kvm/guest.c @@ -21,6 +21,10 @@  #define VCPU_STAT(x) { #x, offsetof(struct kvm_vcpu, stat.x), KVM_STAT_VCPU }  struct kvm_stats_debugfs_item debugfs_entries[] = { +	VCPU_STAT(halt_successful_poll), +	VCPU_STAT(halt_attempted_poll), +	VCPU_STAT(halt_poll_invalid), +	VCPU_STAT(halt_wakeup),  	VCPU_STAT(hvc_exit_stat),  	VCPU_STAT(wfe_exit_stat),  	VCPU_STAT(wfi_exit_stat), @@ -255,6 +259,12 @@ int __kvm_arm_vcpu_get_events(struct kvm_vcpu *vcpu,  {  	events->exception.serror_pending = !!(*vcpu_hcr(vcpu) & HCR_VA); +	/* +	 * We never return a pending ext_dabt here because we deliver it to +	 * the virtual CPU directly when setting the event and it's no longer +	 * 'pending' at this point. +	 */ +  	return 0;  } @@ -263,12 +273,16 @@ int __kvm_arm_vcpu_set_events(struct kvm_vcpu *vcpu,  {  	bool serror_pending = events->exception.serror_pending;  	bool has_esr = events->exception.serror_has_esr; +	bool ext_dabt_pending = events->exception.ext_dabt_pending;  	if (serror_pending && has_esr)  		return -EINVAL;  	else if (serror_pending)  		kvm_inject_vabt(vcpu); +	if (ext_dabt_pending) +		kvm_inject_dabt(vcpu, kvm_vcpu_get_hfar(vcpu)); +  	return 0;  }  |