[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fa208013-7bf8-80fc-2732-814f380cebf9@amd.com>
Date: Mon, 4 Dec 2023 08:48:00 -0800
From: Lizhi Hou <lizhi.hou@....com>
To: Bjorn Helgaas <helgaas@...nel.org>, Rob Herring <robh@...nel.org>
CC: Herve Codina <herve.codina@...tlin.com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>,
"Bjorn Helgaas" <bhelgaas@...gle.com>, Max Zhen <max.zhen@....com>,
Sonal Santan <sonal.santan@....com>,
Stefano Stabellini <stefano.stabellini@...inx.com>,
Jonathan Cameron <Jonathan.Cameron@...wei.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
PCI <linux-pci@...r.kernel.org>,
Allan Nielsen <allan.nielsen@...rochip.com>,
Horatiu Vultur <horatiu.vultur@...rochip.com>,
Steen Hegelund <steen.hegelund@...rochip.com>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>
Subject: Re: [PATCH v2 0/2] Attach DT nodes to existing PCI devices
Here is the link I put in patch set cover letter
https://github.com/houlz0507/xoclv2/blob/pci-dt-0329/pci-dt-patch-0329/README
It has the steps I used to create and start qemu with pci bridges.
Hopefully this helps.
Lizhi
On 12/1/23 14:45, Bjorn Helgaas wrote:
> On Fri, Dec 01, 2023 at 04:26:45PM -0600, Rob Herring wrote:
>> On Thu, Nov 30, 2023 at 10:57 AM Herve Codina <herve.codina@...tlin.com> wrote:
>> ...
>> Also, no idea if the bridge part works because my qemu setup doesn't
>> create bridges (anyone got a magic cmdline to create them?).
> I probably copied this from somewhere and certainly couldn't construct
> it from scratch, but it did create a hierarchy like this:
>
> 00:04.0 bridge to [bus 01-04] (Root Port)
> 01:00.0 bridge to [bus 02-04] (Switch Upstream Port)
> 02:00.0 bridge to [bus 03] (Switch Downstream Port)
> 02:01.0 bridge to [bus 04] (Switch Downstream Port)
> 03:00.0 endpoint
> 04:00.0 endpoint
>
> IMAGE=ubuntu.img
> KERNEL=~/linux/arch/x86/boot/bzImage
> IMGDIR=~/virt/img/
>
> qemu-system-x86_64 -enable-kvm -s -m 2048 $IMAGE \
> -device pcie-root-port,id=root_port1,chassis=1,slot=1 \
> -device x3130-upstream,id=upstream_port1,bus=root_port1 \
> -device xio3130-downstream,id=downstream_port1,bus=upstream_port1,chassis=2,slot=1 \
> -device xio3130-downstream,id=downstream_port2,bus=upstream_port1,chassis=2,slot=2 \
> -drive file=${IMGDIR}/nvme.qcow2,if=none,id=nvme1,snapshot=on \
> -device nvme,drive=nvme1,serial=nvme1,cmb_size_mb=2048,bus=downstream_port1 \
> -drive file=${IMGDIR}/nvme2.qcow2,if=none,id=nvme2,snapshot=on \
> -device nvme,drive=nvme2,serial=nvme1,bus=downstream_port2 \
> -virtfs local,id=home,path=/home/,security_model=mapped,mount_tag=home \
> -nographic \
> -kernel $KERNEL \
> -append "root=/dev/sda2 rootfstype=ext4 console=ttyS0,38400n8"
Powered by blists - more mailing lists