Re: [PATCH 02/10] ARM: KVM: vgic: sanitize GICH_VMCR value

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

 



On 21 November 2012 20:29, Christoffer Dall
<c.dall@xxxxxxxxxxxxxxxxxxxxxx> wrote:
> On Wed, Nov 21, 2012 at 1:15 PM, Marc Zyngier <marc.zyngier@xxxxxxx> wrote:
>> +       default_vmcr  = readl_relaxed(vgic_vctrl_base + GICH_VMCR);
>> +       default_vmcr |= (0x1f << 27); /* Priority */
>> +       default_vmcr &= ~0x21f; /* Clear VEM, VMCPBR, VMFIQEn, VMAckCtl, VMGrp1En, VMGrp0En  */
>> +
>
> actually, why are we reading hardware state here at all? Don't we want
> to run with a spceifically controlled setup that we can simply
> compile-time define?

Good point, yes. (I suppose in some sense it's a property of
the guest CPU, or at least the guest-visible GIC, but let's not
get into configuring GICs :-))

> (granted teh meaning of all these fields has already faded far back in
> my memory, so maybe this question is nonsense)

Most of them are defined to reset-to-zero by the GIC v2 spec.
The remaining ones we're not setting here are the binary-point
ones (which reset to the hardware-supported-minimum) and the
reserved fields (which are SBZP). So probably the right thing
is to write a fixed correct value to the VMCR which specifies
the minimum-binary-point-fields used by the A15's GIC, and
then readback to check that the host GIC supports at least
those minima.

-- PMM
_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/cucslists/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