Re: [kvm-devel] [PATCH] KVM: make MMU_DEBUG compile again

2008-02-17 Thread Avi Kivity
Marcelo Tosatti wrote: the cr3 variable is now inside the vcpu-arch structure. Applied, thanks. -- Any sufficiently difficult bug is indistinguishable from a feature. - This SF.net email is sponsored by: Microsoft

Re: [kvm-devel] [PATCH 0/2 -v(many)] kvmclock

2008-02-17 Thread Avi Kivity
Glauber de Oliveira Costa wrote: I think this version addresses avi's last comments. I'm not resending userspace since it is unchanged Applied, thanks. Added structure packing for kvm_wall_clock. -- Any sufficiently difficult bug is indistinguishable from a feature.

Re: [kvm-devel] [PATCH] kvm also need to workaround changes about tcg code

2008-02-17 Thread Avi Kivity
Zhang, Xiantao wrote: From: Xiantao Zhang [EMAIL PROTECTED] Date: Fri, 15 Feb 2008 10:50:22 +0800 Subject: [PATCH] qemu: IA64 also need to workaround tcg code. Applied, thanks. -- Any sufficiently difficult bug is indistinguishable from a feature.

Re: [kvm-devel] [patch 2/5] KVM: hypercall based pte updates and TLB flushes

2008-02-17 Thread Avi Kivity
Avi Kivity wrote: Marcelo Tosatti wrote: Hypercall based pte updates are faster than faults, and also allow use of the lazy MMU mode to batch operations. Don't report the feature if two dimensional paging is enabled. Signed-off-by: Marcelo Tosatti [EMAIL PROTECTED] +/* + * We only need

Re: [kvm-devel] [patch 2/5] KVM: hypercall based pte updates and TLB flushes

2008-02-17 Thread Avi Kivity
Marcelo Tosatti wrote: Issue is the paravirt_ops code in Linux does not cover all pte updates (bit updates, ptep_get_and_clear, etc). The plan is to get the basic infrastructure merged into KVM first (which is a significant improvement already) and then later have paravirt_ops cover all

Re: [kvm-devel] BOCHS update with DMI functional

2008-02-17 Thread Avi Kivity
Ryan Harper wrote: I just tested the latest BOCHS from cvs, which includes the DMI/SMBIOS patch from Filip, with qemu cvs HEAD, and kvm as well and the export DMI tables are fully functional. Running dmidecide in the guest displays all of the appropriate information. I was wondering what the

Re: [kvm-devel] [patch 1/6] mmu_notifier: Core code

2008-02-16 Thread Avi Kivity
Andrew Morton wrote: How important is this feature to KVM? Very. kvm pins pages that are referenced by the guest; a 64-bit guest will easily pin its entire memory with the kernel map. So this is critical for guest swapping to actually work. Other nice features like page migration are

Re: [kvm-devel] [kvm-ppc-devel] upstream PowerPC qemu breakage

2008-02-16 Thread Avi Kivity
Hollis Blanchard wrote: On Wed, 2008-02-13 at 08:58 +0200, Avi Kivity wrote: It'll need to be built against your kernel tree; please provide a URL. curl http://penguinppc.org/~hollisb/kvm/kvm-powerpc.mbox | git-am Unfortunately I wasn't able to get an F8 ppc rescue cd ISO

Re: [kvm-devel] [PATCH] enable gfxboot on VMX

2008-02-16 Thread Avi Kivity
Alexander Graf wrote: While enabling gfxboot over vmx is very desirable, I'd like to avoid guest-specific hacks. IMO the correct fix is to set a non_vt_friendly flag when switching from real mode to protected mode, then continue emulation, re-computing the flag after every instruction.

Re: [kvm-devel] [patch 1/6] mmu_notifier: Core code

2008-02-16 Thread Avi Kivity
Andrew Morton wrote: Very. kvm pins pages that are referenced by the guest; hm. Why does it do that? It was deemed best not to allow the guest to write to a page that has been swapped out and assigned to an unrelated host process. One way to view the kvm shadow page tables

Re: [kvm-devel] [kvm-ppc-devel] KVM's signal masking

2008-02-15 Thread Avi Kivity
Hollis Blanchard wrote: We're having a hard time tracking down a PowerPC bug that seems to be related to KVM's signal handling (SIGALRM in particular), so we're trying to understand the overall signal handling design. It looks like the run sequence goes something like this: 1. qemu:

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

2008-02-14 Thread Avi Kivity
Glauber Costa wrote: +static void kvm_write_wall_clock(struct kvm_vcpu *v, gpa_t wall_clock) +{ +int version = 1; +struct kvm_wall_clock wc; +unsigned long flags; +struct timespec wc_ts; + +local_irq_save(flags); +kvm_get_msr(v, MSR_IA32_TIME_STAMP_COUNTER, +

Re: [kvm-devel] [PATCH] KVM: SVM: fix Windows XP 64 bit installation crash

2008-02-14 Thread Avi Kivity
Joerg Roedel wrote: While installing Windows XP 64 bit wants to access the DEBUGCTL and the last branch record (LBR) MSRs. Don't allowing this in KVM causes the installation to crash. This patch allow the access to these MSRs and fixes the issue. Applied, thanks. -- Any sufficiently

Re: [kvm-devel] KVM not reporting dmidecode

2008-02-14 Thread Avi Kivity
Ryan Harper wrote: I posted[1] a dmi patches a bit ago on qemu-devel for this. There was a better solution that involved fixing up the BIOS bits (bochs and qemu). That patch is available as well on qemu-devel. I've not see any indication of when either bochs or qemu will pick up the DMI

Re: [kvm-devel] KVM not reporting dmidecode

2008-02-14 Thread Avi Kivity
Alexander Graf wrote: I would really love to see this as well. Mac OS X is rather picky on the DMI tables, so I'm pretty sure I'll be able to find some bugs in the implementation when it's posted. I also have several bios changes to include support for newer hardware, which was required

Re: [kvm-devel] KVM: SVM: Implement LBR virtualization

2008-02-14 Thread Avi Kivity
Joerg Roedel wrote: This patch set enables the virtualization of the last branch record in SVM if this feature is supported by the hardware. To the previous post the fix for the XP 64 bit install crash has been removed from this series and was posted seperatly to keep it small enough for

Re: [kvm-devel] KVM not reporting dmidecode

2008-02-14 Thread Avi Kivity
Alexander Graf wrote: I do, yes. The patches are already lying around on the qemu ML but have not received any comments or commits. If you have any idea how to get them into qemu, please tell me. I'd love to see them included. The only method that seems to work is to keep resending;

Re: [kvm-devel] [PATCH 3/3] KVM: SVM: enable LBRV virtualization

2008-02-13 Thread Avi Kivity
Joerg Roedel wrote: This still has the same issue as the previous patchset: if the guest enables some other bit in MSR_IA32_DEBUCTLMSR, we silently ignore it. We should either pr_unimpl() on such bits or not handle them (ultimately injecting a #GP). Thats not true.

Re: [kvm-devel] [PATCH 3/3] KVM: SVM: enable LBRV virtualization

2008-02-13 Thread Avi Kivity
Joerg Roedel wrote: @@ -1224,6 +1261,15 @@ static int svm_set_msr(struct kvm_vcpu *vcpu, unsigned ecx, u64 data) if (data != 0) goto unhandled; break; + case MSR_IA32_DEBUGCTLMSR: + svm-vmcb-save.dbgctl = data; +

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

2008-02-13 Thread Avi Kivity
Glauber de Oliveira Costa wrote: 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

Re: [kvm-devel] Signals for file descriptors

2008-02-13 Thread Avi Kivity
Anders Melchiorsen wrote: I am wondering about this commit, http://git.kernel.org/?p=virt/kvm/kvm-userspace.git;a=commit;h=b4e392c21c4b98c1c13af353caa3d6e6bcb6b8af which adds signals on tap I/O. It seems a bit half-done to me. For one thing, it is mixing timers with I/O. The signal

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

2008-02-12 Thread Avi Kivity
Marcelo Tosatti wrote: + /* +* If its a largepage mapping, there could be a previous +* pointer to a PTE page hanging there, which will falsely +* set was_rmapped. +*/ + if (largepage) + was_rmapped = is_large_pte(*shadow_pte); + But that pte page

Re: [kvm-devel] upstream PowerPC qemu breakage

2008-02-12 Thread Avi Kivity
Hollis Blanchard wrote: On Tue, 2008-02-12 at 12:45 +0200, Avi Kivity wrote: Hollis Blanchard wrote: Long term, one option is to try to define a new qemu target that completely bypasses the code generation parts of qemu. Anthony did that for x86 once, but there are at least a couple

Re: [kvm-devel] upstream PowerPC qemu breakage

2008-02-12 Thread Avi Kivity
Anthony Liguori wrote: In the short term we'll have to fork a working userspace, since we're in the middle of some other stuff (such as real guest IO, which I think is pretty important :) . Long term, one option is to try to define a new qemu target that completely bypasses the code

Re: [kvm-devel] SIMPLE_ATTRIBUTE_GETTER compile fix

2008-02-12 Thread Avi Kivity
Andrea Arcangeli wrote: Hello, this GETTER stuff looks a bit tricky... (we've just to cope with it). Anyway this allows building again and perhaps there's something good in the patch (not sure about the = 2.6.25 side that I didn't touch) Signed-off-by: Andrea Arcangeli [EMAIL PROTECTED]

Re: [kvm-devel] upstream PowerPC qemu breakage

2008-02-12 Thread Avi Kivity
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 that

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

2008-02-12 Thread Avi Kivity
Marcelo Tosatti wrote: Ok, how does the following look. Still need to plug in large page creation in the nonpaging case, but this should be enough for comments. Most of the comments are cosmetic, but a couple have some meat. +#define HPAGE_ALIGN_OFFSET(x)

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

2008-02-12 Thread Avi Kivity
Joerg Roedel wrote: 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. Applied, thanks. diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index dee6bce..817cad0 100644 ---

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

2008-02-12 Thread Avi Kivity
Ryan Harper wrote: 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 Applied, thanks. -- error compiling committee.c: too many arguments to function

Re: [kvm-devel] [RFC] Qemu powerpc work around

2008-02-12 Thread Avi Kivity
Jerone Young wrote: So the recent code in qemu cvs has problem powerpc. So what I have done is mainly work around this in the build system, by creating ppcemb_kvm-sofmmu target. Along with this is a fake-exec.c that stubs out the functions that are no longer defined (something done by Anthony

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 fact the

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 compiling

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, there are some

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 crash

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] [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 is

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.o

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

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 preempt

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

Re: [kvm-devel] [PATCH][RFC] SVM: Add Support for Nested Paging in AMD Fam16 CPUs

2008-02-10 Thread Avi Kivity
Joerg Roedel wrote: On Sun, Jan 27, 2008 at 10:57:07AM +0200, Avi Kivity wrote: Very nice patchset; small, simple, and clean. Apart from the comments I already posted, I'd like to avoid the term 'hap': I find it non-descriptive, and it reminds me of another hypervisor. I suggest 'tlp

Re: [kvm-devel] [PATCH 2/6] Use correct types to enable 2G support (v2)

2008-02-10 Thread Avi Kivity
Izik Eidus wrote: Index: qemu/cpu-all.h === --- qemu.orig/cpu-all.h 2008-02-01 15:24:45.0 -0600 +++ qemu/cpu-all.h 2008-02-01 15:28:48.0 -0600 @@ -695,7 +695,7 @@ /* page related stuff */ -#define

Re: [kvm-devel] [PATCH] Remove unoptimal code from qemu dcr handles for powerpc

2008-02-10 Thread Avi Kivity
Hollis Blanchard wrote: On Mon, 2008-01-28 at 23:38 -0600, Jerone Young wrote: A patch I submitted yesterday to use the call qemu_kvm_cpu_env() in the dcr handles is not needed since in kvm_arch_post_kvm_run variable cpu_single_env is set to env. So just use cpu_single_env to get env.

Re: [kvm-devel] [PATCH] Update Copyrights on PowerPC KVM Qemu code

2008-02-10 Thread Avi Kivity
Jerone Young wrote: # HG changeset patch # User Jerone Young [EMAIL PROTECTED] # Date 1201818508 21600 # Node ID 739668b2f1913a381899d82912517a6568b6f30c # Parent 5b553559aa641bf36b190541f775396ecdbf0e78 Update Copyrights on PowerPC KVM Qemu code. I missed a copyright that needed to be in

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

2008-02-10 Thread Avi Kivity
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 occured to me that this might be problematic of some sort. I was always trying 32bits kvm usermode tools with 64bits kernels. Now

Re: [kvm-devel] Fedora 8 as kvm guest

2008-02-10 Thread Avi Kivity
Bob Tennent wrote: I'm experimenting with kvm on a Fedora 8 system. I've installed the necessary packages, have a suitable CPU etc. I'll eventually aim for a Windows guest, but am trying out a virtual Fedora 8 guest. When I try to install a Fedora guest, it threatens to wipe and re-partition

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

2008-02-10 Thread Avi Kivity
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 vmlaunch instruction when in real mode and instead would be doing an x86_emulate()

Re: [kvm-devel] [kvm-commits] [PATCH] kvm: qemu: add copyright notices

2008-02-10 Thread Avi Kivity
Anthony Liguori wrote: Avi Kivity wrote: From: Avi Kivity [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] Can you also add one for qemu-kvm-x86.c? Sure, added. -- error compiling committee.c: too many arguments to function

Re: [kvm-devel] KVM: add support for SVM Nested Paging

2008-02-10 Thread Avi Kivity
Joerg Roedel wrote: Hi, here is the improved patchset which adds support for the Nested Paging feature of the AMD Barcelona and Phenom processors to KVM. The patch set was successfully install- and runtime-tested with various guest operating systems (64 bit, 32 bit legacy and 32 bit PAE

Re: [kvm-devel] [Qemu-devel] Re: [PATCH 2/6] Use correct types to enable 2G support (v2)

2008-02-10 Thread Avi Kivity
Paul Brook wrote: as far as i remember it was used to address something with cpu_physical_memory_rw() probably related to TARGET_PAGE_SIZE or ~TARGET_PAGE_SIZE, the fact is that i dont know if it ever fixed anything It fixes TARGET_PAGE_MASK, defined one line downscreen.

Re: [kvm-devel] [Qemu-devel] Re: [PATCH 2/6] Use correct types to enable 2G support (v2)

2008-02-10 Thread Avi Kivity
Paul Brook wrote: On Sunday 10 February 2008, Avi Kivity wrote: Paul Brook wrote: as far as i remember it was used to address something with cpu_physical_memory_rw() probably related to TARGET_PAGE_SIZE or ~TARGET_PAGE_SIZE, the fact is that i dont know if it ever fixed anything

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

2008-02-10 Thread Avi Kivity
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 occured to me that this might be problematic

[kvm-devel] Offline for a week

2008-02-01 Thread Avi Kivity
I will be offline for the entire week of Feb 2 - Feb 9. I will only be reachable by specially trained St. Bernards. Andrew, if kvm.git gives you undue trouble, please drop it and I'll sort out the mess when I return. -- Any sufficiently difficult bug is indistinguishable from a feature.

Re: [kvm-devel] [PATCH 1/6] Use correct types to enable 2G support

2008-02-01 Thread Avi Kivity
Anthony Liguori wrote: Fabrice Bellard wrote: Anthony Liguori wrote: +/* above 4giga memory allocation */ +if (above_4g_mem_size 0) { +ram_addr = qemu_ram_alloc(above_4g_mem_size); +cpu_register_physical_memory(0x1, above_4g_mem_size, ram_addr); +} +

Re: [kvm-devel] [PATCH] Converting mmio to port io in userspace for IA64

2008-01-31 Thread Avi Kivity
Zhang, Xiantao wrote: Avi Kivity wrote: Zhang, Xiantao wrote: +#define TO_LEGACY_IO(addr) (((addr0x3ff) 12 2)|((addr) 0x3)) Please change to a function. Other than that, patch looks good. Thanks ! Attached. :) Xiantao From: Zhang Xiantao [EMAIL

Re: [kvm-devel] [PATCH] kvm: testsuite: silence warnings on x86_64

2008-01-31 Thread Avi Kivity
Carlo Marcelo Arenas Belon wrote: [I forgot to reply to the this:] --- kvm-60/user/test/x86/access.c +++ kvm-60/user/test/x86/access.c 2008/01/24 15:14:16 @@ -1,6 +1,7 @@ #include smp.h #include printf.h +#include string.h #define true 1 #define false 0 @@ -569,7 +570,7 @@

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

2008-01-31 Thread Avi Kivity
Andrea Arcangeli wrote: On Thu, Jan 31, 2008 at 08:50:01AM +0200, Avi Kivity wrote: This is surprising. pagefault_disable() is really a preempt_disable(), and kvm_read_guest_atomic() should only be called from atomic contexts (with preemption already disabled), no? _spin_lock

Re: [kvm-devel] [PATCH] kvm: testsuite: silence warnings on x86_64

2008-01-31 Thread Avi Kivity
Carlo Marcelo Arenas Belon wrote: On Thu, Jan 24, 2008 at 06:21:56PM +0200, Avi Kivity wrote: Bernhard Kaindl wrote: I did not test this patch as I did not find documentation on how to run the test cases and I could not find a make target to run them from make. make

Re: [kvm-devel] [PATCH]: Fix memory corruption in-kernel IOAPIC emulation

2008-01-30 Thread Avi Kivity
Chris Lalancette wrote: All, Attached is a patch that fixes the first (of at least a couple) migration problem that I am running into. Basically, using the setup I described in my last post, I was always getting Disabling IRQ #11 once the guest reached the destination side, and then no

Re: [kvm-devel] [RFC] VMX CR3 cache

2008-01-30 Thread Avi Kivity
Gerd Hoffmann wrote: Gerd Hoffmann wrote: I've passed in a physical address. The vmx_cr3_cache_msr() function has a gva_to_page() call which makes me suspect it expects a virtual address. Confirmed. When passing in a virtual address it works. And it gives me a nice speedup for

Re: [kvm-devel] [PATCH] Clean up KVM/QEMU interaction

2008-01-30 Thread Avi Kivity
Avi Kivity wrote: Anthony Liguori wrote: This patch attempts to clean up the interactions between KVM and QEMU. Sorry for such a big patch, but I don't think there's a better way to approach this such that it's still bisect friendly. I think this is most of what's needed to get basic

Re: [kvm-devel] [PATCH] bios: fix for parallel build (make -j2)

2008-01-30 Thread Avi Kivity
Carlo Marcelo Arenas Belon wrote: prevents reusing tmp.bin for both BIOS-bochs-legacy and BIOS-bochs-latest targets. committed upstream in revision 1.27 of Makefile.in to fix bug 1799877. patch applied as well to generated Makefile. Applied, thanks. -- error compiling committee.c: too

Re: [kvm-devel] [RFC] nmi watchdog in kvm

2008-01-30 Thread Avi Kivity
Balaji Rao wrote: Hello, I was trying to enable the use of nmi watchdog within a linux guest running in kvm. I have done it by allowing direct access to perfmon msrs using the MSR_BITMAP field in vmcs region. Most of the times the NMI Watchdog Test in the guest fails, but with a finite

Re: [kvm-devel] [PATCH 1/2] VMX: unifdef the EFER specific code

2008-01-30 Thread Avi Kivity
Joerg Roedel wrote: To allow access to the EFER register in 32bit KVM the EFER specific code has to be exported to the x86 generic code. This patch does this in a backwards compatible manner. Signed-off-by: Joerg Roedel [EMAIL PROTECTED] --- arch/x86/kvm/vmx.c | 10 ++ 1 files

Re: [kvm-devel] [PATCH 2/2] X86: allow access to EFER in 32bit KVM

2008-01-30 Thread Avi Kivity
Joerg Roedel wrote: This patch makes the EFER register accessible on a 32bit KVM host. This is necessary to boot 32 bit PAE guests under SVM. static void set_efer(struct kvm_vcpu *vcpu, u64 efer) { if (efer EFER_RESERVED_BITS) { @@ -432,12 +430,19 @@ static void

Re: [kvm-devel] [PATCH] Cleanup extern declerations for now removed vcpu_env in Qemu

2008-01-30 Thread Avi Kivity
Jerone Young wrote: # HG changeset patch # User Jerone Young [EMAIL PROTECTED] # Date 1201568508 21600 # Node ID a568d031723942e1baf77077031d2b77795cbd8a # Parent 5ce532cf9a1f711d1fecb42814d301abd37aa378 Cleanup extern declerations for now removed vcpu_env in Qemu This patch removes

Re: [kvm-devel] [PATCH] Remove unnecessary linux/kvm.h include (v2)

2008-01-30 Thread Avi Kivity
Anthony Liguori wrote: This removes an unnecessary include of linux/kvm.h which happens to silence a warning introduced by my previous patch :-) We have to move the ABI check too until we've included libkvm.h. Doesn't apply, please check. -- error compiling committee.c: too many

Re: [kvm-devel] [RFC] nmi watchdog in kvm

2008-01-30 Thread Avi Kivity
Balaji Rao wrote: On Wednesday 30 January 2008 04:13:58 pm Avi Kivity wrote: @@ -790,6 +795,18 @@ static int apic_mmio_range(struct kvm_io_device *this, gpa_t addr) return ret; } +static int nmi_notify(struct notifier_block *self,unsigned long val, void *data) { + +struct kvm

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

2008-01-30 Thread Avi Kivity
Carsten Otte wrote: We have similar restrictions than you're naming here. Our guest may start at a (userspace-) page boundary, and has a fixed 1:1 mapping to userspace for a given length. We do that by just having one memory slot which has to start at virtual address zero in kvm. I thought

Re: [kvm-devel] [RFC] nmi watchdog in kvm

2008-01-30 Thread Avi Kivity
Balaji Rao wrote: On Wednesday 30 January 2008 08:09:32 pm Avi Kivity wrote: I intended to do this here. Looks like its not the right way to check for presence in vcpu context. How do i do it ? please explain. +static void vmx_inject_nmi(struct kvm_vcpu *vcpu) { + + struct

Re: [kvm-devel] [PATCH]: Fix memory corruption in-kernel IOAPIC emulation

2008-01-30 Thread Avi Kivity
Chris Lalancette wrote: Avi Kivity wrote: Excellent catch, but the fix is wrong. Instead of partially restoring the ioapic state in the kernel, you should fully save it in qemu. This is a trap that many fall into: considering kvm and qemu as one entity and making sure they work well

[kvm-devel] [GIT PULL] KVM updates for the 2.6.25 merge window

2008-01-30 Thread Avi Kivity
userspace memory for older userspace KVM: Fix gfn_to_page() acquiring mmap_sem twice Avi Kivity (91): KVM: VMX: Further reduce efer reloads KVM: Allow not-present guest page faults to bypass kvm KVM: MMU: Make flooding detection work when guest page faults are bypassed KVM

Re: [kvm-devel] Performance monitoring units and KVM

2008-01-30 Thread Avi Kivity
Markus Armbruster wrote: System-wide profiling of the *virtual* machine is related to profiling just a process. That's hard. I guess building on Perfmon2 would make sense there, but as long as it's out of tree... Can we wait for it? If not, what then? Give the guest access to the

Re: [kvm-devel] Performance monitoring units and KVM

2008-01-30 Thread Avi Kivity
Balaji Rao wrote: On Wednesday 30 January 2008 11:11:51 pm Avi Kivity wrote: Markus Armbruster wrote: System-wide profiling of the *virtual* machine is related to profiling just a process. That's hard. I guess building on Perfmon2 would make sense there, but as long as it's out

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

2008-01-30 Thread Avi Kivity
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 large page included within that memory slot. Each entry in the array contains

Re: [kvm-devel] Missing part from qemu merge

2008-01-30 Thread Avi Kivity
Anders Melchiorsen wrote: Hi Avi, is it on purpose that this part of my qemu rearm rework was left out when the rest was merged into KVM a few days ago? If there is still a problem with it for KVM, I would like to know. It was unintentional; a by product of the automatic merge. Thanks

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

2008-01-30 Thread Avi Kivity
Andrea Arcangeli wrote: Ok, I think I found one first deadlock source during swapping with the mmu notifiers and it's a KVM bug. I got a deadlock inversion between PT lock and mmu_lock because of this bug. With PREEMPT=n it's not enough to spin_lock(mmu_lock) to disable preempt and in turn the

Re: [kvm-devel] Performance monitoring units and KVM

2008-01-30 Thread Avi Kivity
Markus Armbruster wrote: Avi Kivity [EMAIL PROTECTED] writes: Markus Armbruster wrote: System-wide profiling of the *virtual* machine is related to profiling just a process. That's hard. I guess building on Perfmon2 would make sense there, but as long as it's out of tree... Can

Re: [kvm-devel] [PATCH] Converting mmio to port io in userspace for IA64

2008-01-30 Thread Avi Kivity
Zhang, Xiantao wrote: From: Zhang Xiantao [EMAIL PROTECTED] Date: Thu, 31 Jan 2008 09:06:21 +0800 Subject: [PATCH] kvm: qemu: Covert the mmio address space to port io in userspace. IA64 also have no port io, but chipset is responsible for converting some mmio to port io for keeping

Re: [kvm-devel] [EMAIL PROTECTED]: [patch 3/4] paravirt: set_access_flags/set_wrprotect should use paravirt interface]

2008-01-30 Thread Avi Kivity
Jeremy Fitzhardinge wrote: Marcelo Tosatti wrote: Forgot to copy you... Ideally all pte updates should be done via the paravirt interface. Hm, are you sure? It has the advantage of not falsely triggering any unshadowing heuristics, and of avoiding the lovely x86 emulator.

Re: [kvm-devel] [PATCH]: Fix memory corruption in-kernel IOAPIC emulation

2008-01-30 Thread Avi Kivity
Chris Lalancette wrote: Another version of the patch, done by changing the on-the-wire protocol as Avi suggested. I've tested this with: old - old - Migration works, but runs into the bug I'm trying to fix old - new - Migration works, but runs into the bug I'm trying to fix new - old -

Re: [kvm-devel] [PATCH] KVM: VMX: Fix invalid opcode of VPID

2008-01-29 Thread Avi Kivity
Yang, Sheng wrote: From db6524fb36bbf1f297ae171f18de382c32ed6840 Mon Sep 17 00:00:00 2001 From: Sheng Yang [EMAIL PROTECTED] Date: Tue, 29 Jan 2008 08:17:57 +0800 Subject: [PATCH] KVM: VMX: Fix invalid opcode of VPID Add the missing memory in VPID clobber list, otherwise it would cause

Re: [kvm-devel] [PATCH] Use CONFIG_PREEMPT_NOTIFIERS around struct preempt_notifier

2008-01-29 Thread Avi Kivity
Hollis Blanchard wrote: This allows kvm_host.h to be #included even when struct preempt_notifier is undefined. This is needed to build asm-offsets.h. Applied, thanks. -- error compiling committee.c: too many arguments to function

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

2008-01-29 Thread Avi Kivity
Carsten Otte wrote: #include linux/kvm.h @@ -118,6 +119,7 @@ struct kvm { struct kvm_io_bus pio_bus; struct kvm_vm_stat stat; struct kvm_arch arch; +struct mmu_notifier mmu_notifier; }; /* The guest did something we don't support. */ This should not be in

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

2008-01-29 Thread Avi Kivity
Andrea Arcangeli wrote: Didn't realize s390 doesn't need those at all. Do you think mmu_notifier.h should also go in asm/mmu_notifier? We can always move them there later after merging with some compat code if needed. s390 is the odd bird, not x86, so I'd like a solution that doesn't

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

2008-01-29 Thread Avi Kivity
Carsten Otte wrote: Avi Kivity wrote: Every arch except s390 needs it. An ugly #ifndef CONFIG_KVM_HARDWARE_TLB_SYNC is preferred to duplicating the code. BTW, from reading AMDs spec I don't expect NPT to need this vehicle for swapping either. They can just let core-vm page out guest pages

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

2008-01-29 Thread Avi Kivity
Andrea Arcangeli wrote: On Tue, Jan 29, 2008 at 05:35:34PM +0100, Carsten Otte wrote: Avi Kivity wrote: Every arch except s390 needs it. An ugly #ifndef CONFIG_KVM_HARDWARE_TLB_SYNC is preferred to duplicating the code. BTW, from reading AMDs spec I don't expect NPT

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

2008-01-29 Thread Avi Kivity
Andrea Arcangeli wrote: duplication for x86, ppc, and ia64. There is a few lines of duplication yes, the bulk of the code was already only in x86.c and it has to stay there. It's only the few lines of registration we're talking about it, so I don't think the #ifdef would save enough.

[kvm-devel] large page support for kvm

2008-01-29 Thread Avi Kivity
The npt patches started me thinking on large page support (2MB/4MB pages), and I think we can implement them even when npt/ept are not available. Here's a rough sketch of my proposal: - For every memory slot, allocate an array containing one int for every potential large page included within

Re: [kvm-devel] [PATCH 2/2] virtio reset support

2008-01-29 Thread Avi Kivity
Anthony Liguori wrote: Avi Kivity wrote: Anthony Liguori wrote: PCI-e has a common reset concept (warm and cold). I've been looking around and I can't seem to find any common reset mechanism for PCI. Is FLR something that is per-device or a standard PCI mechanism? If it's the former

Re: [kvm-devel] [PATCH] SVM: set NM intercept when enabling CR0.TS in the guest

2008-01-29 Thread Avi Kivity
Joerg Roedel wrote: Explicitly enable the NM intercept in svm_set_cr0 if we enable TS in the guest copy of CR0 for lazy FPU switching. This fixes guest SMP with Linux under SVM. Without that patch Linux deadlocks or panics right after trying to boot the other CPUs. Applied, thanks. --

Re: [kvm-devel] [patch 1/6] mmu_notifier: Core code

2008-01-29 Thread Avi Kivity
Christoph Lameter wrote: On Tue, 29 Jan 2008, Andrea Arcangeli wrote: + struct mmu_notifier_head mmu_notifier; /* MMU notifier list */ }; Not sure why you prefer to waste ram when MMU_NOTIFIER=n, this is a regression (a minor one though). Andrew does not like #ifdefs

Re: [kvm-devel] [PATCH] Update virtio to latest ABI

2008-01-28 Thread Avi Kivity
Anthony Liguori wrote: This ABI breakage is worrying. While it is expected to take some time for the ABI to congeal, we need some way to prevent mismatched guests and hosts from running. Perhaps something like the kvm abi version, storedin the pci revision field? Keep incrementing it

Re: [kvm-devel] [PATCH 0 of 7] PowerPC Embedded KVM qemu enablement patches

2008-01-28 Thread Avi Kivity
Jerone Young wrote: This set of patches is to enable PowerPC embedded KVM capablities to be taken advantage of by qemu. The code currently boots a ungziped uImage of the Linux kernel complied for PowerPC 440 AMCC Bamboo evalution board. We have not fully tested userspace, but fixes will

Re: [kvm-devel] [PATCH][RFC] SVM: Add Support for Nested Paging in AMD Fam16 CPUs

2008-01-28 Thread Avi Kivity
Jeremy Fitzhardinge wrote: Avi Kivity wrote: I find it non-descriptive, and it reminds me of another hypervisor. I suggest 'tlp' for two-level paging. That has its own ambiguity; without other context it reads like two-level pagetable. Anyway, using the same term for the same

Re: [kvm-devel] [PATCH 1/2] KVM: In-kernel PIT model

2008-01-28 Thread Avi Kivity
Yang, Sheng wrote: From af5d9ee2a189c2f0998c5c46d1fcd25c5cb72f8c Mon Sep 17 00:00:00 2001 From: Sheng Yang [EMAIL PROTECTED] Date: Mon, 28 Jan 2008 05:10:22 +0800 Subject: [PATCH] KVM: In-kernel PIT model The patch moved PIT from userspace to kernel, and increase the timer accuracy

Re: [kvm-devel] [PATCH 2/2] kvm: libkvm/qemu: Support in-kernel PIT model

2008-01-28 Thread Avi Kivity
Yang, Sheng wrote: +void kvm_create_pit(kvm_context_t kvm) +{ + int r; + + if (!kvm-no_pit_creation) { + r = ioctl(kvm-fd, KVM_CHECK_EXTENSION, KVM_CAP_PIT); + if (r 0) { + r = ioctl(kvm-vm_fd, KVM_CREATE_PIT); + if

Re: [kvm-devel] [PATCH 0/2]KVM: In-kernel PIT model

2008-01-28 Thread Avi Kivity
Yang, Sheng wrote: Hi, Here is the updated in-kernel PIT model. The main improvements are: Looking good; apart from some very minor comments all that is missing is save/restore support. -- error compiling committee.c: too many arguments to function

Re: [kvm-devel] [PATCH] Update virtio to latest ABI

2008-01-28 Thread Avi Kivity
Anthony Liguori wrote: I'm worried about the ramp up to 2.6.25 causing confusion among users as before that things will break left and right, if we don't provide a tighter check. Well, using the PCI revision ID isn't a bad idea. It wouldn't have helped this last problem because that

Re: [kvm-devel] [RFC] VMX CR3 cache

2008-01-28 Thread Avi Kivity
Marcelo Tosatti wrote: So the questions are, why the benefit is not similar (vm-exit's are now way cheaper?) and is it worth to merge this given the results? Yes, vmexits are now about 5 times faster compared to older kvm. + +/* + * Avoid the VM exit upon cr3 load by using the cached

<    4   5   6   7   8   9   10   11   12   13   >