[PATCH] Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6

2008-10-29 Thread Avi Kivity
From: Avi Kivity [EMAIL PROTECTED] Conflicts: include/linux/kvm_host.h virt/kvm/kvm_main.c Signed-off-by: Avi Kivity [EMAIL PROTECTED] -- To unsubscribe from this list: send the line unsubscribe kvm-commits in the body of a message to [EMAIL PROTECTED] More majordomo info at

[PATCH] KVM: MMU: increase per-vcpu rmap cache alloc size

2008-10-29 Thread Avi Kivity
From: Marcelo Tosatti [EMAIL PROTECTED] The page fault path can use two rmap_desc structures, if: - walk_addr's dirty pte update allocates one rmap_desc. - mmu_lock is dropped, sptes are zapped resulting in rmap_desc being freed. - fetch-mmu_set_spte allocates another rmap_desc. Increase to 4

[PATCH] kvm: user: ppc: better error reporting in load_file

2008-10-29 Thread Avi Kivity
From: Hollis Blanchard [EMAIL PROTECTED] This patch adds a better error reporting for powerpc testcases. It prints the bytes read in load_file so far until an error occured. Signed-off-by: Hollis Blanchard [EMAIL PROTECTED] Signed-off-by: Christian Ehrhardt [EMAIL PROTECTED] Signed-off-by: Avi

[PATCH] kvm: qemu: powerpc: fix env-xer access

2008-10-29 Thread Avi Kivity
From: Christian Ehrhardt [EMAIL PROTECTED] Since qemu revision 5500 which was merged with the last qemu merge env-xer is accessed directly. Signed-off-by: Christian Ehrhardt [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] diff --git a/qemu/qemu-kvm-powerpc.c

[PATCH] kvm: qemu: ppc: if not a uImage, try to load kernel as ELF

2008-10-29 Thread Avi Kivity
From: Hollis Blanchard [EMAIL PROTECTED] This allows qemu to load bare metal ELF kernels, useful for standalone benchmarks and testcases. We could/should also load the specified file as a flat binary, if both uImage and ELF loaders fail. (See hw/arm_boot.c.) Signed-off-by: Hollis Blanchard

[PATCH] kvm: qemu: ppc: fix initial ppc memory setup

2008-10-29 Thread Avi Kivity
From: Christian Ehrhardt [EMAIL PROTECTED] The old memory initialization code was broken for all cases not fitting in one ram stick. This patch fixes the ram_stick calculation, now sets the proper base adresses per stick and removes the old workaround. Signed-off-by: Christian Ehrhardt [EMAIL

[PATCH] kvm: user: ppc: implement PowerPC 44x libcflat

2008-10-29 Thread Avi Kivity
From: Hollis Blanchard [EMAIL PROTECTED] - Create a 44x-specific makefile. - Reorganize PowerPC makefiles to separate simple tests from those which link with libcflat. - Create a minimal libcflat testcase (which just exits). Signed-off-by: Hollis Blanchard [EMAIL PROTECTED] Signed-off-by:

[PATCH] kvm: external module: Treat NONARCH_CONFIG as a list

2008-10-29 Thread Avi Kivity
From: Hollis Blanchard [EMAIL PROTECTED] As discussed on the list the unifdef changes break powerpc (and more ?). A fix is to treat NONARCH_CONFIG as a list instead of a single item. Signed-off-by: Hollis Blanchard [EMAIL PROTECTED] Signed-off-by: Christian Ehrhardt [EMAIL PROTECTED]

[PATCH] KVM: ia64: Use guest signal mask when blocking

2008-10-29 Thread Avi Kivity
From: Xiantao Zhang [EMAIL PROTECTED] Before a vcpu blocks, it should switch to the guest signal mask to allow signals to unblock it. Signed-off-by: Xiantao Zhang [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] diff --git a/arch/ia64/kvm/kvm-ia64.c b/arch/ia64/kvm/kvm-ia64.c index

[PATCH] KVM: ia64: Remove lock held by halted vcpu

2008-10-29 Thread Avi Kivity
From: Xiantao Zhang [EMAIL PROTECTED] Remove the lock protection for kvm halt logic, otherwise, once other vcpus want to acquire the lock, and they have to wait all vcpus are waken up from halt. Signed-off-by: Xiantao Zhang [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] diff

Re: [PATCH] regression: vmalloc easily fail.

2008-10-29 Thread Avi Kivity
Nick Piggin wrote: Right... that was to add a guard page like the old vmalloc allocator. vmallocs still add their extra page too, so most of them will have a 2 page guard area, but I didn't think this would hurt significantly. I'm not against the patch, but I wonder exactly what is filling it

Re: kvm + kqemu enabled at the same time

2008-10-29 Thread Avi Kivity
Anthony Liguori wrote: Martin Kejík wrote: Hello, I've compiled the KVM enabled QEMU with support for both KVM and KQEMU. Both modules loaded and QEMU running saying kvm: enabled and kqemu: enabled for user code. How does this work?? What does QEMU really do in this situation when we look

RE: [PATCH 5/6] device assignment: support for assigning PCI devices to guests

2008-10-29 Thread Zhang, Xiantao
Muli Ben-Yehuda wrote: On Tue, Oct 28, 2008 at 10:45:57AM -0500, Anthony Liguori wrote: +ifeq ($(USE_KVM), 1) +OBJS+= device-assignment.o +endif I don't think you want to build this on PPC so I think you need a stronger check. Good point. How about checking TARGET_BASE_ARCH = i386?

RE: [PATCH 5/6] device assignment: support for assigning PCI devices to guests

2008-10-29 Thread Han, Weidong
Muli Ben-Yehuda wrote: On Tue, Oct 28, 2008 at 10:45:57AM -0500, Anthony Liguori wrote: +ifeq ($(USE_KVM), 1) +OBJS+= device-assignment.o +endif I don't think you want to build this on PPC so I think you need a stronger check. Good point. How about checking TARGET_BASE_ARCH = i386?

[PATCH] VMX: Handle mmio emulation when guest state is invalid

2008-10-29 Thread Guillaume Thouvenin
If emulate_invalid_guest_state is enabled, the emulator is called when guest state is invalid. Until now, we reported an mmio failure when emulate_instruction() returned EMULATE_DO_MMIO. This patch adds the case where emulate_instruction() failed and an MMIO emulation is needed. Signed-off-by:

Re: [PATCH 00 of 10] kvm-userspace: ppc: userspace fixes for powerpc

2008-10-29 Thread Avi Kivity
Ehrhardt Christian wrote: From: Christian Ehrhardt [EMAIL PROTECTED] This is a set of various fixes in kvm-userspace for powerpc. This time without the split between user/* and the rest and without the qemu patch (sent separate to qemu-devel now). Please send me the changelog entry

Re: [PATCH 0/2] kvm: disable virtualization on kdump

2008-10-29 Thread Avi Kivity
Eric W. Biederman wrote: I think I will get flamed if I try to pull to the core a bunch of code that always lived in the KVM module. 8) Why is KVM modular anyway? That seems like some pretty core cpu functionality... Many reasons. Developers like the ability to rmmod and modprobe

Re: KVM: MMU: increase per-vcpu rmap cache alloc size

2008-10-29 Thread Avi Kivity
Marcelo Tosatti wrote: The page fault path can use two rmap_desc structures, if: - walk_addr's dirty pte update allocates one rmap_desc. - mmu_lock is dropped, sptes are zapped resulting in rmap_desc being freed. - fetch-mmu_set_spte allocates another rmap_desc. Increase to 4 for safety.

Re: [PATCH] regression: vmalloc easily fail.

2008-10-29 Thread Glauber Costa
On Wed, Oct 29, 2008 at 12:29:44AM +0100, Nick Piggin wrote: On Tue, Oct 28, 2008 at 08:55:13PM -0200, Glauber Costa wrote: Commit db64fe02258f1507e13fe5212a989922323685ce broke KVM (the symptom) for me. The cause is that vmalloc allocations fail, despite of the fact that /proc/meminfo

Re: [PATCH 03 of 10] [PATCH] user: ppc: better error reporting in load_file

2008-10-29 Thread Christian Ehrhardt
Avi Kivity wrote: Ehrhardt Christian wrote: From: Hollis Blanchard [EMAIL PROTECTED] Fancy description. Ahem. Sorry that is my patch template description :-/ A proper description header should be: Subject: [PATCH] user: ppc: better error reporting in load_file From: Hollis Blanchard

Re: [Qemu-devel] Re: [PATCH 3/3] Add KVM support to QEMU

2008-10-29 Thread Avi Kivity
Anthony Liguori wrote: Another place hook is updating a slot's dirty bitmap. Right now, with my patchset we don't have live migration or the VGA RAM optimization. There's nothing about the VGA RAM optimization that wouldn't work for QEMU. I'm not sure that it really is an optimization in

Re: [PATCH] regression: vmalloc easily fail.

2008-10-29 Thread Nick Piggin
On Wed, Oct 29, 2008 at 07:48:56AM -0200, Glauber Costa wrote: 0xf7bfe000-0xf7c08192 hpet_enable+0x2d/0x279 phys=fed0 ioremap 0xf7c02000-0xf7c040008192 acpi_os_map_memory+0x11/0x1a phys=7fed1000 ioremap 0xf7c06000-0xf7c080008192 acpi_os_map_memory+0x11/0x1a phys=7fef2000

[v9] Userspace patches for PCI device assignment

2008-10-29 Thread muli
This patchset enables device assignment for KVM hosts for PCI devices. It uses the Intel IOMMU by default if available. Changes from v8-v9 in no particular order: - fixed DEBUG, removed uneeded headers - introduce USE_KVM_DEVICE_ASSIGNMENT modeled after KVM_USE_PIT, per aliguori's suggestion -

[PATCH 5/6] device assignment: support for assigning PCI devices to guests

2008-10-29 Thread muli
From: Muli Ben-Yehuda [EMAIL PROTECTED] This patch has been contributed to by the following people: Or Sagi [EMAIL PROTECTED] Nir Peleg [EMAIL PROTECTED] Amit Shah [EMAIL PROTECTED] Ben-Ami Yassour [EMAIL PROTECTED] Weidong Han [EMAIL PROTECTED] Glauber de Oliveira Costa [EMAIL PROTECTED] Muli

[PATCH 6/6] device assignment: support for hot-plugging PCI devices

2008-10-29 Thread muli
From: Amit Shah [EMAIL PROTECTED] This patch adds support for hot-plugging host PCI devices into guests [muli: various small fixes for review comments] Signed-off-by: Amit Shah [EMAIL PROTECTED] Signed-off-by: Muli Ben-Yehuda [EMAIL PROTECTED] --- qemu/hw/device-hotplug.c | 37

[PATCH 2/6] device assignment: introduce pci_map_irq to get irq nr from pin number

2008-10-29 Thread muli
From: Amit Shah [EMAIL PROTECTED] Signed-off-by: Amit Shah [EMAIL PROTECTED] Signed-off-by: Muli Ben-Yehuda [EMAIL PROTECTED] --- qemu/hw/pci.c |5 + qemu/hw/pci.h |1 + 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/qemu/hw/pci.c b/qemu/hw/pci.c index

[PATCH 1/6] device assignment: add ioctl wrappers

2008-10-29 Thread muli
From: Amit Shah [EMAIL PROTECTED] [muli: return -errno instead of ioctl retval] Signed-off-by: Amit Shah [EMAIL PROTECTED] Signed-off-by: Muli Ben-Yehuda [EMAIL PROTECTED] --- libkvm/libkvm.c | 25 + libkvm/libkvm.h | 27 +++ 2 files changed,

[PATCH 4/6] device assignment: build vtd.c for Intel IOMMU support

2008-10-29 Thread muli
From: Amit Shah [EMAIL PROTECTED] Signed-off-by: Amit Shah [EMAIL PROTECTED] Signed-off-by: Muli Ben-Yehuda [EMAIL PROTECTED] --- kernel/x86/Kbuild |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/kernel/x86/Kbuild b/kernel/x86/Kbuild index 2369d00..c4723b1 100644 ---

Re: [PATCH] [RESEND] VT-d: Support multiple device assignment to one guest

2008-10-29 Thread Joerg Roedel
(sorry for joining this late, I returned from a 3-week vacation this monday) On Tue, Oct 07, 2008 at 03:29:21PM +0200, Avi Kivity wrote: Oh, I see it now. Different devices may need to go under different iommus. This really feels like it should be handled by the iommu API. Users shouldn't

Re: [PATCH] regression: vmalloc easily fail.

2008-10-29 Thread Avi Kivity
Nick Piggin wrote: Hmm, spanning 30MB of memory... how much vmalloc space do you have? From the original report: VmallocTotal: 122880 kB VmallocUsed: 15184 kB VmallocChunk: 83764 kB So it seems there's quite a bit of free space. Chunk is the largest free contiguous

Re: [PATCH 5/6] device assignment: support for assigning PCI devices to guests

2008-10-29 Thread Muli Ben-Yehuda
On Tue, Oct 28, 2008 at 04:55:22PM +, Mark McLoughlin wrote: On Tue, 2008-10-28 at 12:06 +0200, [EMAIL PROTECTED] wrote: ... +static int get_real_device(AssignedDevice *pci_dev, uint8_t r_bus, + uint8_t r_dev, uint8_t r_func) +{ +char dir[128],

Re: [PATCH 5/6] device assignment: support for assigning PCI devices to guests

2008-10-29 Thread Muli Ben-Yehuda
On Wed, Oct 29, 2008 at 12:25:50PM +0200, Muli Ben-Yehuda wrote: You still succeed if KVM_CAP_DEVICE_ASSIGNMENT isn't defined? That means a newer userspace compiled on an older kernel will silently fail if they try to do device assignment. There's probably no reason to build this

Re: [PATCH] regression: vmalloc easily fail.

2008-10-29 Thread Nick Piggin
On Wed, Oct 29, 2008 at 12:29:40PM +0200, Avi Kivity wrote: Nick Piggin wrote: Hmm, spanning 30MB of memory... how much vmalloc space do you have? From the original report: VmallocTotal: 122880 kB VmallocUsed: 15184 kB VmallocChunk: 83764 kB So it seems there's

Re: [PATCH 5/6] device assignment: support for assigning PCI devices to guests

2008-10-29 Thread Muli Ben-Yehuda
On Wed, Oct 29, 2008 at 03:56:54PM +0800, Zhang, Xiantao wrote: Muli Ben-Yehuda wrote: On Tue, Oct 28, 2008 at 10:45:57AM -0500, Anthony Liguori wrote: +ifeq ($(USE_KVM), 1) +OBJS+= device-assignment.o +endif I don't think you want to build this on PPC so I think you need a

Re: [PATCH 03 of 10] [PATCH] user: ppc: better error reporting in load_file

2008-10-29 Thread Avi Kivity
Ehrhardt Christian wrote: From: Hollis Blanchard [EMAIL PROTECTED] Fancy description. Ahem. -- error compiling committee.c: too many arguments to function -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to [EMAIL PROTECTED] More majordomo info at

Re: [PATCH 5/6] device assignment: support for assigning PCI devices to guests

2008-10-29 Thread Muli Ben-Yehuda
On Tue, Oct 28, 2008 at 05:53:05PM +0200, Muli Ben-Yehuda wrote: On Tue, Oct 28, 2008 at 10:45:57AM -0500, Anthony Liguori wrote: +ifeq ($(USE_KVM), 1) +OBJS+= device-assignment.o +endif I don't think you want to build this on PPC so I think you need a stronger check. Good point.

Re: [PATCH 0/2] kvm: disable virtualization on kdump

2008-10-29 Thread Avi Kivity
Eduardo Habkost wrote: I think I will get flamed if I try to pull to the core a bunch of code that always lived in the KVM module. 8) Having a simple api to enter vmx or svm mode in core code should not be too bad. The kvm hardware_enable() stuff could simply call that. The only

Re: [PATCH 5/6] device assignment: support for assigning PCI devices to guests

2008-10-29 Thread Mark McLoughlin
On Wed, 2008-10-29 at 12:31 +0200, Muli Ben-Yehuda wrote: On Tue, Oct 28, 2008 at 04:55:22PM +, Mark McLoughlin wrote: On Tue, 2008-10-28 at 12:06 +0200, [EMAIL PROTECTED] wrote: +void assigned_dev_set_vector(int irq, int vector); +void assigned_dev_ack_mirq(int vector); ...

Re: [PATCH 5/6] device assignment: support for assigning PCI devices to guests

2008-10-29 Thread Mark McLoughlin
On Wed, 2008-10-29 at 12:31 +0200, Muli Ben-Yehuda wrote: On Tue, Oct 28, 2008 at 04:55:22PM +, Mark McLoughlin wrote: nr_assigned_devices isn't actually used anywhere. Nuked. Still there. +#define MAX_IO_REGIONS (6) Perhaps a comment to say this is the number of BARs in the

Re: [PATCH 5/6] device assignment: support for assigning PCI devices to guests

2008-10-29 Thread Muli Ben-Yehuda
On Wed, Oct 29, 2008 at 11:15:10AM +, Mark McLoughlin wrote: On Wed, 2008-10-29 at 12:31 +0200, Muli Ben-Yehuda wrote: On Tue, Oct 28, 2008 at 04:55:22PM +, Mark McLoughlin wrote: nr_assigned_devices isn't actually used anywhere. Nuked. Still there. +#define

[PATCH 2/6] device assignment: introduce pci_map_irq to get irq nr from pin number

2008-10-29 Thread muli
From: Amit Shah [EMAIL PROTECTED] Signed-off-by: Amit Shah [EMAIL PROTECTED] Signed-off-by: Muli Ben-Yehuda [EMAIL PROTECTED] --- qemu/hw/pci.c |5 + qemu/hw/pci.h |1 + 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/qemu/hw/pci.c b/qemu/hw/pci.c index

[PATCH 3/6] device assignment: introduce functions to correlate pin number and irq

2008-10-29 Thread muli
From: Amit Shah [EMAIL PROTECTED] [muli: use define for PIIX IRQ routing register (thanks markmc)] Signed-off-by: Amit Shah [EMAIL PROTECTED] Signed-off-by: Muli Ben-Yehuda [EMAIL PROTECTED] --- qemu/hw/pc.h |5 + qemu/hw/piix_pci.c | 10 ++ 2 files changed, 15

[PATCH 5/6] device assignment: support for assigning PCI devices to guests

2008-10-29 Thread muli
From: Muli Ben-Yehuda [EMAIL PROTECTED] This patch has been contributed to by the following people: Or Sagi [EMAIL PROTECTED] Nir Peleg [EMAIL PROTECTED] Amit Shah [EMAIL PROTECTED] Ben-Ami Yassour [EMAIL PROTECTED] Weidong Han [EMAIL PROTECTED] Glauber de Oliveira Costa [EMAIL PROTECTED] Muli

[PATCH 4/6] device assignment: build vtd.c for Intel IOMMU support

2008-10-29 Thread muli
From: Amit Shah [EMAIL PROTECTED] Signed-off-by: Amit Shah [EMAIL PROTECTED] Signed-off-by: Muli Ben-Yehuda [EMAIL PROTECTED] --- kernel/x86/Kbuild |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/kernel/x86/Kbuild b/kernel/x86/Kbuild index 2369d00..c4723b1 100644 ---

[v10] Userspace patches for PCI device assignment

2008-10-29 Thread muli
This patchset enables device assignment for KVM hosts for PCI devices. It uses the Intel IOMMU by default if available. Changes from v9-v10: - really emove nr_assigned_devices and device_assignment_enabled and other cleanups Changes from v8-v9 in no particular order: - fixed DEBUG, removed

Re: [PATCH 5/6] device assignment: support for assigning PCI devices to guests

2008-10-29 Thread Mark McLoughlin
On Wed, 2008-10-29 at 14:20 +0200, [EMAIL PROTECTED] wrote: diff --git a/qemu/hw/piix_pci.c b/qemu/hw/piix_pci.c index b9067b8..27d5f02 100644 --- a/qemu/hw/piix_pci.c +++ b/qemu/hw/piix_pci.c @@ -246,9 +246,9 @@ static void piix3_set_irq(qemu_irq *pic, int irq_num, int level) int

[PATCH 6/6] device assignment: support for hot-plugging PCI devices

2008-10-29 Thread muli
From: Amit Shah [EMAIL PROTECTED] This patch adds support for hot-plugging host PCI devices into guests [muli: various small fixes for review comments] Signed-off-by: Amit Shah [EMAIL PROTECTED] Signed-off-by: Muli Ben-Yehuda [EMAIL PROTECTED] --- qemu/hw/device-hotplug.c | 37

Re: [Qemu-devel] Re: [PATCH 3/3] Add KVM support to QEMU

2008-10-29 Thread Glauber Costa
On Wed, Oct 29, 2008 at 11:54:11AM +0200, Avi Kivity wrote: Anthony Liguori wrote: Another place hook is updating a slot's dirty bitmap. Right now, with my patchset we don't have live migration or the VGA RAM optimization. There's nothing about the VGA RAM optimization that wouldn't

Re: [Qemu-devel] Re: [PATCH 3/3] Add KVM support to QEMU

2008-10-29 Thread Avi Kivity
Glauber Costa wrote: Another place hook is updating a slot's dirty bitmap. Right now, with my patchset we don't have live migration or the VGA RAM optimization. There's nothing about the VGA RAM optimization that wouldn't work for QEMU. I'm not sure that it really is an optimization in

Re: [PATCH 00 of 10] kvm-userspace: ppc: userspace fixes for powerpc

2008-10-29 Thread Avi Kivity
Ehrhardt Christian wrote: From: Christian Ehrhardt [EMAIL PROTECTED] This is a set of various fixes in kvm-userspace for powerpc. This time without the split between user/* and the rest and without the qemu patch (sent separate to qemu-devel now). All applied, thanks. -- error compiling

Re: [Qemu-devel] Re: [PATCH 3/3] Add KVM support to QEMU

2008-10-29 Thread Glauber Costa
On Wed, Oct 29, 2008 at 02:39:57PM +0200, Avi Kivity wrote: Glauber Costa wrote: Another place hook is updating a slot's dirty bitmap. Right now, with my patchset we don't have live migration or the VGA RAM optimization. There's nothing about the VGA RAM optimization that wouldn't

Re: [patch] v4 - fold struct vcpu_info into CPUState

2008-10-29 Thread Anthony Liguori
Jes Sorensen wrote: Hi, Here's an updated version of the patch. It should fix the problems Hollis ran into, and also compile on x86_64 again :-) I managed to get rid of all the runtime use of qemu_kvm_cpu_env(), except for the hotplug code. But I think it's reasonable to do the walk of the

Re: [patch] v4 - fold struct vcpu_info into CPUState

2008-10-29 Thread Jes Sorensen
Anthony Liguori wrote: FWIW, vcpu_info seems to have nothing to do with KVM. It's entirely build around the IO thread. The IO thread really isn't KVM specific. I would just stick these fields in CPU_COMMON unconditionally if you're going to move them at all. Hi Anthony, I am quite happy

Re: [Qemu-devel] Re: [PATCH 3/3] Add KVM support to QEMU

2008-10-29 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: Another place hook is updating a slot's dirty bitmap. Right now, with my patchset we don't have live migration or the VGA RAM optimization. There's nothing about the VGA RAM optimization that wouldn't work for QEMU. I'm not sure that it really is an

Re: [patch] v4 - fold struct vcpu_info into CPUState

2008-10-29 Thread Anthony Liguori
Jes Sorensen wrote: Anthony Liguori wrote: FWIW, vcpu_info seems to have nothing to do with KVM. It's entirely build around the IO thread. The IO thread really isn't KVM specific. I would just stick these fields in CPU_COMMON unconditionally if you're going to move them at all. Hi

Re: [Qemu-devel] Re: [PATCH 3/3] Add KVM support to QEMU

2008-10-29 Thread Avi Kivity
Anthony Liguori wrote: Avi Kivity wrote: Anthony Liguori wrote: Another place hook is updating a slot's dirty bitmap. Right now, with my patchset we don't have live migration or the VGA RAM optimization. There's nothing about the VGA RAM optimization that wouldn't work for QEMU. I'm not

Re: [Qemu-devel] Re: [PATCH 3/3] Add KVM support to QEMU

2008-10-29 Thread Anthony Liguori
Avi Kivity wrote: Anthony Liguori wrote: Avi Kivity wrote: Anthony Liguori wrote: Another place hook is updating a slot's dirty bitmap. Right now, with my patchset we don't have live migration or the VGA RAM optimization. There's nothing about the VGA RAM optimization that wouldn't work

Re: [PATCH] VMX: Handle mmio emulation when guest state is invalid

2008-10-29 Thread Avi Kivity
Guillaume Thouvenin wrote: If emulate_invalid_guest_state is enabled, the emulator is called when guest state is invalid. Until now, we reported an mmio failure when emulate_instruction() returned EMULATE_DO_MMIO. This patch adds the case where emulate_instruction() failed and an MMIO emulation

Re: [PATCH 2/9] Add helper functions for nested SVM v5

2008-10-29 Thread Joerg Roedel
On Mon, Oct 20, 2008 at 07:04:43PM +0200, Alexander Graf wrote: These are helpers for the nested SVM implementation. - nsvm_printk implements a debug printk variant - nested_svm_do calls a handler that can accesses gpa-based memory v3 makes use of the new permission checker

Re: [Qemu-devel] Re: [PATCH 3/3] Add KVM support to QEMU

2008-10-29 Thread Hollis Blanchard
On Tue, Oct 28, 2008 at 6:36 PM, Anthony Liguori [EMAIL PROTECTED] wrote: Something I was thinking about this morning, and I think the first place where we'll definitely need a hook, is how to deal with kvm_load_registers(). I think there's overlap between KVM and the IO thread here. There

Re: [PATCH 9/9] Allow setting the SVME bit v5

2008-10-29 Thread Joerg Roedel
On Mon, Oct 20, 2008 at 07:04:50PM +0200, Alexander Graf wrote: Normally setting the SVME bit in EFER is not allowed, as we did not support SVM. Not since we do, we should also allow enabling SVM mode. v2 comes as last patch, so we don't enable half-ready code v4 introduces a module option

Re: [PATCH 9/9] Allow setting the SVME bit v5

2008-10-29 Thread Alexander Graf
On 29.10.2008, at 14:58, Joerg Roedel wrote: On Mon, Oct 20, 2008 at 07:04:50PM +0200, Alexander Graf wrote: Normally setting the SVME bit in EFER is not allowed, as we did not support SVM. Not since we do, we should also allow enabling SVM mode. v2 comes as last patch, so we don't enable

Re: [PATCH 9/9] Allow setting the SVME bit v5

2008-10-29 Thread Avi Kivity
Joerg Roedel wrote: On Mon, Oct 20, 2008 at 07:04:50PM +0200, Alexander Graf wrote: Normally setting the SVME bit in EFER is not allowed, as we did not support SVM. Not since we do, we should also allow enabling SVM mode. v2 comes as last patch, so we don't enable half-ready code v4

Re: [Qemu-devel] Re: [PATCH 3/3] Add KVM support to QEMU

2008-10-29 Thread Avi Kivity
Hollis Blanchard wrote: On Tue, Oct 28, 2008 at 6:36 PM, Anthony Liguori [EMAIL PROTECTED] wrote: Something I was thinking about this morning, and I think the first place where we'll definitely need a hook, is how to deal with kvm_load_registers(). I think there's overlap between KVM and

Re: [PATCH 9/9] Allow setting the SVME bit v5

2008-10-29 Thread Avi Kivity
Alexander Graf wrote: I don't believe we need a userspace interface for now. The userspace part does not need to know what capabilities the virtual CPU has - that's what the CPUID masking in the kvm code is for IMHO. It's the other way round. The kernel exposes which features are available,

Re: [Qemu-devel] Re: [PATCH 3/3] Add KVM support to QEMU

2008-10-29 Thread Anthony Liguori
Fabrice Bellard wrote: Avi Kivity wrote: Hollis Blanchard wrote: Out of curiosity, where are those places? local apic -- needs to access interrupt disable flag acpi sleep -- halts the current processor, so tied to cpustate vmport -- bad ABI requires access to registers

Re: [00/03][PATCH] kvm-ia64 updates for linux-2.6.28-rc2

2008-10-29 Thread Avi Kivity
Zhang, Xiantao wrote: Hi, Avi Please review and apply the three patches! The last two are key fixes for linux-2.6.28-rc2, and please also push them into upstream. Applied all, thanks. Is the third patch needed for 2.6.28? What scenario does it fix? -- error compiling committee.c:

Re: [PATCH 5/6] device assignment: support for assigning PCI devices to guests

2008-10-29 Thread Muli Ben-Yehuda
On Wed, Oct 29, 2008 at 12:27:19PM +, Mark McLoughlin wrote: On Wed, 2008-10-29 at 14:20 +0200, [EMAIL PROTECTED] wrote: diff --git a/qemu/hw/piix_pci.c b/qemu/hw/piix_pci.c index b9067b8..27d5f02 100644 --- a/qemu/hw/piix_pci.c +++ b/qemu/hw/piix_pci.c @@ -246,9 +246,9 @@ static

Re: [00/03][PATCH] kvm-ia64 updates for linux-2.6.28-rc2

2008-10-29 Thread Avi Kivity
Jes Sorensen wrote: Avi Applied all, thanks. Is the third patch needed for 2.6.28? What Avi scenario does it fix? Please! The third patch reorganizes the data structures which saves us a ton of space so we can go from 8 to 60 vcpus Would like it in as I have stuff that I want to fix

Re: [00/03][PATCH] kvm-ia64 updates for linux-2.6.28-rc2

2008-10-29 Thread Jes Sorensen
Avi Kivity wrote: Jes Sorensen wrote: The third patch reorganizes the data structures which saves us a ton of space so we can go from 8 to 60 vcpus Would like it in as I have stuff that I want to fix that goes on top of this. No, that's the first patch. And it was applied, but for

VMX ideas

2008-10-29 Thread Alexander Graf
Hi list, I really do like KVM and would love to make using it a complete no- brainer user experience. For the average user, loading a kernel module (and unloading it) isn't really one of the most common tasks. So I was considering to automatically load kvm-intel and kvm-amd on bootup,

Re: [Qemu-devel] Re: [PATCH 3/3] Add KVM support to QEMU

2008-10-29 Thread Fabrice Bellard
Avi Kivity wrote: Hollis Blanchard wrote: On Tue, Oct 28, 2008 at 6:36 PM, Anthony Liguori [EMAIL PROTECTED] wrote: Something I was thinking about this morning, and I think the first place where we'll definitely need a hook, is how to deal with kvm_load_registers(). I think there's

Re: [00/03][PATCH] kvm-ia64 updates for linux-2.6.28-rc2

2008-10-29 Thread Jes Sorensen
Avi == Avi Kivity [EMAIL PROTECTED] writes: Avi Zhang, Xiantao wrote: Hi, Avi Please review and apply the three patches! The last two are key fixes for linux-2.6.28-rc2, and please also push them into upstream. Avi Applied all, thanks. Is the third patch needed for 2.6.28? What Avi

Re: VMX ideas

2008-10-29 Thread Joerg Roedel
On Wed, Oct 29, 2008 at 03:52:21PM +0100, Alexander Graf wrote: Hi list, I really do like KVM and would love to make using it a complete no- brainer user experience. For the average user, loading a kernel module (and unloading it) isn't really one of the most common tasks. So I was

Re: [PATCH 0/2] kvm: disable virtualization on kdump

2008-10-29 Thread Eric W. Biederman
Avi Kivity [EMAIL PROTECTED] writes: Eric W. Biederman wrote: I think I will get flamed if I try to pull to the core a bunch of code that always lived in the KVM module. 8) Why is KVM modular anyway? That seems like some pretty core cpu functionality... Many reasons. Developers like

Re: VMX ideas

2008-10-29 Thread Alexander Graf
On 29.10.2008, at 16:01, Joerg Roedel wrote: On Wed, Oct 29, 2008 at 03:52:21PM +0100, Alexander Graf wrote: Hi list, I really do like KVM and would love to make using it a complete no- brainer user experience. For the average user, loading a kernel module (and unloading it) isn't really

BSD under KVM with 2 NIC'S

2008-10-29 Thread Vadim Korschok
Hi all, i'm trying to install OpenBSD, FreeBSD under a Gentoo 2.6.26-r2 with KVM-77. The installation works quite well if i'm using one nic. If i try to boot the .iso with 2 nic's the machine freeze, and the cpu goes to 100%. localhost # kvm -hda fw0-ext.img -boot d -cdrom

Re: VMX ideas

2008-10-29 Thread Gerd Hoffmann
Alexander Graf wrote: So I was thinking hard on what to do to circumvent this problem and came up with several approaches: 3. Create a root mode bloat framework 4. Enter vmx root mode when the first user opens /dev/kvm and leave it when nobody uses it any more? Also note that there has been

Re: VMX ideas

2008-10-29 Thread Anthony Liguori
Gerd Hoffmann wrote: Alexander Graf wrote: So I was thinking hard on what to do to circumvent this problem and came up with several approaches: 3. Create a root mode bloat framework 4. Enter vmx root mode when the first user opens /dev/kvm and leave it when nobody uses it

Re: [PATCH 0/2] kvm: disable virtualization on kdump

2008-10-29 Thread Avi Kivity
Eric W. Biederman wrote: Most of the reason I was wondering is that the cpu hardware probing largely seems to be a duplicate of what we have in the core for probing cpu capabilities already, and could likely be made smaller by building upon the existing codebase. We use the core cpuid

Re: VMX ideas

2008-10-29 Thread Alexander Graf
On 29.10.2008, at 16:45, Anthony Liguori wrote: Gerd Hoffmann wrote: Alexander Graf wrote: So I was thinking hard on what to do to circumvent this problem and came up with several approaches: 3. Create a root mode bloat framework 4. Enter vmx root mode when the first user opens

Re: VMX ideas

2008-10-29 Thread Alexander Graf
On 29.10.2008, at 16:36, Gerd Hoffmann wrote: Alexander Graf wrote: So I was thinking hard on what to do to circumvent this problem and came up with several approaches: 3. Create a root mode bloat framework 4. Enter vmx root mode when the first user opens /dev/kvm and leave it when

Re: [PATCH 3/3] Add KVM support to QEMU

2008-10-29 Thread Glauber Costa
resending, now with less quoted text: diff --git a/kvm-all.c b/kvm-all.c new file mode 100644 index 000..4379071 --- /dev/null +++ b/kvm-all.c @@ -0,0 +1,377 @@ +/* + * QEMU KVM support + * + * Copyright IBM, Corp. 2008 + * + * Authors: + * Anthony Liguori [EMAIL PROTECTED] +

[PATCH 2 of 7] kvmctl: add --processor option to user/configure

2008-10-29 Thread Hollis Blanchard
Use that to export PROCESSOR in user/config.mak. Signed-off-by: Hollis Blanchard [EMAIL PROTECTED] diff --git a/user/configure b/user/configure --- a/user/configure +++ b/user/configure @@ -6,6 +6,7 @@ ld=ld ld=ld objcopy=objcopy arch=`uname -m | sed -e s/i.86/i386/` +processor=$arch

[PATCH 0 of 7] kvm-userspace: support multiple processors in the same architecture

2008-10-29 Thread Hollis Blanchard
These patches allow the kvmctl bits (including testcases and libcflat) to be built for multiple processor types within the same architecture (e.g. 440 and e500). This is important because PowerPC supervisor mode can contain significant differences between processors (it's user mode that's more or

[PATCH 5 of 7] kvmctl: ppc: use $PROCESSOR to set configuration options

2008-10-29 Thread Hollis Blanchard
PowerPC variants are different enough that they require a different libcflat build and different testcases. Signed-off-by: Hollis Blanchard [EMAIL PROTECTED] diff --git a/user/config-powerpc.mak b/user/config-powerpc.mak --- a/user/config-powerpc.mak +++ b/user/config-powerpc.mak @@ -1,5 +1,3 @@

[PATCH 3 of 7] user: set $PROCESSOR from configure --arch=arch-processor

2008-10-29 Thread Hollis Blanchard
Export PROCESSOR in config.mak, and call user/configure with the --processor option. Signed-off-by: Hollis Blanchard [EMAIL PROTECTED] diff --git a/configure b/configure --- a/configure +++ b/configure @@ -103,6 +103,9 @@ case $arch in ;; esac +processor=${arch#*-} +arch=${arch%%-*}

[PATCH 1 of 7] user: consolidate $arch tests and allow $arch to be arch-processor

2008-10-29 Thread Hollis Blanchard
Use case/esac instead of multiple if/fi tests, allowing us to use wildcards. Signed-off-by: Hollis Blanchard [EMAIL PROTECTED] diff --git a/configure b/configure --- a/configure +++ b/configure @@ -87,26 +87,21 @@ done #set kenel directory libkvm_kerneldir=$(readlink -f kernel) -#if arch is

[PATCH 6 of 7] user: ppc: remove build flags

2008-10-29 Thread Hollis Blanchard
Remove -m32 build flag. Although necessary when building for a 32-bit target with a biarch toolchain that defaults to 64-bit output, it naturally breaks 64-bit builds. Also remove -D__powerpc__. I'm not sure why I added that in the first place; that is automatically defined by GCC (for both 32-

[PATCH 7 of 7] user: define and use AR in configure scripts and Makefiles

2008-10-29 Thread Hollis Blanchard
libkvm/Makefile uses $(AR), but it's not defined by the top-level configure. The problem is that when cross-compiling for a 64-bit target on a 32-bit host, 32-bit ar will be used and the 64-bit code will fail to link. user/Makefile has the same problem, and even uses plain ar. Add AR to

[PATCH 4 of 7] kvmctl: rename config-powerpc-44x.mak

2008-10-29 Thread Hollis Blanchard
This will make for a more user-friendly configure --arch=powerpc-440 instead of configure --arch=powerpc-44x. There aren't any other PowerPC 44x anyways (model numbers are already in the 460s). Signed-off-by: Hollis Blanchard [EMAIL PROTECTED] diff --git a/user/config-powerpc-44x.mak

Re: [PATCH 3/3] Add KVM support to QEMU

2008-10-29 Thread Anthony Liguori
Glauber Costa wrote: resending, now with less quoted text: Yeah, I was intending to scold you about that ;-) diff --git a/kvm-all.c b/kvm-all.c new file mode 100644 index 000..4379071 --- /dev/null +++ b/kvm-all.c @@ -0,0 +1,377 @@ +/* + * QEMU KVM support + * + * Copyright IBM, Corp.

Re: [Qemu-devel] Re: [PATCH 3/3] Add KVM support to QEMU

2008-10-29 Thread Blue Swirl
On 10/29/08, Avi Kivity [EMAIL PROTECTED] wrote: Hollis Blanchard wrote: On Tue, Oct 28, 2008 at 6:36 PM, Anthony Liguori [EMAIL PROTECTED] wrote: Something I was thinking about this morning, and I think the first place where we'll definitely need a hook, is how to deal with

Re: [PATCH 0/2] kvm: disable virtualization on kdump

2008-10-29 Thread Eduardo Habkost
On Mon, Oct 27, 2008 at 09:09:37AM -0400, Vivek Goyal wrote: On Mon, Oct 27, 2008 at 10:54:01AM +0200, Avi Kivity wrote: snip The hang was likely caused by vmx blocking INIT. Sigh. Avi, We boot kdump kernel with maxcpus=1. IIUC, in that code path we will not be using INIT. So did you

Re: [PATCH 0/2] kvm: disable virtualization on kdump

2008-10-29 Thread Avi Kivity
Eduardo Habkost wrote: We boot kdump kernel with maxcpus=1. IIUC, in that code path we will not be using INIT. So did you try booting kdump kernel with maxcpus=1 and did it work for you? If not than problem could be something else. vmx also disallows changing some bits in cr0 and cr4; for

Re: [PATCH 0/2] kvm: disable virtualization on kdump

2008-10-29 Thread Vivek Goyal
On Wed, Oct 29, 2008 at 06:10:06PM -0200, Eduardo Habkost wrote: On Mon, Oct 27, 2008 at 09:09:37AM -0400, Vivek Goyal wrote: On Mon, Oct 27, 2008 at 10:54:01AM +0200, Avi Kivity wrote: snip The hang was likely caused by vmx blocking INIT. Sigh. Avi, We boot kdump kernel with

Announcement: Proxmox Virtual Environment 1.0 - First stable release

2008-10-29 Thread Martin Maurer
Hi all, I am glad to announce the release of 'Proxmox VE 1.0' - an open source virtualization platform for the enterprise. Download and update instructions: http://pve.proxmox.com/wiki/Downloads Forum announcement including release notes: http://www.proxmox.com/forum/showthread.php?t=750 The

Re: [patch 1/3] KVM: MMU: collapse remote TLB flushes on root sync

2008-10-29 Thread Marcelo Tosatti
On Sun, Oct 26, 2008 at 01:17:14PM +0200, Avi Kivity wrote: Marcelo Tosatti wrote: Instead of flushing remote TLB's at every page resync, do an initial pass to write protect the sptes, collapsing the flushes on a single remote TLB invalidation. kernbench is 2.3% faster on 4-way guest.

kvm pci passthrough

2008-10-29 Thread David Brown
I was wondering what the status of kvm pci passthrough is? Especially the kind where I don't have vt-d? Where are the parts to play with? Is there any documentation you can point me to? Thanks, - David Brown -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message

Re: [PATCH 0/2] kvm: disable virtualization on kdump

2008-10-29 Thread Eric W. Biederman
Vivek Goyal [EMAIL PROTECTED] writes: On Wed, Oct 29, 2008 at 06:10:06PM -0200, Eduardo Habkost wrote: On Mon, Oct 27, 2008 at 09:09:37AM -0400, Vivek Goyal wrote: On Mon, Oct 27, 2008 at 10:54:01AM +0200, Avi Kivity wrote: snip The hang was likely caused by vmx blocking INIT. Sigh.

  1   2   >