Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3449798ybi; Fri, 5 Jul 2019 07:32:42 -0700 (PDT) X-Google-Smtp-Source: APXvYqxP/Ujngx1f0MZvLYj62nJ1wzJrCdZuJX5R7oV5miAdrzgJaKWVdmkibA+16BSUs51gF0sX X-Received: by 2002:a63:490a:: with SMTP id w10mr5890954pga.6.1562337162260; Fri, 05 Jul 2019 07:32:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1562337162; cv=none; d=google.com; s=arc-20160816; b=smwQpveMmrwk0ljA4FWEFQTVpIQGLVEO6tce8STaftHcsQ3I5W08HKTxhMmxwaI25V +IGHKBbBrwZUdkbp0yJpoVt64FEtH9hRTJNKfRYH/7NqI18yAHkk1dqLfSvpBTdj17fi nAaf9lu2DeUPnt5Qxz8p8uuxc76BLFuIbn7amFrvRTrsy0o7xhKDiskyEWZeNk4r2Rw2 pgeQ+PR37EB2K9z4FWvycilqt1jYet0CMu397WMI1JquoQNzFO091gW2Tljmnrr2aSxk mG50Yk/clF4JFBAPYQQdAjJPqnIbjY/J85wW01tww2zqV6LRJMc8XPJM6d4KSLJW91+v syOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=oCngFUnO157VTMPHmyqPX6o1Yc6nOFf6ZlOtnYuJpoM=; b=lcTw2e4Lhok49MdBRzbU0kxdp3vxU89N4xIsiXtm2pCWdZLJx0mYF4e84P9x45Xc+l uKUPySGAEppzlXFuUWVWKY5hfBh5ZvTDy7H59nv95VjEzSuUXHe4ZC8kyiMbIfqW5Tru JCup7yyFn+tOyjjxY9eMILRcGoQHG/VTLVO6zvdIK+S0G6P7WB8W+Hf9QNkzzXpEMrgA 23P2QuGY4KI2HI/iOB7hMKvQKC+a0Hl3fVP8bBwN2IRV9FFOkae60SIc6oRHZvGl1C5j 9FhMc4OzgdtK0XpZ0hHGj/cR5Xj+47Cn6nKZFByFDXYaFWt3wgQHNEXJzFNq4i3zMI+r g15w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y12si3916958pfg.260.2019.07.05.07.32.27; Fri, 05 Jul 2019 07:32:42 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727571AbfGEOHx (ORCPT + 99 others); Fri, 5 Jul 2019 10:07:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:52340 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727515AbfGEOHt (ORCPT ); Fri, 5 Jul 2019 10:07:49 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2FCC459451; Fri, 5 Jul 2019 14:07:48 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-90.ams2.redhat.com [10.36.116.90]) by smtp.corp.redhat.com (Postfix) with ESMTP id D1D277DE33; Fri, 5 Jul 2019 14:07:47 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id C692B16E2D; Fri, 5 Jul 2019 16:07:46 +0200 (CEST) Date: Fri, 5 Jul 2019 16:07:46 +0200 From: Gerd Hoffmann To: Chia-I Wu Cc: ML dri-devel , Gurchetan Singh , David Airlie , Daniel Vetter , "open list:VIRTIO GPU DRIVER" , open list Subject: Re: [PATCH v6 15/18] drm/virtio: rework virtio_gpu_transfer_to_host_ioctl fencing Message-ID: <20190705140746.czs2e5ffryx2slxf@sirius.home.kraxel.org> References: <20190702141903.1131-1-kraxel@redhat.com> <20190702141903.1131-16-kraxel@redhat.com> <20190704115138.ou77sb3rlrex67tj@sirius.home.kraxel.org> <20190705090553.jx5zcdoxeimojq2i@sirius.home.kraxel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190705090553.jx5zcdoxeimojq2i@sirius.home.kraxel.org> User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 05 Jul 2019 14:07:49 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > > > ... 3d case passes the objs list to virtio_gpu_cmd_transfer_to_host_3d, > > > so it gets added to the vbuf and released when the command is finished. > > Why doesn't this apply to virtio_gpu_cmd_transfer_to_host_2d? > > Hmm, yes, makes sense to handle both the same way. > > With virgl=off qemu processes the commands from the guest > synchronously, so it'll work fine as-is. So you can't hit > the theoretical race window in practice. But depending > on that host-side implementation detail isn't a good idea > indeed. Branch with incremental fixes: https://git.kraxel.org/cgit/linux/log/?h=drm-virtio-kill-ttm I'll be offline three weeks now, will resume this when I'm back. cheers, Gerd