perf uncore lkvm woes

2012-08-16 Thread Pekka Enberg
Hello, [0.248962] Pid: 0, comm: swapper/0 Not tainted 3.6.0-rc1+ #24 [penberg@tux ~]$ cat perf-kvmtool-issue Hello, Has anyone seen this? It's kvmtool/next with 3.6.0-rc1. Looks like we are doing uncore_init() on virtualized CPU which breaks boot. Pekka [penberg@tux

Re: perf uncore lkvm woes

2012-08-16 Thread Cyrill Gorcunov
On Thu, Aug 16, 2012 at 10:01:58AM +0300, Pekka Enberg wrote: Hello, [0.248962] Pid: 0, comm: swapper/0 Not tainted 3.6.0-rc1+ #24 [penberg@tux ~]$ cat perf-kvmtool-issue Hello, Has anyone seen this? It's kvmtool/next with 3.6.0-rc1. Looks like we are doing uncore_init() on virtualized

Re: perf uncore lkvm woes

2012-08-16 Thread Cyrill Gorcunov
On Thu, Aug 16, 2012 at 11:07:43AM +0400, Cyrill Gorcunov wrote: On Thu, Aug 16, 2012 at 10:01:58AM +0300, Pekka Enberg wrote: Hello, [0.248962] Pid: 0, comm: swapper/0 Not tainted 3.6.0-rc1+ #24 [penberg@tux ~]$ cat perf-kvmtool-issue Hello, Has anyone seen this? It's

Re: perf uncore lkvm woes

2012-08-16 Thread Pekka Enberg
On Thu, Aug 16, 2012 at 10:01:58AM +0300, Pekka Enberg wrote: Hello, [0.248962] Pid: 0, comm: swapper/0 Not tainted 3.6.0-rc1+ #24 [penberg@tux ~]$ cat perf-kvmtool-issue Hello, Has anyone seen this? It's kvmtool/next with 3.6.0-rc1. Looks like we are doing uncore_init() on

Re: perf uncore lkvm woes

2012-08-16 Thread Peter Zijlstra
On Thu, 2012-08-16 at 10:01 +0300, Pekka Enberg wrote: Has anyone seen this? It's kvmtool/next with 3.6.0-rc1. Looks like we are doing uncore_init() on virtualized CPU which breaks boot. I think you're the first.. I don't normally use kvm if I can at all avoid it. But I think its a 'simple'

Re: perf uncore lkvm woes

2012-08-16 Thread Yan, Zheng
On 08/16/2012 03:19 PM, Peter Zijlstra wrote: On Thu, 2012-08-16 at 10:01 +0300, Pekka Enberg wrote: Has anyone seen this? It's kvmtool/next with 3.6.0-rc1. Looks like we are doing uncore_init() on virtualized CPU which breaks boot. I think you're the first.. I don't normally use kvm if I

Re: perf uncore lkvm woes

2012-08-16 Thread Pekka Enberg
On 08/16/2012 03:19 PM, Peter Zijlstra wrote: On Thu, 2012-08-16 at 10:01 +0300, Pekka Enberg wrote: Has anyone seen this? It's kvmtool/next with 3.6.0-rc1. Looks like we are doing uncore_init() on virtualized CPU which breaks boot. I think you're the first.. I don't normally use kvm if I can

Re: perf uncore lkvm woes

2012-08-16 Thread Cyrill Gorcunov
On Thu, Aug 16, 2012 at 10:41:53AM +0300, Pekka Enberg wrote: On 08/16/2012 03:19 PM, Peter Zijlstra wrote: On Thu, 2012-08-16 at 10:01 +0300, Pekka Enberg wrote: Has anyone seen this? It's kvmtool/next with 3.6.0-rc1. Looks like we are doing uncore_init() on virtualized CPU which breaks

Re: perf uncore lkvm woes

2012-08-16 Thread Avi Kivity
On 08/16/2012 10:41 AM, Pekka Enberg wrote: On 08/16/2012 03:19 PM, Peter Zijlstra wrote: On Thu, 2012-08-16 at 10:01 +0300, Pekka Enberg wrote: Has anyone seen this? It's kvmtool/next with 3.6.0-rc1. Looks like we are doing uncore_init() on virtualized CPU which breaks boot. I think you're

Re: perf uncore lkvm woes

2012-08-16 Thread Avi Kivity
On 08/16/2012 10:46 AM, Cyrill Gorcunov wrote: On Thu, Aug 16, 2012 at 10:41:53AM +0300, Pekka Enberg wrote: On 08/16/2012 03:19 PM, Peter Zijlstra wrote: On Thu, 2012-08-16 at 10:01 +0300, Pekka Enberg wrote: Has anyone seen this? It's kvmtool/next with 3.6.0-rc1. Looks like we are doing

RE: [PATCH 2/2] KVM: PPC: booke/bookehv: Add guest debug support

2012-08-16 Thread Bhushan Bharat-R65777
diff --git a/arch/powerpc/include/asm/kvm.h b/arch/powerpc/include/asm/kvm.h index 3c14202..da71c84 100644 --- a/arch/powerpc/include/asm/kvm.h +++ b/arch/powerpc/include/asm/kvm.h @@ -25,6 +25,7 @@ /* Select powerpc specific features in linux/kvm.h */ #define __KVM_HAVE_SPAPR_TCE

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-16 Thread Avi Kivity
On 08/15/2012 08:53 PM, Marcelo Tosatti wrote: On Wed, Aug 15, 2012 at 01:44:14PM +0300, Avi Kivity wrote: On 08/14/2012 06:51 PM, Marcelo Tosatti wrote: Userspace may want to modify the ROM (for example, when programming a flash device). It is also possible to map an hva range rw

Re: perf uncore lkvm woes

2012-08-16 Thread Cyrill Gorcunov
On Thu, Aug 16, 2012 at 11:45:52AM +0300, Avi Kivity wrote: On Thu, Aug 16, 2012 at 10:38 AM, Yan, Zheng zheng.z@linux.intel.com wrote: The Intel uncore doc does not specify how to check if uncore exist. How about disabling uncore on virtualized CPU? (CC'ing Avi.) Why not

Re: [PATCH] kvm/fpu: Enable fully eager restore kvm FPU

2012-08-16 Thread Avi Kivity
On 08/16/2012 08:14 AM, Xudong Hao wrote: Enable KVM FPU fully eager restore, if there is other FPU state which isn't tracked by CR0.TS bit. Tested with these cases: 1) SpecCPU2000 workload( 1 VM, 2 VMs) 2) Program for floating point caculate Is the motivation performance or correctness?

Re: [PATCH 1/2] KVM: PPC: 440: Implement mtdcrx

2012-08-16 Thread Avi Kivity
On 08/16/2012 01:42 AM, Alexander Graf wrote: Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/44x_emulate.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/44x_emulate.c b/arch/powerpc/kvm/44x_emulate.c index c8c6157..ea57631

Re: perf uncore lkvm woes

2012-08-16 Thread Pekka Enberg
On Thu, Aug 16, 2012 at 12:06 PM, Cyrill Gorcunov gorcu...@openvz.org wrote: Most users just install a distro, they don't mess with kernel command lines. The command line option might be added implicitly in qemu/lkvm. That does not make sense for QEMU and we want less mandatory command line

[Bug 42980] BUG in gfn_to_pfn_prot

2012-08-16 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=42980 Alan a...@lxorguk.ukuu.org.uk changed: What|Removed |Added Kernel Version|3.2.2-gentoo|3.4 --- Comment #16

RE: [PATCH] kvm/fpu: Enable fully eager restore kvm FPU

2012-08-16 Thread Hao, Xudong
-Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of Avi Kivity Sent: Thursday, August 16, 2012 5:08 PM To: Hao, Xudong Cc: kvm@vger.kernel.org; Zhang, Xiantao Subject: Re: [PATCH] kvm/fpu: Enable fully eager restore kvm FPU On

Re: [PATCH] Document IACx/DACx registers access using ONE_REG API

2012-08-16 Thread Alexander Graf
On 16.08.2012, at 05:37, Bharat Bhushan wrote: Patch to access the debug registers (IACx/DACx) using ONE_REG api was sent earlier. But that missed the respective documentation. Also corrected the index number referencing in section 4.69 Signed-off-by: Bharat Bhushan

Re: [PATCH 1/2] KVM: PPC: 440: Implement mtdcrx

2012-08-16 Thread Alexander Graf
On 16.08.2012, at 11:11, Avi Kivity wrote: On 08/16/2012 01:42 AM, Alexander Graf wrote: Signed-off-by: Alexander Graf ag...@suse.de --- arch/powerpc/kvm/44x_emulate.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/kvm/44x_emulate.c

Windows slow boot: contractor wanted

2012-08-16 Thread Richard Davies
Hi, We run a cloud hosting provider using qemu-kvm 1.1, and are keen to find a contractor to track down and fix problems we have with large memory Windows guests booting very slowly - they can take several hours. We previously reported these problems in July (copied below) and they are still

Re: perf uncore lkvm woes

2012-08-16 Thread Avi Kivity
On 08/16/2012 11:40 AM, Avi Kivity wrote: On 08/16/2012 10:41 AM, Pekka Enberg wrote: On 08/16/2012 03:19 PM, Peter Zijlstra wrote: On Thu, 2012-08-16 at 10:01 +0300, Pekka Enberg wrote: Has anyone seen this? It's kvmtool/next with 3.6.0-rc1. Looks like we are doing uncore_init() on

[PATCH 0/3] KVM: PPC: More 440 fixes

2012-08-16 Thread Alexander Graf
With these patches applied, I can successfully run a guest on my 460EX board. So this is the official revival of the 440 KVM target ;-). As a sidenote: These patches are required because I'm running on a newer chip than the original development was based on. If you are on an older 440 CPU that

[PATCH 2/3] KVM: PPC: 440: Implement mfdcrx

2012-08-16 Thread Alexander Graf
We need mfdcrx to execute properly on 460 cores. Signed-off-by: Alexander Graf ag...@suse.de --- v1 - v2: - rework mfdcr into a function --- arch/powerpc/kvm/44x_emulate.c | 74 +++- 1 files changed, 43 insertions(+), 31 deletions(-) diff --git

[PATCH 3/3] KVM: PPC: BookE: Support FPU on non-hv systems

2012-08-16 Thread Alexander Graf
When running on HV aware hosts, we can not trap when the guest sets the FP bit, so we just let it do so when it wants to, because it has full access to MSR. For non-HV aware hosts with an FPU (like 440), we need to also adjust the shadow MSR though. Otherwise the guest gets an FP unavailable trap

[PATCH 1/3] KVM: PPC: 440: Implement mtdcrx

2012-08-16 Thread Alexander Graf
We need mtdcrx to execute properly on 460 cores. Signed-off-by: Alexander Graf ag...@suse.de --- v1 - v2: - rework mtdcr into a function --- arch/powerpc/kvm/44x_emulate.c | 36 +++- 1 files changed, 23 insertions(+), 13 deletions(-) diff --git

Re: perf uncore lkvm woes

2012-08-16 Thread Peter Zijlstra
On Thu, 2012-08-16 at 14:06 +0300, Avi Kivity wrote: Another option is to deal with them on the host side. That has the benefit of working with non-Linux guests too. Right, its an insane amount of MSRs though, but it could be done if someone takes the time to enumerate them all. If KVM then

Re: [PATCH] kvm/fpu: Enable fully eager restore kvm FPU

2012-08-16 Thread Avi Kivity
On 08/16/2012 12:48 PM, Hao, Xudong wrote: -Original Message- From: kvm-ow...@vger.kernel.org [mailto:kvm-ow...@vger.kernel.org] On Behalf Of Avi Kivity Sent: Thursday, August 16, 2012 5:08 PM To: Hao, Xudong Cc: kvm@vger.kernel.org; Zhang, Xiantao Subject: Re: [PATCH] kvm/fpu:

Re: perf uncore lkvm woes

2012-08-16 Thread Avi Kivity
On 08/16/2012 02:17 PM, Peter Zijlstra wrote: On Thu, 2012-08-16 at 14:06 +0300, Avi Kivity wrote: Another option is to deal with them on the host side. That has the benefit of working with non-Linux guests too. Right, its an insane amount of MSRs though, but it could be done if someone

Re: Windows slow boot: contractor wanted

2012-08-16 Thread Avi Kivity
On 08/16/2012 01:47 PM, Richard Davies wrote: Hi, We run a cloud hosting provider using qemu-kvm 1.1, and are keen to find a contractor to track down and fix problems we have with large memory Windows guests booting very slowly - they can take several hours. We previously reported these

RE: [PATCH] kvm/fpu: Enable fully eager restore kvm FPU

2012-08-16 Thread Hao, Xudong
-Original Message- From: Avi Kivity [mailto:a...@redhat.com] Sent: Thursday, August 16, 2012 6:59 PM To: Hao, Xudong Cc: kvm@vger.kernel.org; Zhang, Xiantao; Roedel, Joerg Subject: Re: [PATCH] kvm/fpu: Enable fully eager restore kvm FPU On 08/16/2012 12:48 PM, Hao, Xudong wrote:

[PATCH 1/3] KVM: PPC: Book3S HV: Fix incorrect branch in H_CEDE code

2012-08-16 Thread Alexander Graf
From: Paul Mackerras pau...@samba.org In handling the H_CEDE hypercall, if this vcpu has already been prodded (with the H_PROD hypercall, which Linux guests don't in fact use), we branch to a numeric label '1f'. Unfortunately there is another '1:' label before the one that we want to jump to.

[PATCH 2/3] KVM: PPC: Add cache flush on page map

2012-08-16 Thread Alexander Graf
When we map a page that wasn't icache cleared before, do so when first mapping it in KVM using the same information bits as the Linux mapping logic. That way we are 100% sure that any page we map does not have stale entries in the icache. Signed-off-by: Alexander Graf ag...@suse.de ---

[PULL 3.6 0/3] ppc patch queue 2012-08-16 for 3.6

2012-08-16 Thread Alexander Graf
Hi Avi, This is my patch queue for ppc patches that should go into 3.6. Please pull. * Fix memset in e500_tlb * Fix icache flush when mapping executable pages * Fix wrong branch in book3s hv code Alex The following changes since commit 439793d4b3c99e550daebd868bbd58967c93d0b3: Gleb

[PATCH 3/3] ppc: e500_tlb memset clears nothing

2012-08-16 Thread Alexander Graf
From: Alan Cox a...@linux.intel.com Put the parameters the right way around Addresses https://bugzilla.kernel.org/show_bug.cgi?id=44031 Reported-by: David Binderman dcb...@hotmail.com Signed-off-by: Alan Cox a...@linux.intel.com Signed-off-by: Andrew Morton a...@linux-foundation.org

Re: [PATCH v8 0/6] kvm: level irqfd support

2012-08-16 Thread Alex Williamson
On Wed, 2012-08-15 at 13:59 -0600, Alex Williamson wrote: On Wed, 2012-08-15 at 22:22 +0300, Michael S. Tsirkin wrote: On Wed, Aug 15, 2012 at 11:36:31AM -0600, Alex Williamson wrote: On Wed, 2012-08-15 at 17:28 +0300, Michael S. Tsirkin wrote: On Fri, Aug 10, 2012 at 04:37:08PM -0600,

Re: [PATCH v8 0/6] kvm: level irqfd support

2012-08-16 Thread Michael S. Tsirkin
On Thu, Aug 16, 2012 at 06:34:52AM -0600, Alex Williamson wrote: So I'm inclined to say source IDs are a requirement for shared interrupts. Can yo show a specific example that breaks? I don't think it can exist. Only the edge vs level interaction if we define the policy

vm pxe fail

2012-08-16 Thread Andrew Holway
Hallo I have a kvm vm that I am attempting to boot from pxe. The dhcp works perfectly and I can see the VM in the pxe server arp. but the tftp just times out. I don't see any tftp traffic on either the physical host or on the pie server. I am using a bridged interface. I have tried using

Re: vm pxe fail

2012-08-16 Thread Stefan Hajnoczi
On Thu, Aug 16, 2012 at 1:25 PM, Andrew Holway a.hol...@syseleven.de wrote: I have a kvm vm that I am attempting to boot from pxe. The dhcp works perfectly and I can see the VM in the pxe server arp. but the tftp just times out. I don't see any tftp traffic on either the physical host or on

[PATCH 14/19] pci-assign: Drop configure switches

2012-08-16 Thread Jan Kiszka
There are no other dependencies of device assignment except for CONFIG_KVM and an x86 target. So there is also no point in controlling this feature via configure. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- configure | 11 --- hw/i386/Makefile.objs |2 +- 2

[PATCH 08/19] pci-assign: Factor out kvm_device_msix_supported

2012-08-16 Thread Jan Kiszka
Encapsulate the ugly check if MSI-X assignment is supported in a separate helper function. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/device-assignment.c |5 + target-i386/kvm.c |7 +++ target-i386/kvm_i386.h |1 + 3 files changed, 9 insertions(+), 4

[PATCH 10/19] pci-assign: Replace kvm_assign_set_msix_entry with kvm_device_msix_set_vector

2012-08-16 Thread Jan Kiszka
The refactored version cleanly hides the KVM IOCTL structure from the users and also zeros out the padding field. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/device-assignment.c |7 ++- qemu-kvm.c |8 qemu-kvm.h |4

[PATCH 05/19] pci-assign: Factor out kvm_device_intx_assign

2012-08-16 Thread Jan Kiszka
Avoid passing kvm_assigned_irq on INTx assignment and separate this function from (to-be-refactored) MSI/MSI-X assignment. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/device-assignment.c | 16 ++-- target-i386/kvm.c | 24

[PATCH 04/19] pci-assign: Refactor interrupt deassignment

2012-08-16 Thread Jan Kiszka
Introduce three new KVM services, kvm_device_intx/msi/msix_deassign, to release assigned interrupts. These no longer require to pass pre-initialized kvm_assigned_irq structures but only request required parameters. To trace which type of interrupt is currently assigned, use a new enum

[PATCH 16/19] pci-assign: Fix coding style issues

2012-08-16 Thread Jan Kiszka
No functional changes. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/kvm/pci-assign.c | 181 +- 1 files changed, 105 insertions(+), 76 deletions(-) diff --git a/hw/kvm/pci-assign.c b/hw/kvm/pci-assign.c index 3611539..cfd859e 100644 ---

[PATCH 02/19] pci-assign: Factor out kvm_device_pci_assign/deassign

2012-08-16 Thread Jan Kiszka
In contrast to the old wrappers, the new ones only take the required parameters instead of a preinitialized kvm_assigned_pci_dev structure. We also move the dev_id generation into kvm_device_pci_assign and store the result in the AssignedDevice structure. It will serve as handle for all upcoming

[PATCH 17/19] pci-assign: Replace exit() with hw_error()

2012-08-16 Thread Jan Kiszka
This is more appropriate and allows central handling. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/kvm/pci-assign.c | 10 ++ 1 files changed, 2 insertions(+), 8 deletions(-) diff --git a/hw/kvm/pci-assign.c b/hw/kvm/pci-assign.c index cfd859e..29a4671 100644 ---

[PATCH 11/19] pci-assign: Rework MSI-X route setup

2012-08-16 Thread Jan Kiszka
Use kvm_irqchip_add_msi_route and introduce kvm_irqchip_update_msi_route to set up the required IRQ routes for MSI-X injections. This removes the last direct interaction with the IRQ routing API of the KVM kernel so that we can remove/unexport related services. Signed-off-by: Jan Kiszka

[PATCH 07/19] pci-assign: Rework MSI assignment

2012-08-16 Thread Jan Kiszka
Introduce kvm_device_msi_assign and use upstream's kvm_irqchip_add_msi_route/kvm_irqchip_release_virq to provide MSI support for assigned devices. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/device-assignment.c | 54 +-- target-i386/kvm.c

[PATCH 09/19] pci-assign: Replace kvm_assign_set_msix_nr with kvm_device_msix_init_vectors

2012-08-16 Thread Jan Kiszka
The refactored version cleanly hides the KVM IOCTL structure from the users and also zeros out the padding field. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/device-assignment.c |7 ++- qemu-kvm.c |5 - qemu-kvm.h |1 - target-i386/kvm.c

[PATCH 06/19] qemu-kvm: Move kvm_device_intx_set_mask service

2012-08-16 Thread Jan Kiszka
Move kvm_device_intx_set_mask prototype and implementation to their upstream positions. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- qemu-kvm.c |9 - qemu-kvm.h |2 -- target-i386/kvm.c |9 + target-i386/kvm_i386.h |1 + 4

[PATCH 12/19] pci-assign: Factor out kvm_device_msix_assign

2012-08-16 Thread Jan Kiszka
Avoid passing kvm_assigned_irq on MSI-X assignment. Drop kvm_assign_irq as it's now no longer used. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/device-assignment.c |9 + qemu-kvm.c | 27 --- qemu-kvm.h | 11 ---

[PATCH 13/19] qemu-kvm: Kill qemu-kvm.[ch]

2012-08-16 Thread Jan Kiszka
Hurray! Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/device-assignment.c |1 - kvm-all.c |3 --- kvm.h |7 --- qemu-kvm.c | 37 - qemu-kvm.h | 37

[PATCH 18/19] pci-assign: Drop unused or write-only variables

2012-08-16 Thread Jan Kiszka
Remove remainders of previous refactorings. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/kvm/pci-assign.c |9 - 1 files changed, 0 insertions(+), 9 deletions(-) diff --git a/hw/kvm/pci-assign.c b/hw/kvm/pci-assign.c index 29a4671..4f5daf3 100644 --- a/hw/kvm/pci-assign.c

[PATCH 03/19] pci-assign: Rename assign_irq to assign_intx

2012-08-16 Thread Jan Kiszka
The previous name may incorrectly suggest that this function assigns all types of IRQs though it's only dealing with legacy interrupts. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/device-assignment.c | 14 +++--- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git

[PATCH 15/19] pci-assign: Move and rename source file

2012-08-16 Thread Jan Kiszka
Move device-assignment.c into hw/kvm, calling it pci-assign.c now, just like its device name. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/i386/Makefile.objs|3 --- hw/kvm/Makefile.objs |2 +- hw/{device-assignment.c =

[PATCH 00/19] pci-assign: Refactor for upstream merge

2012-08-16 Thread Jan Kiszka
With this series, we are getting very close to obsoleting qemu-kvm. It refactors hw/device-assignment.c and the associated KVM helper functions into a form that should allow merging them into QEMU. Once the series is acceptable for qemu-kvm, I will break out the necessary uq/master patches and

[PATCH][Autotest] client.shared: Adds VersionableClass.

2012-08-16 Thread Jiří Župka
VersionableClass provides class hierarchy which automatically select right version of class. Class manipulation is used for this reason. Closer description is in autotest/client/shared/base_utils.py class VersionableClass Working example is in autotest/client/shared/base_utils_unittest.py

Re: [Qemu-devel] Windows slow boot: contractor wanted

2012-08-16 Thread Benoît Canet
Le Thursday 16 Aug 2012 à 11:47:27 (+0100), Richard Davies a écrit : Hi, We run a cloud hosting provider using qemu-kvm 1.1, and are keen to find a contractor to track down and fix problems we have with large memory Windows guests booting very slowly - they can take several hours. We

Re: perf uncore lkvm woes

2012-08-16 Thread David Ahern
On 8/16/12 5:17 AM, Peter Zijlstra wrote: If you don't mind printing a warning every time a Linux guest boots ;-) That feature already exists today for perf related probing. e.g., [585929.678746] kvm [10752]: vcpu0 unhandled rdmsr: 0x345 [585929.709870] kvm_set_msr_common: 54 callbacks

Re: [PATCH 00/19] pci-assign: Refactor for upstream merge

2012-08-16 Thread Avi Kivity
On 08/16/2012 04:54 PM, Jan Kiszka wrote: With this series, we are getting very close to obsoleting qemu-kvm. It refactors hw/device-assignment.c and the associated KVM helper functions into a form that should allow merging them into QEMU. Once the series is acceptable for qemu-kvm, I will

Re: [PATCH 00/19] pci-assign: Refactor for upstream merge

2012-08-16 Thread Jan Kiszka
On 2012-08-16 16:34, Avi Kivity wrote: On 08/16/2012 04:54 PM, Jan Kiszka wrote: With this series, we are getting very close to obsoleting qemu-kvm. It refactors hw/device-assignment.c and the associated KVM helper functions into a form that should allow merging them into QEMU. Once the series

Re: [User question] Huge buffer size on KVM host

2012-08-16 Thread Martin Wawro
On Aug 15, 2012, at 2:57 PM, Avi Kivity wrote: We are using logical volumes and the cache is set to 'none'. Strange, that should work without any buffering. What the contents of /sys/block/sda/queue/hw_sector_size and /sys/block/sda/queue/logical_block_size ? Hi Avi,

[PATCH v3] KVM: x86 emulator: access GPRs on demand

2012-08-16 Thread Avi Kivity
Instead of populating the the entire register file, read in registers as they are accessed, and write back only the modified ones. This saves a VMREAD and VMWRITE on Intel (for rsp, since it is not usually used during emulation), and a two 128-byte copies for the registers. Signed-off-by: Avi

Re: [User question] Huge buffer size on KVM host

2012-08-16 Thread Avi Kivity
On 08/16/2012 05:54 PM, Martin Wawro wrote: On Aug 15, 2012, at 2:57 PM, Avi Kivity wrote: We are using logical volumes and the cache is set to 'none'. Strange, that should work without any buffering. What the contents of /sys/block/sda/queue/hw_sector_size and

Re: vm pxe fail

2012-08-16 Thread Andrew Holway
On Aug 16, 2012, at 3:54 PM, Stefan Hajnoczi wrote: On Thu, Aug 16, 2012 at 1:25 PM, Andrew Holway a.hol...@syseleven.de wrote: I have a kvm vm that I am attempting to boot from pxe. The dhcp works perfectly and I can see the VM in the pxe server arp. but the tftp just times out. I don't

[PATCH v10 00/14] KVM/ARM Implementation

2012-08-16 Thread Christoffer Dall
The following series implements KVM support for ARM processors, specifically on the Cortex A-15 platform. Work is done in collaboration between Columbia University, Virtual Open Systems and ARM/Linaro. The patch series applies to kvm/next, specifically commit:

[PATCH v10 01/14] ARM: add mem_type prot_pte accessor

2012-08-16 Thread Christoffer Dall
From: Marc Zyngier marc.zyng...@arm.com The KVM hypervisor mmu code requires access to the mem_type prot_pte field when setting up page tables pointing to a device. Unfortunately, the mem_type structure is opaque. Add an accessor (get_mem_type_prot_pte()) to retrieve the prot_pte value.

[PATCH v10 02/14] ARM: Add config option ARM_VIRT_EXT

2012-08-16 Thread Christoffer Dall
Select this option for ARM processors equipped with hardware Virtualization Extensions. Signed-off-by: Christoffer Dall c.d...@virtualopensystems.com --- arch/arm/mm/Kconfig | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index

[PATCH v10 03/14] ARM: Section based HYP idmap

2012-08-16 Thread Christoffer Dall
Add a HYP pgd to the core code (so it can benefit all Linux hypervisors). Populate this pgd with an identity mapping of the code contained in the .hyp.idmap.text section Offer a method to drop the this identity mapping through hyp_idmap_teardown and re-create it through hyp_idmap_setup. Make

[PATCH v10 04/14] ARM: Expose PMNC bitfields for KVM use

2012-08-16 Thread Christoffer Dall
From: Rusty Russell rusty.russ...@linaro.org We want some of these for use in KVM, so pull them out of arch/arm/kernel/perf_event_v7.c into their own asm/perf_bits.h. Signed-off-by: Rusty Russell rusty.russ...@linaro.org --- arch/arm/include/asm/perf_bits.h | 56

[PATCH v10 05/14] KVM: ARM: Initial skeleton to compile KVM support

2012-08-16 Thread Christoffer Dall
Targets KVM support for Cortex A-15 processors. Contains all the framework components, make files, header files and some tracing functionality. Only supported core is Cortex-A15 for now. Contains minor reset hook driven from kvm_vcpu_set_target, which will eventually be a custom ARM ioctl to

[PATCH v10 06/14] KVM: ARM: Hypervisor inititalization

2012-08-16 Thread Christoffer Dall
Sets up the required registers to run code in HYP-mode from the kernel. By setting the HVBAR the kernel can execute code in Hyp-mode with the MMU disabled. The HVBAR initially points to initialization code, which initializes other Hyp-mode registers and enables the MMU for Hyp-mode. Afterwards,

[PATCH v10 07/14] KVM: ARM: Memory virtualization setup

2012-08-16 Thread Christoffer Dall
This commit introduces the framework for guest memory management through the use of 2nd stage translation. Each VM has a pointer to a level-1 table (the pgd field in struct kvm_arch) which is used for the 2nd stage translations. Entries are added when handling guest faults (later patch) and the

[PATCH v10 08/14] KVM: ARM: Inject IRQs and FIQs from userspace

2012-08-16 Thread Christoffer Dall
From: Christoffer Dall cd...@cs.columbia.edu Userspace can inject IRQs and FIQs through the KVM_IRQ_LINE VM ioctl. This ioctl is used since the sematics are in fact two lines that can be either raised or lowered on the VCPU - the IRQ and FIQ lines. KVM needs to know which VCPU it must operate on

[PATCH v10 09/14] KVM: ARM: World-switch implementation

2012-08-16 Thread Christoffer Dall
Provides complete world-switch implementation to switch to other guests running in non-secure modes. Includes Hyp exception handlers that capture necessary exception information and stores the information on the VCPU and KVM structures. The following Hyp-ABI is also documented in the code:

[PATCH v10 10/14] KVM: ARM: Emulation framework and CP15 emulation

2012-08-16 Thread Christoffer Dall
Adds a new important function in the main KVM/ARM code called handle_exit() which is called from kvm_arch_vcpu_ioctl_run() on returns from guest execution. This function examines the Hyp-Syndrome-Register (HSR), which contains information telling KVM what caused the exit from the guest. Some of

[PATCH v10 12/14] KVM: ARM: Handle guest faults in KVM

2012-08-16 Thread Christoffer Dall
Handles the guest faults in KVM by mapping in corresponding user pages in the 2nd stage page tables. Signed-off-by: Marc Zyngier marc.zyng...@arm.com Signed-off-by: Christoffer Dall c.d...@virtualopensystems.com --- arch/arm/include/asm/kvm_arm.h |9 arch/arm/include/asm/kvm_asm.h |

[PATCH v10 13/14] KVM: ARM: Handle I/O aborts

2012-08-16 Thread Christoffer Dall
When the guest accesses I/O memory this will create data abort exceptions and they are handled by decoding the HSR information (physical address, read/write, length, register) and forwarding reads and writes to QEMU which performs the device emulation. Certain classes of load/store operations do

[PATCH v10 14/14] KVM: ARM: Guest wait-for-interrupts (WFI) support

2012-08-16 Thread Christoffer Dall
From: Christoffer Dall cd...@cs.columbia.edu When the guest executes a WFI instruction the operation is trapped to KVM, which emulates the instruction in software. There is no correlation between a guest executing a WFI instruction and actually putting the hardware into a low-power mode, since a

Re: vm pxe fail

2012-08-16 Thread Stefan Hajnoczi
On Thu, Aug 16, 2012 at 4:09 PM, Andrew Holway a.hol...@syseleven.de wrote: On Aug 16, 2012, at 3:54 PM, Stefan Hajnoczi wrote: On Thu, Aug 16, 2012 at 1:25 PM, Andrew Holway a.hol...@syseleven.de wrote: I have a kvm vm that I am attempting to boot from pxe. The dhcp works perfectly and I

RE: [PATCH 2/2] KVM: PPC: booke/bookehv: Add guest debug support

2012-08-16 Thread Bhushan Bharat-R65777
-Original Message- From: Wood Scott-B07421 Sent: Tuesday, July 31, 2012 3:31 AM To: Bhushan Bharat-R65777 Cc: Wood Scott-B07421; kvm-...@vger.kernel.org; kvm@vger.kernel.org; ag...@suse.de Subject: Re: [PATCH 2/2] KVM: PPC: booke/bookehv: Add guest debug support On 07/30/2012

Re: [Qemu-devel] Windows slow boot: contractor wanted

2012-08-16 Thread Troy Benjegerdes
I'd be interested in working on this.. What I'd like to propose is to write an automated regression test harness that will reboot the host hardware, and start booting up guest VMs and report the time-to-boot, as well as relative performance of the running VMs. For best results, I'd need access to

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-16 Thread Marcelo Tosatti
On Thu, Aug 16, 2012 at 12:03:01PM +0300, Avi Kivity wrote: On 08/15/2012 08:53 PM, Marcelo Tosatti wrote: On Wed, Aug 15, 2012 at 01:44:14PM +0300, Avi Kivity wrote: On 08/14/2012 06:51 PM, Marcelo Tosatti wrote: Userspace may want to modify the ROM (for example, when programming a

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-16 Thread Marcelo Tosatti
On Thu, Aug 16, 2012 at 01:49:11PM +0800, Xiao Guangrong wrote: On 08/14/2012 11:25 PM, Marcelo Tosatti wrote: On Tue, Aug 14, 2012 at 10:58:07AM +0800, Xiao Guangrong wrote: On 08/14/2012 01:39 AM, Marcelo Tosatti wrote: On Sat, Aug 11, 2012 at 11:36:20AM +0800, Xiao Guangrong wrote: On

Re: [PATCH 00/19] pci-assign: Refactor for upstream merge

2012-08-16 Thread Michael S. Tsirkin
On Thu, Aug 16, 2012 at 05:34:51PM +0300, Avi Kivity wrote: On 08/16/2012 04:54 PM, Jan Kiszka wrote: With this series, we are getting very close to obsoleting qemu-kvm. It refactors hw/device-assignment.c and the associated KVM helper functions into a form that should allow merging them

Re: [PATCH v5 00/12] KVM: introduce readonly memslot

2012-08-16 Thread Avi Kivity
On 08/16/2012 06:57 PM, Marcelo Tosatti wrote: Correct. But the chipset is also able to to write-protect some ranges in the 0xc-0x10 area via the PAM. It is able to write-protect both RAM and PCI memory (usually mapped to flash). You are convinced that adding read-write

Re: [PATCH 10/19] pci-assign: Replace kvm_assign_set_msix_entry with kvm_device_msix_set_vector

2012-08-16 Thread Alex Williamson
On Thu, 2012-08-16 at 15:54 +0200, Jan Kiszka wrote: The refactored version cleanly hides the KVM IOCTL structure from the users and also zeros out the padding field. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/device-assignment.c |7 ++- qemu-kvm.c |8

Re: [PATCH 10/19] pci-assign: Replace kvm_assign_set_msix_entry with kvm_device_msix_set_vector

2012-08-16 Thread Jan Kiszka
On 2012-08-16 18:21, Alex Williamson wrote: On Thu, 2012-08-16 at 15:54 +0200, Jan Kiszka wrote: The refactored version cleanly hides the KVM IOCTL structure from the users and also zeros out the padding field. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/device-assignment.c |

Re: [PATCH v8 0/6] kvm: level irqfd support

2012-08-16 Thread Michael S. Tsirkin
On Thu, Aug 16, 2012 at 07:29:40PM +0300, Avi Kivity wrote: On 08/15/2012 10:22 PM, Michael S. Tsirkin wrote: On Wed, Aug 15, 2012 at 11:36:31AM -0600, Alex Williamson wrote: On Wed, 2012-08-15 at 17:28 +0300, Michael S. Tsirkin wrote: On Fri, Aug 10, 2012 at 04:37:08PM -0600, Alex

Re: [PATCH v8 0/6] kvm: level irqfd support

2012-08-16 Thread Alex Williamson
On Thu, 2012-08-16 at 19:32 +0300, Avi Kivity wrote: On 08/11/2012 01:37 AM, Alex Williamson wrote: v8: Trying a new approach. Nobody seems to like the internal IRQ source ID object and the interactions it implies between irqfd and eoifd, so let's get rid of it. Instead, simply

Re: [PATCH 10/19] pci-assign: Replace kvm_assign_set_msix_entry with kvm_device_msix_set_vector

2012-08-16 Thread Jan Kiszka
On 2012-08-16 18:30, Jan Kiszka wrote: On 2012-08-16 18:21, Alex Williamson wrote: On Thu, 2012-08-16 at 15:54 +0200, Jan Kiszka wrote: The refactored version cleanly hides the KVM IOCTL structure from the users and also zeros out the padding field. Signed-off-by: Jan Kiszka

Re: [PATCH v8 0/6] kvm: level irqfd support

2012-08-16 Thread Alex Williamson
On Thu, 2012-08-16 at 19:29 +0300, Avi Kivity wrote: On 08/15/2012 10:22 PM, Michael S. Tsirkin wrote: On Wed, Aug 15, 2012 at 11:36:31AM -0600, Alex Williamson wrote: On Wed, 2012-08-15 at 17:28 +0300, Michael S. Tsirkin wrote: On Fri, Aug 10, 2012 at 04:37:08PM -0600, Alex Williamson

Re: [PATCH v8 0/6] kvm: level irqfd support

2012-08-16 Thread Avi Kivity
On 08/11/2012 01:37 AM, Alex Williamson wrote: v8: Trying a new approach. Nobody seems to like the internal IRQ source ID object and the interactions it implies between irqfd and eoifd, so let's get rid of it. Instead, simply expose IRQ source IDs to userspace. This lets the user be in

Re: [PATCH 00/19] pci-assign: Refactor for upstream merge

2012-08-16 Thread Alex Williamson
On Thu, 2012-08-16 at 15:54 +0200, Jan Kiszka wrote: With this series, we are getting very close to obsoleting qemu-kvm. It refactors hw/device-assignment.c and the associated KVM helper functions into a form that should allow merging them into QEMU. Once the series is acceptable for qemu-kvm,

Re: [PATCH 10/19] pci-assign: Replace kvm_assign_set_msix_entry with kvm_device_msix_set_vector

2012-08-16 Thread Alex Williamson
On Thu, 2012-08-16 at 19:34 +0300, Avi Kivity wrote: On 08/16/2012 07:21 PM, Alex Williamson wrote: +int kvm_device_msix_set_vector(KVMState *s, uint32_t dev_id, uint32_t vector, + int virq) +{ +struct kvm_assigned_msix_entry msix_entry = { +

Re: [PATCH v8 0/6] kvm: level irqfd support

2012-08-16 Thread Avi Kivity
On 08/15/2012 10:22 PM, Michael S. Tsirkin wrote: On Wed, Aug 15, 2012 at 11:36:31AM -0600, Alex Williamson wrote: On Wed, 2012-08-15 at 17:28 +0300, Michael S. Tsirkin wrote: On Fri, Aug 10, 2012 at 04:37:08PM -0600, Alex Williamson wrote: v8: Trying a new approach. Nobody seems to

Re: [PATCH v8 0/6] kvm: level irqfd support

2012-08-16 Thread Avi Kivity
On 08/16/2012 07:54 PM, Michael S. Tsirkin wrote: On Thu, Aug 16, 2012 at 07:39:35PM +0300, Avi Kivity wrote: On 08/16/2012 07:36 PM, Michael S. Tsirkin wrote: What if a level irqfd shares a line with a KVM_IRQ_LINE ioctl? Then an EOI can de-assert the irqfd source, but the line is kept

Re: [PATCH v8 0/6] kvm: level irqfd support

2012-08-16 Thread Avi Kivity
On 08/16/2012 07:36 PM, Michael S. Tsirkin wrote: What if a level irqfd shares a line with a KVM_IRQ_LINE ioctl? Then an EOI can de-assert the irqfd source, but the line is kept high by the last KVM_IRQ_LINE invocation. Exactly. So 1 ID for userspace and 1 for irqfd. Gaa, this mess

Re: [PATCH 10/19] pci-assign: Replace kvm_assign_set_msix_entry with kvm_device_msix_set_vector

2012-08-16 Thread Avi Kivity
On 08/16/2012 07:21 PM, Alex Williamson wrote: +int kvm_device_msix_set_vector(KVMState *s, uint32_t dev_id, uint32_t vector, + int virq) +{ +struct kvm_assigned_msix_entry msix_entry = { +.assigned_dev_id = dev_id, +.gsi = virq, +

  1   2   >