Re: [GIT PULL] virtio: fixes, features

2022-10-12 Thread Michael S. Tsirkin
On Wed, Oct 12, 2022 at 11:06:54PM +0200, Arnd Bergmann wrote: > On Wed, Oct 12, 2022, at 7:22 PM, Linus Torvalds wrote: > > > > The NO_IRQ thing is mainly actually defined by a few drivers that just > > never got converted to the proper world order, and even then you can > > see the confusion (ie

Re: [GIT PULL] virtio: fixes, features

2022-10-12 Thread Michael S. Tsirkin
On Thu, Oct 13, 2022 at 01:33:59AM +1100, Michael Ellerman wrote: > Michael Ellerman writes: > > [ Cc += Bjorn & linux-pci ] > > > > "Michael S. Tsirkin" writes: > >> On Wed, Oct 12, 2022 at 05:21:24PM +1100, Michael Ellerm

Re: [GIT PULL] virtio: fixes, features

2022-10-12 Thread Michael S. Tsirkin
On Wed, Oct 12, 2022 at 05:21:24PM +1100, Michael Ellerman wrote: > "Michael S. Tsirkin" writes: > > The following changes since commit 4fe89d07dcc2804c8b562f6c7896a45643d34b2f: > > > > Linux 6.0 (2022-10-02 14:09:07 -0700) > > > > are availabl

Re: [PATCH v2 1/4] Make place for common balloon code

2022-08-16 Thread Michael S. Tsirkin
On Tue, Aug 16, 2022 at 01:56:32PM +0200, Greg Kroah-Hartman wrote: > On Tue, Aug 16, 2022 at 02:47:22PM +0300, Alexander Atanasov wrote: > > Hello, > > > > On 16.08.22 12:49, Greg Kroah-Hartman wrote: > > > On Tue, Aug 16, 2022 at 12:41:14PM +0300, Alexander Atanasov wrote: > > > > > > rename

Re: [PATCH 0/2] powerpc/pseries: fix MSI/X IRQ affinity on pseries

2020-11-24 Thread Michael S. Tsirkin
IRQ: 279 CPU: 14 > IRQ: 280 CPU: 15 > IRQ: 281 CPU: 16 > IRQ: 282 CPU: 17 > IRQ: 283 CPU: 18 > IRQ: 284 CPU: 19 > IRQ: 285 CPU: 20 > IRQ: 286 CPU: 21 > IRQ: 287 CPU: 22 > IRQ: 288 CPU: 23 > IRQ: 289 CPU: 24 > IRQ: 290 CPU: 25 > IRQ: 291 CPU: 26 > IRQ: 292 CPU:

Re: [PATCH V2] vhost: do not enable VHOST_MENU by default

2020-04-17 Thread Michael S. Tsirkin
On Fri, Apr 17, 2020 at 05:33:56PM +0800, Jason Wang wrote: > > On 2020/4/17 下午5:01, Michael S. Tsirkin wrote: > > > There could be some misunderstanding here. I thought it's somehow > > > similar: a > > > CONFIG_VHOST_MENU=y will be left in the defconfigs even

Re: [PATCH V2] vhost: do not enable VHOST_MENU by default

2020-04-17 Thread Michael S. Tsirkin
On Fri, Apr 17, 2020 at 04:51:19PM +0800, Jason Wang wrote: > > On 2020/4/17 下午4:46, Michael S. Tsirkin wrote: > > On Fri, Apr 17, 2020 at 04:39:49PM +0800, Jason Wang wrote: > > > On 2020/4/17 下午4:29, Michael S. Tsirkin wrote: > > > > On Fri, Apr 17, 2020 at 0

Re: [PATCH V2] vhost: do not enable VHOST_MENU by default

2020-04-17 Thread Michael S. Tsirkin
On Fri, Apr 17, 2020 at 04:51:19PM +0800, Jason Wang wrote: > > On 2020/4/17 下午4:46, Michael S. Tsirkin wrote: > > On Fri, Apr 17, 2020 at 04:39:49PM +0800, Jason Wang wrote: > > > On 2020/4/17 下午4:29, Michael S. Tsirkin wrote: > > > > On Fri, Apr 17, 2020 at 0

Re: [PATCH V2] vhost: do not enable VHOST_MENU by default

2020-04-17 Thread Michael S. Tsirkin
On Fri, Apr 17, 2020 at 04:39:49PM +0800, Jason Wang wrote: > > On 2020/4/17 下午4:29, Michael S. Tsirkin wrote: > > On Fri, Apr 17, 2020 at 03:36:52PM +0800, Jason Wang wrote: > > > On 2020/4/17 下午2:33, Michael S. Tsirkin wrote: > > > > On Fri, Apr 17, 2020 at 1

Re: [PATCH V2] vhost: do not enable VHOST_MENU by default

2020-04-17 Thread Michael S. Tsirkin
On Fri, Apr 17, 2020 at 03:36:52PM +0800, Jason Wang wrote: > > On 2020/4/17 下午2:33, Michael S. Tsirkin wrote: > > On Fri, Apr 17, 2020 at 11:12:14AM +0800, Jason Wang wrote: > > > On 2020/4/17 上午6:55, Michael S. Tsirkin wrote: > > > > On Wed, Apr 15, 2020 at 1

Re: [PATCH V2] vhost: do not enable VHOST_MENU by default

2020-04-17 Thread Michael S. Tsirkin
On Fri, Apr 17, 2020 at 11:12:14AM +0800, Jason Wang wrote: > > On 2020/4/17 上午6:55, Michael S. Tsirkin wrote: > > On Wed, Apr 15, 2020 at 10:43:56AM +0800, Jason Wang wrote: > > > We try to keep the defconfig untouched after decoupling CONFIG_VHOST > > > out of C

Re: [PATCH V2] vhost: do not enable VHOST_MENU by default

2020-04-16 Thread Michael S. Tsirkin
On Wed, Apr 15, 2020 at 10:43:56AM +0800, Jason Wang wrote: > We try to keep the defconfig untouched after decoupling CONFIG_VHOST > out of CONFIG_VIRTUALIZATION in commit 20c384f1ea1a > ("vhost: refine vhost and vringh kconfig") by enabling VHOST_MENU by > default. Then the defconfigs can keep

Re: [RFC v1 0/2] Enable IOMMU support for pseries Secure VMs

2019-11-06 Thread Michael S. Tsirkin
On Wed, Nov 06, 2019 at 12:59:50PM +1100, Alexey Kardashevskiy wrote: > > > On 05/11/2019 08:28, Ram Pai wrote: > > This patch series enables IOMMU support for pseries Secure VMs. > > > > > > Tested using QEMU command line option: > > > > "-device virtio-scsi-pci,id=scsi0,bus=pci.0,addr=0x4,

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-07-15 Thread Michael S. Tsirkin
On Mon, Jul 15, 2019 at 07:03:03PM -0300, Thiago Jung Bauermann wrote: > > Michael S. Tsirkin writes: > > > On Mon, Jul 15, 2019 at 05:29:06PM -0300, Thiago Jung Bauermann wrote: > >> > >> Michael S. Tsirkin writes: > >> > >> > On Sun, J

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-07-15 Thread Michael S. Tsirkin
On Mon, Jul 15, 2019 at 05:29:06PM -0300, Thiago Jung Bauermann wrote: > > Michael S. Tsirkin writes: > > > On Sun, Jul 14, 2019 at 02:51:18AM -0300, Thiago Jung Bauermann wrote: > >> > >> > >> Michael S. Tsirkin writes: > >&

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-07-15 Thread Michael S. Tsirkin
On Sun, Jul 14, 2019 at 02:51:18AM -0300, Thiago Jung Bauermann wrote: > > > Michael S. Tsirkin writes: > > > On Thu, Jun 27, 2019 at 10:58:40PM -0300, Thiago Jung Bauermann wrote: > >> > >> Michael S. Tsirkin writes: > >> > >> > On Mon

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-07-01 Thread Michael S. Tsirkin
On Thu, Jun 27, 2019 at 10:58:40PM -0300, Thiago Jung Bauermann wrote: > > Michael S. Tsirkin writes: > > > On Mon, Jun 03, 2019 at 10:13:59PM -0300, Thiago Jung Bauermann wrote: > >> > >> > >> Michael S. Tsirkin writes: > >> > >

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-06-03 Thread Michael S. Tsirkin
On Mon, Jun 03, 2019 at 10:13:59PM -0300, Thiago Jung Bauermann wrote: > > > Michael S. Tsirkin writes: > > > On Wed, Apr 17, 2019 at 06:42:00PM -0300, Thiago Jung Bauermann wrote: > >> I rephrased it in terms of address translation. What do you think of >

Re: [PATCH 22/22] docs: fix broken documentation links

2019-05-30 Thread Michael S. Tsirkin
documentation I just send I patch to fix them in a dedicated > patch Acked-by: Michael S. Tsirkin for the vhost change. > > > > Signed-off-by: Mauro Carvalho Chehab > > --- > > Documentation/acpi/dsd/leds.txt | 2 +- > >

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-05-20 Thread Michael S. Tsirkin
On Wed, Apr 17, 2019 at 06:42:00PM -0300, Thiago Jung Bauermann wrote: > I rephrased it in terms of address translation. What do you think of > this version? The flag name is slightly different too: > > > VIRTIO_F_ACCESS_PLATFORM_NO_TRANSLATION This feature has the same > meaning as

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-05-20 Thread Michael S. Tsirkin
On Fri, Apr 26, 2019 at 08:56:43PM -0300, Thiago Jung Bauermann wrote: > > Michael S. Tsirkin writes: > > > On Wed, Apr 24, 2019 at 10:01:56PM -0300, Thiago Jung Bauermann wrote: > >> > >> Michael S. Tsirkin writes: > >> > >> > On Wed, A

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-04-24 Thread Michael S. Tsirkin
On Wed, Apr 24, 2019 at 10:01:56PM -0300, Thiago Jung Bauermann wrote: > > Michael S. Tsirkin writes: > > > On Wed, Apr 17, 2019 at 06:42:00PM -0300, Thiago Jung Bauermann wrote: > >> > >> Michael S. Tsirkin writes: > >> > >> > On Thu, M

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-04-19 Thread Michael S. Tsirkin
On Wed, Apr 17, 2019 at 06:42:00PM -0300, Thiago Jung Bauermann wrote: > > Michael S. Tsirkin writes: > > > On Thu, Mar 21, 2019 at 09:05:04PM -0300, Thiago Jung Bauermann wrote: > >> > >> Michael S. Tsirkin writes: > >> > >> > On Wed, M

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-03-26 Thread Michael S. Tsirkin
On Wed, Jan 30, 2019 at 08:44:27AM +0100, Christoph Hellwig wrote: > On Tue, Jan 29, 2019 at 09:36:08PM -0500, Michael S. Tsirkin wrote: > > This has been discussed ad nauseum. virtio is all about compatibility. > > Losing a couple of lines of code isn't worth breaking working set

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-03-23 Thread Michael S. Tsirkin
On Thu, Mar 21, 2019 at 09:05:04PM -0300, Thiago Jung Bauermann wrote: > > Michael S. Tsirkin writes: > > > On Wed, Mar 20, 2019 at 01:13:41PM -0300, Thiago Jung Bauermann wrote: > >> >> Another way of looking at this issue which also explains our reluctance >

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-03-20 Thread Michael S. Tsirkin
On Wed, Mar 20, 2019 at 01:13:41PM -0300, Thiago Jung Bauermann wrote: > >> Another way of looking at this issue which also explains our reluctance > >> is that the only difference between a secure guest and a regular guest > >> (at least regarding virtio) is that the former uses swiotlb while the

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-02-05 Thread Michael S. Tsirkin
On Tue, Feb 05, 2019 at 08:24:07AM +0100, Christoph Hellwig wrote: > On Mon, Feb 04, 2019 at 04:38:21PM -0500, Michael S. Tsirkin wrote: > > It was designed to make, when set, as many guests as we can work > > correctly, and it seems to be successful in doing exactly that. > &g

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-02-04 Thread Michael S. Tsirkin
On Mon, Feb 04, 2019 at 04:15:41PM -0200, Thiago Jung Bauermann wrote: > > Christoph Hellwig writes: > > > On Tue, Jan 29, 2019 at 09:36:08PM -0500, Michael S. Tsirkin wrote: > >> This has been discussed ad nauseum. virtio is all about compatibility. > >> Losin

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-02-04 Thread Michael S. Tsirkin
On Mon, Feb 04, 2019 at 04:14:20PM -0200, Thiago Jung Bauermann wrote: > > Hello Michael, > > Michael S. Tsirkin writes: > > > On Tue, Jan 29, 2019 at 03:42:44PM -0200, Thiago Jung Bauermann wrote: > >> > >> Fixing address of powerpc mailing list.

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-01-29 Thread Michael S. Tsirkin
On Wed, Jan 30, 2019 at 11:05:42AM +0800, Jason Wang wrote: > > On 2019/1/30 上午10:36, Michael S. Tsirkin wrote: > > On Wed, Jan 30, 2019 at 10:24:01AM +0800, Jason Wang wrote: > > > On 2019/1/30 上午3:02, Michael S. Tsirkin wrote: > > > > On Tue, Jan 29, 2019

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-01-29 Thread Michael S. Tsirkin
On Wed, Jan 30, 2019 at 10:24:01AM +0800, Jason Wang wrote: > > On 2019/1/30 上午3:02, Michael S. Tsirkin wrote: > > On Tue, Jan 29, 2019 at 03:42:44PM -0200, Thiago Jung Bauermann wrote: > > > Fixing address of powerpc mailing list. > > > > > > Thiago Jung

Re: [RFC PATCH] virtio_ring: Use DMA API if guest memory is encrypted

2019-01-29 Thread Michael S. Tsirkin
On Tue, Jan 29, 2019 at 03:42:44PM -0200, Thiago Jung Bauermann wrote: > > Fixing address of powerpc mailing list. > > Thiago Jung Bauermann writes: > > > Hello, > > > > With Christoph's rework of the DMA API that recently landed, the patch > > below is the only change needed in virtio to make

Re: [PATCH v7 0/7] Add virtio-iommu driver

2019-01-29 Thread Michael S. Tsirkin
On Mon, Jan 21, 2019 at 11:29:05AM +, Jean-Philippe Brucker wrote: > Hi, > > On 18/01/2019 15:51, Michael S. Tsirkin wrote: > > > > On Tue, Jan 15, 2019 at 12:19:52PM +, Jean-Philippe Brucker wrote: > >> Implement the virtio-iommu driver, f

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-08 Thread Michael S. Tsirkin
On Wed, Aug 08, 2018 at 11:18:13PM +1000, Benjamin Herrenschmidt wrote: > Sure, but all of this is just the configuration of the iommu. But I > think we agree here, and your point remains valid, indeed my proposed > hack: > > > if ((flags & VIRTIO_F_IOMMU_PLATFORM) ||

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-06 Thread Michael S. Tsirkin
On Tue, Aug 07, 2018 at 08:13:56AM +1000, Benjamin Herrenschmidt wrote: > On Tue, 2018-08-07 at 00:46 +0300, Michael S. Tsirkin wrote: > > On Tue, Aug 07, 2018 at 07:26:35AM +1000, Benjamin Herrenschmidt wrote: > > > On Mon, 2018-08-06 at 23:35 +0300, Michael S. Tsirkin wrote: &

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-06 Thread Michael S. Tsirkin
On Tue, Aug 07, 2018 at 07:26:35AM +1000, Benjamin Herrenschmidt wrote: > On Mon, 2018-08-06 at 23:35 +0300, Michael S. Tsirkin wrote: > > > As I said replying to Christoph, we are "leaking" into the interface > > > something here that is really what's t

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-06 Thread Michael S. Tsirkin
On Tue, Aug 07, 2018 at 05:56:59AM +1000, Benjamin Herrenschmidt wrote: > On Mon, 2018-08-06 at 16:46 +0300, Michael S. Tsirkin wrote: > > > > > Right, we'll need some quirk to disable balloons in the guest I > > > suppose. > > > > > > Passing

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-06 Thread Michael S. Tsirkin
On Mon, Aug 06, 2018 at 09:10:40AM -0700, Christoph Hellwig wrote: > On Mon, Aug 06, 2018 at 07:06:05PM +0300, Michael S. Tsirkin wrote: > > > I've done something very similar in the thread I posted a few years > > > ago. > > > > Right so that was before spectre

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-06 Thread Michael S. Tsirkin
On Mon, Aug 06, 2018 at 08:24:06AM -0700, Christoph Hellwig wrote: > On Mon, Aug 06, 2018 at 04:36:43PM +0300, Michael S. Tsirkin wrote: > > On Mon, Aug 06, 2018 at 02:32:28PM +0530, Anshuman Khandual wrote: > > > On 08/05/2018 05:54 AM, Michael S. Tsirkin wrote: > > > &

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-06 Thread Michael S. Tsirkin
On Sun, Aug 05, 2018 at 02:52:54PM +1000, Benjamin Herrenschmidt wrote: > On Sun, 2018-08-05 at 03:22 +0300, Michael S. Tsirkin wrote: > > I see the allure of this, but I think down the road you will > > discover passing a flag in libvirt XML saying > > "please use

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-06 Thread Michael S. Tsirkin
On Mon, Aug 06, 2018 at 02:32:28PM +0530, Anshuman Khandual wrote: > On 08/05/2018 05:54 AM, Michael S. Tsirkin wrote: > > On Fri, Aug 03, 2018 at 08:21:26PM -0500, Benjamin Herrenschmidt wrote: > >> On Fri, 2018-08-03 at 22:08 +0300, Michael S. Tsirkin wrote: > >

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-04 Thread Michael S. Tsirkin
On Wed, Aug 01, 2018 at 09:16:38AM +0100, Will Deacon wrote: > On Tue, Jul 31, 2018 at 03:36:22PM -0500, Benjamin Herrenschmidt wrote: > > On Tue, 2018-07-31 at 10:30 -0700, Christoph Hellwig wrote: > > > > However the question people raise is that DMA API is already full of > > > > arch-specific

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-04 Thread Michael S. Tsirkin
On Fri, Aug 03, 2018 at 08:21:26PM -0500, Benjamin Herrenschmidt wrote: > On Fri, 2018-08-03 at 22:08 +0300, Michael S. Tsirkin wrote: > > > > > Please go through these patches and review whether this approach > > > > > broadly > > > > > ma

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-04 Thread Michael S. Tsirkin
On Fri, Aug 03, 2018 at 08:22:11PM -0500, Benjamin Herrenschmidt wrote: > (Appologies if you got this twice, my mailer had a brain fart and I don't > know if the first one got through & am about to disappear in a plane for 17h) I got like 3 of these. I hope that's true for everyone as I replied

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-04 Thread Michael S. Tsirkin
On Fri, Aug 03, 2018 at 08:16:21PM -0500, Benjamin Herrenschmidt wrote: > On Fri, 2018-08-03 at 22:07 +0300, Michael S. Tsirkin wrote: > > On Fri, Aug 03, 2018 at 10:58:36AM -0500, Benjamin Herrenschmidt wrote: > > > On Fri, 2018-08-03 at 00:05 -0700, Christoph Hellwig wrote: &

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-04 Thread Michael S. Tsirkin
On Sat, Aug 04, 2018 at 01:15:00AM -0700, Christoph Hellwig wrote: > On Fri, Aug 03, 2018 at 10:17:32PM +0300, Michael S. Tsirkin wrote: > > It seems reasonable to teach a platform to override dma-range > > for a specific device e.g. in case it knows about bugs in ACPI.

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-03 Thread Michael S. Tsirkin
On Fri, Aug 03, 2018 at 12:05:07AM -0700, Christoph Hellwig wrote: > On Thu, Aug 02, 2018 at 04:13:09PM -0500, Benjamin Herrenschmidt wrote: > > So let's differenciate the two problems of having an IOMMU (real or > > emulated) which indeeds adds overhead etc... and using the DMA API. > > > > At

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-03 Thread Michael S. Tsirkin
On Fri, Aug 03, 2018 at 10:41:41AM +0800, Jason Wang wrote: > > > On 2018年08月03日 04:55, Michael S. Tsirkin wrote: > > On Fri, Jul 20, 2018 at 09:29:37AM +0530, Anshuman Khandual wrote: > > > This patch series is the follow up on the discussions we had before about >

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-03 Thread Michael S. Tsirkin
On Fri, Aug 03, 2018 at 10:58:36AM -0500, Benjamin Herrenschmidt wrote: > On Fri, 2018-08-03 at 00:05 -0700, Christoph Hellwig wrote: > > > 2- Make virtio use the DMA API with our custom platform-provided > > > swiotlb callbacks when needed, that is when not using IOMMU *and* > > > running on a

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-02 Thread Michael S. Tsirkin
On Thu, Aug 02, 2018 at 04:13:09PM -0500, Benjamin Herrenschmidt wrote: > On Thu, 2018-08-02 at 23:52 +0300, Michael S. Tsirkin wrote: > > > Yes, this is the purpose of Anshuman original patch (I haven't looked > > > at the details of the patch in a while but t

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-02 Thread Michael S. Tsirkin
On Fri, Jul 20, 2018 at 09:29:37AM +0530, Anshuman Khandual wrote: > This patch series is the follow up on the discussions we had before about > the RFC titled [RFC,V2] virtio: Add platform specific DMA API translation > for virito devices (https://patchwork.kernel.org/patch/10417371/). There >

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-02 Thread Michael S. Tsirkin
On Thu, Aug 02, 2018 at 10:33:05AM -0500, Benjamin Herrenschmidt wrote: > On Thu, 2018-08-02 at 00:56 +0300, Michael S. Tsirkin wrote: > > > but it's not, VMs are > > > created in "legacy" mode all the times and we don't know at VM creation > > >

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-02 Thread Michael S. Tsirkin
On Thu, Aug 02, 2018 at 12:53:41PM -0500, Benjamin Herrenschmidt wrote: > On Thu, 2018-08-02 at 20:19 +0300, Michael S. Tsirkin wrote: > > > > I see. So yes, given that device does not know or care, using > > virtio features is an awkward fit. > > > > So let's sa

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-02 Thread Michael S. Tsirkin
On Thu, Aug 02, 2018 at 11:01:26AM -0500, Benjamin Herrenschmidt wrote: > On Thu, 2018-08-02 at 18:41 +0300, Michael S. Tsirkin wrote: > > > > > I don't completely agree: > > > > > > 1 - VIRTIO_F_IOMMU_PLATFORM is a property of the "other side&

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-02 Thread Michael S. Tsirkin
On Thu, Aug 02, 2018 at 10:24:57AM -0500, Benjamin Herrenschmidt wrote: > On Wed, 2018-08-01 at 01:36 -0700, Christoph Hellwig wrote: > > We just need to figure out how to deal with devices that deviate > > from the default. One things is that VIRTIO_F_IOMMU_PLATFORM really > > should become

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-01 Thread Michael S. Tsirkin
On Wed, Aug 01, 2018 at 10:05:35AM +0100, Will Deacon wrote: > Hi Christoph, > > On Wed, Aug 01, 2018 at 01:36:39AM -0700, Christoph Hellwig wrote: > > On Wed, Aug 01, 2018 at 09:16:38AM +0100, Will Deacon wrote: > > > On arm/arm64, the problem we have is that legacy virtio devices on the > > >

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-01 Thread Michael S. Tsirkin
On Wed, Aug 01, 2018 at 01:36:39AM -0700, Christoph Hellwig wrote: > On Wed, Aug 01, 2018 at 09:16:38AM +0100, Will Deacon wrote: > > On arm/arm64, the problem we have is that legacy virtio devices on the MMIO > > transport (so definitely not PCI) have historically been advertised by qemu > > as

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-08-01 Thread Michael S. Tsirkin
On Tue, Jul 31, 2018 at 03:36:22PM -0500, Benjamin Herrenschmidt wrote: > On Tue, 2018-07-31 at 10:30 -0700, Christoph Hellwig wrote: > > > However the question people raise is that DMA API is already full of > > > arch-specific tricks the likes of which are outlined in your post linked > > >

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-07-30 Thread Michael S. Tsirkin
On Mon, Jul 30, 2018 at 04:18:02AM -0700, Christoph Hellwig wrote: > On Mon, Jul 30, 2018 at 01:28:03PM +0300, Michael S. Tsirkin wrote: > > Let me reply to the "crappy" part first: > > So virtio devices can run on another CPU or on a PCI bus. Configuration > > can h

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-07-30 Thread Michael S. Tsirkin
On Mon, Jul 30, 2018 at 02:34:14AM -0700, Christoph Hellwig wrote: > We really need to distinguish between legacy virtual crappy > virtio (and that includes v1) that totally ignores the bus it pretends > to be on, and sane virtio (to be defined) that sit on a real (or > properly emulated including

Re: [RFC 2/4] virtio: Override device's DMA OPS with virtio_direct_dma_ops selectively

2018-07-28 Thread Michael S. Tsirkin
On Sat, Jul 28, 2018 at 02:26:24PM +0530, Anshuman Khandual wrote: > On 07/20/2018 09:29 AM, Anshuman Khandual wrote: > > Now that virtio core always needs all virtio devices to have DMA OPS, we > > need to make sure that the structure it points is the right one. In the > > absence of

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-07-27 Thread Michael S. Tsirkin
On Wed, Jul 25, 2018 at 08:56:23AM +0530, Anshuman Khandual wrote: > Results with and without the patches are similar. Thanks! And another thing to try is virtio-net with a fast NIC backend (40G and up). Unfortunately at this point loopback tests stress the host scheduler too much. -- MST

Re: [RFC 4/4] virtio: Add platform specific DMA API translation for virito devices

2018-07-25 Thread Michael S. Tsirkin
On Mon, Jul 23, 2018 at 07:46:09AM +0530, Anshuman Khandual wrote: > There is a redundant definition of virtio_has_iommu_quirk in the tools > directory (tools/virtio/linux/virtio_config.h) which does not seem to > be used any where. I guess that can be removed without problem. It's there just to

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-07-23 Thread Michael S. Tsirkin
On Mon, Jul 23, 2018 at 11:58:23AM +0530, Anshuman Khandual wrote: > On 07/20/2018 06:46 PM, Michael S. Tsirkin wrote: > > On Fri, Jul 20, 2018 at 09:29:37AM +0530, Anshuman Khandual wrote: > >> This patch series is the follow up on the discussions we had before about > >

Re: [RFC 0/4] Virtio uses DMA API for all devices

2018-07-20 Thread Michael S. Tsirkin
On Fri, Jul 20, 2018 at 09:29:37AM +0530, Anshuman Khandual wrote: > This patch series is the follow up on the discussions we had before about > the RFC titled [RFC,V2] virtio: Add platform specific DMA API translation > for virito devices (https://patchwork.kernel.org/patch/10417371/). There >

Re: [RFC 4/4] virtio: Add platform specific DMA API translation for virito devices

2018-07-20 Thread Michael S. Tsirkin
On Fri, Jul 20, 2018 at 09:29:41AM +0530, Anshuman Khandual wrote: >Subject: Re: [RFC 4/4] virtio: Add platform specific DMA API translation for > virito devices s/virito/virtio/ > This adds a hook which a platform can define in order to allow it to > override virtio device's DMA OPS

Re: [RFC V2] virtio: Add platform specific DMA API translation for virito devices

2018-06-13 Thread Michael S. Tsirkin
On Mon, Jun 11, 2018 at 01:34:50PM +1000, Benjamin Herrenschmidt wrote: > On Mon, 2018-06-11 at 06:28 +0300, Michael S. Tsirkin wrote: > > > > > However if the administrator > > > ignores/forgets/deliberatey-decides/is-constrained to NOT enable the > > > f

Re: [RFC V2] virtio: Add platform specific DMA API translation for virito devices

2018-06-13 Thread Michael S. Tsirkin
On Mon, Jun 11, 2018 at 01:29:18PM +1000, Benjamin Herrenschmidt wrote: > On Sun, 2018-06-10 at 19:39 -0700, Ram Pai wrote: > > > > However if the administrator > > ignores/forgets/deliberatey-decides/is-constrained to NOT enable the > > flag, virtio will not be able to pass control to the DMA

Re: [RFC V2] virtio: Add platform specific DMA API translation for virito devices

2018-06-13 Thread Michael S. Tsirkin
On Wed, Jun 13, 2018 at 12:41:41AM -0700, Christoph Hellwig wrote: > On Mon, Jun 11, 2018 at 01:29:18PM +1000, Benjamin Herrenschmidt wrote: > > At the risk of repeating myself, let's just do the first pass which is > > to switch virtio over to always using the DMA API in the actual data > > flow

Re: [RFC V2] virtio: Add platform specific DMA API translation for virito devices

2018-06-13 Thread Michael S. Tsirkin
On Thu, Jun 07, 2018 at 11:36:55PM -0700, Christoph Hellwig wrote: > > This seems to be what was being asked for in this thread, > > with comments claiming IOMMU flag adds too much overhead. > > Right now it means implementing a virtual iommu, which I agree is > way too much overhead. Well not

Re: [RFC V2] virtio: Add platform specific DMA API translation for virito devices

2018-06-10 Thread Michael S. Tsirkin
On Sun, Jun 10, 2018 at 07:39:09PM -0700, Ram Pai wrote: > On Thu, Jun 07, 2018 at 07:28:35PM +0300, Michael S. Tsirkin wrote: > > On Wed, Jun 06, 2018 at 10:23:06PM -0700, Christoph Hellwig wrote: > > > On Thu, May 31, 2018 at 08:43:58PM +0300, Michael S. Tsirkin wrote: > >

Re: [RFC V2] virtio: Add platform specific DMA API translation for virito devices

2018-06-07 Thread Michael S. Tsirkin
On Wed, Jun 06, 2018 at 10:23:06PM -0700, Christoph Hellwig wrote: > On Thu, May 31, 2018 at 08:43:58PM +0300, Michael S. Tsirkin wrote: > > Pls work on a long term solution. Short term needs can be served by > > enabling the iommu platform in qemu. > > So, I spent some time

Re: [RFC V2] virtio: Add platform specific DMA API translation for virito devices

2018-06-04 Thread Michael S. Tsirkin
On Tue, Jun 05, 2018 at 09:26:56AM +1000, Benjamin Herrenschmidt wrote: > I would like to keep however the ability to bypass the iommu for > performance reasons So that's easy, clear the IOMMU flag and this means "bypass the IOMMU". -- MST

Re: [RFC V2] virtio: Add platform specific DMA API translation for virito devices

2018-06-04 Thread Michael S. Tsirkin
On Mon, Jun 04, 2018 at 11:14:36PM +1000, Benjamin Herrenschmidt wrote: > On Mon, 2018-06-04 at 05:55 -0700, Christoph Hellwig wrote: > > On Mon, Jun 04, 2018 at 03:43:09PM +0300, Michael S. Tsirkin wrote: > > > Another is that given the basic functionality is in there, optim

Re: [RFC V2] virtio: Add platform specific DMA API translation for virito devices

2018-06-04 Thread Michael S. Tsirkin
On Mon, Jun 04, 2018 at 11:11:52PM +1000, Benjamin Herrenschmidt wrote: > On Mon, 2018-06-04 at 15:43 +0300, Michael S. Tsirkin wrote: > > On Thu, May 24, 2018 at 08:27:04AM +1000, Benjamin Herrenschmidt wrote: > > > On Wed, 2018-05-23 at 21:50 +0300, Michael S. Tsirkin wrote: &

Re: [RFC V2] virtio: Add platform specific DMA API translation for virito devices

2018-06-04 Thread Michael S. Tsirkin
On Mon, Jun 04, 2018 at 07:48:54PM +1000, Benjamin Herrenschmidt wrote: > On Mon, 2018-06-04 at 18:57 +1000, David Gibson wrote: > > > > > - First qemu doesn't know that the guest will switch to "secure mode" > > > in advance. There is no difference between a normal and a secure > > > partition

Re: [RFC V2] virtio: Add platform specific DMA API translation for virito devices

2018-06-04 Thread Michael S. Tsirkin
On Thu, May 24, 2018 at 08:27:04AM +1000, Benjamin Herrenschmidt wrote: > On Wed, 2018-05-23 at 21:50 +0300, Michael S. Tsirkin wrote: > > > I re-read that discussion and I'm still unclear on the > > original question, since I got several apparently > > conflicting a

Re: [RFC V2] virtio: Add platform specific DMA API translation for virito devices

2018-05-31 Thread Michael S. Tsirkin
On Thu, May 31, 2018 at 09:09:24AM +0530, Anshuman Khandual wrote: > On 05/24/2018 12:51 PM, Ram Pai wrote: > > On Wed, May 23, 2018 at 09:50:02PM +0300, Michael S. Tsirkin wrote: > >> subj: s/virito/virtio/ > >> > > ..snip.. > >>> machine_subsys_initc

Re: [RFC V2] virtio: Add platform specific DMA API translation for virito devices

2018-05-25 Thread Michael S. Tsirkin
On Thu, May 24, 2018 at 08:27:04AM +1000, Benjamin Herrenschmidt wrote: > On Wed, 2018-05-23 at 21:50 +0300, Michael S. Tsirkin wrote: > > > I re-read that discussion and I'm still unclear on the > > original question, since I got several apparently > > conflicting a

Re: [RFC V2] virtio: Add platform specific DMA API translation for virito devices

2018-05-23 Thread Michael S. Tsirkin
subj: s/virito/virtio/ On Tue, May 22, 2018 at 12:03:17PM +0530, Anshuman Khandual wrote: > This adds a hook which a platform can define in order to allow it to > force the use of the DMA API for all virtio devices even if they don't > have the VIRTIO_F_IOMMU_PLATFORM flag set. We want to use

Re: [RFC] virtio: Use DMA MAP API for devices without an IOMMU

2018-04-18 Thread Michael S. Tsirkin
On Wed, Apr 18, 2018 at 08:47:10AM +0530, Anshuman Khandual wrote: > On 04/15/2018 05:41 PM, Christoph Hellwig wrote: > > On Fri, Apr 06, 2018 at 06:37:18PM +1000, Benjamin Herrenschmidt wrote: > implemented as DMA API which the virtio core understands. There is no > need for an IOMMU to

Re: [RFC] virtio: Use DMA MAP API for devices without an IOMMU

2018-04-05 Thread Michael S. Tsirkin
On Fri, Apr 06, 2018 at 01:09:43AM +1000, Benjamin Herrenschmidt wrote: > On Thu, 2018-04-05 at 17:54 +0300, Michael S. Tsirkin wrote: > > On Thu, Apr 05, 2018 at 08:09:30PM +0530, Anshuman Khandual wrote: > > > On 04/05/2018 04:26 PM, Anshuman Khandual wrote: > > > &g

Re: [RFC] virtio: Use DMA MAP API for devices without an IOMMU

2018-04-05 Thread Michael S. Tsirkin
after being processed with > > SWIOTLB API. To enable this usage, it introduces an architecture specific > > function which will just make virtio core front end select DMA operations > > structure. > > > > Signed-off-by: Anshuman Khandual <khand...@linux.v

Re: Memory corruption in powerpc guests with virtio_balloon (was Re: [PATCH v3] virtio_balloon: fix deadlock on OOM)

2017-12-01 Thread Michael S. Tsirkin
On Fri, Dec 01, 2017 at 11:31:08PM +1100, Michael Ellerman wrote: > "Michael S. Tsirkin" <m...@redhat.com> writes: > > > fill_balloon doing memory allocations under balloon_lock > > can cause a deadlock when leak_balloon is called from > > virtballoo

Re: [PATCH 09/15] virtio-blk: Pass attribute group to device_add_disk

2016-09-03 Thread Michael S. Tsirkin
to merge this with the rest of patchset Acked-by: Michael S. Tsirkin <m...@redhat.com> > --- > drivers/block/virtio_blk.c | 38 +++--- > 1 file changed, 27 insertions(+), 11 deletions(-) > > diff --git a/drivers/block/virtio_blk.c

Re: [v3,11/41] mips: reuse asm-generic/barrier.h

2016-01-14 Thread Michael S. Tsirkin
On Wed, Jan 13, 2016 at 02:26:16PM -0800, Leonid Yegoshin wrote: > And all that is out-of-topic here in my mind. I just want to be sure that > this patchset still provides a use of a specific lightweight SYNCs on MIPS > vs bold and heavy generalized "SYNC 0" in any case. > > - Leonid. Of course

Re: [v3,11/41] mips: reuse asm-generic/barrier.h

2016-01-12 Thread Michael S. Tsirkin
On Mon, Jan 11, 2016 at 05:14:14PM -0800, Leonid Yegoshin wrote: > On 01/10/2016 06:18 AM, Michael S. Tsirkin wrote: > >On mips dma_rmb, dma_wmb, smp_store_mb, read_barrier_depends, > >smp_read_barrier_depends, smp_store_release and smp_load_acquire match > >the asm-generic v

Re: [PATCH v3 01/41] lcoking/barriers, arch: Use smp barriers in smp_store_release()

2016-01-12 Thread Michael S. Tsirkin
On Tue, Jan 12, 2016 at 08:28:44AM -0800, Paul E. McKenney wrote: > On Sun, Jan 10, 2016 at 04:16:32PM +0200, Michael S. Tsirkin wrote: > > From: Davidlohr Bueso <d...@stgolabs.net> > > > > With commit b92b8b35a2e ("locking/arch: Rename set_mb() to smp_st

Re: [PATCH v4 0/3] checkpatch: handling of memory barriers

2016-01-11 Thread Michael S. Tsirkin
On Mon, Jan 11, 2016 at 12:59:25PM +0200, Michael S. Tsirkin wrote: > As part of memory barrier cleanup, this patchset > extends checkpatch to make it easier to stop > incorrect memory barrier usage. > > This replaces the checkpatch patches in my series > arch: barrier

Re: [PATCH v3 3/3] checkpatch: add virt barriers

2016-01-11 Thread Michael S. Tsirkin
On Mon, Jan 11, 2016 at 09:40:18PM +1100, Julian Calaby wrote: > Hi Michael, > > On Mon, Jan 11, 2016 at 9:35 PM, Michael S. Tsirkin <m...@redhat.com> wrote: > > On Sun, Jan 10, 2016 at 02:52:16PM -0800, Joe Perches wrote: > >> On Mon, 2016-01-11 at 09:13 +1100, Juli

[PATCH v4 2/3] checkpatch: check for __smp outside barrier.h

2016-01-11 Thread Michael S. Tsirkin
ch test so it will trigger a warning. Reported-by: Russell King <li...@arm.linux.org.uk> Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- scripts/checkpatch.pl | 10 ++ 1 file changed, 10 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 9

[PATCH v4 1/3] checkpatch.pl: add missing memory barriers

2016-01-11 Thread Michael S. Tsirkin
SMP-only barriers were missing in checkpatch.pl Refactor code slightly to make adding more variants easier. Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- scripts/checkpatch.pl | 22 +- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/s

Re: [PATCH v3 3/3] checkpatch: add virt barriers

2016-01-11 Thread Michael S. Tsirkin
On Sun, Jan 10, 2016 at 02:52:16PM -0800, Joe Perches wrote: > On Mon, 2016-01-11 at 09:13 +1100, Julian Calaby wrote: > > On Mon, Jan 11, 2016 at 6:31 AM, Michael S. Tsirkin <m...@redhat.com> wrote: > > > Add virt_ barriers to list of barriers to check for >

[PATCH v4 0/3] checkpatch: handling of memory barriers

2016-01-11 Thread Michael S. Tsirkin
unnecessary capture groups rename smp_barriers to smp_barrier_stems for clarity add barriers before/after atomic Changes from v1: catch optional\s* before () in barriers rewrite using qr{} instead of map Michael S. Tsirkin (3): checkpatch.pl: add missing memory

[PATCH v4 3/3] checkpatch: add virt barriers

2016-01-11 Thread Michael S. Tsirkin
Add virt_ barriers to list of barriers to check for presence of a comment. Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- scripts/checkpatch.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 25476c2..c

Re: [PATCH v2 20/32] metag: define __smp_xxx

2016-01-11 Thread Michael S. Tsirkin
On Tue, Jan 05, 2016 at 12:09:30AM +, James Hogan wrote: > Hi Michael, > > On Thu, Dec 31, 2015 at 09:08:22PM +0200, Michael S. Tsirkin wrote: > > This defines __smp_xxx barriers for metag, > > for use by virtualization. > > > > smp_xxx barriers are removed

[PATCH v2 2/3] checkpatch: check for __smp outside barrier.h

2016-01-10 Thread Michael S. Tsirkin
ch test so it will trigger a warning. Reported-by: Russell King <li...@arm.linux.org.uk> Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- scripts/checkpatch.pl | 10 ++ 1 file changed, 10 insertions(+) diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl index 9

[PATCH v2 0/3] checkpatch: handling of memory barriers

2016-01-10 Thread Michael S. Tsirkin
optional\s* before () in barriers rewrite using qr{} instead of map Michael S. Tsirkin (3): checkpatch.pl: add missing memory barriers checkpatch: check for __smp outside barrier.h checkpatch: add virt barriers scripts/checkpatch.pl | 31 ++- 1 file

[PATCH v2 1/3] checkpatch.pl: add missing memory barriers

2016-01-10 Thread Michael S. Tsirkin
SMP-only barriers were missing in checkpatch.pl Refactor code slightly to make adding more variants easier. Signed-off-by: Michael S. Tsirkin <m...@redhat.com> --- scripts/checkpatch.pl | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/s

Re: [PATCH 1/3] checkpatch.pl: add missing memory barriers

2016-01-10 Thread Michael S. Tsirkin
On Mon, Jan 04, 2016 at 02:15:50PM -0800, Joe Perches wrote: > On Mon, 2016-01-04 at 22:45 +0200, Michael S. Tsirkin wrote: > > On Mon, Jan 04, 2016 at 08:07:40AM -0800, Joe Perches wrote: > > > On Mon, 2016-01-04 at 13:36 +0200, Michael S. Tsirkin wrote: > > > >

  1   2   3   >