How to verify the difference between posted interrupt and event injection
文章目录
本文将介绍利用ftrace to verify the difference between posted interrupt and event injection.
1. Posted Interrupt scenarios
- Enable Posted Interrupt
- kernel parameter:
kvm_intel.enable_apicv=1
rmmod kvm-intel kvm && modprobe kvm-intel enable_apicv=1
- kernel parameter:
- Need to ensure
cat /sys/module/kvm_intel/parameters/enable_apicv
is Y
2. Event Injection scenarios
Disable Posted Interrupt
- kernel parameter:
kvm_intel.enable_apicv=0
rmmod kvm-intel kvm && modprobe kvm-intel enable_apicv=0
- kernel parameter:
Need to ensure
cat /sys/module/kvm_intel/parameters/enable_apicv
is N
3. Trace verification
- sudo trace-cmd record -e kvm_inj_virq
- sudo trace-cmd report
3.1 trace for Posted Interrupt
1 | qemu-system-x86-930906 [173] 703091.577738: kvm_inj_virq: irq 8 |
3.2 trace for Event Injection
1 | qemu-system-x86-931437 [222] 703390.933279: kvm_inj_virq: irq 8 |
3.3 summary
Interrupts 32 to 255—User Defined Interrupts
相对于Event Injection,当enable Posted Interrupt之后,trace中没有出现User Defined Interrupts的kvm_inj_virq事件!