From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: IO on guest is 20 times slower than host Date: Sat, 04 Apr 2009 14:47:09 +0300 Message-ID: <49D748BD.7000000@redhat.com> References: <49CA5825.7030201@redhat.com> <4AC00930-1EBB-4704-94CF-29478D07F03A@yoderhome.com> <49CA5D53.1080401@redhat.com> <52871.140.147.222.3.1238163053.squirrel@dyn.yoderhome.com> <49CF85D3.1020507@redhat.com> <49CFC7A2.3030808@redhat.com> <20090331095956.GB21083@amd.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Kurt Yoder , kvm@vger.kernel.org To: Joerg Roedel Return-path: Received: from mx2.redhat.com ([66.187.237.31]:37978 "EHLO mx2.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752521AbZDDLqf (ORCPT ); Sat, 4 Apr 2009 07:46:35 -0400 In-Reply-To: <20090331095956.GB21083@amd.com> Sender: kvm-owner@vger.kernel.org List-ID: Joerg Roedel wrote: >> index 1fcbc17..d9774e9 100644 >> --- a/kernel/x86/kvm/svm.c >> +++ b/kernel/x86/kvm/svm.c >> @@ -575,7 +575,7 @@ static void init_vmcb(struct vcpu_svm *svm) >> INTERCEPT_CR3_MASK); >> control->intercept_cr_write &= ~(INTERCEPT_CR0_MASK| >> INTERCEPT_CR3_MASK); >> - save->g_pat = 0x0007040600070406ULL; >> + save->g_pat = 0x0606060606060606ULL; >> /* enable caching because the QEMU Bios doesn't enable it */ >> save->cr0 = X86_CR0_ET; >> save->cr3 = 0; >> > > Yeah, that patch makes sense. But I think we need some more work on this > because the guest may change the pat msr afterwards. Best would be a simple > shadow of the pat msr. Last question is how this will effect pci passthrough. > > I've noticed that Windows (and likely Linux, didn't test) maps the cirrus framebuffer with PWT=1, which should slow down the emulated framebuffer. So this patch should speed up things. If a device is assigned, we must respect the guest PAT, so cirrus performance will be low. On Intel there's an 'ignore PAT' bit which can be set on an ept pte for the framebuffer. Any trick we can do on AMD to achieve a similar result? -- I have a truly marvellous patch that fixes the bug which this signature is too narrow to contain.