dm: add a new page for asyncio

asyncio is a new mechanism in ACRN, which is special for these devices
which need high IO performance. ACRN hypervisor would process the IO
request from User VM in an async mode.

Just like the original IOReq shared page, the devicemodel also create a
page for fastio requests. As the asyncio use the ioeventfd, so the
reuqests are handled in kernel, devicemodel only need to provide the
page.

Tracked-On: #8209
Signed-off-by: Conghui <conghui.chen@intel.com>
Acked-by: Wang, Yu1 <yu1.wang@intel.com>
This commit is contained in:
Conghui
2022-08-17 09:16:52 +08:00
committed by acrnsi-robot
parent 17f94605f0
commit 0f599e8d56
4 changed files with 56 additions and 0 deletions

View File

@@ -107,6 +107,8 @@
_IOW(ACRN_IOCTL_TYPE, 0x41, struct acrn_vm_memmap)
#define ACRN_IOCTL_UNSET_MEMSEG \
_IOW(ACRN_IOCTL_TYPE, 0x42, struct acrn_vm_memmap)
#define ACRN_IOCTL_SETUP_SBUF \
_IOW(ACRN_IOCTL_TYPE, 0x43, struct acrn_sbuf)
/* PCI assignment*/
#define ACRN_IOCTL_SET_PTDEV_INTR \
@@ -246,4 +248,14 @@ struct acrn_irqfd {
/** MSI interrupt to be injected */
struct acrn_msi_entry msi;
};
/**
* @brief data structure to register a share buffer by ioctl
*/
struct acrn_sbuf {
/** Type of the sbuf. */
uint32_t sbuf_id;
/** Base address of the sbuf. */
uint64_t base;
};
#endif /* VHM_IOCTL_DEFS_H */

View File

@@ -107,6 +107,7 @@ int vm_create_ioreq_client(struct vmctx *ctx);
int vm_destroy_ioreq_client(struct vmctx *ctx);
int vm_attach_ioreq_client(struct vmctx *ctx);
int vm_notify_request_done(struct vmctx *ctx, int vcpu);
int vm_setup_sbuf(struct vmctx *ctx, uint32_t sbuf_type, uint64_t base);
void vm_clear_ioreq(struct vmctx *ctx);
const char *vm_state_to_str(enum vm_suspend_how idx);
void vm_set_suspend_mode(enum vm_suspend_how how);