From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752103AbcIJEdz (ORCPT ); Sat, 10 Sep 2016 00:33:55 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:34062 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750783AbcIJEdy (ORCPT ); Sat, 10 Sep 2016 00:33:54 -0400 Date: Sat, 10 Sep 2016 06:33:48 +0200 From: Ingo Molnar To: "Michael S. Tsirkin" Cc: Amit Shah , Andy Lutomirski , x86@kernel.org, virtualization@lists.linux-foundation.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] virtio_console: Stop doing DMA on the stack Message-ID: <20160910043348.GA6061@gmail.com> References: <0afe68f9b4be6c95af9e7672b07acd0274c26dfe.1472569320.git.luto@kernel.org> <20160906070343.GD3100@amit-lp.rh> <20160908064943.GA25876@gmail.com> <20160909210940-mutt-send-email-mst@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160909210940-mutt-send-email-mst@kernel.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Michael S. Tsirkin wrote: > On Thu, Sep 08, 2016 at 08:49:43AM +0200, Ingo Molnar wrote: > > > > * Amit Shah wrote: > > > > > On (Tue) 30 Aug 2016 [08:04:15], Andy Lutomirski wrote: > > > > virtio_console uses a small DMA buffer for control requests. Move > > > > that buffer into heap memory. > > > > > > > > Doing virtio DMA on the stack is normally okay on non-DMA-API virtio > > > > systems (which is currently most of them), 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. If you (Amit) like this patch, > > > > would it make sense for Ingo to add it to -tip? > > > > > > Yes, I'm fine with that. > > > > Thanks! FYI, this patch now lives as: > > > > 9472fe7040bb ("virtio_console: Stop doing DMA on the stack") > > > > in tip:x86/asm, and is targeted for a v4.9 merge. > > > > Thanks, > > > > Ingo > > Thinking about it, maybe we should put it in 4.8 > after all, for benefit of systems using DMA API with virtio. > Thoughts? So CONFIG_VMAP_STACK=y is only going to be enabled for v4.9 - the enabling commit is part of tip:x86/asm as well. So AFAICS the commit is not strictly needed for v4.8. Thanks, Ingo