您的位置:首页 > 其它

IO指令模拟流程(7)

2013-05-22 08:46 148 查看
__handle_ioreq用于具体对io请求进行处理动作。cpu_handle_ioreq→__handle_ioreq

static void cpu_handle_ioreq(void *opaque)

{

extern int shutdown_requested;

CPUState *env = opaque;

ioreq_t *req = cpu_get_ioreq();

__handle_buffered_iopage(env);

if (req) {

__handle_ioreq(env, req);

最后,qemu处理io的动作完成,将req->state置为
STATE_IORESP_READY,表示io处理完毕,响应准备好啦。随后,通知事件通道。


static void cpu_handle_ioreq(void *opaque)

{

req->state =STATE_IORESP_READY;

xc_evtchn_notify(xce_handle, ioreq_local_port[send_vcpu]);

}

}

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: