Re: [Qemu-devel] [PATCH 11/12] vfio: register aer resume notification handler for aer resume

2016-05-25 Thread Zhou Jie
Hi, Alex >> Do we even need a timer? What if we simply spin? >> >> for (i = 0; i < 1000; i++) { >> if (vdev->pci_aer_resume_signaled) { >> break; >> } >> g_usleep(1000); >> } >> >> if (i == 1000) { >> /* We failed */ >> } else { >> /* Proceed with reset */ >> } >> >>

Re: [Qemu-devel] [PATCH 11/12] vfio: register aer resume notification handler for aer resume

2016-05-24 Thread Zhou Jie
Hi, Alex 3. Stall any access to the device until resume is signaled. The code below doesn't actually do this, mmaps are disabled, but that just means any device access will use the slow path through QEMU. That path is still fully enabled and so is config space access. I will modify the cod

Re: [Qemu-devel] [PATCH 11/12] vfio: register aer resume notification handler for aer resume

2016-05-18 Thread Zhou Jie
On 2016/5/19 10:18, Alex Williamson wrote: On Thu, 19 May 2016 09:49:00 +0800 Zhou Jie wrote: On 2016/5/19 2:26, Alex Williamson wrote: On Wed, 18 May 2016 11:31:09 +0800 Zhou Jie wrote: From: Chen Fan For supporting aer recovery, host and guest would run the same aer recovery code, th

Re: [Qemu-devel] [PATCH 11/12] vfio: register aer resume notification handler for aer resume

2016-05-18 Thread Zhou Jie
On 2016/5/19 10:18, Alex Williamson wrote: On Thu, 19 May 2016 09:49:00 +0800 Zhou Jie wrote: On 2016/5/19 2:26, Alex Williamson wrote: On Wed, 18 May 2016 11:31:09 +0800 Zhou Jie wrote: From: Chen Fan For supporting aer recovery, host and guest would run the same aer recovery code, th

Re: [Qemu-devel] [PATCH 11/12] vfio: register aer resume notification handler for aer resume

2016-05-18 Thread Alex Williamson
On Thu, 19 May 2016 09:49:00 +0800 Zhou Jie wrote: > On 2016/5/19 2:26, Alex Williamson wrote: > > On Wed, 18 May 2016 11:31:09 +0800 > > Zhou Jie wrote: > > > >> From: Chen Fan > >> > >> For supporting aer recovery, host and guest would run the same aer > >> recovery code, that would do the

Re: [Qemu-devel] [PATCH 11/12] vfio: register aer resume notification handler for aer resume

2016-05-18 Thread Zhou Jie
On 2016/5/19 2:26, Alex Williamson wrote: On Wed, 18 May 2016 11:31:09 +0800 Zhou Jie wrote: From: Chen Fan For supporting aer recovery, host and guest would run the same aer recovery code, that would do the secondary bus reset if the error is fatal, the aer recovery process: 1. error_de

Re: [Qemu-devel] [PATCH 11/12] vfio: register aer resume notification handler for aer resume

2016-05-18 Thread Alex Williamson
On Wed, 18 May 2016 11:31:09 +0800 Zhou Jie wrote: > From: Chen Fan > > For supporting aer recovery, host and guest would run the same aer > recovery code, that would do the secondary bus reset if the error > is fatal, the aer recovery process: > 1. error_detected > 2. reset_link (if fatal)

[Qemu-devel] [PATCH 11/12] vfio: register aer resume notification handler for aer resume

2016-05-17 Thread Zhou Jie
From: Chen Fan For supporting aer recovery, host and guest would run the same aer recovery code, that would do the secondary bus reset if the error is fatal, the aer recovery process: 1. error_detected 2. reset_link (if fatal) 3. slot_reset/mmio_enabled 4. resume It indicates that host w