From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xavier Gnata Subject: Re: with kerenl 2.6.27, CONFIG_KVM_GUEST does not work Date: Wed, 15 Oct 2008 09:17:14 +0200 Message-ID: <48F598FA.9050806@gmail.com> References: <519a8b110810100911j2e8229a2mf86f770b724a1bc3@mail.gmail.com> <20081011180436.GA13387@dmt.cnet> <5ac7acb10810131044s439442c4le9dc95cbbebecc1a@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: kvm@vger.kernel.org To: Al Tobey Return-path: Received: from nf-out-0910.google.com ([64.233.182.188]:27614 "EHLO nf-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751812AbYJOHRT (ORCPT ); Wed, 15 Oct 2008 03:17:19 -0400 Received: by nf-out-0910.google.com with SMTP id d3so1152710nfc.21 for ; Wed, 15 Oct 2008 00:17:17 -0700 (PDT) In-Reply-To: <5ac7acb10810131044s439442c4le9dc95cbbebecc1a@mail.gmail.com> Sender: kvm-owner@vger.kernel.org List-ID: Al Tobey wrote: > On Sat, Oct 11, 2008 at 11:04 AM, Marcelo Tosatti wrote: > >> On Fri, Oct 10, 2008 at 06:11:08PM +0200, xming wrote: >> >>> Kernel 2.6.27 + kvm-76 on the host really gives some performance boost here. >>> but: >>> >>> When running 2.6.27 compiled with CONFIG_KVM_GUEST=y in the guest, the guest >>> won't start, lot's of segfaults (in the guest) especially udev initializations. >>> >>> unset CONFIG_KVM_GUEST=y, then the guest runs fine >>> >> Does the attached work for you? >> > > I was running a bunch of VM's on kvm-75 (gentoo/intel x86_64/virtio > guests) just fine. I upgraded to kvm-77 this morning and the VM's > failed to mount root read-write. I checked the list before digging > too deep and found a reference to this thread. Adding this patch on > top of stock kvm-77 appears to have fixed the issue. > > Thanks, > -Al > > >> Avi, do you have thoughts on how to proceed with pvmmu? Using hypercalls >> instead of faults can still be beneficial (for the first write before >> page goes out of sync, or for non-leaf tables which currently don't go >> oos). But at the current state pvmmu should be slower in most loads. >> Perhaps disable it? >> >> KVM: MMU: sync root on paravirt TLB flush >> >> The pvmmu TLB flush handler should request a root sync, similarly to >> a native read-write CR3. >> >> Signed-off-by: Marcelo Tosatti >> >> diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c >> index 79cb4a9..7e70e97 100644 >> --- a/arch/x86/kvm/mmu.c >> +++ b/arch/x86/kvm/mmu.c >> @@ -2747,6 +2747,7 @@ static int kvm_pv_mmu_write(struct kvm_vcpu *vcpu, >> static int kvm_pv_mmu_flush_tlb(struct kvm_vcpu *vcpu) >> { >> kvm_x86_ops->tlb_flush(vcpu); >> + set_bit(KVM_REQ_MMU_SYNC, &vcpu->requests); >> return 1; >> } >> >> -- >> >> Ok I was patching the wrong file...sorry. It works well with 2.6.27 (host and guest) and kvm-77 Xavier