Re: [PATCH 1/1] virtio_console: fix missing byte order handling for cols and rows

2025-04-16 Thread Amit Shah
On Sat, 2025-03-22 at 01:29 +0100, Halil Pasic wrote: > As per virtio spec the fields cols and rows are specified as little > endian. Although there is no legacy interface requirement that would > state that cols and rows need to be handled as native endian when > legacy > interface is used, unlike

Re: [PATCH] virtio: console: Make resize control event handling compliant with spec

2025-03-27 Thread Amit Shah
On Thu, 2025-03-20 at 18:26 +0100, Maximilian Immanuel Brandtner wrote: > According to section 5.3.6.2 of the virtio spec a control buffer with > the event VIRITO_CONSOLE_RESIZE is followed by a > virtio_console_resize > struct containing 2 little endian 16bit integerts cols,rows. The > kernel > im

Re: [PATCH] virtio: console: Make resizing compliant with virtio spec

2025-03-19 Thread Amit Shah
On Wed, 2025-03-19 at 09:54 +0100, Maximilian Immanuel Brandtner wrote: > On Tue, 2025-03-18 at 15:25 +0100, Amit Shah wrote: > > On Tue, 2025-03-18 at 11:07 +0100, Maximilian Immanuel Brandtner > > wrote: > > > On Mon, 2025-03-03 at 12:54 +0100, Amit Shah wrote: > >

Re: [PATCH] virtio: console: Make resizing compliant with virtio spec

2025-03-19 Thread Amit Shah
On Tue, 2025-03-18 at 11:07 +0100, Maximilian Immanuel Brandtner wrote: > On Mon, 2025-03-03 at 12:54 +0100, Amit Shah wrote: > > On Tue, 2025-02-25 at 10:21 +0100, Maximilian Immanuel Brandtner > > wrote: > > > According to the virtio spec[0] the virtio console res

Re: [PATCH] virtio: console: Make resizing compliant with virtio spec

2025-03-18 Thread Amit Shah
On Mon, 2025-03-10 at 14:04 +0100, Maximilian Immanuel Brandtner wrote: [...] > Just to make sure that everyone here is one the same page there is > indeed a difference between the ordering of the control resize > message > and the kernel implementation; however as this bug has been around > for

Re: [PATCH] virtio: console: Make resizing compliant with virtio spec

2025-03-03 Thread Amit Shah
On Tue, 2025-02-25 at 10:21 +0100, Maximilian Immanuel Brandtner wrote: > According to the virtio spec[0] the virtio console resize struct > defines > cols before rows. In the kernel implementation it is the other way > around > resulting in the two properties being switched. Not true, see below.

Re: [PATCH] virtio: console: Prepare for making REMOTEPROC modular

2025-02-18 Thread Amit Shah
On Mon, 2025-02-17 at 11:59 +0100, Amit Shah wrote: > On Mon, 2025-02-17 at 11:53 +0100, Amit Shah wrote: > > On Fri, 2025-02-14 at 18:47 +0100, Uwe Kleine-König wrote: > > > On Fri, Feb 14, 2025 at 05:55:41PM +0100, Amit Shah wrote: > > > > On Fri, 2025-02-14 at

Re: [PATCH] virtio: console: Prepare for making REMOTEPROC modular

2025-02-17 Thread Amit Shah
On Mon, 2025-02-17 at 11:53 +0100, Amit Shah wrote: > On Fri, 2025-02-14 at 18:47 +0100, Uwe Kleine-König wrote: > > On Fri, Feb 14, 2025 at 05:55:41PM +0100, Amit Shah wrote: > > > On Fri, 2025-02-14 at 17:52 +0100, Uwe Kleine-König wrote: > > > > Hello Amit, > &g

Re: [PATCH] virtio: console: Prepare for making REMOTEPROC modular

2025-02-17 Thread Amit Shah
On Fri, 2025-02-14 at 18:47 +0100, Uwe Kleine-König wrote: > On Fri, Feb 14, 2025 at 05:55:41PM +0100, Amit Shah wrote: > > On Fri, 2025-02-14 at 17:52 +0100, Uwe Kleine-König wrote: > > > Hello Amit, > > > > > > On Fri, Feb 14, 2025 at 05:37:52PM +0100, Amit

Re: [PATCH] virtio: console: Prepare for making REMOTEPROC modular

2025-02-14 Thread Amit Shah
On Fri, 2025-02-14 at 17:52 +0100, Uwe Kleine-König wrote: > Hello Amit, > > On Fri, Feb 14, 2025 at 05:37:52PM +0100, Amit Shah wrote: > > I'm thinking of the two combinations of interest: REMOTEPROC=m, > > VIRTIO_CONSOLE can be y or m.  Say virtcons_probe() happens w

Re: [PATCH] virtio: console: Prepare for making REMOTEPROC modular

2025-02-14 Thread Amit Shah
On Fri, 2025-02-14 at 17:13 +0100, Uwe Kleine-König wrote: > Hello Amit, > > On Fri, Feb 14, 2025 at 02:32:16PM +0100, Amit Shah wrote: > > On Fri, 2025-02-14 at 12:14 +0100, Uwe Kleine-König wrote: > > > On Fri, Feb 14, 2025 at 11:58:44AM +0100, Amit Shah wrote: > >

Re: [PATCH] virtio: console: Prepare for making REMOTEPROC modular

2025-02-14 Thread Amit Shah
On Fri, 2025-02-14 at 12:14 +0100, Uwe Kleine-König wrote: > Hello Amit, > > On Fri, Feb 14, 2025 at 11:58:44AM +0100, Amit Shah wrote: > > On Thu, 2025-02-13 at 12:55 +0100, Uwe Kleine-König wrote: > > > virtio_console.c can make use of REMOTEPROC. Therefore it has &

Re: [PATCH] virtio: console: Prepare for making REMOTEPROC modular

2025-02-14 Thread Amit Shah
On Thu, 2025-02-13 at 12:55 +0100, Uwe Kleine-König wrote: > virtio_console.c can make use of REMOTEPROC. Therefore it has several > tests evaluating > > IS_ENABLED(CONFIG_REMOTEPROC) > > . This currently only does the right thing because CONFIG_REMOTEPROC > cannot be modular. Otherwise the

Re: [PATCH v1 1/1] virtio_console: Get rid of unneeded temporary variable

2025-02-12 Thread Amit Shah
;  drivers/char/virtio_console.c | 5 + >  1 file changed, 1 insertion(+), 4 deletions(-) Reviewed-by: Amit Shah

Re: [PATCH] virtio: console: Use str_yes_no() helper in port_debugfs_show()

2025-02-12 Thread Amit Shah
On Wed, 2025-02-12 at 12:48 +0100, Thorsten Blum wrote: > Remove hard-coded strings by using the str_yes_no() helper function. > > Signed-off-by: Thorsten Blum > --- >  drivers/char/virtio_console.c | 4 ++-- >  1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Amit Shah

Re: [RFC PATCH 00/39] 1G page support for guest_memfd

2025-02-06 Thread Amit Shah
On Mon, 2025-02-03 at 08:35 +, Ackerley Tng wrote: > Amit Shah writes: > > > Hey Ackerley, > > Hi Amit, > > > On Tue, 2024-09-10 at 23:43 +, Ackerley Tng wrote: > > > Hello, > > > > > > This patchset is our exploration of how to su

Re: [RFC PATCH 00/39] 1G page support for guest_memfd

2025-01-28 Thread Amit Shah
Hey Ackerley, On Tue, 2024-09-10 at 23:43 +, Ackerley Tng wrote: > Hello, > > This patchset is our exploration of how to support 1G pages in > guest_memfd, and > how the pages will be used in Confidential VMs. We've discussed this patchset at LPC and in the guest-memfd calls. Can you please

Re: [PATCH] virtio_console: Convert to use devm funcs

2025-01-28 Thread Amit Shah
On Tue, 2025-01-28 at 13:52 +0800, oushixiong1...@163.com wrote: > From: Shixiong Ou > > Convert to devm_* funcs so that no need to manual free in error path. > > Signed-off-by: Shixiong Ou > --- >  drivers/char/virtio_console.c | 43 ++--- > -- >  1 file changed, 17

Re: [PATCH] virtio: console: Replace deprecated kmap_atomic with kmap_local_page

2025-01-09 Thread Amit Shah
t it > depends > on disabling page faults or preemption. > > [1] https://lwn.net/Articles/836144/ > [2] > https://docs.kernel.org/mm/highmem.html#temporary-virtual-mappings > > Signed-off-by: David Reaver Reviewed-by: Amit Shah

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

  1   2   3   >