Re: kvm enable over cortex-a53?

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

 



Hi Marc,

On Mon, Jun 2, 2014 at 5:27 PM, Marc Zyngier <marc.zyngier@xxxxxxx> wrote:
> On 02/06/14 10:09, Lei Wen wrote:
>> Hi,
>>
>> I am current try to enable kvm over cortex-a53 over 3.10 kernel.
>> After some patches backporting, I manage to get the /dev/kvm showed
>> out, and build
>> pass for the kernel.
>>
>> However while I try to use the lkvm to launch the guest, some error shows up:
>>
>>   # lkvm run -k nfs/Image -m 256 -c 1 --name guest-143
>>   Warning: nfs/Image is not a bzImage. Trying to load it as a flat binary...
>>   Info: Loaded kernel to 0x100080000 (18072024 bytes)
>>   Info: Placing fdt at 0x10fe00000 - 0x10fffffff
>>   Info: virtio-mmio.devices=0x200@0x10000:36
>>
>>   Info: virtio-mmio.devices=0x200@0x10200:37
>>
>>   Info: virtio-mmio.devices=0x200@0x10400:39
>>
>> Emulate result 0
>> KVM exit reason: 6 ("KVM_EXIT_MMIO")
>>
>>  Registers:
>>  PC:    0xffffffc000091a3c
>>  PSTATE:    0x200002c5
>>  SP_EL1:    0xffffffc0010ebcb0
>>  LR:    0xffffffc000091a84
>>
>> With further checking it seem that while it try to access the console
>> driver whose
>> base address is over 0xd4018000, but it failed to pass the checking by
>> arm_addr_in_ioport_region and arm_addr_in_virtio_mmio_region, thus panic_kvm
>> is invoked.
>
> kvmtool tells you where the console lives (it is one of the virtio-mmio
> devices that it prints out when it starts). The address you quote
> (assuming that this is an IPA) doesn't seem to have anything to do with
> anything kvmtool emulates. Pretty sure your kernel is trying to poke at
> some area without parsing the device tree...

Do you have any suggestion for how to debug it?...
Would kvmtool auto load the device tree, or shall I put the device tree binary
into somewhere?

>
>> My question is whether ARM_IOPORT_AREA/ARM_MMIO_AREA/
>> ARM_AXI_AREA/ARM_MEMORY_AREA need to be reconfigured for different
>> SOCs?
>
> No. That's the whole point of a virtual machine.

Got it.

>
>> While I try to hack those MACRO into some value to let 0xd4018000 checking
>> passed, but seems host kernel would hang after that, and if add debug message
>> in lkvm tool, I could see it endlessly calls mmio emulation.
>
> Yes, because there is nothing there that kvmtool can emulate.
>
>> Another finding is that  during the host kernel booting, I didn't see
>> hvc console is
>> registered, but I already enabled CONFIG_HVC_DRIVER and
>> CONFIG_VIRTIO_CONSOLE. Is there any other step needed to be done?
>
> Why would you expect the *host* to have a hvc console? This is a guest
> feature, not a host one.
>
>>
>> BTW, my lkvm tool is from:
>> https://github.com/virtualopensystems/linux-kvm-arm.git
>> with some modification to add cortex-a53 support.
>
> What is wrong with *mainline* kvmtool?

The kvmtool seems not mainline yet? Am I wrong?
I also try below git, but nothing different...
http://git.kernel.org/pub/scm/linux/kernel/git/will/kvmtool.git

Thanks,
Lei
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux