Re: [kvm-devel] [PATCH 0/5]Add kvm trace support v3

2008-04-10 Thread Avi Kivity
Liu, Eric E wrote: > Hi, Avi and all > According to your comments from V2, I work out the new patchsets > of kvm trace. Please help to review, Thanks. > In this version, fix the issues you pointed out and add a new ioctl > PAUSE to make user space app better to control trace stream. > Hope i

Re: [kvm-devel] [PATCH 0/3] SVM: handle MCEs properly

2008-04-10 Thread Avi Kivity
Joerg Roedel wrote: > This patchset implements proper MCE handling for SVM in the KVM hypervisor. > Currently KVM does not set CR4.MCE when it runs the guest. When a MCE > condition > occurs while the guest is running the exception gets lost. This may result in > data corruption or other undefined

Re: [kvm-devel] [PATCH] kvm-userspace: fix compilation breakage when in-kernel pit is not detected

2008-04-10 Thread Avi Kivity
Joerg Roedel wrote: > The compilation of kvm-userspace part fails if the in-kernel pit is not > detected in with the following error message: > > pc.o: In function `pc_init1': > /home/jroedel/src/kvm/kvm-userspace/qemu/hw/pc.c:987: undefined reference to > `kvm_pit_init' > collect2: ld returned 1

Re: [kvm-devel] [patch 0/4] fix SMP migration and loadvm/savevm (V2)

2008-04-08 Thread Avi Kivity
Marcelo Tosatti wrote: > Avi, I prefer not to fold mpstate into kvm_save_registers() as a hidden > register because the MPSTATE is only used during migration, whereas > save_registers() is not (seems safer) But that's the point... what about savevm/loadvm, etc? They deserve to work too. -- An

Re: [kvm-devel] Compilation problems with git tree

2008-04-08 Thread Avi Kivity
Zdenek Kabelac wrote: > Core was generated by `qemu-kvm -s -m 320 -smp 2 -net nic,model=pcnet > -net user -redir'. > Program terminated with signal 11, Segmentation fault. > > #0 0x004849a7 in tcp_reass (tp=0x7fabec000d60, ti=0xec000d60, > m=0x0) at slirp/tcp_input.c:208 > User mode ne

Re: [kvm-devel] [PATCH] gfxboot VMX workaround v2

2008-04-08 Thread Avi Kivity
Guillaume Thouvenin wrote: >>> >>> >> x86 emulate is missing support for jmp far which is used to switch into >> protected mode. It just needs to be added. >> > > Ok I see. I understand now why you said in a previous email that KVM > needs to have a proper load_seg() function like

Re: [kvm-devel] [PATCH RFC 1/5]Add some trace enties and define interface for tracing

2008-04-08 Thread Avi Kivity
Liu, Eric E wrote: >> >> High order 32 bits of cr2 are lost. >> >> > > May I use KVMTRACE_3D(PAGE_FAULT, vcpu, error_code, (u32)cr2, > (u32)((u64)cr2 >> 32), handler) to handle this? > for 32bit gust, it traces some excess data, but after all for 64bit > guest, we don't lost high order bits.

Re: [kvm-devel] [PATCH 0 of 9] mmu notifier #v12

2008-04-08 Thread Avi Kivity
Andrea Arcangeli wrote: > Note that mmu_notifier_unregister may also fail with -EINTR if there are > signal pending or the system runs out of vmalloc space or physical memory, > only exit_mmap guarantees that any kernel module can be unloaded in presence > of an oom condition. > > That's unusua

Re: [kvm-devel] [patch 3/4] QEMU/KVM: ignore SIG_IPI signals in userspace

2008-04-07 Thread Avi Kivity
Marcelo Tosatti wrote: > On Sun, Apr 06, 2008 at 12:15:07PM +0300, Avi Kivity wrote: > >> Marcelo Tosatti wrote: >> >>> Otherwise a signal can be received in userspace and a vcpu goes back >>> to the kernel while it should stay still. >>&g

[kvm-devel] Call for Presentations: KVM Forum 2008

2008-04-07 Thread Avi Kivity
unity about your work, and to gather valuable feedback about your approach. Please send your presentation proposal to the KVM Forum 2008 Content Committee at [EMAIL PROTECTED] by April 20th. KVM Forum 2008 Content Committee: Dor Laor Anthony Liguori Avi Kivity [1] http://kforum.qumranet.com/KVM

Re: [kvm-devel] [PATCH] gfxboot VMX workaround v2

2008-04-07 Thread Avi Kivity
Anthony Liguori wrote: > Yes, but it won't compile as KVM does not have a proper load_seg() > function like the Xen's x86_emulate. Izik added something for task switching (see load_segment_descriptor). -- Any sufficiently difficult bug is indistinguishable from a feature.

Re: [kvm-devel] performance tuning, problem with paravirtualized clock

2008-04-06 Thread Avi Kivity
Nikola Ciprich wrote: > Hi, > I spent some time trying to tune performance of KVM guest using kernel > compilation as a kind of benchmark (I'm using virtual machines for > compiling a lot, so it's good benchmark for me in general) > > Host machine: 2x quad core XEON E5420 @ 2.50GHz, 4GB RAM, 2.6

Re: [kvm-devel] Need info on guest swapping and other things in KVM

2008-04-06 Thread Avi Kivity
Please don't top-post. Arjun wrote: > Avi, > Thanks for your response. > > Regarding the query on "Guest Swapping", I'm referring to the > mechanism that the KVM host can use to swap out a guest's pages. Since > a guest OS will have its own swapping mechanism, then how will the > host ensure th

[kvm-devel] [ANNOUNCE] kvm-65 release

2008-04-06 Thread Avi Kivity
The big item (in more ways than one) for this release is the addition of s390 support. As it is not actually provided in the tarball, you will need to use git to fetch it. You will also need a mainframe. On x86, the most interesting change is the separation of timer and I/O completion handlin

Re: [kvm-devel] [ANN] Bochs bios ported to gcc

2008-04-06 Thread Avi Kivity
Kevin O'Connor wrote: > I have been working on a port of bochs bios to gcc. This port is > nearly complete. The new code does not rely on bcc or dev86. > Instead, it uses standard gcc and gas. It should compile on any > recent Linux distribution. > > I'm sending this email because I understand k

Re: [kvm-devel] [PATCH] Don't assume struct page for x86 MMU

2008-04-06 Thread Avi Kivity
Anthony Liguori wrote: > This patch introduces a gfn_to_pfn() function and corresponding functions like > kvm_release_pfn_dirty(). Using these new functions, we can modify the x86 > MMU to no longer assume that it can always get a struct page for any given > gfn. > > We don't want to eliminate gf

Re: [kvm-devel] [patch 4/4] QEMU/KVM: dont read any bits from userspace APIC emulation if its done in-kernel

2008-04-06 Thread Avi Kivity
Marcelo Tosatti wrote: > Fixes loadvm/savem on SMP. > > Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> > > Index: kvm-userspace.io/qemu/hw/apic.c > === > --- kvm-userspace.io.orig/qemu/hw/apic.c > +++ kvm-userspace.io/qemu/hw/apic.

Re: [kvm-devel] [patch 3/4] QEMU/KVM: ignore SIG_IPI signals in userspace

2008-04-06 Thread Avi Kivity
Marcelo Tosatti wrote: > Otherwise a signal can be received in userspace and a vcpu goes back > to the kernel while it should stay still. > > Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> > > Index: kvm-userspace.io/qemu/qemu-kvm.c >

Re: [kvm-devel] [patch 2/4] QEMU/KVM: save and load mp state

2008-04-06 Thread Avi Kivity
Marcelo Tosatti wrote: > Use the new ioctl's to save and restore the MP_STATE for all vcpu's. > > Fixes SMP migration. > > Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> > > Index: kvm-userspace.io/libkvm/libkvm.c > === > --- kvm-u

Re: [kvm-devel] [patch 1/4] QEMU/KVM: only use KVM apic registers if vm is running

2008-04-06 Thread Avi Kivity
Marcelo Tosatti wrote: > In the -incoming case the apic regs are not initialized and therefore > bogus. > > Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> > > Index: kvm-userspace.io/qemu/qemu-kvm-x86.c > === > --- kvm-userspace.io

Re: [kvm-devel] [Patch][00/18] kvm-ia64 for kernel V10

2008-04-06 Thread Avi Kivity
Zhang, Xiantao wrote: > Compared with V9, just fixed indentation issues in patch 12. I put it > the patchset in > git://git.kernel.org/pub/scm/linux/kernel/git/xiantao/kvm-ia64.git > kvm-ia64-mc10. Please help to review. > Specially, the first two patches (TR Management patch and > smp_call_functi

Re: [kvm-devel] Need info on guest swapping and other things in KVM

2008-04-06 Thread Avi Kivity
Arjun wrote: > Hi Folks, > > A fellow student and I wish to do run some experiments with KVM. > Specifically, we would like to examine > KVM's guest paging/swapping mechanism, make some changes and run some > tests. After a brief search through > the docs and code, we would greatly appreciate hel

Re: [kvm-devel] Ubuntu Gutsy host / XP guest / -smp 2

2008-04-05 Thread Avi Kivity
David Abrahams wrote: > on Wed Apr 02 2008, Avi Kivity wrote: > > >> David Abrahams wrote: >> >>> With the title combination, the guest takes nearly 100% of my real CPU >>> time and still only sees one CPU. Is this a known problem

Re: [kvm-devel] [PATCH] Fix external module install for new host kernels

2008-04-05 Thread Avi Kivity
Anthony Liguori wrote: > KVM kernel modules are now located in arch/x86/kvm so make sure to rename > those > too. > > Applied, thanks. Though the kvm provided with 2.6.25 should be good enough for most uses. -- Any sufficiently difficult bug is indistinguishable from a feature. -

Re: [kvm-devel] [PATCH] account for start offset on largepage aligned-sized memslots

2008-04-04 Thread Avi Kivity
Marcelo Tosatti wrote: > Account for the case where memslot size is largepage aligned, but does not > start on largepage aligned offset. > > Otherwise it allocates one lpage_info struct less than what the memslot > spans, possibly resulting in memory corruption. > Applied, thanks. -- Any suf

Re: [kvm-devel] QEMU/KVM: make kvm_arch_load_regs() aware of in kernel APIC

2008-04-04 Thread Avi Kivity
Marcelo Tosatti wrote: > kvm_arch_load_regs() might load APIC base and APIC TPR from the > uninitialized userspace APIC emulation. > > This happened when running X11 on SMP guest in my case, disabling the > APIC for vcpu3: > > vcpu not ready for apic_round_robin > vcpu not ready for apic_round_robi

Re: [kvm-devel] [PATCH] Fix vmmouse with -smp

2008-04-04 Thread Avi Kivity
Anthony Liguori wrote: > The vmport code is very broken for SMP guests. It uses a global CPUState > that's initialized multiple times? At any rate, since it needs to know CPU > registers for the current CPU in a PIO handler, it needs to use > cpu_single_env. > > This patch makes vmmouse when usi

Re: [kvm-devel] [PATCH 03/04 v2] kvm-s390: Improve pgste accesses

2008-04-04 Thread Avi Kivity
Carsten Otte wrote: > From: Heiko Carstens <[EMAIL PROTECTED]> > > There is no need to use interlocked updates when the rcp > lock is held. Therefore the simple bitops variants can be > used. This should improve performance. > > Applied this fixed patch as well, thanks. -- Any sufficiently dif

Re: [kvm-devel] [PATCH 00/04] kvm-s390 updates

2008-04-04 Thread Avi Kivity
Carsten Otte wrote: > Hi Avi, > > looks like Heiko played around with kvm a bit :-): > 01/04: cosmetics, including part of Arnd's review feedback > 02/04: bugfix, if KVM_VCPU_IOCTL_RUN got interrupted by signal > 03/04: performance improvement with our pgste memory handling > 04/04: resolve merge c

Re: [kvm-devel] [PATCH 03/04] kvm-s390: Improve pgste accesses

2008-04-04 Thread Avi Kivity
Carsten Otte wrote: > From: Heiko Carstens <[EMAIL PROTECTED]> > > There is no need to use interlocked updates when the rcp > lock is held. Therefore the simple bitops variants can be > used. This should improve performance. > > skey = page_get_storage_key(page_to_phys(page)); > if (skey & _PAGE_CH

Re: [kvm-devel] [PATCH] prepopulate guest pages after write-protecting

2008-04-04 Thread Avi Kivity
Marcelo Tosatti wrote: > Zdenek reported a bug where a looping "dmsetup status" eventually hangs > on SMP guests. > > The problem is that kvm_mmu_get_page() prepopulates the shadow MMU > before write protecting the guest page tables. By doing so, it leaves a > window open where the guest can mark a

[kvm-devel] [PATCH 27/35] KVM: kvm.h: __user requires compiler.h

2008-04-03 Thread Avi Kivity
, this works on x86 only coincidentally due to other include files. This patch makes kvm.h compile in all cases. Signed-off-by: Christian Borntraeger <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- include/linux/kvm.h |1 + 1 files changed, 1 insertions(+), 0

[kvm-devel] [PATCH 09/35] KVM: Prefix control register accessors with kvm_ to avoid namespace pollution

2008-04-03 Thread Avi Kivity
Names like 'set_cr3()' look dangerously close to affecting the host. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/vmx.c | 14 ++-- arch/x86/kvm/x86.c | 46 ++-- include/asm-x86/kvm_host.h |

[kvm-devel] [PATCH 24/35] x86: allow machine_crash_shutdown to be replaced

2008-04-03 Thread Avi Kivity
From: Glauber Costa <[EMAIL PROTECTED]> This patch a llows machine_crash_shutdown to be replaced, just like any of the other functions in machine_ops Signed-off-by: Glauber Costa <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kernel/crash.c |

[kvm-devel] [PATCH 35/35] KVM: x86: hardware task switching support

2008-04-03 Thread Avi Kivity
From: Izik Eidus <[EMAIL PROTECTED]> This emulates the x86 hardware task switch mechanism in software, as it is unsupported by either vmx or svm. It allows operating systems which use it, like freedos, to run as kvm guests. Signed-off-by: Izik Eidus <[EMAIL PROTECTED]> Signed-off-by

[kvm-devel] [PATCH 34/35] KVM: x86: add functions to get the cpl of vcpu

2008-04-03 Thread Avi Kivity
From: Izik Eidus <[EMAIL PROTECTED]> Signed-off-by: Izik Eidus <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/svm.c |8 arch/x86/kvm/vmx.c | 15 +++ include/asm-x86/kvm_host.h |1 + 3 files chan

[kvm-devel] [PATCH 08/35] KVM: MMU: large page support

2008-04-03 Thread Avi Kivity
ram mounted filesystem, without NPT/EPT. Anthony measures a 4% improvement on 4-way kernbench, with NPT. Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/mmu.c | 222 +++

[kvm-devel] [PATCH 26/35] x86: KVM guest: disable clock before rebooting.

2008-04-03 Thread Avi Kivity
es the functions shutdown, used in the path of kernel_kexec() (sys.c) and crash_shutdown, used in the path of crash_kexec() (kexec.c) Signed-off-by: Glauber Costa <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kernel/kvmclock.c | 27 ++

[kvm-devel] [PATCH 30/35] KVM: MMU: fix dirty bit setting when removing write permissions

2008-04-03 Thread Avi Kivity
ly and therefor mmu_set_spte will release the pages as clean. This patch fix this issue by marking the page as dirty inside rmap_write_protect(). Signed-off-by: Izik Eidus <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/mmu.c |8 1 files cha

[kvm-devel] [PATCH 28/35] KVM: MMU: Set the accessed bit on non-speculative shadow ptes

2008-04-03 Thread Avi Kivity
If we populate a shadow pte due to a fault (and not speculatively due to a pte write) then we can set the accessed bit on it, as we know it will be set immediately on the next guest instruction. This saves a read-modify-write operation. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- ar

[kvm-devel] [PATCH 32/35] KVM: no longer EXPERIMENTAL

2008-04-03 Thread Avi Kivity
Long overdue. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/Kconfig |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/arch/x86/kvm/Kconfig b/arch/x86/kvm/Kconfig index 41962e7..76c70ab 100644 --- a/arch/x86/kvm/Kconfig +++ b/arch/x86/kvm/Kconfig @@

[kvm-devel] [PATCH 31/35] KVM: MMU: Introduce and use spte_to_page()

2008-04-03 Thread Avi Kivity
Encapsulate the pte mask'n'shift in a function. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/mmu.c | 17 - 1 files changed, 12 insertions(+), 5 deletions(-) diff --git a/arch/x86/kvm/mmu.c b/arch/x86/kvm/mmu.c index dd4b95b..6fc3421 100644 --

[kvm-devel] [PATCH 29/35] KVM: Move some x86 specific constants and structures to include/asm-x86

2008-04-03 Thread Avi Kivity
Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- include/asm-x86/kvm_host.h | 13 + include/linux/kvm_host.h | 13 - 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/include/asm-x86/kvm_host.h b/include/asm-x86/kvm_host.h index 52e276c..2

[kvm-devel] [PATCH 33/35] KVM: VMX: Add module option to disable flexpriority

2008-04-03 Thread Avi Kivity
Useful for debugging. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/vmx.c |8 ++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index fb0389d..0155931 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm

[kvm-devel] [PATCH 21/35] KVM: MMU: hypercall based pte updates and TLB flushes

2008-04-03 Thread Avi Kivity
-bit gpa on hypercall - don't pass host errors (-ENOMEM) to guest] [akpm: warning fix on i386] Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> ---

[kvm-devel] [PATCH 22/35] x86: KVM guest: hypercall based pte updates and TLB flushes

2008-04-03 Thread Avi Kivity
t to mmu_op] Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kernel/kvm.c | 137 + 1 files changed, 137 insertions(+), 0 deletions(-) diff --git a/arch/x86/kernel/kvm.c

[kvm-devel] [PATCH 15/35] KVM: In kernel PIT model

2008-04-03 Thread Avi Kivity
From: Sheng Yang <[EMAIL PROTECTED]> The patch moved PIT from userspace to kernel, and increase the timer accuracy greatly. Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/Makefile |3 +- arch/x86/kvm/i8

[kvm-devel] [PATCH 25/35] x86: make native_machine_shutdown non-static

2008-04-03 Thread Avi Kivity
MAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kernel/reboot.c |2 +- include/asm-x86/reboot.h |1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/x86/kernel/reboot.c b/arch/x86/kernel/reboot.c index 708d6f8..1481d85 100644 --- a/a

[kvm-devel] [PATCH 18/35] KVM: add basic paravirt support

2008-04-03 Thread Avi Kivity
From: Marcelo Tosatti <[EMAIL PROTECTED]> Add basic KVM paravirt support. Avoid vm-exits on IO delays. Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/x86.c |1 + include/asm-x86/kvm_para.h |3

[kvm-devel] [PATCH 12/35] KVM: replace remaining __FUNCTION__ occurances

2008-04-03 Thread Avi Kivity
From: Harvey Harrison <[EMAIL PROTECTED]> __FUNCTION__ is gcc-specific, use __func__ Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/lapic.c |8 arch/x86/kvm/mm

[kvm-devel] [PATCH 19/35] x86: KVM guest: add basic paravirt support

2008-04-03 Thread Avi Kivity
From: Marcelo Tosatti <[EMAIL PROTECTED]> Add basic KVM paravirt support. Avoid vm-exits on IO delays. Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/Kconfig |8 ++ arch/x86/kernel/Makefile

[kvm-devel] [PATCH 16/35] KVM: Add save/restore supporting of in kernel PIT

2008-04-03 Thread Avi Kivity
From: Sheng Yang <[EMAIL PROTECTED]> Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/i8254.c |7 +++ arch/x86/kvm/i8254.h |1 + arch/x86/kvm/x86.c| 48 +++

[kvm-devel] [PATCH 20/35] KVM: Provide unlocked version of emulator_write_phys()

2008-04-03 Thread Avi Kivity
Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/x86.c | 21 ++--- include/asm-x86/kvm_host.h |3 +++ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 1b9e695..03ba402 100644 --- a/ar

[kvm-devel] [PATCH 11/35] KVM: detect if VCPU triple faults

2008-04-03 Thread Avi Kivity
> PF loop when it should triple fault. This patch detects this condition and handles it with an KVM_SHUTDOWN exit to userspace. Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/x86.c | 20 +++-

[kvm-devel] [PATCH 17/35] KVM: Add reset support for in kernel PIT

2008-04-03 Thread Avi Kivity
From: Sheng Yang <[EMAIL PROTECTED]> Separate the reset part and prepare for reset support. Signed-off-by: Sheng Yang <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/i8254.c | 30 +++--- arch/x86/kvm/i8254.h |1

[kvm-devel] [PATCH 23/35] x86: KVM guest: hypercall batching

2008-04-03 Thread Avi Kivity
From: Marcelo Tosatti <[EMAIL PROTECTED]> Batch pte updates and tlb flushes in lazy MMU mode. [avi: - adjust to mmu_op - helper for getting para_state without debug warnings] Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --

[kvm-devel] [PATCH 07/35] KVM: MMU: ignore zapped root pagetables

2008-04-03 Thread Avi Kivity
uction can't be emulated. Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> Cc: Anthony Liguori <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/mmu.c | 12 ++-- arch/x86/kvm/x86.c | 12 include/asm-x86

[kvm-devel] [PATCH 06/35] KVM: Implement dummy values for MSR_PERF_STATUS

2008-04-03 Thread Avi Kivity
From: Alexander Graf <[EMAIL PROTECTED]> Darwin relies on this and ceases to work without. Signed-off-by: Alexander Graf <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/x86.c |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-)

[kvm-devel] [PATCH 13/35] KVM: VMX: Don't adjust tsc offset forward

2008-04-03 Thread Avi Kivity
Most Intel hosts have a stable tsc, and playing with the offset only reduces accuracy. By limiting tsc offset adjustment only to forward updates, we effectively disable tsc offset adjustment on these hosts. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/vmx.c |9 ++

[kvm-devel] [PATCH 14/35] KVM: Remove pointless desc_ptr #ifdef

2008-04-03 Thread Avi Kivity
The desc_struct changes left an unnecessary #ifdef; remove it. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/svm.c |4 1 files changed, 0 insertions(+), 4 deletions(-) diff --git a/arch/x86/kvm/svm.c b/arch/x86/kvm/svm.c index b2c667f..51741f9 100644 --- a/arch/x

[kvm-devel] [PATCH 10/35] KVM: Use kzalloc to avoid allocating kvm_regs from kernel stack

2008-04-03 Thread Avi Kivity
From: Xiantao Zhang <[EMAIL PROTECTED]> Since the size of kvm_regs is too big to allocate from kernel stack on ia64, use kzalloc to allocate it. Signed-off-by: Xiantao Zhang <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- virt/kvm

[kvm-devel] [PATCH 05/35] KVM: sparse fixes for kvm/x86.c

2008-04-03 Thread Avi Kivity
void-valued expression arch/x86/kvm/x86.c:2944:2: warning: returning void-valued expression Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/x86.c | 26 +- 1 files changed, 13 insertions(+), 1

[kvm-devel] [PATCH 00/35] KVM updates for the 2.6.26 merge window (part II)

2008-04-03 Thread Avi Kivity
These thirty-five patches comprise the second batch of the updates I have queued for 2.6.26. Please review. arch/x86/Kconfig |8 + arch/x86/kernel/Makefile |1 + arch/x86/kernel/crash.c |3 +- arch/x86/kernel/kvm.c | 247 ++

[kvm-devel] [PATCH 03/35] KVM: x86 emulator: fix sparse warnings in x86_emulate.c

2008-04-03 Thread Avi Kivity
ite of __emulate_2op arch/x86/kvm/x86_emulate.c:1091:3: warning: symbol '_tmp' shadows an earlier one arch/x86/kvm/x86_emulate.c:1091:3: originally declared here [18 more warnings suppressed] Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROT

[kvm-devel] [PATCH 02/35] KVM: Add stat counter for hypercalls

2008-04-03 Thread Avi Kivity
From: Amit Shah <[EMAIL PROTECTED]> Signed-off-by: Amit Shah <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/x86.c |2 ++ include/asm-x86/kvm_host.h |1 + 2 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/x8

[kvm-devel] [PATCH 04/35] KVM: SVM: make iopm_base static

2008-04-03 Thread Avi Kivity
From: Harvey Harrison <[EMAIL PROTECTED]> Fixes sparse warning as well. arch/x86/kvm/svm.c:69:15: warning: symbol 'iopm_base' was not declared. Should it be static? Signed-off-by: Harvey Harrison <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --

[kvm-devel] [PATCH 01/35] KVM: Use x86's segment descriptor struct instead of private definition

2008-04-03 Thread Avi Kivity
The x86 desc_struct unification allows us to remove segment_descriptor.h. Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/segment_descriptor.h | 29 - arch/x86/kvm/vmx.c|3 +-- arch/x86/kvm/x86.c

Re: [kvm-devel] [patch 0/3] separate thread for IO handling V3

2008-04-03 Thread Avi Kivity
Avi Kivity wrote: > Avi Kivity wrote: >> >> There's still something wrong. When I start Windows with these >> patches applied, Windows startup consumes ~50 sec of cpu time, >> compared to ~12 sec without. Pinning qemu into cpu 0 seems to fix this.

Re: [kvm-devel] [patch 0/3] separate thread for IO handling V3

2008-04-03 Thread Avi Kivity
Avi Kivity wrote: > > There's still something wrong. When I start Windows with these > patches applied, Windows startup consumes ~50 sec of cpu time, > compared to ~12 sec without. Pinning qemu into cpu 0 seems to fix this. > > I'll investigate some more. > C

Re: [kvm-devel] [PATCH RFC 1/5]Add some trace enties and define interface for tracing

2008-04-03 Thread Avi Kivity
Liu, Eric E wrote: > >From d56731ffc6d5742a88a157dfe0e4344d35f7db58 Mon Sep 17 00:00:00 2001 > From: Feng(Eric) Liu <[EMAIL PROTECTED]> > Date: Mon, 31 Mar 2008 10:08:55 -0400 > Subject: [PATCH] KVM: Add some trace entries in current code and define > some interfaces for userspace app to contrl and

Re: [kvm-devel] [PATCH RFC 2/5] Create relay channels and add trace data

2008-04-03 Thread Avi Kivity
Liu, Eric E wrote: > >From 41d65b55580d3f07f9f1c50e89e3d64c5d10fbaf Mon Sep 17 00:00:00 2001 > From: Feng (Eric) Liu <[EMAIL PROTECTED]> > Date: Tue, 1 Apr 2008 07:26:14 -0400 > Subject: [PATCH] KVM: Add kvm trace support. when config KVM_TRACE, it > allows userspace app to read the trace of kvm_re

Re: [kvm-devel] [patch 0/3] separate thread for IO handling V3

2008-04-03 Thread Avi Kivity
Marcelo Tosatti wrote: > This version fixes the vmdk problems found by the > regression testing. > > Dor, regarding the option to disable the IO thread, it > would require duplicating most of the changed code. For now > I believe its better to get the patch into a state > where its considered stab

Re: [kvm-devel] [PATCH 1/1] direct mmio for passthrough - kernel part

2008-04-03 Thread Avi Kivity
Andrea Arcangeli wrote: > On Wed, Apr 02, 2008 at 02:16:41PM +0300, Avi Kivity wrote: > >> Ugh, there's still mark_page_accessed() and SetPageDirty(). >> > > btw, like PG_dirty is only set if the spte is writeable, > mark_page_accessed should only run i

Re: [kvm-devel] [PATCH] KVM: add kvm_get_kvm and kvm_put_kvm functions

2008-04-02 Thread Avi Kivity
Izik Eidus wrote: > From ebb9fe4765f1572314d2249e29a7ef4d0de07273 Mon Sep 17 00:00:00 2001 > From: Izik Eidus <[EMAIL PROTECTED]> > Date: Sun, 30 Mar 2008 15:48:35 +0300 > Subject: [PATCH] KVM: add kvm_get_kvm and kvm_put_kvm functions, > > the main purpose of adding this functions is the abilaty t

Re: [kvm-devel] [PATCH 1/1] direct mmio for passthrough - kernel part

2008-04-02 Thread Avi Kivity
Avi Kivity wrote: > Andrea Arcangeli wrote: >> On Wed, Apr 02, 2008 at 12:50:50PM +0300, Avi Kivity wrote: >> >>> Isn't it faster though? We don't need to pull in the cacheline >>> containing the struct page anymore. >>> >> >&g

Re: [kvm-devel] [PATCH 1/1] direct mmio for passthrough - kernel part

2008-04-02 Thread Avi Kivity
Andrea Arcangeli wrote: > On Wed, Apr 02, 2008 at 12:50:50PM +0300, Avi Kivity wrote: > >> Isn't it faster though? We don't need to pull in the cacheline containing >> the struct page anymore. >> > > Exactly, not only that, get_user_pages is lik

Re: [kvm-devel] [PATCH 2/2] Move in-kernel PIT device to separate file

2008-04-02 Thread Avi Kivity
Anthony Liguori wrote: > This patch is mostly code motion to move the newly refactored > in-kernel PIT device to a separate file. > > Applied both, thanks. -- error compiling committee.c: too many arguments to function ---

Re: [kvm-devel] [PATCH 1/1] direct mmio for passthrough - kernel part

2008-04-02 Thread Avi Kivity
Andrea Arcangeli wrote: > On Wed, Apr 02, 2008 at 07:32:35AM +0300, Avi Kivity wrote: > >> It ought to work. gfn_to_hfn() (old gfn_to_page) will still need to take a >> refcount if possible. >> > > This reminds me, that mmu notifiers we could implement gfn_

Re: [kvm-devel] [PATCH] Fix endianness for virtio-blk config space

2008-04-01 Thread Avi Kivity
Anthony Liguori wrote: > The virtio config space is little endian. Make sure that in virtio-blk we > store the values in little endian format. > Applied, thanks. -- error compiling committee.c: too many arguments to function -

Re: [kvm-devel] [PATCH] X86: small parameter name cleanup

2008-04-01 Thread Avi Kivity
Joerg Roedel wrote: > The kvm_host.h file for x86 declares the functions kvm_set_cr[0348]. In the > header file their second parameter is named cr0 in all cases. This patch > renames the parameters so that they match the function name. > Applied, thanks. -- error compiling committee.c: too ma

Re: [kvm-devel] Ubuntu Gutsy host / XP guest / -smp 2

2008-04-01 Thread Avi Kivity
David Abrahams wrote: > With the title combination, the guest takes nearly 100% of my real CPU > time and still only sees one CPU. Is this a known problem, and does it > have a known solution? > > Can you send the output of 'kvm_stat -1'? Also, what does the guest think it is doing (in task

Re: [kvm-devel] [PATCH 1/1] direct mmio for passthrough - kernel part

2008-04-01 Thread Avi Kivity
Anthony Liguori wrote: > What about switching the KVM MMU code to use hfn_t instead of struct > page? The initial conversion is pretty straight forward as the places > where you actually need a struct page you can always get it from > pfn_to_page() (like in kvm_release_page_dirty). > > We can th

Re: [kvm-devel] [PATCH 1/1] direct mmio for passthrough - kernel part

2008-04-01 Thread Avi Kivity
Anthony Liguori wrote: > > You could get away with supporting reserved RAM another way though. > If we refactored the MMU to use hfn_t instead of struct page, you > would then need a mechanism to mmap() reserved ram into userspace > (similar to ioremap I guess). In fact, you may be able to jus

Re: [kvm-devel] [PATCH 1/1] direct mmio for passthrough - kernel part

2008-04-01 Thread Avi Kivity
Ben-Ami Yassour1 wrote: >> >> Can you explain why you're not using the regular memory slot mechanism? >> i.e. have userspace mmap(/dev/mem) and create a memslot containing that >> at the appropriate guest physical address? >> >> > Our initial approach was to mmap /sys/bus/pci/devices/.../resou

Re: [kvm-devel] [PATCH 1/1] direct mmio for passthrough - kernel part

2008-04-01 Thread Avi Kivity
Anthony Liguori wrote: > I looked at Andrea's patches and I didn't see any special handling for > non-RAM pages. Something Muli mentioned that kept them from doing > /sys/devices/pci/.../region to begin with was the fact that IO pages do > not have a struct page backing them so get_user_pages()

Re: [kvm-devel] KVM hangs with windows XP guest - help with debugging?

2008-04-01 Thread Avi Kivity
Jonathan Underwood wrote: > Hi, > > I am trying to run Windows XP pro as a guest under kvm. The host > system is Fedora 8. I have seen this behaviour with kvm-60 (as > currently packaged for Fedora 8) and kvm-64 (using the rawhide > package). > > Essentially, I install XP Pro successfuly. When I th

Re: [kvm-devel] [PATCH 1/1] direct mmio for passthrough - kernel part

2008-04-01 Thread Avi Kivity
Anthony Liguori wrote: >> >> Regardless of whether we can use /dev/mem, I think we should >> introduce a new char device anyway. We only need to mmap() MMIO >> regions which are mapped by the PCI bus, presumably, the kernel >> should know about these mappings. The driver should only allow >>

Re: [kvm-devel] [PATCH 1/1] direct mmio for passthrough - kernel part

2008-04-01 Thread Avi Kivity
Anthony Liguori wrote: > Avi Kivity wrote: >> [EMAIL PROTECTED] wrote: >> >>> From: Ben-Ami Yassour <[EMAIL PROTECTED]> >>> >>> Enable a guest to access a device's memory mapped I/O regions directly. >>> Userspace sends the mmio regio

Re: [kvm-devel] [PATCH 1/1] direct mmio for passthrough - kernel part

2008-04-01 Thread Avi Kivity
[EMAIL PROTECTED] wrote: > From: Ben-Ami Yassour <[EMAIL PROTECTED]> > > Enable a guest to access a device's memory mapped I/O regions directly. > Userspace sends the mmio regions that the guest can access. On the first > page fault for an access to an mmio address the host translates the gva to >

Re: [kvm-devel] hugetlbfs not working

2008-03-31 Thread Avi Kivity
Marcelo Tosatti wrote: > QEMU/KVM: ftruncate() is not supported by hugetlbfs on older hosts > > Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> > Applied, thanks. -- error compiling committee.c: too many arguments to function --

[kvm-devel] [PATCH 01/40] KVM: MMU: Update shadow ptes on partial guest pte writes

2008-03-31 Thread Avi Kivity
te and eliminate the vmexit. This helps pae guests which use two 32-bit writes to set a single 64-bit pte. [truncation fix by Eric] Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]> Signed-off-by: Feng (Eric) Liu <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]>

[kvm-devel] [PATCH 08/40] KVM: constify function pointer tables

2008-03-31 Thread Avi Kivity
From: Jan Engelhardt <[EMAIL PROTECTED]> Signed-off-by: Jan Engelhardt <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- virt/kvm/kvm_main.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_ma

[kvm-devel] [PATCH 03/40] KVM: x86 emulator: add support for group decoding

2008-03-31 Thread Avi Kivity
Certain x86 instructions use bits 3:5 of the byte following the opcode as an opcode extension, with the decode sometimes depending on bits 6:7 as well. Add support for this in the main decoding table rather than an ad-hock adaptation per opcode. Signed-off-by: Avi Kivity <[EMAIL PROTEC

[kvm-devel] [PATCH 10/40] KVM: x86 emulator: group decoding for group 1 instructions

2008-03-31 Thread Avi Kivity
Opcodes 0x80-0x83 Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/x86_emulate.c | 25 +++-- 1 files changed, 23 insertions(+), 2 deletions(-) diff --git a/arch/x86/kvm/x86_emulate.c b/arch/x86/kvm/x86_emulate.c index ef6de16..22900f7 100644 --- a/ar

[kvm-devel] [PATCH 02/40] KVM: MMU: Simplify hash table indexing

2008-03-31 Thread Avi Kivity
From: Dong, Eddie <[EMAIL PROTECTED]> Signed-off-by: Yaozu (Eddie) Dong <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/mmu.c | 10 +- include/asm-x86/kvm_host.h |3 ++- 2 files changed, 7 insertions(+), 6 deletions(-)

[kvm-devel] [PATCH 28/40] KVM: VMX: fix typo in VMX header define

2008-03-31 Thread Avi Kivity
From: Ryan Harper <[EMAIL PROTECTED]> Looking at Intel Volume 3b, page 148, table 20-11 and noticed that the field name is 'Deliver' not 'Deliever'. Attached patch changes the define name and its user in vmx.c Signed-off-by: Ryan Harper <[EMAIL PROTECTED]> S

[kvm-devel] [PATCH 00/40] KVM updates for the 2.6.26 merge window (part I)

2008-03-31 Thread Avi Kivity
These are the first forty of about a hundred patches I have queued for 2.6.26. Note that a few will go through git-s390, maybe a couple through x86.git, and a few to 2.6.25-rc. The ia64 patches are not included as they are being reviewed, but I hope to have them merged in time for the 2.6.26 merge

[kvm-devel] [PATCH 26/40] KVM: MMU: add TDP support to the KVM MMU

2008-03-31 Thread Avi Kivity
From: Joerg Roedel <[EMAIL PROTECTED]> This patch contains the changes to the KVM MMU necessary for support of the Nested Paging feature in AMD Barcelona and Phenom Processors. Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> ---

[kvm-devel] [PATCH 30/40] KVM: SVM: allocate the MSR permission map per VCPU

2008-03-31 Thread Avi Kivity
zation. Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> Signed-off-by: Markus Rechberger <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- arch/x86/kvm/kvm_svm.h |2 + arch/x86/kvm/svm.c | 67 +++- 2 files chang

[kvm-devel] [PATCH 15/40] KVM: Disable pagefaults during copy_from_user_inatomic()

2008-03-31 Thread Avi Kivity
From: Andrea Arcangeli <[EMAIL PROTECTED]> With CONFIG_PREEMPT=n, this is needed in order to disable the fault-in code from sleeping. Signed-off-by: Andrea Arcangeli <[EMAIL PROTECTED]> Signed-off-by: Avi Kivity <[EMAIL PROTECTED]> --- virt/kvm/kvm_main.c |2 ++

<    1   2   3   4   5   6   7   8   9   10   >