openbmc.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* ast2600-evb qemu and usb-net
@ 2021-08-09  4:55 Deepak Kodihalli
  2021-08-10  2:31 ` Joel Stanley
  0 siblings, 1 reply; 3+ messages in thread
From: Deepak Kodihalli @ 2021-08-09  4:55 UTC (permalink / raw)
  To: OpenBMC Maillist, andrew, joel

Hi All,

I am trying to launch the ast2600-evb machine on QEMU by passing a a
usb-net device:
qemu-system-arm -machine ast2600-evb  -drive file=<bmc
image>,if=mtd,bus=0,unit=0,snapshot=on -nographic  -nic
user,hostname=qemu -device usb-net,netdev=net0 -netdev
socket,id=net0,listen=:1234

I downloaded the QEMU binary from
https://github.com/openbmc/docs/blob/master/development/dev-environment.md#download-and-start-qemu-session.
The intent is to have two such QEMU instances talking over emulated
usb-net (the other instance would do a connect on the netdev socket).
I get the following error when I run the command above:
qemu-system-arm: -device usb-net,netdev=net0: Warning: speed mismatch
trying to attach usb device "QEMU USB Network Interface" (full speed)
to bus "usb-bus.1", port "1" (high speed)

I'm guessing this is the lack of usb support/initialization in
hw/arm/aspeed* in the QEMU tree. Has anyone else tried this with
ast2600-evb?

Thanks,
Deepak

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ast2600-evb qemu and usb-net
  2021-08-09  4:55 ast2600-evb qemu and usb-net Deepak Kodihalli
@ 2021-08-10  2:31 ` Joel Stanley
  2021-08-10  8:44   ` Cédric Le Goater
  0 siblings, 1 reply; 3+ messages in thread
From: Joel Stanley @ 2021-08-10  2:31 UTC (permalink / raw)
  To: Deepak Kodihalli, Cédric Le Goater; +Cc: Andrew Jeffery, OpenBMC Maillist

On Mon, 9 Aug 2021 at 04:56, Deepak Kodihalli
<deepak.kodihalli.83@gmail.com> wrote:
>
> Hi All,
>
> I am trying to launch the ast2600-evb machine on QEMU by passing a a
> usb-net device:
> qemu-system-arm -machine ast2600-evb  -drive file=<bmc
> image>,if=mtd,bus=0,unit=0,snapshot=on -nographic  -nic
> user,hostname=qemu -device usb-net,netdev=net0 -netdev
> socket,id=net0,listen=:1234
>
> I downloaded the QEMU binary from
> https://github.com/openbmc/docs/blob/master/development/dev-environment.md#download-and-start-qemu-session.

This is unrelated to your question, but that qemu is built from an
outdated branch. I would recommend using mainline qemu instead.

We also have a qemu tree that Cedric maintains at
https://github.com/legoater/qemu. The aspeed-6.1 (and soon aspeed-6.2)
have changes that we have not yet merged to mainline.

> I get the following error when I run the command above:
> qemu-system-arm: -device usb-net,netdev=net0: Warning: speed mismatch
> trying to attach usb device "QEMU USB Network Interface" (full speed)
> to bus "usb-bus.1", port "1" (high speed)

As the error message says, you're attempting to attach a full speed
(USB 1.1) device to a high speed (USB 2.0) bus.

This is where I get a bit confused by USB. I thought that the
controller supported both full and high speed (that's what the data
sheet says).

The chip also has a USB 1.1 controller (UCHI) hasn't been enabled for
the ast2600. There's also no qemu model hooked up.

> The intent is to have two such QEMU instances talking over emulated
> usb-net (the other instance would do a connect on the netdev socket).

If you're hooking up two instances over network, is there any reason
you can't use the existing network devices? It would allow you to test
your userspace without requiring extra modelling.

>
> I'm guessing this is the lack of usb support/initialization in
> hw/arm/aspeed* in the QEMU tree. Has anyone else tried this with
> ast2600-evb?
>
> Thanks,
> Deepak

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: ast2600-evb qemu and usb-net
  2021-08-10  2:31 ` Joel Stanley
@ 2021-08-10  8:44   ` Cédric Le Goater
  0 siblings, 0 replies; 3+ messages in thread
From: Cédric Le Goater @ 2021-08-10  8:44 UTC (permalink / raw)
  To: Joel Stanley, Deepak Kodihalli; +Cc: Andrew Jeffery, OpenBMC Maillist

On 8/10/21 4:31 AM, Joel Stanley wrote:
> On Mon, 9 Aug 2021 at 04:56, Deepak Kodihalli
> <deepak.kodihalli.83@gmail.com> wrote:
>>
>> Hi All,
>>
>> I am trying to launch the ast2600-evb machine on QEMU by passing a a
>> usb-net device:
>> qemu-system-arm -machine ast2600-evb  -drive file=<bmc
>> image>,if=mtd,bus=0,unit=0,snapshot=on -nographic  -nic
>> user,hostname=qemu -device usb-net,netdev=net0 -netdev
>> socket,id=net0,listen=:1234
>>
>> I downloaded the QEMU binary from
>> https://github.com/openbmc/docs/blob/master/development/dev-environment.md#download-and-start-qemu-session.
> 
> This is unrelated to your question, but that qemu is built from an
> outdated branch. I would recommend using mainline qemu instead.
> 
> We also have a qemu tree that Cedric maintains at
> https://github.com/legoater/qemu. The aspeed-6.1 (and soon aspeed-6.2)
> have changes that we have not yet merged to mainline.
> 
>> I get the following error when I run the command above:
>> qemu-system-arm: -device usb-net,netdev=net0: Warning: speed mismatch
>> trying to attach usb device "QEMU USB Network Interface" (full speed)
>> to bus "usb-bus.1", port "1" (high speed)
> 
> As the error message says, you're attempting to attach a full speed
> (USB 1.1) device to a high speed (USB 2.0) bus.
> 
> This is where I get a bit confused by USB. I thought that the
> controller supported both full and high speed (that's what the data
> sheet says).
>> The chip also has a USB 1.1 controller (UCHI) hasn't been enabled for
> the ast2600. There's also no qemu model hooked up.

It shouldn't be too complex to add. We might need a SysBus version of
the UHCI model.

>> The intent is to have two such QEMU instances talking over emulated
>> usb-net (the other instance would do a connect on the netdev socket).

I would setup a libvirt bridge on the host and run with : 

 qemu-system-arm -M ast2600-evb \
    -net nic,macaddr=<mac>,netdev=net0 \
    -netdev bridge,id=net0,helper=/usr/libexec/qemu-bridge-helper,br=virbr0  \
    -drive file=<file>,format=raw,if=mtd \
    -serial mon:stdio 

It's also perfectly possible to run a pool of Aspeed machines as VMs 
under libvirt.

C.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-08-10 12:24 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-09  4:55 ast2600-evb qemu and usb-net Deepak Kodihalli
2021-08-10  2:31 ` Joel Stanley
2021-08-10  8:44   ` Cédric Le Goater

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).