Re: [kvm-devel] [PATCH] kvm.h: __user requires compiler.h

2008-03-17 Thread Avi Kivity
Christian Borntraeger wrote: > include/linux/kvm.h defines struct kvm_dirty_log to > [...] > union { > void __user *dirty_bitmap; /* one bit per page */ > __u64 padding; > }; > > __user requires compiler.h to compile. Currently, this works on x86 > only

Re: [kvm-devel] [PATCH 0/3] kvmclock: shutdown clock before reboot

2008-03-17 Thread Avi Kivity
Glauber Costa wrote: > Avi, > > This series now apply ontop of kvm.git. > Only the needed function from machine_ops is made non-static. > > Applied, thanks. Ingo, can you carry the first two patches as well? They are 602ac559a208ba44d5879a8e6381a379b376a8b7 and 0c7f95e535a02caba52f944f067fb

Re: [kvm-devel] [PATCH] use slots_lock to protect writes to the wall clock

2008-03-17 Thread Avi Kivity
Glauber Costa wrote: > As Marcelo pointed out, we need slots_lock to protect > against slots changing under our nose during wall clock > writing. > > This patch address this issue. > > Applied, thanks. This lock is fairly annoying. What do you think about taking it in vcpu_run unconditionall

Re: [kvm-devel] [patch 0/3] QEMU: virtio should register power of two sized regions

2008-03-17 Thread Avi Kivity
Marcelo Tosatti wrote: > Otherwise the guest will miscalculate the region size. > > Applied all, thanks. -- Do not meddle in the internals of kernels, for they are subtle and quick to panic. - This SF.net email is spons

Re: [kvm-devel] [PATCH] shrinker support for the mmu cache

2008-03-17 Thread Avi Kivity
Marcelo Tosatti wrote: > On Mon, Mar 17, 2008 at 04:41:18PM +0200, Avi Kivity wrote: > >> Marcelo Tosatti wrote: >> While aging is not too hard to do, I don't think it would add much in practice; we rarely observe mmu shadow pages being recycled due to memory pressure. So

Re: [kvm-devel] tools to dump guest memory and generate core file

2008-03-17 Thread Avi Kivity
david ahern wrote: > Attaching gdb to qemu you work with addresses as seen by the qemu process; the > idea is to work with addresses as seen inside the guest. > > For example, in the qemu console you can examine guest kernel memory such as > task structs using guest kernel based addresses: > > (qem

[kvm-devel] magnifically

2008-03-17 Thread Coppin Karnas
Ni hao, +---+ Warning! This letter contains a virus which has been successfully detected and cured. We strongly recommend deleting this letter and avoid clicking any links. +---+ [RBN Networks Antivirus]

Re: [kvm-devel] tools to dump guest memory and generate core file

2008-03-17 Thread david ahern
Attaching gdb to qemu you work with addresses as seen by the qemu process; the idea is to work with addresses as seen inside the guest. For example, in the qemu console you can examine guest kernel memory such as task structs using guest kernel based addresses: (qemu) x /128w 0xc0327a80 c

Re: [kvm-devel] [PATCH] shrinker support for the mmu cache

2008-03-17 Thread Marcelo Tosatti
On Mon, Mar 17, 2008 at 04:41:18PM +0200, Avi Kivity wrote: > Marcelo Tosatti wrote: > >> > >>While aging is not too hard to do, I don't think it would add much in > >>practice; we rarely observe mmu shadow pages being recycled due to > >>memory pressure. So this is mostly helpful for preventing

[kvm-devel] [patch 3/3] QEMU/KVM: bail out if PCI region is not power of two

2008-03-17 Thread Marcelo Tosatti
Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> Index: kvm-userspace.hotplug3/qemu/hw/pci.c === --- kvm-userspace.hotplug3.orig/qemu/hw/pci.c +++ kvm-userspace.hotplug3/qemu/hw/pci.c @@ -236,6 +236,11 @@ void pci_register_io_region

[kvm-devel] [patch 2/3] QEMU/KVM: virtio register pow2 memory regions

2008-03-17 Thread Marcelo Tosatti
Otherwise the PCI size for such regions will be calculated erroneously. Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> Cc: Anthony Liguori <[EMAIL PROTECTED]> Index: kvm-userspace.hotplug3/qemu/hw/virtio.c === --- kvm-userspace.h

[kvm-devel] [patch 1/3] QEMU/KVM: add fls()

2008-03-17 Thread Marcelo Tosatti
Find Last Set, in accordance with glibc's ffs. Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> Index: kvm-userspace.hotplug3/qemu/cutils.c === --- kvm-userspace.hotplug3.orig/qemu/cutils.c +++ kvm-userspace.hotplug3/qemu/cutils.c

[kvm-devel] [patch 0/3] QEMU: virtio should register power of two sized regions

2008-03-17 Thread Marcelo Tosatti
Otherwise the guest will miscalculate the region size. -- - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/

[kvm-devel] [PATCH] use slots_lock to protect writes to the wall clock

2008-03-17 Thread Glauber Costa
As Marcelo pointed out, we need slots_lock to protect against slots changing under our nose during wall clock writing. This patch address this issue. Signed-off-by: Glauber Costa <[EMAIL PROTECTED]> CC: Marcelo Tosatti <[EMAIL PROTECTED]> --- arch/x86/kvm/x86.c | 10 ++ 1 files changed

[kvm-devel] [PATCH 2/3] make native_machine_shutdown non-static

2008-03-17 Thread Glauber Costa
it will allow external users to call it. It is mainly useful for routines that will override its machine_ops field for its own special purposes, but want to call the normal shutdown routine after they're done Signed-off-by: Glauber Costa <[EMAIL PROTECTED]> --- arch/x86/kernel/reboot.c |2 +-

[kvm-devel] [PATCH 1/3] allow machine_crash_shutdown to be replaced

2008-03-17 Thread Glauber Costa
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]> --- arch/x86/kernel/crash.c |3 ++- arch/x86/kernel/reboot.c |7 ++- include/asm-x86/reboot.h |1 + 3 files changed, 9 in

[kvm-devel] [PATCH 0/3] kvmclock: shutdown clock before reboot

2008-03-17 Thread Glauber Costa
Avi, This series now apply ontop of kvm.git. Only the needed function from machine_ops is made non-static. - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdm

[kvm-devel] [PATCH 3/3] disable clock before rebooting.

2008-03-17 Thread Glauber Costa
This patch writes 0 (actually, what really matters is that the LSB is cleared) to the system time msr before shutting down the machine for kexec. Without it, we can have a random memory location being written when the guest comes back It overrides the functions shutdown, used in the path of kerne

Re: [kvm-devel] [Qemu-devel] [PATCH] use a thread id variable

2008-03-17 Thread Glauber Costa
On Sun, Mar 9, 2008 at 11:52 AM, Gilad Ben-Yossef <[EMAIL PROTECTED]> wrote: > Jamie Lokier wrote: > > Gilad Ben-Yossef wrote: > >> Glauber Costa wrote: > >>> This patch introduces a "thread_id" variable to CPUState. > >>> It's duty will be to hold the process, or more generally, thread > >>>

Re: [kvm-devel] [PATCH] debugfs directory for each VM

2008-03-17 Thread Ryota OZAKI
Hi Avi, 2008/3/17, Avi Kivity <[EMAIL PROTECTED]>: > Ryota OZAKI wrote: > > Hi all, > > > > This patch allows a VM to have own directory on debugfs, > > that contains statics only for the VM. Each directory > > is identified by the pid of the VM (ie qemu). > > > > I tried this patch under s

Re: [kvm-devel] [PATCH] x86: don't allow KVM_CLOCK without HAVE_KVM

2008-03-17 Thread Avi Kivity
Randy Dunlap wrote: > On Sun, 16 Mar 2008 13:13:08 +0200 Avi Kivity wrote: > > >> Randy Dunlap wrote: >> >>> From: Randy Dunlap <[EMAIL PROTECTED]> >>> >>> Make KVM_CLOCK depend on HAVE_KVM. Otherwise a Voyager build can >>> fail with: >>> >>> CC arch/x86/kernel/asm-offsets.s >>> In

Re: [kvm-devel] [PATCH] x86: don't allow KVM_CLOCK without HAVE_KVM

2008-03-17 Thread Randy Dunlap
On Sun, 16 Mar 2008 13:13:08 +0200 Avi Kivity wrote: > Randy Dunlap wrote: > > From: Randy Dunlap <[EMAIL PROTECTED]> > > > > Make KVM_CLOCK depend on HAVE_KVM. Otherwise a Voyager build can > > fail with: > > > > CC arch/x86/kernel/asm-offsets.s > > In file included from include2/asm/irqf

[kvm-devel] script for watching kvm_stat

2008-03-17 Thread Christian Ehrhardt
I added the kvm_stat support to ppc to watch my guest while executing e.g. to check things like "what does my guest do when I see nothing" ;-) To be able to do that I also needed a script that reports in a iostat/vmstat like style, because of that I wrote a small shell script. Additionally my co

Re: [kvm-devel] [patch 0/3] QEMU balloon support

2008-03-17 Thread Avi Kivity
Marcelo Tosatti wrote: > On Mon, Mar 17, 2008 at 01:11:11PM +0200, Avi Kivity wrote: > > >>> + up_read(&kvm->slots_lock); >>> >>> So as to avoid rmap_nuke, since that will be done through the madvise() >>> path. >>> >>> >>> >> Why not do it in userspace? >> > > I don't see an

Re: [kvm-devel] [patch 0/6] pv mmu fixes

2008-03-17 Thread Avi Kivity
Marcelo Tosatti wrote: > The following patchset fixes pvmmu/cr3-cache for 32-bit guests. > > > Thanks. I folded the fixes into the patches they fixed, and merged everything except cr3 cache (I want to look at it again and see if I can reduce the impact a little). pvmmu branch now contains th

Re: [kvm-devel] [PATCH] shrinker support for the mmu cache

2008-03-17 Thread Avi Kivity
Marcelo Tosatti wrote: >> >> While aging is not too hard to do, I don't think it would add much in >> practice; we rarely observe mmu shadow pages being recycled due to >> memory pressure. So this is mostly helpful for preventing a VM from >> pinning memory when under severe memory pressure, wh

Re: [kvm-devel] [PATCH] shrinker support for the mmu cache

2008-03-17 Thread Marcelo Tosatti
On Sun, Mar 16, 2008 at 01:28:43PM +0200, Avi Kivity wrote: > Marcelo Tosatti wrote: > > On Wed, Mar 12, 2008 at 08:13:41PM +0200, Izik Eidus wrote: > > > >> this patch simply register the mmu cache with the shrinker. > >> > > > > Hi Izik, > > > > Nice. > > > > I think you want some sort of

Re: [kvm-devel] [patch 0/3] QEMU balloon support

2008-03-17 Thread Marcelo Tosatti
On Mon, Mar 17, 2008 at 01:11:11PM +0200, Avi Kivity wrote: > >+ up_read(&kvm->slots_lock); > > > >So as to avoid rmap_nuke, since that will be done through the madvise() > >path. > > > > > > Why not do it in userspace? I don't see any way of knowing whether you have or not mmu notifiers

[kvm-devel] [patch 6/6] KVM: pvmmu: cache pdptrs

2008-03-17 Thread Marcelo Tosatti
The pdptrs need to be cached in addition to the shadowed root tables, so the guest walk can be done properly. Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> Index: kvm.first/arch/x86/kvm/mmu.c === --- kvm.first.orig/arch/x86/kvm

[kvm-devel] [patch 5/6] KVM: pvmmu: kvm_patch might be called after initialization

2008-03-17 Thread Marcelo Tosatti
kvm_patch might be called during module load. Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> Index: kvm.first/arch/x86/kernel/kvm.c === --- kvm.first.orig/arch/x86/kernel/kvm.c +++ kvm.first/arch/x86/kernel/kvm.c @@ -184,7 +184,7

[kvm-devel] [patch 2/6] KVM: pvmmu: hook set_pud for 3-level pagetables

2008-03-17 Thread Marcelo Tosatti
The paravirt interface will export set_pud for 3-level pagetables. Hook it. Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> Index: kvm.first/arch/x86/kernel/kvm.c === --- kvm.first.orig/arch/x86/kernel/kvm.c +++ kvm.first/arch/x86

[kvm-devel] [patch 4/6] KVM: pvmmu: fix mmu_alloc_roots() typo

2008-03-17 Thread Marcelo Tosatti
Slipped through on the first patch. Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> Index: kvm.first/arch/x86/kvm/mmu.c === --- kvm.first.orig/arch/x86/kvm/mmu.c +++ kvm.first/arch/x86/kvm/mmu.c @@ -1321,7 +1321,7 @@ static void m

[kvm-devel] [patch 3/6] KVM: pvmmu: kvm_write_cr3() inline asm fix

2008-03-17 Thread Marcelo Tosatti
Let the compiler choose register placing. All we care is that "trap" value gets retained. Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> Index: kvm.first/arch/x86/kernel/kvm.c === --- kvm.first.orig/arch/x86/kernel/kvm.c +++ kvm

[kvm-devel] [patch 0/6] pv mmu fixes

2008-03-17 Thread Marcelo Tosatti
The following patchset fixes pvmmu/cr3-cache for 32-bit guests. -- - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01

[kvm-devel] [patch 1/6] KVM: pvmmu: handle ptes in highmem

2008-03-17 Thread Marcelo Tosatti
Find the physical address through kmap_atomic_to_page(). Signed-off-by: Marcelo Tosatti <[EMAIL PROTECTED]> Index: kvm.first/arch/x86/kernel/kvm.c === --- kvm.first.orig/arch/x86/kernel/kvm.c +++ kvm.first/arch/x86/kernel/kvm.c @@ -2

[kvm-devel] Порядок определения доходов и расходов при упрощенке

2008-03-17 Thread Христина
Упрощенная система налoгooблoжения Oднoдневный семинар прoйдёт 21 марта 2008г. (Мoсква) В прoграмма: 1. Сущнoсть УСН, oсвoбoждение oт уплаты ряда налoгoв. Пoрядoк и услoвия начала и прекращения применения упрoщеннoй системы налoгooблoжения с учетoм нoвшеств 2008 г. Требoвания к размеру дoхoд

Re: [kvm-devel] KVM Test result, kernel a16664b.., userspace 3017d05.. one new issue

2008-03-17 Thread Avi Kivity
Yunfeng Zhao wrote: > Hi All, > This is today's KVM test result against kvm.git > a16664b59065b8ae877b213e68a6f962ac359ca4 and kvm-userspace.git > 3017d054a6a9f37bfffee4ebf0bf52a51c9860b5. > > > One new issue: > 1. booting smp windows guests has 30% chance of hang > https://sourceforge.net/track

Re: [kvm-devel] [PATCH] debugfs directory for each VM

2008-03-17 Thread Avi Kivity
Ryota OZAKI wrote: > Hi all, > > This patch allows a VM to have own directory on debugfs, > that contains statics only for the VM. Each directory > is identified by the pid of the VM (ie qemu). > > I tried this patch under several host kernel versions, > .22, .23, and .24, and confirmed things work

[kvm-devel] You only deserve the best, get it here

2008-03-17 Thread hill saulnier
Don’t settle for a lovestick that is too short and too thin – click here for the solution. http://www.buriaoto.com/ 10 incredible ways to hit on her- This SF.net email is sponsored by: Microsoft Defy all challenges. Microso

Re: [kvm-devel] [patch 0/3] QEMU balloon support

2008-03-17 Thread Avi Kivity
Marcelo Tosatti wrote: > Hi Avi, > > Good that you're back. > > On Sun, Mar 16, 2008 at 04:00:06PM +0200, Avi Kivity wrote: > >> Marcelo Tosatti wrote: >> >>> This patchset resends Anthony's QEMU balloon support plus: >>> >>> - Truncates the target size to ram size >>> - Enables madvise() c

Re: [kvm-devel] [PATCH/RFC 1/2] anon-inodes: Remove fd_install() from anon_inode_getfd()

2008-03-17 Thread Avi Kivity
Christoph Hellwig wrote: > On Sat, Mar 08, 2008 at 06:45:34PM -0800, Roland Dreier wrote: > >> > spin_lock(&kvm_lock); >> > + if (--kvm->refcount) { >> > + spin_lock(&kvm_lock); >> >> obvious typo here... >> > > > Indeed. Any comments from the kvm developers in

Re: [kvm-devel] [PATCH/RFC 1/2] anon-inodes: Remove fd_install() from anon_inode_getfd()

2008-03-17 Thread Christoph Hellwig
On Sat, Mar 08, 2008 at 06:45:34PM -0800, Roland Dreier wrote: > >spin_lock(&kvm_lock); > > + if (--kvm->refcount) { > > + spin_lock(&kvm_lock); > > obvious typo here... Indeed. Any comments from the kvm developers in this approach? The current multi-level file refcounting seem

Re: [kvm-devel] [PATCH RFC 0/4]Porting Xentrace to kvm

2008-03-17 Thread Liu, Eric E
[EMAIL PROTECTED] wrote: > Avi Kivity wrote: >> Jan Kiszka wrote: >>> Avi Kivity wrote: >>> Liu, Eric E wrote: > > Since we already have had debugfs_entries and some other kernel > debug mechanism to use, does this kvmtrace make sense? Any > comment is welcomed. Th

Re: [kvm-devel] tools to dump guest memory and generate core file

2008-03-17 Thread Avi Kivity
david ahern wrote: > Does anyone know of tools that can dump memory for a qemu guest with addresses > as seen by the guest and generate a core file? For instance, say you know the > guest is running a 32-bit linux kernel with a 1G/3G split. Then you would want > to dump 1G of memory starting 0xc000

Re: [kvm-devel] Oopses with Oprofile and qemu-kvm

2008-03-17 Thread Jan Kiszka
Yang, Sheng wrote: > ... > BTW: I am working on NMI supporting now. That's good news! Some weeks ago I posted a NMI infrastructure patch [1] to qemu-devel already, for now only to support IOAPIC NMI watchdogs [1, 2]. Maybe you can make use of this. Please keep us posted about your approach! Jan

Re: [kvm-devel] Oopses with Oprofile and qemu-kvm

2008-03-17 Thread Yang, Sheng
On Friday 14 March 2008 20:31:50 Zdenek Kabelac wrote: > Hi > > I'm trying various thing with qemu to resolve my other issue and I've > tried to use oprofile. > But as soon as I run these: > > opcontrol --vmlinux=mine/vmlinux > opcontrol --start > > I get kernel oops (see bellow) That's known, be