Re: [PATCH] virtio-ring: Use threshold for switching to indirect descriptors

2011-11-30 Thread Michael S. Tsirkin
On Thu, Dec 01, 2011 at 01:12:25PM +1030, Rusty Russell wrote: > On Wed, 30 Nov 2011 18:11:51 +0200, Sasha Levin > wrote: > > On Tue, 2011-11-29 at 16:58 +0200, Avi Kivity wrote: > > > On 11/29/2011 04:54 PM, Michael S. Tsirkin wrote: > > > > > > > > > > Which is actually strange, weren't indire

Re: virtio-scsi spec (was Re: [PATCH] Add virtio-scsi to the virtio spec)

2011-11-30 Thread Hannes Reinecke
On 11/30/2011 05:36 PM, Paolo Bonzini wrote: On 11/30/2011 03:17 PM, Hannes Reinecke wrote: seg_max is the maximum number of segments that can be in a command. A bidirectional command can include seg_max input segments and seg_max output segments. I would like to have the other request_queue l

Re: [RFC] virtio: use mandatory barriers for remote processor vdevs

2011-11-30 Thread Ohad Ben-Cohen
On Thu, Dec 1, 2011 at 4:28 AM, Rusty Russell wrote: > Hmm, we got away with light barriers because we knew we were not > *really* talking to a device.  But now with virtio-mmio, turns out we > are :) > > I'm really tempted to revert d57ed95 for 3.2, and we can revisit this > optimization later if

Re: [RFC] virtio: use mandatory barriers for remote processor vdevs

2011-11-30 Thread Ohad Ben-Cohen
On Thu, Dec 1, 2011 at 1:43 AM, Michael S. Tsirkin wrote: > And these accesses need to be ordered with DSB? Or DMB? DMB (i.e. smp barriers) should be enough within Normal memory accesses, though the other issues that were reported to me are a bit concerning. I'm still trying to get more informati

Re: [RFC] virtio: use mandatory barriers for remote processor vdevs

2011-11-30 Thread Ohad Ben-Cohen
On Thu, Dec 1, 2011 at 1:13 AM, Michael S. Tsirkin wrote: > For x86, stores into memory are ordered. So I think that yes, smp_XXX > can be selected at compile time. But then you can't use the same kernel image for both scenarios. It won't take long until people will use virtio on ARM for both vi

Re: [RFC] virtio: use mandatory barriers for remote processor vdevs

2011-11-30 Thread Rusty Russell
On Thu, 1 Dec 2011 01:13:07 +0200, "Michael S. Tsirkin" wrote: > For x86, stores into memory are ordered. So I think that yes, smp_XXX > can be selected at compile time. > > So let's forget the virtio strangeness for a minute, Hmm, we got away with light barriers because we knew we were not *rea

Re: [PATCH] Add virtio-scsi to the virtio spec

2011-11-30 Thread Rusty Russell
On Wed, 30 Nov 2011 14:50:41 +0100, Paolo Bonzini wrote: > Hi all, > > here is the specification for a virtio-based SCSI host (controller, HBA, > you name it). The virtio SCSI host is the basis of an alternative > storage stack for KVM. This stack would overcome several limitations of > the curr

Re: [PATCHv3 RFC] virtio-pci: flexible configuration layout

2011-11-30 Thread Rusty Russell
On Wed, 30 Nov 2011 15:12:43 +0200, Sasha Levin wrote: > On Wed, 2011-11-30 at 10:10 +1030, Rusty Russell wrote: > > On Mon, 28 Nov 2011 11:15:31 +0200, Sasha Levin > > wrote: > > > On Mon, 2011-11-28 at 11:25 +1030, Rusty Russell wrote: > > > > I'd like to see kvmtools remove support for legacy

Re: [PATCH] virtio-mmio: Devices parameter parsing

2011-11-30 Thread Rusty Russell
On Tue, 29 Nov 2011 17:36:30 +, Pawel Moll wrote: > On Mon, 2011-11-28 at 00:31 +, Rusty Russell wrote: > > Off the top of my head, this makes me think of the way initcalls are > > ordered. We could put a parameter parsing initcall at the start of each > > initcall level in include/asm-ge

Re: [PATCH] virtio-ring: Use threshold for switching to indirect descriptors

2011-11-30 Thread Rusty Russell
On Wed, 30 Nov 2011 18:11:51 +0200, Sasha Levin wrote: > On Tue, 2011-11-29 at 16:58 +0200, Avi Kivity wrote: > > On 11/29/2011 04:54 PM, Michael S. Tsirkin wrote: > > > > > > > > Which is actually strange, weren't indirect buffers introduced to make > > > > the performance *better*? From what I

Re: [RFC] virtio: use mandatory barriers for remote processor vdevs

2011-11-30 Thread Michael S. Tsirkin
On Thu, Dec 01, 2011 at 01:27:10AM +0200, Ohad Ben-Cohen wrote: > On Wed, Nov 30, 2011 at 6:24 PM, Ohad Ben-Cohen wrote: > > On Wed, Nov 30, 2011 at 6:15 PM, Michael S. Tsirkin wrote: > >> How are the rings mapped? normal memory, right? > > > > No, device memory. > > Ok, I have more info. > > O

Re: [RFC] virtio: use mandatory barriers for remote processor vdevs

2011-11-30 Thread Ohad Ben-Cohen
On Wed, Nov 30, 2011 at 6:24 PM, Ohad Ben-Cohen wrote: > On Wed, Nov 30, 2011 at 6:15 PM, Michael S. Tsirkin wrote: >> How are the rings mapped? normal memory, right? > > No, device memory. Ok, I have more info. Originally remoteproc was mapping the rings using ioremap, and that meant ARM Devic

Re: [RFC] virtio: use mandatory barriers for remote processor vdevs

2011-11-30 Thread Michael S. Tsirkin
On Thu, Dec 01, 2011 at 12:43:08AM +0200, Ohad Ben-Cohen wrote: > On Wed, Nov 30, 2011 at 4:50 PM, Michael S. Tsirkin wrote: > > make headers_install > > make -C tools/virtio/ > > (you'll need an empty stub for tools/virtio/linux/module.h, > >  I just sent a patch to add that) > > sudo insmod tool

Re: [RFC] virtio: use mandatory barriers for remote processor vdevs

2011-11-30 Thread Ohad Ben-Cohen
On Wed, Nov 30, 2011 at 4:50 PM, Michael S. Tsirkin wrote: > make headers_install > make -C tools/virtio/ > (you'll need an empty stub for tools/virtio/linux/module.h, >  I just sent a patch to add that) > sudo insmod tools/virtio/vhost_test/vhost_test.ko > ./tools/virtio/virtio_test Ok, I gave t

Re: [Embeddedxen-devel] [Xen-devel] [ANNOUNCE] Xen port to Cortex-A15 / ARMv7 with virt extensions

2011-11-30 Thread Stefano Stabellini
On Wed, 30 Nov 2011, Arnd Bergmann wrote: > > In principal we could also offer the user options as to which particular > > platform a guest looks like. > > At least when using a qemu based simulation. Most platforms have some > characteristics that are not meaningful in a classic virtualization >

Re: [Xen-devel] [ANNOUNCE] Xen port to Cortex-A15 / ARMv7 with virt extensions

2011-11-30 Thread Arnd Bergmann
On Wednesday 30 November 2011, Ian Campbell wrote: > On Wed, 2011-11-30 at 14:32 +, Arnd Bergmann wrote: > > On Wednesday 30 November 2011, Ian Campbell wrote: > > What I suggested to the KVM developers is to start out with the > > vexpress platform, but then generalize it to the point where it

Re: virtio-scsi spec (was Re: [PATCH] Add virtio-scsi to the virtio spec)

2011-11-30 Thread Paolo Bonzini
On 11/30/2011 03:17 PM, Hannes Reinecke wrote: seg_max is the maximum number of segments that can be in a command. A bidirectional command can include seg_max input segments and seg_max output segments. I would like to have the other request_queue limitations exposed here, too. Most n

Re: [Xen-devel] [ANNOUNCE] Xen port to Cortex-A15 / ARMv7 with virt extensions

2011-11-30 Thread Ian Campbell
On Wed, 2011-11-30 at 14:32 +, Arnd Bergmann wrote: > On Wednesday 30 November 2011, Ian Campbell wrote: > > On Wed, 2011-11-30 at 13:03 +, Arnd Bergmann wrote: > > For domU the DT would presumably be constructed by the toolstack (in > > dom0 userspace) as appropriate for the guest configur

Re: [RFC] virtio: use mandatory barriers for remote processor vdevs

2011-11-30 Thread Ohad Ben-Cohen
On Wed, Nov 30, 2011 at 6:15 PM, Michael S. Tsirkin wrote: > How are the rings mapped? normal memory, right? No, device memory. > We allocate them with plan alloc_pages_exact in virtio_pci.c ... I'm not using virtio_pci.c; remoteproc is allocating the rings using the DMA API. > Yes wmb() is re

Re: [PATCH] virtio-ring: Use threshold for switching to indirect descriptors

2011-11-30 Thread Sasha Levin
Sorry, I forgot to copy-paste one of the results :) On Wed, 2011-11-30 at 18:11 +0200, Sasha Levin wrote: > I did some testing of indirect descriptors under different workloads. > > All tests were on a 2 vcpu guest with vhost on. Simple TCP_STREAM using > netperf. > > Indirect desc off: > guest

Re: [RFC] virtio: use mandatory barriers for remote processor vdevs

2011-11-30 Thread Michael S. Tsirkin
On Wed, Nov 30, 2011 at 06:04:56PM +0200, Ohad Ben-Cohen wrote: > On Wed, Nov 30, 2011 at 4:59 PM, Michael S. Tsirkin wrote: > > I see. And this happens because the ARM processor reorders > > memory writes > > Yes. > > > And in an SMP configuration, writes are somehow not reordered? > > They ar

Re: [PATCH] virtio-ring: Use threshold for switching to indirect descriptors

2011-11-30 Thread Sasha Levin
On Tue, 2011-11-29 at 16:58 +0200, Avi Kivity wrote: > On 11/29/2011 04:54 PM, Michael S. Tsirkin wrote: > > > > > > Which is actually strange, weren't indirect buffers introduced to make > > > the performance *better*? From what I see it's pretty much the > > > same/worse for virtio-blk. > > > >

Re: [ANNOUNCE] Xen port to Cortex-A15 / ARMv7 with virt extensions

2011-11-30 Thread Catalin Marinas
On 30 November 2011 11:39, Stefano Stabellini wrote: > A git branch is available here (not ready for submission): > > git://xenbits.xen.org/people/sstabellini/linux-pvhvm.git arm > > the branch above is based on git://linux-arm.org/linux-2.6.git arm-lpae, > even though guests don't really need lpa

Re: [Xen-devel] [ANNOUNCE] Xen port to Cortex-A15 / ARMv7 with virt extensions

2011-11-30 Thread Ian Campbell
On Wed, 2011-11-30 at 13:03 +, Arnd Bergmann wrote: > On Wednesday 30 November 2011, Stefano Stabellini wrote: > > On Tue, 29 Nov 2011, Arnd Bergmann wrote: > > > On Tuesday 29 November 2011, Stefano Stabellini wrote: > > > > > > Do you have a pointer to the kernel sources for the Linux guest?

[PATCH RFC V3 4/4] kvm : pv-ticketlocks support for linux guests running on KVM hypervisor

2011-11-30 Thread Raghavendra K T
This patch extends Linux guests running on KVM hypervisor to support pv-ticketlocks. During smp_boot_cpus paravirtualied KVM guest detects if the hypervisor has required feature (KVM_FEATURE_KICK_VCPU) to support pv-ticketlocks. If so, support for pv-ticketlocks is registered via pv_lock_ops. S

[PATCH RFC V3 3/4] kvm guest : Added configuration support to enable debug information for KVM Guests

2011-11-30 Thread Raghavendra K T
Added configuration support to enable debug information for KVM Guests in debugfs Signed-off-by: Srivatsa Vaddagiri Signed-off-by: Suzuki Poulose Signed-off-by: Raghavendra K T --- diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 5d8152d..526e3ae 100644 --- a/arch/x86/Kconfig +++ b/ar

[PATCH RFC V3 2/4] kvm hypervisor : Add a hypercall to KVM hypervisor to support pv-ticketlocks

2011-11-30 Thread Raghavendra K T
Add a hypercall to KVM hypervisor to support pv-ticketlocks KVM_HC_KICK_CPU allows the calling vcpu to kick another vcpu out of halt state. The presence of these hypercalls is indicated to guest via KVM_FEATURE_KICK_VCPU/KVM_CAP_KICK_VCPU. Qemu needs a corresponding patch to pass up the pre

[PATCH RFC V3 1/4] debugfs: Add support to print u32 array in debugfs

2011-11-30 Thread Raghavendra K T
Add debugfs support to print u32-arrays in debugfs. Move the code from Xen to debugfs to make the code common for other users as well. Signed-off-by: Srivatsa Vaddagiri Signed-off-by: Suzuki Poulose Signed-off-by: Raghavendra K T --- diff --git a/arch/x86/xen/debugfs.c b/arch/x86/xen/debugfs.c

[PATCH RFC V3 0/4] kvm : Paravirt-spinlock support for KVM guests

2011-11-30 Thread Raghavendra K T
The 4-patch series to follow this email extends KVM-hypervisor and Linux guest running on KVM-hypervisor to support pv-ticket spinlocks, based on Xen's implementation. One hypercall is introduced in KVM hypervisor,that allows a vcpu to kick another vcpu out of halt state. The blocking of vcpu is

Re: [ANNOUNCE] Xen port to Cortex-A15 / ARMv7 with virt extensions

2011-11-30 Thread Anup Patel
Hi all, I wanted to know how Xen-ARM for A15 will address following concerns: - How will Xen-ARM for A15 support legacy guest environment like ARMv5 or ARMv6 ? - What if my Cortex-A15 board does not have a GIC with virtualization support ? Best Regards, Anup Patel On Wed, Nov 30, 2011 at 2:59 A

Re: [RFC] virtio: use mandatory barriers for remote processor vdevs

2011-11-30 Thread Ohad Ben-Cohen
On Wed, Nov 30, 2011 at 4:59 PM, Michael S. Tsirkin wrote: > I see. And this happens because the ARM processor reorders > memory writes Yes. > And in an SMP configuration, writes are somehow not reordered? They are, but then the smp memory barriers are enough to control these effects. It's not

Re: [RFC] virtio: use mandatory barriers for remote processor vdevs

2011-11-30 Thread Michael S. Tsirkin
On Wed, Nov 30, 2011 at 01:45:05PM +0200, Ohad Ben-Cohen wrote: > > So you put virtio rings in MMIO memory? > > I'll be precise: the vrings are created in non-cacheable memory, which > both processors have access to. > > > Could you please give a couple of examples of breakage? > > Sure. Basical

Re: [Xen-devel] [ANNOUNCE] Xen port to Cortex-A15 / ARMv7 with virt extensions

2011-11-30 Thread Pawel Moll
On Wed, 2011-11-30 at 14:32 +, Arnd Bergmann wrote: > I don't care much either way, but I think it would be good to > use similar solutions across all hypervisors. The two options > that I've seen discussed for KVM were to use either a virtual PCI > bus with individual virtio-pci devices as on

Re: [RFC] virtio: use mandatory barriers for remote processor vdevs

2011-11-30 Thread Michael S. Tsirkin
On Wed, Nov 30, 2011 at 01:55:53PM +0200, Ohad Ben-Cohen wrote: > On Tue, Nov 29, 2011 at 5:19 PM, Michael S. Tsirkin wrote: > > On Tue, Nov 29, 2011 at 03:57:19PM +0200, Ohad Ben-Cohen wrote: > >> > Is an extra branch faster or slower than reverting d57ed95? > >> > >> Sorry, unfortunately I have

Re: [Xen-devel] [ANNOUNCE] Xen port to Cortex-A15 / ARMv7 with virt extensions

2011-11-30 Thread Arnd Bergmann
On Wednesday 30 November 2011, Ian Campbell wrote: > On Wed, 2011-11-30 at 13:03 +, Arnd Bergmann wrote: > > On Wednesday 30 November 2011, Stefano Stabellini wrote: > > This is the same choice people have made for KVM, but it's not > > necessarily the best option in the long run. In particular

Re: [ANNOUNCE] Xen port to Cortex-A15 / ARMv7 with virt extensions

2011-11-30 Thread Stefano Stabellini
On Wed, 30 Nov 2011, Catalin Marinas wrote: > On 30 November 2011 11:39, Stefano Stabellini > wrote: > > A git branch is available here (not ready for submission): > > > > git://xenbits.xen.org/people/sstabellini/linux-pvhvm.git arm > > > > the branch above is based on git://linux-arm.org/linux-2.

Re: virtio-scsi spec (was Re: [PATCH] Add virtio-scsi to the virtio spec)

2011-11-30 Thread Hannes Reinecke
On 11/30/2011 02:50 PM, Paolo Bonzini wrote: > Appendix H: SCSI Host Device > > The virtio SCSI host device groups together one or more simple > virtual devices (ie. disk), and allows communicating to these > devices using the SCSI protocol. An instance of the device > represents a SCSI host with

virtio-scsi spec (was Re: [PATCH] Add virtio-scsi to the virtio spec)

2011-11-30 Thread Paolo Bonzini
Appendix H: SCSI Host Device The virtio SCSI host device groups together one or more simple virtual devices (ie. disk), and allows communicating to these devices using the SCSI protocol. An instance of the device represents a SCSI host with possibly many buses (also known as channels or paths), ta

[PATCH] Add virtio-scsi to the virtio spec

2011-11-30 Thread Paolo Bonzini
Hi all, here is the specification for a virtio-based SCSI host (controller, HBA, you name it). The virtio SCSI host is the basis of an alternative storage stack for KVM. This stack would overcome several limitations of the current solution, virtio-blk: 1) scalability limitations: virtio-blk-over

Re: [PATCHv3 RFC] virtio-pci: flexible configuration layout

2011-11-30 Thread Sasha Levin
On Wed, 2011-11-30 at 10:10 +1030, Rusty Russell wrote: > On Mon, 28 Nov 2011 11:15:31 +0200, Sasha Levin > wrote: > > On Mon, 2011-11-28 at 11:25 +1030, Rusty Russell wrote: > > > I'd like to see kvmtools remove support for legacy mode altogether, > > > but they probably have existing users. > >

Re: [ANNOUNCE] Xen port to Cortex-A15 / ARMv7 with virt extensions

2011-11-30 Thread Arnd Bergmann
On Wednesday 30 November 2011, Stefano Stabellini wrote: > On Tue, 29 Nov 2011, Arnd Bergmann wrote: > > On Tuesday 29 November 2011, Stefano Stabellini wrote: > > > > Do you have a pointer to the kernel sources for the Linux guest? > > We have very few changes to the Linux kernel at the moment (

Re: [RFC] virtio: use mandatory barriers for remote processor vdevs

2011-11-30 Thread Ohad Ben-Cohen
On Tue, Nov 29, 2011 at 5:19 PM, Michael S. Tsirkin wrote: > On Tue, Nov 29, 2011 at 03:57:19PM +0200, Ohad Ben-Cohen wrote: >> > Is an extra branch faster or slower than reverting d57ed95? >> >> Sorry, unfortunately I have no way to measure this, as I don't have >> any virtualization/x86 setup. I

Re: [RFC] virtio: use mandatory barriers for remote processor vdevs

2011-11-30 Thread Ohad Ben-Cohen
On Tue, Nov 29, 2011 at 5:16 PM, Michael S. Tsirkin wrote: > This mentions iommu - is there a need to use dma api to let > the firmware acess the rings? Or does it have access to all > of memory? IOMMU may or may not be used, it really depends on the hardware (my personal SoC does employ one, whi

Re: [ANNOUNCE] Xen port to Cortex-A15 / ARMv7 with virt extensions

2011-11-30 Thread Stefano Stabellini
On Wed, 30 Nov 2011, Anup Patel wrote: > Hi all, > > I wanted to know how Xen-ARM for A15 will address following concerns: > > - How will Xen-ARM for A15 support legacy guest environment like ARMv5 or > ARMv6 ? It is not our focus at the moment; we are targeting operating systems that support a

Re: [ANNOUNCE] Xen port to Cortex-A15 / ARMv7 with virt extensions

2011-11-30 Thread Stefano Stabellini
On Tue, 29 Nov 2011, Arnd Bergmann wrote: > On Tuesday 29 November 2011, Stefano Stabellini wrote: > > Hi all, > > a few weeks ago I (and a few others) started hacking on a > > proof-of-concept hypervisor port to Cortex-A15 which uses and requires > > ARMv7 virtualization extensions. The intention

Re: [PATCHv3 RFC] virtio-pci: flexible configuration layout

2011-11-30 Thread Michael S. Tsirkin
On Wed, Nov 30, 2011 at 10:10:22AM +1030, Rusty Russell wrote: > On Mon, 28 Nov 2011 11:15:31 +0200, Sasha Levin > wrote: > > On Mon, 2011-11-28 at 11:25 +1030, Rusty Russell wrote: > > > I'd like to see kvmtools remove support for legacy mode altogether, > > > but they probably have existing use