public inbox for kvmarm@lists.cs.columbia.edu
 help / color / mirror / Atom feed
From: Marc Zyngier <marc.zyngier@arm.com>
To: wanghaibin <wanghaibin.wang@huawei.com>,
	cdall@linaro.org, kvmarm@lists.cs.columbia.edu,
	wu.wubin@huawei.com, zhaoshenglong@huawei.com,
	Robin Murphy <Robin.Murphy@arm.com>
Subject: Re: [report] boot a vm that with PCI only hierarchy devices and with GICv3 , it's failed.
Date: Tue, 18 Jul 2017 10:15:56 +0100	[thread overview]
Message-ID: <dd59da6d-b775-4b2b-385c-ff8a909399d8@arm.com> (raw)
In-Reply-To: <596D8969.8060107@huawei.com>

On 18/07/17 05:07, wanghaibin wrote:
> Hi, all:
> 
> I met a problem, I just try to test PCI only hierarchy devices model (qemu/docs/pcie.txt  sections 2.3)
> 
> Here is part of qemu cmd:
> -device i82801b11-bridge,id=pci.1,bus=pcie.0,addr=0x1 -device pci-bridge,chassis_nr=2,id=pci.2,bus=pci.1,addr=0x0 -device usb-ehci,id=usb,bus=pci.2,addr=0x2
> -device virtio-scsi-pci,id=scsi0,bus=pci.2,addr=0x3 -netdev tap,fd=27,id=hostnet0,vhost=on,vhostfd=28 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:60:6b:1d,bus=pci.2,addr=0x1
> -vnc 0.0.0.0:0 -device virtio-gpu-pci,id=video0,bus=pci.2,addr=0x4
> 
> A single DMI-PCI Bridge, a single PCI-PCI Bridge attached to it.  Four PCI_DEV legacy devices (usb, virtio-scsi-pci, virtio-gpu-pci, virtio-net-pci)attached to the PCI-PCI Bridge.
> Boot the vm, it's failed.
> 
> I try to debug this problem, and the info just as follow:
> (1) Since Eric Auger commit (0d44cdb631ef53ea75be056886cf0541311e48df: KVM: arm64: vgic-its: Interpret MAPD Size field and check related errors), This problem has been exposed.
>     Of course, I think this commit must be correct surely.
> 
> (2) For guestOS, I notice Marc commit (e8137f4f5088d763ced1db82d3974336b76e1bd2: irqchip: gicv3-its: Iterate over PCI aliases to generate ITS configuration).  This commit brings in that the
>     four PCI_DEV legacy devices shared the same devID, same its_dev, same ITT tables, but I think here calculate with wrong total msi vector count.
>     (Currently, It seems the total count is the vector count of virtio-net-pci + PCI-PCI bridge + dmi-pci bridge, maybe here should be the total count of the four PCI_DEV legacy devices vector count),
>     So that, any pci device using the over bounds eventID and mapti at a certain moment , the abnormal behavior will captured by Eric's commit.
> 
> Actually, I don't understand very well about non-transparent bridge, PCI aliases. So just supply these message.

+Robin, who is the author of that patch.

Regarding (2), the number of MSIs should be the total number of devices
that are going to generate the same DevID. Since the bridge is
non-transparent, everything behind it aliases with it. So you should
probably see all the virtio devices and the bridges themselves being
counted. If that's not the case, then "we have a bug"(tm).

Can you please post your full qemu cmd line so that we can reproduce it
and investigate the issue?

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

  reply	other threads:[~2017-07-18  9:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-18  4:07 [report] boot a vm that with PCI only hierarchy devices and with GICv3 , it's failed wanghaibin
2017-07-18  9:15 ` Marc Zyngier [this message]
2017-07-18 10:02   ` Robin Murphy
2017-07-18 11:07     ` wanghaibin
2017-07-18 11:22       ` Robin Murphy
2017-07-18 11:49         ` wanghaibin

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=dd59da6d-b775-4b2b-385c-ff8a909399d8@arm.com \
    --to=marc.zyngier@arm.com \
    --cc=Robin.Murphy@arm.com \
    --cc=cdall@linaro.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=wanghaibin.wang@huawei.com \
    --cc=wu.wubin@huawei.com \
    --cc=zhaoshenglong@huawei.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox