Re: [PATCH] VIRTIO NET: Enable netpoll interface for netconsole logging

2008-03-02 Thread Amit Shah
On Mon, Mar 3, 2008 at 9:38 AM, Rusty Russell <[EMAIL PROTECTED]> wrote: > On Friday 29 February 2008 21:54:50 Amit Shah wrote: > > Add a new poll_controller handler that the netpoll interface needs. > > > > This enables netconsole logging from a kvm guest over th

Re: [PATCH] use NR_IRQS for irq count

2008-04-08 Thread Amit Shah
* On Tuesday 08 April 2008 22:34:36 Glauber Costa wrote: > Instead of artificially limiting irq numbers, use arch provided NR_IRQS > > Signed-off-by: Glauber Costa <[EMAIL PROTECTED]> Thanks, applied. Going forward, we're going to use the in-kernel approach for interrupt injection (which already

PCI Passthrough support for KVM

2008-04-10 Thread Amit Shah
This patchset introduces PCI passthrough support for KVM. This has been tested with an Ethernet device. The device is seen in the guest and interrupts are generated. However, no data transfer can take place unless pvdma or reserved-ram is used. The patches for pvdma will be available shortly. Sh

[PATCH 1/2] KVM: Expose get_eoi_gsi() for IRQ acking by PCI passthrough devices

2008-04-10 Thread Amit Shah
Signed-off-by: Amit Shah <[EMAIL PROTECTED]> --- virt/kvm/ioapic.c |2 +- virt/kvm/ioapic.h |1 + 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c index 4232fd7..c5e776a 100644 --- a/virt/kvm/ioapic.c +++ b/virt/kvm/ioapic.c @@

PCI Passthrough support for KVM

2008-04-10 Thread Amit Shah
This patchset introduces PCI passthrough support for KVM. This has been tested with an Ethernet device. The device is seen in the guest and interrupts are generated. However, no data transfer can take place unless pvdma or reserved-ram is used. The patches for pvdma will be available shortly. Sha

[PATCH 2/2] KVM: Handle interrupts for PCI passthrough devices

2008-04-10 Thread Amit Shah
, so we have an additional ioctl that keeps track of those changes in userspace and notifies us whenever that happens. It is expected the kernel driver for the passthrough device is removed before passing it on to the guest. Signed-off-by: Amit Shah <[EMAIL PROTECTED]> --- arch/x86/kvm/l

[PATCH 1/1] QEMU/KVM: Support for PCI Passthrough

2008-04-10 Thread Amit Shah
doing the passthrough. If kvm uses the in-kernel irqchip, interrupts are routed to the guest via the kvm module (accompanied kernel changes are necessar). If -no-kvm-irqchip is used, the 'irqhook' module, also included here, is to be used. Signed-off-by: Amit Shah <[EM

Re: [PATCH] use NR_IRQS for irq count

2008-04-10 Thread Amit Shah
* On Wednesday 09 Apr 2008 17:41:10 Glauber Costa wrote: > Amit Shah wrote: > > * On Tuesday 08 April 2008 22:34:36 Glauber Costa wrote: > >> Instead of artificially limiting irq numbers, use arch provided NR_IRQS > >> > >> Signed-off-by: Glauber Costa <[EM

Re: [kvm-devel] [PATCH 1/1] QEMU/KVM: Support for PCI Passthrough

2008-04-17 Thread Amit Shah
* On Monday 14 Apr 2008 06:01:07 Samuel Masham wrote: > On Sun, Apr 13, 2008 at 9:49 PM, Dor Laor <[EMAIL PROTECTED]> wrote: > > On Thu, 2008-04-10 at 11:48 +0300, Amit Shah wrote: > > > If kvm uses the in-kernel irqchip, interrupts are routed to > > > the gues

Re: [kvm-devel] [PATCH 2/2] KVM: Handle interrupts for PCI passthrough devices

2008-04-22 Thread Amit Shah
* On Sunday 13 Apr 2008 14:06:27 Avi Kivity wrote: > Amit Shah wrote: > > Passthrough devices are host machine PCI devices which have > > been handed off to the guest. Handle interrupts from these > > devices and route them to the appropriate guest irq lines. > > The use

[PATCH] KVM PV Guest: Implement paravirtualized DMA

2008-04-29 Thread Amit Shah
d-off-by: Amit Shah <[EMAIL PROTECTED]> --- arch/x86/Kconfig |8 + arch/x86/kernel/Makefile |1 + arch/x86/kernel/kvm_pv_dma.c | 391 ++ 3 files changed, 400 insertions(+), 0 deletions(-) create mode 100644 arch/x86/kernel/k

PV DMA for PCI passthrough devices for KVM

2008-04-29 Thread Amit Shah
This patchset implements PVDMA for handling DMA requests from devices assigned to the guest from the host machine. They're also available from git-pull git://git.kernel.org/pub/scm/linux/kernel/git/amit/kvm.git pvdma These patches are based on my pci-passthrough tree, which is available from g

[PATCH] x86 DMA: Handle devices assigned to the guest by the host

2008-04-29 Thread Amit Shah
calls to the host. In KVM, with pci passthrough support, we can assign actual devices to the guest OS which need this functionality. Signed-off-by: Amit Shah <[EMAIL PROTECTED]> --- arch/x86/kernel/pci-dma.c | 11 +++ include/asm-x86/dma-mapping.h |2 ++ 2 files changed,

[PATCH] KVM x86: Handle hypercalls for assigned PCI devices

2008-04-29 Thread Amit Shah
on to the device for DMA. We also pin the pages thus requested so that they're not swapped out. 3. unmap: to unpin the pages and free any information we might have stored. Signed-off-by: Amit Shah <[EMAIL PROTECTED]> --- arch/x86/kvm/x86.c

Re: [PATCH] x86 DMA: Handle devices assigned to the guest by the host

2008-04-29 Thread Amit Shah
On Tuesday 29 April 2008 18:44:23 Andi Kleen wrote: > Amit Shah <[EMAIL PROTECTED]> writes: > > diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c > > index 388b113..678cafb 100644 > > --- a/arch/x86/kernel/pci-dma.c > > +++ b/arch/x86/kerne

Re: [PATCH] KVM PV Guest: Implement paravirtualized DMA

2008-04-29 Thread Amit Shah
On Tuesday 29 April 2008 19:01:32 Andi Kleen wrote: > Amit Shah <[EMAIL PROTECTED]> writes: > > +const struct dma_mapping_ops *orig_dma_ops; > > I suspect real dma ops stacking will need some further thought than > your simple hacks Yes; that's something we'

Re: [PATCH] KVM x86: Handle hypercalls for assigned PCI devices

2008-04-29 Thread Amit Shah
On Tuesday 29 April 2008 20:14:16 Glauber Costa wrote: > Amit Shah wrote: > > +static struct kvm_pv_dma_map* > > +find_pci_pv_dmap(struct list_head *head, dma_addr_t dma) > > +{ > > might be better to prefix those functions with kvm? Even though they are > stat

Re: [PATCH] KVM x86: Handle hypercalls for assigned PCI devices

2008-05-01 Thread Amit Shah
On Tuesday 29 April 2008 21:28:51 Amit Shah wrote: > On Tuesday 29 April 2008 20:14:16 Glauber Costa wrote: > > Amit Shah wrote: > > > + if (find_pci_pt_dev(&vcpu->kvm->arch.pci_pt_dev_head, > > > + &pci_pt_info, 0, KVM_PT_SOURCE

Re: [kvm-devel] [PATCH 2/2] KVM: Handle interrupts for PCI passthrough devices

2008-05-02 Thread Amit Shah
On Friday 02 May 2008 16:05:17 Avi Kivity wrote: > Amit Shah wrote: > >>> +static irqreturn_t > >>> +kvm_pci_pt_dev_intr(int irq, void *dev_id) > >>> > >>> +{ > >>> + struct kvm_pci_pt_dev_list *match; > >>> +

PCI device assignment to guests

2008-06-27 Thread Amit Shah
The main change from the patches I sent out earlier this week is support for guests that use the PIC. A callback for PIC irq ack handling is also introduced. Currently, there's no mechanism to register/unregister callers to the irq ack callbacks, but they can be added when there's more than one

[PATCH 2/4] KVM: Introduce a callback routine for IOAPIC ack handling

2008-06-27 Thread Amit Shah
This will be useful for acking irqs of assigned devices Signed-off-by: Amit Shah <[EMAIL PROTECTED]> --- virt/kvm/ioapic.c |3 +++ virt/kvm/ioapic.h |1 + 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/virt/kvm/ioapic.c b/virt/kvm/ioapic.c index 9d02136..6d99a35

[PATCH 2/2] KVM: PCIPT: irqhook module for interrupt injection into guests with

2008-06-27 Thread Amit Shah
Signed-off-by: Amit Shah <[EMAIL PROTECTED]> --- Makefile | 10 ++- irqhook/Kbuild|3 + irqhook/Makefile | 25 + irqhook/irqhook_main.c| 215 + qemu/hw/apic.c|4 + qemu/hw

PCI device assignment to guests (userspace)

2008-06-27 Thread Amit Shah
Userspace patches for the pci-passthrough functionality. The major updates since the last post are: - Loop to add passthrough devices in pc_init1 - Handle errors in read/write calls - Allow invocation without irq number for in-kernel irqchip Other than this, several small things were fixed acco

[PATCH 3/4] KVM: Introduce a callback routine for PIC ack handling

2008-06-27 Thread Amit Shah
This is useful for acking irqs of assigned devices Signed-off-by: Amit Shah <[EMAIL PROTECTED]> --- arch/x86/kvm/i8259.c |6 +- arch/x86/kvm/irq.c |2 +- arch/x86/kvm/irq.h |3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/arch/x86/kvm/i8259.c b/ar

[PATCH 1/2] KVM/userspace: Support for assigning PCI devices to guest

2008-06-27 Thread Amit Shah
From: Or Sagi <[EMAIL PROTECTED]> From: Nir Peleg <[EMAIL PROTECTED]> From: Amit Shah <[EMAIL PROTECTED]> From: Glauber de Oliveira Costa <[EMAIL PROTECTED]> We can assign a device from the host machine to a guest. The original code comes from Neocleus. A new command-li

[PATCH 1/4] KVM: Introduce kvm_set_irq to inject interrupts in guests

2008-06-27 Thread Amit Shah
This function injects an interrupt into the guest given the kvm struct, the (guest) irq number and the interrupt level. Signed-off-by: Amit Shah <[EMAIL PROTECTED]> --- arch/x86/kvm/irq.c | 11 +++ arch/x86/kvm/irq.h |2 ++ 2 files changed, 13 insertions(+), 0 deletions(-)

[PATCH 4/4] KVM: Handle device assignment to guests

2008-06-27 Thread Amit Shah
From: Amit Shah <[EMAIL PROTECTED]> From: Ben-Ami Yassour <[EMAIL PROTECTED]> From: Han, Weidong <[EMAIL PROTECTED]> This patch adds support for handling PCI devices that are assigned to the guest ("PCI passthrough"). The device to be assigned to the guest is regis

Re: [PATCH 4/4] KVM: Handle device assignment to guests

2008-07-02 Thread Amit Shah
Added locking (kvm->lock) around the initialization of function pointers for irq structures. So the new 4/4 patch is: Subject: [PATCH] KVM: Handle device assignment to guests From: Amit Shah <[EMAIL PROTECTED]> From: Ben-Ami Yassour <[EMAIL PROTECTED]> From: Han, Weidong &l

find_vqs operation starting at arbitrary index

2009-06-01 Thread Amit Shah
Hello, The recent find_vqs operation doesn't allow for a vq to be found at an arbitrary location; it's meant to be called once at startup to find all possible queues and never called again. This doesn't work for devices which can have queues hot-plugged at run-time. This can be made to work by pa

Re: find_vqs operation starting at arbitrary index

2009-06-01 Thread Amit Shah
On (Mon) Jun 01 2009 [11:11:06], Michael S. Tsirkin wrote: > On Mon, Jun 01, 2009 at 01:33:48PM +0530, Amit Shah wrote: > > Hello, > > > > The recent find_vqs operation doesn't allow for a vq to be found at an > > arbitrary location; it's meant to

Re: find_vqs operation starting at arbitrary index

2009-06-01 Thread Amit Shah
On (Mon) Jun 01 2009 [11:43:27], Michael S. Tsirkin wrote: > On Mon, Jun 01, 2009 at 02:05:10PM +0530, Amit Shah wrote: > > On (Mon) Jun 01 2009 [11:11:06], Michael S. Tsirkin wrote: > > > On Mon, Jun 01, 2009 at 01:33:48PM +0530, Amit Shah wrote: > > > > Hell

Re: find_vqs operation starting at arbitrary index

2009-06-02 Thread Amit Shah
On (Tue) Jun 02 2009 [19:32:27], Michael S. Tsirkin wrote: > On Tue, Jun 02, 2009 at 08:53:07AM +0930, Rusty Russell wrote: > > On Mon, 1 Jun 2009 05:33:48 pm Amit Shah wrote: > > > Hello, > > > > > > The recent find_vqs operation doesn't allow for a vq t

virtio-serial: A guest <-> host interface for simple communication

2009-06-23 Thread Amit Shah
Hello, Here are two patches. One implements a virtio-serial device in qemu and the other is the driver for a guest kernel. While working on a vmchannel interface that is needed for communication between guest userspace and host userspace, I saw that most of the interface can be abstracted out as

[PATCH] virtio_serial: A char device for simple guest <-> host communication

2009-06-23 Thread Amit Shah
like this: fd = open("/dev/vmch0", O_RDWR); ret = read(fd, buf, 100); ret = write(fd, string, strlen(string)); ret = ioctl(fd, VIRTIO_SERIAL_IOCTL_GET_PORT_NAME, &port_name); Signed-off-by: Amit Shah --- drivers/char/Kconfig |6

[PATCH] virtio-serial: virtio device for simple host <-> guest communication

2009-06-23 Thread Amit Shah
al interface is a paravirtualised guest<->host + * communication channel for relaying short messages and events in + * either direction. + * + * There's support for multiple serial channels within one virtio PCI + * device to keep the guest PCI device count low. + * + * Copyright (C) 2009, Red Hat

Re: [Qemu-devel] virtio-serial: A guest <-> host interface for simple communication

2009-06-23 Thread Amit Shah
On (Tue) Jun 23 2009 [13:55:52], Paul Brook wrote: > > Here are two patches. One implements a virtio-serial device in qemu > > and the other is the driver for a guest kernel. > > So I'll ask again. Why is this separate from virtio-console? I'm basically writing a vmchannel and found out that a lo

Re: virtio-serial: A guest <-> host interface for simple communication

2009-06-24 Thread Amit Shah
On (Wed) Jun 24 2009 [13:45:01], Rusty Russell wrote: > On Tue, 23 Jun 2009 10:12:31 pm Amit Shah wrote: > > Hello, > > > > Here are two patches. One implements a virtio-serial device in qemu > > and the other is the driver for a guest kernel. > > > > While w

Re: [Qemu-devel] virtio-serial: A guest <-> host interface for simple communication

2009-06-24 Thread Amit Shah
On (Wed) Jun 24 2009 [17:40:49], Jamie Lokier wrote: > Amit Shah wrote: > > A few sample uses for a vmchannel are to share the host and guest > > clipboards (to allow copy/paste between a host and a guest), to > > lock the screen of the guest session when the vnc viewer is cl

Re: [Qemu-devel] virtio-serial: A guest <-> host interface for simple communication

2009-06-24 Thread Amit Shah
On (Wed) Jun 24 2009 [18:50:02], Jamie Lokier wrote: > Amit Shah wrote: > > On (Wed) Jun 24 2009 [17:40:49], Jamie Lokier wrote: > > > Amit Shah wrote: > > > > A few sample uses for a vmchannel are to share the host and guest > > > > clipboards (to allow

Re: [Qemu-devel] virtio-serial: A guest <-> host interface for simple communication

2009-06-24 Thread Amit Shah
On (Wed) Jun 24 2009 [20:20:27], Jamie Lokier wrote: > Amit Shah wrote: > > > > I think the interface from the guest POV stays the same: reads / writes > > to char devices. With virtio-serial, though, we can add a few other > > interesting things like names to ports,

Re: virtio-serial: A guest <-> host interface for simple communication

2009-06-25 Thread Amit Shah
On (Thu) Jun 25 2009 [21:03:02], Rusty Russell wrote: > On Wed, 24 Jun 2009 10:09:37 pm Amit Shah wrote: > > On (Wed) Jun 24 2009 [13:45:01], Rusty Russell wrote: > > > On Tue, 23 Jun 2009 10:12:31 pm Amit Shah wrote: > > > > Hello, > > > > > > &

[RFC PATCH v3] virito-serial: A guest <-> host interface

2009-07-03 Thread Amit Shah
Hello, This is a new iteration of the patches that implement virtio-serial. Changes include: * Adding support for port hot-add * Creating ports at specific ids that can be bound to specific apps / usage * Cleanups This code still doesn't get rid of the support for assigning names to ports but

[PATCH] virtio_serial: A char device for simple guest <-> host communication

2009-07-03 Thread Amit Shah
like this: fd = open("/dev/vmch0", O_RDWR); ret = read(fd, buf, 100); ret = write(fd, string, strlen(string)); Each port is to be assigned a unique function, for example, the first 4 ports may be reserved for libvirt usage, the next 4 for generic streaming data and so on. Sign

[PATCH] virtio-serial: virtio device for simple host <-> guest communication

2009-07-03 Thread Amit Shah
ial interface + * + * This serial interface is a paravirtualised guest<->host + * communication channel for relaying short messages and events in + * either direction. + * + * There's support for multiple serial channels within one virtio PCI + * device to keep the guest PCI device count

Re: qemu-kvm missing some msix capability check

2009-07-23 Thread Amit Shah
On (Tue) Jul 21 2009 [19:54:00], Michael S. Tsirkin wrote: > On Fri, Jul 17, 2009 at 06:34:40PM +0530, Amit Shah wrote: > > Hello, > > > > Using recent qemu-kvm userspace with a slightly older kernel module I > > get this when using the virtio-net device: I was gett

[PATCH 3/3] virtio-serial: vnc: support for sending / receiving guest clipboard

2009-07-27 Thread Amit Shah
- Send ServerCutText message over to the vnc client from qemu on every write to the clipboard port via virtio-serial - On receiving ClientCutText message send over the data to the guest via virtio-serial. Signed-off-by: Amit Shah --- hw/virtio-serial.c | 15 +++ hw/virtio

[PATCH 1/3] virtio-serial: virtio device for simple host <-> guest communication

2009-07-27 Thread Amit Shah
ments Signed-off-by: Amit Shah --- Makefile.target|2 +- hw/pc.c| 17 +++ hw/pci.h |1 + hw/qdev.c |6 +- hw/virtio-pci.c| 17 +++ hw/virtio-serial.c | 367 hw/virtio-serial.h | 36

[PATCH 1/1] virtio_serial: A char device for simple guest <-> host communication

2009-07-27 Thread Amit Shah
ments, use-cases and some history see http://www.linux-kvm.org/page/VMchannel_Requirements Signed-off-by: Amit Shah --- drivers/char/Kconfig |6 + drivers/char/Makefile |1 + drivers/char/virtio_serial.c | 690 + include/linux/vir

[PATCH 2/3] vnc: add a is_vnc_active() helper

2009-07-27 Thread Amit Shah
This helper is introduced to query the status of vnc. Signed-off-by: Amit Shah --- vnc.c | 10 +- vnc.h |2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/vnc.c b/vnc.c index de0ff87..e4e78dc 100644 --- a/vnc.c +++ b/vnc.c @@ -176,9 +176,17 @@ static void

virtio-serial: An interface for host-guest communication

2009-07-27 Thread Amit Shah
Hello all, This are the latest version of the patches. Lots of things have changed since the last submission. A few of which I remember: - VNC copy / paste works* (* conditions apply) - client vnc copies get propagated to guest port 3 (/dev/vmch3) - guest writes to port 3 (/dev/vmch3) go str

Re: [Qemu-devel] Re: virtio-serial: An interface for host-guest communication

2009-07-28 Thread Amit Shah
On (Mon) Jul 27 2009 [18:44:28], Anthony Liguori wrote: > Jamie Lokier wrote: >> With multiple X servers, there can be more than one currently logged in user. >> >> Same with multiple text consoles - that's more familiar. >> >> Which one owns /dev/vmch3? >> > > For a VMM, copy/paste should work

Re: [PATCHv4 2/2] virtio: refactor find_vqs

2009-07-28 Thread Amit Shah
l > > - probe failure when vq can't be assigned to msi-x vector > > (reported on old host kernels) > > > > An older version of this patch was tested by Amit Shah. > > OK, I've applied both of these; I'd like to see a new test by Amit to > make sure

Re: [Qemu-devel] Re: virtio-serial: An interface for host-guest communication

2009-07-29 Thread Amit Shah
On (Tue) Jul 28 2009 [08:42:32], Anthony Liguori wrote: > Amit Shah wrote: >> Right; use virtio just as the transport and all the interesting >> activity happens in userspaces. That was the basis with which I started. >> I can imagine dbus doing the copy/paste, lock

Re: [PATCH 1/1] virtio_serial: A char device for simple guest <-> host communication

2009-08-04 Thread Amit Shah
On (Wed) Aug 05 2009 [09:33:40], Rusty Russell wrote: > On Tue, 28 Jul 2009 03:34:33 am Amit Shah wrote: > > We expose multiple char devices ("ports") for simple communication > > between the host userspace and guest. > > Hi Amit, > >OK, seems like it&#

Re: [PATCH 1/1] virtio_serial: A char device for simple guest <-> host communication

2009-08-05 Thread Amit Shah
On (Wed) Aug 05 2009 [09:33:40], Rusty Russell wrote: > On Tue, 28 Jul 2009 03:34:33 am Amit Shah wrote: > > We expose multiple char devices ("ports") for simple communication > > between the host userspace and guest. > > Hi Amit, > >OK, seems like it&#

Re: [Qemu-devel] Re: virtio-serial: An interface for host-guest communication

2009-08-06 Thread Amit Shah
On (Wed) Aug 05 2009 [18:57:13], Jamie Lokier wrote: > Anthony Liguori wrote: > > Richard W.M. Jones wrote: > > Have you considered using a usb serial device? Something attractive > > about it is that a productid/vendorid can be specified which means that > > you can use that as a method of enum

Re: [Qemu-devel] Re: virtio-serial: An interface for host-guest communication

2009-08-06 Thread Amit Shah
On (Wed) Aug 05 2009 [13:00:57], Anthony Liguori wrote: > Jamie Lokier wrote: >> Anthony Liguori wrote: >> >>> Richard W.M. Jones wrote: >>> Have you considered using a usb serial device? Something attractive >>> about it is that a productid/vendorid can be specified which means >>> that you

Re: [Qemu-devel] Re: virtio-serial: An interface for host-guest communication

2009-08-06 Thread Amit Shah
On (Thu) Aug 06 2009 [08:29:40], Anthony Liguori wrote: > Amit Shah wrote: >> Sure; but there's been no resistance from anyone from including the >> virtio-serial device driver so maybe we don't need to discuss that. >> > > There certainly is from me. The

Re: [Qemu-devel] Re: virtio-serial: An interface for host-guest communication

2009-08-06 Thread Amit Shah
On (Thu) Aug 06 2009 [08:58:01], Anthony Liguori wrote: > Amit Shah wrote: >> On (Thu) Aug 06 2009 [08:29:40], Anthony Liguori wrote: >> >>> Amit Shah wrote: >>> >>>> Sure; but there's been no resistance from anyone from including the >&

Re: [Qemu-devel] Re: virtio-serial: An interface for host-guest communication

2009-08-06 Thread Amit Shah
On (Thu) Aug 06 2009 [18:37:40], Jamie Lokier wrote: > Amit Shah wrote: > > On (Thu) Aug 06 2009 [08:58:01], Anthony Liguori wrote: > > > Amit Shah wrote: > > >> On (Thu) Aug 06 2009 [08:29:40], Anthony Liguori wrote: > > >> > > >>> Amit

Re: [Qemu-devel] Re: virtio-serial: An interface for host-guest communication

2009-08-10 Thread Amit Shah
On (Fri) Aug 07 2009 [09:14:43], Anthony Liguori wrote: > Amit Shah wrote: >> On (Thu) Aug 06 2009 [18:37:40], Jamie Lokier wrote: >> >>> Apart from dbus, hard-coded meanings of small N in /dev/vmchN are >>> asking for trouble. It is bound to break when widely

Re: [Qemu-devel] Re: virtio-serial: An interface for host-guest communication

2009-08-14 Thread Amit Shah
On (Mon) Aug 10 2009 [11:59:31], Anthony Liguori wrote: > > However, as I've mentioned repeatedly, the reason I won't merge > virtio-serial is that it duplicates functionality with virtio-console. > If the two are converged, I'm happy to merge it. I'm not opposed to > having more functional

Re: [Qemu-devel] Re: virtio-serial: An interface for host-guest communication

2009-08-14 Thread Amit Shah
On (Fri) Aug 14 2009 [08:29:28], Anthony Liguori wrote: > Amit Shah wrote: >> On (Mon) Aug 10 2009 [11:59:31], Anthony Liguori wrote: >> >>> However, as I've mentioned repeatedly, the reason I won't merge >>> virtio-serial is that it duplicates f

[PATCH 1/2] virtio: Add a can_add_buf helper

2009-08-18 Thread Amit Shah
This helper returns 1 if a call to add_buf will not fail with -ENOSPC. This will help callers that do while(1) { alloc() if (add_buf()) { free(); break; } } This will result in one less alloc/free exercise. Signed-off-by: Amit Shah

[PATCH 2/2] virtio_net: Use can_add_buf to test for enough room to add

2009-08-18 Thread Amit Shah
Use the can_add_buf virtqueue operation to test if there's room to add another buf to the queue. Saves us one cycle of alloc-add-free if the queue was full. Signed-off-by: Amit Shah --- drivers/net/virtio_net.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/dr

[PATCH v2 1/2] virtio: Add a can_add_buf helper

2009-08-19 Thread Amit Shah
This helper returns 1 if a call to add_buf will not fail with -ENOSPC. This will help callers that do while(1) { alloc() if (add_buf()) { free(); break; } } This will result in one less alloc/free exercise. Signed-off-by: Amit Shah

[PATCH v2 2/2] virtio_net: Use can_add_buf to test for enough room to add

2009-08-19 Thread Amit Shah
Use the can_add_buf virtqueue operation to test if there's room to add another buf to the queue. Saves us one cycle of alloc-add-free if the queue was full. Signed-off-by: Amit Shah --- v2: convert usage in try_fill_recv() as well drivers/net/virtio_net.c |4 ++-- 1 files chang

Re: [Qemu-devel] Re: virtio-serial: An interface for host-guest communication

2009-08-20 Thread Amit Shah
On (Thu) Aug 20 2009 [09:44:29], Gerd Hoffmann wrote: > On 08/20/09 09:31, Rusty Russell wrote: >> On Sat, 15 Aug 2009 01:55:32 am Anthony Liguori wrote: >>> Gerd Hoffmann wrote: Also I still think passing a 'protocol' string for each port is a good idea, so you can stick that into a sysf

Re: [Qemu-devel] Re: virtio-serial: An interface for host-guest communication

2009-08-20 Thread Amit Shah
On (Fri) Aug 14 2009 [08:29:28], Anthony Liguori wrote: > Amit Shah wrote: >> On (Mon) Aug 10 2009 [11:59:31], Anthony Liguori wrote: >> >>> However, as I've mentioned repeatedly, the reason I won't merge >>> virtio-serial is that it duplicates f

Re: [Qemu-devel] Re: virtio-serial: An interface for host-guest communication

2009-08-20 Thread Amit Shah
On (Thu) Aug 20 2009 [15:25:09], Daniel P. Berrange wrote: > On Thu, Aug 20, 2009 at 07:12:41PM +0530, Amit Shah wrote: > > > > I've now seen some more code here and to me it looks like virtioconsole > > is not used on any of the guests that qemu supports. The virtio

Re: [Qemu-devel] Re: virtio-serial: An interface for host-guest communication

2009-08-20 Thread Amit Shah
On (Thu) Aug 20 2009 [20:08:02], Amit Shah wrote: > On (Thu) Aug 20 2009 [15:25:09], Daniel P. Berrange wrote: > > On Thu, Aug 20, 2009 at 07:12:41PM +0530, Amit Shah wrote: > > > > > > I've now seen some more code here and to me it looks like virtioconsole > &

Re: [PATCH 1/2] virtio: Add a can_add_buf helper

2009-08-24 Thread Amit Shah
On (Sat) Aug 22 2009 [17:31:26], Rusty Russell wrote: > On Wed, 19 Aug 2009 01:31:29 am Amit Shah wrote: > > This helper returns 1 if a call to add_buf will not fail > > with -ENOSPC. > > > > This will help callers that do > > > > while(1

Extending virtio_console to support multiple ports

2009-08-24 Thread Amit Shah
Hello all, Here is a new iteration of the patch series that implements a transport for guest and host communications. The code has been updated to reuse the virtio-console device instead of creating a new virtio-serial device. I've tested for compatibility (old qemu & new kernel, new qemu & old

[PATCH 1/3] char: Emit 'CLOSED' events on char device close

2009-08-24 Thread Amit Shah
Notify users of the char interface whenever the file / connection is closed. Signed-off-by: Amit Shah --- qemu-char.c | 10 ++ qemu-char.h |1 + 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index be27994..c25ed1c 100644 --- a/qemu

[PATCH 2/3] virtio-console: rename dvq to ovq

2009-08-24 Thread Amit Shah
It isn't obvious what 'dvq' stands for. Since it's the output queue and the corresponding input queue is called 'ivq', call this 'ovq' Signed-off-by: Amit Shah --- hw/virtio-console.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff

[PATCH] virtio_console: Add interface for guest and host communication

2009-08-24 Thread Amit Shah
se-cases and some history see http://www.linux-kvm.org/page/VMchannel_Requirements Signed-off-by: Amit Shah --- drivers/char/Kconfig |4 +- drivers/char/virtio_console.c | 871 +++- include/linux/virtio_console.h | 27 ++ 3 files change

[PATCH 3/3] virtio-console: Add interface for generic guest-host communication

2009-08-25 Thread Amit Shah
story see http://www.linux-kvm.org/page/VMchannel_Requirements Signed-off-by: Amit Shah --- hw/pc.c | 16 ++- hw/virtio-console.c | 423 +-- hw/virtio-console.h | 47 ++ monitor.c |7 + qemu-monitor.hx |

Re: [PATCH 1/2] virtio: Add a can_add_buf helper

2009-08-25 Thread Amit Shah
On (Tue) Aug 25 2009 [23:57:54], Rusty Russell wrote: > On Mon, 24 Aug 2009 05:09:44 pm Amit Shah wrote: > > sg_init_table(sg, 2+MAX_SKB_FRAGS); > > - for (;;) { > > + ret = 1; > > + while(ret > 0) { /* Is there space to add another buffer to the vq */ &

[PATCH] virtio_net: Check for room in the vq before adding buffer

2009-08-26 Thread Amit Shah
Saves us one cycle of alloc-add-free if the queue was full. Signed-off-by: Amit Shah --- Rusty: Tested this. 256 buffers are allocated with the patch, 257 without (and one is later freed). drivers/net/virtio_net.c |8 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a

Re: Extending virtio_console to support multiple ports

2009-08-26 Thread Amit Shah
On (Tue) Aug 25 2009 [11:47:20], Amit Shah wrote: > > Hello all, > > Here is a new iteration of the patch series that implements a > transport for guest and host communications. > > The code has been updated to reuse the virtio-console device instead > of creating a

Re: Extending virtio_console to support multiple ports

2009-08-26 Thread Amit Shah
[cc'ing some people who have made some commits in hvc_console.c] On (Wed) Aug 26 2009 [16:57:18], Amit Shah wrote: > On (Tue) Aug 25 2009 [11:47:20], Amit Shah wrote: > > > > Hello all, > > > > Here is a new iteration of the patch series that implements a

Re: Extending virtio_console to support multiple ports

2009-08-26 Thread Amit Shah
On (Thu) Aug 27 2009 [15:04:45], Michael Ellerman wrote: > On Wed, 2009-08-26 at 21:15 +0530, Amit Shah wrote: > > [cc'ing some people who have made some commits in hvc_console.c] > > > > On (Wed) Aug 26 2009 [16:57:18], Amit Shah wrote: > > > On (Tue) Aug

Re: [Qemu-devel] Re: Extending virtio_console to support multiple ports

2009-08-27 Thread Amit Shah
On (Thu) Aug 27 2009 [14:07:03], Benjamin Herrenschmidt wrote: > On Wed, 2009-08-26 at 21:15 +0530, Amit Shah wrote: > > > > > > - Convert hvc's usage of spinlocks to mutexes. I've no idea how this > > > will play out; I'm no expert here. But I

Re: [kvm-devel] [PATCH 0/24] paravirt_ops for unified x86 - that's me again!

2007-11-12 Thread Amit Shah
On Saturday 10 November 2007 00:12:41 Glauber de Oliveira Costa wrote: > Hey folks, > > Here's a new spin of the pvops64 patch series. > We didn't get that many comments from the last time, > so it should be probably almost ready to get in. Heya! > > >From the last version, the most notable changes

[PATCH] VIRTIO NET: Enable netpoll interface for netconsole logging

2008-02-29 Thread Amit Shah
Add a new poll_controller handler that the netpoll interface needs. This enables netconsole logging from a kvm guest over the virtio net interface. Signed-off-by: Amit Shah <[EMAIL PROTECTED]> --- drivers/net/virtio_net.c | 12 1 files changed, 12 insertions(+), 0 del

Re: [PATCH] virtio_console: Annotate struct port_buffer with __counted_by

2023-09-25 Thread Amit Shah
; (for array indexing) and CONFIG_FORTIFY_SOURCE (for strcpy/memcpy-family > functions). > > As found with Coccinelle[1], add __counted_by for struct port_buffer. > > [1] > https://github.com/kees/kernel-tools/blob/trunk/coccinelle/examples/counted_by.cocci > > Cc: Amit Shah &

Re: [PATCHv7 0/4] virtio_console: Add rproc_serial driver

2012-10-22 Thread Amit Shah
ugfix and migth be applicable for 3.7. Looks good, Acked-by: Amit Shah include/linux/virtio_ids.h has moved to include/uapi/linux/. Last patch has to be re-spun for that. Otherwise, I just checked if comments from the previous submission were addressed. The virtio-console test suite passes fin

Re: [PATCHv7 4/4] virtio_console: Add support for remoteproc serial

2012-11-01 Thread Amit Shah
On (Tue) 23 Oct 2012 [12:17:49], Rusty Russell wrote: > sjur.brandel...@stericsson.com writes: > > From: Sjur Brændeland > > @@ -1415,7 +1524,16 @@ static void remove_port_data(struct port *port) > > > > /* Remove buffers we queued up for the Host to send us data in. */ > > while ((buf

Re: [PATCHv7 4/4] virtio_console: Add support for remoteproc serial

2012-11-02 Thread Amit Shah
On (Fri) 02 Nov 2012 [09:52:08], Rusty Russell wrote: > Amit Shah writes: > > On (Tue) 23 Oct 2012 [12:17:49], Rusty Russell wrote: > >> sjur.brandel...@stericsson.com writes: > >> > From: Sjur Brændeland > > > >> > @@ -1415,7 +1524,16 @

Re: [PATCHv8 0/3]virtio_console: Add rproc_serial driver

2012-11-05 Thread Amit Shah
On (Mon) 05 Nov 2012 [09:11:45], Rusty Russell wrote: > Sjur Brændeland writes: > > > From: Sjur Brændeland > > > > This patch-set introduces a new virtio type "rproc_serial" for communicating > > with remote processors over shared memory. The driver depends on the > > the remoteproc framework.

Re: [PATCHv8 0/3]virtio_console: Add rproc_serial driver

2012-11-05 Thread Amit Shah
On (Mon) 05 Nov 2012 [11:31:24], Amit Shah wrote: > On (Mon) 05 Nov 2012 [09:11:45], Rusty Russell wrote: > > Sjur Brændeland writes: > > > > > From: Sjur Brændeland > > > > > > This patch-set introduces a new virtio type "rproc_serial" for &

Re: [PATCH resend] virtio_console: Free buffers from out-queue upon close

2012-11-08 Thread Amit Shah
On (Thu) 08 Nov 2012 [10:28:53], Rusty Russell wrote: > sjur.brandel...@stericsson.com writes: > > > From: Sjur Brændeland > > > > Free pending output buffers from the virtio out-queue when > > host has acknowledged port_close. Also removed WARN_ON() > > in remove_port_data(). > > > > Signed-off-

Re: [PATCHv8 0/3]virtio_console: Add rproc_serial driver

2012-11-08 Thread Amit Shah
On (Tue) 30 Oct 2012 [09:51:50], Sjur Brændeland wrote: > From: Sjur Brændeland > > This patch-set introduces a new virtio type "rproc_serial" for communicating > with remote processors over shared memory. The driver depends on the > the remoteproc framework. As preparation for introducing "rproc

[[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal

2012-11-08 Thread Amit Shah
x27;t consume them yet. [Amit: Remove WARN_ON for generic ports case.] Signed-off-by: Sjur Brændeland Signed-off-by: Amit Shah --- drivers/char/virtio_console.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/drivers/char/virtio_console.c b/drivers/char/virtio_cons

[PATCH 0/1] virtio: console: regression in virtqueue_add_buf() change

2012-12-06 Thread Amit Shah
Hi Rusty, The linux-next kernel was failing my virtio-console test suite for a while. I looked into it today, and it's due to the virtqueue_add_buf() change that doesn't return > 0 values anymore. I found your commit that adjusts virtio_console.c, but you missed one instance where the return val

[PATCH 1/1] virtio: console: virtqueue_add_buf() no longer returns > 0

2012-12-06 Thread Amit Shah
From: Rusty Russell We simplified virtqueue_add_buf(), make it clear in the callers. Use the newly-exposed vq->num_free in the two places that used the previous +ve return value. Signed-off-by: Rusty Russell Signed-off-by: Amit Shah # Update add_inbuf() --- drivers/char/virtio_consol

Re: [[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal

2012-12-09 Thread Amit Shah
On (Fri) 16 Nov 2012 [11:22:09], Rusty Russell wrote: > Amit Shah writes: > > From: Sjur Brændeland > > > > Remove buffers from the out-queue when a port is removed. Rproc_serial > > communicates with remote processors that may crash and leave buffers in > >

Re: [PATCHv8 0/3]virtio_console: Add rproc_serial driver

2012-12-09 Thread Amit Shah
On (Thu) 08 Nov 2012 [10:06:24], Amit Shah wrote: > On (Tue) 30 Oct 2012 [09:51:50], Sjur Brændeland wrote: > > From: Sjur Brændeland > > > > This patch-set introduces a new virtio type "rproc_serial" for communicating > > with remote processors over sha

Re: [[PATCH v9 3/3] 1/1] virtio_console: Remove buffers from out_vq at port removal

2012-12-10 Thread Amit Shah
On (Tue) 11 Dec 2012 [09:39:41], Rusty Russell wrote: > Amit Shah writes: > > > On (Fri) 16 Nov 2012 [11:22:09], Rusty Russell wrote: > >> Amit Shah writes: > >> > From: Sjur Brændeland > >> > > >> > Remove buffers from the out-queue

Re: [PATCH] virtio-spec: fix thinko in multiport documentation

2012-12-12 Thread Amit Shah
On (Wed) 12 Dec 2012 [10:22:24], Michael S. Tsirkin wrote: > On Sun, Sep 09, 2012 at 02:08:37PM +0300, Michael S. Tsirkin wrote: > > spec numbers ports port0, port 1 etc, then goes on to say > > "ports 2 onwards only if MULTIPORT is set". > > An obvious thinko, should be port 1 onwards. > > > > Si

  1   2   3   4   5   6   7   8   9   >