mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-07-04 11:07:51 +00:00
dm: virtio: fix a asyncio/ioeventfd bug
ACRN_IOEVENTFD_FLAG_ASYNCIO is not set when unregister ioeventfd in the current implementation which will cause the old asyncio_desc will be remained in hypervisor link list when switching from OVMF to kernel. Tracked-On: #8612 Signed-off-by: Jian Jun Chen <jian.jun.chen@intel.com> Acked-by: Wang, Yu1 <yu1.wang@intel.com>
This commit is contained in:
parent
91e0612e88
commit
26aece0492
@ -1988,12 +1988,12 @@ int virtio_register_ioeventfd(struct virtio_base *base, int idx, bool is_registe
|
|||||||
int rc = 0;
|
int rc = 0;
|
||||||
|
|
||||||
if (!is_register)
|
if (!is_register)
|
||||||
ioeventfd.flags = ACRN_IOEVENTFD_FLAG_DEASSIGN;
|
ioeventfd.flags |= ACRN_IOEVENTFD_FLAG_DEASSIGN;
|
||||||
else if (base->iothread)
|
if (base->iothread)
|
||||||
/* Enable ASYNCIO by default. If ASYNCIO is not supported by kernel
|
/* Enable ASYNCIO by default. If ASYNCIO is not supported by kernel
|
||||||
* or hyperviosr, this flag will be ignored.
|
* or hyperviosr, this flag will be ignored.
|
||||||
*/
|
*/
|
||||||
ioeventfd.flags = ACRN_IOEVENTFD_FLAG_ASYNCIO;
|
ioeventfd.flags |= ACRN_IOEVENTFD_FLAG_ASYNCIO;
|
||||||
/* register ioeventfd for kick */
|
/* register ioeventfd for kick */
|
||||||
if (base->device_caps & (1UL << VIRTIO_F_VERSION_1)) {
|
if (base->device_caps & (1UL << VIRTIO_F_VERSION_1)) {
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user