Re: ARM & KVM : KVM_RUN returns -ENXIO

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

 



On 09/10/2013 12:41 PM, Richard W.M. Jones wrote:
> On Tue, Sep 10, 2013 at 12:27:48PM -0400, William Cohen wrote:
>> On 09/07/2013 08:16 AM, Richard W.M. Jones wrote:
>>> On Sat, Sep 07, 2013 at 01:02:39PM +0100, Richard W.M. Jones wrote:
>>>> All places in general where ENXIO might be returned are related to the
>>>> function "irqchip_in_kernel" and the mysterious "VGIC" hardware (which
>>>> I guess is doing interrupt routing like APIC on PCs?)
>>>
>>> The solution was some creative grepping of the qemu sources:
>>>
>>>   -machine accel=kvm:tcg,kernel_irqchip=off
>>>
>>> Works great (except of course virtio-serial is still broken).  I seem
>>> to be getting there, slowly ...
>>>
>>> Rich.
>>>
>>
>>
>> Hi Rich,
>>
>> Thanks for the tip above.  I was able to get virtualization running on my Samsung ARM chromebook (using a nv-uboot that turns on HYP and a locally built 3.11 kernel with a patch).
> 
> Interesting .. which/what is "nv-uboot" and where did you get it from?

Hi Rich,

I used the u-boot described in http://www.virtualopensystems.com/media/chromebook/chromebook.pdf:

git://github.com/virtualopensystems/u-boot.git

This u-boot doesn't seem to understand initramfs, so the kernel I am using has some things compiled in rather than modules. 
For the linux-3.11 kernel I also had to use a patch based on:

https://github.com/virtualopensystems/linux-kvm-arm/commit/32682304c9935dd0aa55ee9196429d0955f26fa1

Peter Robinson mentioned there are some other patches submitted for review that are suppose to accomplished the same.

> 
>> https://fedoraproject.org/wiki/Architectures/ARM/F18/Versatile_Express
>>
>> This particular image uses a 3.6.10 linux kernel.  The URL above mentions that DTB files are needed for newer kernels. Is there a particular DTB file that would be best to use?  There seems to be several vexpress*.dtb files to choose from.
> 
> I used:
> 
>   qemu-system-arm \
>     -M vexpress-a9 \
>     -dtb /boot/dtb-....../vexpress-v2p-ca9.dtb \
>     -machine accel=kvm:tcg,kernel_irqchip=off \
>     [etc]

Okay I will try "-M vexpress-a9 -dtb ..vexpress-v2p-ca9.dtb"
> 
> You can find the full command line that libguestfs passes here:
> 
>   https://github.com/libguestfs/libguestfs/blob/master/src/launch-direct.c#L244
> 
> Rich.
> 

I tried to run a couple of the systemtap virtualization examples on the host (https://sourceware.org/systemtap/examples/keyword-index.html#VIRTUALIZATION).  However, it looks like the some of the kernel tracepoint that are available for x86: kernel.trace("kvm_entry") and kernel.trace("kvm_exit") are not available on my kernel. However, I do see the trace points defined on: http://lxr.linux.no/#linux+v3.11/arch/arm/kvm/trace.h#L12  And look to be used in the 3.11 kernel.

trace_kvm_entry: http://lxr.linux.no/#linux+v3.11/arch/arm/kvm/arm.c#L568
trace_kvm_exit: http://lxr.linux.no/#linux+v3.11/arch/arm/kvm/arm.c#L577

Maybe the kernel doesn't have some config set correctly.  There are some kernel.trace("kvm_*") that are listed on the host kernel:

$ sudo stap -L 'kernel.trace("kvm_*")'
kernel.trace("kvm_ack_irq") $irqchip:unsigned int $pin:unsigned int
kernel.trace("kvm_age_page") $hva:ulong $slot:struct kvm_memory_slot* $ref:int
kernel.trace("kvm_fpu") $load:int
kernel.trace("kvm_mmio") $type:int $len:int $gpa:u64 $val:u64
kernel.trace("kvm_set_irq") $gsi:unsigned int $level:int $irq_source_id:int
kernel.trace("kvm_userspace_exit") $reason:__u32 $errno:int

The kvm trace event that were found are defined in http://lxr.linux.no/#linux+v3.11/include/trace/events/kvm.h

-Will




_______________________________________________
arm mailing list
arm@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/arm





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux ARM (Vger)]     [Linux ARM]     [ARM Kernel]     [Fedora User Discussion]     [Older Fedora Users Discussion]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Maintainers]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [Linux Apps]     [KDE Users]     [Fedora Tools]     [Fedora Art]     [Fedora Docs]     [Asterisk PBX]

Powered by Linux