From: "Michael S. Tsirkin" <mst@redhat.com>
To: Cao jin <caoj.fnst@cn.fujitsu.com>
Cc: izumi.taku@jp.fujitsu.com, alex.williamson@redhat.com,
qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH v3 0/2] PCI-e device multi-function hot-add support
Date: Wed, 21 Oct 2015 12:11:22 +0300 [thread overview]
Message-ID: <20151021115514-mutt-send-email-mst@redhat.com> (raw)
In-Reply-To: <56274D91.7080406@cn.fujitsu.com>
On Wed, Oct 21, 2015 at 04:32:17PM +0800, Cao jin wrote:
> Hello Michael
>
> On 10/13/2015 09:10 PM, Michael S. Tsirkin wrote:
> >On Tue, Oct 13, 2015 at 07:54:07PM +0800, Cao jin wrote:
> >>
> >>
> >>On 10/13/2015 04:49 PM, Michael S. Tsirkin wrote:
> >>>On Tue, Oct 13, 2015 at 04:41:33PM +0800, Cao jin wrote:
> >>>>Support PCI-e device hot-add multi-function via device_add, just ensure
> >>>>add the function 0 is added last. While allow user to roll back in the
> >>>>middle via device_del, in case user regret.
> >>>
> >>>This patch doesn't seem to account of AIR though.
> >>>
> >>
> >>Yes, but the AIR function seems never be used(nobody calls the function
> >>pcie_ari_init()), so I am a little confused about should it be consindered?
> >
> >Yes please - we'll likely use that in the future. Pls add an API
> >that takes ari into account.
> >
> after analysed the code and read the spec, but still a little confused about
> "add an API that takes ari into account". what is new API for? Could you
> give a detailed description?
You are assuming PCI_FUNC == 0 means function 9. But the real
rule is: for an express device associated with an upstream port, it's
devfn == 0. For any other device (non express or not connected
to an upstream port) - PCI_FUNC == 0.
I think a reasonable API could be e.g.
bool pci_is_function_0()
with a comment explaining the issues.
> AFAICT now, taking ari into account will affect the "addr" property of PCI
> device(maybe also need a new prop of "ari=on" to enable ari).
>
> >>>>changelog:
> >>>>1. Flag device as unexposed when func 0 doesn`t exist, via return 0xFF
> >>>> in case of gratuitous pci bus scan.
> >>>>2. Since device is unexposed to guest, can remove function individually,
> >>>> without interaction with the guest.
> >>>>
> >>>>Cao jin (2):
> >>>> enable multi-function hot-add
> >>>> remove function during multi-function hot-add
> >>>>
> >>>> hw/pci/pci.c | 10 ++++++++++
> >>>> hw/pci/pci_host.c | 6 +++++-
> >>>> hw/pci/pcie.c | 38 +++++++++++++++++++++++++-------------
> >>>> 3 files changed, 40 insertions(+), 14 deletions(-)
> >>>>
> >>>>--
> >>>>2.1.0
> >>>.
> >>>
> >>
> >>--
> >>Yours Sincerely,
> >>
> >>Cao Jin
> >.
> >
>
> --
> Yours Sincerely,
>
> Cao Jin
next prev parent reply other threads:[~2015-10-21 9:11 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-13 8:41 [Qemu-devel] [PATCH v3 0/2] PCI-e device multi-function hot-add support Cao jin
2015-10-13 8:41 ` [Qemu-devel] [PATCH v3 1/2] enable multi-function hot-add Cao jin
2015-10-13 8:41 ` [Qemu-devel] [PATCH v3 2/2] remove function during " Cao jin
2015-10-13 8:48 ` [Qemu-devel] [PATCH RFC] hw/virtio: Add PCIe capability to virtio devices Michael S. Tsirkin
2015-10-13 12:19 ` Cao jin
2015-10-13 8:51 ` [Qemu-devel] [PATCH v3 2/2] remove function during multi-function hot-add Michael S. Tsirkin
2015-10-13 9:54 ` Cao jin
2015-10-13 10:21 ` Michael S. Tsirkin
2015-10-13 15:27 ` Alex Williamson
2015-10-14 5:46 ` Cao jin
2015-10-13 8:49 ` [Qemu-devel] [PATCH v3 0/2] PCI-e device multi-function hot-add support Michael S. Tsirkin
2015-10-13 11:54 ` Cao jin
2015-10-13 13:10 ` Michael S. Tsirkin
2015-10-14 5:48 ` Cao jin
2015-10-21 8:32 ` Cao jin
2015-10-21 9:11 ` Michael S. Tsirkin [this message]
2015-10-13 8:50 ` Michael S. Tsirkin
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=20151021115514-mutt-send-email-mst@redhat.com \
--to=mst@redhat.com \
--cc=alex.williamson@redhat.com \
--cc=caoj.fnst@cn.fujitsu.com \
--cc=izumi.taku@jp.fujitsu.com \
--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).