[PATCH v3] virtio_pci: Limit DMA mask to 44 bits for legacy virtio devices

2016-09-14 Thread Will Deacon
Legacy virtio defines the virtqueue base using a 32-bit PFN field, with a read-only register indicating a fixed page size of 4k. This can cause problems for DMA allocators that allocate top down from the DMA mask, which is set to 64 bits. In this case, the addresses are silently truncated to

Re: [PATCH v2] virtio_pci: Limit DMA mask to 44 bits for legacy virtio devices

2016-09-14 Thread Will Deacon
Hi Michael, On Wed, Sep 14, 2016 at 03:42:25PM +0300, Michael S. Tsirkin wrote: > On Wed, Sep 14, 2016 at 12:16:28PM +0100, Will Deacon wrote: > > Legacy virtio defines the virtqueue base using a 32-bit PFN field, with > > a read-only register indicating a fixed page size of 4k. > > > > This can

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

2016-09-14 Thread SF Markus Elfring
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. * Return directly after a call of the function

[PATCH 11/11] virtio_console: Rename a jump label in five functions

2016-09-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Sep 2016 15:37:52 +0200 Adjust a jump label according to the current Linux coding style convention. Thus replace the identifier "out" by "unlock". Signed-off-by: Markus Elfring ---

[PATCH 10/11] virtio_console: Rename jump labels in alloc_buf()

2016-09-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Sep 2016 15:20:30 +0200 Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/char/virtio_console.c | 11 +-- 1 file changed,

[PATCH 09/11] virtio_console: Rename a jump label in __send_to_port()

2016-09-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Sep 2016 15:15:06 +0200 Adjust a jump label according to the current Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/char/virtio_console.c | 6 +++--- 1 file changed, 3

[PATCH 08/11] virtio_console: Rename jump labels in port_fops_write()

2016-09-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Sep 2016 15:07:42 +0200 Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/char/virtio_console.c | 9 - 1 file changed, 4

[PATCH 07/11] virtio_console: Rename a jump label in port_fops_splice_write()

2016-09-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Sep 2016 15:01:51 +0200 Adjust a jump label according to the current Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/char/virtio_console.c | 9 - 1 file changed, 4

[PATCH 06/11] virtio_console: Rename a jump label in port_fops_open()

2016-09-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Sep 2016 14:58:24 +0200 Adjust a jump label according to the current Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/char/virtio_console.c | 6 +++--- 1 file changed, 3

[PATCH 05/11] virtio_console: Rename jump labels in add_port()

2016-09-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Sep 2016 14:53:00 +0200 Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/char/virtio_console.c | 21 ++--- 1

[PATCH 04/11] virtio_console: Rename jump labels in virtcons_probe()

2016-09-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Sep 2016 14:24:05 +0200 Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/char/virtio_console.c | 17 - 1 file

[PATCH 03/11] virtio_console: Rename a jump label in init()

2016-09-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Sep 2016 14:10:24 +0200 Adjust jump labels according to the current Linux coding style convention. Signed-off-by: Markus Elfring --- drivers/char/virtio_console.c | 6 +++--- 1 file changed, 3

[PATCH 01/11] virtio_console: Use kmalloc_array() in init_vqs()

2016-09-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Sep 2016 11:23:59 +0200 * Multiplications for the size determination of memory allocations indicated that array data structures should be processed. Thus use the corresponding function "kmalloc_array". This issue was

[PATCH 00/11] virtio-console: Fine-tuning for 14 function implementations

2016-09-14 Thread SF Markus Elfring
From: Markus Elfring Date: Wed, 14 Sep 2016 15:43:21 +0200 Several update suggestions were taken into account from static source code analysis. Markus Elfring (11): Use kmalloc_array() in init_vqs() Less function calls in init_vqs() after error detection

Re: [PATCH v9 00/19] Add support for FDMA DMA controller and slim core rproc found on STi chipsets

2016-09-14 Thread Vinod Koul
On Tue, Sep 13, 2016 at 11:06:16AM -0700, Bjorn Andersson wrote: > > I hate to send a ping, > > Sorry about that. > > > but do you think we can merge this fdma series? It has gone > > through quite a few review rounds now. > > > > I think the remoteproc part looks good. yeah I was waiting for

Re: [PATCH v2] virtio_pci: Limit DMA mask to 44 bits for legacy virtio devices

2016-09-14 Thread Michael S. Tsirkin
On Wed, Sep 14, 2016 at 12:16:28PM +0100, Will Deacon wrote: > Legacy virtio defines the virtqueue base using a 32-bit PFN field, with > a read-only register indicating a fixed page size of 4k. > > This can cause problems for DMA allocators that allocate top down from > the DMA mask, which is set

[PATCH v2] virtio_pci: Limit DMA mask to 44 bits for legacy virtio devices

2016-09-14 Thread Will Deacon
Legacy virtio defines the virtqueue base using a 32-bit PFN field, with a read-only register indicating a fixed page size of 4k. This can cause problems for DMA allocators that allocate top down from the DMA mask, which is set to 64 bits. In this case, the addresses are silently truncated to

Re: virtio_blk: Clarification for communication difficulties?

2016-09-14 Thread SF Markus Elfring
> FWIW, he already gained a place on my ignore list for pestering me > offline about his patches and not stopping even when told to do so. How did I "pester" you "offline"? > So while I won't object if you choose to apply selected patches, Another bit of interesting information, isn't it? >

Re: [PATCH v9 01/19] remoteproc: st_slim_rproc: add a slimcore rproc driver

2016-09-14 Thread Lee Jones
On Tue, 13 Sep 2016, Bjorn Andersson wrote: > On Mon 05 Sep 06:16 PDT 2016, Peter Griffin wrote: > > > slim core is used as a basis for many IPs in the STi > > chipsets such as fdma and demux. To avoid duplicating > > the elf loading code in each device driver a slim > > rproc driver has been

Re: virtio_blk: Less function calls in init_vq() after error detection

2016-09-14 Thread Cornelia Huck
On Tue, 13 Sep 2016 20:24:58 +0200 Christian Borntraeger wrote: > See, some of your patches are accepted, e.g. the memdup_user changes have > usually > been applied by most maintainers including myself. If maintainers won't take > other change, > please accept that. If

Re: [virtio-dev] Re: [PATCH v10] virtio-net: add Max MTU configuration field

2016-09-14 Thread Cornelia Huck
On Wed, 14 Sep 2016 00:17:28 +0300 "Michael S. Tsirkin" wrote: > On Tue, Sep 13, 2016 at 11:18:12AM -0400, Aaron Conole wrote: (...) > > If negotiated, the driver uses \field{mtu} as > > +the maximum MTU value supplied to the driver. > > Drop "supplied to the driver"

Re: virtio_blk: Less function calls in init_vq() after error detection

2016-09-14 Thread SF Markus Elfring
>>How much will it matter in general that two function calls are performed >>in this use case without checking their return values immediately? >>https://cwe.mitre.org/data/definitions/252.html >> >> if (!names || !callbacks || !vqs) { … >> >>

Re: [PATCH v10] virtio-net: add Max MTU configuration field

2016-09-14 Thread Hannes Reinecke
On 09/13/2016 05:18 PM, Aaron Conole wrote: > It is helpful for a host to indicate it's MTU to be set on guest NICs > other than the assumed 1500 byte value. This helps in situations where > the host network is using Jumbo Frames, or aiding in PMTU discovery by > configuring a homogenous network.