Re: [kvm-devel] amd64: does it ever work? ;)

2008-02-11 Thread Amit Shah
On Monday 11 February 2008 12:58:07 Avi Kivity wrote: > Amit Shah wrote: > > On Sunday 10 February 2008 17:01:46 Avi Kivity wrote: > >> Michael Tokarev wrote: > >>> Ok, I finally got it working. > >>> > >>> The problem was 32/64 bits issue. I'm so used to 64bits kernel and > >>> 32bits userland -

Re: [kvm-devel] upstream PowerPC qemu breakage

2008-02-11 Thread Anthony Liguori
Hollis Blanchard wrote: > Hi Avi, we're having a problem with the qemu merge you just did in > kvm-userspace. > > Upstream qemu recently added the TCG code generator to phase out dyngen. > When he did that, Fabrice explicitly broke the build every non-x86 > architecture, and since you've now pulled

[kvm-devel] Demand paging for memory regions (was Re: MMU Notifiers V6)

2008-02-11 Thread Roland Dreier
[Adding [EMAIL PROTECTED] to get the IB/RDMA people involved] This thread has patches that add support for notifying drivers when a process's memory map changes. The hope is that this is useful for letting RDMA devices handle registered memory without pinning the underlying pages, by updating the

[kvm-devel] upstream PowerPC qemu breakage

2008-02-11 Thread Hollis Blanchard
Hi Avi, we're having a problem with the qemu merge you just did in kvm-userspace. Upstream qemu recently added the TCG code generator to phase out dyngen. When he did that, Fabrice explicitly broke the build every non-x86 architecture, and since you've now pulled that breakage into KVM, we're stuc

[kvm-devel] [PATCH] KVM: X86: emaulate access to MSR_IA32_MCG_CTL

2008-02-11 Thread Joerg Roedel
Injecting an GP when accessing this MSR lets Windows crash when running some stress test tools in KVM. So this patch emulates access to this MSR. Signed-off-by: Joerg Roedel <[EMAIL PROTECTED]> Signed-off-by: Markus Rechberger <[EMAIL PROTECTED]> --- arch/x86/kvm/x86.c |5 + 1 files chang

[kvm-devel] [PATCH 2/2] fill cpuid with clock information

2008-02-11 Thread Glauber de Oliveira Costa
we advertise the presence of our paravirt clock through cpuid, if it is defined in headers Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- qemu/qemu-kvm-x86.c |6 +- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/qemu/qemu-kvm-x86.c b/qemu/qemu-kvm-x86.c i

[kvm-devel] [PATCH 1/2] add kvm_para.h header to qemu-kvm-x86.c

2008-02-11 Thread Glauber de Oliveira Costa
With this, functions such as cpuid can make use of paravirt definitions Signed-off-by: Glauber de Oliveira Costa <[EMAIL PROTECTED]> --- qemu/qemu-kvm-x86.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/qemu/qemu-kvm-x86.c b/qemu/qemu-kvm-x86.c index 037abb1..4a52d4d 10

[kvm-devel] [PATCH 0/2] kvm clock : userspace part

2008-02-11 Thread Glauber de Oliveira Costa
- 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 mailing li

[kvm-devel] [PATCH 2/2] kvmclock implementation, the guest part.

2008-02-11 Thread Glauber de Oliveira Costa
This is the guest part of kvm clock implementation It does not do tsc-only timing, as tsc can have deltas between cpus, and it did not seem worthy to me to keep adjusting them. We do use it, however, for fine-grained adjustment. Other than that, time comes from the host. Signed-off-by: Glauber d

[kvm-devel] [PATCH 1/2] kvmclock - the host part.

2008-02-11 Thread Glauber de Oliveira Costa
This is the host part of kvm clocksource implementation. As it does not include clockevents, it is a fairly simple implementation. We only have to register a per-vcpu area, and start writting to it periodically. The area is binary compatible with xen, as we use the same shadow_info structure. Si

[kvm-devel] [PATCH 0/2] kvm clock - merge last comments

2008-02-11 Thread Glauber de Oliveira Costa
Here's a new version that merges last comments from avi. Also, it makes it available to x86_64 as well. Userspace part will follow shortly - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visu

Re: [kvm-devel] [PATCH] Move common VGAState attributes to VGA_STATE_COMMON

2008-02-11 Thread Izik Eidus
Soren Hansen wrote: > I was told to resend this, so here goes: > > vmware_vga.c uses functions in vga.c to do some things. They > need to agree on which parts of their state struct is common > and which aren't, otherwise they'll overwrite parts of each > other's state. This patch makes it so. > > S

[kvm-devel] [PATCH] Move common VGAState attributes to VGA_STATE_COMMON

2008-02-11 Thread Soren Hansen
I was told to resend this, so here goes: vmware_vga.c uses functions in vga.c to do some things. They need to agree on which parts of their state struct is common and which aren't, otherwise they'll overwrite parts of each other's state. This patch makes it so. Signed-off-by: Soren Hansen <[EMAIL

Re: [kvm-devel] [PATCH] replace the slots lock from the mmap_sem to private kvm lock

2008-02-11 Thread Izik Eidus
Marcelo Tosatti wrote: > On Mon, Feb 11, 2008 at 05:12:42PM +0200, Izik Eidus wrote: > >> right now kvm take the down_read(mmap_sem) lock to make sure that no >> slots will be >> removed while trying to get them / make the dirty log safe, >> but in some cases when the down_read(mmap_sem) is cal

Re: [kvm-devel] [PATCH] replace the slots lock from the mmap_sem to private kvm lock

2008-02-11 Thread Marcelo Tosatti
On Mon, Feb 11, 2008 at 05:12:42PM +0200, Izik Eidus wrote: > right now kvm take the down_read(mmap_sem) lock to make sure that no > slots will be > removed while trying to get them / make the dirty log safe, > but in some cases when the down_read(mmap_sem) is called and after that > kvm_read_gue

[kvm-devel] [PATCH] fix typo in VMX header define

2008-02-11 Thread Ryan Harper
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 -- Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx (512) 838-9253 T/L: 678-9253 [EMAIL PROTEC

Re: [kvm-devel] large page support for kvm

2008-02-11 Thread Marcelo Tosatti
On Thu, Jan 31, 2008 at 07:44:52AM +0200, Avi Kivity wrote: > Joerg Roedel wrote: > > On Tue, Jan 29, 2008 at 07:20:12PM +0200, Avi Kivity wrote: > > > > > >> Here's a rough sketch of my proposal: > >> > >> - For every memory slot, allocate an array containing one int for every > >> potential l

[kvm-devel] [PATCH] virtio_net: Fix oops on early interrupts - introduced by virtio reset code

2008-02-11 Thread Christian Borntraeger
Am Montag, 11. Februar 2008 schrieb Anthony Liguori: > The reset support is in Linus's tree so we should try to push it for -rc2. You are right. My repository was borked. will push it to Jeff Garzik. Thanks Jeff can you schedule this fix into your network driver updates? Thanks --- With the lat

Re: [kvm-devel] [PATCH] virtio_net: Fix oops on early interrupts - introduced by virtio reset code

2008-02-11 Thread Anthony Liguori
Christian Borntraeger wrote: > Avi, > this fixes a problem that was introduced by the virtio_reset patches. > Can you apply that fix to kvm.git as a bugfix, as the virtio_reset > infrastructure is not on Linus upstream yet? > The reset support is in Linus's tree so we should try to push it fo

[kvm-devel] [PATCH] replace the slots lock from the mmap_sem to private kvm lock

2008-02-11 Thread Izik Eidus
right now kvm take the down_read(mmap_sem) lock to make sure that no slots will be removed while trying to get them / make the dirty log safe, but in some cases when the down_read(mmap_sem) is called and after that kvm_read_guest() is called copy_from_user can result in a page fault that will le

Re: [kvm-devel] kvm-intel.ko unable to create /dev/kvm

2008-02-11 Thread gerryw
Hi, That's the ticket. Thank You! -G - 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/

Re: [kvm-devel] kvm-intel.ko unable to create /dev/kvm

2008-02-11 Thread Avi Kivity
[EMAIL PROTECTED] wrote: > > Hi, > > Thanks for the speedy reply. I looked in all of the places you > mentioned, but no file. Are the major/minor numbers static. If so, > where can I find them? > http://www.lanana.org/docs/device-list/devices-2.6+.txt (char major 10, minor 232) -- error compi

Re: [kvm-devel] [ToDo] Real Mode Support

2008-02-11 Thread Avi Kivity
Guillaume Thouvenin wrote: >>> >>> >> As using the emulator is likely to be slower than VT, we can call the >> emulator only if we are in a "VT unfriendly" state, so the code might >> look like >> >> if (vmx->rmode.active && big_real_mode(vmx)) >> ... >> >> In addition, th

Re: [kvm-devel] kvm-intel.ko unable to create /dev/kvm

2008-02-11 Thread gerryw
Hi, Thanks for the speedy reply. I looked in all of the places you mentioned, but no file. Are the major/minor numbers static. If so, where can I find them? Thanks, -G - This SF.net email is sponsored by: Microsoft D

Re: [kvm-devel] [ToDo] Real Mode Support

2008-02-11 Thread Guillaume Thouvenin
On Sun, 10 Feb 2008 13:44:05 +0200 Avi Kivity <[EMAIL PROTECTED]> wrote: > Anthony Liguori wrote: > > So what we would like to do, is instead of setting up vm86 mode for the > > guest to execute real mode, use x86_emulate() to just emulate the code. > > This means that we wouldn't be using the

[kvm-devel] [PATCH] virtio_net: Fix oops on early interrupts - introduced by virtio reset code

2008-02-11 Thread Christian Borntraeger
Avi, this fixes a problem that was introduced by the virtio_reset patches. Can you apply that fix to kvm.git as a bugfix, as the virtio_reset infrastructure is not on Linus upstream yet? Anthony, Dor, are you ok with that change? -- With the latest virtio_reset patches I got the following oops

Re: [kvm-devel] kvm-intel.ko unable to create /dev/kvm

2008-02-11 Thread Michael Tokarev
[EMAIL PROTECTED] wrote: > > Hello All, > > I'm having some trouble with kvm-60. I'm trying to run it from a flash > (ram disk). When I load kvm-intel.ko, it doesn't create the device file > /dev/kvm. Can anyone give me a clue to why this might be so. Is the ram > disk the problem? a kernel modu

[kvm-devel] kvm-intel.ko unable to create /dev/kvm

2008-02-11 Thread gerryw
Hello All, I'm having some trouble with kvm-60. I'm trying to run it from a flash (ram disk). When I load kvm-intel.ko, it doesn't create the device file /dev/kvm. Can anyone give me a clue to why this might be so. Is the ram disk the problem? Thanks, -G

Re: [kvm-devel] [PATCH] virtio_ring: make structure defines packed

2008-02-11 Thread Christian Borntraeger
Am Sonntag, 10. Februar 2008 schrieb ron minnich: > The problem for me is that gcc packed is not compatible with the plan > 9 C compiler. So, for a truly heterogeneous setup, you are going to > have > to have code to marshall the structures when transferring between > domains, and you are better of

Re: [kvm-devel] Broken external module build on 2.6.23

2008-02-11 Thread Avi Kivity
Avi Kivity wrote: > Thanks, applied that. I added an include-compat/asm symlink so that > it builds. > Actually I applied the second version you sent. -- error compiling committee.c: too many arguments to function - This

Re: [kvm-devel] Broken external module build on 2.6.23

2008-02-11 Thread Avi Kivity
Andrea Arcangeli wrote: > I created a more complete patch below, this will solve all my silent > time-wasting miscompilations (currnently when building kvm.git on a > newer mainline kernels, certain kvm*.h $KERNELDIR headers are included > instead of my modified ones in $LINUX, so the build can cra

Re: [kvm-devel] swapping with MMU Notifiers V2

2008-02-11 Thread Andrea Arcangeli
On Mon, Feb 11, 2008 at 10:20:37AM +0200, Avi Kivity wrote: > Andrea Arcangeli wrote: >> On Thu, Jan 31, 2008 at 01:58:42PM +0100, Andrea Arcangeli wrote: >> >>> It might also be something stale in the buildsystem (perhaps a distcc >>> of ccache glitch?), I also cleared 1G of ccache just to be s

Re: [kvm-devel] Broken external module build on 2.6.23

2008-02-11 Thread Andrea Arcangeli
On Mon, Feb 11, 2008 at 12:19:44PM +0100, Andrea Arcangeli wrote: > + LINUXINCLUDE="-I`pwd`/include -Iinclude -Iinclude-compat \ woops, here the last version: Signed-off-by: Andrea Arcangeli <[EMAIL PROTECTED]> diff -urN 1/kernel/include/asm-x86/cmpxchg.h 2/kernel/include/asm-x86/cmp

Re: [kvm-devel] Broken external module build on 2.6.23

2008-02-11 Thread Andrea Arcangeli
On Mon, Feb 11, 2008 at 10:14:56AM +0200, Avi Kivity wrote: > What happens if you compile kvm against a kernel that doesn't have > linux/cmpxchg.h? > >> diff --git a/kernel/include/linux/anon_inodes.h >> b/kernel/include/linux/anon_inodes.h >> deleted file mode 100644 >> index b2e1ba3..000 >>

Re: [kvm-devel] amd64: does it ever work? ;)

2008-02-11 Thread Avi Kivity
Michael Tokarev wrote: > I first tried 64bit HOST kernel and 32bit host userspace. It didn't matter > what to use as guest - it doesn't even try to boot. > > Okay. Fixed that bit for kvm-61. -- error compiling committee.c: too many arguments to function ---

Re: [kvm-devel] amd64: does it ever work? ;)

2008-02-11 Thread Michael Tokarev
Avi Kivity wrote: > Amit Shah wrote: >> On Sunday 10 February 2008 17:01:46 Avi Kivity wrote: >> >>> Michael Tokarev wrote: >>> Ok, I finally got it working. The problem was 32/64 bits issue. I'm so used to 64bits kernel and 32bits userland - not a single thought occure

Re: [kvm-devel] [PATCH 0 of 3] RFC: creating a particular vcpu type

2008-02-11 Thread Avi Kivity
Anthony Liguori wrote: > > So the new ioctl() has the extra data and the old ioctl() is just a > compat interface which calls the new ioctl with a NULL extra data. I > think this is the better approach if you're going this route. > > However, I still don't think that supporting asymmetric cores

Re: [kvm-devel] swapping with MMU Notifiers V2

2008-02-11 Thread Avi Kivity
Andrea Arcangeli wrote: > On Thu, Jan 31, 2008 at 01:58:42PM +0100, Andrea Arcangeli wrote: > >> It might also be something stale in the buildsystem (perhaps a distcc >> of ccache glitch?), I also cleared 1G of ccache just to be sure in >> > > My build problem might have been related to the

Re: [kvm-devel] preempt notifier emulation host crash fix

2008-02-11 Thread Avi Kivity
Andrea Arcangeli wrote: > Hello, > > there's a small glitch in the preempt notifier external module > emulation. The overloaded debug handler will not detect when a debug > exception has been generated by ptrace and it'll crash the host by > calling the preempt emulator like if this was a KVM preem

Re: [kvm-devel] Broken external module build on 2.6.23

2008-02-11 Thread Avi Kivity
Andrea Arcangeli wrote: > On Mon, Feb 04, 2008 at 04:01:31PM -0500, Chris Lalancette wrote: > >> Hello, >> The merge with upstream changeset: >> af5ca3f4ec5cc4432a42a73b050dd8898ce8fd00 >> broke building an external module against 2.6.23: >> >> CC [M] /root/kvm-userspace/kernel/kvm_main

Re: [kvm-devel] [PATCH] Fix to kvm_arch_vcpu_ioctl_set_sregs so that set_cr0 works properly

2008-02-11 Thread Avi Kivity
Paul Knowles wrote: > Whilst working on getting a VM to initialize in to IA32e mode I found > this issue. set_cr0 relies on comparing the old cr0 to the new one to > work correctly. > > Applied, thanks. I moved the assignment below rather than deleting it to be a little more conservative