xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Pasi Kärkkäinen" <pasik@iki.fi>
To: Chao Gao <chao.gao@intel.com>
Cc: xen-devel@lists.xenproject.org
Subject: Re: [Xen-devel] Reset pass-thru devices in a VM
Date: Tue, 27 Aug 2019 00:17:28 +0300	[thread overview]
Message-ID: <20190826211728.GF2840@reaktio.net> (raw)
In-Reply-To: <20190809083831.GA30839@gao-cwp>

Hi Chao,

On Fri, Aug 09, 2019 at 04:38:33PM +0800, Chao Gao wrote:
> Hi everyone,
> 
> I have a device which only supports secondary bus reset. After being
> assigned to a VM, it would be placed under host bridge. For devices
> under host bridge, secondary bus reset is not applicable. Thus, a VM
> has no way to reset this device.
> 
> This device's usage would be limited without PCI reset (for example, its
> driver cannot re-initialize the device properly without PCI reset, which
> means in VM device won't be usable after unloading the driver), it would
> be much better if there is a way available to VMs to reset the device.
> 
> In my mind, a straightfoward solution is to create a virtual bridge
> for a VM and place the pass-thru device under a virtual bridge. But it
> isn't supported in Xen (KVM/QEMU supports) and enabling it looks need
> a lot of efforts. Alternatively, emulating FLR (Function Level Reset)
> capability for this device might be a feasible way and only needs
> relatively few changes. I am planning to enable an opt-in feature
> (like 'permissive') to allow qemu to expose FLR capability to guest for
> pass-thru devices as long as this device is resetable on dom0 (i.e. the
> device has 'reset' attribute under its sysfs). And when guest initiates
> an FLR, qemu just echo 1 to the 'reset' attribute on dom0.
> 
> Do you think emulating FLR capability is doable?
> 

I wonder if these patches from another thread help with your reset issue:

https://lists.xen.org/archives/html/xen-devel/2019-08/msg02304.html


Thanks,

-- Pasi


> Thanks
> Chao
> 


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  parent reply	other threads:[~2019-08-26 21:17 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-09  8:38 [Xen-devel] Reset pass-thru devices in a VM Chao Gao
2019-08-09  8:49 ` Jan Beulich
2019-08-09 13:24   ` Chao Gao
2019-08-09 13:23     ` Jan Beulich
2019-08-09 14:13       ` Chao Gao
2019-08-09 12:42 ` Roger Pau Monné
2019-08-09 13:57   ` Chao Gao
2019-08-26 21:17 ` Pasi Kärkkäinen [this message]
2019-08-27  4:40   ` Chao Gao

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=20190826211728.GF2840@reaktio.net \
    --to=pasik@iki.fi \
    --cc=chao.gao@intel.com \
    --cc=xen-devel@lists.xenproject.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).