qemu-devel
[Top][All Lists]
Advanced

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

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


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

Hi Alex,

I will use workable state support flag
to let user know whether the kenerl support block feature.
And make configure space writing and ioctl function blocked.

And what of my suggestion that a user may desire to poll the state of
the device?
I will also add a poll function to vfio_fops.

Can you explain how this will work?  I was only suggesting that one of
the flag bits in vfio_device_info be allocated to report the current
state of blocking and the user could poll by repeatedly calling the
DEVICE_INFO ioctl.  Are you thinking of using POLLOUT/POLLIN?  I'm not
sure if those are a perfect match since it's really only the PCI config
region and a few ioctls where access is blocked, other operations may
proceed normally.
Sorry, I had misunderstood your meaning.
I will use one of the flag bits in vfio_device_info to
 report the current state of blocking.

The following code will be modified.
1. vfio_pci_ioctl
    add a flag in vfio_device_info for workable_state support
2. vfio_pci_ioctl
    During err occurs and resume:
    if (cmd == VFIO_DEVICE_SET_IRQS || VFIO_DEVICE_RESET
    || VFIO_DEVICE_GET_PCI_HOT_RESET_INFO || VFIO_DEVICE_PCI_HOT_RESET)
    block for workable_state clearing
3. vfio_pci_write
    During err occurs and resume:
    block write to configure space
4. vfio_pci_aer_err_detected
    Set workable_state to false in "struct vfio_pci_device"
    teardown the interrupt
5. vfio_pci_aer_resume
    Set workable_state to true in "struct vfio_pci_device"
6. vfio_fops
    Add poll function

I would still suggest that the name "workable_state" is quite vague.
Something like aer_error_in_progress is much more specific.  Thanks,
OK, I will alter the name.

Sincerely
Zhou Jie






reply via email to

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