Re: [PATCH 00/17] kvm-unit-tests/arm: initial drop

Andrew Jones
2014-02-04T08:33:37Z

On Tue, Feb 04, 2014 at 09:19:30AM +0100, Maria Soler wrote:
> On 29 January 2014 16:35, Andrew Jones <drjones@redhat.com> wrote:
>
> > On Tue, Jan 28, 2014 at 07:16:11PM +0100, María Soler Heredia wrote:
> > > Hello Andrew,
> > >
> > > I have been experimenting a little with your tests and I have some
> > comments
> > > and questions. I have already compiled and run versions v1 and v2, which
> > > work with kvm disabled, but I cannot run v3 using the same qemu, version
> > > 1.6.90 with these two sets of patches:
> > >
> > > -
> > http://lists.nongnu.org/archive/html/qemu-devel/2013-09/msg02142.html(Adds
> > > 'virt' platform)
> > > -
> > http://lists.nongnu.org/archive/html/qemu-devel/2013-10/msg01815.html(Introduces
> > > virtio-testdev)
> > >
> > > that you indicated on [PATCH 0/9] kvm-unit-tests/arm: initial drop.
> > >
> > > > Only qemu-system-arm, recent enough to have mach-virt, and the
> > > > virtio-testdev patch[1],
> > > > is required.
> > > >
> > > > [1]
> > http://lists.nongnu.org/archive/html/qemu-devel/2013-12/msg00690.html
> > > >
> > >
> > > Then I thought maybe the problem was that my qemu was too old, so I
> > > upgraded to version 1.7.50, the newest available version at git://
> > > git.qemu-project.org/qemu.git and applied patch[1] but it seems to be
> > > incompatible with that version of qemu, since it doesn't compile:
> > >
> > -------------------------------------------------------------------------------------------------------------------------------------------
> > > hw/virtio/virtio-testdev.c: In function 'virtio_testdev_class_init':
> > > hw/virtio/virtio-testdev.c:136:8: error: 'VirtioDeviceClass' has no
> > member
> > > named 'init'
> > >
> > -------------------------------------------------------------------------------------------------------------------------------------------
> >
> > The latest git://git.qemu.org/qemu.git with the v3 of virtio-testdev that
> > I just sent[*] works for me. virtio-testdev needed to be converted from
> > init
> > to realize.
> >
> > [*] http://lists.nongnu.org/archive/html/qemu-devel/2014-01/msg04041.html
> >
> > >
> > > I modified hw/virtio/virtio-testdev.c to stop this error from happening,
> > > but it won't run the already compiled (with qemu 1.6.90) v1 and v2 or
> > make
> > > a runnable version of either v1, v2 or v3 when recompiling them.
> > >
> > > The error that I get when I run the v3 of the test (with qemu 1.6.90) is
> > as
> > > follows:
> > >
> > > $ ./run_tests.sh -v
> > > ./arm-run arm/selftest.flat -smp 1 -m 256 -append 'mem 256'
> > > qemu: fatal: Trying to execute code outside RAM or ROM at 0x00000000
> > >
> > > R00=fffffff7 R01=00000000 R02=00000000 R03=2ff20112
> > > R04=00000000 R05=00000000 R06=00000000 R07=00000000
> > > R08=00000000 R09=00000000 R10=00000000 R11=00000000
> > > R12=00000000 R13=40017ff8 R14=080117b0 R15=00000000
> > > PSR=a00001d3 N-C- A svc32
> > > s00=00000000 s01=00000000 d00=0000000000000000
> > > ...
> > > s62=00000000 s63=00000000 d31=0000000000000000
> > > FPSCR: 00000000
> > > ./arm-run: line 16: 4839 Aborted (core dumped) $command
> > > "$@"
> > > FAIL selftest_mem
> > > ./arm-run arm/selftest.flat -smp 1 -append 'vectors'
> > > qemu: fatal: Trying to execute code outside RAM or ROM at 0x00000000
> > >
> > > R00=fffffff7 R01=00000000 R02=00000000 R03=2ff20112
> > > R04=00000000 R05=00000000 R06=00000000 R07=00000000
> > > R08=00000000 R09=00000000 R10=00000000 R11=00000000
> > > R12=00000000 R13=40017ff8 R14=080117b0 R15=00000000
> > > PSR=a00001d3 N-C- A svc32
> > > s00=00000000 s01=00000000 d00=0000000000000000
> > > ...
> > > s62=00000000 s63=00000000 d31=0000000000000000
> > > FPSCR: 00000000
> > > ./arm-run: line 16: 4845 Aborted (core dumped) $command
> > > "$@"
> > > FAIL selftest_vectors
> > > ./arm-run arm/selftest.flat -smp 1 -append 'vectors_usr'
> > > qemu: fatal: Trying to execute code outside RAM or ROM at 0x00000000
> > >
> > > R00=fffffff7 R01=00000000 R02=00000000 R03=2ff20112
> > > R04=00000000 R05=00000000 R06=00000000 R07=00000000
> > > R08=00000000 R09=00000000 R10=00000000 R11=00000000
> > > R12=00000000 R13=40017ff8 R14=080117b0 R15=00000000
> > > PSR=a00001d3 N-C- A svc32
> > > s00=00000000 s01=00000000 d00=0000000000000000
> > > ...
> > > s62=00000000 s63=00000000 d31=0000000000000000
> > > FPSCR: 00000000
> > > ./arm-run: line 16: 4851 Aborted (core dumped) $command
> > > "$@"
> > > FAIL selftest_vectors_usr
> > >
> > > Am I using the wrong qemu? Is there a new dependency that is not
> > mentioned
> > > and that may cause this problem? Any other ideas on why this could
> > happen?
> >
> > Are you sure you have the latest mach-virt patches for qemu? v3 of
> > kvm-unit-tests/arm sets the load address to 0x40000000, which matches the
> > latest mach-virt.
> >
> > I can run these tests on my x86_64 machine, without kvm enabled, as well as
> > on an armv7 machine with kvm enabled. Are you still running on the
> > FastModel? I never got around to setting one up to see if that works or
> > not.
> >
> > thanks,
> > drew
> >
> >
> In deed, everything works fine with that qemu. So my "old qemu" was too old
> and the other one was simply an incompatible version. I wasn't using
> FastModels in this case, although all versions work on FastModels as well.
> The only problem I had with the first version was that I thought I could
> enable kvm, (you know, kvm tests), so I mentioned FastModels in case it was
> part of the problem.
>
> Thank you very much,
> María.

I'm glad to hear things are working for you now. Will you be submitting
some test code built on top of this framework? If so, can you briefly
describe your plans?

thanks,
drew