Re: Getting lan9118 to work in KVM guest?

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

 



On 07/09/12 17:18, Jessica Allison wrote:
> On 07/09/12 16:08, Marc Zyngier wrote:
>> On 07/09/12 14:04, Jessica Allison wrote:
>>> On 07/09/12 12:22, Marc Zyngier wrote:
>>>> On 07/09/12 10:15, Jessica Allison wrote:
>>>>> Hi, I'm trying to get guest networking to function on the Cortex-A15x2
>>>>> FastModel.
>>>> [...]
>>>>
>>>>> My only idea would be that the guest kernel device tree does not include
>>>>> the SMC device? Or does anyone have another idea why the lan9118 network
>>>>> card does not seem to show up in the guest? Has anyone ever managed to
>>>>> get guest networking to function?
>>>> Works well enough for me:
>>>>
>>>> <demo>
>>>> root@linaro:~# dmesg|grep smsc
>>>> [    0.827410] smsc911x: Driver version 2008-10-21
>>>> [    0.835281] libphy: smsc911x-mdio: probed
>>>> [    0.838724] smsc911x 1a000000.ethernet: eth0: attached PHY driver [Generic PHY] (mii_bus:phy_addr=1a000000.etherne:01, irq=-1)
>>>> [    0.850633] smsc911x 1a000000.ethernet: eth0: MAC Address: 52:54:00:12:34:56
>>>> [    1.065648] smsc911x 1a000000.ethernet: eth0: SMSC911x/921x identified at 0xf0060000, IRQ: 47
>>>> root@linaro:~# ifconfig eth0
>>>> eth0      Link encap:Ethernet  HWaddr 52:54:00:12:34:56
>>>>             inet addr:10.0.2.15  Bcast:10.0.2.255  Mask:255.255.255.0
>>>>             UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>>>>             RX packets:16 errors:0 dropped:0 overruns:0 frame:0
>>>>             TX packets:19 errors:0 dropped:0 overruns:0 carrier:0
>>>>             collisions:0 txqueuelen:1000
>>>>             RX bytes:3394 (3.3 KB)  TX bytes:2942 (2.9 KB)
>>>>             Interrupt:47
>>>>
>>>> root@linaro:~# ping -c3 10.0.2.2
>>>> PING 10.0.2.2 (10.0.2.2) 56(84) bytes of data.
>>>> 64 bytes from 10.0.2.2: icmp_req=1 ttl=255 time=1.47 ms
>>>> 64 bytes from 10.0.2.2: icmp_req=2 ttl=255 time=1.34 ms
>>>> 64 bytes from 10.0.2.2: icmp_req=3 ttl=255 time=1.38 ms
>>>>
>>>> --- 10.0.2.2 ping statistics ---
>>>> 3 packets transmitted, 3 received, 0% packet loss, time 2002ms
>>>> rtt min/avg/max/mdev = 1.343/1.403/1.478/0.063 ms
>>>> root@linaro:~# wget http://www.google.com
>>>> --2012-09-07 11:19:20--  http://www.google.com/
>>>> Resolving www.google.com... 173.194.78.106, 173.194.78.104, 173.194.78.105, ...
>>>> Connecting to www.google.com|173.194.78.106|:80... connected.
>>>> HTTP request sent, awaiting response... 302 Found
>>>> Location: http://www.google.co.uk/ [following]
>>>> --2012-09-07 11:19:22--  http://www.google.co.uk/
>>>> Resolving www.google.co.uk... 173.194.78.94, 2a00:1450:400c:c05::5e
>>>> Connecting to www.google.co.uk|173.194.78.94|:80... connected.
>>>> HTTP request sent, awaiting response... 200 OK
>>>> Length: unspecified [text/html]
>>>> Saving to: `index.html'
>>>>
>>>>       [ <=>                                   ] 11,010      --.-K/s   in 0s
>>>>
>>>> 2012-09-07 11:19:26 (85.6 MB/s) - `index.html' saved [11010]
>>>> </demo>
>>>>
>>>> Slow, but it does work.
>>>>
>>>> So the question is about the DT you're using... My gut feeling is that
>>>> you're using the same DT as the model, which is the wrong thing to do.
>>>>
>>>> I use vexpress-v2f-2xv6-ca15x2.dts, which is a good match for what QEMU
>>>> emulates.
>>>>
>>>> 	M.
>>> With that DT I get a kernel bug though which I didn't get before:
>>>
>>> WARNING: at kernel/irq/irqdomain.c:135 irq_domain_legacy_revmap+0x20/0x48()
>>> [<c0013e4c>] (unwind_backtrace+0x0/0xf8) from [<c001d728>]
>>> (warn_slowpath_common+0x48/0x60)
>>> [<c001d728>] (warn_slowpath_common+0x48/0x60) from [<c001d808>]
>>> (warn_slowpath_null+0x1c/0x24)
>>> [<c001d808>] (warn_slowpath_null+0x1c/0x24) from [<c005f0b4>]
>>> (irq_domain_legacy_revmap+0x20/0x48)
>>> [<c005f0b4>] (irq_domain_legacy_revmap+0x20/0x48) from [<c005f80c>]
>>> (irq_create_mapping+0x20/0x120)
>>> [<c005f80c>] (irq_create_mapping+0x20/0x120) from [<c005f988>]
>>> (irq_create_of_mapping+0x7c/0xf0)
>>> [<c005f988>] (irq_create_of_mapping+0x7c/0xf0) from [<c02465e8>]
>>> (irq_of_parse_and_map+0x2c/0x34)
>>> [<c02465e8>] (irq_of_parse_and_map+0x2c/0x34) from [<c0246608>]
>>> (of_irq_to_resource+0x18/0x74)
>>> [<c0246608>] (of_irq_to_resource+0x18/0x74) from [<c0246688>]
>>> (of_irq_count+0x24/0x34)
>>> [<c0246688>] (of_irq_count+0x24/0x34) from [<c0246bc4>]
>>> (of_device_alloc+0x54/0x150)
>>> [<c0246bc4>] (of_device_alloc+0x54/0x150) from [<c0246cf4>]
>>> (of_platform_device_create_pdata+0x34/0x80)
>>> [<c0246cf4>] (of_platform_device_create_pdata+0x34/0x80) from
>>> [<c0246e18>] (of_platform_bus_create+0xd8/0x270)
>>> [<c0246e18>] (of_platform_bus_create+0xd8/0x270) from [<c02470ec>]
>>> (of_platform_populate+0x60/0x98)
>>> [<c02470ec>] (of_platform_populate+0x60/0x98) from [<c03bf4f8>]
>>> (v2m_dt_init+0x18/0x38)
>>> [<c03bf4f8>] (v2m_dt_init+0x18/0x38) from [<c03bb69c>]
>>> (customize_machine+0x1c/0x28)
>>> [<c03bb69c>] (customize_machine+0x1c/0x28) from [<c03b8874>]
>>> (do_one_initcall+0x90/0x160)
>>> [<c03b8874>] (do_one_initcall+0x90/0x160) from [<c03b8a40>]
>>> (kernel_init+0xfc/0x1bc)
>>> [<c03b8a40>] (kernel_init+0xfc/0x1bc) from [<c000eeac>]
>>> (kernel_thread_exit+0x0/0x8)
>>> ---[ end trace 1b75b31a2719ed1d ]---
>>>
>>> Is that any serious?
>> Depends. Is that with qemu GIC or vgic?
>>
>> 	M.
> 
> My host kernel is configured with
> 
> CONFIG_HAVE_KVM_IRQCHIP=y
> CONFIG_KVM_MMIO=y
> CONFIG_KVM=y
> CONFIG_KVM_ARM_HOST=y
> CONFIG_KVM_ARM_VGIC=y
> 
> which means I am using vgic?

No, that just mean you've compiled the code. Your qemu command line
needs something like:
 "-machine type=vexpress-a15,accel=kvm,kernel_irqchip=on"

	M.
-- 
Jazz is not dead. It just smells funny...


_______________________________________________
kvmarm mailing list
kvmarm@xxxxxxxxxxxxxxxxxxxxx
https://lists.cs.columbia.edu/cucslists/listinfo/kvmarm


[Index of Archives]     [Linux KVM]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux