Re: [PATCH] virtio_console: fix misc probe bugs

2024-09-17 Thread Amit Shah
ot;virtio: console: Add a new MULTIPORT feature, > support for generic ports") > Signed-off-by: Michael S. Tsirkin Reviewed-by: Amit Shah

Re: [PATCH] virtio_console: remove pointless check for debugfs_create_dir()

2021-02-16 Thread Amit Shah
; debugfs is working "properly" or not, there is no need to check the > return value of debugfs calls, so remove the checks here as they will > never be triggered and are wrong. > > Cc: Amit Shah > Cc: Arnd Bergmann > Cc: virtualizat...@lists.linux-foundation.org > Cc

Re: [PATCH] char: virtio: Select VIRTIO from VIRTIO_CONSOLE.

2020-09-02 Thread Amit Shah
On Mon, Aug 31, 2020 at 06:58:50PM +0200, Michal Suchanek wrote: > Make it possible to have virtio console built-in when > other virtio drivers are modular. > > Signed-off-by: Michal Suchanek Reviewed-by: Amit Shah > --- > drivers/char/Kconfig | 3 ++- > 1 file change

Re: [PATCH 5/5] virtio_console: Constify some static variables

2020-07-05 Thread Amit Shah
ta bss dec hex filename > 25447 713 76 26236667c drivers/char/virtio_console.o > > After: >textdata bss dec hex filename > 25488 673 76 26237667d drivers/char/virtio_console.o > > Signed-off-by: Rikard Falkeborn

Re: [PATCH] virtio_console: remove vq buf while unpluging port

2019-05-28 Thread Amit Shah
On Fri, 2019-05-24 at 20:51 +0200, Greg KH wrote: > On Sun, Apr 28, 2019 at 09:50:04AM +0800, zhenwei pi wrote: > > A bug can be easily reproduced: > > Host# cat guest-agent.xml > > > > > >> state="connected"/> > > > > Host# virsh attach-device instance guest-agent.xml > > Host# virsh deta

Re: [PATCH 0/6] virtio-console: spec compliance fixes

2018-05-06 Thread Amit Shah
On (Thu) 03 May 2018 [22:28:32], Michael S. Tsirkin wrote: > On Thu, May 03, 2018 at 05:45:29AM +0200, Amit Shah wrote: > > (apologies if you received a dup) > > > > On (Tue) 24 Apr 2018 [21:41:29], Michael S. Tsirkin wrote: > > > On Fri, Apr 20, 2018 at 09:17:59PM +

Re: [PATCH 0/6] virtio-console: spec compliance fixes

2018-05-06 Thread Amit Shah
On (Thu) 03 May 2018 [22:28:32], Michael S. Tsirkin wrote: > On Thu, May 03, 2018 at 05:45:29AM +0200, Amit Shah wrote: > > (apologies if you received a dup) > > > > On (Tue) 24 Apr 2018 [21:41:29], Michael S. Tsirkin wrote: > > > On Fri, Apr 20, 2018 at 09:17:59PM +

Re: [PATCH 0/6] virtio-console: spec compliance fixes

2018-05-02 Thread Amit Shah
(apologies if you received a dup) On (Tue) 24 Apr 2018 [21:41:29], Michael S. Tsirkin wrote: > On Fri, Apr 20, 2018 at 09:17:59PM +0300, Michael S. Tsirkin wrote: > > Turns out virtio console tries to take a buffer out of an active vq. > > Works by sheer luck, and is explicitly forbidden by spec.

Re: [PATCH 0/6] virtio-console: spec compliance fixes

2018-05-02 Thread Amit Shah
On (Tue) 24 Apr 2018 [21:41:29], Michael S. Tsirkin wrote: > On Fri, Apr 20, 2018 at 09:17:59PM +0300, Michael S. Tsirkin wrote: > > Turns out virtio console tries to take a buffer out of an active vq. > > Works by sheer luck, and is explicitly forbidden by spec. And while > > going over it I saw

Re: [PATCH 0/6] virtio-console: spec compliance fixes

2018-04-25 Thread Amit Shah
On 24 April 2018 11:41:29 AM GMT-07:00, "Michael S. Tsirkin" wrote: >On Fri, Apr 20, 2018 at 09:17:59PM +0300, Michael S. Tsirkin wrote: >> Turns out virtio console tries to take a buffer out of an active vq. >> Works by sheer luck, and is explicitly forbidden by spec. And while >> going over

[PATCH v2 2/2] xen: events: free irqs in error condition

2018-02-27 Thread Amit Shah
. Y. Srinivasan" CC: Liu Shuo CC: Anoob Soman Signed-off-by: Amit Shah --- drivers/xen/events/events_base.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c index c86d10e..a299586 100644 ---

[PATCH v2 1/2] xen: fix out-of-bounds irq unbind for MSI message groups

2018-02-27 Thread Amit Shah
rovsky CC: Eduardo Valentin CC: Juergen Gross CC: Thomas Gleixner CC: "K. Y. Srinivasan" CC: Liu Shuo CC: Anoob Soman Signed-off-by: Amit Shah --- drivers/xen/events/events_base.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/xen/events/events_base.c

[PATCH v2 0/2] xen: fix bugs in error conditions

2018-02-27 Thread Amit Shah
u Shuo CC: Anoob Soman Amit Shah (2): xen: fix out-of-bounds irq unbind for MSI message groups xen: events: free irqs in error condition drivers/xen/events/events_base.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) -- 2.7.3.AMZN Amazon Development Center Germany G

[PATCH 0/2] xen: fix bugs in error conditions

2018-02-26 Thread Amit Shah
Hello, These bugs were found during code review. Details in the commits. Please review and apply. CC: Roger Pau Monné CC: David Vrabel CC: Boris Ostrovsky CC: Eduardo Valentin CC: Juergen Gross CC: Thomas Gleixner CC: "K. Y. Srinivasan" CC: Liu Shuo CC: Anoob Soman Am

[PATCH 2/2] xen: events: free irqs in error condition

2018-02-26 Thread Amit Shah
er CC: "K. Y. Srinivasan" CC: Liu Shuo CC: Anoob Soman Signed-off-by: Amit Shah --- drivers/xen/events/events_base.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/xen/events/events_base.c b/drivers/xen/events/events_base.c index b6b8b29..96aa575 100644 --- a/drivers/xen/

[PATCH 1/2] xen: fix out-of-bounds irq unbind for MSI message groups

2018-02-26 Thread Amit Shah
Vrabel CC: Boris Ostrovsky CC: Eduardo Valentin CC: Juergen Gross CC: Thomas Gleixner CC: "K. Y. Srinivasan" CC: Liu Shuo CC: Anoob Soman Signed-off-by: Amit Shah --- drivers/xen/events/events_base.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/xen/events/events_base.c

Re: [PATCH 13/35] drivers/char: Convert remaining use of pr_warning to pr_warn

2017-02-16 Thread Amit Shah
oe Perches Reviewed-by: Amit Shah Thanks, Amit -- http://log.amitshah.net/

Re: [PATCH] MAINTAINERS: update my email address

2017-02-03 Thread Amit Shah
On (Fri) 03 Feb 2017 [17:11:49], Michael S. Tsirkin wrote: > On Fri, Feb 03, 2017 at 04:48:14PM +0530, Amit Shah wrote: > > I'm leaving my job at Red Hat, this email address will stop working next > > week. > > Update it to one that I will have access to later. > &g

[PATCH] MAINTAINERS: update my email address

2017-02-03 Thread Amit Shah
I'm leaving my job at Red Hat, this email address will stop working next week. Update it to one that I will have access to later. Signed-off-by: Amit Shah --- MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 3960e7f..187b961 1

Re: [PATCH] virtio-console: avoid DMA from stack

2017-02-01 Thread Amit Shah
reasonable. I wonder since all implementations of hvc do a memcpy, if we can abstract it - but that'll need some work. Reviewed-by: Amit Shah Michael, please add to the virtio queue. Amit

Re: [PATCH v2] virtio_console: fix a crash in config_work_handler

2017-01-16 Thread Amit Shah
fig_work_handler); > > It leads to a crash when portdev->vdev is dereferenced later. This bug > is triggered when the guest uses a virtio-console without multiport > feature and receives a config_changed virtio interrupt. > > Signed-off-by: G. Campana Reviewed-by: A

Re: [PATCH] virtio_console: fix a crash in config_work_handler

2017-01-15 Thread Amit Shah
On (Sat) 14 Jan 2017 [11:38:39], G. Campana wrote: > Using control_work instead of config_work as the 3rd argument to > container_of results in an invalid portdev pointer. Indeed, the work > structure is initialized as below: > > INIT_WORK(&portdev->config_work, &config_work_handler); > > It

Re: [PATCH] virtio: console: Unlock vqs while freeing buffers

2016-10-25 Thread Amit Shah
vqs, and release it while the > buffer is being freed. > > Fixes: c6017e793b93 ("virtio: console: add locks around buffer removal in > port unplug path") > Cc: sta...@vger.kernel.org > Signed-off-by: Matt Redfearn Reviewed-by: Amit Shah Michael, can you pick this up? Thanks, Amit

Re: [PATCH 02/11] virtio_console: Less function calls in init_vqs() after error detection

2016-09-21 Thread Amit Shah
Hi, On (Wed) 14 Sep 2016 [16:01:28], SF Markus Elfring wrote: > From: Markus Elfring > Date: Wed, 14 Sep 2016 14:00:35 +0200 > > The kfree() function was called in up to five cases > by the init_vqs() function during error handling even if > the passed variable contained a null pointer. > > * R

Re: [PATCH] virtio_console: Stop doing DMA on the stack

2016-09-06 Thread Amit Shah
, but it breaks completely > if the stack is virtually mapped. > > Tested by typing both directions using picocom aimed at /dev/hvc0. > > Signed-off-by: Andy Lutomirski Looks fine, Reviewed-by: Amit Shah > --- > > Hi all- > > This is currently broken in tip:x86/asm. I

Re: [PATCH kernel 0/2] speed up live migration by skipping free pages

2016-04-25 Thread Amit Shah
On (Mon) 25 Apr 2016 [14:04:06], Michael S. Tsirkin wrote: > On Mon, Apr 25, 2016 at 11:36:41AM +0530, Amit Shah wrote: > > On (Tue) 19 Apr 2016 [22:34:32], Liang Li wrote: > > > Current QEMU live migration implementation mark all guest's RAM pages > > > as dirtied

Re: [PATCH kernel 0/2] speed up live migration by skipping free pages

2016-04-24 Thread Amit Shah
On (Tue) 19 Apr 2016 [22:34:32], Liang Li wrote: > Current QEMU live migration implementation mark all guest's RAM pages > as dirtied in the ram bulk stage, all these pages will be processed > and it consumes quite a lot of CPU cycles and network bandwidth. > > From guest's point of view, it doesn

Re: [RFC qemu 0/4] A PV solution for live migration optimization

2016-03-09 Thread Amit Shah
On (Thu) 10 Mar 2016 [07:44:19], Li, Liang Z wrote: > > Hi Amit, > > Could provide more information on how to use virtio-serial to exchange data? > Thread , Wiki or code are all OK. > I have not find some useful information yet. See this commit in the Linux sources: 108fc82596e3b66b819df9d

Re: [Qemu-devel] [RFC kernel 0/2]A PV solution for KVM live migration optimization

2016-03-09 Thread Amit Shah
On (Thu) 10 Mar 2016 [12:31:32], Jitendra Kolhe wrote: > On 3/8/2016 4:44 PM, Amit Shah wrote: > >>>> Hi, > >>>> An interesting solution; I know a few different people have been > >>>> looking at > >>>> how to speed up ballooned VM

Re: [RFC qemu 0/4] A PV solution for live migration optimization

2016-03-08 Thread Amit Shah
On (Thu) 03 Mar 2016 [18:44:24], Liang Li wrote: > The current QEMU live migration implementation mark the all the > guest's RAM pages as dirtied in the ram bulk stage, all these pages > will be processed and that takes quit a lot of CPU cycles. > > From guest's point of view, it doesn't care abou

Re: [RFC qemu 0/4] A PV solution for live migration optimization

2016-03-08 Thread Amit Shah
On (Fri) 04 Mar 2016 [15:02:47], Jitendra Kolhe wrote: > > > > > > * Liang Li (liang.z...@intel.com) wrote: > > > > The current QEMU live migration implementation mark the all the > > > > guest's RAM pages as dirtied in the ram bulk stage, all these pages > > > > will be processed and that takes qu

Re: [PATCH 12/25] virtio_console: Use bool function return values of true/false not 1/0

2015-03-30 Thread Amit Shah
if (!portdev->vdev) > - return 0; > + return false; Reviewed-by: Amit Shah Amit -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http

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

2015-03-01 Thread Amit Shah
> Signed-off-by: Michael S. Tsirkin Reviewed-by: Amit Shah Amit -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: [PATCH] virtio_console: init work unconditionally

2015-03-01 Thread Amit Shah
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 Reviewed-by: Amit Shah Amit -- To unsubscri

Re: [PATCH 5/5] virtio: don't require a config space on the console device.

2015-02-11 Thread Amit Shah
On (Mon) 09 Feb 2015 [10:26:29], Rusty Russell wrote: > virtio: don't require a config space on the console device. > > Strictly, it's only needed when we have features (size or multiport). > > Signed-off-by: Rusty Russell Reviewed-by: Amit Shah > diff --git a/dri

Re: [PATCH v3 04/16] virtio/console: verify device has config space

2015-01-20 Thread Amit Shah
On (Tue) 20 Jan 2015 [13:09:55], Michael S. Tsirkin wrote: > On Tue, Jan 20, 2015 at 04:10:40PM +0530, Amit Shah wrote: > > On (Wed) 14 Jan 2015 [19:27:35], Michael S. Tsirkin wrote: > > > Some devices might not implement config space access > > > (e.g. remotepr

Re: [PATCH v3 04/16] virtio/console: verify device has config space

2015-01-20 Thread Amit Shah
On (Wed) 14 Jan 2015 [19:27:35], Michael S. Tsirkin wrote: > Some devices might not implement config space access > (e.g. remoteproc used not to - before 3.9). > virtio/console needs config space access so make it > fail gracefully if not there. Do we know any such devices? Wondering what prompte

Re: [PATCH v2 01/15] virtio_pci: fix virtio spec compliance on restore

2014-10-07 Thread Amit Shah
On (Tue) 07 Oct 2014 [15:53:55], Michael S. Tsirkin wrote: > On Mon, Oct 06, 2014 at 06:10:40PM +0300, Michael S. Tsirkin wrote: > > On restore, virtio pci does the following: > > + set features > > + init vqs etc - device can be used at this point! > > + set ACKNOWLEDGE,DRIVER and DRIVER_OK status

Re: [PATCH v2 01/15] virtio_pci: fix virtio spec compliance on restore

2014-10-07 Thread Amit Shah
port butden for the hypervisors. > > Cc: sta...@vger.kernel.org > Cc: Amit Shah > Signed-off-by: Michael S. Tsirkin I didn't see my previous questions answered from the initial posting -- can you please respond to them? Amit -- To unsubscribe from this list: send t

Re: [PATCH RFC] virtio_pci: fix virtio spec compliance on restore

2014-09-24 Thread Amit Shah
ich > requires the following order: > - ACKNOWLEDGE > - DRIVER > - init vqs > - DRIVER_OK > > Cc: sta...@vger.kernel.org > Cc: Amit Shah > Signed-off-by: Michael S. Tsirkin > --- > > Lightly tested. > Will repost as non-RFC once testing is done, sending > ou

Re: [PATCH] rcu: Make nocb leader kthreads process pending callbacks after spawning

2014-08-27 Thread Amit Shah
initialization > of > this flag to 0 to let the kthreads run. > > Reported-by: Amit Shah > Signed-off-by: Pranith Kumar > Link: http://www.spinics.net/lists/kernel/msg1802899.html > --- > kernel/rcu/tree.h| 2 +- > kernel/rcu/tree_plugin.h | 24 --

Re: [3.16 stable PATCH v2 1/2] virtio: rng: delay hwrng_register() till driver is ready

2014-08-27 Thread Amit Shah
Hey Greg, Can you add these two patches to the 3.16 queue? Thanks, On (Tue) 12 Aug 2014 [13:23:45], Amit Shah wrote: > Instead of calling hwrng_register() in the probe routing, call it in the > scan routine. This ensures that when hwrng_register() is successful, > and it requests a f

Re: [PATCH tip/core/rcu 1/2] rcu: Parallelize and economize NOCB kthread wakeups

2014-08-26 Thread Amit Shah
On (Sat) 23 Aug 2014 [03:43:38], Pranith Kumar wrote: > On Fri, Aug 22, 2014 at 5:53 PM, Paul E. McKenney > wrote: > > > > Hmmm... Please try replacing the synchronize_rcu() in > > __sysrq_swap_key_ops() with (say) schedule_timeout_interruptible(HZ / 10). > > I bet that gets rid of the hang. (An

Re: [PATCH tip/core/rcu 1/2] rcu: Parallelize and economize NOCB kthread wakeups

2014-08-22 Thread Amit Shah
On (Fri) 22 Aug 2014 [22:44:05], Amit Shah wrote: > Hm, found it: > > The stall happens in do_initcalls(). > > pm_sysrq_init() is the function that causes the hang. When I #if 0 > the line > > register_sysrq_key('o', &sysrq_poweroff_op); > > in

Re: [PATCH tip/core/rcu 1/2] rcu: Parallelize and economize NOCB kthread wakeups

2014-08-22 Thread Amit Shah
On (Fri) 22 Aug 2014 [07:48:19], Paul E. McKenney wrote: > On Fri, Aug 22, 2014 at 06:26:49PM +0530, Amit Shah wrote: > > On (Fri) 22 Aug 2014 [18:06:51], Amit Shah wrote: > > > On (Fri) 22 Aug 2014 [17:54:53], Amit Shah wrote: > > > > On (Mon) 18 Aug 2014 [21:

Re: [PATCH tip/core/rcu 1/2] rcu: Parallelize and economize NOCB kthread wakeups

2014-08-22 Thread Amit Shah
On (Fri) 22 Aug 2014 [18:06:51], Amit Shah wrote: > On (Fri) 22 Aug 2014 [17:54:53], Amit Shah wrote: > > On (Mon) 18 Aug 2014 [21:01:49], Paul E. McKenney wrote: > > > > > The odds are low over the next few days. I am adding nastier rcutorture > > > testing,

Re: [PATCH tip/core/rcu 1/2] rcu: Parallelize and economize NOCB kthread wakeups

2014-08-22 Thread Amit Shah
On (Fri) 22 Aug 2014 [17:54:53], Amit Shah wrote: > On (Mon) 18 Aug 2014 [21:01:49], Paul E. McKenney wrote: > > > The odds are low over the next few days. I am adding nastier rcutorture > > testing, however. It would still be very good to get debug information > &g

Re: [PATCH 2/2] Install udev rules in system-default directory

2014-08-19 Thread Amit Shah
On (Tue) 19 Aug 2014 [19:20:20], Paolo Bonzini wrote: > Il 07/08/2014 15:09, Amit Shah ha scritto: > > +udevrules_DATA = 90-virtio-rng.rules > > If rng-tools is packaged with "make dist" you need this to be > > dist_udevrules_DATA= 90-virtio-

Re: [PATCH tip/core/rcu 1/2] rcu: Parallelize and economize NOCB kthread wakeups

2014-08-18 Thread Amit Shah
On (Fri) 15 Aug 2014 [08:04:05], Paul E. McKenney wrote: > On Fri, Aug 15, 2014 at 10:54:11AM +0530, Amit Shah wrote: > > On (Wed) 13 Aug 2014 [06:00:49], Paul E. McKenney wrote: > > > On Wed, Aug 13, 2014 at 11:14:39AM +0530, Amit Shah wrote: > > > > On (Tue)

Re: [PATCH tip/core/rcu 1/2] rcu: Parallelize and economize NOCB kthread wakeups

2014-08-14 Thread Amit Shah
On (Wed) 13 Aug 2014 [06:00:49], Paul E. McKenney wrote: > On Wed, Aug 13, 2014 at 11:14:39AM +0530, Amit Shah wrote: > > On (Tue) 12 Aug 2014 [14:41:51], Paul E. McKenney wrote: > > > On Tue, Aug 12, 2014 at 02:39:36PM -0700, Paul E. McKenney wrote: > > > > On T

[PULL] virtio-rng: add derating factor for use by hwrng core

2014-08-14 Thread Amit Shah
virtio: rng: add derating factor for use by hwrng core (2014-08-15 10:26:01 +0530) ---- Amit Shah (1): virtio: rng: add derating factor for use by hwrng core drivers/char/hw_random/virtio-rng.c | 1 + 1 file changed, 1 insertion(

[PATCH v3 1/1] virtio: rng: add derating factor for use by hwrng core

2014-08-14 Thread Amit Shah
nd to cause all sorts of badness, and a compromised hwrng is the least of the user's worries. Given this, we might as well assume that the quality of randomness we receive is perfectly trustworthy. Hence, we use 100% for the factor, indicating maximum confidence in the source. Signed-off-by:

Re: [PATCH tip/core/rcu 1/2] rcu: Parallelize and economize NOCB kthread wakeups

2014-08-12 Thread Amit Shah
On (Tue) 12 Aug 2014 [14:41:51], Paul E. McKenney wrote: > On Tue, Aug 12, 2014 at 02:39:36PM -0700, Paul E. McKenney wrote: > > On Tue, Aug 12, 2014 at 09:06:21AM -0700, Paul E. McKenney wrote: > > > On Tue, Aug 12, 2014 at 11:03:21AM +0530, Amit Shah wrote: > > > >

[PATCH v2 1/1] virtio: rng: add derating factor for use by hwrng core

2014-08-12 Thread Amit Shah
ts of badness, and a compromised hwrng is not the biggest threat. Given this, we are certain the quality of randomness we receive is perfectly trustworthy. Hence, we use 100% for the factor, indicating maximum confidence in the source. Signed-off-by: Amit Shah --- Pretty small and contained patch;

Re: [3.16 stable PATCH 1/2] virtio: rng: delay hwrng_register() till driver is ready

2014-08-12 Thread Amit Shah
On (Tue) 12 Aug 2014 [15:41:35], Greg KH wrote: > On Tue, Aug 12, 2014 at 12:36:54PM +0530, Amit Shah wrote: > > Instead of calling hwrng_register() in the probe routing, call it in the > > scan routine. This ensures that when hwrng_register() is successful, > > and it reques

[3.16 stable PATCH v2 2/2] Revert "hwrng: virtio - ensure reads happen after successful probe"

2014-08-12 Thread Amit Shah
yet setup completely. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell (cherry picked from commit eeec626366ffe558fc3d5685bd2b49a962acf57d) Signed-off-by: Amit Shah --- drivers/char/hw_random/core.c | 6 -- drivers/char/hw_random/virtio-rng.c | 9 - 2 files changed,

[3.16 stable PATCH v2 1/2] virtio: rng: delay hwrng_register() till driver is ready

2014-08-12 Thread Amit Shah
load and re-load the module, and hope things succeed the next time around. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell (cherry picked from commit 5c06273401f2eb7b290cadbae18ee00f8f65e893) Signed-off-by: Amit Shah --- drivers/char/hw_random/virtio-rng.c | 25 +++--

[3.16 stable PATCH 2/2] Revert "hwrng: virtio - ensure reads happen after successful probe"

2014-08-12 Thread Amit Shah
yet setup completely. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell (cherry picked from commit eeec626366ffe558fc3d5685bd2b49a962acf57d) Signed-off-by: Amit Shah --- drivers/char/hw_random/core.c | 6 -- drivers/char/hw_random/virtio-rng.c | 9 - 2 files changed,

[3.16 stable PATCH 1/2] virtio: rng: delay hwrng_register() till driver is ready

2014-08-12 Thread Amit Shah
load and re-load the module, and hope things succeed the next time around. Signed-off-by: Amit Shah Signed-off-by: Rusty Russell (cherry picked from commit 5c06273401f2eb7b290cadbae18ee00f8f65e893) Signed-off-by: Amit Shah Conflicts: drivers/char/hw_random/virtio-rng.c Context

Re: [3.16 stable PATCH 1/1] virtio-rng: fix multi-device startup

2014-08-11 Thread Amit Shah
On (Tue) 12 Aug 2014 [13:55:48], Greg KH wrote: > On Tue, Aug 12, 2014 at 11:01:58AM +0530, Amit Shah wrote: > > On (Tue) 12 Aug 2014 [06:55:27], Greg KH wrote: > > > On Mon, Aug 11, 2014 at 06:11:47PM +0530, Amit Shah wrote: > > > > This is a 3.16-onl

Re: [PATCH tip/core/rcu 1/2] rcu: Parallelize and economize NOCB kthread wakeups

2014-08-11 Thread Amit Shah
On (Mon) 11 Aug 2014 [20:45:31], Paul E. McKenney wrote: > On Mon, Aug 11, 2014 at 01:34:21PM -0700, Paul E. McKenney wrote: > > On Tue, Aug 12, 2014 at 01:48:45AM +0530, Amit Shah wrote: > > > On (Mon) 11 Aug 2014 [13:11:02], Paul E. McKenney wrote: > > > > On T

Re: [3.16 stable PATCH 1/1] virtio-rng: fix multi-device startup

2014-08-11 Thread Amit Shah
On (Tue) 12 Aug 2014 [06:55:27], Greg KH wrote: > On Mon, Aug 11, 2014 at 06:11:47PM +0530, Amit Shah wrote: > > This is a 3.16-only patch. The linux.git fix is > > 5c06273401f2eb7b290cadbae18ee00f8f65e893, which fixes this issue in a > > different way. > > Why &qu

Re: [PATCH tip/core/rcu 1/2] rcu: Parallelize and economize NOCB kthread wakeups

2014-08-11 Thread Amit Shah
On (Mon) 11 Aug 2014 [13:34:21], Paul E. McKenney wrote: > On Tue, Aug 12, 2014 at 01:48:45AM +0530, Amit Shah wrote: > > On (Mon) 11 Aug 2014 [13:11:02], Paul E. McKenney wrote: > > > On Tue, Aug 12, 2014 at 01:11:26AM +0530, Amit Shah wrote: > > > > On (Mon)

Re: [PATCH 1/1] virtio: rng: add derating factor for use by hwrng core

2014-08-11 Thread Amit Shah
On (Mon) 11 Aug 2014 [15:11:03], H. Peter Anvin wrote: > On 08/11/2014 11:49 AM, Amit Shah wrote: > > The khwrngd thread is started when a hwrng device of sufficient > > quality is registered. The virtio-rng device is backed by the > > hypervisor, and we trust the hyper

Re: [PATCH tip/core/rcu 1/2] rcu: Parallelize and economize NOCB kthread wakeups

2014-08-11 Thread Amit Shah
On (Mon) 11 Aug 2014 [13:11:02], Paul E. McKenney wrote: > On Tue, Aug 12, 2014 at 01:11:26AM +0530, Amit Shah wrote: > > On (Mon) 11 Aug 2014 [09:28:07], Paul E. McKenney wrote: > > > On Mon, Aug 11, 2014 at 12:43:08PM +0530, Amit Shah wrote: > > > > On (Fri)

Re: [PATCH tip/core/rcu 1/2] rcu: Parallelize and economize NOCB kthread wakeups

2014-08-11 Thread Amit Shah
On (Mon) 11 Aug 2014 [09:28:07], Paul E. McKenney wrote: > On Mon, Aug 11, 2014 at 12:43:08PM +0530, Amit Shah wrote: > > On (Fri) 08 Aug 2014 [14:46:48], Paul E. McKenney wrote: > > > On Fri, Aug 08, 2014 at 02:43:47PM -0700, Paul E. McKenney wrote: > > > > On S

[PATCH 1/1] virtio: rng: add derating factor for use by hwrng core

2014-08-11 Thread Amit Shah
ss we receive is perfectly trustworthy. Hence, we use 100% for the factor, indicating maximum confidence in the source. Signed-off-by: Amit Shah --- Pretty small and contained patch; would be great if it is picked up for 3.17. --- drivers/char/hw_random/virtio-rng.c | 1 + 1 file changed, 1 inse

[3.16 stable PATCH 1/1] virtio-rng: fix multi-device startup

2014-08-11 Thread Amit Shah
the driver. Reported-by: Amos Kong Signed-off-by: Amit Shah --- drivers/char/hw_random/virtio-rng.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/char/hw_random/virtio-rng.c b/drivers/char/hw_random/virtio-rng.c index e9b15bc..124cac5 100644 --- a/drivers

Re: [PATCH 1/2] rngd: add udev rule to source from hwrng if virtio-rng present

2014-08-11 Thread Amit Shah
On (Fri) 08 Aug 2014 [14:46:27], H. Peter Anvin wrote: > On 08/08/2014 02:07 AM, Amit Shah wrote: > > > > > >> To > >> some degree the above is obsolete when we get khwrngd widely deployed, > >> but that is a new-kernel-only kind of thing. > >

Re: [PATCH tip/core/rcu 1/2] rcu: Parallelize and economize NOCB kthread wakeups

2014-08-11 Thread Amit Shah
On (Fri) 08 Aug 2014 [14:46:48], Paul E. McKenney wrote: > On Fri, Aug 08, 2014 at 02:43:47PM -0700, Paul E. McKenney wrote: > > On Sat, Aug 09, 2014 at 12:04:24AM +0530, Amit Shah wrote: > > > On (Fri) 08 Aug 2014 [11:18:35], Paul E. McKenney wrote: > > > > [ . .

Re: [PATCH tip/core/rcu 1/2] rcu: Parallelize and economize NOCB kthread wakeups

2014-08-08 Thread Amit Shah
On (Fri) 08 Aug 2014 [11:18:35], Paul E. McKenney wrote: > On Fri, Aug 08, 2014 at 11:07:10PM +0530, Amit Shah wrote: > > On (Fri) 08 Aug 2014 [09:25:02], Paul E. McKenney wrote: > > > On Fri, Aug 08, 2014 at 02:10:56PM +0530, Amit Shah wrote: > > > > On Friday

Re: [PATCH tip/core/rcu 1/2] rcu: Parallelize and economize NOCB kthread wakeups

2014-08-08 Thread Amit Shah
On (Fri) 08 Aug 2014 [09:25:02], Paul E. McKenney wrote: > On Fri, Aug 08, 2014 at 02:10:56PM +0530, Amit Shah wrote: > > On Friday 11 July 2014 07:05 PM, Paul E. McKenney wrote: > > >From: "Paul E. McKenney" > > > > > >An 80-CPU system with

Re: [PATCH 1/2] rngd: add udev rule to source from hwrng if virtio-rng present

2014-08-08 Thread Amit Shah
On (Thu) 07 Aug 2014 [12:31:11], H. Peter Anvin wrote: > On 08/07/2014 06:08 AM, Amit Shah wrote: > > On KVM guests where the virtio-rng device is available, and set as the > > current rng, this udev rule will start rngd which will feed in the > > host-provided e

Re: [PATCH tip/core/rcu 1/2] rcu: Parallelize and economize NOCB kthread wakeups

2014-08-08 Thread Amit Shah
On Friday 11 July 2014 07:05 PM, Paul E. McKenney wrote: From: "Paul E. McKenney" An 80-CPU system with a context-switch-heavy workload can require so many NOCB kthread wakeups that the RCU grace-period kthreads spend several tens of percent of a CPU just awakening things. This clearly will no

[PATCH 1/2] rngd: add udev rule to source from hwrng if virtio-rng present

2014-08-07 Thread Amit Shah
On KVM guests where the virtio-rng device is available, and set as the current rng, this udev rule will start rngd which will feed in the host-provided entropy to /dev/random. Signed-off-by: Amit Shah --- 90-virtio-rng.rules | 1 + 1 file changed, 1 insertion(+) create mode 100644 90-virtio

[PATCH 2/2] Install udev rules in system-default directory

2014-08-07 Thread Amit Shah
not-quite-Signed-off-by: Amit Shah --- Makefile.am | 1 + configure.ac | 8 2 files changed, 9 insertions(+) diff --git a/Makefile.am b/Makefile.am index f8490a3..a2b8173 100644 --- a/Makefile.am +++ b/Makefile.am @@ -8,6 +8,7 @@ sbin_PROGRAMS= rngd bin_PROGRAMS= rngtest

[PATCH 0/2] rng-tools: add udev rule for virtio-rng

2014-08-07 Thread Amit Shah
udev rule in the system dirs. However, installing as non-root will obviously fail. Prefixes are also not honoured. I don't know of a better way, and we probably should leave this to distributions. However, if someone has a better idea on how to expand this, please suggest. Amit Shah (2):

Re: [PATCH v2 3/4] virtio: rng: delay hwrng_register() till driver is ready

2014-07-22 Thread Amit Shah
On (Mon) 21 Jul 2014 [17:15:51], Amit Shah wrote: > Instead of calling hwrng_register() in the probe routing, call it in the > scan routine. This ensures that when hwrng_register() is successful, > and it requests a few random bytes to seed the kernel's pool at init, > we're

Re: [PATCH v2 0/4] virtio-rng: contribute to early randomness requests

2014-07-22 Thread Amit Shah
On (Tue) 22 Jul 2014 [07:46:23], Jason Cooper wrote: > On Mon, Jul 21, 2014 at 05:15:48PM +0530, Amit Shah wrote: > > v2: > > - update patch 3 to store the hwrng_register_done bool per-device > >rather than global > > - add patch 2 that re-arranges stru

Re: [PATCH v2 3/4] virtio: rng: delay hwrng_register() till driver is ready

2014-07-21 Thread Amit Shah
On (Mon) 21 Jul 2014 [08:11:16], Jason Cooper wrote: > On Mon, Jul 21, 2014 at 05:15:51PM +0530, Amit Shah wrote: > > Instead of calling hwrng_register() in the probe routing, call it in the > > scan routine. This ensures that when hwrng_register() is successful, > > and it

[PATCH v2 3/4] virtio: rng: delay hwrng_register() till driver is ready

2014-07-21 Thread Amit Shah
load and re-load the module, and hope things succeed the next time around. Signed-off-by: Amit Shah --- drivers/char/hw_random/virtio-rng.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/drivers/char/hw_random/virtio-rng.c b/drivers/char/hw_rando

[PATCH v2 1/4] virtio: rng: remove unused struct element

2014-07-21 Thread Amit Shah
vdev is unused in struct virtrng_info, remove it. CC: Amos Kong Signed-off-by: Amit Shah --- drivers/char/hw_random/virtio-rng.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/char/hw_random/virtio-rng.c b/drivers/char/hw_random/virtio-rng.c index e9b15bc..d8ffebd 100644 --- a

[PATCH v2 2/4] virtio: rng: re-arrange struct elements for better packing

2014-07-21 Thread Amit Shah
Re-arrange the elements of the virtrng_info struct to pack it better. Signed-off-by: Amit Shah --- drivers/char/hw_random/virtio-rng.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/char/hw_random/virtio-rng.c b/drivers/char/hw_random/virtio-rng.c index d8ffebd

[PATCH v2 0/4] virtio-rng: contribute to early randomness requests

2014-07-21 Thread Amit Shah
using the scan routine. Patch 4 reverts the previous restriction, which no longer applies, to not send read requests to the host before successful probe. Patches 1 and 2 are minor cleanups. Please review and apply, Amit Shah (4): virtio: rng: remove unused struct element virtio: rng: re-ar

[PATCH v2 4/4] Revert "hwrng: virtio - ensure reads happen after successful probe"

2014-07-21 Thread Amit Shah
yet setup completely. Signed-off-by: Amit Shah --- drivers/char/hw_random/core.c | 6 -- drivers/char/hw_random/virtio-rng.c | 9 - 2 files changed, 15 deletions(-) diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c index c4419ea..2a451b1 100644 --- a/driv

Re: [PATCH 2/3] virtio: rng: delay hwrng_register() till driver is ready

2014-07-21 Thread Amit Shah
On (Mon) 21 Jul 2014 [15:01:00], Amit Shah wrote: > Instead of calling hwrng_register() in the probe routing, call it in the > scan routine. This ensures that when hwrng_register() is successful, > and it requests a few random bytes to seed the kernel's pool at init, > we're

[PATCH 2/3] virtio: rng: delay hwrng_register() till driver is ready

2014-07-21 Thread Amit Shah
remove the workaround added previously to check whether probe was completed, and only then ask for data from the host. The revert follows in the next commit. Signed-off-by: Amit Shah --- drivers/char/hw_random/virtio-rng.c | 25 +++-- 1 file changed, 15 insertions(+), 10 deletion

[PATCH 3/3] Revert "hwrng: virtio - ensure reads happen after successful probe"

2014-07-21 Thread Amit Shah
yet setup completely. Signed-off-by: Amit Shah Conflicts: drivers/char/hw_random/virtio-rng.c (Conflict due to change in context around the revert) --- drivers/char/hw_random/core.c | 6 -- drivers/char/hw_random/virtio-rng.c | 9 - 2 files changed, 15 deletions(-) d

[PATCH 0/3] virtio-rng: contribute to early randomness requests

2014-07-21 Thread Amit Shah
tch 1 is a minor cleanup. Please review and apply, Amit Shah (3): virtio: rng: remove unused struct element virtio: rng: delay hwrng_register() till driver is ready Revert "hwrng: virtio - ensure reads happen after successful probe" drivers/char/hw_random/core.c | 6 -

[PATCH 1/3] virtio: rng: remove unused struct element

2014-07-21 Thread Amit Shah
vdev is unused in struct virtrng_info, remove it. CC: Amos Kong Signed-off-by: Amit Shah --- drivers/char/hw_random/virtio-rng.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/char/hw_random/virtio-rng.c b/drivers/char/hw_random/virtio-rng.c index e9b15bc..d8ffebd 100644 --- a

Re: [RFC PATCH 1/3] hw_random: allow RNG devices to give early randomness after a delay

2014-07-18 Thread Amit Shah
On (Fri) 18 Jul 2014 [17:14:08], Herbert Xu wrote: > On Fri, Jul 18, 2014 at 02:26:26PM +0530, Amit Shah wrote: > > > > > Sounds like a good idea to me. Though, changes in core.c that > > > increase the time in hwrng_register() or hwrng_init() may not get > > >

Re: [RFC PATCH 1/3] hw_random: allow RNG devices to give early randomness after a delay

2014-07-18 Thread Amit Shah
On (Mon) 14 Jul 2014 [18:12:46], Amit Shah wrote: > On (Mon) 14 Jul 2014 [08:37:00], Jason Cooper wrote: > > On Mon, Jul 14, 2014 at 10:05:19AM +0530, Amit Shah wrote: > > > Some RNG devices may not be ready to give early randomness at probe() > > > time, and hence los

[PATCH 1/1] Revert "drm/i915: drop i915_ prefix from enable_rc6, enable_fbc, enable_ppgtt parameters"

2014-07-16 Thread Amit Shah
C: Jani Nikula CC: David Airlie CC: # v3.15+ Signed-off-by: Amit Shah --- drivers/gpu/drm/i915/i915_params.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_params.c b/drivers/gpu/drm/i915/i915_params.c index d05a2af..053981d 100644 -

Re: [PATCH v3 0/2] hwrng, virtio-rng: init-time fixes

2014-07-14 Thread Amit Shah
On (Tue) 15 Jul 2014 [12:45:56], Herbert Xu wrote: > On Tue, Jul 15, 2014 at 10:10:28AM +0530, Amit Shah wrote: > > On (Mon) 14 Jul 2014 [20:50:06], Herbert Xu wrote: > > > On Thu, Jul 10, 2014 at 03:42:33PM +0530, Amit Shah wrote: > > > > v3: > > > > -

Re: [PATCH v3 0/2] hwrng, virtio-rng: init-time fixes

2014-07-14 Thread Amit Shah
On (Mon) 14 Jul 2014 [20:50:06], Herbert Xu wrote: > On Thu, Jul 10, 2014 at 03:42:33PM +0530, Amit Shah wrote: > > v3: > > - Kees Cook pointed out a weird side-effect: devices which have > >->init() registered get their randomness added to the system each > >

Re: [RFC PATCH 1/3] hw_random: allow RNG devices to give early randomness after a delay

2014-07-14 Thread Amit Shah
On (Mon) 14 Jul 2014 [08:37:00], Jason Cooper wrote: > On Mon, Jul 14, 2014 at 10:05:19AM +0530, Amit Shah wrote: > > Some RNG devices may not be ready to give early randomness at probe() > > time, and hence lose out on the opportunity to contribute to system > > randomne

[RFC PATCH 0/3] hw_random: support for delayed init randomness requests

2014-07-13 Thread Amit Shah
previous series gets committed. Please review, Amit Shah (3): hw_random: allow RNG devices to give early randomness after a delay virtio: rng: only accept delayed early randomness requests Revert "virtio: rng: ensure reads happen after successful probe" drivers/ch

[RFC PATCH 1/3] hw_random: allow RNG devices to give early randomness after a delay

2014-07-13 Thread Amit Shah
the delay is 500ms, which is enough for the lone device that needs such treatment: virtio-rng. CC: Kees Cook CC: Jason Cooper CC: Herbert Xu Signed-off-by: Amit Shah --- drivers/char/hw_random/core.c | 20 +++- include/linux/hw_random.h | 8 2 files changed, 27

[RFC PATCH 3/3] Revert "virtio: rng: ensure reads happen after successful probe"

2014-07-13 Thread Amit Shah
. CC: Kees Cook CC: Jason Cooper CC: Herbert Xu Signed-off-by: Amit Shah --- drivers/char/hw_random/core.c | 6 -- drivers/char/hw_random/virtio-rng.c | 10 -- 2 files changed, 16 deletions(-) diff --git a/drivers/char/hw_random/core.c b/drivers/char/hw_random/core.c

[RFC PATCH 2/3] virtio: rng: only accept delayed early randomness requests

2014-07-13 Thread Amit Shah
hw_random core can ask for initial randomness after a slight delay after probe() finishes, and we can contribute to system randomness at that point. Tell the hw_random core by setting the HWRNG_DELAY_READ_AT_INIT flag. CC: Kees Cook CC: Jason Cooper CC: Herbert Xu Signed-off-by: Amit Shah

  1   2   >