posted-interrrupt implementation
来源:互联网 发布:网络女歌手名字 编辑:程序博客网 时间:2024/06/05 01:18
http://lists.xenproject.org/archives/html/xen-devel/2015-03/msg00570.html
- Update posted-interrupt descriptor during vCPU schedulingThe basic idea here is:1. When vCPU's state is RUNSTATE_running, - Set 'NV' to 'posted_intr_vector'. - Clear 'SN' to accept posted-interrupts. - Set 'NDST' to the pCPU on which the vCPU will be running.2. When vCPU's state is RUNSTATE_blocked, - Set 'NV' to ' pi_wakeup_vector ', so we can wake up the related vCPU when posted-interrupt happens for it. Please refer to the above section about the new global vector. - Clear 'SN' to accept posted-interrupts3. When vCPU's state is RUNSTATE_runnable/RUNSTATE_offline, - Set 'SN' to suppress non-urgent interrupts (Current, we only support non-urgent interrupts) When vCPU is in RUNSTATE_runnable or RUNSTATE_offline, It is not needed to accept posted-interrupt notification event, since we don't change the behavior of scheduler when the interrupt occurs, we still need wait the next scheduling of the vCPU. When external interrupts from assigned devices occur, the interrupts are recorded in PIR, and will be synced to IRR before VM-Entry. - Set 'NV' to 'posted_intr_vector'.
* Send interrupt to vcpu via posted interrupt way. * 1. If target vcpu is running(non-root mode), send posted interrupt * notification to vcpu and hardware will sync PIR to vIRR atomically. * 2. If target vcpu isn't running(root mode), kick it to pick up the * interrupt from PIR in next vmentry. */static void vmx_deliver_posted_interrupt(struct kvm_vcpu *vcpu, int vector){ struct vcpu_vmx *vmx = to_vmx(vcpu); int r; r = vmx_deliver_nested_posted_interrupt(vcpu, vector); if (!r) return; if (pi_test_and_set_pir(vector, &vmx->pi_desc)) return; r = pi_test_and_set_on(&vmx->pi_desc); kvm_make_request(KVM_REQ_EVENT, vcpu); if (r || !kvm_vcpu_trigger_posted_interrupt(vcpu)) kvm_vcpu_kick(vcpu);}
如果要给某个vcpu发送ipi的话,也可以通过posted interrrupt方式发送,实现主要就是vmx_delivery_posted_interrupt,如果对方vcpu running,直接通过posted_interrupt_nv中断通知对方,上面注释说硬件会自动帮你把pir 拷贝到 virr里。所以我一直没找到guest怎么把pir解析到vir的。
0 0
- posted-interrrupt implementation
- linux interrrupt
- C8051F850 GPIO Interrrupt
- pci posted/not posted
- posted and non-posted
- Implementation
- implementation
- posted notes
- PCIe posted vs non-posted transactions
- Posted和Non-Posted传送方式
- 【【Oracle posted -- Backup 大全】】
- KVM: Posted Interrupt
- 【记录】STM32在ucOS中的串口操作(Interrrupt)
- I'll keep you posted.
- I'll keep you posted.
- Implementation Patterns
- SOA implementation
- Scrum Implementation
- 对Layout_weight的理解
- 明明的随机数(java)
- MySQL的Data_ADD函数与日期格式化函数说明
- wechat4j框架详解
- 常用的几个资料链接
- posted-interrrupt implementation
- 关于a++(自增)的一个问题
- MyBatis入门教程(一)
- HBase Shell 基础(一)
- android 判断MIUI悬浮窗权限是否打开
- 机房收费系统颗粒大归仓之-------组合查询
- WebAPI通过multipart/form-data方式同时上传文件以及数据(含HttpClient上传Demo)
- 天声人語 20150814
- navigationItem “back”改为中文