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

Re: report on debian-9.0-sparc64-NETINST-1.iso with qemu [SOLVED]



Can someone sitting in front of their computer please put that information up on the Debian Wiki in the sparc64 section. I'd appreciate that a lot :).

Adrian
(currently on mobile)

> On Jan 27, 2017, at 7:52 PM, Bruno Haible <bruno@clisp.org> wrote:
> 
> Artyom Tarasenko wrote on 27.01.2017:
>>> On Thu, Jan 26, 2017 at 10:16 PM, Bruno Haible <bruno@clisp.org> wrote:
>>> Mark Cave-Ayland wrote:
>>>>>> The hardware emulated by QEMU on this platform is
>>>>>>  hub 0
>>>>>>   \ hub0port1: user.0: index=0,type=user,net=10.0.2.0,restrict=off
>>>>>>   \ hub0port0: ne2k_pci.0: index=0,type=nic,model=ne2k_pci,macaddr=52:54:00:12:34:56
>>>>>> Does anyone happen to know?
>>>>> 
>>>>> You should ask Mark Cave-Ayland or Artyom Tarasenko who are the maintainers for
>>>>> the SPARC target in qemu.
>>>> 
>>>> I can confirm that virtio does work in QEMU, but only in legacy (0.9)
>>>> mode - for some reason if 1.0 mode is used then we seem to hang because
>>>> we're missing an interrupt. I've managed to recreate this locally but
>>>> not had the time to dig into the details yet - any help always
>>>> appreciated :)
>>>> 
>>>> The command line you need for virtio on QEMU looks something like this:
>>>> 
>>>> ./qemu-system-sparc64 -drive
>>>> file=debian-9.0-sparc64-NETINST-1.iso,if=none,index=0,id=cd,media=cdrom
>>>> -device virtio-blk-pci,disable-modern=on,drive=cd -nographic
>>> 
>>> Thanks for the attempt to help. But I don't have a need for virtio for
>>> the disk or cdrom - the default works perfectly fine there. The problem I
>>> have is with the network card: the default doesn't work, and virtio
>>> (as recommended by Artyom) crashes qemu.
>> 
>> To be more specific, it's not crashing qemu. It just brings the
>> emulated system in a condition in which it won't function (trap after
>> the maximal trap level is reached). So it's not necessarily a qemu
>> bug. Can be a virtio/kernel bug as well.
>> 
>> But there is a point in Marks reply: maybe nowadays virtio-net also
>> has to be switched into the legacy mode.
>> Instead of "-net nic,model=virtio -net user" can you please try:
>> 
>> -netdev user,id=hostnet0  -device
>> virtio-net-pci,disable-modern=off,disable-legacy=off,disable-modern=on,netdev=hostnet0
> 
> Yeah! This works! The machine now can connect to the internet.
> The ifconfig output now is:
> 
> # /target/sbin/ifconfig
> enp0s5: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
>        inet 10.0.2.15  netmask 255.255.255.0  broadcast 0.0.0.0
>        inet6 fec0::5054:ff:fe12:3456  prefixlen 64  scopeid 0x40<site>
>        inet6 fe80::5054:ff:fe12:3456  prefixlen 64  scopeid 0x20<link>
>        ether 52:54:00:12:34:56  txqueuelen 1000  (Ethernet)
>        RX packets 291  bytes 263098 (256.9 KiB)
>        RX errors 0  dropped 0  overruns 0  frame 0
>        TX packets 174  bytes 15608 (15.2 KiB)
>        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
> 
> lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
>        inet 127.0.0.1  netmask 255.0.0.0
>        inet6 ::1  prefixlen 128  scopeid 0x10<host>
>        loop  txqueuelen 1  (Local Loopback)
>        RX packets 0  bytes 0 (0.0 B)
>        RX errors 0  dropped 0  overruns 0  frame 0
>        TX packets 0  bytes 0 (0.0 B)
>        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
> 
> # lsmod | grep virt
> virtio_net             24168  0
> virtio_pci             14583  0
> virtio_ring            12099  2 virtio_net,virtio_pci
> virtio                  6188  2 virtio_net,virtio_pci
> 
> (qemu) info network
> virtio-net-pci.0: index=0,type=nic,model=virtio-net-pci,macaddr=52:54:00:12:34:56
> \ hostnet0: index=0,type=user,net=10.0.2.0,restrict=off
> 
> Thanks a lot!
> 
> Bruno


Reply to: