qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Arthur Tumanyan <arthurtumanyan@gmail.com>, qemu-devel@nongnu.org
Cc: qemu-arm <qemu-arm@nongnu.org>,
	Peter Maydell <peter.maydell@linaro.org>,
	 Andrey Smirnov <andrew.smirnov@gmail.com>
Subject: Re: How to use designware-root-port and designware-root-host devices ?
Date: Thu, 20 Jun 2024 19:34:00 +0200	[thread overview]
Message-ID: <6b1daa9c-6f37-4edb-86d4-782941f1bcca@redhat.com> (raw)
In-Reply-To: <CADueUgQh-=vmoO9kqL589Xeuf_LOM_K2Rr-rBxwe8iArdNdzsA@mail.gmail.com>

On 20/06/2024 10.28, Arthur Tumanyan wrote:
> Hi all,
> 
> My question may sound stupid, however...

  Hi Arthur,

no worries, the question how to use which device in QEMU can be quite tricky ;-)

> Currently I'm trying to make 
> available designware-root-{port,host} devices  in linux when I run it in qemu.
> 
> I try the following way to run:
> 
> qemu-system-arm -M virt -m 2G \
>       -kernel images/Image \
>       -append "rootwait root=/dev/vda ro" \
>       -drive file=images/rootfs.ext2,format=raw,id=hd0 \
>       -device designware-root-port,id=rp0,chassis=1,slot=0,bus=pcie.0,addr=1 \
>       -device e1000,netdev=net0,mac=52:54:00:12:34:56,bus=rp0,addr=0 \
>       -netdev user,id=net0
> 
> but it seems designware device is not enabled by default: qemu-system-arm: 
> -device designware-root-port,id=rp0,chassis=1,slot=0,bus=pcie.0,addr=1: 
> 'designware-root-port' is not a valid device model name

Are you sure about the names?

$ grep -r 'designware' *
...
include/hw/pci-host/designware.h:#define TYPE_DESIGNWARE_PCIE_HOST 
"designware-pcie-host"
include/hw/pci-host/designware.h:#define TYPE_DESIGNWARE_PCIE_ROOT 
"designware-pcie-root"

> when I enable it from Kconfig/meson.build it says the device is already 
> registered and exits with abort().
> 
>  From the other hand the device is declared as non pluggable: 
> dc->user_creatable = false;

Well, that means that you cannot use those with "-device". They can only be 
instantiated via the code that creates the machine.

> Can you please help me to use designware-root-host/port devices ?

It seems like the i.MX7 SABRE machine is using this device, so instead of 
"-M virt", you could have a try with "-M mcimx7d-sabre" (and a kernel that 
supports this machine) instead.

  HTH,
   Thomas



  reply	other threads:[~2024-06-20 17:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-20  8:28 How to use designware-root-port and designware-root-host devices ? Arthur Tumanyan
2024-06-20 17:34 ` Thomas Huth [this message]
2024-06-20 19:05   ` Peter Maydell
2024-06-20 19:37     ` Arthur Tumanyan
2024-06-21  7:07       ` Arthur Tumanyan
2024-06-21  9:16         ` Peter Maydell
2024-06-21  9:30           ` Thomas Huth
2024-06-25  7:52             ` Arthur Tumanyan

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=6b1daa9c-6f37-4edb-86d4-782941f1bcca@redhat.com \
    --to=thuth@redhat.com \
    --cc=andrew.smirnov@gmail.com \
    --cc=arthurtumanyan@gmail.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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 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).