All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
To: Dmitry Antipov <dmantipov@yandex.ru>,
	Stefan Hajnoczi <stefanha@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Redundant VDE network
Date: Tue, 09 Dec 2014 09:31:11 +0000	[thread overview]
Message-ID: <5486C15F.3000101@ilande.co.uk> (raw)
In-Reply-To: <548696D3.90003@yandex.ru>

On 09/12/14 06:29, Dmitry Antipov wrote:

> On 12/08/2014 08:53 PM, Stefan Hajnoczi wrote:
> 
>> Try:
>>
>> qemu-system-sparc -m 256 \
>>      -netdev vde,sock=/tmp/vde0,id=vde0 \
>>      -device ne2k_pci,netdev=vde0 \
>>      -netdev vde,sock=/tmp/vde1,id=vde1 \
>>      -device ne2k_pci,netdev=vde1 \
>>      -hda vm0.img
> 
> This works just fine for qemu-system-x86, but not for SPARC with lance NIC:
> 
> qemu-system-sparc -m 256 \
>       -netdev vde,sock=/tmp/vde0,id=vde0 -device lance,netdev=vde0 \
>       -netdev vde,sock=/tmp/vde1,id=vde1 -device lance,netdev=vde1 \
>       -hda vm0.img
> 
> qemu-system-sparc: -device lance,netdev=vde0: Parameter 'driver' expects
> pluggable device type
> 
> It looks like PCI/sysbus emulation is incomplete/broken on SPARC.
> Assuming that x86 is OK, what SPARC-specific stuff should I check?

It's not that the emulation is broken (it's actually working as
expected), it's due to the way in which the BIOS probes sbus devices.

On real hardware, the device tree is generated by running bytecode
within the ROM contained upon each card by probing a known offset within
each slot, which is exactly how the cg3 and tcx cards are detected upon
boot.

However the since the lance device is on-board, it is hard-coded at a
fixed address in both Sun's OBP and OpenBIOS rather than being probed
via execution of an external ROM.

It should be a fairly trivial exercise to tweak QEMU and OpenBIOS to add
a second lance instance at a spare sbus slot address, but as you can see
it would require some extra smarts to dynamically patch a compiled ROM
within QEMU to insert the relevant properties from the device tree when
trying to add another network card via -device.


ATB,

Mark.

  reply	other threads:[~2014-12-09  9:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-08 15:00 [Qemu-devel] Redundant VDE network Dmitry Antipov
2014-12-08 17:53 ` Stefan Hajnoczi
2014-12-08 18:05   ` Dmitry Antipov
2014-12-09  6:29   ` Dmitry Antipov
2014-12-09  9:31     ` Mark Cave-Ayland [this message]
2014-12-09  9:37     ` Stefan Hajnoczi
2014-12-09 12:56       ` Dmitry Antipov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5486C15F.3000101@ilande.co.uk \
    --to=mark.cave-ayland@ilande.co.uk \
    --cc=dmantipov@yandex.ru \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.