Re: [PATCH v3 0/3] virtio DMA API core stuff

2015-11-19 Thread David Woodhouse
On Thu, 2015-11-19 at 13:59 -0800, Andy Lutomirski wrote: > > > > > So thinking hard about it, I don't see any real drawbacks to making this > > conditional on a new feature bit, that Xen can then set.. > > Can you elaborate?  If I run QEMU, hosting Xen, hosting Linux, and the > virtio device is

[RFC PATCH 5/9] nvme-vhost: add controller "start" callback

2015-11-19 Thread Ming Lin
From: Ming Lin Signed-off-by: Ming Lin --- drivers/nvme/target/vhost.c | 106 1 file changed, 106 insertions(+) diff --git a/drivers/nvme/target/vhost.c b/drivers/nvme/target/vhost.c index

[RFC PATCH 2/9] nvme-vhost: add basic ioctl handlers

2015-11-19 Thread Ming Lin
From: Ming Lin Signed-off-by: Ming Lin --- drivers/nvme/target/core.c | 1 + drivers/nvme/target/vhost.c | 264 +++- include/uapi/linux/vhost.h | 15 +++ 3 files changed, 279 insertions(+), 1

[RFC PATCH 3/9] nvme-vhost: add basic nvme bar read/write

2015-11-19 Thread Ming Lin
From: Ming Lin Signed-off-by: Ming Lin --- drivers/nvme/target/vhost.c | 102 include/uapi/linux/vhost.h | 17 ++-- 2 files changed, 116 insertions(+), 3 deletions(-) diff --git

[RFC PATCH 0/9] vhost-nvme: new qemu nvme backend using nvme target

2015-11-19 Thread Ming Lin
Hi, This is the first attempt to add a new qemu nvme backend using in-kernel nvme target. Most code are ported from qemu-nvme and also borrow code from Hannes Reinecke's rts-megasas. It's similar as vhost-scsi, but doesn't use virtio. The advantage is guest can run unmodified NVMe driver. So

[RFC PATCH 1/9] nvme-vhost: add initial commit

2015-11-19 Thread Ming Lin
From: Ming Lin Signed-off-by: Ming Lin --- drivers/nvme/target/Kconfig | 11 +++ drivers/nvme/target/Makefile | 2 ++ drivers/nvme/target/vhost.c | 16 3 files changed, 29 insertions(+) create mode 100644

[RFC PATCH 4/9] nvmet: add a controller "start" hook

2015-11-19 Thread Ming Lin
From: Ming Lin This is used to execute controller specific start code Signed-off-by: Ming Lin --- drivers/nvme/target/core.c | 3 +++ drivers/nvme/target/nvmet.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/drivers/nvme/target/core.c

[RFC PATCH 6/9] nvmet: add a "parse_extra_admin_cmd" hook

2015-11-19 Thread Ming Lin
From: Ming Lin This is used to execute controller specific cmd parse code Signed-off-by: Ming Lin --- drivers/nvme/target/admin-cmd.c | 7 +++ drivers/nvme/target/nvmet.h | 3 +++ 2 files changed, 10 insertions(+) diff --git

[RFC PATCH 8/9] nvme-vhost: add vhost memory helpers

2015-11-19 Thread Ming Lin
From: Ming Lin This borrows code from Hannes Reinecke's rts-megasas. Cc: Hannes Reinecke Signed-off-by: Ming Lin --- drivers/nvme/target/vhost.c | 108 1 file changed, 108 insertions(+)

[RFC PATCH 7/9] nvme-vhost: add "parse_extra_admin_cmd" callback

2015-11-19 Thread Ming Lin
From: Ming Lin Signed-off-by: Ming Lin --- drivers/nvme/target/vhost.c | 153 1 file changed, 153 insertions(+) diff --git a/drivers/nvme/target/vhost.c b/drivers/nvme/target/vhost.c index

[RFC PATCH 9/9] nvme-vhost: add nvme queue handlers

2015-11-19 Thread Ming Lin
From: Ming Lin This adds nvme submission/completion queue handlers, which are ported from qemu-nvme. And hooks into nvme-target to do the real job. Cc: Keith Busch Signed-off-by: Ming Lin --- drivers/nvme/target/vhost.c

[PATCH v2 0/3] Fix and cleanup for 32-bit PV sysexit

2015-11-19 Thread Boris Ostrovsky
The first patch fixes Xen PV regression introduced by 32-bit rewrite. Unlike the earlier version it uses ALTERNATIVE instruction and avoids using xen_sysexit (and sysret32 in compat mode) pv ops, as suggested by Andy. As result of this patch irq_enable_sysexit and usergs_sysret32 pv ops are not

[PATCH v2 2/3] x86: irq_enable_sysexit pv op is no longer needed

2015-11-19 Thread Boris Ostrovsky
As result of commit "x86/xen: Avoid fast syscall path for Xen PV guests" irq_enable_sysexit pv op is not called by Xen PV guests anymore and since they were the only ones who used it we can safely remove it. Signed-off-by: Boris Ostrovsky ---

[PATCH v2 1/3] x86/xen: Avoid fast syscall path for Xen PV guests

2015-11-19 Thread Boris Ostrovsky
After 32-bit syscall rewrite, and specifically after commit 5f310f739b4c ("x86/entry/32: Re-implement SYSENTER using the new C path"), the stack frame that is passed to xen_sysexit is no longer a "standard" one (i.e. it's not pt_regs). Since we end up calling xen_iret from xen_sysexit we don't

[PATCH v2 3/3] x86: usergs_sysret32 pv op is no longer needed

2015-11-19 Thread Boris Ostrovsky
As result of commit "x86/xen: Avoid fast syscall path for Xen PV guests" usergs_sysret32 pv op is not called by Xen PV guests anymore and since they were the only ones who used it we can safely remove it. Signed-off-by: Boris Ostrovsky ---

Re: [PATCH v2 0/3] Fix and cleanup for 32-bit PV sysexit

2015-11-19 Thread Andy Lutomirski
On Thu, Nov 19, 2015 at 1:55 PM, Boris Ostrovsky wrote: > The first patch fixes Xen PV regression introduced by 32-bit rewrite. Unlike > the > earlier version it uses ALTERNATIVE instruction and avoids using xen_sysexit > (and sysret32 in compat mode) pv ops, as

Re: [PATCH v2 0/3] Fix and cleanup for 32-bit PV sysexit

2015-11-19 Thread Borislav Petkov
On Thu, Nov 19, 2015 at 04:55:44PM -0500, Boris Ostrovsky wrote: > The first patch fixes Xen PV regression introduced by 32-bit rewrite. Unlike > the > earlier version it uses ALTERNATIVE instruction and avoids using xen_sysexit > (and sysret32 in compat mode) pv ops, as suggested by Andy. > >

Re: [PATCH v3 0/3] virtio DMA API core stuff

2015-11-19 Thread Andy Lutomirski
On Nov 19, 2015 5:45 AM, "Michael S. Tsirkin" wrote: > > On Tue, Oct 27, 2015 at 11:38:57PM -0700, Andy Lutomirski wrote: > > This switches virtio to use the DMA API unconditionally. I'm sure > > it breaks things, but it seems to work on x86 using virtio-pci, with > > and

Extended deadline: November 22 --- WorldCIST'2016: 4th World Conference on Information Systems and Technologies

2015-11-19 Thread Maria Lemos
- WorldCIST'16 - 4th World Conference on Information Systems and Technologies Recife, PE, Brazil 22th-24th of March 2016 http://www.aisti.eu/worldcist16/ --- SCOPE The WorldCist'16 - 4th World Conference on Information Systems and Technologies (

Re: [PATCH 1/3] x86/xen: Avoid fast syscall path for Xen PV guests

2015-11-19 Thread Borislav Petkov
On Wed, Nov 18, 2015 at 12:21:56PM -0800, Andy Lutomirski wrote: > Could we make this a little less subtle: > > ALTERNATIVE "testl %eax, %eax; lz .Lsyscall_32_done", "jmp > .Lsyscasll_32_done", X86_FEATURE_XENPV > > Borislav, what do you think? I don't mind either. I would've said your version

Re: [PATCH 0/3] Fix and cleanup for 32-bit PV sysexit

2015-11-19 Thread Borislav Petkov
On Wed, Nov 18, 2015 at 03:06:16PM -0500, Boris Ostrovsky wrote: > The first patch fixes Xen PV regression introduced by 32-bit rewrite. Unlike > the > earlier version it uses ALTERNATIVE instruction and avoids using xen_sysexit > (and sysret32 in compat mode) pv ops, as suggested by Andy. (I

Re: [PATCH -qemu] nvme: support Google vendor extension

2015-11-19 Thread Paolo Bonzini
On 18/11/2015 06:47, Ming Lin wrote: > @@ -726,7 +798,11 @@ static void nvme_process_db(NvmeCtrl *n, hwaddr addr, > int val) > } > > start_sqs = nvme_cq_full(cq) ? 1 : 0; > -cq->head = new_head; > +/* When the mapped pointer memory area is setup, we don't

Re: [PATCH v3 0/3] virtio DMA API core stuff

2015-11-19 Thread Benjamin Herrenschmidt
On Thu, 2015-11-19 at 23:38 +, David Woodhouse wrote: > > I understand that POWER and other platforms don't currently have a > clean way to indicate that certain device don't have translation. And I > understand that we may end up with a *quirk* which ensures that the DMA > API does the right

Re: [RFC PATCH 4/9] nvmet: add a controller "start" hook

2015-11-19 Thread Christoph Hellwig
On Thu, Nov 19, 2015 at 04:21:03PM -0800, Ming Lin wrote: > #define NVMET_SUBSYS_NAME_LEN256 > charsubsys_name[NVMET_SUBSYS_NAME_LEN]; > + > + void*opaque; > + void(*start)(void *); > }; Why can't vhost

Re: [RFC PATCH 0/9] vhost-nvme: new qemu nvme backend using nvme target

2015-11-19 Thread Christoph Hellwig
Thanks Ming, from a first quick view this looks great. I'll look over it in a bit more detail once I get a bit more time. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org

Re: [RFC PATCH 0/9] vhost-nvme: new qemu nvme backend using nvme target

2015-11-19 Thread Ming Lin
On Fri, 2015-11-20 at 06:16 +0100, Christoph Hellwig wrote: > Thanks Ming, > > from a first quick view this looks great. I'll look over it in a bit > more detail once I get a bit more time. Thanks to CC Nic :-) But funny, I double-checked bash history. I actually CCed Nic. Don't know why it's

Re: [PATCH] virtio_ring: Shadow available ring flags & index

2015-11-19 Thread Xie, Huawei
On 11/18/2015 12:28 PM, Venkatesh Srinivas wrote: > On Tue, Nov 17, 2015 at 08:08:18PM -0800, Venkatesh Srinivas wrote: >> On Mon, Nov 16, 2015 at 7:46 PM, Xie, Huawei wrote: >> >>> On 11/14/2015 7:41 AM, Venkatesh Srinivas wrote: On Wed, Nov 11, 2015 at 02:34:33PM

Re: [RFC PATCH 4/9] nvmet: add a controller "start" hook

2015-11-19 Thread Ming Lin
On Fri, 2015-11-20 at 06:13 +0100, Christoph Hellwig wrote: > On Thu, Nov 19, 2015 at 04:21:03PM -0800, Ming Lin wrote: > > #define NVMET_SUBSYS_NAME_LEN 256 > > charsubsys_name[NVMET_SUBSYS_NAME_LEN]; > > + > > + void*opaque; > > +

Re: [PATCH v3 0/3] virtio DMA API core stuff

2015-11-19 Thread Michael S. Tsirkin
On Fri, Nov 20, 2015 at 08:56:46AM +0200, Michael S. Tsirkin wrote: > On Thu, Nov 19, 2015 at 01:59:05PM -0800, Andy Lutomirski wrote: > > On Nov 19, 2015 5:45 AM, "Michael S. Tsirkin" wrote: > > > > > > On Tue, Oct 27, 2015 at 11:38:57PM -0700, Andy Lutomirski wrote: > > > >

Re: [PATCH v3 0/3] virtio DMA API core stuff

2015-11-19 Thread Michael S. Tsirkin
On Thu, Nov 19, 2015 at 01:59:05PM -0800, Andy Lutomirski wrote: > On Nov 19, 2015 5:45 AM, "Michael S. Tsirkin" wrote: > > > > On Tue, Oct 27, 2015 at 11:38:57PM -0700, Andy Lutomirski wrote: > > > This switches virtio to use the DMA API unconditionally. I'm sure > > > it

Re: [RFC] kvmtool: add support for modern virtio-pci

2015-11-19 Thread Sasha Levin
On 11/19/2015 02:21 AM, Gerd Hoffmann wrote: > On Mi, 2015-11-18 at 23:01 -0500, Sasha Levin wrote: >> On 11/18/2015 11:00 PM, Sasha Levin wrote: >>> Anyways, I debugged it for a bit a found that seabios attempts to write to >>> the notification BAR, I look further tomorrow to narrow it down and

Re: [PATCH v3 0/3] virtio DMA API core stuff

2015-11-19 Thread Michael S. Tsirkin
On Tue, Oct 27, 2015 at 11:38:57PM -0700, Andy Lutomirski wrote: > This switches virtio to use the DMA API unconditionally. I'm sure > it breaks things, but it seems to work on x86 using virtio-pci, with > and without Xen, and using both the modern 1.0 variant and the > legacy variant. So

Re: [RFC] kvmtool: add support for modern virtio-pci

2015-11-19 Thread Gerd Hoffmann
Hi, > That was indeed the ISR field. Fixing that makes seabios reach the same point > as > legacy virtio before failing. > > I don't see the original correspondence about seabios failures you've > reported, if > you want to forward them over we can look at it further. It was a few months