Re: [PATCH 2/2] kvm/arm64: don't log IMP DEF sysreg traps

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 05 Dec 2019 18:06:52 +0000,
Mark Rutland <mark.rutland@xxxxxxx> wrote:
> 
> We don't intend to support IMPLEMENATION DEFINED system registers, but
> have to trap them (and emulate them as UNDEFINED). These traps aren't
> interesting to the system administrator or to the KVM developers, so
> let's not bother logging when we do so.
> 
> Signed-off-by: Mark Rutland <mark.rutland@xxxxxxx>
> Cc: Alexandru Elisei <alexandru.elisei@xxxxxxx>
> Cc: James Morse <james.morse@xxxxxxx>
> Cc: Julien Thierry <julien.thierry.kdev@xxxxxxxxx>
> Cc: Marc Zyngier <maz@xxxxxxxxxx>
> Cc: Suzuki K Poulose <suzuki.poulose@xxxxxxx>
> Cc: kvmarm@xxxxxxxxxxxxxxxxxxxxx
> ---
>  arch/arm64/kvm/sys_regs.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c
> index d128abd38656..61f019104841 100644
> --- a/arch/arm64/kvm/sys_regs.c
> +++ b/arch/arm64/kvm/sys_regs.c
> @@ -2233,6 +2233,12 @@ int kvm_handle_cp14_32(struct kvm_vcpu *vcpu, struct kvm_run *run)
>  				NULL, 0);
>  }
>  
> +static bool is_imp_def_sys_reg(struct sys_reg_params *params)
> +{
> +	// See ARM DDI 0487E.a, section D12.3.2
> +	return params->Op0 == 3 && (params->CRn & 0b1011) == 0b1011;
> +}
> +
>  static int emulate_sys_reg(struct kvm_vcpu *vcpu,
>  			   struct sys_reg_params *params)
>  {
> @@ -2248,6 +2254,8 @@ static int emulate_sys_reg(struct kvm_vcpu *vcpu,
>  
>  	if (likely(r)) {
>  		perform_access(vcpu, params, r);
> +	} else if (is_imp_def_sysreg(params)) {

Meh. Doesn't compile... :-(
Fixing it locally.

	M.

-- 
Jazz is not dead, it just smells funny.
_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm



[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux