Re: [PATCH v4 03/10] x86: Extend validity of cpu_is_bsp

2010-03-04 Thread Jan Kiszka
Gleb Natapov wrote: On Thu, Mar 04, 2010 at 12:34:22AM +0100, Jan Kiszka wrote: Gleb Natapov wrote: On Mon, Mar 01, 2010 at 06:17:22PM +0100, Jan Kiszka wrote: As we hard-wire the BSP to CPU 0 anyway and cpuid_apic_id equals cpu_index, cpu_is_bsp can also be based on the latter directly. This

Re: segfault at start with latest qemu-kvm.git

2010-03-04 Thread Jan Kiszka
Jan Kiszka wrote: David S. Ahern wrote: On 03/03/2010 04:20 PM, Jan Kiszka wrote: David S. Ahern wrote: On 03/03/2010 04:08 PM, Jan Kiszka wrote: David S. Ahern wrote: With latest qemu-kvm.git I am getting a segfault at start: /tmp/qemu-kvm-test/bin/qemu-system-x86_64 -m 1024 -smp 2 \

Re: [PATCH v4 03/10] x86: Extend validity of cpu_is_bsp

2010-03-04 Thread Gleb Natapov
On Thu, Mar 04, 2010 at 09:23:46AM +0100, Jan Kiszka wrote: Gleb Natapov wrote: On Thu, Mar 04, 2010 at 12:34:22AM +0100, Jan Kiszka wrote: Gleb Natapov wrote: On Mon, Mar 01, 2010 at 06:17:22PM +0100, Jan Kiszka wrote: As we hard-wire the BSP to CPU 0 anyway and cpuid_apic_id equals

[PATCH] qemu-kvm: Fix boot CPU setup for the case it is unsupported

2010-03-04 Thread Jan Kiszka
Commit 52b03dd702 incorrectly failed KVM initialization in case the kernel did not support KVM_CAP_SET_BOOT_CPU_ID. Fix this, and also improve error propagation of kvm_create_context at this chance. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- OK, it really was me. :) qemu-kvm-x86.c |

Clock issue in Windows XP guests

2010-03-04 Thread Gilles PIETRI
Hi, I have a host running a 2.6.32.7 kernel, and I'm using qemu-kvm 0.12.2. I have multiple guests, and one of them is running Windows XP. If I stare at the clock, I see that every now then (~5s), it slows down a bit, and then try to cope with it. If I run some NTP synchronization software

Re: [PATCH 17/18] KVM: SVM: Report Nested Paging support to userspace

2010-03-04 Thread Joerg Roedel
On Thu, Mar 04, 2010 at 12:37:42AM +0100, Alexander Graf wrote: On 03.03.2010, at 20:12, Joerg Roedel wrote: This patch implements the reporting of the nested paging feature support to userspace. Signed-off-by: Joerg Roedel joerg.roe...@amd.com --- arch/x86/kvm/svm.c | 10

Re: [PATCH 0/18][RFC] Nested Paging support for Nested SVM (aka NPT-Virtualization)

2010-03-04 Thread Joerg Roedel
On Thu, Mar 04, 2010 at 12:44:48AM +0100, Alexander Graf wrote: On 03.03.2010, at 20:12, Joerg Roedel wrote: Hi, here are the patches that implement nested paging support for nested svm. They are somewhat intrusive to the soft-mmu so I post them as RFC in the first round to get

Re: [PATCH v4 03/10] x86: Extend validity of cpu_is_bsp

2010-03-04 Thread Jan Kiszka
Gleb Natapov wrote: On Thu, Mar 04, 2010 at 09:23:46AM +0100, Jan Kiszka wrote: Gleb Natapov wrote: On Thu, Mar 04, 2010 at 12:34:22AM +0100, Jan Kiszka wrote: Gleb Natapov wrote: On Mon, Mar 01, 2010 at 06:17:22PM +0100, Jan Kiszka wrote: As we hard-wire the BSP to CPU 0 anyway and

Re: [PATCH 2/2] QEMU-KVM: Ask kernel about supported svm features

2010-03-04 Thread Joerg Roedel
On Wed, Mar 03, 2010 at 11:58:49PM +0100, Alexander Graf wrote: Am 03.03.2010 um 20:15 schrieb Joerg Roedel joerg.roe...@amd.com: This patch adds code to ask the kernel about the svm features it supports for its guests and propagates them to the guest. The new capability is necessary

Re: [PATCH 2/2] QEMU-KVM: Ask kernel about supported svm features

2010-03-04 Thread Alexander Graf
Joerg Roedel wrote: On Wed, Mar 03, 2010 at 11:58:49PM +0100, Alexander Graf wrote: Am 03.03.2010 um 20:15 schrieb Joerg Roedel joerg.roe...@amd.com: This patch adds code to ask the kernel about the svm features it supports for its guests and propagates them to the guest. The new

Re: [PATCH v4 03/10] x86: Extend validity of cpu_is_bsp

2010-03-04 Thread Gleb Natapov
On Thu, Mar 04, 2010 at 12:35:45PM +0100, Jan Kiszka wrote: Gleb Natapov wrote: On Thu, Mar 04, 2010 at 09:23:46AM +0100, Jan Kiszka wrote: Gleb Natapov wrote: On Thu, Mar 04, 2010 at 12:34:22AM +0100, Jan Kiszka wrote: Gleb Natapov wrote: On Mon, Mar 01, 2010 at 06:17:22PM +0100, Jan

Re: [PATCH 0/18][RFC] Nested Paging support for Nested SVM (aka NPT-Virtualization)

2010-03-04 Thread Marcelo Tosatti
On Wed, Mar 03, 2010 at 08:12:03PM +0100, Joerg Roedel wrote: Hi, here are the patches that implement nested paging support for nested svm. They are somewhat intrusive to the soft-mmu so I post them as RFC in the first round to get feedback about the general direction of the changes.

Re: [PATCH -v3] Add savevm/loadvm support for MCE

2010-03-04 Thread Marcelo Tosatti
On Wed, Mar 03, 2010 at 04:52:46PM +0800, Huang Ying wrote: MCE registers are saved/load into/from CPUState in kvm_arch_save/load_regs. To simulate the MCG_STATUS clearing upon reset, MSR_MCG_STATUS is set to 0 for KVM_PUT_RESET_STATE. v3: - use msrs[] in kvm_arch_load/save_regs and

[PATCH 1/6] Allocate memory below 4GB as one chunk

2010-03-04 Thread Marcelo Tosatti
From: Avi Kivity a...@redhat.com Instead of allocating a separate chunk for the first 640KB and another for 1MB+, allocate one large chunk. This plays well in terms of alignment and size with large pages. Signed-off-by: Avi Kivity a...@redhat.com Signed-off-by: Marcelo Tosatti

[PATCH 0/6] [PULL] qemu-kvm.git uq/master queue

2010-03-04 Thread Marcelo Tosatti
The following changes since commit 55b1e61f640bb2cf3bed0b4cc6d4ba1326c625d9: Samuel Thibault (1): (curses) Use more descriptive values are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master Avi Kivity (1): Allocate memory below 4GB

[PATCH 5/6] KVM: x86: Restrict writeback of VCPU state

2010-03-04 Thread Marcelo Tosatti
From: Jan Kiszka jan.kis...@siemens.com Do not write nmi_pending, sipi_vector, and mpstate unless we at least go through a reset. And TSC as well as KVM wallclocks should only be written on full sync, otherwise we risk to drop some time on state read-modify-write. Signed-off-by: Jan Kiszka

[PATCH 3/6] KVM: Rework of guest debug state writing

2010-03-04 Thread Marcelo Tosatti
From: Jan Kiszka jan.kis...@siemens.com So far we synchronized any dirty VCPU state back into the kernel before updating the guest debug state. This was a tribute to a deficite in x86 kernels before 2.6.33. But as this is an arch-dependent issue, it is better handle in the x86 part of KVM and

[PATCH 4/6] KVM: Rework VCPU state writeback API

2010-03-04 Thread Marcelo Tosatti
From: Jan Kiszka jan.kis...@siemens.com This grand cleanup drops all reset and vmsave/load related synchronization points in favor of four(!) generic hooks: - cpu_synchronize_all_states in qemu_savevm_state_complete (initial sync from kernel before vmsave) - cpu_synchronize_all_post_init in

[PATCH 6/6] x86: Extend validity of bsp_to_cpu

2010-03-04 Thread Marcelo Tosatti
From: Jan Kiszka jan.kis...@siemens.com As we hard-wire the BSP to CPU 0 anyway and cpuid_apic_id equals cpu_index, bsp_to_cpu can also be based on the latter directly. This will help an early user of it: KVM while initializing mp_state. Signed-off-by: Jan Kiszka jan.kis...@siemens.com

[PATCH 2/6] Add option to use file backed guest memory

2010-03-04 Thread Marcelo Tosatti
Port qemu-kvm's -mem-path and -mem-prealloc options. These are useful for backing guest memory with huge pages via hugetlbfs. Signed-off-by: Marcelo Tosatti mtosa...@redhat.com CC: john cooper john.coo...@redhat.com --- cpu-all.h |3 + exec.c | 115

Re: Clock issue in Windows XP guests

2010-03-04 Thread Zachary Amsden
On 03/03/2010 11:43 PM, Gilles PIETRI wrote: Hi, I have a host running a 2.6.32.7 kernel, and I'm using qemu-kvm 0.12.2. I have multiple guests, and one of them is running Windows XP. If I stare at the clock, I see that every now then (~5s), it slows down a bit, and then try to cope with

Re: [Qemu-devel] [PATCH 0/6] [PULL] qemu-kvm.git uq/master queue

2010-03-04 Thread Anthony Liguori
On 03/04/2010 09:05 AM, Marcelo Tosatti wrote: The following changes since commit 55b1e61f640bb2cf3bed0b4cc6d4ba1326c625d9: Samuel Thibault (1): (curses) Use more descriptive values are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git

Re: Clock issue in Windows XP guests

2010-03-04 Thread Gilles PIETRI
Le 04/03/2010 16:13, Zachary Amsden a écrit : On 03/03/2010 11:43 PM, Gilles PIETRI wrote: Hi, I have a host running a 2.6.32.7 kernel, and I'm using qemu-kvm 0.12.2. I have multiple guests, and one of them is running Windows XP. If I stare at the clock, I see that every now then (~5s), it

Re: [PATCH 0/18][RFC] Nested Paging support for Nested SVM (aka NPT-Virtualization)

2010-03-04 Thread Joerg Roedel
On Thu, Mar 04, 2010 at 11:42:55AM -0300, Marcelo Tosatti wrote: On Wed, Mar 03, 2010 at 08:12:03PM +0100, Joerg Roedel wrote: Hi, here are the patches that implement nested paging support for nested svm. They are somewhat intrusive to the soft-mmu so I post them as RFC in the first

Re: [PATCH] qemu-kvm: Fix boot CPU setup for the case it is unsupported

2010-03-04 Thread David S. Ahern
On 03/04/2010 02:00 AM, Jan Kiszka wrote: Commit 52b03dd702 incorrectly failed KVM initialization in case the kernel did not support KVM_CAP_SET_BOOT_CPU_ID. Fix this, and also improve error propagation of kvm_create_context at this chance. Signed-off-by: Jan Kiszka

Re: [PATCH 08/10] Add -kvm option

2010-03-04 Thread Jan Kiszka
Jan Kiszka wrote: Glauber Costa wrote: This option deprecates --enable-kvm. It is a more flexible option, that makes use of qemu-opts, and allow us to pass on options to enable or disable kernel irqchip, for example. ... diff --git a/qemu-options.hx b/qemu-options.hx index

Re: [PATCH 00/10] uq/master: irqchip-in-kernel support

2010-03-04 Thread Jan Kiszka
Glauber Costa wrote: Hi guys, This is the same in-kernel irqchip support already posted to qemu-devel, just rebased, retested, etc. It passes my basic tests, so it seem to be still in good shape. It is provided against uq/master as part of the integration efforts Just as another

Re: [PATCH 07/10] provide apic-kvm

2010-03-04 Thread Jan Kiszka
Glauber Costa wrote: This patch provides the file apic-kvm.c, which implements a schim over the kvm in-kernel APIC. Signed-off-by: Glauber Costa glom...@redhat.com --- Makefile.target |2 +- hw/apic-kvm.c | 157 + hw/pc.c

[ kvm-Bugs-2963581 ] qemu-kvm upstream crashes when using -smp 1

2010-03-04 Thread SourceForge.net
- Clone git repo git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git 2 - Build qemu-kvm from this repo 3 - Try to start it with -smp 1, reference command line: 03/04 12:56:12 DEBUG|kvm_vm:0461| Running qemu command: /usr/local/autotest/tests/kvm/qemu -name 'vm1' -monitor unix:/tmp/monitor-20100304

qemu-kvm upstream segfaults when using -smp 1

2010-03-04 Thread Lucas Meneghel Rodrigues
Hi folks: Today's upstream qemu-kvm.git is crashing when attempting to use -smp 1: 03/04 12:56:12 DEBUG|kvm_vm:0461| Running qemu command: /usr/local/autotest/tests/kvm/qemu -name 'vm1' -monitor unix:/tmp/monitor-20100304-125508-G6lf,server,nowait -drive file=/tmp/kvm_autotest_root/images

Re: qemu-kvm upstream segfaults when using -smp 1

2010-03-04 Thread Jan Kiszka
Lucas Meneghel Rodrigues wrote: Hi folks: Today's upstream qemu-kvm.git is crashing when attempting to use -smp 1: 03/04 12:56:12 DEBUG|kvm_vm:0461| Running qemu command: /usr/local/autotest/tests/kvm/qemu -name 'vm1' -monitor unix:/tmp/monitor-20100304-125508-G6lf,server,nowait

Re: [PATCH 2/4] KVM: Rework VCPU state writeback API

2010-03-04 Thread Marcelo Tosatti
On Thu, Mar 04, 2010 at 12:58:58AM -0500, Kevin O'Connor wrote: On Thu, Mar 04, 2010 at 01:21:12AM -0300, Marcelo Tosatti wrote: The regression seems to be caused by seabios commit d7e998f. Kevin, the failure can be seen on the attached screenshot, which happens on the first reboot of WinXP

Re: [PATCH 08/10] Add -kvm option

2010-03-04 Thread Anthony Liguori
On 02/26/2010 02:12 PM, Glauber Costa wrote: This option deprecates --enable-kvm. It is a more flexible option, that makes use of qemu-opts, and allow us to pass on options to enable or disable kernel irqchip, for example. Signed-off-by: Glauber Costaglom...@redhat.com kernel vs.

Re: [PATCH 08/10] Add -kvm option

2010-03-04 Thread Glauber Costa
On Thu, Mar 04, 2010 at 05:20:22PM +0100, Jan Kiszka wrote: Jan Kiszka wrote: Glauber Costa wrote: This option deprecates --enable-kvm. It is a more flexible option, that makes use of qemu-opts, and allow us to pass on options to enable or disable kernel irqchip, for example. ...

Re: [PATCH 08/10] Add -kvm option

2010-03-04 Thread Anthony Liguori
On 03/02/2010 12:25 PM, Glauber Costa wrote: On Tue, Mar 02, 2010 at 01:31:05AM -0300, Marcelo Tosatti wrote: On Fri, Feb 26, 2010 at 05:12:19PM -0300, Glauber Costa wrote: This option deprecates --enable-kvm. It is a more flexible option, that makes use of qemu-opts, and allow us to

Re: KVM usability

2010-03-04 Thread Lucas Meneghel Rodrigues
On Tue, 2010-03-02 at 11:11 +0100, Peter Zijlstra wrote: On Mon, 2010-03-01 at 09:14 -0600, Anthony Liguori wrote: The real question to ask is, why are you using qemu directly instead of using virt-manager? Because I suspect Ingo, like me, is a command line user, launching a gui to

RE: IVSHMEM and limits on shared memory

2010-03-04 Thread Khaled Ibrahim
As a test, I removed anywhere my patch stored the size of the shared memory region and hard coded the size of 512 MB into qemu_ram_alloc and pci_register_bar, so that my patch never writes the size of the memory region anywhere. And I discovered that the value of 512MB still shows up at the

Re: KVM usability

2010-03-04 Thread Zachary Amsden
On 03/04/2010 10:00 AM, Lucas Meneghel Rodrigues wrote: On Tue, 2010-03-02 at 11:11 +0100, Peter Zijlstra wrote: On Mon, 2010-03-01 at 09:14 -0600, Anthony Liguori wrote: The real question to ask is, why are you using qemu directly instead of using virt-manager? Because I

Re: KVM usability

2010-03-04 Thread Anthony Liguori
On 03/04/2010 02:13 PM, Zachary Amsden wrote: The biggest problem with virt-manager isn't virt-manager, it's that it is trying to do a nearly intractable task. Because a qemu virtual machine is not a machine at all, just a disk image without the proper metadata to track the important

Re: IVSHMEM and limits on shared memory

2010-03-04 Thread Cam Macdonell
On Thu, Mar 4, 2010 at 1:12 PM, Khaled Ibrahim kz...@hotmail.com wrote: As a test, I removed anywhere my patch stored the size of the shared memory region and hard coded the size of 512 MB into qemu_ram_alloc and pci_register_bar, so that my patch never writes the size of the memory region

Re: [Qemu-devel] [PATCH] Fix segfault with ram_size 4095M without kvm

2010-03-04 Thread Aurelien Jarno
On Tue, Feb 23, 2010 at 06:02:15PM +0100, Aurelien Jarno wrote: Ryan Harper a écrit : Currently, x86_64-softmmu qemu segfaults when trying to use 4095M memsize. This patch adds a simple check and error message (much like the 2047 limit on 32-bit hosts) on ram_size in the control path

Re: [Qemu-devel] [PATCH] Fix segfault with ram_size 4095M without kvm

2010-03-04 Thread Ryan Harper
* Aurelien Jarno aurel...@aurel32.net [2010-03-04 15:27]: On Tue, Feb 23, 2010 at 06:02:15PM +0100, Aurelien Jarno wrote: Ryan Harper a écrit : Currently, x86_64-softmmu qemu segfaults when trying to use 4095M memsize. This patch adds a simple check and error message (much like the

Re: KVM usability

2010-03-04 Thread H. Peter Anvin
On 03/04/2010 12:13 PM, Zachary Amsden wrote: These are all basic things that are left completely undefined by qemu's lack of a top-level configuration file, and it's an inexcusable disgrace. There is a top-level configuration file for Qemu, at least in the development tree. It's

pc-bios/bios.bin - where it comes from?

2010-03-04 Thread Michael Tokarev
Hello. There are a few bugs filed about an.. interesting behavour. For example: http://www.mail-archive.com/kvm@vger.kernel.org/msg29834.html https://bugs.launchpad.net/qemu/+bug/513273 After quite some mix-n-matching, at least on my test machine, I can say that the issue gets triggered by

Re: pc-bios/bios.bin - where it comes from?

2010-03-04 Thread Anthony Liguori
On 03/04/2010 04:46 PM, Michael Tokarev wrote: Hello. There are a few bugs filed about an.. interesting behavour. For example: http://www.mail-archive.com/kvm@vger.kernel.org/msg29834.html https://bugs.launchpad.net/qemu/+bug/513273 After quite some mix-n-matching, at least on my test

[PATCH] KVM: x86: Use native_store_idt() instead of kvm_get_idt()

2010-03-04 Thread Wei Yongjun
This patch use generic linux function native_store_idt() instead of kvm_get_idt(), and also removed the useless function kvm_get_idt(). Signed-off-by: Wei Yongjun yj...@cn.fujitsu.com --- arch/x86/include/asm/kvm_host.h |5 - arch/x86/kvm/vmx.c |2 +- 2 files changed, 1

[PATCH] KVM-Test: Add kvm userspace unit test

2010-03-04 Thread sshang
The test use kvm test harness kvmctl load binary test case file to test various function of kvm kernel module. Signed-off-by: sshang ssh...@redhat.com --- client/tests/kvm/tests/unit_test.py| 29 + client/tests/kvm/tests_base.cfg.sample |7 +++ 2

Re: KVM usability

2010-03-04 Thread Markus Armbruster
H. Peter Anvin h...@zytor.com writes: On 03/04/2010 12:13 PM, Zachary Amsden wrote: These are all basic things that are left completely undefined by qemu's lack of a top-level configuration file, and it's an inexcusable disgrace. There is a top-level configuration file for Qemu, at