* with kerenl 2.6.27, CONFIG_KVM_GUEST does not work
@ 2008-10-10 16:11 xming
2008-10-11 18:04 ` Marcelo Tosatti
0 siblings, 1 reply; 7+ messages in thread
From: xming @ 2008-10-10 16:11 UTC (permalink / raw)
To: kvm
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: with kerenl 2.6.27, CONFIG_KVM_GUEST does not work
2008-10-10 16:11 with kerenl 2.6.27, CONFIG_KVM_GUEST does not work xming
@ 2008-10-11 18:04 ` Marcelo Tosatti
2008-10-12 20:57 ` Held Bernhard
2008-10-13 17:44 ` Al Tobey
0 siblings, 2 replies; 7+ messages in thread
From: Marcelo Tosatti @ 2008-10-11 18:04 UTC (permalink / raw)
To: xming, Avi Kivity; +Cc: kvm
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?
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 <mtosatti@redhat.com>
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;
}
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: with kerenl 2.6.27, CONFIG_KVM_GUEST does not work
2008-10-11 18:04 ` Marcelo Tosatti
@ 2008-10-12 20:57 ` Held Bernhard
2008-10-14 6:49 ` Xavier Gnata
2008-10-13 17:44 ` Al Tobey
1 sibling, 1 reply; 7+ messages in thread
From: Held Bernhard @ 2008-10-12 20:57 UTC (permalink / raw)
To: kvm
> Does the attached work for you?
>
> 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 <mtosatti@redhat.com>
>
> 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;
> }
This patch works for me (kvm-77, 2.6.27 host and guest)!
kvm-75 works fine, but kvm-76 and kvm-77 (all unpatched) show lot's of
segfaults in the guest (2.6.26.5 or 2.6.27, x86_64 on host and guest).
Thanks for the patch!
HTH,
Bernhard
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: with kerenl 2.6.27, CONFIG_KVM_GUEST does not work
2008-10-11 18:04 ` Marcelo Tosatti
2008-10-12 20:57 ` Held Bernhard
@ 2008-10-13 17:44 ` Al Tobey
2008-10-15 7:17 ` Xavier Gnata
1 sibling, 1 reply; 7+ messages in thread
From: Al Tobey @ 2008-10-13 17:44 UTC (permalink / raw)
To: kvm
On Sat, Oct 11, 2008 at 11:04 AM, Marcelo Tosatti <mtosatti@redhat.com> 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 <mtosatti@redhat.com>
>
> 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;
> }
>
> --
> To unsubscribe from this list: send the line "unsubscribe kvm" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: with kerenl 2.6.27, CONFIG_KVM_GUEST does not work
2008-10-12 20:57 ` Held Bernhard
@ 2008-10-14 6:49 ` Xavier Gnata
2008-10-14 7:16 ` Bernhard Held
0 siblings, 1 reply; 7+ messages in thread
From: Xavier Gnata @ 2008-10-14 6:49 UTC (permalink / raw)
To: Held Bernhard; +Cc: kvm
Held Bernhard wrote:
>> Does the attached work for you?
>>
>> 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 <mtosatti@redhat.com>
>>
>> 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;
>> }
>>
> This patch works for me (kvm-77, 2.6.27 host and guest)!
>
> kvm-75 works fine, but kvm-76 and kvm-77 (all unpatched) show lot's of
> segfaults in the guest (2.6.26.5 or 2.6.27, x86_64 on host and guest).
>
> Thanks for the patch!
>
> HTH,
> Bernhard
>
Hi,
Using this patch on a vanilla 2.6.27 kernel, I get this when I try to
compile it:
arch/x86/kvm/mmu.c: In function ‘kvm_pv_mmu_flush_tlb’:
arch/x86/kvm/mmu.c:2241: error: ‘KVM_REQ_MMU_SYNC’ undeclared (first use
in this function)
arch/x86/kvm/mmu.c:2241: error: (Each undeclared identifier is reported
only once
arch/x86/kvm/mmu.c:2241: error: for each function it appears in.)
make[2]: *** [arch/x86/kvm/mmu.o] Error 1
It was fine with kvm-75 but I still not able to start my ubuntu 2.6.27
guest with kvm 75 qnd kvm 76.
host : vanilla 2.6.27 x86_64
guest : ubuntu 8.10 (2.6.27)
I must be missing a patch somewhere...
Xavier
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: with kerenl 2.6.27, CONFIG_KVM_GUEST does not work
2008-10-14 6:49 ` Xavier Gnata
@ 2008-10-14 7:16 ` Bernhard Held
0 siblings, 0 replies; 7+ messages in thread
From: Bernhard Held @ 2008-10-14 7:16 UTC (permalink / raw)
To: kvm
> Using this patch on a vanilla 2.6.27 kernel, I get this when I try to
> compile it:
>
> arch/x86/kvm/mmu.c: In function ‘kvm_pv_mmu_flush_tlb’:
> arch/x86/kvm/mmu.c:2241: error: ‘KVM_REQ_MMU_SYNC’ undeclared (first use
> in this function)
> arch/x86/kvm/mmu.c:2241: error: (Each undeclared identifier is reported
> only once
> arch/x86/kvm/mmu.c:2241: error: for each function it appears in.)
> make[2]: *** [arch/x86/kvm/mmu.o] Error 1
>
> It was fine with kvm-75 but I still not able to start my ubuntu 2.6.27
> guest with kvm 75 qnd kvm 76.
> host : vanilla 2.6.27 x86_64
> guest : ubuntu 8.10 (2.6.27)
>
> I must be missing a patch somewhere...
What kvm version are you building? The patch is not required for kvm-75, kvm-75
won't build with it. I built kvm-77 with the patch. Try again with at least kvm-76.
Bernhard
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: with kerenl 2.6.27, CONFIG_KVM_GUEST does not work
2008-10-13 17:44 ` Al Tobey
@ 2008-10-15 7:17 ` Xavier Gnata
0 siblings, 0 replies; 7+ messages in thread
From: Xavier Gnata @ 2008-10-15 7:17 UTC (permalink / raw)
To: Al Tobey; +Cc: kvm
Al Tobey wrote:
> On Sat, Oct 11, 2008 at 11:04 AM, Marcelo Tosatti <mtosatti@redhat.com> 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 <mtosatti@redhat.com>
>>
>> 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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-10-15 7:17 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-10 16:11 with kerenl 2.6.27, CONFIG_KVM_GUEST does not work xming
2008-10-11 18:04 ` Marcelo Tosatti
2008-10-12 20:57 ` Held Bernhard
2008-10-14 6:49 ` Xavier Gnata
2008-10-14 7:16 ` Bernhard Held
2008-10-13 17:44 ` Al Tobey
2008-10-15 7:17 ` Xavier Gnata
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).