[Top][All Lists]

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

Re: [Qemu-arm] [Qemu-devel] [PATCH] hw/arm/virt: gicv3: use all target-l

From: Andrew Jones
Subject: Re: [Qemu-arm] [Qemu-devel] [PATCH] hw/arm/virt: gicv3: use all target-list bits
Date: Mon, 27 Jun 2016 08:41:54 +0200
User-agent: Mutt/ (2014-03-12)

On Fri, Jun 24, 2016 at 06:27:20PM +0100, Peter Maydell wrote:
> On 24 June 2016 at 18:22, Andrew Jones <address@hidden> wrote:
> > On Fri, Jun 24, 2016 at 05:41:55PM +0100, Peter Maydell wrote:
> >> KVM AArch32 is 4 CPUs per cluster:
> >> http://lxr.free-electrons.com/source/arch/arm/kvm/coproc.c#L109
> >
> > Hmm... yes, it should use coproc.c, but here's what I get when I
> > test
> >
> > qemu-system-aarch64 \
> >   -machine virt,gic-version=2,accel=kvm \
> >   -cpu host,aarch64=off \
> >   -device virtio-serial-device \
> >   -device virtconsole,chardev=ctd \
> >   -chardev testdev,id=ctd \
> >   -display none -serial stdio \
> >   -kernel arm/selftest.flat \
> >   -append smp -smp 8
> This suggests that 32-bit-guest-on-64-bit-host and
> 32-bit-guest-on-32-bit-host differ...

Yes, this is the case. I just looked at KVM and, it shouldn't use coproc.c
(that's not one of the shared files between 32 and 64 bit hosts), and
there's no special handing in reset_mpidr for KVM_ARM_VCPU_EL1_32BIT.
The only special handing is in handlers for trapped coproc accesses,
which MPIDR is not.

I think it makes sense that the 32bit guest view be consistent. This
means we need one of two patches in KVM. Either

 a) decide we don't need to emulate clusters of 4, and just use the
    max the gic supports, or
 b) modify arm64's reset_mpidr to change behavior based on

If the clusters of 4 thing is a hard requirement, then we should go
that way. If not, as it doesn't seem to break guests today (aarch64=off
and tcg guests have never done it) then I say we stop doing it on 32bit
hosts too, as it will increase SGI efficiency.

(I've added kvmarm and Chistoffer and Marc to CC)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]