From: Cao jin <caoj.fnst@cn.fujitsu.com>
To: Alex Williamson <alex.williamson@redhat.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] vfio: fix duplicate function call
Date: Mon, 17 Oct 2016 14:44:59 +0800 [thread overview]
Message-ID: <5804736B.90307@cn.fujitsu.com> (raw)
In-Reply-To: <20161014095030.1c7c93c7@t450s.home>
On 10/14/2016 11:50 PM, Alex Williamson wrote:
> On Fri, 14 Oct 2016 19:16:59 +0800
> Cao jin <caoj.fnst@cn.fujitsu.com> wrote:
>
>> When vfio device is reset(encounter FLR, or bus reset), if need to do
>> bus reset(vfio_pci_hot_reset_one is called), vfio_pci_pre_reset &
>> vfio_pci_post_reset will be called twice.
>>
>> Signed-off-by: Cao jin <caoj.fnst@cn.fujitsu.com>
>> ---
>> Also has a little question on vfio_pci_reset. it will be called when encounter
>> bus reset, or FLR. The reset method's priority in this function now is:
>>
>> 1. If has "device specific reset function", then do it
>> 2. If has FLR, then do it.
>> 3. If it can do bus reset(only 1 affected device), then do it
>> 4. If has pm_reset, then do it
>>
>> The question is: why pm reset has low priority than bus reset(if it does
>> can do a bus reset)? why bus reset is not the last choice? In PCI driver
>> of kernel, pls see __pci_dev_reset, we can see, if device support pm reset,
>> it won't do bus reset.
>
> The PCI spec doesn't really define what sort of reset is done with a PM
> reset. My thinking was that if a device advertises an FLR capability
> then the hardware has made a concerted effort to have a per function
> reset mechanism available. NoSoftRst- is not terribly common and it's
> not entirely clear to me that the hardware has made a conscious effort
> to provide this for the purposes of per function reset mechanism.
> Therefore I've opt'd to prioritize a bus reset over a PM reset.
>
I see, thanks for your infomation.
--
Yours Sincerely,
Cao jin
next prev parent reply other threads:[~2016-10-17 6:43 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-14 11:16 [Qemu-devel] [PATCH] vfio: fix duplicate function call Cao jin
2016-10-14 15:50 ` Alex Williamson
2016-10-17 6:44 ` Cao jin [this message]
2016-10-17 8:57 ` Cao jin
2016-10-17 15:01 ` Alex Williamson
2016-10-18 2:39 ` Cao jin
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=5804736B.90307@cn.fujitsu.com \
--to=caoj.fnst@cn.fujitsu.com \
--cc=alex.williamson@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.