Re: [PATCH 2/2] virtio_net: remove send completion interrupts and avoid TX queue overrun through packet drop

2011-03-27 Thread Michael S. Tsirkin
On Fri, Mar 25, 2011 at 03:20:46PM +1030, Rusty Russell wrote: > > 3. For TX sometimes we free a single buffer, sometimes > >a ton of them, which might make the transmit latency > >vary. It's probably a good idea to limit this, > >maybe free the minimal number possible to keep the devic

Re: 2.6.38.1 general protection fault

2011-03-27 Thread Avi Kivity
On 03/26/2011 12:42 PM, Tomasz Chmielewski wrote: On 26.03.2011 10:15, Avi Kivity wrote: > On 03/25/2011 11:32 AM, Tomasz Chmielewski wrote: >> I got this on a 2.6.38.1 system which (I think) had some problem >> accessing guest image on a btrfs filesystem. >> >> >> general protection fault: 0

Re: [PATCH 05/13] KVM: SVM: Add intercept check for emulated cr accesses

2011-03-27 Thread Avi Kivity
On 03/26/2011 01:06 PM, Joerg Roedel wrote: On Sat, Mar 26, 2011 at 11:37:42AM +0200, Avi Kivity wrote: > On 03/25/2011 11:29 AM, Joerg Roedel wrote: >> This patch adds all necessary intercept checks for >> instructions that access the crX registers. >> >> >> @@ -3871,11 +3871,89 @@ static vo

Re: [PATCH 3/6] KVM: X86: Make tsc_delta calculation a function of guest tsc

2011-03-27 Thread Avi Kivity
On 03/25/2011 10:44 AM, Joerg Roedel wrote: The calculation of the tsc_delta value to ensure a forward-going tsc for the guest is a function of the host-tsc. This works as long as the guests tsc_khz is equal to the hosts tsc_khz. With tsc-scaling hardware support this is not longer true and the t

Re: [PATCH 0/6] TSC scaling support for KVM v3

2011-03-27 Thread Avi Kivity
On 03/25/2011 10:44 AM, Joerg Roedel wrote: Hi, this is the third round of my patches to support tsc-scaling in KVM. The changes to v2 address Avi's comments from yesterday. Besides that the whole virtual_tsc_khz thing has been moved out of the vm into the vcpu data structure. The mult and shift

Re: [PATCH 3/6] KVM: X86: Make tsc_delta calculation a function of guest tsc

2011-03-27 Thread Joerg Roedel
On Sun, Mar 27, 2011 at 12:57:03PM +0200, Avi Kivity wrote: > On 03/25/2011 10:44 AM, Joerg Roedel wrote: >> The calculation of the tsc_delta value to ensure a >> forward-going tsc for the guest is a function of the >> host-tsc. This works as long as the guests tsc_khz is equal >> to the hosts tsc_

Re: "KVM internal error. Suberror: 1" with ancient 2.4 kernel as guest

2011-03-27 Thread Avi Kivity
On 03/26/2011 12:12 AM, Wei Xu wrote: Jiri& Avi: I attached the patched I did for movq and movdqa emulation. Please note: (1) I only implemented those two. Other instructions like addq may be following same way. (2) I use same guest_fx_image to hold value and fxsave/fxrstor to copy to/from regi

Re: [PATCH 01/13] KVM: x86 emulator: add framework for instruction

2011-03-27 Thread Gleb Natapov
On Fri, Mar 25, 2011 at 10:29:04AM +0100, Joerg Roedel wrote: > @@ -259,6 +267,18 @@ struct x86_emulate_ctxt { > #define X86EMUL_MODE_PROT32 4 /* 32-bit protected mode. */ > #define X86EMUL_MODE_PROT64 8 /* 64-bit (long) mode.*/ > > +enum x86_intercept_stage { > + x86_icpt

[Bug 31992] New: Clarify compilation options for the host or for the guest

2011-03-27 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=31992 Summary: Clarify compilation options for the host or for the guest Product: Virtualization Version: unspecified Platform: All OS/Version: Linux Tree: Mainline

[PATCH] device-assignment: fix guest irq routing

2011-03-27 Thread Konstantin Khlebnikov
For guest IRQ assign use emulated interrupt pin, not the real one. Signed-off-by: Konstantin Khlebnikov --- hw/device-assignment.c | 12 +--- hw/device-assignment.h |1 - 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/hw/device-assignment.c b/hw/device-assignment.c

[PATCH] device-assignment: move irqs update to piix emulation

2011-03-27 Thread Konstantin Khlebnikov
Move assigned devices irq reroute hook from generic pci code to piix emulation. Actually without this patch this hook had never worked, because pci.c not include config.h and CONFIG_KVM_DEVICE_ASSIGNMENT there always undefined. Signed-off-by: Konstantin Khlebnikov --- hw/pc.h |4

Re: [PATCH] device-assignment: move irqs update to piix emulation

2011-03-27 Thread Alex Williamson
On Sun, 2011-03-27 at 23:22 +0400, Konstantin Khlebnikov wrote: > Move assigned devices irq reroute hook from generic pci code to piix > emulation. > > Actually without this patch this hook had never worked, because pci.c not > include config.h and CONFIG_KVM_DEVICE_ASSIGNMENT there always undefi

Re: "KVM internal error. Suberror: 1" with ancient 2.4 kernel as guest

2011-03-27 Thread Wei Xu
Avi, See my comment below with Wei>>. On 3/27/11 4:57 AM, "Avi Kivity" wrote: > On 03/26/2011 12:12 AM, Wei Xu wrote: >> Jiri& Avi: >> >> I attached the patched I did for movq and movdqa emulation. Please note: >> (1) I only implemented those two. Other instructions like addq may be >> follo

Re: "KVM internal error. Suberror: 1" with ancient 2.4 kernel as guest

2011-03-27 Thread Wei Xu
Avi, Are you sure there is a sse-mmio branch? I could not find it anywhere... Wei Xu On 3/27/11 4:57 AM, "Avi Kivity" wrote: > On 03/26/2011 12:12 AM, Wei Xu wrote: >> Jiri& Avi: >> >> I attached the patched I did for movq and movdqa emulation. Please note: >> (1) I only implemented those

[PATCH 1/2] KVM: MMU: remove mmu_seq verification on pte write path

2011-03-27 Thread Xiao Guangrong
The mmu_seq verification can be removed since we get the pfn in the protection of mmu_lock Signed-off-by: Xiao Guangrong --- arch/x86/include/asm/kvm_host.h |2 +- arch/x86/kvm/mmu.c | 16 +--- arch/x86/kvm/paging_tmpl.h |4 +--- 3 files changed, 7 inserti

[PATCH 2/2] KVM: MMU: optimize pte write path if don't have protected sp

2011-03-27 Thread Xiao Guangrong
Simplely return from kvm_mmu_pte_write path if no shadow page is write-protected, than we can avoid to walk all shadow pages and hold mmu-lock Signed-off-by: Xiao Guangrong --- arch/x86/kvm/mmu.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/arch/x86/kvm/mmu.c b

Re: 2.6.38.1 general protection fault

2011-03-27 Thread Tomasz Chmielewski
On 27.03.2011 11:42, Avi Kivity wrote: (...) Okay, the fork came from the ,script=. The issue with %rsi looks like a use-after-free, however kvm_mmu_notifier_invalidate_range_start appears to be properly srcu protected. FYI, I saw this one as well: http://www.virtall.com/files/temp/kvm.txt