Re: writes to a virtio block device hungs

2008-09-23 Thread Michael Tokarev
[Replying to my own email...] Michael Tokarev wrote: Hello! It's my first email to this list.. ;) After experimenting for some time with KVM on linux (both host and guests are linux machines), I placed one virtual machine into production use, and almost immediately come... issues. Here's how

Re: Event channels in KVM?

2008-09-23 Thread Avi Kivity
Matt Anger wrote: Thanks for the info, I've been looking into it by trying to look around kvm source code. Apparently I have to write a kernel driver for the guest os and then also write backend driver and modify qemu to use it? Is that correct? That seems ugly, especially since now my io goes gu

Re: [PATCH 8/9] coalesce mmio regions with an explicit call

2008-09-23 Thread Avi Kivity
Glauber Costa wrote: On Sat, Sep 20, 2008 at 11:39:44AM -0700, Avi Kivity wrote: Glauber Costa wrote: Remove explicit calls to mmio coalescing. Rather, include it in the registration functions. index 5ae3960..2d97b34 100644 --- a/qemu/hw/e1000.c +++ b/qemu/hw/e1000.c @@ -942,18 +942,6

Re: [PATCH 7/9] register mmio slots

2008-09-23 Thread Avi Kivity
Glauber Costa wrote: On Sat, Sep 20, 2008 at 11:38:22AM -0700, Avi Kivity wrote: Glauber Costa wrote: By analysing phys_offset, we know whether a region is an mmio region or not. If it is, register it as so. We don't reuse the same slot infrastructure already existant, because there is

Re: [PATCH 4/9] substitute is_allocated_mem with more general is_containing_region

2008-09-23 Thread Avi Kivity
Glauber Costa wrote: On Sat, Sep 20, 2008 at 11:33:56AM -0700, Avi Kivity wrote: Glauber Costa wrote: is_allocated_mem is a function that checks if every relevant aspect of the memory slot match (start and size). Replace it with a more generic function that checks if a memory region i

Re: VMX: Host NMI triggering on NMI vmexit

2008-09-23 Thread Jan Kiszka
Yang, Sheng wrote: > On Monday 22 September 2008 19:00:38 Avi Kivity wrote: >> Jan Kiszka wrote: Maybe the answer is to generate the local nmi via an IPI-to-self command to the local apic. >>> Going this way leaves me with a few questions: Will it be OK for the >>> related mainainers to e

Re: [PATCH 10/11] VMX: work around lacking VNMI support

2008-09-23 Thread Gleb Natapov
On Tue, Sep 23, 2008 at 10:46:38AM +0200, Jan Kiszka wrote: > Gleb Natapov wrote: > > On Mon, Sep 22, 2008 at 09:59:07AM +0200, Jan Kiszka wrote: > >> @@ -2356,6 +2384,19 @@ static void vmx_inject_nmi(struct kvm_vc > >> { > >>struct vcpu_vmx *vmx = to_vmx(vcpu); > >> > >> + if (!cpu_has_vir

Re: VMX: Host NMI triggering on NMI vmexit

2008-09-23 Thread Yang, Sheng
On Tuesday 23 September 2008 16:47:54 Jan Kiszka wrote: > Yang, Sheng wrote: > > On Monday 22 September 2008 19:00:38 Avi Kivity wrote: > >> Jan Kiszka wrote: > Maybe the answer is to generate the local nmi via an IPI-to-self > command to the local apic. > >>> > >>> Going this way leaves

Re: [PATCH] don't enter guest after SIPI was received by a CPU

2008-09-23 Thread Avi Kivity
Gleb Natapov wrote: Don't enter guest after SIPI was issued. CPU should process SIPI message before entering a guest mode again. kvm_arch_vcpu_runnable() return true if CPU is in SIPI state, so we can't call it here. Applied, thanks. -- error compiling committee.c: too many arguments to f

Re: [PATCH 10/11] VMX: work around lacking VNMI support

2008-09-23 Thread Jan Kiszka
Gleb Natapov wrote: > On Tue, Sep 23, 2008 at 10:46:38AM +0200, Jan Kiszka wrote: >> Gleb Natapov wrote: >>> On Mon, Sep 22, 2008 at 09:59:07AM +0200, Jan Kiszka wrote: @@ -2356,6 +2384,19 @@ static void vmx_inject_nmi(struct kvm_vc { struct vcpu_vmx *vmx = to_vmx(vcpu); >

Re: [PATCH] x86 emulator: consolidate push reg

2008-09-23 Thread Avi Kivity
Guillaume Thouvenin wrote: This patch consolidate the emulation of push reg instruction. Signed-off-by: Guillaume Thouvenin <[EMAIL PROTECTED]> Signed-off-by: Laurent Vivier <[EMAIL PROTECTED]> Applied, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscri

Re: [PATCH 10/11] VMX: work around lacking VNMI support

2008-09-23 Thread Gleb Natapov
On Tue, Sep 23, 2008 at 10:57:40AM +0200, Jan Kiszka wrote: > Gleb Natapov wrote: > > On Tue, Sep 23, 2008 at 10:46:38AM +0200, Jan Kiszka wrote: > >> Gleb Natapov wrote: > >>> On Mon, Sep 22, 2008 at 09:59:07AM +0200, Jan Kiszka wrote: > @@ -2356,6 +2384,19 @@ static void vmx_inject_nmi(struc

Re: [PATCH 10/11] VMX: work around lacking VNMI support

2008-09-23 Thread Jan Kiszka
Gleb Natapov wrote: > On Mon, Sep 22, 2008 at 09:59:07AM +0200, Jan Kiszka wrote: >> @@ -2356,6 +2384,19 @@ static void vmx_inject_nmi(struct kvm_vc >> { >> struct vcpu_vmx *vmx = to_vmx(vcpu); >> >> +if (!cpu_has_virtual_nmis()) { >> +/* >> + * Tracking the NMI-

Re: VMX: Host NMI triggering on NMI vmexit

2008-09-23 Thread Jan Kiszka
Yang, Sheng wrote: > On Tuesday 23 September 2008 16:47:54 Jan Kiszka wrote: >> Yang, Sheng wrote: >>> On Monday 22 September 2008 19:00:38 Avi Kivity wrote: Jan Kiszka wrote: >> Maybe the answer is to generate the local nmi via an IPI-to-self >> command to the local apic. > Going

Re: [PATCH 10/11] VMX: work around lacking VNMI support

2008-09-23 Thread Yang, Sheng
On Tuesday 23 September 2008 17:00:21 Gleb Natapov wrote: > On Tue, Sep 23, 2008 at 10:57:40AM +0200, Jan Kiszka wrote: > > Gleb Natapov wrote: > > > On Tue, Sep 23, 2008 at 10:46:38AM +0200, Jan Kiszka wrote: > > >> Gleb Natapov wrote: > > >>> On Mon, Sep 22, 2008 at 09:59:07AM +0200, Jan Kiszka w

Re: [PATCH 10/11] VMX: work around lacking VNMI support

2008-09-23 Thread Gleb Natapov
On Tue, Sep 23, 2008 at 05:08:09PM +0800, Yang, Sheng wrote: > > > >>> We still get here with vmx->soft_vnmi_blocked = 1. Trying to find out > > > >>> how. > > > >> > > > >> We should only come along here with vnmi blocked on reinjection (after > > > >> a fault on calling the handler). > > > > > >

Re: [RFC] Extending MTRRs above 4G

2008-09-23 Thread Avi Kivity
Alex Williamson wrote: When I try to boot guests using a recent Linux kernel (2.6.26+), memory above 3.5G gets thrown away with an error like this: WARNING: BIOS bug: CPU MTRRs don't cover all of memory, losing 4608MB of RAM. And it's true, we're only providing MTRRs for memory below 4G. In fa

Re: [kvm] [RFC] Extending MTRRs above 4G

2008-09-23 Thread Avi Kivity
Alex Williamson wrote: On Wed, 2008-09-17 at 11:51 -0600, Alex Williamson wrote: the patch below is a possible approach to continue down this path and enlighten rombios32 about the real top of memory, and setup MTRRs appropriately. It doesn't address SMBIOS or whatever causes grub to only re

Re: [PATCH 10/11] VMX: work around lacking VNMI support

2008-09-23 Thread Yang, Sheng
On Tuesday 23 September 2008 17:15:09 Gleb Natapov wrote: > On Tue, Sep 23, 2008 at 05:08:09PM +0800, Yang, Sheng wrote: > > > > >>> We still get here with vmx->soft_vnmi_blocked = 1. Trying to find > > > > >>> out how. > > > > >> > > > > >> We should only come along here with vnmi blocked on reinj

Re: [PATCH] [KVM-userspace] remove compatibility code related to CONFIG_DMAR

2008-09-23 Thread Avi Kivity
Mike Day wrote: Compatibility code for intel_iommu no longer needed when dependency on CONFIG_DMAR removed from kvm kernel build. Signed-off-by: Mike D. Day <[EMAIL PROTECTED]> --- external-module-compat.c | 11 --- 1 file changed, 11 deletions(-) diff --git a/kernel/external-module-

Re: [PATCH]kvm/ia64: Qemu: Set pmcntrl to SCI_EN by default when initalize acpi.

2008-09-23 Thread Avi Kivity
Zhang, Xiantao wrote: From 80c85020dbb421053270b029c0bc4ca2a995f2e5 Mon Sep 17 00:00:00 2001 From: Xiantao Zhang <[EMAIL PROTECTED]> Date: Wed, 17 Sep 2008 15:10:37 +0800 Subject: [PATCH] kvm/ia64: Qemu: Set pmcntrl to SCI_EN by default when initalize acpi. Fix windows boot issue with acpi enabl

Re: [PATCH 10/11] VMX: work around lacking VNMI support

2008-09-23 Thread Gleb Natapov
On Tue, Sep 23, 2008 at 05:24:50PM +0800, Yang, Sheng wrote: > On Tuesday 23 September 2008 17:15:09 Gleb Natapov wrote: > > On Tue, Sep 23, 2008 at 05:08:09PM +0800, Yang, Sheng wrote: > > > > > >>> We still get here with vmx->soft_vnmi_blocked = 1. Trying to find > > > > > >>> out how. > > > > >

Re: [PATCH 10/11] VMX: work around lacking VNMI support

2008-09-23 Thread Yang, Sheng
On Tuesday 23 September 2008 17:15:09 Gleb Natapov wrote: > On Tue, Sep 23, 2008 at 05:08:09PM +0800, Yang, Sheng wrote: > > > > >>> We still get here with vmx->soft_vnmi_blocked = 1. Trying to find > > > > >>> out how. > > > > >> > > > > >> We should only come along here with vnmi blocked on reinj

Re: [PATCH 10/11] VMX: work around lacking VNMI support

2008-09-23 Thread Gleb Natapov
On Tue, Sep 23, 2008 at 05:42:02PM +0800, Yang, Sheng wrote: > > > That is exactly what I am using. Run it with SMP hal and do hibernate. > > > > Oh... Finally found how to enable that hibernate option > > > > And this hibernate works on my virtual_nmi supported box, with smp hal and > > 2 cpus

Re: [PATCH 10/11] VMX: work around lacking VNMI support

2008-09-23 Thread Yang, Sheng
On Tuesday 23 September 2008 17:45:44 Gleb Natapov wrote: > On Tue, Sep 23, 2008 at 05:42:02PM +0800, Yang, Sheng wrote: > > > > That is exactly what I am using. Run it with SMP hal and do > > > > hibernate. > > > > > > Oh... Finally found how to enable that hibernate option > > > > > > And thi

Re: [PATCH] Don't destroy vcpu in case vcpu_setup fails

2008-09-23 Thread Avi Kivity
Glauber Costa wrote: One of vcpu_setup responsibilities is to do mmu initialization. However, in case we fail in kvm_arch_vcpu_reset, before we get the chance to init mmu. OTOH, vcpu_destroy will attempt to destroy mmu, triggering a bug. Keeping track of whether or not mmu is initialized would un

Re: libkvm: kvm_init: check kvm context allocation and zero it

2008-09-23 Thread Avi Kivity
Uri Lublin wrote: Signed-off-by: Uri Lublin <[EMAIL PROTECTED]> --- libkvm/libkvm.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/libkvm/libkvm.c b/libkvm/libkvm.c index 1e7bbed..62bcb90 100644 --- a/libkvm/libkvm.c +++ b/libkvm/libkvm.c @@ -243,6 +243,9 @@ kvm_conte

Re: [PATCH 10/11] VMX: work around lacking VNMI support

2008-09-23 Thread Yang, Sheng
On Tuesday 23 September 2008 17:37:00 Yang, Sheng wrote: > On Tuesday 23 September 2008 17:26:55 Gleb Natapov wrote: > > On Tue, Sep 23, 2008 at 05:24:50PM +0800, Yang, Sheng wrote: > > > On Tuesday 23 September 2008 17:15:09 Gleb Natapov wrote: > > > > On Tue, Sep 23, 2008 at 05:08:09PM +0800, Yan

Re: [PATCH 10/11] VMX: work around lacking VNMI support

2008-09-23 Thread Yang, Sheng
On Tuesday 23 September 2008 17:26:55 Gleb Natapov wrote: > On Tue, Sep 23, 2008 at 05:24:50PM +0800, Yang, Sheng wrote: > > On Tuesday 23 September 2008 17:15:09 Gleb Natapov wrote: > > > On Tue, Sep 23, 2008 at 05:08:09PM +0800, Yang, Sheng wrote: > > > > > > >>> We still get here with vmx->soft_

Re: [Qemu-devel] [PATCH 0/3] Refactor AIO to allow multiple AIO implementations

2008-09-23 Thread Jamie Lokier
Ryan Harper wrote: > Addtional work has been done on top of QEMU for KVM and virtio-blk > devices. While virtio-blk is not yet upstream in QEMU, the AIO > changes here provide a tremendous performance improvement (from 7.6% > of native, to 100% of randwrite, and 3.9% of native, to 101.4% of > nati

Re: [PATCH 3/9] allow intersecting region to be on the boundary.

2008-09-23 Thread Avi Kivity
Glauber Costa wrote: On Sat, Sep 20, 2008 at 11:32:48AM -0700, Avi Kivity wrote: Glauber Costa wrote: Signed-off-by: Glauber Costa <[EMAIL PROTECTED]> --- libkvm/libkvm.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libkvm/libkvm.c b/libkvm/libkvm.c index

Re: mmotm 2008-09-22-01-36 uploaded (kvm)

2008-09-23 Thread Avi Kivity
Amit Shah wrote: Avi, please pick this up: http://article.gmane.org/gmane.comp.emulators.kvm.devel/21770 I applied this, thanks. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [E

Re: [patch 09/10] KVM: MMU: out of sync shadow core v2

2008-09-23 Thread Avi Kivity
Marcelo Tosatti wrote: I don't understand how the variables sp, child, and parent interact. You either need recursion or an explicit stack? It restarts at parent level whenever finishing any children: + if (i == PT64_ENT_PER_PAGE) { + sp->uns

Re: [patch 09/10] KVM: MMU: out of sync shadow core v2

2008-09-23 Thread Avi Kivity
Marcelo Tosatti wrote: It restarts at parent level whenever finishing any children: + if (i == PT64_ENT_PER_PAGE) { + sp->unsync_children = 0; + sp = parent; + } No efficiency. Do you prefer a recursive version for t

Re: Network Overruns

2008-09-23 Thread xming
On Sun, Sep 14, 2008 at 7:56 PM, xming <[EMAIL PROTECTED]> wrote: >> What is the oldest version that doesn't work? (i.e. when was the regression >> introduced?) > > I can (almost) be sure the kvm-70 did not have stalls and that kvm 73 > certainly > has this problem. > > Never tried 71 and I am no

Re: [patch 09/10] KVM: MMU: out of sync shadow core v2

2008-09-23 Thread Marcelo Tosatti
On Tue, Sep 23, 2008 at 01:46:23PM +0300, Avi Kivity wrote: > Marcelo Tosatti wrote: >>> I don't understand how the variables sp, child, and parent interact. >>> You either need recursion or an explicit stack? >>> >> >> It restarts at parent level whenever finishing any childre

[PATCH 00/40] KVM Updates for 2.6.28 merge window (part 1 of 3)

2008-09-23 Thread Avi Kivity
Here are the first 40 patches (out of 104, currently) for the 2.6.28 merge window. Linux 2.6.28 KVM will introduce support for pci device assignment and will improve overall emulation accuracy. Alexander Graf (1): KVM: Ignore DEBUGCTL MSRs with no effect Amit Shah (1): KVM: Introduce kvm_set

[PATCH 01/40] KVM: VMX: Rename misnamed msr bits

2008-09-23 Thread Avi Kivity
From: Sheng Yang <[EMAIL PROTECTED]> MSR_IA32_FEATURE_LOCKED is just a bit in fact, which shouldn't be prefixed with MSR_. So is MSR_IA32_FEATURE_VMXON_ENABLED. Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/vmx.c | 18 +---

[PATCH 02/40] KVM: x86: accessors for guest registers

2008-09-23 Thread Avi Kivity
From: Marcelo Tosatti <[EMAIL PROTECTED]> As suggested by Avi, introduce accessors to read/write guest registers. This simplifies the ->cache_regs/->decache_regs interface, and improves register caching which is important for VMX, where the cost of vmcs_read/vmcs_write is significant. [avi: fix w

[PATCH 05/40] KVM: MMU: Separate the code for unlinking a shadow page from its parents

2008-09-23 Thread Avi Kivity
From: Avi Kivity <[EMAIL PROTECTED]> Place into own function, in preparation for further cleanups. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/mmu.c |9 +++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index 3

[PATCH 06/40] KVM: MMU: Simplify kvm_mmu_zap_page()

2008-09-23 Thread Avi Kivity
From: Avi Kivity <[EMAIL PROTECTED]> The twisty maze of conditionals can be reduced. [joerg: fix tlb flushing] Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/mmu.c | 14 +- 1 files changed, 5 insertions(+), 9 deletion

[PATCH 08/40] KVM: VMX: Move nmi injection failure processing to vm exit path

2008-09-23 Thread Avi Kivity
From: Avi Kivity <[EMAIL PROTECTED]> Instead of processing nmi injection failure in the vm entry path, move it to the vm exit path (vm_complete_interrupts()). This separates nmi injection from nmi post-processing, and moves the nmi state from the VT state into vcpu state (new variable nmi_injecte

[PATCH 09/40] KVM: Clear exception queue before emulating an instruction

2008-09-23 Thread Avi Kivity
From: Avi Kivity <[EMAIL PROTECTED]> If we're emulating an instruction, either it will succeed, in which case any previously queued exception will be spurious, or we will requeue the same exception. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/x86.c |2 ++ arch/x86/kvm/x86.

[PATCH 10/40] KVM: VMX: Fix pending exception processing

2008-09-23 Thread Avi Kivity
From: Avi Kivity <[EMAIL PROTECTED]> The vmx code assumes that IDT-Vectoring can only be set when an exception is injected due to the exception in question. That's not true, however: if the exception is injected correctly, and later another exception occurs but its delivery is blocked due to a fa

[PATCH 04/40] KVM: Introduce kvm_set_irq to inject interrupts in guests

2008-09-23 Thread Avi Kivity
From: Amit Shah <[EMAIL PROTECTED]> This function injects an interrupt into the guest given the kvm struct, the (guest) irq number and the interrupt level. Signed-off-by: Amit Shah <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/irq.c | 11 +++ arch/x

[PATCH 11/40] KVM: Add a pending interrupt queue

2008-09-23 Thread Avi Kivity
From: Avi Kivity <[EMAIL PROTECTED]> Similar to the exception queue, this hold interrupts that have been accepted by the virtual processor core but not yet injected. Not yet used. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/x86.h | 11 +++ include/asm-x86/kv

[PATCH 12/40] KVM: VMX: Move interrupt post-processing to vmx_complete_interrupts()

2008-09-23 Thread Avi Kivity
From: Avi Kivity <[EMAIL PROTECTED]> Instead of looking at failed injections in the vm entry path, move processing to the exit path in vmx_complete_interrupts(). This simplifes the logic and removes any state that is hidden in vmx registers. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arc

[PATCH 13/40] KVM: VMX: Remove redundant check in handle_rmode_exception

2008-09-23 Thread Avi Kivity
From: Mohammed Gamal <[EMAIL PROTECTED]> Since checking for vcpu->arch.rmode.active is already done whenever we call handle_rmode_exception(), checking it inside the function is redundant. Signed-off-by: Mohammed Gamal <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x8

[PATCH 14/40] KVM: Consolidate PIC isr clearing into a function

2008-09-23 Thread Avi Kivity
From: Avi Kivity <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/i8259.c | 18 -- 1 files changed, 12 insertions(+), 6 deletions(-) diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c index c31164e..55e179a 100644 --- a/arch/x86/kvm/i8259

[PATCH 17/40] KVM: VMX: Unify register save/restore across 32 and 64 bit hosts

2008-09-23 Thread Avi Kivity
From: Avi Kivity <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/vmx.c | 90 +--- 1 files changed, 36 insertions(+), 54 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 2879880..fc8996b 10

[PATCH 07/40] KVM: Move NMI IRET fault processing to new vmx_complete_interrupts()

2008-09-23 Thread Avi Kivity
From: Avi Kivity <[EMAIL PROTECTED]> Currently most interrupt exit processing is handled on the entry path, which is confusing. Move the NMI IRET fault processing to a new function, vmx_complete_interrupts(), which is called on the vmexit path. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> ---

[PATCH 18/40] KVM: SVM: Unify register save/restore across 32 and 64 bit hosts

2008-09-23 Thread Avi Kivity
From: Avi Kivity <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/svm.c | 78 +-- 1 files changed, 26 insertions(+), 52 deletions(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index 743c98d..179c2e0 100

[PATCH 03/40] KVM: Move KVM TRACE DEFINITIONS to common header

2008-09-23 Thread Avi Kivity
From: Hollis Blanchard <[EMAIL PROTECTED]> Move KVM trace definitions from x86 specific kvm headers to common kvm headers to create a cross-architecture numbering scheme for trace events. This means the kvmtrace_format userspace tool won't need to know which architecture produced the log file bein

[PATCH 24/40] KVM: VMX: Avoid vmwrite(HOST_RSP) when possible

2008-09-23 Thread Avi Kivity
From: Avi Kivity <[EMAIL PROTECTED]> Usually HOST_RSP retains its value across guest entries. Take advantage of this and avoid a vmwrite() when this is so. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/vmx.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff

[PATCH 25/40] KVM: Ignore DEBUGCTL MSRs with no effect

2008-09-23 Thread Avi Kivity
From: Alexander Graf <[EMAIL PROTECTED]> Netware writes to DEBUGCTL and reads from the DEBUGCTL and LAST*IP MSRs without further checks and is really confused to receive a #GP during that. To make it happy we should just make them stubs, which is exactly what SVM already does. Writes to DEBUGCTL

[PATCH 15/40] KVM: Consolidate XX_VECTOR defines

2008-09-23 Thread Avi Kivity
From: Jan Kiszka <[EMAIL PROTECTED]> Signed-off-by: Jan Kiszka <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/svm.c |4 arch/x86/kvm/vmx.c |2 +- include/asm-x86/kvm_host.h |1 + 3 files changed, 2 insertions(+), 5 deletions(-)

[PATCH 16/40] KVM: VMX: Reinject real mode exception

2008-09-23 Thread Avi Kivity
From: Jan Kiszka <[EMAIL PROTECTED]> As we execute real mode guests in VM86 mode, exception have to be reinjected appropriately when the guest triggered them. For this purpose the patch adopts the real-mode injection pattern used in vmx_inject_irq to vmx_queue_exception, additionally taking care t

[PATCH 26/40] KVM: ppc: guest breakpoint support

2008-09-23 Thread Avi Kivity
From: Hollis Blanchard <[EMAIL PROTECTED]> Allow host userspace to program hardware debug registers to set breakpoints inside guests. Signed-off-by: Jerone Young <[EMAIL PROTECTED]> Signed-off-by: Hollis Blanchard <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/powerpc

[PATCH 28/40] KVM: ppc: Write only modified shadow entries into the TLB on exit

2008-09-23 Thread Avi Kivity
From: Hollis Blanchard <[EMAIL PROTECTED]> Track which TLB entries need to be written, instead of overwriting everything below the high water mark. Typically only a single guest TLB entry will be modified in a single exit. Guest boot time performance improvement: about 15%. Signed-off-by: Hollis

[PATCH 23/40] KVM: ppc: trace powerpc instruction emulation

2008-09-23 Thread Avi Kivity
From: Christian Ehrhardt <[EMAIL PROTECTED]> This patch adds a trace point for the instruction emulation on embedded powerpc utilizing the KVM_TRACE interface. Signed-off-by: Christian Ehrhardt <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/powerpc/kvm/emulate.c |

[PATCH 31/40] KVM: irq ack notification

2008-09-23 Thread Avi Kivity
From: Marcelo Tosatti <[EMAIL PROTECTED]> Based on a patch from: Ben-Ami Yassour <[EMAIL PROTECTED]> which was based on a patch from: Amit Shah <[EMAIL PROTECTED]> Notify IRQ acking on PIC/APIC emulation. The previous patch missed two things: - Edge triggered interrupts on IOAPIC - PIC reset wit

[PATCH 22/40] KVM: ppc: adds trace points for ppc tlb activity

2008-09-23 Thread Avi Kivity
From: Jerone Young <[EMAIL PROTECTED]> This patch adds trace points to track powerpc TLB activities using the KVM_TRACE infrastructure. Signed-off-by: Jerone Young <[EMAIL PROTECTED]> Signed-off-by: Christian Ehrhardt <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/pow

[PATCH 20/40] KVM: kvmtrace: replace get_cycles with ktime_get v3

2008-09-23 Thread Avi Kivity
From: Christian Ehrhardt <[EMAIL PROTECTED]> The current kvmtrace code uses get_cycles() while the interpretation would be easier using using nanoseconds. ktime_get() should give at least the same accuracy as get_cycles on all architectures (even better on 32bit archs) but at a better unit (e.g. c

[PATCH 32/40] KVM: PIT: fix injection logic and count

2008-09-23 Thread Avi Kivity
From: Marcelo Tosatti <[EMAIL PROTECTED]> The PIT injection logic is problematic under the following cases: 1) If there is a higher priority vector to be delivered by the time kvm_pit_timer_intr_post is invoked ps->inject_pending won't be set. This opens the possibility for missing many PIT event

[PATCH 30/40] KVM: Add irq ack notifier list

2008-09-23 Thread Avi Kivity
From: Avi Kivity <[EMAIL PROTECTED]> This can be used by kvm subsystems that are interested in when interrupts are acked, for example time drift compensation. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/irq.c | 22 ++ arch/x86/kvm/irq.h |

[PATCH 33/40] x86: paravirt: factor out cpu_khz to common code

2008-09-23 Thread Avi Kivity
From: Glauber Costa <[EMAIL PROTECTED]> KVM intends to use paravirt code to calibrate khz. Xen current code will do just fine. So as a first step, factor out code to pvclock.c. Signed-off-by: Glauber Costa <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kernel/pvcl

[PATCH 34/40] x86: KVM guest: use paravirt function to calculate cpu khz

2008-09-23 Thread Avi Kivity
From: Glauber Costa <[EMAIL PROTECTED]> We're currently facing timing problems in guests that do calibration under heavy load, and then the load vanishes. This means we'll have a much lower lpj than we actually should, and delays end up taking less time than they should, which is a nasty bug. Sol

[PATCH 27/40] KVM: ppc: Stop saving host TLB state

2008-09-23 Thread Avi Kivity
From: Hollis Blanchard <[EMAIL PROTECTED]> We're saving the host TLB state to memory on every exit, but never using it. Originally I had thought that we'd want to restore host TLB for heavyweight exits, but that could actually hurt when context switching to an unrelated host process (i.e. not qemu

[PATCH 40/40] KVM: Reduce stack usage in kvm_pv_mmu_op()

2008-09-23 Thread Avi Kivity
From: Dave Hansen <[EMAIL PROTECTED]> We're in a hot path. We can't use kmalloc() because it might impact performance. So, we just stick the buffer that we need into the kvm_vcpu_arch structure. This is used very often, so it is not really a waste. We also have to move the buffer structure's d

[PATCH 19/40] KVM: kvmtrace: Remove use of bit fields in kvm trace structure

2008-09-23 Thread Avi Kivity
From: Christian Ehrhardt <[EMAIL PROTECTED]> This patch fixes kvmtrace use on big endian systems. When using bit fields the compiler will lay data out in the wrong order expected when laid down into a file. This fixes it by using one variable instead of using bit fields. Signed-off-by: Jerone You

[PATCH 21/40] KVM: ppc: enable KVM_TRACE building for powerpc

2008-09-23 Thread Avi Kivity
From: Jerone Young <[EMAIL PROTECTED]> This patch enables KVM_TRACE to build for PowerPC arch. This means just adding sections to Kconfig and Makefile. Signed-off-by: Jerone Young <[EMAIL PROTECTED]> Signed-off-by: Christian Ehrhardt <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED

[PATCH 35/40] KVM: direct mmio pfn check

2008-09-23 Thread Avi Kivity
From: Ben-Ami Yassour <[EMAIL PROTECTED]> Userspace may specify memory slots that are backed by mmio pages rather than normal RAM. In some cases it is not enough to identify these mmio pages by pfn_valid(). This patch adds checking the PageReserved as well. Signed-off-by: Ben-Ami Yassour <[EMAI

[PATCH 36/40] KVM: pci device assignment

2008-09-23 Thread Avi Kivity
From: Ben-Ami Yassour <[EMAIL PROTECTED]> Based on a patch from: Amit Shah <[EMAIL PROTECTED]> This patch adds support for handling PCI devices that are assigned to the guest. The device to be assigned to the guest is registered in the host kernel and interrupt delivery is handled. If a device

[PATCH 39/40] KVM: Reduce stack usage in kvm_arch_vcpu_ioctl()

2008-09-23 Thread Avi Kivity
From: Dave Hansen <[EMAIL PROTECTED]> [sheng: fix KVM_GET_LAPIC using wrong size] Signed-off-by: Dave Hansen <[EMAIL PROTECTED]> Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/x86.c | 23 +++ 1 files changed, 15

[PATCH 29/40] KVM: powerpc: Map guest userspace with TID=0 mappings

2008-09-23 Thread Avi Kivity
From: Hollis Blanchard <[EMAIL PROTECTED]> When we use TID=N userspace mappings, we must ensure that kernel mappings have been destroyed when entering userspace. Using TID=1/TID=0 for kernel/user mappings and running userspace with PID=0 means that userspace can't access the kernel mappings, but t

[PATCH 38/40] KVM: Reduce stack usage in kvm_vcpu_ioctl()

2008-09-23 Thread Avi Kivity
From: Dave Hansen <[EMAIL PROTECTED]> Signed-off-by: Dave Hansen <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- virt/kvm/kvm_main.c | 46 -- 1 files changed, 28 insertions(+), 18 deletions(-) diff --git a/virt/kvm/kvm_main.c b/

[PATCH 37/40] KVM: Reduce kvm stack usage in kvm_arch_vm_ioctl()

2008-09-23 Thread Avi Kivity
From: Dave Hansen <[EMAIL PROTECTED]> On my machine with gcc 3.4, kvm uses ~2k of stack in a few select functions. This is mostly because gcc fails to notice that the different case: statements could have their stack usage combined. It overflows very nicely if interrupts happen during one of the

Re: [PATCH] kvm/ia64: Qemu : Fix Guest boot issue with >3G memory.

2008-09-23 Thread Avi Kivity
Zhang, Xiantao wrote: Hi, Avi Seems this patch is missing after merging with Qemu upstream, please help to apply it again. Sure; done. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a

Re: [Qemu-devel] Re: [PATCH 1/3] Only call aio flush handler if set

2008-09-23 Thread Ryan Harper
* Anthony Liguori <[EMAIL PROTECTED]> [2008-09-22 21:49]: > Ryan Harper wrote: > >If the aio handler doesn't register an io_flush handler, we'd SEGV; fix > >that by > >only calling the flush handler if set. BTW, aio handlers *should* > >register an > >io_flush routine. > > > >Signed-off-by: Ryan

Re: Network Overruns

2008-09-23 Thread xming
>>> What is the oldest version that doesn't work? (i.e. when was the regression >>> introduced?) >> >> I can (almost) be sure the kvm-70 did not have stalls and that kvm 73 >> certainly >> has this problem. >> >> Never tried 71 and I am not sure about 72 (haven't ran it for long >> time and upgra

Re: [Qemu-devel] Re: [PATCH 1/3] Only call aio flush handler if set

2008-09-23 Thread Anthony Liguori
Ryan Harper wrote: * Anthony Liguori <[EMAIL PROTECTED]> [2008-09-22 21:49]: Ryan Harper wrote: If the aio handler doesn't register an io_flush handler, we'd SEGV; fix that by only calling the flush handler if set. BTW, aio handlers *should* register an io_flush routine. Signed-off-

[ kvm-Bugs-2124690 ] external modules dont support seperate linux output dir

2008-09-23 Thread SourceForge.net
Bugs item #2124690, was opened at 2008-09-23 16:38 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=893831&aid=2124690&group_id=180599 Please note that this message will contain a full copy

Re: [Qemu-devel] Re: [PATCH 2/3] Move aio implementation out of raw block driver

2008-09-23 Thread Ryan Harper
* Anthony Liguori <[EMAIL PROTECTED]> [2008-09-22 21:52]: > Ryan Harper wrote: > >+//#define DEBUG_BLOCK_AIO > >+#if defined(DEBUG_BLOCK_AIO) > >+#define BLPRINTF(formatCstr, args...) do { fprintf(stderr, formatCstr, > >##args); fflush(stderr); } while (0) > > > > This is GCC syntax. You shou

Re: [PATCH 6/9] x86/iommu: change Calgary to use dma_ops register interface

2008-09-23 Thread Muli Ben-Yehuda
On Mon, Sep 22, 2008 at 08:21:18PM +0200, Joerg Roedel wrote: > Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> > --- > arch/x86/kernel/pci-calgary_64.c | 21 +++-- > 1 files changed, 11 insertions(+), 10 deletions(-) > > diff --git a/arch/x86/kernel/pci-calgary_64.c > b/arch/x

Re: [Qemu-devel] Re: [PATCH 2/3] Move aio implementation out of raw block driver

2008-09-23 Thread Anthony Liguori
Ryan Harper wrote: * Anthony Liguori <[EMAIL PROTECTED]> [2008-09-22 21:52]: Ryan Harper wrote: This was taken from block-raw-posix.c, DEBUG_BLOCK. I'll change up the DEBUG_BLOCK_AIO, should I also submit a patch to rework DEBUG_BLOCK? Yes, please. +typedef struct AIODriver

Re: [Qemu-devel] Re: [PATCH 1/3] Only call aio flush handler if set

2008-09-23 Thread Ryan Harper
* Anthony Liguori <[EMAIL PROTECTED]> [2008-09-23 09:36]: > Ryan Harper wrote: > >* Anthony Liguori <[EMAIL PROTECTED]> [2008-09-22 21:49]: > > > >>Ryan Harper wrote: > >> > >>>If the aio handler doesn't register an io_flush handler, we'd SEGV; fix > >>>that by > >>>only calling the flush ha

Re: [Qemu-devel] Re: [PATCH 0/3] Refactor AIO to allow multiple AIO implementations

2008-09-23 Thread Ryan Harper
* Anthony Liguori <[EMAIL PROTECTED]> [2008-09-22 22:44]: > Can you run the same performance tests with the following patches (using > sync=on instead of cache=off)? > > You'll need my aio_init fix too. I suspect this will give equally good > performance to your patch set. That's not saying yo

Re: [Qemu-devel] Re: [PATCH 0/3] Refactor AIO to allow multiple AIO implementations

2008-09-23 Thread Anthony Liguori
Ryan Harper wrote: * Anthony Liguori <[EMAIL PROTECTED]> [2008-09-22 22:44]: Can you run the same performance tests with the following patches (using sync=on instead of cache=off)? You'll need my aio_init fix too. I suspect this will give equally good performance to your patch set. That'

Re: [Qemu-devel] Re: [PATCH 1/3] Only call aio flush handler if set

2008-09-23 Thread Anthony Liguori
Ryan Harper wrote: * Anthony Liguori <[EMAIL PROTECTED]> [2008-09-23 09:36]: I disagree that anything is worse off by not SEGV'ing, In any case, what do you want here? Read or Write must be set along with flush or we error in fd registration? Yes. Regards, Anthony Liguori -- To uns

Re: [Qemu-devel] Re: [PATCH 2/3] Move aio implementation out of raw block driver

2008-09-23 Thread Gerd Hoffmann
Ryan Harper wrote: >> So what happens if !defined(CONFIG_AIO)? By my reading of the code, >> aio_drv will be NULL and this will SEGV. > > raw_aio_read/write/cancel aren't included in the bdrv structure unless > CONFIG_AIO is defined. Rather in bdrv_register, the aio emulation > functions are us

[PATCH 2/7] qemu: Introduce pci_map_irq to get irq nr from pin number for a PCI device

2008-09-23 Thread Amit Shah
Signed-off-by: Amit Shah <[EMAIL PROTECTED]> --- qemu/hw/pci.c |5 + qemu/hw/pci.h |1 + 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/qemu/hw/pci.c b/qemu/hw/pci.c index 07d37a8..61ff0f6 100644 --- a/qemu/hw/pci.c +++ b/qemu/hw/pci.c @@ -560,6 +560,11 @@ static void p

[PATCH 3/7] qemu: piix: Introduce functions to get pin number from irq and vice versa

2008-09-23 Thread Amit Shah
Signed-off-by: Amit Shah <[EMAIL PROTECTED]> --- qemu/hw/piix_pci.c | 19 +++ 1 files changed, 19 insertions(+), 0 deletions(-) diff --git a/qemu/hw/piix_pci.c b/qemu/hw/piix_pci.c index 6fbf47b..dc12c8a 100644 --- a/qemu/hw/piix_pci.c +++ b/qemu/hw/piix_pci.c @@ -243,6 +243,25

[PATCH 1/7] KVM/userspace: Device Assignment: Add ioctl wrappers needed for assigning devices

2008-09-23 Thread Amit Shah
Signed-off-by: Amit Shah <[EMAIL PROTECTED]> --- libkvm/libkvm.c | 13 + libkvm/libkvm.h | 27 +++ 2 files changed, 40 insertions(+), 0 deletions(-) diff --git a/libkvm/libkvm.c b/libkvm/libkvm.c index 63fbcba..7744daa 100644 --- a/libkvm/libkvm.c +++ b/lib

[V6] Userspace patches for PCI device assignment

2008-09-23 Thread Amit Shah
This patchset enables device assignment for KVM hosts for PCI devices. It uses the Intel IOMMU by default if available. Major changes since the last send: - More error checking - Change data structure names to match qemu style - Add support for hot-adding devices (this works, but is currently RF

[PATCH 6/7] KVM/userspace: Build vtd.c for Intel IOMMU support

2008-09-23 Thread Amit Shah
Signed-off-by: Amit Shah <[EMAIL PROTECTED]> --- kernel/x86/Kbuild |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/kernel/x86/Kbuild b/kernel/x86/Kbuild index 8dc0483..a4cd00c 100644 --- a/kernel/x86/Kbuild +++ b/kernel/x86/Kbuild @@ -5,6 +5,9 @@ kvm-objs := kvm_main.o x

[PATCH 7/7] KVM/userspace: Device Assignment: Support for hot plugging PCI devices

2008-09-23 Thread Amit Shah
This patch adds support for hot-plugging host PCI devices into guests Signed-off-by: Amit Shah <[EMAIL PROTECTED]> --- qemu/hw/device-hotplug.c | 19 +++ qemu/monitor.c |2 +- 2 files changed, 20 insertions(+), 1 deletions(-) diff --git a/qemu/hw/device-hotplug.c

[PATCH 5/7] KVM/userspace: Device Assignment: Support for assigning PCI devices to guests

2008-09-23 Thread Amit Shah
From: Or Sagi <[EMAIL PROTECTED]> From: Nir Peleg <[EMAIL PROTECTED]> From: Amit Shah <[EMAIL PROTECTED]> From: Ben-Ami Yassour <[EMAIL PROTECTED]> From: Weidong Han <[EMAIL PROTECTED]> From: Glauber de Oliveira Costa <[EMAIL PROTECTED]> With this patch, we can assign a device on the host machine

[PATCH 4/7] qemu: Include hw.h in qemu/hw/isa.h to fix compile issues

2008-09-23 Thread Amit Shah
Signed-off-by: Amit Shah <[EMAIL PROTECTED]> --- qemu/hw/isa.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/qemu/hw/isa.h b/qemu/hw/isa.h index 222e4f3..e4a1326 100644 --- a/qemu/hw/isa.h +++ b/qemu/hw/isa.h @@ -2,6 +2,8 @@ #define HW_ISA_H /* ISA bus */ +#include

Re: [PATCH 5/9] kvm-x86: Enable NMI Watchdog via in-kernel PIT source

2008-09-23 Thread Jan Kiszka
Yang, Sheng wrote: > On Friday 19 September 2008 20:03:02 Jan Kiszka wrote: >> LINT0 of the LAPIC can be used to route PIT events as NMI watchdog >> ticks into the guest. This patch aligns the in-kernel irqchip emulation >> with the user space irqchip with already supports this feature. The >> tric

Re: [PATCH 10/11] VMX: work around lacking VNMI support

2008-09-23 Thread Jan Kiszka
Yang, Sheng wrote: > On Tuesday 23 September 2008 17:00:21 Gleb Natapov wrote: >> On Tue, Sep 23, 2008 at 10:57:40AM +0200, Jan Kiszka wrote: >>> Gleb Natapov wrote: On Tue, Sep 23, 2008 at 10:46:38AM +0200, Jan Kiszka wrote: > Gleb Natapov wrote: >> On Mon, Sep 22, 2008 at 09:59:07AM

  1   2   >