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

2012-07-03 Thread Rusty Russell
On Tue, 3 Jul 2012 15:19:37 +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 th

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

2012-07-03 Thread Rusty Russell
On Tue, 3 Jul 2012 15:19:37 +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 th

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

2012-07-03 Thread Rusty Russell
On Tue, 3 Jul 2012 15:16:51 +0200, Paolo Bonzini 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 Bonzini Appli

pci device assignment and mm, KSM.

2012-07-03 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 K

Re: [PATCH 1/6] vhost: Separate vhost-net features from vhost features

2012-07-03 Thread Asias He
On 07/04/2012 12:24 PM, Nicholas A. Bellinger wrote: From: Stefan Hajnoczi In order for other vhost devices to use the VHOST_FEATURES bits the vhost-net specific bits need to be moved to their own VHOST_NET_FEATURES constant. Signed-off-by: Stefan Hajnoczi Cc: Zhi Yong Wu Cc: Michael S. Tsir

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

2012-07-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger 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. Cc: Paolo Bonzini Cc: Stefan Hajnoczi Cc: Zhi Yong Wu Cc: Christoph Hellwig Cc: Hannes Reinecke Signed-off-b

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

2012-07-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger 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, VIRTIO_CONFIG_S_DRIVER_OK) to signal active virtio-ring operation, instead of from within virtscsi_p

[PATCH 4/6] tcm_vhost: Initial merge for vhost level target fabric driver

2012-07-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds the initial code for tcm_vhost, a Vhost level TCM fabric driver for virtio SCSI initiators into KVM guest. This code is currently up and running on v3.5-rc2 host+guest along with the virtio-scsi vdev->scan() patch to allow a proper scsi_scan_host() to occ

[PATCH 2/6] vhost: make vhost work queue visible

2012-07-03 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi The vhost work queue allows processing to be done in vhost worker thread context, which uses the owner process mm. Access to the vring and guest memory is typically only possible from vhost worker context so it is useful to allow work to be queued directly by users. Curren

[PATCH 3/6] vhost: Add vhost_scsi specific defines

2012-07-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger This patch adds the initial vhost_scsi_ioctl() callers for VHOST_SCSI_SET_ENDPOINT and VHOST_SCSI_CLEAR_ENDPOINT respectively, and also adds struct vhost_vring_target that is used by tcm_vhost code when locating target ports during qemu setup. Signed-off-by: Stefan Haj

[PATCH 1/6] vhost: Separate vhost-net features from vhost features

2012-07-03 Thread Nicholas A. Bellinger
From: Stefan Hajnoczi In order for other vhost devices to use the VHOST_FEATURES bits the vhost-net specific bits need to be moved to their own VHOST_NET_FEATURES constant. Signed-off-by: Stefan Hajnoczi Cc: Zhi Yong Wu Cc: Michael S. Tsirkin Cc: Paolo Bonzini Signed-off-by: Nicholas A. Bell

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

2012-07-03 Thread Nicholas A. Bellinger
From: Nicholas Bellinger 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 top of target-pending/auto-next here: git://git.kernel.org/pub/scm/linux/kernel/git/nab/targe

Re: [PATCH RFC] virtio-balloon: fix add/get API use

2012-07-03 Thread Rusty Russell
On Mon, 2 Jul 2012 10:33:08 +0300, "Michael S. Tsirkin" wrote: > In virtio balloon virtqueue_get_buf might now run concurrently with > virtqueue_kick. I audited both and this seems safe in practice but > this is not guaranteed by the API. > Additionally, a spurious interrupt might in theory make

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

2012-07-03 Thread Rusty Russell
On Tue, 03 Jul 2012 08:39:39 +0800, Asias He wrote: > On 07/02/2012 02:41 PM, Rusty Russell wrote: > > Sure, our guest merging might save us 100x as many exits as no merging. > > But since we're not doing many requests, does it matter? > > We can still have many requests with slow devices. The nu

Re: [RFC PATCH] Expose tsc deadline timer feature to guest

2012-07-03 Thread Marcelo Tosatti
On Mon, Jul 02, 2012 at 11:08:14AM +, Liu, Jinsong wrote: > Eduardo, Jan, Andreas > > As we sync 3 months ago, I wait until qemu1.1 done, then re-write patch based > on qemu1.1. > Now it's time to re-write my patch based on qemu1.1. > > Attached is a RFC patch for exposing tsc deadline timer

Re: [PATCH 3/3] KVM: MMU: track the refcount when unmap the page

2012-07-03 Thread Marcelo Tosatti
On Tue, Jul 03, 2012 at 02:32:14PM +0800, Xiao Guangrong wrote: > It will trigger a WARN_ON if the page has been freed but it is still > used in mmu, it can help us to detect mm bug early > > Signed-off-by: Xiao Guangrong > --- > arch/x86/kvm/mmu.c |8 > 1 files changed, 8 insertion

Re: [PATCHv2 kvm] kvm_pv_eoi: add flag support

2012-07-03 Thread Marcelo Tosatti
On Sun, Jul 01, 2012 at 06:08:30PM +0300, Michael S. Tsirkin wrote: > Support the new PV EOI flag in kvm - it recently got merged > into kvm.git. Set by default with -cpu kvm. > Set for -cpu qemu by adding +kvm_pv_eoi. > Clear by adding -kvm_pv_eoi to -cpu option. > > Signed-off-by: Michael S. Tsi

Re: [PATCH v9 04/16] KVM: Move KVM_IRQ_LINE to arch-generic code

2012-07-03 Thread Marcelo Tosatti
On Tue, Jul 03, 2012 at 04:59:54AM -0400, Christoffer Dall wrote: > Handle KVM_IRQ_LINE and KVM_IRQ_LINE_STATUS in the generic > kvm_vm_ioctl() function and call into kvm_vm_ioctl_irq_line(). > > Signed-off-by: Christoffer Dall > --- > arch/ia64/kvm/kvm-ia64.c | 33 ++--

Re: [PATCH v9 00/16] KVM/ARM Implementation

2012-07-03 Thread Marcelo Tosatti
On Tue, Jul 03, 2012 at 04:29:27PM +0300, Avi Kivity wrote: > On 07/03/2012 11:59 AM, Christoffer Dall wrote: > > 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 Ope

Re: [PATCH v12 0/8] KVM: PPC: Add ePAPR idle hcall support

2012-07-03 Thread Alexander Graf
On 03.07.2012, at 17:48, Stuart Yoder wrote: > From: Stuart Yoder > > v12 has a couple of updates to address feedback > -use new CURRENT_THREAD_INFO macro in epapr_hcalls.S > -use EV_HCALL_TOKEN to create epapr hcall token > > A prerequisite to applying this patch is the patch: > PPC: us

RE: [PATCH v12 4/8] KVM: PPC: Add support for ePAPR idle hcall in host kernel

2012-07-03 Thread Yoder Stuart-B08248
> -Original Message- > From: Alexander Graf [mailto:ag...@suse.de] > Sent: Tuesday, July 03, 2012 2:34 PM > To: Yoder Stuart-B08248 > Cc: kvm-...@vger.kernel.org; kvm@vger.kernel.org > Subject: Re: [PATCH v12 4/8] KVM: PPC: Add support for ePAPR idle hcall in > host kernel > > > On 03.

Re: [PATCH v12 4/8] KVM: PPC: Add support for ePAPR idle hcall in host kernel

2012-07-03 Thread Alexander Graf
On 03.07.2012, at 17:48, Stuart Yoder wrote: > From: Liu Yu-B13201 > > And add a new flag definition in kvm_ppc_pvinfo to indicate > whether the host supports the EV_IDLE hcall. > > Signed-off-by: Liu Yu > [stuart.yo...@freescale.com: cleanup,fixes for conditions allowing idle] > Signed-off-b

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

2012-07-03 Thread Alex Williamson
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 automatically de-asserted on EOI. This mode is particularly useful for

[PATCH v3 1/2] kvm: Extend irqfd to support level interrupts

2012-07-03 Thread Alex Williamson
In order to inject a level interrupt from an external source using an irqfd, we need to allocate a new irq_source_id. This allows us to assert and (later) de-assert an interrupt line independently from users of KVM_IRQ_LINE and avoid lost interrupts. We also add what may appear like a bit of exce

[PATCH v3 0/2] kvm: level irqfd and new eoifd

2012-07-03 Thread Alex Williamson
Here's the latest iteration of adding an interface to assert and de-assert level interrupts from external drivers like vfio. These apply on top of the previous argument cleanup, documentation, and sanitization patches for irqfd. It would be great to get this queued in next for linux 3.6. I belie

Re: [PATCH 2/6] file_ram_alloc(): use g_strdup_printf() instead of asprintf()

2012-07-03 Thread Blue Swirl
On Mon, Jul 2, 2012 at 6:06 PM, Eduardo Habkost wrote: > Cc: Blue Swirl > Signed-off-by: Eduardo Habkost Acked-by: Blue Swirl > --- > exec.c | 14 +++--- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/exec.c b/exec.c > index c8bfd27..d856325 100644 > --- a/exec.

Re: [PATCH 1/6] file_ram_alloc(): coding style fixes

2012-07-03 Thread Blue Swirl
On Mon, Jul 2, 2012 at 6:06 PM, Eduardo Habkost wrote: > Cc: Blue Swirl > Signed-off-by: Eduardo Habkost Acked-by: Blue Swirl > --- > exec.c |5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/exec.c b/exec.c > index 8244d54..c8bfd27 100644 > --- a/exec.c > +++ b

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

2012-07-03 Thread Blue Swirl
On Mon, Jul 2, 2012 at 9:43 AM, 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 an

Re: [PATCH] apic: fix kvm build on UP without IOAPIC

2012-07-03 Thread Marcelo Tosatti
On Sun, Jul 01, 2012 at 06:05:06PM +0300, Michael S. Tsirkin wrote: > On UP i386, when APIC is disabled > # CONFIG_X86_UP_APIC is not set > # CONFIG_PCI_IOAPIC is not set > > code looking at apicdrivers never has any effect but it > still gets compiled in. In particular, this causes > build failur

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

2012-07-03 Thread Marcelo Tosatti
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 allows us to reuse > kvm_cpuid() in a context wher

Re: race condition in qemu-kvm-1.0.1

2012-07-03 Thread Marcelo Tosatti
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 > > cmdline (or similar): > /usr/

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

2012-07-03 Thread Rafael Aquini
On Tue, Jul 03, 2012 at 10:17:46AM +0930, Rusty Russell wrote: > On Mon, 2 Jul 2012 13:08:19 -0300, Rafael Aquini 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 > > hesitate

Re: [Android-virt] [PATCH v9 16/16] ARM: KVM: Guest wait-for-interrupts (WFI) support

2012-07-03 Thread Avi Kivity
On 07/03/2012 04:49 PM, Peter Maydell wrote: > On 3 July 2012 14:24, Avi Kivity wrote: >> On 07/03/2012 04:14 PM, Peter Maydell wrote: >>> You could just always wake the cpu when migrating: the >>> architecture allows WFI to return early for any reason >>> it likes including implementation conveni

[PATCH v12 6/8] PPC: select EPAPR_PARAVIRT for all users of epapr hcalls

2012-07-03 Thread Stuart Yoder
From: Stuart Yoder Signed-off-by: Stuart Yoder --- v12: no changes arch/powerpc/platforms/Kconfig |1 + drivers/tty/Kconfig|1 + drivers/virt/Kconfig |1 + 3 files changed, 3 insertions(+), 0 deletions(-) diff --git a/arch/powerpc/platforms/Kconfig b/arch/pow

[PATCH v12 3/8] KVM: PPC: add pvinfo for hcall opcodes on e500mc/e5500

2012-07-03 Thread Stuart Yoder
From: Stuart Yoder Signed-off-by: Liu Yu [stuart: factored this out from idle hcall support in host patch] Signed-off-by: Stuart Yoder --- v12: no changes arch/powerpc/kvm/powerpc.c | 10 +- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/kvm/powerpc.c b/

[PATCH v12 4/8] KVM: PPC: Add support for ePAPR idle hcall in host kernel

2012-07-03 Thread Stuart Yoder
From: Liu Yu-B13201 And add a new flag definition in kvm_ppc_pvinfo to indicate whether the host supports the EV_IDLE hcall. Signed-off-by: Liu Yu [stuart.yo...@freescale.com: cleanup,fixes for conditions allowing idle] Signed-off-by: Stuart Yoder --- v12: use EV_HCALL_TOKEN macro Documentat

[PATCH v12 2/8] KVM: PPC: use definitions in epapr header for hcalls

2012-07-03 Thread Stuart Yoder
From: Stuart Yoder Signed-off-by: Stuart Yoder --- v12: no changes arch/powerpc/include/asm/kvm_para.h | 21 +++-- arch/powerpc/kernel/kvm.c |2 +- arch/powerpc/kvm/powerpc.c | 10 +- 3 files changed, 17 insertions(+), 16 deletions(-) diff --

[PATCH v12 5/8] KVM: PPC: ev_idle hcall support for e500 guests

2012-07-03 Thread Stuart Yoder
From: Liu Yu-B13201 Signed-off-by: Liu Yu [varun: 64-bit changes] Signed-off-by: Varun Sethi Signed-off-by: Stuart Yoder --- v12: use new CURRENT_THREAD_INFO macro arch/powerpc/include/asm/epapr_hcalls.h | 11 ++- arch/powerpc/kernel/epapr_hcalls.S | 28 +

[PATCH v12 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation

2012-07-03 Thread Stuart Yoder
From: Liu Yu-B13201 Signed-off-by: Liu Yu Signed-off-by: Stuart Yoder --- v12: no changes arch/powerpc/include/asm/epapr_hcalls.h | 22 +- arch/powerpc/include/asm/fsl_hcalls.h | 36 +++--- 2 files changed, 29 insertions(+), 29 deletions(-) diff

[PATCH v12 1/8] PPC: epapr: create define for return code value of success

2012-07-03 Thread Stuart Yoder
From: Stuart Yoder Signed-off-by: Stuart Yoder --- v12: no changes arch/powerpc/include/asm/epapr_hcalls.h |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/arch/powerpc/include/asm/epapr_hcalls.h b/arch/powerpc/include/asm/epapr_hcalls.h index bf2c06c..c0c7adc 100644

[PATCH v12 7/8] powerpc/fsl-soc: use CONFIG_EPAPR_PARAVIRT for hcalls

2012-07-03 Thread Stuart Yoder
From: Scott Wood Signed-off-by: Scott Wood Signed-off-by: Stuart Yoder --- v12: no changes arch/powerpc/sysdev/fsl_msi.c |9 +++-- arch/powerpc/sysdev/fsl_soc.c |2 ++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/arch/powerpc/sysdev/fsl_msi.c b/arch/powerpc/sysde

[PATCH v12 0/8] KVM: PPC: Add ePAPR idle hcall support

2012-07-03 Thread Stuart Yoder
From: Stuart Yoder v12 has a couple of updates to address feedback -use new CURRENT_THREAD_INFO macro in epapr_hcalls.S -use EV_HCALL_TOKEN to create epapr hcall token A prerequisite to applying this patch is the patch: PPC: use CURRENT_THREAD_INFO instead of open coded assembly Liu Yu

RE: [PATCH v11 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall invocation

2012-07-03 Thread Yoder Stuart-B08248
> -Original Message- > From: Wood Scott-B07421 > Sent: Monday, July 02, 2012 12:25 PM > To: Alexander Graf > Cc: Yoder Stuart-B08248; kvm-...@vger.kernel.org; kvm@vger.kernel.org; Tabi > Timur-B04825 > Subject: Re: [PATCH v11 8/8] PPC: Don't use hardcoded opcode for ePAPR hcall > invoca

Re: [PATCH v7 00/10] KVM: MMU: fast page fault

2012-07-03 Thread Marcelo Tosatti
On Wed, Jun 20, 2012 at 03:56:29PM +0800, Xiao Guangrong wrote: > Changlog: > - always atomicly update the spte if it can be updated out of mmu-lock > - rename spte_can_be_writable() to spte_is_locklessly_modifiable() > - cleanup and comment spte_write_protect() > > Performance result: > (The benc

RE: [PATCH v11 4/8] KVM: PPC: Add support for ePAPR idle hcall in host kernel

2012-07-03 Thread Yoder Stuart-B08248
> -Original Message- > From: kvm-ppc-ow...@vger.kernel.org [mailto:kvm-ppc-ow...@vger.kernel.org] On > Behalf Of Alexander Graf > Sent: Monday, July 02, 2012 7:18 AM > To: Yoder Stuart-B08248 > Cc: kvm-...@vger.kernel.org; kvm@vger.kernel.org > Subject: Re: [PATCH v11 4/8] KVM: PPC: Add

Re: [ANNOUNCE] qemu-kvm-1.1.0

2012-07-03 Thread Marcelo Tosatti
On Tue, Jul 03, 2012 at 12:13:19PM +0400, Michael Tokarev wrote: > On 03.07.2012 03:32, Marcelo Tosatti wrote: > > > > qemu-kvm-1.1.0 is now available. This release is based on the upstream > > qemu 1.1.0, plus kvm-specific enhancements. Please see the > > original QEMU 1.1.0 release announcement

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

2012-07-03 Thread Dor Laor
On 07/03/2012 05:22 PM, Ronen Hod wrote: On 06/18/2012 02:14 PM, Dor Laor wrote: On 06/18/2012 01:05 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 16:03:23 +0800, Asias He wrote: On 06/18/2012 03:46 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 14:53:10 +0800, Asias He wrote: This patch intr

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

2012-07-03 Thread Ronen Hod
On 06/18/2012 02:14 PM, Dor Laor wrote: On 06/18/2012 01:05 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 16:03:23 +0800, Asias He wrote: On 06/18/2012 03:46 PM, Rusty Russell wrote: On Mon, 18 Jun 2012 14:53:10 +0800, Asias He wrote: This patch introduces bio-based IO path for virtio-blk.

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

2012-07-03 Thread Asias He
On 07/03/2012 09:31 PM, Paolo Bonzini wrote: Il 02/07/2012 08:41, Rusty Russell ha scritto: With the same workload in guest, the guest fires 200K requests to host with merges enabled in guest (echo 0 > /sys/block/vdb/queue/nomerges), while the guest fires 4K requests to host with merges disa

Re: [PATCH 1/2] virtio-blk: support VIRTIO_BLK_F_CONFIG_WCE

2012-07-03 Thread Paolo Bonzini
Il 03/07/2012 15:46, Kevin Wolf ha scritto: >> > Introduce a new feature bit and configuration field that provide >> > support for toggling the cache mode between writethrough and writeback. >> > >> > Also rename VIRTIO_BLK_F_WCACHE to VIRTIO_BLK_F_WCE for consistency with >> > the spec. > My spec

Re: [Android-virt] [PATCH v9 00/16] KVM/ARM Implementation

2012-07-03 Thread Peter Maydell
On 3 July 2012 14:29, Avi Kivity wrote: > On 07/03/2012 11:59 AM, Christoffer Dall wrote: >> Additionally a few major milestones are coming up shortly: >> - Support Thumb MMIO emulation and test MMIO emulation code (under way) >> - Merge Marc Zyngier's patch series for VGIC and timers (review in

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

2012-07-03 Thread 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 a writeback >> > cache. >> > >> >

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

2012-07-03 Thread Kevin Wolf
Am 03.07.2012 15:20, schrieb Paolo Bonzini: > 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 a writeback > cache. > > VIRTIO_BLK_F_FLU

Re: [Android-virt] [PATCH v9 16/16] ARM: KVM: Guest wait-for-interrupts (WFI) support

2012-07-03 Thread Peter Maydell
On 3 July 2012 14:24, Avi Kivity wrote: > On 07/03/2012 04:14 PM, Peter Maydell wrote: >> You could just always wake the cpu when migrating: the >> architecture allows WFI to return early for any reason >> it likes including implementation convenience. > > Seems reasonable. > > I imagine wfi works

Re: [PATCH 1/2] virtio-blk: support VIRTIO_BLK_F_CONFIG_WCE

2012-07-03 Thread Kevin Wolf
Am 03.07.2012 15:20, schrieb Paolo Bonzini: > Introduce a new feature bit and configuration field that provide > support for toggling the cache mode between writethrough and writeback. > > Also rename VIRTIO_BLK_F_WCACHE to VIRTIO_BLK_F_WCE for consistency with > the spec. My spec (and my kernel

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

2012-07-03 Thread Paolo Bonzini
Il 02/07/2012 08:41, Rusty Russell ha scritto: >> With the same workload in guest, the guest fires 200K requests to host >> with merges enabled in guest (echo 0 > /sys/block/vdb/queue/nomerges), >> while the guest fires 4K requests to host with merges disabled in >> guest (echo 2 > /sys/bloc

Re: [PATCH v9 00/16] KVM/ARM Implementation

2012-07-03 Thread Avi Kivity
On 07/03/2012 11:59 AM, Christoffer Dall wrote: > 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/nex

Re: [PATCH stable-1.1] qemu-kvm: Add missing default machine options

2012-07-03 Thread Marcelo Tosatti
On Mon, Jul 02, 2012 at 09:34:46AM +0200, Jan Kiszka wrote: > qemu-kvm-specific machine defaults were missing for pc-0.15 and pc-1.0. > > Signed-off-by: Jan Kiszka > --- > hw/pc_piix.c |2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) Applied both stable patches, thanks. -- To unsu

Re: UIP flag not cleared

2012-07-03 Thread Paolo Bonzini
Il 15/06/2012 17:38, nicolas.oc...@free.fr ha scritto: > Hi list, > > > I am having troubles porting my os to qemu/kvm environment. It's > about the RTC (real-time clock) > > There is a flag (UIP flag) which is supposed to show when RTC can be > read or not. > > We wait 10ms for that flag to be

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

2012-07-03 Thread Avi Kivity
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 >>> >>> Not-Working: >>> Linux

Re: [Android-virt] [PATCH v9 16/16] ARM: KVM: Guest wait-for-interrupts (WFI) support

2012-07-03 Thread Avi Kivity
On 07/03/2012 04:14 PM, Peter Maydell wrote: > On 3 July 2012 14:10, Avi Kivity wrote: >> Or you could just call kvm_vcpu_block() here without having the >> variable. But eventually you'll need it since you want to expose wfi >> state to userspace for live migration. > > You could just always wa

[PATCH 1/2] virtio-blk: support VIRTIO_BLK_F_CONFIG_WCE

2012-07-03 Thread Paolo Bonzini
Introduce a new feature bit and configuration field that provide support for toggling the cache mode between writethrough and writeback. Also rename VIRTIO_BLK_F_WCACHE to VIRTIO_BLK_F_WCE for consistency with the spec. Signed-off-by: Paolo Bonzini --- hw/virtio-blk.c | 16 ++-- h

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

2012-07-03 Thread Paolo Bonzini
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 a writeback cache. VIRTIO_BLK_F_FLUSH has been introduced in Linux 2.6.32 (in 2009) and was

[QEMU PATCH 0/2] virtio-blk: writeback cache enable improvements

2012-07-03 Thread Paolo Bonzini
These patches let virtio-blk use the new support for toggling the cache mode between writethrough and writeback. The first patch introduces a new feature bit and configuration field to do this. The second patch disables writeback caching for guests that do not negotiate VIRTIO_BLK_F_WCACHE (meani

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

2012-07-03 Thread Paolo Bonzini
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 the new feature, the cache mode is visible (thanks to the existing VIR

[PATCH 2/2] virtio-blk spec: writeback cache enable improvements

2012-07-03 Thread Paolo Bonzini
This patch introduces two improvements to writeback cache handling in the virtio-blk spec. 1) The VIRTIO_BLK_F_FLUSH feature is renamed to VIRTIO_BLK_F_WCE, and QEMU's behavior is documented explicitly as part of the spec: the host negotiates the feature only if its cache is writeback. The obviou

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

2012-07-03 Thread Paolo Bonzini
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 Bonzini --- virtio-spec.lyx | 85 ++

[PATCH 0/2] virtio-blk spec: document topology info, add WCE toggle

2012-07-03 Thread Paolo Bonzini
Hi Rusty, here are two improvements to the virtio-blk spec. The first documents the status quo of an extension that has already been supported in QEMU for several releases, but never made it to the official spec. The second adds support for toggling the cache mode between writethrough and writeba

Re: [Qemu-devel] KVM call agenda for Tuesday, July 3rd

2012-07-03 Thread Corey Bryant
On 07/03/2012 08:33 AM, Kevin Wolf wrote: Am 02.07.2012 19:33, schrieb Eric Blake: On 07/02/2012 04:16 AM, Juan Quintela wrote: Hi Please send in any agenda items you are interested in covering. Can we discuss the future of 'getfd', the possibility of 'pass-fd', or even the enhancement of

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

2012-07-03 Thread Peter Lieven
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 Not-Working: Linux 3.2.0 with included kvm module Linux 2.6.28 with kvm-kmod 3.4 Linux 3.0.0 wi

Re: [Android-virt] [PATCH v9 16/16] ARM: KVM: Guest wait-for-interrupts (WFI) support

2012-07-03 Thread Peter Maydell
On 3 July 2012 14:10, Avi Kivity wrote: > Or you could just call kvm_vcpu_block() here without having the > variable. But eventually you'll need it since you want to expose wfi > state to userspace for live migration. You could just always wake the cpu when migrating: the architecture allows WFI

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

2012-07-03 Thread Avi Kivity
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 with kvm-kmod 3.4 > Linu

Re: [PATCH v9 16/16] ARM: KVM: Guest wait-for-interrupts (WFI) support

2012-07-03 Thread Avi Kivity
On 07/03/2012 12:02 PM, Christoffer Dall wrote: > From: Christoffer Dall > > 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 > ha

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

2012-07-03 Thread Peter Lieven
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 with kvm-kmod 3.4 Linux 3.2.0 with kvm-kmod 3.4 I can trigger the race with any of qem

Re: [Qemu-devel] KVM call agenda for Tuesday, July 3rd

2012-07-03 Thread Kevin Wolf
Am 02.07.2012 19:33, schrieb Eric Blake: > On 07/02/2012 04:16 AM, Juan Quintela wrote: >> >> Hi >> >> Please send in any agenda items you are interested in covering. > > Can we discuss the future of 'getfd', the possibility of 'pass-fd', or > even the enhancement of all existing monitor commands

Re: A question about how kvm switch context to guest

2012-07-03 Thread Avi Kivity
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 switch > context to a guest? Kvm don't used "vmlaunch" or "vmresume" to launch or > resume a guest? You trimmed the bit that contains vmlaunch/vmresume. Why does

KVM call minutes June 29

2012-07-03 Thread Juan Quintela
Isaku reminds me that I forgot to pust that minutes: 2012-06-19 -- - migration * xbrle: ok * huge memory: needs migration-thread, but should be ok * postcopy: ask for latency: maximum/avg/std deviation ask for vcpu utilization RDMA? * xbrle don't fix all

Re: [PATCH v9 12/16] ARM: KVM: World-switch implementation

2012-07-03 Thread Avi Kivity
On 07/03/2012 12:01 PM, Christoffer Dall wrote: > 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. > > T

A question about how kvm switch context to guest

2012-07-03 Thread Zhengwang Ruan
Hi kashyapc & all, I see a piece of code in vmx_vcpu_run as below, is it used to switch context to a guest? Kvm don't used "vmlaunch" or "vmresume" to launch or resume a guest? Why does kvm need to manually switch context by filling registers using stored register copies? === a

Re: [PATCH v3 4/5] Sysfs: Export VMCSINFO via sysfs

2012-07-03 Thread Yanfei Zhang
于 2012年06月29日 10:58, Greg KH 写道: > On Thu, Jun 28, 2012 at 04:37:38AM -0700, Greg KH wrote: >> On Thu, Jun 28, 2012 at 05:54:30PM +0800, Yanfei Zhang wrote: >>> 于 2012年06月28日 03:22, Greg KH 写道: On Wed, Jun 27, 2012 at 04:54:54PM +0800, Yanfei Zhang wrote: > This patch export offsets of fie

Re: [RFC PATCH 0/6] option to not remove files inside -mem-path dir (v2)

2012-07-03 Thread Daniel P. Berrange
On Mon, Jul 02, 2012 at 04:54:03PM -0300, Eduardo Habkost wrote: > On Mon, Jul 02, 2012 at 07:56:58PM +0100, Daniel P. Berrange wrote: > > On Mon, Jul 02, 2012 at 03:06:32PM -0300, Eduardo Habkost wrote: > > > Resending series, after fixing some coding style issues. Does anybody has > > > any > >

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

2012-07-03 Thread Christoffer Dall
From: Christoffer Dall 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 KVM guest is essential

[PATCH v9 15/16] ARM: KVM: Handle I/O aborts

2012-07-03 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 n

[PATCH v9 14/16] ARM: KVM: Handle guest faults in KVM

2012-07-03 Thread Christoffer Dall
Handles the guest faults in KVM by mapping in corresponding user pages in the 2nd stage page tables. Introduces new ARM-specific kernel memory types, PAGE_KVM_GUEST and pgprot_guest variables used to map 2nd stage memory for KVM guests. Leverages MMU notifiers on KVM/ARM by supporting the kvm_unm

[PATCH v9 13/16] ARM: KVM: Emulation framework and CP15 emulation

2012-07-03 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 th

[PATCH v9 12/16] ARM: KVM: World-switch implementation

2012-07-03 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: Hyp-AB

[PATCH v9 11/16] ARM: KVM: Inject IRQs and FIQs from userspace

2012-07-03 Thread Christoffer Dall
From: Christoffer Dall 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 and whether the FIQ o

[PATCH v9 10/16] ARM: KVM: Memory virtualization setup

2012-07-03 Thread Christoffer Dall
From: 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

[PATCH v9 09/16] ARM: KVM: Module unloading support

2012-07-03 Thread Christoffer Dall
Current initialization code relies on the MMU-bit and TE-bit of the HSCTLR register to be cleared, so to support re-inserting the KVM module we must clear these bits when unloading the module. This is going to change when we support booting the kernel in Hyp mode and get rid of the SMC call, in th

[PATCH v9 08/16] ARM: KVM: Hypervisor inititalization

2012-07-03 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, th

[PATCH v9 07/16] ARM: KVM: Support Cortex-A15 VCPUs reset

2012-07-03 Thread Christoffer Dall
Reset all core and cp15 registers to their architecturally defined reset values at VCPU init time. Signed-off-by: Christoffer Dall --- arch/arm/include/asm/kvm_arm.h |6 ++ arch/arm/kvm/exports.c |2 + arch/arm/kvm/reset.c | 100

[PATCH v9 06/16] ARM: KVM: Initial skeleton to compile KVM support

2012-07-03 Thread Christoffer Dall
Targets KVM support for Cortex A-15 processors. Contains no real functionality but all the framework components, make files, header files and some tracing functionality. Most functionality is in arch/arm/kvm/* or arch/arm/include/asm/kvm_*.h. “Nothing to see here. Move along, move along..." Sig

[PATCH v9 05/16] KVM: Guard mmu_notifier specific code with CONFIG_MMU_NOTIFIER

2012-07-03 Thread Christoffer Dall
From: Marc Zyngier In order to avoid compilation failure when KVM is not compiled in, guard the mmu_notifier specific sections with both CONFIG_MMU_NOTIFIER and KVM_ARCH_WANT_MMU_NOTIFIER, like it is being done in the rest of the KVM code. Signed-off-by: Marc Zyngier Signed-off-by: Christoffer

[PATCH v9 04/16] KVM: Move KVM_IRQ_LINE to arch-generic code

2012-07-03 Thread Christoffer Dall
Handle KVM_IRQ_LINE and KVM_IRQ_LINE_STATUS in the generic kvm_vm_ioctl() function and call into kvm_vm_ioctl_irq_line(). Signed-off-by: Christoffer Dall --- arch/ia64/kvm/kvm-ia64.c | 33 ++--- arch/x86/kvm/x86.c | 33 ++--- incl

[PATCH v9 03/16] ARM: Section based HYP idmap

2012-07-03 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 all

[PATCH v9 02/16] ARM: Add config option ARM_VIRT_EXT

2012-07-03 Thread Christoffer Dall
Select this option for ARM processors equipped with hardware Virtualization Extensions. Signed-off-by: Christoffer Dall --- arch/arm/mm/Kconfig | 10 ++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/mm/Kconfig b/arch/arm/mm/Kconfig index 101b968..037dc53 100644 --- a/arch/arm

[PATCH v9 01/16] ARM: add mem_type prot_pte accessor

2012-07-03 Thread Christoffer Dall
From: Marc Zyngier The KVM hypervisor mmu code requires 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. Signed-off-by: Marc

[PATCH v9 00/16] KVM/ARM Implementation

2012-07-03 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: ae7a2a3fb6f8b784c2752863f4f1f20c656f

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

2012-07-03 Thread Nikunj A Dadhania
On Tue, 3 Jul 2012 05:11:35 -0300, Marcelo Tosatti wrote: > On Mon, Jun 04, 2012 at 10:37:24AM +0530, Nikunj A. Dadhania wrote: > > arch/x86/include/asm/kvm_para.h |3 +- > > arch/x86/include/asm/tlbflush.h |9 ++ > > arch/x86/kernel/kvm.c |1 + > > arch/x86/kvm/x86.c

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

2012-07-03 Thread Nikunj A Dadhania
On Tue, 3 Jul 2012 05:07:13 -0300, Marcelo Tosatti 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 > > after some time. > > > > For vcpus that were running an IPI is sent. In case, it went to

  1   2   >