<domain type="kvm">
<name>sriov-vm</name>
<memory>2097152</memory>
<vcpu>4</vcpu>
<sysinfo type="smbios">
<system>
<entry name="manufacturer">Sunshout</entry>
<entry name="product">KVM</entry>
<entry name="version">2013.4</entry>
</system>
</sysinfo>
<os>
<type>hvm</type>
<boot dev="hd"/>
<smbios mode="sysinfo"/>
</os>
<features>
<apic eoi="on"/>
</features>
<clock offset="utc">
<timer name="pit" tickpolicy="delay"/>
<timer name="rtc" tickpolicy="catchup"/>
</clock>
<cpu mode="host-model" match="exact"/>
<devices>
<disk type="file" device="disk">
<driver name="qemu" type="qcow2" cache="none"/>
<source file="/storage/sriov.img"/>
<target bus="virtio" dev="vda"/>
</disk>
<serial type="pty"/>
<input type="tablet" bus="usb"/>
<graphics type="vnc" autoport="yes" keymap="en-us" listen="127.0.0.1"/>
</devices>
</domain>
qemu command 로 생성할 때는 -cpu +kvm_pv_eoi 를 추가
PV-EOI 를 off 하고 perf 를 통해서 분석한 결과
. kvm:kvm_pv_eoi 의 결과가 없음을 확인
root@gaus01-m:/storage# perf stat --event "kvm:*" --all-cpus sleep 10
Performance counter stats for 'system wide':
1,512 kvm:kvm_entry [100.00%]
0 kvm:kvm_hypercall [100.00%]
0 kvm:kvm_hv_hypercall [100.00%]
0 kvm:kvm_pio [100.00%]
0 kvm:kvm_cpuid [100.00%]
147 kvm:kvm_apic [100.00%]
1,512 kvm:kvm_exit [100.00%]
107 kvm:kvm_inj_virq [100.00%]
0 kvm:kvm_inj_exception [100.00%]
750 kvm:kvm_page_fault [100.00%]
576 kvm:kvm_msr [100.00%]
0 kvm:kvm_cr [100.00%]
0 kvm:kvm_pic_set_irq [100.00%]
20 kvm:kvm_apic_ipi [100.00%]
107 kvm:kvm_apic_accept_irq [100.00%]
107 kvm:kvm_eoi [100.00%]
0 kvm:kvm_pv_eoi [100.00%]
0 kvm:kvm_nested_vmrun [100.00%]
0 kvm:kvm_nested_intercepts [100.00%]
0 kvm:kvm_nested_vmexit [100.00%]
0 kvm:kvm_nested_vmexit_inject [100.00%]
0 kvm:kvm_nested_intr_vmexit [100.00%]
0 kvm:kvm_invlpga [100.00%]
0 kvm:kvm_skinit [100.00%]
0 kvm:kvm_emulate_insn [100.00%]
0 kvm:vcpu_match_mmio [100.00%]
0 kvm:kvm_write_tsc_offset [100.00%]
0 kvm:kvm_update_master_clock [100.00%]
0 kvm:kvm_track_tsc [100.00%]
0 kvm:kvm_userspace_exit [100.00%]
0 kvm:kvm_set_irq [100.00%]
0 kvm:kvm_ioapic_set_irq [100.00%]
0 kvm:kvm_msi_set_irq [100.00%]
0 kvm:kvm_ack_irq [100.00%]
0 kvm:kvm_mmio [100.00%]
160 kvm:kvm_fpu [100.00%]
0 kvm:kvm_age_page [100.00%]
0 kvm:kvm_try_async_get_page [100.00%]
0 kvm:kvm_async_pf_doublefault [100.00%]
0 kvm:kvm_async_pf_not_present [100.00%]
0 kvm:kvm_async_pf_ready [100.00%]
0 kvm:kvm_async_pf_completed
10.000782310 seconds time elapsed
root@gaus01-m:/storage#
PV-EOI 를 on 하고 perf 를 통해서 분석한 결과
. kvm:kvm_pv_eoi 의 결과가 없음을 확인
root@gaus01-m:/storage# perf stat --event "kvm:*" --all-cpus sleep 10
Performance counter stats for 'system wide':
660 kvm:kvm_entry [100.00%]
0 kvm:kvm_hypercall [100.00%]
0 kvm:kvm_hv_hypercall [100.00%]
0 kvm:kvm_pio [100.00%]
0 kvm:kvm_cpuid [100.00%]
40 kvm:kvm_apic [100.00%]
660 kvm:kvm_exit [100.00%]
101 kvm:kvm_inj_virq [100.00%]
0 kvm:kvm_inj_exception [100.00%]
45 kvm:kvm_page_fault [100.00%]
441 kvm:kvm_msr [100.00%]
0 kvm:kvm_cr [100.00%]
0 kvm:kvm_pic_set_irq [100.00%]
20 kvm:kvm_apic_ipi [100.00%]
102 kvm:kvm_apic_accept_irq [100.00%]
102 kvm:kvm_eoi [100.00%]
102 kvm:kvm_pv_eoi [100.00%]
0 kvm:kvm_nested_vmrun [100.00%]
0 kvm:kvm_nested_intercepts [100.00%]
0 kvm:kvm_nested_vmexit [100.00%]
0 kvm:kvm_nested_vmexit_inject [100.00%]
0 kvm:kvm_nested_intr_vmexit [100.00%]
0 kvm:kvm_invlpga [100.00%]
0 kvm:kvm_skinit [100.00%]
0 kvm:kvm_emulate_insn [100.00%]
0 kvm:vcpu_match_mmio [100.00%]
0 kvm:kvm_write_tsc_offset [100.00%]
0 kvm:kvm_update_master_clock [100.00%]
0 kvm:kvm_track_tsc [100.00%]
0 kvm:kvm_userspace_exit [100.00%]
0 kvm:kvm_set_irq [100.00%]
0 kvm:kvm_ioapic_set_irq [100.00%]
0 kvm:kvm_msi_set_irq [100.00%]
0 kvm:kvm_ack_irq [100.00%]
0 kvm:kvm_mmio [100.00%]
152 kvm:kvm_fpu [100.00%]
0 kvm:kvm_age_page [100.00%]
0 kvm:kvm_try_async_get_page [100.00%]
0 kvm:kvm_async_pf_doublefault [100.00%]
0 kvm:kvm_async_pf_not_present [100.00%]
0 kvm:kvm_async_pf_ready [100.00%]
0 kvm:kvm_async_pf_completed
10.000959530 seconds time elapsed
-> 의문점
. PV_EOI 개수 만큼 VM_EXIT 가 줄어야 하나 실제 VM_EXIT 개수는 VM_ENTER와 동일함