Re: [PATCH v2 2/2] vring: Force use of DMA API for ARM-based systems

2017-01-10 Thread Michael S. Tsirkin
On Tue, Jan 10, 2017 at 05:51:18PM +, Robin Murphy wrote: > From: Will Deacon > > Booting Linux on an ARM fastmodel containing an SMMU emulation results > in an unexpected I/O page fault from the legacy virtio-blk PCI device: > > [1.211721] arm-smmu-v3

Re: [PATCH v2 1/2] virtio_mmio: Set DMA masks appropriately

2017-01-10 Thread Michael S. Tsirkin
On Tue, Jan 10, 2017 at 05:51:17PM +, Robin Murphy wrote: > Once DMA API usage is enabled, it becomes apparent that virtio-mmio is > inadvertently relying on the default 32-bit DMA mask, which leads to > problems like rapidly exhausting SWIOTLB bounce buffers. > > Ensure that we set the

[PATCH v2 1/2] virtio_mmio: Set DMA masks appropriately

2017-01-10 Thread Robin Murphy
Once DMA API usage is enabled, it becomes apparent that virtio-mmio is inadvertently relying on the default 32-bit DMA mask, which leads to problems like rapidly exhausting SWIOTLB bounce buffers. Ensure that we set the appropriate 64-bit DMA mask whenever possible, with the coherent mask

[PATCH v2 2/2] vring: Force use of DMA API for ARM-based systems

2017-01-10 Thread Robin Murphy
From: Will Deacon Booting Linux on an ARM fastmodel containing an SMMU emulation results in an unexpected I/O page fault from the legacy virtio-blk PCI device: [1.211721] arm-smmu-v3 2b40.smmu: event 0x10 received: [1.211800] arm-smmu-v3 2b40.smmu:

Re: [PATCH] virtio_mmio: Set DMA masks appropriately

2017-01-10 Thread Michael S. Tsirkin
On Tue, Jan 10, 2017 at 03:55:31PM +, Robin Murphy wrote: > On 10/01/17 14:54, Michael S. Tsirkin wrote: > > On Tue, Jan 10, 2017 at 12:26:01PM +, Robin Murphy wrote: > >> Once DMA API usage is enabled, it becomes apparent that virtio-mmio is > >> inadvertently relying on the default

Re: [PATCH] virtio_mmio: Set DMA masks appropriately

2017-01-10 Thread Robin Murphy
On 10/01/17 14:54, Michael S. Tsirkin wrote: > On Tue, Jan 10, 2017 at 12:26:01PM +, Robin Murphy wrote: >> Once DMA API usage is enabled, it becomes apparent that virtio-mmio is >> inadvertently relying on the default 32-bit DMA mask, which leads to >> problems like rapidly exhausting SWIOTLB

Re: [PATCH] vhost: scsi: constify target_core_fabric_ops structures

2017-01-10 Thread Bhumika Goyal
On Tue, Jan 10, 2017 at 10:41 AM, Michael S. Tsirkin wrote: > On Mon, Jan 09, 2017 at 08:51:02PM +0530, Bhumika Goyal wrote: >> Declare target_core_fabric_ops strucrues as const as they are only >> passed as an argument to the functions target_register_template and >>

Re: [PATCH] virtio_mmio: Set DMA masks appropriately

2017-01-10 Thread Robin Murphy
On 10/01/17 13:15, Arnd Bergmann wrote: > On Tuesday, January 10, 2017 12:26:01 PM CET Robin Murphy wrote: >> @@ -548,6 +550,14 @@ static int virtio_mmio_probe(struct platform_device >> *pdev) >> if (vm_dev->version == 1) >> writel(PAGE_SIZE, vm_dev->base + >>

[PATCH] virtio_mmio: Set DMA masks appropriately

2017-01-10 Thread Robin Murphy
Once DMA API usage is enabled, it becomes apparent that virtio-mmio is inadvertently relying on the default 32-bit DMA mask, which leads to problems like rapidly exhausting SWIOTLB bounce buffers. Ensure that we set the appropriate 64-bit DMA mask whenever possible, with the coherent mask

Re: [PATCH] virtio_blk: fix panic in initialization error path

2017-01-10 Thread Jeff Moyer
Omar Sandoval writes: > From: Omar Sandoval > > If blk_mq_init_queue() returns an error, it gets assigned to > vblk->disk->queue. Then, when we call put_disk(), we end up calling > blk_put_queue() with the ERR_PTR, causing a bad dereference. Fix it by > only

[PATCH] vhost: scsi: constify target_core_fabric_ops structures

2017-01-10 Thread Bhumika Goyal
Declare target_core_fabric_ops strucrues as const as they are only passed as an argument to the functions target_register_template and target_unregister_template. The arguments are of type const struct target_core_fabric_ops *, so target_core_fabric_ops structures having this property can be

Re: [RFC PATCH] vring: Force use of DMA API for ARM-based systems

2017-01-10 Thread Robin Murphy
On 06/01/17 21:51, Andy Lutomirski wrote: > On Fri, Jan 6, 2017 at 10:32 AM, Robin Murphy wrote: >> On 06/01/17 17:48, Jean-Philippe Brucker wrote: >>> Hi Will, >>> >>> On 20/12/16 15:14, Will Deacon wrote: Booting Linux on an ARM fastmodel containing an SMMU emulation

Re: [PATCH] vhost: scsi: constify target_core_fabric_ops structures

2017-01-10 Thread Michael S. Tsirkin
On Tue, Jan 10, 2017 at 06:11:25PM +0530, Bhumika Goyal wrote: > On Tue, Jan 10, 2017 at 10:41 AM, Michael S. Tsirkin wrote: > > On Mon, Jan 09, 2017 at 08:51:02PM +0530, Bhumika Goyal wrote: > >> Declare target_core_fabric_ops strucrues as const as they are only > >> passed as

Re: [PATCH] virtio_mmio: Set DMA masks appropriately

2017-01-10 Thread Michael S. Tsirkin
On Tue, Jan 10, 2017 at 12:26:01PM +, Robin Murphy wrote: > Once DMA API usage is enabled, it becomes apparent that virtio-mmio is > inadvertently relying on the default 32-bit DMA mask, which leads to > problems like rapidly exhausting SWIOTLB bounce buffers. > > Ensure that we set the

Re: [PATCH] virtio_mmio: Set DMA masks appropriately

2017-01-10 Thread Arnd Bergmann
On Tuesday, January 10, 2017 1:44:37 PM CET Robin Murphy wrote: > On 10/01/17 13:15, Arnd Bergmann wrote: > > On Tuesday, January 10, 2017 12:26:01 PM CET Robin Murphy wrote: > >> @@ -548,6 +550,14 @@ static int virtio_mmio_probe(struct platform_device > >> *pdev) > >> if (vm_dev->version

Re: [PATCH] virtio_mmio: Set DMA masks appropriately

2017-01-10 Thread Russell King - ARM Linux
On Tue, Jan 10, 2017 at 02:15:57PM +0100, Arnd Bergmann wrote: > On Tuesday, January 10, 2017 12:26:01 PM CET Robin Murphy wrote: > > @@ -548,6 +550,14 @@ static int virtio_mmio_probe(struct platform_device > > *pdev) > > if (vm_dev->version == 1) > > writel(PAGE_SIZE,

Re: [PATCH] virtio_mmio: Set DMA masks appropriately

2017-01-10 Thread Arnd Bergmann
On Tuesday, January 10, 2017 12:26:01 PM CET Robin Murphy wrote: > @@ -548,6 +550,14 @@ static int virtio_mmio_probe(struct platform_device > *pdev) > if (vm_dev->version == 1) > writel(PAGE_SIZE, vm_dev->base + VIRTIO_MMIO_GUEST_PAGE_SIZE); > > + rc =

Re: [PATCH v8 1/1] crypto: add virtio-crypto driver

2017-01-10 Thread Christian Borntraeger
On 01/10/2017 01:36 PM, Gonglei (Arei) wrote: > Hi, > >> >> On 12/15/2016 03:03 AM, Gonglei wrote: >> [...] >>> + >>> +static struct crypto_alg virtio_crypto_algs[] = { { >>> + .cra_name = "cbc(aes)", >>> + .cra_driver_name = "virtio_crypto_aes_cbc", >>> + .cra_priority = 501, >> >> >> This

RE: [PATCH v8 1/1] crypto: add virtio-crypto driver

2017-01-10 Thread Gonglei (Arei)
Hi, > > On 12/15/2016 03:03 AM, Gonglei wrote: > [...] > > + > > +static struct crypto_alg virtio_crypto_algs[] = { { > > + .cra_name = "cbc(aes)", > > + .cra_driver_name = "virtio_crypto_aes_cbc", > > + .cra_priority = 501, > > > This is still higher than the hardware-accelerators (like

Re: [PATCH v8 1/1] crypto: add virtio-crypto driver

2017-01-10 Thread Christian Borntraeger
On 12/15/2016 03:03 AM, Gonglei wrote: [...] > + > +static struct crypto_alg virtio_crypto_algs[] = { { > + .cra_name = "cbc(aes)", > + .cra_driver_name = "virtio_crypto_aes_cbc", > + .cra_priority = 501, This is still higher than the hardware-accelerators (like intel aesni or the

Re: [RFC PATCH] vring: Force use of DMA API for ARM-based systems

2017-01-10 Thread Jean-Philippe Brucker
On 09/01/17 14:54, Will Deacon wrote: > On Mon, Jan 09, 2017 at 11:24:04AM +, Robin Murphy wrote: >> On 06/01/17 21:51, Andy Lutomirski wrote: >>> On Fri, Jan 6, 2017 at 10:32 AM, Robin Murphy wrote: On 06/01/17 17:48, Jean-Philippe Brucker wrote: > It used to