[PATCH 0/2] KVM: arm64: vgic-v3: Misc fixes

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

 



Two minor patches for stuff I found while reviewing Eric's VGIC fixes [1].

First patch should be straightforward documentation update.

I thought of the second patch when I was hacking kvmtool to read GICR_TYPER
from userspace. I was passing the raw MPIDR_EL1 value (the result of
KVM_GET_ONE_REG(MPIDR_EL1)) to KVM_DEV_ARM_VGIC_GRP_REDIST_REGS, which
obviously returned an error code. I started investigating and I thought
that the problem was caused by VGIC_TO_MPIDR not setting the RES1 bit (bit
31) from MPIDR_EL1. I actually wrote a patch to change that when I realized
that the macro wasn't supposed to create a valid MPIDR_EL1 value at all,
because the result of the macro is then compared to
kvm_vcpu_get_mpidr_aff().

I wrote patch #2 hoping that the change in the macro name will prevent
someone else from making the same mistake. On the other hand, using mpidr
to refer to the GICR_TYPER.Affinity_Value fields looks to be well
established in the kernel and in the documentation, so I'm not sure that
changing the macro name is really necessary.

[1] https://lore.kernel.org/kvmarm/20201212185010.26579-1-eric.auger@xxxxxxxxxx/

Alexandru Elisei (2):
  Documentation: kvm: vgic-v3: Update return code for
    KVM_DEV_ARM_VGIC_GRP_CTRL
  KVM: arm64: vgic-v3: Rename VGIC_TO_MPIDR() to VGIC_TO_MPIDR_AFF()

 Documentation/virt/kvm/devices/arm-vgic-v3.rst |  4 +++-
 arch/arm64/kvm/vgic/vgic-kvm-device.c          | 12 ++++++------
 arch/arm64/kvm/vgic/vgic.h                     | 10 +++++-----
 3 files changed, 14 insertions(+), 12 deletions(-)

-- 
2.30.0

_______________________________________________
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