Re: [PATCH 08/11] KVM: arm64: Inject AArch32 exceptions from HYP

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

 



Hi Marc,

On 27/10/2020 19:21, Marc Zyngier wrote:
>>> +static inline u32 __vcpu_read_cp15(const struct kvm_vcpu *vcpu, int reg)
>>> +{
>>> +    return __vcpu_read_sys_reg(vcpu, reg / 2);
>>> +}

>> Doesn't this re-implement the issue 3204be4109ad biased?

> I don't think it does. The issue existed when accessing the 32bit shadow,
> and we had to pick which side of the 64bit register had our 32bit value.
> Here, we directly access the 64bit file, which is safe.

Because its not accessing the copro union, and the two users are both straight forward
aliases.

...

What do I get if I call:
| __vcpu_read_cp15(vcpu, c6_IFAR);

Won't this return the value of c6_DFAR instead as they live in the same 64 bit register.


> But thinking of it, we may as well change the call sites to directly
> use the 64bit enum, rather than playing games

Great!


> (we used to use the 32bit definition for the sake of the defunct 32bit port).


Thanks,

James
_______________________________________________
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