mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-24 06:29:19 +00:00
dm/VBS-U: increase generation when configuration changed
Virtio 1.0 introdues a generation number for the device-specific configuration. It should be increased every time the configuration noticeably changes. Signed-off-by: Jian Jun Chen <jian.jun.chen@intel.com> Reviewed-by: Hao Li <hao.l.li@intel.com> Reviewed-by: Zhao Yakui <yakui.zhao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
parent
0398498846
commit
86f394851b
@ -674,6 +674,10 @@ vq_interrupt(struct virtio_base *vb, struct virtio_vq_info *vq)
|
|||||||
static inline void
|
static inline void
|
||||||
virtio_config_changed(struct virtio_base *vb)
|
virtio_config_changed(struct virtio_base *vb)
|
||||||
{
|
{
|
||||||
|
if (!(vb->status & VIRTIO_CR_STATUS_DRIVER_OK))
|
||||||
|
return;
|
||||||
|
|
||||||
|
vb->config_generation++;
|
||||||
|
|
||||||
if (pci_msix_enabled(vb->dev))
|
if (pci_msix_enabled(vb->dev))
|
||||||
pci_generate_msix(vb->dev, vb->msix_cfg_idx);
|
pci_generate_msix(vb->dev, vb->msix_cfg_idx);
|
||||||
|
Loading…
Reference in New Issue
Block a user