Re: Why so many vm exits caused by ept violation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



after slove the ept violation problem, i found  the vm exits times is
still more than xen.

and i found most of them is caused by io instruction. then i stat the
port number, most of them is caused by virio_net.

        qemu-kvm-18727 [006] 31297.698935: kvm_pio: pio_read at 0xc093
size 1 count 1
        qemu-kvm-18727 [006] 31297.698945: kvm_pio: pio_read at 0xc0f3
size 1 count 1
        qemu-kvm-18846 [001] 31297.698962: kvm_pio: pio_read at 0xc073
size 1 count 1
        qemu-kvm-18846 [001] 31297.698968: kvm_pio: pio_read at 0xc093
size 1 count 1
        qemu-kvm-18846 [001] 31297.698973: kvm_pio: pio_read at 0xc0f3
size 1 count 1
        qemu-kvm-18481 [006] 31297.699000: kvm_pio: pio_read at 0xc073
size 1 count 1
        qemu-kvm-18481 [006] 31297.699008: kvm_pio: pio_read at 0xc093
size 1 count 1
        qemu-kvm-18846 [001] 31297.699011: kvm_pio: pio_read at 0xc053
size 1 count 1
        qemu-kvm-18846 [001] 31297.699017: kvm_pio: pio_read at 0xc0b3
size 1 count 1
        qemu-kvm-18846 [001] 31297.699023: kvm_pio: pio_read at 0xc0d3
size 1 count 1
        qemu-kvm-18481 [006] 31297.699025: kvm_pio: pio_read at 0xc053
size 1 count 1
        qemu-kvm-18481 [006] 31297.699030: kvm_pio: pio_read at 0xc0b3
size 1 count 1
        qemu-kvm-18481 [006] 31297.699057: kvm_pio: pio_read at 0xc0d3
size 1 count 1
        qemu-kvm-18481 [006] 31297.699075: kvm_pio: pio_read at 0xc053
size 1 count 1
        qemu-kvm-18481 [006] 31297.699081: kvm_pio: pio_read at 0xc0b3
size 1 count 1
        qemu-kvm-18481 [006] 31297.699084: kvm_pio: pio_read at 0xc0d3
size 1 count 1

00:04.0 Ethernet controller: Unknown device 1af4:1000
	Subsystem: Unknown device 1af4:0001
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
	Latency: 0
	Interrupt: pin A routed to IRQ 11
	Region 0: I/O ports at c040 [size=32]
	Region 1: Memory at f2020000 (32-bit, non-prefetchable) [size=4K]
	Expansion ROM at f2030000 [disabled] [size=64K]
	Capabilities: [40] MSI-X: Enable- Mask- TabSize=3
		Vector table: BAR=1 offset=00000000
		PBA: BAR=1 offset=00000800

00:05.0 Ethernet controller: Unknown device 1af4:1000
	Subsystem: Unknown device 1af4:0001
	Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
	Interrupt: pin A routed to IRQ 10
	Region 0: I/O ports at c060 [size=32]
	Region 1: Memory at f2040000 (32-bit, non-prefetchable) [size=4K]
	Expansion ROM at f2050000 [disabled] [size=64K]
	Capabilities: [40] MSI-X: Enable- Mask- TabSize=3
		Vector table: BAR=1 offset=00000000
		PBA: BAR=1 offset=00000800

00:06.0 Ethernet controller: Unknown device 1af4:1000
	Subsystem: Unknown device 1af4:0001
	Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
	Interrupt: pin A routed to IRQ 10
	Region 0: I/O ports at c080 [size=32]
	Region 1: Memory at f2060000 (32-bit, non-prefetchable) [size=4K]
	Expansion ROM at f2070000 [disabled] [size=64K]
	Capabilities: [40] MSI-X: Enable- Mask- TabSize=3
		Vector table: BAR=1 offset=00000000
		PBA: BAR=1 offset=00000800

00:07.0 Ethernet controller: Unknown device 1af4:1000
	Subsystem: Unknown device 1af4:0001
	Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
	Interrupt: pin A routed to IRQ 11
	Region 0: I/O ports at c0a0 [size=32]
	Region 1: Memory at f2080000 (32-bit, non-prefetchable) [size=4K]
	Expansion ROM at f2090000 [disabled] [size=64K]
	Capabilities: [40] MSI-X: Enable- Mask- TabSize=3
		Vector table: BAR=1 offset=00000000
		PBA: BAR=1 offset=00000800

00:08.0 Ethernet controller: Unknown device 1af4:1000
	Subsystem: Unknown device 1af4:0001
	Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR- FastB2B-
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR-
	Interrupt: pin A routed to IRQ 11
	Region 0: I/O ports at c0c0 [size=32]
	Region 1: Memory at f20a0000 (32-bit, non-prefetchable) [size=4K]
	Expansion ROM at f20b0000 [disabled] [size=64K]
	Capabilities: [40] MSI-X: Enable- Mask- TabSize=3
		Vector table: BAR=1 offset=00000000
		PBA: BAR=1 offset=00000800

the driver version is RHLE5.5. and i want move the virtio driver of
RHLE 6 to RHLE5.5.
have anyone already done this work?





2010/11/9 Gleb Natapov <gleb@xxxxxxxxxx>:
> On Tue, Nov 09, 2010 at 06:24:06PM +0800, lidong chen wrote:
>> the version of guest os is 2.6.16.60-0.21-bigsmp.
>>
>> the virtio driver we use from RHEL5.5.
>>
> This guest does not support MSI.
>
>> 2010/11/9 Gleb Natapov <gleb@xxxxxxxxxx>:
>> > On Tue, Nov 09, 2010 at 05:04:15PM +0800, lidong chen wrote:
>> >> how to configure virtio to use MSI? I didn't found out it.
>> >> thanks.
>> >>
>> > It looks like it should be enabled by default. What is you guest?
>> >
>> >> 2010/11/9 Gleb Natapov <gleb@xxxxxxxxxx>:
>> >> > On Tue, Nov 09, 2010 at 03:37:44PM +0800, lidong chen wrote:
>> >> >> sorry,i take mistake,
>> >> >>
>> >> >> the ept violation is not caused by 2M hugepages, but caused by e1000
>> >> >> emulated by qemu.
>> >> >> I test uesd 2M hugepages and virio, the performance is better than
>> >> >> e1000. but is still worse than xen. I will continue to find out other
>> >> >> reason.
>> >> >>
>> >> >>
>> >> >>
>> >> >> so, there are two question:
>> >> >> 1.why have so many ept violation when used e1000?
>> >> >>
>> >> >>
>> >> >> 2.when used virtio, there ara also such error happen.is this normal?
>> >> >> I add the printk in function tdp_page_fault below.
>> >> >>         pfn = gfn_to_pfn(vcpu->kvm, gfn);
>> >> >>         if (is_error_pfn(pfn)) {
>> >> >>                 kvm_release_pfn_clean(pfn);
>> >> >>                 if( printk_ratelimit() ) {
>> >> >>                         printk(KERN_EMERG "error gpa is %ld\n", gpa);
>> >> >>                 }
>> >> >>                 return is_fault_pfn(pfn) ? -EFAULT : 1;
>> >> >>         }
>> >> >>
>> >> >> and result is:
>> >> >> [root@rhel6-kvm1 ~]# dmesg -c
>> >> >> __ratelimit: 387 callbacks suppressed
>> >> >> error gpa is 4273995776
>> >> >> error gpa is 4273995776
>> >> >> error gpa is 4273995776
>> >> >> error gpa is 4273995776
>> >> >> error gpa is 4273995776
>> >> >>
>> >> > You should really print this in hex :) This is 0xfec00000 AKA
>> >> > IOAPIC. Try to configure virtio to use MSI.
>> >> >
>> >> > --
>> >> >                        Gleb.
>> >> >
>> >
>> > --
>> >                        Gleb.
>> >
>
> --
>                        Gleb.
>
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux