pci device assignment and mm, KSM.

2012-07-04 Thread Kamezawa Hiroyuki
I'm sorry if my understanding is incorrect. Here are some topics on pci passthrough to guests. When pci passthrough is used with kvm, guest's all memory are pinned by extra reference count of get_page(). That pinned pages are never be reclaimable and movable by migration and cannot be merged by

Re: [PATCH 1/2] virtio-blk spec: document topology info

2012-07-04 Thread Rusty Russell
On Tue, 3 Jul 2012 15:16:51 +0200, Paolo Bonzini pbonz...@redhat.com wrote: Current QEMU and Linux drivers can export queue parameters via the virtio-blk configuration space. Document this, since the next patch will have to add another configuration field after these. Signed-off-by: Paolo

Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-04 Thread Rusty Russell
On Tue, 3 Jul 2012 15:19:37 +0200, Paolo Bonzini pbonz...@redhat.com wrote: This patch adds support for the new VIRTIO_BLK_F_CONFIG_WCE feature, which exposes the cache mode in the configuration space and lets the driver modify it. The cache mode is exposed via sysfs. Even if the host does

Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-04 Thread Rusty Russell
On Tue, 3 Jul 2012 15:19:37 +0200, Paolo Bonzini pbonz...@redhat.com wrote: This patch adds support for the new VIRTIO_BLK_F_CONFIG_WCE feature, which exposes the cache mode in the configuration space and lets the driver modify it. The cache mode is exposed via sysfs. Even if the host does

Re: [Qemu-devel] plan for device assignment upstream

2012-07-04 Thread Avi Kivity
On 07/03/2012 10:06 PM, Blue Swirl wrote: On Mon, Jul 2, 2012 at 9:43 AM, Avi Kivity a...@redhat.com wrote: On 07/02/2012 12:30 PM, Jan Kiszka wrote: On 2012-07-02 11:18, Michael S. Tsirkin wrote: I've been thinking hard about Jan's patches for device assignment. Basically while I thought it

Re: [PATCH v3 02/26] KVM: Split cpuid register access from computation

2012-07-04 Thread Avi Kivity
On 07/03/2012 08:34 PM, Marcelo Tosatti wrote: On Wed, Jun 27, 2012 at 06:24:50PM +0300, Avi Kivity wrote: Introduce kvm_cpuid() to perform the leaf limit check and calculate register values, and let kvm_emulate_cpuid() just handle reading and writing the registers from/to the vcpu. This

[PATCH v3.1 02/26] KVM: Split cpuid register access from computatio

2012-07-04 Thread Avi Kivity
Introduce kvm_cpuid() to perform the leaf limit check and calculate register values, and let kvm_emulate_cpuid() just handle reading and writing the registers from/to the vcpu. This allows us to reuse kvm_cpuid() in a context where directly reading and writing registers is not desired.

Re: A question about how kvm switch context to guest

2012-07-04 Thread Zhengwang Ruan
Original Message From: Avi Kivity Sent: 2012年07月04日 星期三 16时47分40秒 To: Zhengwang Ruan Subject: Re: A question about how kvm switch context to guest On 07/03/2012 12:50 PM, Zhengwang Ruan wrote: Hi kashyapc all, I see a piece of code in vmx_vcpu_run as below, is it used to

Re: [RFC PATCH 00/18] KVM: x86: CPU isolation and direct interrupts handling by guests

2012-07-04 Thread Tomoki Sekiyama
Hello, There were some missing pieces for trying this patch series. Firstly, the patch is for v3.5-rc4, but that version has an issue that it cannot passthrough PCI devices because of genirq changes. A patch to avoid this issue is available at https://lkml.org/lkml/2012/6/1/261 . Secondly, to

[PATCH v4 0/3] Export offsets of VMCS fields as note information for kdump

2012-07-04 Thread Yanfei Zhang
This patch set exports offsets of VMCS fields as note information for kdump. We call it VMCSINFO. The purpose of VMCSINFO is to retrieve runtime state of guest machine image, such as registers, in host machine's crash dump as VMCS format. The problem is that VMCS internal is hidden by Intel in its

Re: race condition in qemu-kvm-1.0.1

2012-07-04 Thread Peter Lieven
On 07/03/12 17:54, Marcelo Tosatti wrote: On Wed, Jun 27, 2012 at 12:35:22PM +0200, Peter Lieven wrote: Hi, we recently came across multiple VMs racing and stopping working. It seems to happen when the system is at 100% cpu. One way to reproduce this is: qemu-kvm-1.0.1 with vnc-thread enabled

[PATCH v4 1/3] KVM: Export symbols for module vmcsinfo-intel

2012-07-04 Thread Yanfei Zhang
A new module named vmcsinfo-intel is used to fill VMCSINFO. And this module depends on kvm-intel and kvm module. So we should export some symbols of kvm-intel and kvm module that are needed by vmcsinfo-intel. Signed-off-by: zhangyanfei zhangyan...@cn.fujitsu.com --- arch/x86/include/asm/vmx.h |

Re: [Qemu-devel] [PATCH 2/2] virtio-blk: disable write cache if not negotiated

2012-07-04 Thread Kevin Wolf
Am 03.07.2012 15:51, schrieb Paolo Bonzini: Il 03/07/2012 15:49, Kevin Wolf ha scritto: If the guest does not support flushes, we should run in writethrough mode. The setting is temporary until the next reset, so that for example the BIOS will run in writethrough mode while Linux will run with

[PATCH v4 2/3] KVM-INTEL: Add new module vmcsinfo-intel to fill VMCSINFO

2012-07-04 Thread Yanfei Zhang
This patch implements a new module named vmcsinfo-intel. The module fills VMCSINFO with the VMCS revision identifier, and offsets of VMCS fields. Note, offsets of fields that defined in Intel specification (Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 3C) but not defined

[PATCH v4 3/3] Documentation: Add ABI entry for vmcs sysfs interface

2012-07-04 Thread Yanfei Zhang
Signed-off-by: zhangyanfei zhangyan...@cn.fujitsu.com --- Documentation/ABI/testing/sysfs-devices-system-cpu | 21 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/Documentation/ABI/testing/sysfs-devices-system-cpu

Re: plan for device assignment upstream

2012-07-04 Thread Michael S. Tsirkin
On Mon, Jul 02, 2012 at 12:43:48PM +0300, Avi Kivity wrote: On 07/02/2012 12:30 PM, Jan Kiszka wrote: On 2012-07-02 11:18, Michael S. Tsirkin wrote: I've been thinking hard about Jan's patches for device assignment. Basically while I thought it makes sense to make all devices: assignment

Re: RFD: virtio balloon API use (was Re: [PATCH 5 of 5] virtio: expose added descriptors immediately)

2012-07-04 Thread Michael S. Tsirkin
On Tue, Jul 03, 2012 at 10:17:46AM +0930, Rusty Russell wrote: On Mon, 2 Jul 2012 13:08:19 -0300, Rafael Aquini aqu...@redhat.com wrote: As 'locking in balloon', may I assume the approach I took for the compaction case is OK and aligned to address these concerns of yours? If not, do not

Re: RFD: virtio balloon API use (was Re: [PATCH 5 of 5] virtio: expose added descriptors immediately)

2012-07-04 Thread Michael S. Tsirkin
On Mon, Jul 02, 2012 at 01:08:19PM -0300, Rafael Aquini wrote: On Mon, Jul 02, 2012 at 10:25:58AM +0300, Michael S. Tsirkin wrote: On Mon, Jul 02, 2012 at 10:35:47AM +0930, Rusty Russell wrote: On Sun, 1 Jul 2012 12:20:51 +0300, Michael S. Tsirkin m...@redhat.com wrote: On Thu, Nov

Re: plan for device assignment upstream

2012-07-04 Thread Avi Kivity
On 07/04/2012 01:42 PM, Michael S. Tsirkin wrote: On Mon, Jul 02, 2012 at 12:43:48PM +0300, Avi Kivity wrote: On 07/02/2012 12:30 PM, Jan Kiszka wrote: On 2012-07-02 11:18, Michael S. Tsirkin wrote: I've been thinking hard about Jan's patches for device assignment. Basically while I

Re: [Qemu-devel] [PATCH 2/2] virtio-blk: disable write cache if not negotiated

2012-07-04 Thread Paolo Bonzini
Il 04/07/2012 12:16, Kevin Wolf ha scritto: Yes. It doesn't override cache=unsafe though. When the guest doesn't support flushes, cache=writeback is equivalent to cache=unsafe, so if you want the old behaviour back you can switch to cache=unsafe without additional risks. We don't have a

Re: [Qemu-devel] [PATCH 2/2] virtio-blk: disable write cache if not negotiated

2012-07-04 Thread Kevin Wolf
Am 04.07.2012 14:21, schrieb Paolo Bonzini: Il 04/07/2012 12:16, Kevin Wolf ha scritto: Yes. It doesn't override cache=unsafe though. When the guest doesn't support flushes, cache=writeback is equivalent to cache=unsafe, so if you want the old behaviour back you can switch to cache=unsafe

Re: plan for device assignment upstream

2012-07-04 Thread Michael S. Tsirkin
On Wed, Jul 04, 2012 at 02:24:45PM +0300, Avi Kivity wrote: On 07/04/2012 01:42 PM, Michael S. Tsirkin wrote: On Mon, Jul 02, 2012 at 12:43:48PM +0300, Avi Kivity wrote: On 07/02/2012 12:30 PM, Jan Kiszka wrote: On 2012-07-02 11:18, Michael S. Tsirkin wrote: I've been thinking hard

[PATCH 2/4] kvm tools: Use asm/barrier.h on powerpc

2012-07-04 Thread Michael Ellerman
Commit 141124c deleted system.h, we really want barrier.h Signed-off-by: Michael Ellerman mich...@ellerman.id.au --- tools/kvm/powerpc/include/kvm/barrier.h |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/kvm/powerpc/include/kvm/barrier.h

[PATCH 1/4] kvm tools: Define KVM_VIRTIO_MMIO_AREA for powerpc

2012-07-04 Thread Michael Ellerman
Commit 82ea06e Introduce KVM_VIRTIO_MMIO_AREA did just that, but only for x86. Causing the following commit 5c301a3 Add virtio-mmio support to break the build for powerpc. We follow what x86 did and place it 16MB past the PCI area, I have no idea if that is actually a good idea, or whether it

[PATCH 3/4] kvm tools: Support cross compilation

2012-07-04 Thread Michael Ellerman
Allow CROSS_COMPILE to be used to prefix CC as is done in the kernel Makefile. If CROSS_COMPILE is unset it has no effect, and still allows CC to be overridden. We need to fix a few places to use ARCH instead of uname_M directly, so that the overridden setting of ARCH takes effect.

[PATCH 4/4] kvm tools: Cleanup ARCH uname_M in Makefile

2012-07-04 Thread Michael Ellerman
The sed expression for ARCH seems to have been cribbed from the top-level kernel Makefile, and includes lots of architectures kvmtool doesn't support - strip it down. Also call uname -m directly there and get rid of uname_M. Signed-off-by: Michael Ellerman mich...@ellerman.id.au ---

Re: [Qemu-devel] [PATCH 2/2] virtio-blk: disable write cache if not negotiated

2012-07-04 Thread Paolo Bonzini
Il 04/07/2012 14:50, Kevin Wolf ha scritto: Before merging the patches (or actually this patch, I think patch 1 is fairly independent), Yes, it is. I'd like to hear more opinions on whether we need the cache parameter split first Ok, let's discuss it next week on the KVM/QEMU call. Getting

Re: [RFC PATCH 02/17] KVM: PPC64: booke: Add EPCR support in mtspr/mfspr emulation

2012-07-04 Thread Alexander Graf
On 25.06.2012, at 14:26, Mihai Caraman wrote: Add EPCR support in booke mtspr/mfspr emulation. EPCR register is defined only for 64-bit and HV categories, so it shoud be available only on 64-bit virtual processors. Undefine the support for 32-bit builds. Define a reusable setter function for

Re: [RFC PATCH 01/17] KVM: PPC64: booke: Set interrupt computation mode for 64-bit host

2012-07-04 Thread Alexander Graf
On 25.06.2012, at 14:26, Mihai Caraman wrote: 64-bit host needs to remain in 64-bit mode when an exception take place. Set interrupt computaion mode in EPCR register. Signed-off-by: Mihai Caraman mihai.cara...@freescale.com Thanks, applied to kvm-ppc-next. Alex -- To unsubscribe from

Re: [Qemu-ppc] [RFC PATCH 03/17] KVM: PPC64: booke: Add EPCR support in sregs

2012-07-04 Thread Alexander Graf
On 25.06.2012, at 14:26, Mihai Caraman wrote: Add KVM_SREGS_E_64 feature and EPCR spr support in get/set sregs for 64-bit hosts. Please also implement a ONE_REG interface while at it. Over time, I'd like to move towards ONE_REG instead of the messy regs/sregs API. Alex -- To unsubscribe

[PATCH] kvm tool: Fix powerpc/kvm-cpu.c for new KVM_SET_ONE_REG API

2012-07-04 Thread Michael Ellerman
I think this code was based on an earlier version of the KVM_SET_ONE_REG API, which at the time was in agraf's tree but not mainline? Either way it doesn't compile as is, so fix it up. Signed-off-by: Michael Ellerman mich...@ellerman.id.au --- tools/kvm/powerpc/kvm-cpu.c |6 -- 1 file

Re: [Qemu-ppc] [RFC PATCH 04/17] KVM: PPC64: booke: Add guest computation mode for irq delivery

2012-07-04 Thread Alexander Graf
On 25.06.2012, at 14:26, Mihai Caraman wrote: When delivering guest IRQs, update MSR computaion computation mode according to guest interrupt computation mode found in EPCR. Signed-off-by: Mihai Caraman mihai.cara...@freescale.com --- arch/powerpc/kvm/booke.c |8 +++- 1 files

Re: [Qemu-ppc] [RFC PATCH 05/17] KVM: PPC: booke: Extend MAS2 EPN mask for 64-bit

2012-07-04 Thread Alexander Graf
On 25.06.2012, at 14:26, Mihai Caraman wrote: Extend MAS2 EPN mask for 64-bit hosts, to retain most significant bits. Change get tlb eaddr to use this mask. Please see section 6.11.4.8 in the PowerISA 2.06b: MMU behavior is largely unaffected by whether the thread is in 32-bit computation

Re: [RFC PATCH 06/17] KVM: PPC: e500: Add emulation helper for getting instruction ea

2012-07-04 Thread Alexander Graf
On 25.06.2012, at 14:26, Mihai Caraman wrote: Add emulation helper for getting instruction ea and refactor tlb instruction emulation to use it. Signed-off-by: Mihai Caraman mihai.cara...@freescale.com --- arch/powerpc/kvm/e500.h |6 +++--- arch/powerpc/kvm/e500_emulate.c |

Re: [PATCH v3 2/2] kvm: KVM_EOIFD, an eventfd for EOIs

2012-07-04 Thread Michael S. Tsirkin
On Tue, Jul 03, 2012 at 01:21:29PM -0600, Alex Williamson wrote: This new ioctl enables an eventfd to be triggered when an EOI is written for a specified irqchip pin. By default this is a simple notification, but we can also tie the eoifd to a level irqfd, which enables the irqchip pin to be

Re: [Qemu-ppc] [RFC PATCH 07/17] KVM: PPC: e500: Mask ea's high 32-bits in 32/64 instr emulation

2012-07-04 Thread Alexander Graf
On 25.06.2012, at 14:26, Mihai Caraman wrote: Mask high 32 bits of effective address in emulation layer, for guests running in 32-bit mode. MAS2's high-order 32 bits represents the upper 32 bits of the effective address of the page. Mask it too for tlbwe instruction emulation. Ah, there

Re: [PATCH 0/6] tcm_vhost/virtio-scsi WIP code for-3.6

2012-07-04 Thread Michael S. Tsirkin
On Wed, Jul 04, 2012 at 04:24:00AM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org Hi folks, This series contains patches required to update tcm_vhost - virtio-scsi connected hosts - guests to run on v3.5-rc2 mainline code. This series is available on

Re: [Qemu-ppc] [RFC PATCH 07/17] KVM: PPC: e500: Mask ea's high 32-bits in 32/64 instr emulation

2012-07-04 Thread Alexander Graf
On 04.07.2012, at 16:00, Alexander Graf wrote: On 25.06.2012, at 14:26, Mihai Caraman wrote: Mask high 32 bits of effective address in emulation layer, for guests running in 32-bit mode. MAS2's high-order 32 bits represents the upper 32 bits of the effective address of the page. Mask

[PATCH] virtio-blk spec: document topology fields

2012-07-04 Thread Paolo Bonzini
This completes the changes from yesterday. Signed-off-by: Paolo Bonzini pbonz...@redhat.com --- virtio-spec.lyx | 62 +++ 1 file changed, 58 insertions(+), 4 deletions(-) diff --git a/virtio-spec.lyx b/virtio-spec.lyx index 440af3e..905e619

Re: [PATCH] kvm tool: Fix powerpc/kvm-cpu.c for new KVM_SET_ONE_REG API

2012-07-04 Thread Alexander Graf
On 04.07.2012, at 15:39, Michael Ellerman wrote: I think this code was based on an earlier version of the KVM_SET_ONE_REG API, which at the time was in agraf's tree but not mainline? Either way it doesn't compile as is, so fix it up. Yup, looks good :). Alex -- To unsubscribe from this

Re: [PATCH 3/3] virtio-blk: Add bio-based IO path for virtio-blk

2012-07-04 Thread Paolo Bonzini
Il 03/07/2012 16:28, Dor Laor ha scritto: Users using a spinning disk still get IO scheduling in the host though. What benefit is there in doing it in the guest as well? The io scheduler waits for requests to merge and thus batch IOs together. It's not important w.r.t spinning disks since the

Re: [PATCH] kvm tool: Fix powerpc/kvm-cpu.c for new KVM_SET_ONE_REG API

2012-07-04 Thread Pekka Enberg
On Wed, 4 Jul 2012, Alexander Graf wrote: On 04.07.2012, at 15:39, Michael Ellerman wrote: I think this code was based on an earlier version of the KVM_SET_ONE_REG API, which at the time was in agraf's tree but not mainline? Either way it doesn't compile as is, so fix it up. Yup,

Re: [Qemu-ppc] [RFC PATCH 09/17] KVM: PPC64: booke: Hard disable interrupts when entering guest

2012-07-04 Thread Alexander Graf
On 25.06.2012, at 14:26, Mihai Caraman wrote: 64-bit host runs with lazy interrupt disabling, so local_irq_disable() does not disable interrupts right away and does not protect against preemption required by __kvmppc_vcpu_run(). Define a macro for 64-bit to use hard_irq_disable().

RE: [RFC PATCH 02/17] KVM: PPC64: booke: Add EPCR support in mtspr/mfspr emulation

2012-07-04 Thread Caraman Mihai Claudiu-B02008
-Original Message- From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc- ow...@vger.kernel.org] On Behalf Of Alexander Graf Sent: Wednesday, July 04, 2012 4:22 PM To: Caraman Mihai Claudiu-B02008 Cc: kvm-...@vger.kernel.org; kvm@vger.kernel.org; linuxppc- d...@lists.ozlabs.org;

Re: [Qemu-ppc] [RFC PATCH 12/17] PowerPC: booke64: Add DO_KVM kernel hooks

2012-07-04 Thread Alexander Graf
On 25.06.2012, at 14:26, Mihai Caraman wrote: Hook DO_KVM macro to 64-bit booke in a optimal way similar to 32-bit booke see head_fsl_booke.S file. Extend interrupt handlers' parameter list with interrupt vector numbers to accomodate the macro. Rework Guest Doorbell handler to use the proper

QEMU- 1CPU for guest while more cores used on host?

2012-07-04 Thread robert.kucera
Beginner's question: Got a host with KVM and two Opterons (2cpux16cores=32cores). Trying to virtualize some ancient intranet Redhat servers that cannot be upgraded due to some ancient scripts that would have to be rewritten (last upgrade was at least ten years ago). Of course amd-v+KVM is

Re: QEMU- 1CPU for guest while more cores used on host?

2012-07-04 Thread Javier Guerra Giraldez
1: no. what you're asking can't be done. if it was possible, every chipmaker would implement it in silicon to create über-fast single-processors on top of multicore chips. 2: why do you think course amd-v+KVM is impossible to be used ?? it does work very well -- Javier -- To unsubscribe

Re: [PATCH v4 3/3] Documentation: Add ABI entry for vmcs sysfs interface

2012-07-04 Thread Greg KH
On Wed, Jul 04, 2012 at 06:06:28PM +0800, Yanfei Zhang wrote: Signed-off-by: zhangyanfei zhangyan...@cn.fujitsu.com --- Documentation/ABI/testing/sysfs-devices-system-cpu | 21 1 files changed, 21 insertions(+), 0 deletions(-) diff --git

Re: [PATCH 5/6] virtio-scsi: Add vdrv-scan for post VIRTIO_CONFIG_S_DRIVER_OK LUN scanning

2012-07-04 Thread Paolo Bonzini
Il 04/07/2012 06:24, Nicholas A. Bellinger ha scritto: From: Nicholas Bellinger n...@linux-iscsi.org This patch changes virtio-scsi to use a new virtio_driver-scan() callback so that scsi_scan_host() can be properly invoked once virtio_dev_probe() has set add_status(dev,

Re: [PATCH 6/6] virtio-scsi: Set shost-max_id=1 for tcm_vhost WWPNs

2012-07-04 Thread Paolo Bonzini
Il 04/07/2012 06:24, Nicholas A. Bellinger ha scritto: From: Nicholas Bellinger n...@linux-iscsi.org This is currently required for connecting to tcm_vhost in order to prevent the client LUN scan from detecting the same tcm_vhost WWPN on multiple target IDs. But that's what the config field

Re: [PATCH 0/6] tcm_vhost/virtio-scsi WIP code for-3.6

2012-07-04 Thread Paolo Bonzini
Il 04/07/2012 16:02, Michael S. Tsirkin ha scritto: On Wed, Jul 04, 2012 at 04:24:00AM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org Hi folks, This series contains patches required to update tcm_vhost - virtio-scsi connected hosts - guests to run on

Re: [PATCH v4 3/3] Documentation: Add ABI entry for vmcs sysfs interface

2012-07-04 Thread Greg KH
On Wed, Jul 04, 2012 at 06:06:28PM +0800, Yanfei Zhang wrote: Signed-off-by: zhangyanfei zhangyan...@cn.fujitsu.com --- Documentation/ABI/testing/sysfs-devices-system-cpu | 21 1 files changed, 21 insertions(+), 0 deletions(-) diff --git

Re: [RFC PATCH 02/17] KVM: PPC64: booke: Add EPCR support in mtspr/mfspr emulation

2012-07-04 Thread Alexander Graf
On 04.07.2012, at 16:14, Caraman Mihai Claudiu-B02008 wrote: -Original Message- From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc- ow...@vger.kernel.org] On Behalf Of Alexander Graf Sent: Wednesday, July 04, 2012 4:22 PM To: Caraman Mihai Claudiu-B02008 Cc:

Re: race between kvm-kmod-3.0 and kvm-kmod-3.3 // was: race condition in qemu-kvm-1.0.1

2012-07-04 Thread Peter Lieven
On 07/03/12 15:25, Avi Kivity wrote: On 07/03/2012 04:15 PM, Peter Lieven wrote: On 03.07.2012 15:13, Avi Kivity wrote: On 07/03/2012 04:01 PM, Peter Lieven wrote: Further output from my testing. Working: Linux 2.6.38 with included kvm module Linux 3.0.0 with included kvm module

RE: Biweekly KVM Test report, kernel ae7a2a3f... qemu a212f79f...

2012-07-04 Thread Ren, Yongjie
-Original Message- From: Jan Kiszka [mailto:jan.kis...@siemens.com] Sent: Wednesday, July 04, 2012 10:43 PM To: Ren, Yongjie Cc: KVM; Avi Kivity Subject: Re: Biweekly KVM Test report, kernel ae7a2a3f... qemu a212f79f... On 2012-07-03 09:11, Ren, Yongjie wrote: Hi All, This

Re: [PATCH 0/6] tcm_vhost/virtio-scsi WIP code for-3.6

2012-07-04 Thread Michael S. Tsirkin
On Wed, Jul 04, 2012 at 04:52:00PM +0200, Paolo Bonzini wrote: Il 04/07/2012 16:02, Michael S. Tsirkin ha scritto: On Wed, Jul 04, 2012 at 04:24:00AM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org Hi folks, This series contains patches required to

Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-04 Thread Michael S. Tsirkin
On Tue, Jul 03, 2012 at 03:19:37PM +0200, Paolo Bonzini wrote: This patch adds support for the new VIRTIO_BLK_F_CONFIG_WCE feature, which exposes the cache mode in the configuration space and lets the driver modify it. The cache mode is exposed via sysfs. Even if the host does not support

Re: [Qemu-ppc] [RFC PATCH 15/17] KVM: PPC64: bookehv: Add support for interrupt handling

2012-07-04 Thread Alexander Graf
On 25.06.2012, at 14:26, Mihai Caraman wrote: Add bookehv interrupt handling support for 64-bit hosts. Change common stack layout to refer PPC_LR_STKOFF kernel constant. Dispatch the 64-bit execution flow to the existing kvm_handler_common asm macro. Update input register values

Re: Biweekly KVM Test report, kernel ae7a2a3f... qemu a212f79f...

2012-07-04 Thread Jan Kiszka
On 2012-07-04 17:03, Ren, Yongjie wrote: -Original Message- From: Jan Kiszka [mailto:jan.kis...@siemens.com] Sent: Wednesday, July 04, 2012 10:43 PM To: Ren, Yongjie Cc: KVM; Avi Kivity Subject: Re: Biweekly KVM Test report, kernel ae7a2a3f... qemu a212f79f... On 2012-07-03 09:11,

RE: [Qemu-ppc] [RFC PATCH 15/17] KVM: PPC64: bookehv: Add support for interrupt handling

2012-07-04 Thread Caraman Mihai Claudiu-B02008
-Original Message- From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc- ow...@vger.kernel.org] On Behalf Of Alexander Graf Sent: Wednesday, July 04, 2012 6:14 PM To: Caraman Mihai Claudiu-B02008 Cc: kvm-...@vger.kernel.org; kvm@vger.kernel.org; linuxppc- d...@lists.ozlabs.org;

Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-04 Thread Michael S. Tsirkin
On Tue, Jul 03, 2012 at 03:19:37PM +0200, Paolo Bonzini wrote: This patch adds support for the new VIRTIO_BLK_F_CONFIG_WCE feature, which exposes the cache mode in the configuration space and lets the driver modify it. The cache mode is exposed via sysfs. Even if the host does not support

RE: [Qemu-ppc] [RFC PATCH 12/17] PowerPC: booke64: Add DO_KVM kernel hooks

2012-07-04 Thread Caraman Mihai Claudiu-B02008
-Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Wednesday, July 04, 2012 5:30 PM To: Caraman Mihai Claudiu-B02008 Cc: kvm-...@vger.kernel.org; KVM list; linuxppc-dev; qemu- p...@nongnu.org List; Benjamin Herrenschmidt Subject: Re: [Qemu-ppc] [RFC PATCH 12/17]

Re: [Qemu-ppc] [RFC PATCH 12/17] PowerPC: booke64: Add DO_KVM kernel hooks

2012-07-04 Thread Alexander Graf
On 04.07.2012, at 17:27, Caraman Mihai Claudiu-B02008 wrote: -Original Message- From: Alexander Graf [mailto:ag...@suse.de] Sent: Wednesday, July 04, 2012 5:30 PM To: Caraman Mihai Claudiu-B02008 Cc: kvm-...@vger.kernel.org; KVM list; linuxppc-dev; qemu- p...@nongnu.org List;

Re: [Qemu-ppc] [RFC PATCH 15/17] KVM: PPC64: bookehv: Add support for interrupt handling

2012-07-04 Thread Alexander Graf
On 04.07.2012, at 17:37, Caraman Mihai Claudiu-B02008 wrote: -Original Message- From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc- ow...@vger.kernel.org] On Behalf Of Alexander Graf Sent: Wednesday, July 04, 2012 6:14 PM To: Caraman Mihai Claudiu-B02008 Cc:

Re: [PATCH 1/2] virtio-blk spec: document topology info

2012-07-04 Thread Michael S. Tsirkin
On Wed, Jul 04, 2012 at 03:22:36PM +0930, Rusty Russell wrote: On Tue, 3 Jul 2012 15:16:51 +0200, Paolo Bonzini pbonz...@redhat.com wrote: Current QEMU and Linux drivers can export queue parameters via the virtio-blk configuration space. Document this, since the next patch will have to

Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-04 Thread Paolo Bonzini
Il 04/07/2012 18:02, Michael S. Tsirkin ha scritto: On Wed, Jul 04, 2012 at 05:54:16PM +0200, Paolo Bonzini wrote: Il 04/07/2012 17:42, Michael S. Tsirkin ha scritto: On Tue, Jul 03, 2012 at 03:19:37PM +0200, Paolo Bonzini wrote: This patch adds support for the new VIRTIO_BLK_F_CONFIG_WCE

Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-04 Thread Sasha Levin
On Tue, 2012-07-03 at 15:19 +0200, Paolo Bonzini wrote: diff --git a/include/linux/virtio_blk.h b/include/linux/virtio_blk.h index e0edb40..18a1027 100644 --- a/include/linux/virtio_blk.h +++ b/include/linux/virtio_blk.h @@ -37,8 +37,9 @@ #define VIRTIO_BLK_F_RO5 /*

Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-04 Thread Paolo Bonzini
Il 04/07/2012 18:26, Sasha Levin ha scritto: On Tue, 2012-07-03 at 15:19 +0200, Paolo Bonzini wrote: diff --git a/include/linux/virtio_blk.h b/include/linux/virtio_blk.h index e0edb40..18a1027 100644 --- a/include/linux/virtio_blk.h +++ b/include/linux/virtio_blk.h @@ -37,8 +37,9 @@

RE: [Qemu-ppc] [RFC PATCH 12/17] PowerPC: booke64: Add DO_KVM kernel hooks

2012-07-04 Thread Caraman Mihai Claudiu-B02008
From: Alexander Graf [ag...@suse.de] Sent: Wednesday, July 04, 2012 6:45 PM To: Caraman Mihai Claudiu-B02008 Cc: kvm-...@vger.kernel.org; KVM list; linuxppc-dev; qemu-...@nongnu.org List; Benjamin Herrenschmidt Subject: Re: [Qemu-ppc] [RFC PATCH 12/17]

RE: [Qemu-ppc] [RFC PATCH 15/17] KVM: PPC64: bookehv: Add support for interrupt handling

2012-07-04 Thread Caraman Mihai Claudiu-B02008
On 04.07.2012, at 17:37, Caraman Mihai Claudiu-B02008 wrote: -Original Message- From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc- ow...@vger.kernel.org] On Behalf Of Alexander Graf Sent: Wednesday, July 04, 2012 6:14 PM To: Caraman Mihai Claudiu-B02008 Cc:

Re: QEMU- 1CPU for guest while more cores used on host?

2012-07-04 Thread Javier Guerra Giraldez
On Wed, Jul 4, 2012 at 2:44 PM, robert.kuc...@centrum.cz wrote: Thank you very much for your explanation, it makes sense :-) 2: why do you think course amd-v+KVM is impossible to be used ?? it does work very well Not for me, it is some old RedHat version that fails on boot under KVM, but

Re: [PATCH] kvm tool: Fix powerpc/kvm-cpu.c for new KVM_SET_ONE_REG API

2012-07-04 Thread Matt Evans
On 04/07/2012, at 2:39 PM, Michael Ellerman wrote: I think this code was based on an earlier version of the KVM_SET_ONE_REG API, which at the time was in agraf's tree but not mainline? Either way it doesn't compile as is, so fix it up. Bit late, but I concur, all the patches look just

Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-04 Thread Sasha Levin
On Wed, 2012-07-04 at 18:32 +0200, Paolo Bonzini wrote: Il 04/07/2012 18:26, Sasha Levin ha scritto: On Tue, 2012-07-03 at 15:19 +0200, Paolo Bonzini wrote: diff --git a/include/linux/virtio_blk.h b/include/linux/virtio_blk.h index e0edb40..18a1027 100644 --- a/include/linux/virtio_blk.h

Re: [PATCH] virtio-blk: allow toggling host cache between writeback and writethrough

2012-07-04 Thread Michael S. Tsirkin
On Wed, Jul 04, 2012 at 06:08:50PM +0200, Paolo Bonzini wrote: Il 04/07/2012 18:02, Michael S. Tsirkin ha scritto: On Wed, Jul 04, 2012 at 05:54:16PM +0200, Paolo Bonzini wrote: Il 04/07/2012 17:42, Michael S. Tsirkin ha scritto: On Tue, Jul 03, 2012 at 03:19:37PM +0200, Paolo Bonzini

Re: [PATCH 0/6] tcm_vhost/virtio-scsi WIP code for-3.6

2012-07-04 Thread Anthony Liguori
On 07/04/2012 10:05 AM, Michael S. Tsirkin wrote: On Wed, Jul 04, 2012 at 04:52:00PM +0200, Paolo Bonzini wrote: Il 04/07/2012 16:02, Michael S. Tsirkin ha scritto: On Wed, Jul 04, 2012 at 04:24:00AM +, Nicholas A. Bellinger wrote: From: Nicholas Bellingern...@linux-iscsi.org Hi folks,

Re: [Qemu-ppc] [RFC PATCH 09/17] KVM: PPC64: booke: Hard disable interrupts when entering guest

2012-07-04 Thread Benjamin Herrenschmidt
On Wed, 2012-07-04 at 16:14 +0200, Alexander Graf wrote: +#ifdef CONFIG_64BIT +#define _hard_irq_disable() hard_irq_disable() +#else +#define _hard_irq_disable() local_irq_disable() +#endif So you only swap out the disable bit, but not the enable one? Ben, would this work out?

Re: [Qemu-ppc] [RFC PATCH 12/17] PowerPC: booke64: Add DO_KVM kernel hooks

2012-07-04 Thread Benjamin Herrenschmidt
On Wed, 2012-07-04 at 16:29 +0200, Alexander Graf wrote: +#ifdef CONFIG_KVM_BOOKE_HV +#define KVM_BOOKE_HV_MFSPR(reg, spr) \ + BEGIN_FTR_SECTION \ + mfspr reg, spr; \ +

Re: race between kvm-kmod-3.0 and kvm-kmod-3.3 // was: race condition in qemu-kvm-1.0.1

2012-07-04 Thread Peter Lieven
On 07/03/12 15:13, Avi Kivity wrote: On 07/03/2012 04:01 PM, Peter Lieven wrote: Further output from my testing. Working: Linux 2.6.38 with included kvm module Linux 3.0.0 with included kvm module Not-Working: Linux 3.2.0 with included kvm module Linux 2.6.28 with kvm-kmod 3.4 Linux 3.0.0

Re: [PATCH 0/6] tcm_vhost/virtio-scsi WIP code for-3.6

2012-07-04 Thread Nicholas A. Bellinger
Hi Anthony Co, On Wed, 2012-07-04 at 17:12 -0500, Anthony Liguori wrote: On 07/04/2012 10:05 AM, Michael S. Tsirkin wrote: On Wed, Jul 04, 2012 at 04:52:00PM +0200, Paolo Bonzini wrote: Il 04/07/2012 16:02, Michael S. Tsirkin ha scritto: On Wed, Jul 04, 2012 at 04:24:00AM +, Nicholas

Re: [PATCH 0/6] tcm_vhost/virtio-scsi WIP code for-3.6

2012-07-04 Thread Nicholas A. Bellinger
On Wed, 2012-07-04 at 18:05 +0300, Michael S. Tsirkin wrote: On Wed, Jul 04, 2012 at 04:52:00PM +0200, Paolo Bonzini wrote: Il 04/07/2012 16:02, Michael S. Tsirkin ha scritto: On Wed, Jul 04, 2012 at 04:24:00AM +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger

Re: [PATCH 6/6] virtio-scsi: Set shost-max_id=1 for tcm_vhost WWPNs

2012-07-04 Thread Nicholas A. Bellinger
On Wed, 2012-07-04 at 16:50 +0200, Paolo Bonzini wrote: Il 04/07/2012 06:24, Nicholas A. Bellinger ha scritto: From: Nicholas Bellinger n...@linux-iscsi.org This is currently required for connecting to tcm_vhost in order to prevent the client LUN scan from detecting the same tcm_vhost

[PATCH] cpu: smp_wmb before lauching cpus.

2012-07-04 Thread Liu Ping Fan
Vcpu state must be set completely before receiving INIT-IPI,SIPI Signed-off-by: Liu Ping Fan pingf...@linux.vnet.ibm.com --- kvm.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/kvm.h b/kvm.h index 9c7b0ea..5b3c228 100644 --- a/kvm.h +++ b/kvm.h @@ -198,6 +198,7 @@

[GIT PULL] KVM fixes for 3.5-rc5

2012-07-04 Thread Marcelo Tosatti
Linus, Please pull from git://git.kernel.org/pub/scm/virt/kvm/kvm.git master To receive the following KVM fixes: memory leak and oops on the x86 mmu code, and sanitization of the KVM_IRQFD ioctl. Alex Williamson (3): KVM: Pass kvm_irqfd to functions KVM: Add missing KVM_IRQFD

Re: race condition in qemu-kvm-1.0.1

2012-07-04 Thread Marcelo Tosatti
On Wed, Jul 04, 2012 at 12:03:58PM +0200, Peter Lieven wrote: On 07/03/12 17:54, Marcelo Tosatti wrote: On Wed, Jun 27, 2012 at 12:35:22PM +0200, Peter Lieven wrote: Hi, we recently came across multiple VMs racing and stopping working. It seems to happen when the system is at 100% cpu. One

Re: [PATCH v2 3/7] KVM: Add paravirt kvm_flush_tlb_others

2012-07-04 Thread Marcelo Tosatti
On Tue, Jul 03, 2012 at 01:49:49PM +0530, Nikunj A Dadhania wrote: On Tue, 3 Jul 2012 04:55:35 -0300, Marcelo Tosatti mtosa...@redhat.com wrote: if (!zero_mask) goto again; Can you please measure increased vmentry/vmexit overhead? x86/vmexit.c of

Re: [PATCH v2 5/7] KVM: Introduce PV kick in flush tlb

2012-07-04 Thread Marcelo Tosatti
On Tue, Jul 03, 2012 at 01:55:02PM +0530, Nikunj A Dadhania wrote: On Tue, 3 Jul 2012 05:07:13 -0300, Marcelo Tosatti mtosa...@redhat.com wrote: On Mon, Jun 04, 2012 at 10:38:17AM +0530, Nikunj A. Dadhania wrote: In place of looping continuously introduce a halt if we do not succeed

[PATCH] tcm_vhost: Fix tv_cmd completion - release SGL memory leak

2012-07-04 Thread Nicholas A. Bellinger
From: Nicholas Bellinger n...@linux-iscsi.org The SGL memory allocated during vhost_scsi_map_iov_to_sgl() setup was never getting freed during tv_cmd completion - release path. Fix this up by releasing tv_cmd-tvc_sgl in vhost_scsi_free_cmd() ahead of tv_cmd descriptor free. Cc: Stefan Hajnoczi

Re: [PATCH v3 2/2] kvm: KVM_EOIFD, an eventfd for EOIs

2012-07-04 Thread Alex Williamson
On Wed, 2012-07-04 at 17:00 +0300, Michael S. Tsirkin wrote: On Tue, Jul 03, 2012 at 01:21:29PM -0600, Alex Williamson wrote: This new ioctl enables an eventfd to be triggered when an EOI is written for a specified irqchip pin. By default this is a simple notification, but we can also tie

Re: [PATCH] tcm_vhost: Fix tv_cmd completion - release SGL memory leak

2012-07-04 Thread Zhi Yong Wu
On Thu, 2012-07-05 at 04:14 +, Nicholas A. Bellinger wrote: From: Nicholas Bellinger n...@linux-iscsi.org The SGL memory allocated during vhost_scsi_map_iov_to_sgl() setup was never getting freed during tv_cmd completion - release path. Fix this up by releasing tv_cmd-tvc_sgl in

Re: [PATCH v2 3/7] KVM: Add paravirt kvm_flush_tlb_others

2012-07-04 Thread Nikunj A Dadhania
On Wed, 4 Jul 2012 23:09:10 -0300, Marcelo Tosatti mtosa...@redhat.com wrote: On Tue, Jul 03, 2012 at 01:49:49PM +0530, Nikunj A Dadhania wrote: On Tue, 3 Jul 2012 04:55:35 -0300, Marcelo Tosatti mtosa...@redhat.com wrote: if (!zero_mask) goto again; Can you

Re: Unexpected data TLB miss happens when guest OS executing a bl instruction

2012-07-04 Thread tiejun.chen
On 07/03/2012 09:44 PM, Fei K Chen wrote: On Jul 2, 2012, at 10:34 AM, Fei K Chen wrote: We are debuging kvm on IBM poweren chip by RSICWatch tool. So for those of you who don't know, the RISCWatch tool (RW) is a JTAG based HW probe debugger. An unexpected data TLB miss happened and we

RE: [PATCH 3/4] Watchdog exit handling support

2012-07-04 Thread Bhushan Bharat-R65777
-Original Message- From: Wood Scott-B07421 Sent: Friday, June 29, 2012 3:57 AM To: Bhushan Bharat-R65777 Cc: qemu-...@nongnu.org; kvm-ppc@vger.kernel.org; ag...@suse.de; Bhushan Bharat- R65777 Subject: Re: [PATCH 3/4] Watchdog exit handling support On 06/28/2012 12:39 AM,

Re: [RFC PATCH 02/17] KVM: PPC64: booke: Add EPCR support in mtspr/mfspr emulation

2012-07-04 Thread Alexander Graf
On 25.06.2012, at 14:26, Mihai Caraman wrote: Add EPCR support in booke mtspr/mfspr emulation. EPCR register is defined only for 64-bit and HV categories, so it shoud be available only on 64-bit virtual processors. Undefine the support for 32-bit builds. Define a reusable setter function for

Re: [RFC PATCH 01/17] KVM: PPC64: booke: Set interrupt computation mode for 64-bit host

2012-07-04 Thread Alexander Graf
On 25.06.2012, at 14:26, Mihai Caraman wrote: 64-bit host needs to remain in 64-bit mode when an exception take place. Set interrupt computaion mode in EPCR register. Signed-off-by: Mihai Caraman mihai.cara...@freescale.com Thanks, applied to kvm-ppc-next. Alex -- To unsubscribe from

Re: [Qemu-ppc] [RFC PATCH 03/17] KVM: PPC64: booke: Add EPCR support in sregs

2012-07-04 Thread Alexander Graf
On 25.06.2012, at 14:26, Mihai Caraman wrote: Add KVM_SREGS_E_64 feature and EPCR spr support in get/set sregs for 64-bit hosts. Please also implement a ONE_REG interface while at it. Over time, I'd like to move towards ONE_REG instead of the messy regs/sregs API. Alex -- To unsubscribe

Re: [Qemu-ppc] [RFC PATCH 04/17] KVM: PPC64: booke: Add guest computation mode for irq delivery

2012-07-04 Thread Alexander Graf
On 25.06.2012, at 14:26, Mihai Caraman wrote: When delivering guest IRQs, update MSR computaion computation mode according to guest interrupt computation mode found in EPCR. Signed-off-by: Mihai Caraman mihai.cara...@freescale.com --- arch/powerpc/kvm/booke.c |8 +++- 1 files

Re: [Qemu-ppc] [RFC PATCH 05/17] KVM: PPC: booke: Extend MAS2 EPN mask for 64-bit

2012-07-04 Thread Alexander Graf
On 25.06.2012, at 14:26, Mihai Caraman wrote: Extend MAS2 EPN mask for 64-bit hosts, to retain most significant bits. Change get tlb eaddr to use this mask. Please see section 6.11.4.8 in the PowerISA 2.06b: MMU behavior is largely unaffected by whether the thread is in 32-bit computation

Re: [RFC PATCH 06/17] KVM: PPC: e500: Add emulation helper for getting instruction ea

2012-07-04 Thread Alexander Graf
On 25.06.2012, at 14:26, Mihai Caraman wrote: Add emulation helper for getting instruction ea and refactor tlb instruction emulation to use it. Signed-off-by: Mihai Caraman mihai.cara...@freescale.com --- arch/powerpc/kvm/e500.h |6 +++--- arch/powerpc/kvm/e500_emulate.c |

Re: [Qemu-ppc] [RFC PATCH 07/17] KVM: PPC: e500: Mask ea's high 32-bits in 32/64 instr emulation

2012-07-04 Thread Alexander Graf
On 25.06.2012, at 14:26, Mihai Caraman wrote: Mask high 32 bits of effective address in emulation layer, for guests running in 32-bit mode. MAS2's high-order 32 bits represents the upper 32 bits of the effective address of the page. Mask it too for tlbwe instruction emulation. Ah, there

Re: [Qemu-ppc] [RFC PATCH 07/17] KVM: PPC: e500: Mask ea's high 32-bits in 32/64 instr emulation

2012-07-04 Thread Alexander Graf
On 04.07.2012, at 16:00, Alexander Graf wrote: On 25.06.2012, at 14:26, Mihai Caraman wrote: Mask high 32 bits of effective address in emulation layer, for guests running in 32-bit mode. MAS2's high-order 32 bits represents the upper 32 bits of the effective address of the page. Mask

  1   2   >