qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: Zhou Jie
Subject: Re: [Qemu-devel] [PATCH 11/12] vfio: register aer resume notification handler for aer resume
Date: Wed, 25 May 2016 22:06:17 +0800
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0

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 */
>> }
>>
>> Does QEMU have enough concurrency to do this?  Thanks,On 2016/5/25
In my test, it can not work.
vfio_aer_resume_notifier_handler is invoked after vfio_pci_reset.
It is useless to wait in vfio_pci_reset.

Sincerely,
Zhou Jie

14:23, Zhou Jie wrote:
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 code and find other way to
stall any access to the device.

I find that to stall any access to the device,
I need modify the following function.
1. vfio_region_read and vfio_region_write
   For stalling any access to the device bar region.
2. vfio_vga_read and vfio_vga_write
   For stalling any access to the vga device region.
3. vfio_pci_read_config and vfio_pci_write_config
   For stalling any access to the device config space.

What will happen if I don't stall any access to the device?

Sincerely,
Zhou Jie







reply via email to

[Prev in Thread] Current Thread [Next in Thread]