* Re: lkvm issue: --network mode=user,trans=mmio doesn't work
2013-10-12 14:01 ` Sasha Levin
@ 2013-10-12 18:16 ` Péter Szabó
2013-10-13 23:30 ` Asias He
1 sibling, 0 replies; 4+ messages in thread
From: Péter Szabó @ 2013-10-12 18:16 UTC (permalink / raw)
To: Sasha Levin; +Cc: Pekka Enberg, kvm, Asias He, Cyrill Gorcunov
Thank you for helping me figure out what's wrong.
Most probably I'm using trans=mmio incorrectly, but unfortunately I
don't know how to use it properly.
> Did you properly define the network device within the guest? MMIO doesn't
> have automatic detection like PCI does.
I don't think I have defined anything in the guest. All I've changed
is adding ,trans=mmio to the lkvm command line, and it ceased working
because of that. What should I define and where? Is this documented
somewhere? Could you please send me the shortest example (lkvm command
line and possibly guest commands) which works for you?
On Sat, Oct 12, 2013 at 4:01 PM, Sasha Levin <sasha.levin@oracle.com> wrote:
> On 10/12/2013 05:49 AM, Pekka Enberg wrote:
>>
>> Hi Peter,
>>
>> (Adding bunch of CCs.)
>>
>> On 10/12/13 11:05 AM, Péter Szabó wrote:
>>>
>>> First, thank you very much for writing lkvm, it's awesome, and very
>>> easy to set up.
>>>
>>> If sending an e-mail to you is not the right way to report lkvm
>>> issues, please tell me how I should do it.
>>
>>
>> Sure, you can report problems to me and I'll do my best to
>> try to get them sorted out.
>>
>>> I'm using afdf92030c7c43b0f9b32b7edbe07ac3b13780f1 from
>>> git://github.com/penberg/linux-kvm.git and Linux kernel 3.2.51:
>>>
>>> config-3.2.51 (42 KB)
>>> https://mega.co.nz/#!hgxB1TDJ!SdbX-jp_yr8E6EUJl7t7Tzrh1p4qKxkTHieoss8yu_Y
>>> bzImage-3.2.51 (2.0 MB)
>>> https://mega.co.nz/#!5lBVmDZL!WpPRWA7ZflevBIPPNGNM_FkkY-ErBNQMoEbw0XePi5I
>>>
>>> Config:
>>>
>>> $ grep -E 'VIRTIO|MMIO' .config
>>> CONFIG_NET_9P_VIRTIO=y
>>> CONFIG_VIRTIO_BLK=y
>>> CONFIG_VIRTIO_NET=y
>>> CONFIG_VIRTIO_CONSOLE=y
>>> CONFIG_HW_RANDOM_VIRTIO=y
>>> CONFIG_VIRTIO=y
>>> CONFIG_VIRTIO_RING=y
>>> CONFIG_VIRTIO_PCI=y
>>> CONFIG_VIRTIO_BALLOON=y
>>> CONFIG_VIRTIO_MMIO=y
>>> CONFIG_HAVE_MMIOTRACE_SUPPORT=y
>>>
>>> I'm running `lkvm run --network mode=user,trans=mmio', and it fails to
>>> create the eth0 device (`cat /proc/net/dev' doesn't show the device).
>>> With `lkvm run --network mode=user' everything just works.
>>>
>>> I have also tried kernels 3.0.99, 3.4.65 an 3.10.15, but they seem to
>>> fail the same way.
>>>
>>> Am I using it correctly?
>>
>>
>> Asias, Sasha, is mmio transport supported by virtio networking?
>
>
> It should be. The ARM folks use it all the time (I suppose).
>
>
>
> Thanks,
> Sasha
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: lkvm issue: --network mode=user,trans=mmio doesn't work
2013-10-12 14:01 ` Sasha Levin
2013-10-12 18:16 ` Péter Szabó
@ 2013-10-13 23:30 ` Asias He
1 sibling, 0 replies; 4+ messages in thread
From: Asias He @ 2013-10-13 23:30 UTC (permalink / raw)
To: Sasha Levin; +Cc: Pekka Enberg, P�ter Szab�, kvm, Cyrill Gorcunov
On Sat, Oct 12, 2013 at 10:01:42AM -0400, Sasha Levin wrote:
> On 10/12/2013 05:49 AM, Pekka Enberg wrote:
> >Hi Peter,
> >
> >(Adding bunch of CCs.)
> >
> >On 10/12/13 11:05 AM, P?ter Szab? wrote:
> >>First, thank you very much for writing lkvm, it's awesome, and very
> >>easy to set up.
> >>
> >>If sending an e-mail to you is not the right way to report lkvm
> >>issues, please tell me how I should do it.
> >
> >Sure, you can report problems to me and I'll do my best to
> >try to get them sorted out.
> >
> >>I'm using afdf92030c7c43b0f9b32b7edbe07ac3b13780f1 from
> >>git://github.com/penberg/linux-kvm.git and Linux kernel 3.2.51:
> >>
> >>config-3.2.51 (42 KB)
> >>https://mega.co.nz/#!hgxB1TDJ!SdbX-jp_yr8E6EUJl7t7Tzrh1p4qKxkTHieoss8yu_Y
> >>bzImage-3.2.51 (2.0 MB)
> >>https://mega.co.nz/#!5lBVmDZL!WpPRWA7ZflevBIPPNGNM_FkkY-ErBNQMoEbw0XePi5I
> >>
> >>Config:
> >>
> >>$ grep -E 'VIRTIO|MMIO' .config
> >>CONFIG_NET_9P_VIRTIO=y
> >>CONFIG_VIRTIO_BLK=y
> >>CONFIG_VIRTIO_NET=y
> >>CONFIG_VIRTIO_CONSOLE=y
> >>CONFIG_HW_RANDOM_VIRTIO=y
> >>CONFIG_VIRTIO=y
> >>CONFIG_VIRTIO_RING=y
> >>CONFIG_VIRTIO_PCI=y
> >>CONFIG_VIRTIO_BALLOON=y
> >>CONFIG_VIRTIO_MMIO=y
> >>CONFIG_HAVE_MMIOTRACE_SUPPORT=y
> >>
> >>I'm running `lkvm run --network mode=user,trans=mmio', and it fails to
> >>create the eth0 device (`cat /proc/net/dev' doesn't show the device).
> >>With `lkvm run --network mode=user' everything just works.
> >>
> >>I have also tried kernels 3.0.99, 3.4.65 an 3.10.15, but they seem to
> >>fail the same way.
> >>
> >>Am I using it correctly?
> >
> >Asias, Sasha, is mmio transport supported by virtio networking?
>
> It should be. The ARM folks use it all the time (I suppose).
>
> Did you properly define the network device within the guest? MMIO
> doesn't have automatic detection like PCI does.
>
See these commits, we need a kernel parameter to tell guest the device address.
commit 7dc9579466c55f45648e8c06321c6a21cd19fe8b
Author: Asias He <asias.hejun@gmail.com>
Date: Sat Apr 7 19:51:21 2012 +0800
kvm tools: Introduce trans=mmio parameter for virtio-net
To select virtio-mmio instead of virito-pci transport:
lkvm run --network trans=mmio
Signed-off-by: Asias He <asias.hejun@gmail.com>
Signed-off-by: Pekka Enberg <penberg@kernel.org>
commit 5c301a39b05bd4c4693f2c9d854dc8ba6bbe821f
Author: Asias He <asias.hejun@gmail.com>
Date: Sat Apr 7 19:44:12 2012 +0800
kvm tools: Add virtio-mmio support
This patch is based on Sasha's 'kvm tools: Add support for virtio-mmio'
patch. ioeventfds support is added which was missing in the previous one.
VQ size/align is still not supported.
It adds support for the new virtio-mmio transport layer added in
3.2-rc1. The purpose of this new layer is to allow virtio to work on
systems which don't necessarily support PCI, such as embedded systems.
To apply the patch on top of the KVM tools tree, you must first pull
Linus' tree on top. Also, CONFIG_VIRTIO_MMIO=y should be set in the
guest kernel.
To easily test it it's recommended to apply Pawel Moll's patch named
'virtio-mmio: Devices parameter parsing' on top, and define the
virtio-mmio device using kernel command line.
LKVM will print a message to help user to figure out how to add kernel
command line to support virtio-mmio.
To instantiate guest virtio-mmio devices using kernel command line (or
module) parameter, e.g.
virtio_mmio.devices=0x200@0xd2000000:5,0x200@0xd2000200:6
>
> Thanks,
> Sasha
>
--
Asias
^ permalink raw reply [flat|nested] 4+ messages in thread