[PATCH] kvm: qemu: fix off-by-one generating vmdk backing files

2008-10-28 Thread Avi Kivity
From: Avi Kivity [EMAIL PROTECTED] Signed-off-by: Avi Kivity [EMAIL PROTECTED] diff --git a/qemu/block-vmdk.c b/qemu/block-vmdk.c index dbc8b6b..cab2078 100644 --- a/qemu/block-vmdk.c +++ b/qemu/block-vmdk.c @@ -343,7 +343,7 @@ static int vmdk_parent_open(BlockDriverState *bs, const char *

[PATCH] Merge branch 'qemu-cvs'

2008-10-28 Thread Avi Kivity
From: Avi Kivity [EMAIL PROTECTED] Conflicts: qemu/hw/pc.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 http://vger.kernel.org/majordomo-info.html

[PATCH] KVM: allow emulator to adjust rip for emulated pio instructions

2008-10-28 Thread Avi Kivity
From: Guillaume Thouvenin [EMAIL PROTECTED] If we call the emulator we shouldn't call skip_emulated_instruction() in the first place, since the emulator already computes the next rip for us. Thus we move -skip_emulated_instruction() out of kvm_emulate_pio() and into handle_io() (and the svm

Re: [PATCH 2/2] KVM: Fix kvm_free_physmem_slot memory leak.

2008-10-28 Thread François Diakhate
[Updated the patch taking your comments into account] Make sure that kvm_free_physmem_slot also frees the VM memory if it was allocated by the kernel. Signed-off-by: François Diakhaté [EMAIL PROTECTED] --- arch/x86/kvm/x86.c | 10 +- virt/kvm/kvm_main.c | 18 ++ 2

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

2008-10-28 Thread ehrhardt
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 3/5] user: ppc: implement PowerPC 44x libcflat

2008-10-28 Thread ehrhardt
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 2/5] user: ppc: better error reporting in load_file

2008-10-28 Thread ehrhardt
From: Hollis Blanchard [EMAIL PROTECTED] Fancy description. Signed-off-by: Hollis Blanchard [EMAIL PROTECTED] Signed-off-by: Christian Ehrhardt [EMAIL PROTECTED] --- [diffstat] main-ppc.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) [diff] diff --git a/user/main-ppc.c

[PATCH 0/3] kvm-userspace: ppc: userspace fixes for powerpc

2008-10-28 Thread ehrhardt
From: Christian Ehrhardt [EMAIL PROTECTED] This is a set of fixes for the powerpc tests kvm-userspace/user. Patch 12 fix main-ppc.c while patch 3 introduces libcflat for powerpc. Further on patch 4 provides a timebase accessor for the ppc testcases (not used yet) and patch 5 finally adds a stub

[PATCH 1/5] user: ppc: fix threading bugs in main-ppc.c

2008-10-28 Thread ehrhardt
From: Hollis Blanchard [EMAIL PROTECTED] - call io_table_register() before any vcpus have started - wait for all vcpus to exit before exiting the parent thread Signed-off-by: Hollis Blanchard [EMAIL PROTECTED] Signed-off-by: Christian Ehrhardt [EMAIL PROTECTED] --- [diffstat] main-ppc.c | 32

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

2008-10-28 Thread ehrhardt
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 0/3] kvm-userspace: ppc: userspace fixes for powerpc

2008-10-28 Thread ehrhardt
From: Christian Ehrhardt [EMAIL PROTECTED] This is a set of various functional fixes in kvm-userspace for powerpc. Patch 1 fullfils the requirement to provide a max smp cpu in the machine struct, without that value qemu denies to run the guest (cpu 1 maxcpu 0) Patch 2 is a intermediate fix to

[PATCH 3/3] kvm-userspace: ppc: fix initial ppc memory setup

2008-10-28 Thread ehrhardt
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

Re: [PATCH 0/3] kvm-userspace: ppc: userspace fixes for powerpc

2008-10-28 Thread Christian Ehrhardt
Ok I should have send these two series with some minutes in between to not intermix them :-/ Additionally I have the wrong header in this one it should be [0/5] :-/++ Overall it is a patch series of three patches for powerpc kvm-userspace, a five patch series for kvm-suerspace/user/ and a

[PATCH] x86 emulator: move skip_emulated_instruction()

2008-10-28 Thread Guillaume Thouvenin
If we call the emulator we shouldn't call skip_emulated_instruction() in the first place, since the emulator already computes the next rip for us. Thus we move -skip_emulated_instruction() out of kvm_emulate_pio() and into handle_io() (and the svm equivalent). We also replaced return 0 by break

Re: [PATCH 2/2] KVM: Fix kvm_free_physmem_slot memory leak.

2008-10-28 Thread François Diakhate
[Sorry, I realized I forgot to check style, here is the fixed patch] Make sure that kvm_free_physmem_slot also frees the VM memory if it was allocated by the kernel. Signed-off-by: François Diakhaté [EMAIL PROTECTED] --- arch/x86/kvm/x86.c | 10 +- virt/kvm/kvm_main.c | 19

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

2008-10-28 Thread muli
From: Amit Shah [EMAIL PROTECTED] Signed-off-by: Amit Shah [EMAIL PROTECTED] Signed-off-by: Muli Ben-Yehuda [EMAIL PROTECTED] --- qemu/hw/pc.h |3 +++ qemu/hw/piix_pci.c | 19 +++ 2 files changed, 22 insertions(+), 0 deletions(-) diff --git a/qemu/hw/pc.h

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

2008-10-28 Thread muli
From: Amit Shah [EMAIL PROTECTED] This patch adds support for hot-plugging host PCI devices into guests Signed-off-by: Amit Shah [EMAIL PROTECTED] Signed-off-by: Muli Ben-Yehuda [EMAIL PROTECTED] --- qemu/hw/device-hotplug.c | 21 + qemu/monitor.c |2 +- 2

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

2008-10-28 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

[v8] Userspace patches for PCI device assignment

2008-10-28 Thread muli
[v8] Userspace patches for PCI device assignment This patchset enables device assignment for KVM hosts for PCI devices. It uses the Intel IOMMU by default if available. Changes from v7-v8 in in particular order: - various formatting fixes, DEBUG cleanups, cast removals, etc. -

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

2008-10-28 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 4/6] device assignment: build vtd.c for Intel IOMMU support

2008-10-28 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 ---

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

2008-10-28 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,

Re: [PATCH 5/6] KVM/userspace: Device Assignment: Support for assigning PCI devices to guests

2008-10-28 Thread Muli Ben-Yehuda
On Fri, Oct 24, 2008 at 11:22:48AM -0500, Anthony Liguori wrote: Amit Shah wrote: +#include linux/kvm_para.h Is this header really necessary? No, removed. +#include device-assignment.h + +/* From linux/ioport.h */ +#define IORESOURCE_IO 0x0100 /* Resource type */

Re: [PATCH 1/6] KVM/userspace: Device Assignment: Add ioctl wrappers needed for assigning devices

2008-10-28 Thread Muli Ben-Yehuda
On Sun, Oct 26, 2008 at 03:29:19PM +0200, Avi Kivity wrote: Amit Shah wrote: +#ifdef KVM_CAP_DEVICE_ASSIGNMENT +int kvm_assign_pci_device(kvm_context_t kvm, + struct kvm_assigned_pci_dev *assigned_dev) +{ +return ioctl(kvm-vm_fd, KVM_ASSIGN_PCI_DEVICE,

Re: [PATCH 5/6] KVM/userspace: Device Assignment: Support for assigning PCI devices to guests

2008-10-28 Thread Muli Ben-Yehuda
On Mon, Oct 27, 2008 at 02:32:48PM +0800, Han, Weidong wrote: Yes, it's buggy. It should like: uint32_t old_ephys = region-e_physbase; uint32_t old_esize = region-e_size; ... kvm_destroy_phys_mem(kvm_context, old_ephys, old_esize); Fixed in v8. Thanks! Cheers, Muli -- The First

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

2008-10-28 Thread Han, Weidong
[EMAIL PROTECTED] wrote: 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

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

2008-10-28 Thread Han, Weidong
Han, Weidong wrote: [EMAIL PROTECTED] wrote: 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

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

2008-10-28 Thread Han, Weidong
[EMAIL PROTECTED] wrote: 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

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

2008-10-28 Thread Muli Ben-Yehuda
On Tue, Oct 28, 2008 at 10:10:07PM +0800, Han, Weidong wrote: +DEBUG(r_pio=%08x e_physbase=%08x r_virtbase=%08lx value=%08x\n, + r_pio, (int)r_access-e_physbase, + (unsigned long)r_access-r_virtbase, value); should be (unsigned long)r_access-u.r_virtbase Thanks, actually it

Re: [PATCH 3/6] qemu: piix: Introduce functions to get pin number from irq and vice versa

2008-10-28 Thread Muli Ben-Yehuda
On Tue, Oct 28, 2008 at 12:46:39PM +0200, Avi Kivity wrote: Muli Ben-Yehuda wrote: On Sun, Oct 26, 2008 at 03:31:24PM +0200, Avi Kivity wrote: Amit Shah wrote: +int piix3_get_pin(int pic_irq) +{ +int i; +for (i = 0; i 4; i++) +if (piix3_dev-config[0x60+i] ==

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

2008-10-28 Thread Anthony Liguori
[EMAIL PROTECTED] wrote: Signed-off-by: Amit Shah [EMAIL PROTECTED] Signed-off-by: Muli Ben-Yehuda [EMAIL PROTECTED] --- qemu/Makefile.target|3 + qemu/hw/device-assignment.c | 641 +++ qemu/hw/device-assignment.h | 117

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

2008-10-28 Thread Muli Ben-Yehuda
On Tue, Oct 28, 2008 at 11:36:10PM +0800, Han, Weidong wrote: diff --git a/qemu/qemu-kvm.c b/qemu/qemu-kvm.c index c5f3f29..5e66832 100644 --- a/qemu/qemu-kvm.c +++ b/qemu/qemu-kvm.c @@ -20,6 +20,7 @@ int kvm_pit = 1; #include console.h #include block.h #include compatfd.h

[PATCH 01 of 10] [PATCH] kvm-userspace: powerpc: fix env-xer access

2008-10-28 Thread Ehrhardt Christian
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] --- [diffstat] qemu-kvm-powerpc.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) [diff]

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

2008-10-28 Thread Ehrhardt Christian
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). Signed-off-by: Christian Ehrhardt [EMAIL PROTECTED] b/kernel/Makefile

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

2008-10-28 Thread Ehrhardt Christian
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 03 of 10] [PATCH] user: ppc: better error reporting in load_file

2008-10-28 Thread Ehrhardt Christian
From: Hollis Blanchard [EMAIL PROTECTED] Fancy description. Signed-off-by: Hollis Blanchard [EMAIL PROTECTED] Signed-off-by: Christian Ehrhardt [EMAIL PROTECTED] --- [diffstat] main-ppc.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) [diff] diff --git a/user/main-ppc.c

[PATCH 06 of 10] [PATCH] user: ppc: add stub nmi handler

2008-10-28 Thread Ehrhardt Christian
From: Hollis Blanchard [EMAIL PROTECTED] Adding a nmi stub handler for user/main-ppc.c Signed-off-by: Hollis Blanchard [EMAIL PROTECTED] Signed-off-by: Christian Ehrhardt [EMAIL PROTECTED] --- [diffstat] main-ppc.c |6 ++ 1 file changed, 6 insertions(+) [diff] diff --git

[PATCH 07 of 10] [PATCH] qemu: ppc: define maximum SMP limit as 1 for Bamboo

2008-10-28 Thread Ehrhardt Christian
From: Christian Ehrhardt [EMAIL PROTECTED] Fix for qemu runtime error. Full error message: Number of SMP cpus requested (1), exceeds max cpus supported by machine `bamboo' (0) Signed-off-by: Christian Ehrhardt [EMAIL PROTECTED] Signed-off-by: Hollis Blanchard [EMAIL PROTECTED] --- [diffstat]

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

2008-10-28 Thread Muli Ben-Yehuda
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? +static void

[PATCH 02 of 10] [PATCH] user: ppc: fix threading bugs in main-ppc.c

2008-10-28 Thread Ehrhardt Christian
From: Hollis Blanchard [EMAIL PROTECTED] - call io_table_register() before any vcpus have started - wait for all vcpus to exit before exiting the parent thread Signed-off-by: Hollis Blanchard [EMAIL PROTECTED] Signed-off-by: Christian Ehrhardt [EMAIL PROTECTED] --- [diffstat] main-ppc.c | 32

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

2008-10-28 Thread Ehrhardt Christian
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 10 of 10] [PATCH] kvm-userspace: ppc: fix initial ppc memory setup

2008-10-28 Thread Ehrhardt Christian
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 04 of 10] [PATCH] user: ppc: implement PowerPC 44x libcflat

2008-10-28 Thread Ehrhardt Christian
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 05 of 10] [PATCH] libcflat: ppc: add timebase accessor

2008-10-28 Thread Ehrhardt Christian
Provide a timebase accessor for ppc testcases. Signed-off-by: Hollis Blanchard [EMAIL PROTECTED] Signed-off-by: Christian Ehrhardt [EMAIL PROTECTED] [diffstat] config-powerpc-44x.mak |3 ++- test/lib/powerpc/44x/timebase.S | 28

[PATCH] [PATCH] qemu: ppc: xer access prototypes no more used implemented

2008-10-28 Thread Ehrhardt Christian
From: Christian Ehrhardt [EMAIL PROTECTED] Revision 5500 of the qemu repository removed all code using ppc_load_xer ppc_store_xer as well as their implementation. Another patch fixes it's usage in kvm-userspace for powerpc, but I think that header can now be cleaned up, therefore this patch to

Re: [PATCH 3/6] qemu: piix: Introduce functions to get pin number from irq and vice versa

2008-10-28 Thread Avi Kivity
Muli Ben-Yehuda wrote: Well, what is this needed for in the first place? This specific function is not used. I assume Amit added it for completeness with piix_get_irq. piix_get_irq, as far as I can tell, is used in only one place (when the guest updates a device's configuration space

[patch] v4 - fold struct vcpu_info into CPUState

2008-10-28 Thread Jes Sorensen
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 linked list in that

Re: [PATCH 3/6] qemu: piix: Introduce functions to get pin number from irq and vice versa

2008-10-28 Thread Muli Ben-Yehuda
On Tue, Oct 28, 2008 at 06:21:35PM +0200, Avi Kivity wrote: Muli Ben-Yehuda wrote: Well, what is this needed for in the first place? This specific function is not used. I assume Amit added it for completeness with piix_get_irq. piix_get_irq, as far as I can tell, is used in only

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

2008-10-28 Thread Mark McLoughlin
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], name[128]; +int fd, r = 0; +FILE *f; +unsigned long long start,

Re: Add VMRUN handler v5

2008-10-28 Thread Mike Day
On 20/10/08 19:04 +0200, Alexander Graf wrote: +static int vmrun_interception(struct vcpu_svm *svm, struct kvm_run *kvm_run) +{ + nsvm_printk(VMrun\n); + if (nested_svm_check_permissions(svm)) + return 1; + + svm-next_rip = kvm_rip_read(svm-vcpu) + 3; +

Re: RFC: VMX: initialize TSC offset relative to vm creation time

2008-10-28 Thread David S. Ahern
Marcelo Tosatti wrote: On Sat, Sep 13, 2008 at 07:55:02AM +0300, Avi Kivity wrote: Marcelo Tosatti wrote: VMX initializes the TSC offset for each vcpu at different times, and also reinitializes it for vcpus other than 0 on APIC SIPI message. This bug causes the TSC's to appear

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

2008-10-28 Thread Eduardo Habkost
On Mon, Oct 27, 2008 at 10:32:43AM -0700, Eric W. Biederman wrote: Avi Kivity [EMAIL PROTECTED] writes: snip I wouldn't mind notifiers (with a nice comment explaining that you must know what you're doing, though that's the case with most kernel APIs). I'm fine with either approach.

[PATCH 1/3] Add additional CPU flag definitions

2008-10-28 Thread Anthony Liguori
Some x86 CPU definitions that KVM needs Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/target-i386/cpu.h b/target-i386/cpu.h index 3c11e0f..b1678ef 100644 --- a/target-i386/cpu.h +++ b/target-i386/cpu.h @@ -159,9 +159,11 @@ #define HF_MP_MASK (1 HF_MP_SHIFT) #define

[PATCH 2/3] Split CPUID from op_helper

2008-10-28 Thread Anthony Liguori
KVM needs to call CPUID from outside of the TCG code. This patch splits out the CPUID logic into a separate helper that both the op helper and KVM can call. Signed-off-by: Anthony Liguori [EMAIL PROTECTED] diff --git a/target-i386/cpu.h b/target-i386/cpu.h index b1678ef..263a477 100644 ---

[PATCH] regression: vmalloc easily fail.

2008-10-28 Thread Glauber Costa
Commit db64fe02258f1507e13fe5212a989922323685ce broke KVM (the symptom) for me. The cause is that vmalloc allocations fail, despite of the fact that /proc/meminfo shows plenty of vmalloc space available. After some investigation, it seems to me that the current way to compute the next addr in the

Re: [PATCH] regression: vmalloc easily fail.

2008-10-28 Thread Glauber Costa
On Tue, Oct 28, 2008 at 11:03:22PM +0200, Avi Kivity wrote: 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 shows plenty of vmalloc space available. After

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

2008-10-28 Thread Anthony Liguori
Hollis Blanchard wrote: Just a quick skim... On Tue, Oct 28, 2008 at 3:13 PM, Anthony Liguori [EMAIL PROTECTED] wrote: +int kvm_cpu_exec(CPUState *env) +{ +struct kvm_run *run = env-kvm_run; +int ret; + +dprintf(kvm_cpu_exec()\n); + +do { +kvm_arch_pre_run(env, run);

Re: [PATCH] regression: vmalloc easily fail.

2008-10-28 Thread Roland Dreier
I'm guessing that the missing comment explains that this is intentional, to trap buffer overflows? Actually, speaking of comments, it's interesting that __get_vm_area_node() -- which is called from vmalloc() -- does: /* * We always allocate a guard page. */

Re: [PATCH] regression: vmalloc easily fail.

2008-10-28 Thread Matias Zabaljauregui
hello, I'm guessing that the missing comment explains that this is intentional, to trap buffer overflows? yes, IIRC the pages between vmalloc areas are there for safety reasons. (like the interval inserted before the first area, defined by VMALLOC_OFFSET) regards Matias -- To unsubscribe from

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

2008-10-28 Thread Gerd Hoffmann
Anthony Liguori wrote: This patch only implements the bare minimum support to get a guest booting. It has very little impact the rest of QEMU and attempts to integrate nicely with the rest of QEMU. Huh? That isn't based on the qemu-accel patches ... surprised, Gerd -- To unsubscribe

Re: [PATCH] regression: vmalloc easily fail.

2008-10-28 Thread Arjan van de Ven
On Tue, 28 Oct 2008 14:22:16 -0700 Roland Dreier [EMAIL PROTECTED] wrote: I'm guessing that the missing comment explains that this is intentional, to trap buffer overflows? Actually, speaking of comments, it's interesting that __get_vm_area_node() -- which is called from vmalloc() --

kvm + kqemu enabled at the same time

2008-10-28 Thread Martin Kejík
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 closer to CPU?? thanx -- Martin (Kejda) Kejík

Re: [PATCH] regression: vmalloc easily fail.

2008-10-28 Thread Roland Dreier
I suspect it's a case of off-by-one... ALIGN() might round down, and the + (PAGE_SIZE-1) was there to make it round up. Except for that missing -1 ... ALIGN() has always rounded up, at least back to 2.4. -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a

Re: kvm + kqemu enabled at the same time

2008-10-28 Thread Anthony Liguori
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 closer to CPU??

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

2008-10-28 Thread Glauber Costa
On Tue, Oct 28, 2008 at 7:51 PM, Anthony Liguori [EMAIL PROTECTED] wrote: Gerd Hoffmann wrote: Anthony Liguori wrote: This patch only implements the bare minimum support to get a guest booting. It has very little impact the rest of QEMU and attempts to integrate nicely with the rest of

Re: [PATCH] regression: vmalloc easily fail.

2008-10-28 Thread Nick Piggin
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 shows plenty of vmalloc space available. After some

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

2008-10-28 Thread Anthony Liguori
Glauber Costa wrote: On Tue, Oct 28, 2008 at 7:51 PM, Anthony Liguori [EMAIL PROTECTED] wrote: This is part of the reason for this exercise. I'd rather introduce KVM support first and then look at abstracting things, than vice versa. A number of the hooks in the current QEMUAccel tree are

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

2008-10-28 Thread Zhang, Xiantao
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. Thanks! Xiantao-- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to [EMAIL PROTECTED] More majordomo info

[02/03][PATCH] KVM: ia64: Ensure SIGINT delivered to main thread (vcpu 0).

2008-10-28 Thread Zhang, Xiantao
From dd0f4f43e038d33472dbbf6d6b75d4d84d1bc3f9 Mon Sep 17 00:00:00 2001 From: Xiantao Zhang [EMAIL PROTECTED] Date: Thu, 23 Oct 2008 15:02:52 +0800 Subject: [PATCH] KVM: ia64: Ensure SIGINT delivered to main thread (vcpu 0). Before APs going to block status, it should make sure SIGINT is masked,

[03/03][PATCH] KVM: ia64: kvm halt logic doesn't need lock to protect.

2008-10-28 Thread Zhang, Xiantao
From 4858a5c47c5dce88a62a6edf427d8709f3ebda15 Mon Sep 17 00:00:00 2001 From: Xiantao Zhang [EMAIL PROTECTED] Date: Thu, 23 Oct 2008 15:03:38 +0800 Subject: [PATCH] KVM: ia64: kvm halt logic doesn't need lock to protect. Remove the lock protection for kvm halt logic, otherwise, once other vcpus

Re: Add VMRUN handler v5

2008-10-28 Thread Alexander Graf
On 28.10.2008, at 19:38, Mike Day wrote: On 20/10/08 19:04 +0200, Alexander Graf wrote: +static int vmrun_interception(struct vcpu_svm *svm, struct kvm_run *kvm_run) +{ + nsvm_printk(VMrun\n); + if (nested_svm_check_permissions(svm)) + return 1; + +

[PATCH 1/3] qemu: ppc: define maximum SMP limit as 1 for Bamboo

2008-10-28 Thread ehrhardt
From: Christian Ehrhardt [EMAIL PROTECTED] Fix for qemu runtime error. Full error message: Number of SMP cpus requested (1), exceeds max cpus supported by machine `bamboo' (0) Signed-off-by: Christian Ehrhardt [EMAIL PROTECTED] Signed-off-by: Hollis Blanchard [EMAIL PROTECTED] --- [diffstat]

Re: [PATCH 0/3] kvm-userspace: ppc: userspace fixes for powerpc

2008-10-28 Thread Christian Ehrhardt
Ok I should have send these two series with some minutes in between to not intermix them :-/ Additionally I have the wrong header in this one it should be [0/5] :-/++ Overall it is a patch series of three patches for powerpc kvm-userspace, a five patch series for kvm-suerspace/user/ and a

[PATCH 01 of 10] [PATCH] kvm-userspace: powerpc: fix env-xer access

2008-10-28 Thread Ehrhardt Christian
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] --- [diffstat] qemu-kvm-powerpc.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) [diff]

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

2008-10-28 Thread Ehrhardt Christian
From: Hollis Blanchard [EMAIL PROTECTED] Fancy description. Signed-off-by: Hollis Blanchard [EMAIL PROTECTED] Signed-off-by: Christian Ehrhardt [EMAIL PROTECTED] --- [diffstat] main-ppc.c |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) [diff] diff --git a/user/main-ppc.c

[PATCH] [PATCH] qemu: ppc: xer access prototypes no more used implemented

2008-10-28 Thread Ehrhardt Christian
From: Christian Ehrhardt [EMAIL PROTECTED] Revision 5500 of the qemu repository removed all code using ppc_load_xer ppc_store_xer as well as their implementation. Another patch fixes it's usage in kvm-userspace for powerpc, but I think that header can now be cleaned up, therefore this patch to

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

2008-10-28 Thread Anthony Liguori
Hollis Blanchard wrote: Just a quick skim... On Tue, Oct 28, 2008 at 3:13 PM, Anthony Liguori [EMAIL PROTECTED] wrote: +int kvm_cpu_exec(CPUState *env) +{ +struct kvm_run *run = env-kvm_run; +int ret; + +dprintf(kvm_cpu_exec()\n); + +do { +kvm_arch_pre_run(env, run);