kvm 处理中断流程

一、x86

In x86 architecture, Intel in this case, most interrupts will cause CPU VM exit, which means the control of CPU will return to host from guests.

So the processes are

  1. CPU is used by guest OS in VMX non-root mode.

  2. CPU is aware of an interrupt coming.

  3. CPU's control returns to host running in VMX root mode. (VM exit)

  4. The host (KVM) handles the interrupt.

  5. Host executed VMLAUNCH instruction to let CPU transfer to VMX non-root mode again for running guest code.

  6. Repeat 1.   

二、ARM

    1、外部中断设置路由到EL2;

    2、EL2捕获到外部中断,将vcpu从Guest拉回到Host;(可配置中断直接路由到Guest,这样可以bypass hypervisor)

    3、在Host重新开中断,中断路由到Host的中断向量表;

    4、Host执行完对应的中断处理函数后,将vcpu重新拉回到Guest模式;




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值