qemu-discuss
[Top][All Lists]
Advanced

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

Re: [Qemu-discuss] Test device driver of new machine in qemu by syzkalle


From: Peter Maydell
Subject: Re: [Qemu-discuss] Test device driver of new machine in qemu by syzkaller
Date: Wed, 11 Jan 2017 17:24:34 +0000

On 11 January 2017 at 12:55, 韩雨哲 <address@hidden> wrote:
> Hi,all:
> I am trying to test the device driver and related syscalls in arm64
> qemu.There are some problems:
>
> 1.The kernel cannot run when I set "machine" to "virt" and load my own dtb
> file.

Why do you want to do that? Generally for the 'virt' machine
you should just let QEMU autogenerate the DTB, which it does
by default.

> I added some trace print in the qemu source code, and I can see that qemu
> has loaded all the images and prepared vcpus and mem, and then it hang up in
> "main_loop".
> Is there a tool I can use to debug the qemu, see if vcpu is running to load
> kernel and where the error occurs?

"Appears to just hang" almost always means "QEMU is running
fine but your guest has crashed or gone into a loop without
getting round to producing any output". Debug is as usual for
initial kernel bringup on hardware (ie very painful).

> 2.I compiled the qemu with "enable-kvm",but it seems that
> the kvm related  source codes are not compiled into the
> executable file. I doubt which virtualization hypervisor
> does it used?

--enable-kvm is for KVM. You will need to be running on an
ARM host machine to use it, though (just as KVM for x86
only works for x86 guests on x86 hosts).

> 3.Can I make a dts file contains my own devices to load in
> qemu and trigger the device driver?

Unless you also write code in QEMU to actually emulate those
devices, then there's no point having the device tree file
claim that they exist, because all that will happen is that
the kernel will try to probe empty space and fall over.
(If you write the code in QEMU to implement the devices then you
can also write the code that puts the info in the device
tree for them.) NB: for PCI devices and similar pluggable
and probeable busses, you don't need to describe them in
the dts at all -- the kernel will just scan the PCI bus.

thanks
-- PMM



reply via email to

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