Re: KVM: Softlockups in guests while running kernbench

2012-05-10 Thread Avi Kivity
On 05/10/2012 11:15 AM, Nikunj A Dadhania wrote: I am running a 3.4.0-rc4 based kernel(commit: af3a3ab2), guest config attached. During my tests, I saw few softlockups inside the guests while running kernbench inside the guest. I can reproduce this repeatedly. Test Setup: - Create 4 VMs

Re: [PATCH] bitops: add _local bitops

2012-05-10 Thread Avi Kivity
On 05/09/2012 11:12 PM, Michael S. Tsirkin wrote: On Wed, May 09, 2012 at 01:10:04PM -0700, H. Peter Anvin wrote: On 05/09/2012 01:07 PM, Michael S. Tsirkin wrote: In practice ATM any of the above will work. We probably don't even need to add barrier() calls since what we do

[PATCH] KVM: PPC: Book3S HV: Fix bug leading to deadlock in guest HPT updates

2012-05-10 Thread Paul Mackerras
When handling the H_BULK_REMOVE hypercall, we were forgetting to invalidate and unlock the hashed page table entry (HPTE) in the case where the page had been paged out. This fixes it by clearing the first doubleword of the HPTE in that case. This fixes a regression introduced in commit

block device type supporting trim or scsi unmap ?

2012-05-10 Thread Alexandre DERUMIER
Hi, I'm looking to implement a san storage with ssd drive. which block device type support trim or scsi unmap ? I think ide support it (but performance...) scsi ? virtio ? virtio-scsi ? Regards, Alexandre Derumier -- To unsubscribe from this list: send the line unsubscribe kvm in the body

Re: block device type supporting trim or scsi unmap ?

2012-05-10 Thread ronnie sahlberg
On Thu, May 10, 2012 at 8:19 PM, Alexandre DERUMIER aderum...@odiso.com wrote: Hi, I'm looking to implement a san storage with ssd drive. which block device type support trim or scsi unmap ? I think ide support it (but performance...) scsi ? virtio ? virtio-scsi ? iscsi supports it too

[Bug 42980] BUG in gfn_to_pfn_prot

2012-05-10 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=42980 --- Comment #6 from Avi Kivity a...@redhat.com 2012-05-10 10:53:48 --- Created an attachment (id=73244) -- (https://bugzilla.kernel.org/attachment.cgi?id=73244) Fix Please test the attached patch. -- Configure bugmail:

[PULL] kvm fixes for qemu 1.1

2012-05-10 Thread Avi Kivity
Please pull from: git://git.kernel.org/pub/scm/virt/kvm/qemu-kvm.git uq/master to receive a fix for qemu 1.1, fixing dirty tracking with a large host page size; only applicable to ppc. David Gibson (1): kvm: Fix dirty

Re: [PATCH] KVM: x86: Implement PCID/INVPCID for guests with EPT

2012-05-10 Thread Avi Kivity
On 05/10/2012 03:32 AM, Mao, Junjie wrote: This patch handles PCID/INVPCID for guests. Process-context identifiers (PCIDs) are a facility by which a logical processor may cache information for multiple linear-address spaces so that the processor may retain cached information when software

Re: [PATCH] KVM: x86: Implement PCID/INVPCID for guests with EPT

2012-05-10 Thread Avi Kivity
On 05/10/2012 03:32 AM, Mao, Junjie wrote: This patch handles PCID/INVPCID for guests. Process-context identifiers (PCIDs) are a facility by which a logical processor may cache information for multiple linear-address spaces so that the processor may retain cached information when software

Re: block device type supporting trim or scsi unmap ?

2012-05-10 Thread Alexandre DERUMIER
iscsi supports it too but it requires that your iscsi target supports these opcodes, and that the filesystem/storage behind it supports it too. TGTD with EXT4 and a suitable storage device should do the trick. I'm using a iscsi solaris target, with scsi UNMAP support. Drives also support

Idea: fuse-kvm filesystem

2012-05-10 Thread Avi Kivity
Currently when you mount a filesystem, you face two issues: - you have to be root - if the media is untrusted, it can exploit your kernel With kvm and fuse, we can have a virtualized kernel mount the filesystem, and re-export to the host, which mounts it using a fuse interface. This solves both

Re: Idea: fuse-kvm filesystem

2012-05-10 Thread Richard W.M. Jones
On Thu, May 10, 2012 at 03:29:54PM +0300, Avi Kivity wrote: Currently when you mount a filesystem, you face two issues: - you have to be root - if the media is untrusted, it can exploit your kernel With kvm and fuse, we can have a virtualized kernel mount the filesystem, and re-export to

Re: block device type supporting trim or scsi unmap ?

2012-05-10 Thread ronnie sahlberg
On Thu, May 10, 2012 at 10:28 PM, Alexandre DERUMIER aderum...@odiso.com wrote: iscsi supports it too but it requires that your iscsi target supports these opcodes, and that the filesystem/storage behind it supports it too. TGTD with EXT4 and a suitable storage device should do the trick. I'm

Re: [Qemu-devel] Idea: fuse-kvm filesystem

2012-05-10 Thread Alex Bradbury
On 10 May 2012 13:29, Avi Kivity a...@redhat.com wrote: Currently when you mount a filesystem, you face two issues: - you have to be root - if the media is untrusted, it can exploit your kernel With kvm and fuse, we can have a virtualized kernel mount the filesystem, and re-export to the

Re: Semantics of -cpu host (was Re: [Qemu-devel] [PATCH 2/2] Expose tsc deadline timer cpuid to guest)

2012-05-10 Thread Gleb Natapov
On Wed, May 09, 2012 at 04:38:02PM -0300, Eduardo Habkost wrote: On Wed, May 09, 2012 at 12:38:37PM +0300, Gleb Natapov wrote: On Wed, May 09, 2012 at 11:05:58AM +0200, Alexander Graf wrote: On 09.05.2012, at 10:51, Gleb Natapov wrote: On Wed, May 09, 2012 at 10:42:26AM +0200,

Re: [Qemu-devel] Idea: fuse-kvm filesystem

2012-05-10 Thread Avi Kivity
On 05/10/2012 03:37 PM, Alex Bradbury wrote: On 10 May 2012 13:29, Avi Kivity a...@redhat.com wrote: Currently when you mount a filesystem, you face two issues: - you have to be root - if the media is untrusted, it can exploit your kernel With kvm and fuse, we can have a virtualized

[Bug 42980] BUG in gfn_to_pfn_prot

2012-05-10 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=42980 --- Comment #7 from Luke-Jr luke-jr+linuxb...@utopios.org 2012-05-10 13:17:17 --- Is there anything I can do to reproduce the problem condition for the test? It seems to only occur about once every 6 months normally. -- Configure bugmail:

Re: Idea: fuse-kvm filesystem

2012-05-10 Thread Avi Kivity
On 05/10/2012 03:35 PM, Richard W.M. Jones wrote: On Thu, May 10, 2012 at 03:29:54PM +0300, Avi Kivity wrote: Currently when you mount a filesystem, you face two issues: - you have to be root - if the media is untrusted, it can exploit your kernel With kvm and fuse, we can have a

Re: Semantics of -cpu host (was Re: [Qemu-devel] [PATCH 2/2] Expose tsc deadline timer cpuid to guest)

2012-05-10 Thread Alexander Graf
On 05/10/2012 02:53 PM, Gleb Natapov wrote: On Wed, May 09, 2012 at 04:38:02PM -0300, Eduardo Habkost wrote: On Wed, May 09, 2012 at 12:38:37PM +0300, Gleb Natapov wrote: On Wed, May 09, 2012 at 11:05:58AM +0200, Alexander Graf wrote: On 09.05.2012, at 10:51, Gleb Natapov wrote: On Wed, May

[Bug 42980] BUG in gfn_to_pfn_prot

2012-05-10 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=42980 --- Comment #8 from Avi Kivity a...@redhat.com 2012-05-10 13:30:36 --- Try running while :; do :; done in the nested (L2) guest, and ping -f the L1 guest from the host. -- Configure bugmail:

Re: Semantics of -cpu host (was Re: [Qemu-devel] [PATCH 2/2] Expose tsc deadline timer cpuid to guest)

2012-05-10 Thread Gleb Natapov
On Thu, May 10, 2012 at 03:21:41PM +0200, Alexander Graf wrote: On 05/10/2012 02:53 PM, Gleb Natapov wrote: On Wed, May 09, 2012 at 04:38:02PM -0300, Eduardo Habkost wrote: On Wed, May 09, 2012 at 12:38:37PM +0300, Gleb Natapov wrote: On Wed, May 09, 2012 at 11:05:58AM +0200, Alexander Graf

Re: Idea: fuse-kvm filesystem

2012-05-10 Thread Jan Kiszka
On 2012-05-10 09:29, Avi Kivity wrote: Currently when you mount a filesystem, you face two issues: - you have to be root - if the media is untrusted, it can exploit your kernel With kvm and fuse, we can have a virtualized kernel mount the filesystem, and re-export to the host, which mounts

Re: Semantics of -cpu host (was Re: [Qemu-devel] [PATCH 2/2] Expose tsc deadline timer cpuid to guest)

2012-05-10 Thread Eduardo Habkost
On Thu, May 10, 2012 at 04:39:45PM +0300, Gleb Natapov wrote: On Thu, May 10, 2012 at 03:21:41PM +0200, Alexander Graf wrote: On 05/10/2012 02:53 PM, Gleb Natapov wrote: On Wed, May 09, 2012 at 04:38:02PM -0300, Eduardo Habkost wrote: On Wed, May 09, 2012 at 12:38:37PM +0300, Gleb Natapov

[PATCH] KVM: Avoid wasting pages for small lpage_info arrays

2012-05-10 Thread Takuya Yoshikawa
From: Takuya Yoshikawa yoshikawa.tak...@oss.ntt.co.jp lpage_info is created for each large level even when the memory slot is not for RAM. This means that when we add one slot for a PCI device, we end up allocating at least KVM_NR_PAGE_SIZES - 1 pages by vmalloc(): this problem will become

Re: virtio 3.4 patches

2012-05-10 Thread Michael S. Tsirkin
On Tue, May 08, 2012 at 11:39:38AM +0930, Rusty Russell wrote: On Mon, 7 May 2012 08:30:21 +0300, Michael S. Tsirkin m...@redhat.com wrote: Hi Rusty, please also pick two fixes from for_linus tag on my tree I think they should be sent to Linus for 3.4:

Re: KVM: Softlockups in guests while running kernbench

2012-05-10 Thread Nikunj A Dadhania
On Thu, 10 May 2012 15:39:04 +0530, Nikunj A Dadhania nik...@linux.vnet.ibm.com wrote: On Thu, 10 May 2012 12:22:00 +0300, Avi Kivity a...@redhat.com wrote: On 05/10/2012 11:15 AM, Nikunj A Dadhania wrote: I am running a 3.4.0-rc4 based kernel(commit: af3a3ab2), guest config attached.

Re: Aros (icaros) system fails to reboot in kvm

2012-05-10 Thread Michal Suchanek
It does not work. Without the patch KVM git experiences emulation error, with the patch it just locks up. Also I don't see why would they use movntps for framebuffer. The graphics is up and running, only reboot hits this unimplemented opcode. Thanks Michal -- To unsubscribe from this list:

Re: 1G huge pages in Linux guest VM

2012-05-10 Thread Sriram Murthy
If I have a mix of 2M and 1G pages on the host, how will I be able to pass the same to the guest?. Does KVM and Libvirtd allow multiple -mem-path options?. Also, where in the source can I find more info about hugepage support in KVM? Thanks and regards, Sriram --- On Wed, 5/9/12, Avi Kivity

Re: [PATCH] bitops: add _local bitops

2012-05-10 Thread Rob Landley
On 05/09/2012 08:45 AM, Michael S. Tsirkin wrote: diff --git a/Documentation/atomic_ops.txt b/Documentation/atomic_ops.txt index 27f2b21..b7e3b67 100644 --- a/Documentation/atomic_ops.txt +++ b/Documentation/atomic_ops.txt @@ -520,6 +520,25 @@ The __clear_bit_unlock version is non-atomic,

Re: [PATCH 1/2] ppc64: Rudimentary Support for extra page sizes on server CPUs

2012-05-10 Thread Alexander Graf
On 04/27/2012 07:51 AM, Benjamin Herrenschmidt wrote: More recent Power server chips (i.e. based on the 64 bit hash MMU) support more than just the traditional 4k and 16M page sizes. This can get quite complicated, because which page sizes are supported, which combinations are supported within

Re: [PATCH 1/2] ppc64: Rudimentary Support for extra page sizes on server CPUs

2012-05-10 Thread Avi Kivity
On 05/10/2012 08:49 PM, Alexander Graf wrote: +#if defined(TARGET_PPC64) +if (def-sps) +memcpy(env-sps, def-sps, sizeof(*def-sps)); I never know if *def-... would dereference def or the complete construct. 'man operator' How about sizeof(env-sps)? How about env-sps =

Re: [PATCH 2/2] pseries: Correctly create ibm,segment-page-sizes property

2012-05-10 Thread Alexander Graf
On 04/27/2012 07:51 AM, Benjamin Herrenschmidt wrote: The core tcg/kvm code for ppc64 now has at least the outline capability to support pagesizes beyond the standard 4k and 16MB. The CPUState is initialized with information advertising the available pagesizes and their correct encodings, and

Re: [PATCHv2] bitops: add _local bitops

2012-05-10 Thread Christoph Lameter
On Wed, 9 May 2012, Michael S. Tsirkin wrote: kvm needs to update some hypervisor variables atomically in a sense that the operation can't be interrupted in the middle. However the hypervisor always runs on the same CPU so it does not need any memory barrier or lock prefix. Add _local

oVirt Workshop at LinuxCon + kvm virt track Japan 2012

2012-05-10 Thread Dor Laor
FYI (mea culpa for semi-spamming): On early June LinuxCon Japan will host a virtualization track w/ some known faces and a parallel oVirt developer workshop in Japan. More details: https://events.linuxfoundation.org/events/linuxcon-japan/schedule Regards, Dor Original Message

Re: block device type supporting trim or scsi unmap ?

2012-05-10 Thread Alexandre DERUMIER
Guess it depends on how recent kernel your guest runs. If you present it as a SCSI disk to the guest, then I have successfully had Linux Mint 12 guests do UNMAP when accessing /dev/sd* from within the guest. Ok, thanks for the info, i'll try it ! - Mail original - De: ronnie

[PATCH v3 1/8] kvm: Refactor KVMState::max_gsi to gsi_count

2012-05-10 Thread Jan Kiszka
Instead of the bitmap size, store the maximum of GSIs the kernel support. Move the GSI limit assertion to the API function kvm_irqchip_add_route and make it stricter. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- kvm-all.c |8 1 files changed, 4 insertions(+), 4 deletions(-)

[PATCH v3 0/8] uq/master: MSI support for in-kernel irqchip mode

2012-05-10 Thread Jan Kiszka
Version 3 is mostly a rebase + the final consolidation over the direct MSI inject mechanism that made it into kvm.git recently. I also introduced an MSIMessage structure as it will be helpful for the follow-up work on irqfd-driven MSI injection under KVM. And, finally, this flips the default for

[PATCH v3 2/8] Introduce MSIMessage structure

2012-05-10 Thread Jan Kiszka
Will be used for generating and distributing MSI messages, both in emulation mode and under KVM. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/msi.h |5 + qemu-common.h |1 + 2 files changed, 6 insertions(+), 0 deletions(-) diff --git a/hw/msi.h b/hw/msi.h index

[PATCH v3 3/8] kvm: Introduce basic MSI support for in-kernel irqchips

2012-05-10 Thread Jan Kiszka
This patch basically adds kvm_irqchip_send_msi, a service for sending arbitrary MSI messages to KVM's in-kernel irqchip models. As the current KVI API requires us to establish a static route from a pseudo GSI to the target MSI message and inject the MSI via toggling that GSI, we need to play some

[PATCH v3 5/8] kvm: x86: Wire up MSI support for in-kernel irqchip

2012-05-10 Thread Jan Kiszka
Catch writes to the MSI MMIO region in the KVM APIC and forward them to the kernel. Provide the kernel support GSI routing, this allows to enable MSI support also for in-kernel irqchip mode. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/apic.c |1 + hw/kvm/apic.c | 34

[PATCH v3 6/8] kvm: Update kernel headers

2012-05-10 Thread Jan Kiszka
Corresponding kvm.git hash: f2569053e0 Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- linux-headers/linux/kvm.h | 38 ++ 1 files changed, 38 insertions(+), 0 deletions(-) diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index

[PATCH v3 7/8] kvm: Add support for direct MSI injections

2012-05-10 Thread Jan Kiszka
If the kernel supports KVM_SIGNAL_MSI, we can avoid the route-based MSI injection mechanism. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- kvm-all.c | 22 +++--- 1 files changed, 19 insertions(+), 3 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index e7ed510..4e8c8f7

[PATCH v3 8/8] kvm: Enable in-kernel irqchip support by default

2012-05-10 Thread Jan Kiszka
As MSI is now fully supported by KVM (/wrt available features in upstream), we can finally enable the in-kernel irqchip by default. Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- kvm-all.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/kvm-all.c b/kvm-all.c index

[PATCH v3 4/8] pc: Enable MSI support at APIC level

2012-05-10 Thread Jan Kiszka
Push msi_supported enabling to the APIC implementations where we can encapsulate the decision more cleanly, hiding the details from the generic code. CC: Stefano Stabellini stefano.stabell...@eu.citrix.com Signed-off-by: Jan Kiszka jan.kis...@siemens.com --- hw/apic.c |2 ++ hw/pc.c

Re: [PATCH 1/2] ppc64: Rudimentary Support for extra page sizes on server CPUs

2012-05-10 Thread Benjamin Herrenschmidt
On Thu, 2012-05-10 at 20:55 +0300, Avi Kivity wrote: On 05/10/2012 08:49 PM, Alexander Graf wrote: +#if defined(TARGET_PPC64) +if (def-sps) +memcpy(env-sps, def-sps, sizeof(*def-sps)); I never know if *def-... would dereference def or the complete construct. 'man

Re: [PATCH 2/2] pseries: Correctly create ibm,segment-page-sizes property

2012-05-10 Thread Benjamin Herrenschmidt
+for (count = 0; count PPC_PAGE_SIZES_MAX_SZ; count++) { +if (sps-enc[count].page_shift == 0) { +break; +} +} +if ((p - prop)= (maxcells - 3 - count * 2)) Is this valid C? Can you substract one pointer from another

Re: [RFC] sched: make callers check lock contention for cond_resched_lock()

2012-05-10 Thread Takuya Yoshikawa
Replaced Ingo's address with kernel.org one, On Thu, 03 May 2012 17:47:30 +0200 Peter Zijlstra pet...@infradead.org wrote: On Thu, 2012-05-03 at 22:00 +0900, Takuya Yoshikawa wrote: But as I could not see why spin_needbreak() was differently implemented depending on CONFIG_PREEMPT, I

Re: [PATCH] bitops: add _local bitops

2012-05-10 Thread Benjamin Herrenschmidt
On Wed, 2012-05-09 at 13:10 -0700, H. Peter Anvin wrote: On 05/09/2012 01:07 PM, Michael S. Tsirkin wrote: In practice ATM any of the above will work. We probably don't even need to add barrier() calls since what we do afterwards is apic access which has an optimization barrier anyway.

Re: How to determine the backing host physical memory for a given guest ?

2012-05-10 Thread Chegu Vinod
Andrew Theurer habanero at linux.vnet.ibm.com writes: On 05/09/2012 08:46 AM, Avi Kivity wrote: On 05/09/2012 04:05 PM, Chegu Vinod wrote: Hello, On an 8 socket Westmere host I am attempting to run a single guest and characterize the virtualization overhead for a system intensive

RE: [PATCH] KVM: x86: Implement PCID/INVPCID for guests with EPT

2012-05-10 Thread Mao, Junjie
On 05/10/2012 03:32 AM, Mao, Junjie wrote: This patch handles PCID/INVPCID for guests. Process-context identifiers (PCIDs) are a facility by which a logical processor may cache information for multiple linear-address spaces so that the processor may retain cached information when

[PATCH] KVM: PPC: Book3S HV: Fix bug leading to deadlock in guest HPT updates

2012-05-10 Thread Paul Mackerras
When handling the H_BULK_REMOVE hypercall, we were forgetting to invalidate and unlock the hashed page table entry (HPTE) in the case where the page had been paged out. This fixes it by clearing the first doubleword of the HPTE in that case. This fixes a regression introduced in commit

Re: [PATCH 1/2] ppc64: Rudimentary Support for extra page sizes on server CPUs

2012-05-10 Thread Alexander Graf
On 04/27/2012 07:51 AM, Benjamin Herrenschmidt wrote: More recent Power server chips (i.e. based on the 64 bit hash MMU) support more than just the traditional 4k and 16M page sizes. This can get quite complicated, because which page sizes are supported, which combinations are supported within

Re: [PATCH 1/2] ppc64: Rudimentary Support for extra page sizes on server CPUs

2012-05-10 Thread Avi Kivity
On 05/10/2012 08:49 PM, Alexander Graf wrote: +#if defined(TARGET_PPC64) +if (def-sps) +memcpy(env-sps, def-sps, sizeof(*def-sps)); I never know if *def-... would dereference def or the complete construct. 'man operator' How about sizeof(env-sps)? How about env-sps =

Re: [PATCH 2/2] pseries: Correctly create ibm,segment-page-sizes property

2012-05-10 Thread Alexander Graf
On 04/27/2012 07:51 AM, Benjamin Herrenschmidt wrote: The core tcg/kvm code for ppc64 now has at least the outline capability to support pagesizes beyond the standard 4k and 16MB. The CPUState is initialized with information advertising the available pagesizes and their correct encodings, and