mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-16 14:28:56 +00:00
asyncio: refine the setup ioctl
Remove the common interface for sbuf setup, as it is not accept by kernel side. Instead, use dedicate setup function for asyncio to init its sbuf. Tracked-On: #8209 Signed-off-by: Conghui <conghui.chen@intel.com> Acked-by: Wang, Yu1 <yu1.wang@intel.com>
This commit is contained in:
@@ -852,7 +852,7 @@ vm_init_asyncio(struct vmctx *ctx, uint64_t base)
|
||||
sbuf->overrun_cnt = 0;
|
||||
sbuf->head = 0;
|
||||
sbuf->tail = 0;
|
||||
return vm_setup_sbuf(ctx, ACRN_ASYNCIO, base);
|
||||
return vm_setup_asyncio(ctx, base);
|
||||
}
|
||||
|
||||
int
|
||||
|
@@ -295,19 +295,14 @@ vm_destroy(struct vmctx *ctx)
|
||||
}
|
||||
|
||||
int
|
||||
vm_setup_sbuf(struct vmctx *ctx, uint32_t sbuf_id, uint64_t base)
|
||||
vm_setup_asyncio(struct vmctx *ctx, uint64_t base)
|
||||
{
|
||||
int error;
|
||||
struct acrn_sbuf sbuf_param;
|
||||
|
||||
bzero(&sbuf_param, sizeof(sbuf_param));
|
||||
sbuf_param.sbuf_id = sbuf_id;
|
||||
sbuf_param.base = base;
|
||||
|
||||
error = ioctl(ctx->fd, ACRN_IOCTL_SETUP_SBUF, &sbuf_param);
|
||||
error = ioctl(ctx->fd, ACRN_IOCTL_SETUP_ASYNCIO, base);
|
||||
|
||||
if (error) {
|
||||
pr_err("ACRN_IOCTL_SBUF_PAGE ioctl() returned an error: %s\n", errormsg(errno));
|
||||
pr_err("ACRN_IOCTL_SETUP_ASYNCIO ioctl() returned an error: %s\n", errormsg(errno));
|
||||
}
|
||||
|
||||
return error;
|
||||
|
Reference in New Issue
Block a user