From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gleb Natapov Subject: Re: Why so many vm exits caused by ept violation Date: Tue, 9 Nov 2010 13:24:28 +0200 Message-ID: <20101109112428.GQ9036@redhat.com> References: <4CD802AA.3040302@redhat.com> <20101109074550.GH9036@redhat.com> <20101109092727.GL9036@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Avi Kivity , kvm@vger.kernel.org To: lidong chen Return-path: Received: from mx1.redhat.com ([209.132.183.28]:7750 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755471Ab0KILYb convert rfc822-to-8bit (ORCPT ); Tue, 9 Nov 2010 06:24:31 -0500 Content-Disposition: inline In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: 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. >=20 > the virtio driver we use from RHEL5.5. >=20 This guest does not support MSI. > 2010/11/9 Gleb Natapov : > > 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 : > >> > 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 t= han > >> >> 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 no= rmal? > >> >> I add the printk in function tdp_page_fault below. > >> >> =9A =9A =9A =9A pfn =3D gfn_to_pfn(vcpu->kvm, gfn); > >> >> =9A =9A =9A =9A if (is_error_pfn(pfn)) { > >> >> =9A =9A =9A =9A =9A =9A =9A =9A kvm_release_pfn_clean(pfn); > >> >> =9A =9A =9A =9A =9A =9A =9A =9A if( printk_ratelimit() ) { > >> >> =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A printk(KERN_EME= RG "error gpa is %ld\n", gpa); > >> >> =9A =9A =9A =9A =9A =9A =9A =9A } > >> >> =9A =9A =9A =9A =9A =9A =9A =9A return is_fault_pfn(pfn) ? -EFA= ULT : 1; > >> >> =9A =9A =9A =9A } > >> >> > >> >> 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. > >> > > >> > -- > >> > =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9AGleb. > >> > > > > > -- > > =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9A =9AGleb. > > -- Gleb.