Re: [PATCH] maintainers: drop Chris Wright from pvops

2017-10-26 Thread Rusty Russell
:Documentation/parport*.txt > > PARAVIRT_OPS INTERFACE > M: Juergen Gross <jgr...@suse.com> > -M: Chris Wright <chr...@sous-sol.org> > M: Alok Kataria <akata...@vmware.com> > M: Rusty Russell &

Re: [PATCH] paravirt: remove paravirt ops pmd_update[_defer] and pte_update_defer

2015-11-24 Thread Rusty Russell
Juergen Gross <jgr...@suse.com> writes: > Ping? Acked-by: Rusty Russell <ru...@rustcorp.com.au> Cheers, Rusty. ___ Virtualization mailing list Virtualization@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/virtualization

Re: [PATCH] x86/paravirt: remove unused operation

2015-08-30 Thread Rusty Russell
Juergen Gross jgr...@suse.com writes: Ping? Acked-by: Rusty Russell ru...@rustcorp.com.au Cheers, Rusty. On 08/06/2015 01:55 PM, Juergen Gross wrote: Remove the paravirt operation get_tsc_khz as it is used nowhere. Signed-off-by: Juergen Gross jgr...@suse.com --- arch/x86/include/asm

Re: virtio-net: why not always to set avail-flags to VRING_AVAIL_F_NO_INTERRUPT

2015-06-04 Thread Rusty Russell
Linhaifeng haifeng@huawei.com writes: On 2015/6/4 9:13, Rusty Russell wrote: Linhaifeng haifeng@huawei.com writes: Hi, I'm a newbie and have a question about vring_new_virtqueue function. Why we set avail-flags to VRING_AVAIL_F_NO_INTERRUPT when no callbacks? I think we should set

Re: virtio-net: why not always to set avail-flags to VRING_AVAIL_F_NO_INTERRUPT

2015-06-03 Thread Rusty Russell
Linhaifeng haifeng@huawei.com writes: Hi, I'm a newbie and have a question about vring_new_virtqueue function. Why we set avail-flags to VRING_AVAIL_F_NO_INTERRUPT when no callbacks? I think we should set avail-flags to VRING_AVAIL_F_NO_INTERRUPT even if no callbacks. Hi Linhaifeng,

Re: [RFC 4/4] rpmsg: DMA map sgs passed to virtio

2015-05-06 Thread Rusty Russell
Edgar E. Iglesias edgar.igles...@gmail.com writes: From: Edgar E. Iglesias edgar.igles...@xilinx.com Signed-off-by: Edgar E. Iglesias edgar.igles...@xilinx.com First off, I have handed maintainership off to Michael S. Tsirkin, so his word is now law. That said... there's nothing fundamentally

[PATCH] virtio: pass baton to Michael Tsirkin

2015-05-01 Thread Rusty Russell
Russell ru...@rustcorp.com.au diff --git a/MAINTAINERS b/MAINTAINERS index 2e5bbc0d68b2..16227759dfa8 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -10523,7 +10523,6 @@ F: include/linux/virtio_console.h F: include/uapi/linux/virtio_console.h VIRTIO CORE, NET AND BLOCK DRIVERS -M: Rusty

Re: [PATCH] virtio: fix typo in vring_need_event() doc comment

2015-04-20 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Sun, Apr 19, 2015 at 02:36:38PM +0930, Rusty Russell wrote: Stefan Hajnoczi stefa...@redhat.com writes: Here the other side refers to the guest or host. Signed-off-by: Stefan Hajnoczi stefa...@redhat.com Applied. Thanks! Rusty. Just

Re: [PATCH] virtio: fix typo in vring_need_event() doc comment

2015-04-19 Thread Rusty Russell
Stefan Hajnoczi stefa...@redhat.com writes: Here the other side refers to the guest or host. Signed-off-by: Stefan Hajnoczi stefa...@redhat.com Applied. Thanks! Rusty. --- include/uapi/linux/virtio_ring.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH v3 0/6] virtio_balloon: virtio 1 support

2015-04-14 Thread Rusty Russell
, transparently. Signed-off-by: Michael S. Tsirkin m...@redhat.com Acked-by: Cornelia Huck cornelia.h...@de.ibm.com Signed-off-by: Rusty Russell ru...@rustcorp.com.au diff --git a/drivers/virtio/virtio_balloon.c b/drivers/virtio/virtio_balloon.c index 6a356e344f82..9db546ebe5a1 100644 --- a/drivers/virtio

Re: [PATCH] virtio_balloon: drop virtio_balloon_stat_modern

2015-04-14 Thread Rusty Russell
Cornelia Huck cornelia.h...@de.ibm.com writes: On Tue, 14 Apr 2015 12:01:13 +0200 Michael S. Tsirkin m...@redhat.com wrote: Looks like we are better off sticking with the misaligned stat struct, to reduce the amount of virtio 1 specific code in balloon. So let's do it. Add a detailed

Re: [PATCH v3 0/6] virtio_balloon: virtio 1 support

2015-04-13 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Wed, Apr 01, 2015 at 02:57:35PM +0200, Michael S. Tsirkin wrote: Virtio 1.0 doesn't include a modern balloon device. At some point we'll likely define an incompatible interface with a different ID and different semantics. But for now, it's not

Re: [PATCH] virtio_config: reorder functions

2015-04-10 Thread Rusty Russell
Cornelia Huck cornelia.h...@de.ibm.com writes: On Wed, 8 Apr 2015 16:49:46 +0200 Michael S. Tsirkin m...@redhat.com wrote: On Tue, Mar 31, 2015 at 05:17:25PM +0200, Michael S. Tsirkin wrote: This simply reorders functions in virtio_config so width access wrapper helpers are all together.

Re: [PATCH] virtio_ring: Update weak barriers to use dma_wmb/rmb

2015-04-10 Thread Rusty Russell
Alexander Duyck alexander.h.du...@redhat.com writes: This change makes it so that instead of using smp_wmb/rmb which varies depending on the kernel configuration we can can use dma_wmb/rmb which for most architectures should be equal to or slightly more strict than smp_wmb/rmb. The advantage

[PATCH net-next] netdevice: document NETDEV_TX_BUSY deprecation.

2015-04-03 Thread Rusty Russell
This paraphrases DaveM (and steals some of his words) explaining why a device shouldn't return NETDEV_TX_BUSY, even though it looks so inviting to driver authors. See http://www.spinics.net/lists/netdev/msg322350.html Inspired-by: David Miller da...@davemloft.net Signed-off-by: Rusty Russell ru

Re: [PATCH] virtio: drop a useless config read

2015-03-31 Thread Rusty Russell
Cornelia Huck cornelia.h...@de.ibm.com writes: On Tue, 31 Mar 2015 13:55:42 +0200 Michael S. Tsirkin m...@redhat.com wrote: commit d71de9ec6ba806104439d3a669befda84757b5af virtio: core support for config generation fixed reading up 64 bit values, adding generation checks for such reads.

Re: [PATCH v2 1/6] virtio_balloon: transitional interface

2015-03-31 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: Virtio 1.0 doesn't include a modern balloon device. But it's not a big change to support a transitional balloon device: this has the advantage of supporting existing drivers, transparently. You decided to fix the packed struct... diff --git

Re: [PATCH v5] Add virtio-input driver.

2015-03-26 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Thu, Mar 26, 2015 at 11:49:25AM +0100, Gerd Hoffmann wrote: virtio-input is basically evdev-events-over-virtio, so this driver isn't much more than reading configuration from config space and forwarding incoming events to the linux input layer.

Re: [PATCH v4] Add virtio-input driver.

2015-03-25 Thread Rusty Russell
Vojtech Pavlik vojt...@suse.com writes: On Wed, Mar 25, 2015 at 01:51:43PM +1030, Rusty Russell wrote: Imagine a future virtio standard which incorporates this. And a Windows or FreeBSD implementation of the device and or driver. How ugly would they be? A windows translation layer

Re: [PATCH net-next] virtio: change comment in transmit

2015-03-24 Thread Rusty Russell
Stephen Hemminger step...@networkplumber.org writes: The original comment was not really informative or funny as well as sexist. Replace it with a better explanation of why the driver does stop and what the impacts are. Signed-off-by: Stephen Hemminger step...@networkplumber.org Fair call.

Re: [PATCH v4] Add virtio-input driver.

2015-03-24 Thread Rusty Russell
Gerd Hoffmann kra...@redhat.com writes: virtio-input is basically evdev-events-over-virtio, so this driver isn't much more than reading configuration from config space and forwarding incoming events to the linux input layer. Signed-off-by: Gerd Hoffmann kra...@redhat.com Is the input layer

Re: [PATCH] virtio_mmio: fix endian-ness for mmio

2015-03-12 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Thu, Mar 12, 2015 at 12:33:36PM +1030, Rusty Russell wrote: Michael S. Tsirkin m...@redhat.com writes: Going over the virtio mmio code, I noticed that it doesn't correctly return device config values in LE format when using virtio 1.0. Borrow

Re: [PATCH v2 log fixed] virtio_mmio: fix endian-ness for mmio

2015-03-12 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: Subject: [PATCH] virtio_mmio: fix access width for mmio Just for the record: Applied. Thanks, Rusty. Going over the virtio mmio code, I noticed that it doesn't correctly access modern device config values using natural accessors: it uses readb to

Re: [PATCH] uapi/virtio_scsi: allow overriding CDB/SENSE size

2015-03-12 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Wed, Mar 11, 2015 at 02:19:03PM +0100, Michael S. Tsirkin wrote: QEMU wants to use virtio scsi structures with a different VIRTIO_SCSI_CDB_SIZE/VIRTIO_SCSI_SENSE_SIZE, let's add ifdefs to allow overriding them. Keep the old defines under new

Re: [PATCH] virtio_rpmsg: set DRIVER_OK before using device

2015-03-11 Thread Rusty Russell
Ohad Ben-Cohen o...@wizery.com writes: On Mon, Mar 9, 2015 at 10:41 AM, Michael S. Tsirkin m...@redhat.com wrote: On Sat, Mar 07, 2015 at 08:06:56PM +0100, Michael S. Tsirkin wrote: virtio spec requires that all drivers set DRIVER_OK before using devices. While rpmsg isn't yet included in the

Re: virtio balloon: do not call blocking ops when !TASK_RUNNING

2015-03-09 Thread Rusty Russell
Cornelia Huck cornelia.h...@de.ibm.com writes: On Wed, 4 Mar 2015 11:25:56 +0100 Michael S. Tsirkin m...@redhat.com wrote: On Wed, Mar 04, 2015 at 04:44:54PM +1030, Rusty Russell wrote: Michael S. Tsirkin m...@redhat.com writes: On Mon, Mar 02, 2015 at 10:37:26AM +1030, Rusty Russell

Re: [PATCH v2] virtio-balloon: do not call blocking ops when !TASK_RUNNING

2015-03-09 Thread Rusty Russell
Thomas Huth th...@linux.vnet.ibm.com writes: On Wed, 25 Feb 2015 16:11:27 +0100 Cornelia Huck cornelia.h...@de.ibm.com wrote: On Wed, 25 Feb 2015 15:36:02 +0100 Michael S. Tsirkin m...@redhat.com wrote: virtio balloon has this code: wait_event_interruptible(vb-config_change,

Re: [PATCH] virtio_balloon: set DRIVER_OK before using device

2015-03-09 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Thu, Mar 05, 2015 at 01:24:47PM +1030, Rusty Russell wrote: Michael S. Tsirkin m...@redhat.com writes: virtio spec requires that all drivers set DRIVER_OK before using devices. While balloon isn't yet included in the virtio 1 spec, previous

Re: [PATCH] virtio_rpmsg: set DRIVER_OK before using device

2015-03-09 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: virtio spec requires that all drivers set DRIVER_OK before using devices. While rpmsg isn't yet included in the virtio 1 spec, previous spec versions also required this. virtio rpmsg violates this rule: is calls kick before setting DRIVER_OK. The

Re: virtio fixes pull for 4.0?

2015-03-09 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: Hi Rusty! There are a bunch of (mostly virtio 1.0 related) fixes for virtio that need to go into 4.0 I think. virtio_blk: typo fix virtio_blk: fix comment for virtio 1.0 OK, I've added these two. I tend to be overcautious after the

Re: [PATCH] virtio_balloon: set DRIVER_OK before using device

2015-03-04 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: virtio spec requires that all drivers set DRIVER_OK before using devices. While balloon isn't yet included in the virtio 1 spec, previous spec versions also required this. virtio balloon might violate this rule: probe calls kthread_run before

Re: [PATCH 2/2] virtio-pci: switch to modern accessors for 1.0

2015-03-04 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Wed, Mar 04, 2015 at 11:06:08AM +1030, Rusty Russell wrote: Michael S. Tsirkin m...@redhat.com writes: virtio 1.0 config space is in LE format for all devices, use modern wrappers when accessed through the 1.0 BAR. Hmm, I'm not so sure about

Re: virtio balloon: do not call blocking ops when !TASK_RUNNING

2015-03-03 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Mon, Mar 02, 2015 at 10:37:26AM +1030, Rusty Russell wrote: Thomas Huth th...@linux.vnet.ibm.com writes: On Thu, 26 Feb 2015 11:50:42 +1030 Rusty Russell ru...@rustcorp.com.au wrote: Thomas Huth th...@linux.vnet.ibm.com writes: Hi all

Re: [PATCH 2/2] virtio-pci: switch to modern accessors for 1.0

2015-03-03 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: virtio 1.0 config space is in LE format for all devices, use modern wrappers when accessed through the 1.0 BAR. Hmm, I'm not so sure about these patches. It's easy to miss the existence of the _modern variants, and they're 90% the same as the legacy

Re: [PATCH] virtio_console: avoid config access from irq

2015-03-03 Thread Rusty Russell
Amit Shah amit.s...@redhat.com writes: On (Sat) 28 Feb 2015 [18:42:25], Michael S. Tsirkin wrote: when multiport is off, virtio console invokes config access from irq context, config access is blocking on s390. Fix this up by scheduling work from config irq - similar to what we do for

Re: [PATCH] virtio_console: init work unconditionally

2015-03-03 Thread Rusty Russell
Amit Shah amit.s...@redhat.com writes: On (Sat) 28 Feb 2015 [18:41:34], Michael S. Tsirkin wrote: when multiport is off, we don't initialize config work, but we then cancel uninitialized control_work on freeze. Signed-off-by: Michael S. Tsirkin m...@redhat.com Reviewed-by: Amit Shah

Re: [PATCH 2/2] virtio_blk: fix comment for virtio 1.0

2015-03-02 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: Fix up comment to match virtio 1.0 logic: virtio_blk_outhdr isn't the first elements anymore, the only requirement is that it comes first in the s/g list. Signed-off-by: Michael S. Tsirkin m...@redhat.com Thanks, both applied. Cheers, Rusty.

Re: virtio balloon: do not call blocking ops when !TASK_RUNNING

2015-03-02 Thread Rusty Russell
Thomas Huth th...@linux.vnet.ibm.com writes: On Thu, 26 Feb 2015 11:50:42 +1030 Rusty Russell ru...@rustcorp.com.au wrote: Thomas Huth th...@linux.vnet.ibm.com writes: Hi all, with the recent kernel 3.19, I get a kernel warning when I start my KVM guest on s390 with virtio balloon

Re: virtio balloon: do not call blocking ops when !TASK_RUNNING

2015-02-25 Thread Rusty Russell
Thomas Huth th...@linux.vnet.ibm.com writes: Hi all, with the recent kernel 3.19, I get a kernel warning when I start my KVM guest on s390 with virtio balloon enabled: The deeper problem is that virtio_ccw_get_config just silently fails on OOM. Neither get_config nor set_config are expected

Qemu and virtio 1.0

2015-02-24 Thread Rusty Russell
laptop, and a BE and LE guest on a BE powerpc machine, to check that all combinations work correctly. If others test too, that would be appreciated! Cheers, Rusty. From 95ac91554ed602f856a2a5fcc25eaffcad1b1c8d Mon Sep 17 00:00:00 2001 From: Rusty Russell ru...@rustcorp.com.au Date: Tue, 24 Feb 2015

[PULL] virtio-next

2015-02-17 Thread Rusty Russell
version Rusty Russell (53): virtio-pci: define layout for virtio 1.0 virtio_pci: macros for PCI layout offsets virtio: define VIRTIO_PCI_CAP_PCI_CFG in header. virtio: Don't expose legacy block features when VIRTIO_BLK_NO_LEGACY defined. virtio: Don't expose legacy config

Re: [PATCH 1/2] virtio_pci_modern: type-safe io accessors

2015-02-15 Thread Rusty Russell
Rusty Russell ru...@rustcorp.com.au writes: Michael S. Tsirkin m...@redhat.com writes: The spec is very clear on this: 4.1.3.1 Driver Requirements: PCI Device Layout The driver MUST access each field using the “natural” access method, i.e. 32-bit accesses for 32-bit fields, 16-bit accesses

Re: [PATCH RFC v5 net-next 4/6] virtio-net: add basic interrupt coalescing support

2015-02-15 Thread Rusty Russell
Cornelia Huck cornelia.h...@de.ibm.com writes: On Fri, 13 Feb 2015 13:22:09 +1030 Rusty Russell ru...@rustcorp.com.au wrote: Michael S. Tsirkin m...@redhat.com writes: On Tue, Feb 10, 2015 at 12:02:37PM +1030, Rusty Russell wrote: Jason Wang jasow...@redhat.com writes: This patch

Re: [PATCH RFC v5 net-next 4/6] virtio-net: add basic interrupt coalescing support

2015-02-15 Thread Rusty Russell
Pawel Moll pawel.m...@arm.com writes: On Fri, 2015-02-13 at 02:52 +, Rusty Russell wrote: Michael S. Tsirkin m...@redhat.com writes: On Tue, Feb 10, 2015 at 12:02:37PM +1030, Rusty Russell wrote: Jason Wang jasow...@redhat.com writes: This patch enables the interrupt coalescing

Re: [PATCH 1/2] virtio_pci_modern: type-safe io accessors

2015-02-15 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: The spec is very clear on this: 4.1.3.1 Driver Requirements: PCI Device Layout The driver MUST access each field using the “natural” access method, i.e. 32-bit accesses for 32-bit fields, 16-bit accesses for 16-bit fields and 8-bit accesses for

[PATCH] virtio: don't set VIRTIO_CONFIG_S_DRIVER_OK twice.

2015-02-12 Thread Rusty Russell
I noticed this with the console device. It's not *wrong*, just a bit weird. Signed-off-by: Rusty Russell ru...@rustcorp.com.au diff --git a/drivers/virtio/virtio.c b/drivers/virtio/virtio.c index b9f70dfc4751..5ce2aa48fc6e 100644 --- a/drivers/virtio/virtio.c +++ b/drivers/virtio/virtio.c

Re: [PATCH RFC v5 net-next 4/6] virtio-net: add basic interrupt coalescing support

2015-02-12 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Tue, Feb 10, 2015 at 12:02:37PM +1030, Rusty Russell wrote: Jason Wang jasow...@redhat.com writes: This patch enables the interrupt coalescing setting through ethtool. The problem is that there's nothing network specific about interrupt

Re: [PATCH] virtual: Documentation: simplify and generalize paravirt_ops.txt

2015-02-11 Thread Rusty Russell
Luis R. Rodriguez mcg...@do-not-panic.com writes: From: Luis R. Rodriguez mcg...@suse.com The general documentation we have for pv_ops is currenty present on the IA64 docs, but since this documentation covers IA64 xen enablement and IA64 Xen support got ripped out a while ago through commit

[PATCH 2/2] virtio: Introducing virtio_pci.no_mmio, the worst boot option in history.

2015-02-10 Thread Rusty Russell
at offset cap.offset at BAR selected by cap.bar and store the first cap.length bytes in pci_cfg_data. Signed-off-by: Rusty Russell ru...@rustcorp.com.au --- drivers/virtio/virtio_pci_common.c | 31 ++- drivers/virtio/virtio_pci_common.h | 21 + drivers/virtio

[PATCH 1/2] virtio_pci: abstract all MMIO accesses.

2015-02-10 Thread Rusty Russell
This is in preparation for testing the virtio pci config mmio backdoor. Signed-off-by: Rusty Russell ru...@rustcorp.com.au --- drivers/virtio/virtio_pci_common.c | 47 - drivers/virtio/virtio_pci_common.h | 41 +++ drivers/virtio/virtio_pci_modern.c | 140

[RFC 0/2] virtio_pci: patches never to apply.

2015-02-10 Thread Rusty Russell
This should allow testing when QEMU gets VIRTIO_PCI_CAP_PCI_CFG support, but I'm pretty sure we should never allow these patches upstream. Tested with lguest (in virtio-next), which supports VIRTIO_PCI_CAP_PCI_CFG. Rusty Russell (2): virtio_pci: abstract all MMIO accesses. virtio

Re: [PATCH RFC v5 net-next 1/6] virtio_ring: fix virtqueue_enable_cb() when only 1 buffers were pending

2015-02-10 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Tue, Feb 10, 2015 at 11:33:52AM +1030, Rusty Russell wrote: Jason Wang jasow...@redhat.com writes: We currently does: bufs = (avail-idx - last_used_idx) * 3 / 4; This is ok now since we only try to enable the delayed callbacks when

Re: [PATCH RFC v5 net-next 2/6] virtio_ring: try to disable event index callbacks in virtqueue_disable_cb()

2015-02-09 Thread Rusty Russell
. Signed-off-by: Jason Wang jasow...@redhat.com Acked-by: Rusty Russell ru...@rustcorp.com.au --- drivers/virtio/virtio_ring.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 545fed5..e9ffbfb 100644 --- a/drivers/virtio

Re: [PATCH RFC v5 net-next 4/6] virtio-net: add basic interrupt coalescing support

2015-02-09 Thread Rusty Russell
: Rusty Russell ru...@rustcorp.com.au Cc: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/net/virtio_net.c| 67 + include/uapi/linux/virtio_net.h | 12 2 files changed, 79 insertions

Re: [PATCH RFC v5 net-next 1/6] virtio_ring: fix virtqueue_enable_cb() when only 1 buffers were pending

2015-02-09 Thread Rusty Russell
Jason Wang jasow...@redhat.com writes: We currently does: bufs = (avail-idx - last_used_idx) * 3 / 4; This is ok now since we only try to enable the delayed callbacks when the queue is about to be full. This may not work well when there is only one pending buffer in the virtqueue (this may

[PATCH] virtio_pci: use 16-bit accessor for queue_enable.

2015-02-09 Thread Rusty Russell
and 8-bit accesses for 8-bit fields. Signed-off-by: Rusty Russell ru...@rustcorp.com.au diff --git a/drivers/virtio/virtio_pci_modern.c b/drivers/virtio/virtio_pci_modern.c index f16e462cb4ef..2aa38e59db2e 100644 --- a/drivers/virtio/virtio_pci_modern.c +++ b/drivers/virtio/virtio_pci_modern.c

Re: [PATCH] virtio: Avoid possible kernel panic if DEBUG is enabled.

2015-02-08 Thread Rusty Russell
Tetsuo Handa penguin-ker...@i-love.sakura.ne.jp writes: From 11fd997d724f520ca628615e7ffbfd7901c40b62 Mon Sep 17 00:00:00 2001 From: Tetsuo Handa penguin-ker...@i-love.sakura.ne.jp Date: Fri, 6 Feb 2015 13:28:38 +0900 Subject: [PATCH] virtio: Avoid possible kernel panic if DEBUG is enabled.

Re: [PATCH] virtio-mmio: Update the device to OASIS spec version

2015-01-21 Thread Rusty Russell
Pawel Moll pawel.m...@arm.com writes: This patch add a support for second version of the virtio-mmio device, which follows OASIS Virtual I/O Device (VIRTIO) Version 1.0 specification. Nice job, that turned out quite neat! Applied, Rusty. ___

Re: [PATCH v2] virtio-mmio: Update the device to OASIS spec version

2015-01-21 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Tue, Jan 20, 2015 at 06:12:11PM +, Pawel Moll wrote: This patch add a support for second version of the virtio-mmio device, which follows OASIS Virtual I/O Device (VIRTIO) Version 1.0 specification. OK, applied this instead :) I'll leave it

Re: virtio for 3.20

2015-01-21 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Mon, Jan 19, 2015 at 12:56:28PM +1030, Rusty Russell wrote: Michael S. Tsirkin m...@redhat.com writes: Hi Rusty, all I parked outstanding virtio patches here: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost-next this way

Re: [PATCH v3 10/16] s390: add pci_iomap_range

2015-01-20 Thread Rusty Russell
Sebastian Ott seb...@linux.vnet.ibm.com writes: On Wed, 14 Jan 2015, Michael S. Tsirkin wrote: } -EXPORT_SYMBOL_GPL(pci_iomap); +EXPORT_SYMBOL_GPL(pci_iomap_range); + +void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long maxlen) +{ +return pci_iomap_range(dev, bar, 0,

Re: [PATCH 0/6] virtio: graceful failure with get == NULL

2015-01-19 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Tue, Jan 13, 2015 at 04:43:07PM +0200, Michael S. Tsirkin wrote: virtio 1.0 says device configuration is optional, but most drivers treat it as mandatory. Even if presented by device, guest bios might disable the BAR holding that configuration,

Re: virtio for 3.20

2015-01-18 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: Hi Rusty, all I parked outstanding virtio patches here: git://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git vhost-next this way they are merged in linux-next as well. Rusty if you'll be doing 3.20 window, would you mind checking that tree

Re: [PATCH] virtio_pci: add module param to force legacy mode

2015-01-18 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: If set, try legacy interface first, modern one if that fails. Useful to work around device/driver bugs, and for compatibility testing. Signed-off-by: Michael S. Tsirkin m...@redhat.com Thanks, I've applied all these to virtio-next. Cheers! Rusty.

Re: [RFC PATCH 0/3] Sharing MSIX irq for tx/rx queue pairs

2015-01-04 Thread Rusty Russell
. For devices that does not use channel, it can simply pass NULL or zero to virito core. With the patch, 1 MSIX irq were saved for each TX/RX queue pair. It seems fairly straightforward. Acked-by: Rusty Russell ru...@rustcorp.com.au Thanks, Rusty

Re: [PATCH 6/6] virtio: core support for config generation

2014-12-21 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: virtio 1.0 spec says: Drivers MUST NOT assume reads from fields greater than 32 bits wide are atomic, nor are reads from multiple fields: drivers SHOULD read device configuration space fields like so: u32 before, after; do {

Re: [PATCH 0/3] fix up vringh/mic sparse errors

2014-12-18 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: This fixes remaining sparse warnings in vringh and mic by using virtio 1.0 compliant wrappers. This also needs by get_user patches to avoid getting warnings from these calls. Tested by running vringh_test. Rusty, I prefer fixing all these

Re: [PATCH 1/6] tools/virtio: more stubs

2014-12-18 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: As usual, add more stubs to fix test build after main codebase changes. This doesn't apply, since: diff --git a/tools/virtio/linux/virtio_config.h b/tools/virtio/linux/virtio_config.h index dafe1c9..806d683 100644 ---

Re: [PATCH 0/6] virtio 1.0 fixups, tweaks

2014-12-18 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: Fixes a couple of minor compliance issues in new virtio 1.0 code. Plus, adds a couple of minor cleanups - not bugfixes, but seem safe enough for 3.19. OK, I've applied these. Thanks, Rusty. Michael S. Tsirkin (6): virtio: set

Re: BUG_ON in virtio-ring.c

2014-12-17 Thread Rusty Russell
Alexey Lapitsky lex.pub...@gmail.com writes: Hi, Sorry for the long delay. It prints exactly the same: [3.792033] virtqueue elements = 128, max_segments = 126 (1 queues) [3.802191] vda: vda1 vda2 vda5 A little bit more about my setup (if it helps): OK, I think this is fixed by

Re: [PATCH 9/9] virtio_pci: update file descriptions and copyright

2014-12-15 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: There's been a lot of changes since 2007. List main authors, add Red Hat copyright. Acked-by: Rusty Russell ru...@rustcorp.com.au Cheers, Rusty. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/virtio/virtio_pci.h| 5

Re: [PATCH 0/2] virtio_ccw: minor enhancements

2014-12-10 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: Hi Rusty, I guess you are busy. I'd like to send all these patch series combined to Linus. To see what I have queued, you can check the vhost-next branch in my tree. Will wait until tomorrow to give you a chance to respond. Hi Michael,

Re: [PATCH 1/2] virito: introduce methods of fixing device features

2014-11-25 Thread Rusty Russell
Jason Wang jasow...@redhat.com writes: Buggy host may advertised buggy host features (a usual case is that host advertise a feature whose dependencies were missed). In this case, driver should detect and disable the buggy features by itself. Sorry, I've been focussing elsewhere. I would

Re: [PATCH v4 3/6] hw_random: use reference counts on each struct hwrng.

2014-11-11 Thread Rusty Russell
Amos Kong ak...@redhat.com writes: From: Rusty Russell ru...@rustcorp.com.au current_rng holds one reference, and we bump it every time we want to do a read from it. This means we only hold the rng_mutex to grab or drop a reference, so accessing /sys/devices/virtual/misc/hw_random

Re: [PATCH v4 4/6] hw_random: fix unregister race.

2014-11-11 Thread Rusty Russell
Amos Kong ak...@redhat.com writes: From: Rusty Russell ru...@rustcorp.com.au The previous patch added one potential problem: we can still be reading from a hwrng when it's unregistered. Add a wait for zero in the hwrng_unregister path. v4: add cleanup_done flag to insure that cleanup

Re: kernel BUG at drivers/block/virtio_blk.c:172!

2014-11-10 Thread Rusty Russell
Jeff Layton jlay...@poochiereds.net writes: In the latest Fedora rawhide kernel in the repos, I'm seeing the following oops when mounting xfs. rc2-ish kernels seem to be fine: [ 64.669633] [ cut here ] [ 64.670008] kernel BUG at drivers/block/virtio_blk.c:172!

Re: [PATCH v2 4/6] hw_random: fix unregister race.

2014-10-30 Thread Rusty Russell
Herbert Xu herb...@gondor.apana.org.au writes: On Thu, Sep 18, 2014 at 08:37:45PM +0800, Amos Kong wrote: From: Rusty Russell ru...@rustcorp.com.au The previous patch added one potential problem: we can still be reading from a hwrng when it's unregistered. Add a wait for zero

Re: [PATCH RFC 1/4] virtio_net: pass vi around

2014-10-27 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: Too many places poke at [rs]q-vq-vdev-priv just to get the the vi structure. Let's just pass the pointer around: seems cleaner, and might even be faster. Agreed, it's neater. Acked-by: Rusty Russell ru...@rustcorp.com.au Thanks, Rusty. Signed

Re: [PATCH] virtio_blk: fix race at module removal

2014-10-27 Thread Rusty Russell
Ming Lei tom.leim...@gmail.com writes: On Fri, Oct 24, 2014 at 12:12 AM, Michael S. Tsirkin m...@redhat.com wrote: If a device appears while module is being removed, driver will get a callback after we've given up on the major number. In theory this means this major number can get reused by

Re: [PATCH RFC 2/4] virtio_net: get rid of virtio_net_hdr/skb_vnet_hdr

2014-10-27 Thread Rusty Russell
remove struct skb_vnet_hdr. Yes, this is definitely a win. Acked-by: Rusty Russell ru...@rustcorp.com.au Thanks, Rusty. Signed-off-by: Michael S. Tsirkin m...@redhat.com --- drivers/net/virtio_net.c | 88 ++-- 1 file changed, 40 insertions(+), 48

Re: [PATCH RFC 4/4] virtio_net: bigger header when VERSION_1 is set

2014-10-27 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: With VERSION_1 virtio_net uses same header size whether mergeable buffers are enabled or not. Signed-off-by: Michael S. Tsirkin m...@redhat.com These two are great too, thanks: Acked-by: Rusty Russell ru...@rustcorp.com.au Cheers, Rusty

Re: [PATCH v2 3/6] hw_random: use reference counts on each struct hwrng.

2014-10-19 Thread Rusty Russell
without a lock, which could change (eg. to NULL) underneath it. v3: initialize kref (thanks Amos Kong) v2: fix missing put_rng() on exit path (thanks Amos Kong) Signed-off-by: Rusty Russell ru...@rustcorp.com.au diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c index

Re: [PATCH v2 3/6] hw_random: use reference counts on each struct hwrng.

2014-10-19 Thread Rusty Russell
Amos Kong ak...@redhat.com writes: From: Rusty Russell ru...@rustcorp.com.au current_rng holds one reference, and we bump it every time we want to do a read from it. This means we only hold the rng_mutex to grab or drop a reference, so accessing /sys/devices/virtual/misc/hw_random

Re: [PATCH 2/2] virtio_balloon: free some memory from balloon on OOM

2014-10-19 Thread Rusty Russell
Signed-off-by: Denis V. Lunev d...@openvz.org CC: Rusty Russell ru...@rustcorp.com.au CC: Michael S. Tsirkin m...@redhat.com --- drivers/virtio/virtio_balloon.c | 52 + include/uapi/linux/virtio_balloon.h | 1 + 2 files changed, 53 insertions

[PULL] More virtio fun

2014-10-16 Thread Rusty Russell
The following changes since commit 7ec62d421bdf29cb31101ae2689f7f3a9906289a: Merge branch 'for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs (2014-09-10 14:04:17 -0700) are available in the git repository at:

Re: [PATCH net-next RFC 1/3] virtio: support for urgent descriptors

2014-10-15 Thread Rusty Russell
Jason Wang jasow...@redhat.com writes: Below should be useful for some experiments Jason is doing. I thought I'd send it out for early review/feedback. event idx feature allows us to defer interrupts until a specific # of descriptors were used. Sometimes it might be useful to get an

Re: [PATCH 2/2] virtio_balloon: free some memory from baloon on OOM

2014-10-15 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Tue, Oct 14, 2014 at 10:14:05AM +1030, Rusty Russell wrote: Michael S. Tsirkin m...@redhat.com writes: On Mon, Oct 13, 2014 at 04:02:52PM +1030, Rusty Russell wrote: Denis V. Lunev d...@parallels.com writes: From: Raushaniya Maksudova

Re: [PATCH] virtio_balloon: Convert vballon kthread into a workqueue

2014-10-15 Thread Rusty Russell
Petr Mladek pmla...@suse.cz writes: Workqueues have clean and rich API for all basic operations. The code is usually easier and better readable. It can be easily tuned for the given purpose. OK, sure. -static void fill_balloon(struct virtio_balloon *vb, size_t num) +static void

Re: [PATCH v4 04/25] virtio: defer config changed notifications

2014-10-14 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: Defer config changed notifications that arrive during probe/scan/freeze/restore. This will allow drivers to set DRIVER_OK earlier, without worrying about racing with config change interrupts. This change will also benefit old hypervisors (before

Re: [PATCH 1/3] virtio_net: pass well-formed sgs to virtqueue_add_*()

2014-10-14 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Fri, Sep 05, 2014 at 12:40:50PM +0200, Paolo Bonzini wrote: Il 03/09/2014 06:29, Rusty Russell ha scritto: + sg_init_table(rq-sg, MAX_SKB_FRAGS + 2); I think 2 is enough here. That said... sg_set_buf(rq-sg, hdr-hdr, sizeof hdr-hdr

Re: [PATCH 2/2] virtio_balloon: free some memory from baloon on OOM

2014-10-14 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: On Mon, Oct 13, 2014 at 04:02:52PM +1030, Rusty Russell wrote: Denis V. Lunev d...@parallels.com writes: From: Raushaniya Maksudova rmaksud...@parallels.com Excessive virtio_balloon inflation can cause invocation of OOM-killer, when Linux

Re: [PATCH RFC 08/11] virtio_blk: use virtio v1.0 endian

2014-10-13 Thread Rusty Russell
Cornelia Huck cornelia.h...@de.ibm.com writes: Note that we care only about the fields still in use for virtio v1.0. Reviewed-by: Thomas Huth th...@linux.vnet.ibm.com Reviewed-by: David Hildenbrand d...@linux.vnet.ibm.com Signed-off-by: Cornelia Huck cornelia.h...@de.ibm.com Hi Cornelia,

Re: [PATCH RFC 03/11] virtio: support more feature bits

2014-10-13 Thread Rusty Russell
Cornelia Huck cornelia.h...@de.ibm.com writes: With virtio-1, we support more than 32 feature bits. Let's make vdev-guest_features depend on the number of supported feature bits, allowing us to grow the feature bits automatically. It's a judgement call, but I would say that simply using

Re: [PATCH 2/2] virtio_balloon: free some memory from baloon on OOM

2014-10-13 Thread Rusty Russell
Denis V. Lunev d...@parallels.com writes: From: Raushaniya Maksudova rmaksud...@parallels.com Excessive virtio_balloon inflation can cause invocation of OOM-killer, when Linux is under severe memory pressure. Various mechanisms are responsible for correct virtio_balloon memory management.

Re: BUG_ON in virtio-ring.c

2014-10-13 Thread Rusty Russell
Alexey Lapitsky lex.pub...@gmail.com writes: Hi, I'm hitting this bug with both ext4 and btrfs. Here's an example of the backtrace: https://gist.github.com/vzctl/e888a821333979120932 I tried raising this BUG only for direct ring and it solved the problem: - BUG_ON(total_sg

Re: [PATCH v3 10/25] virtio: add API to enable VQs early

2014-10-13 Thread Rusty Russell
Michael S. Tsirkin m...@redhat.com writes: virtio spec 0.9.X requires DRIVER_OK to be set before VQs are used, but some drivers use VQs before probe function returns. Since DRIVER_OK is set after probe, this violates the spec. Even though under virtio 1.0 transitional devices support this

Re: [PATCH] virtio: pci: Use SIMPLE_DEV_PM_OPS macro

2014-09-23 Thread Rusty Russell
Jingoo Han jg1@samsung.com writes: On Tuesday, September 09, 2014 9:14 AM, Rusty Russell wrote: Jingoo Han jg1@samsung.com writes: Use SIMPLE_DEV_PM_OPS macro in order to make the code simpler. Signed-off-by: Jingoo Han jg1@samsung.com This patch is obviously wrong

Re: [PATCH v2 2/3] hw_random: fix stuck in catting hwrng attributes

2014-09-17 Thread Rusty Russell
Amos Kong ak...@redhat.com writes: I started a QEMU (non-smp) guest with one virtio-rng device, and read random data from /dev/hwrng by dd: # dd if=/dev/hwrng of=/dev/null In the same time, if I check hwrng attributes from sysfs by cat: # cat /sys/class/misc/hw_random/rng_* The cat

[PATCH 5/5] hw_random: don't init list element we're about to add to list.

2014-09-17 Thread Rusty Russell
Another interesting anti-pattern. Signed-off-by: Rusty Russell ru...@rustcorp.com.au --- drivers/char/hw_random/core.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c index 6a34feca6b43..96fa06716e95 100644 --- a/drivers/char

[PATCH 3/5] hw_random: fix unregister race.

2014-09-17 Thread Rusty Russell
The previous patch added one potential problem: we can still be reading from a hwrng when it's unregistered. Add a wait for zero in the hwrng_unregister path. Signed-off-by: Rusty Russell ru...@rustcorp.com.au --- drivers/char/hw_random/core.c | 5 + 1 file changed, 5 insertions(+) diff

  1   2   3   4   5   6   7   8   9   10   >