From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E580AC04AB3 for ; Tue, 28 May 2019 02:52:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BB6662053B for ; Tue, 28 May 2019 02:52:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727846AbfE1Cwp (ORCPT ); Mon, 27 May 2019 22:52:45 -0400 Received: from mga17.intel.com ([192.55.52.151]:9222 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727507AbfE1Cwp (ORCPT ); Mon, 27 May 2019 22:52:45 -0400 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga107.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 27 May 2019 19:52:44 -0700 X-ExtLoop1: 1 Received: from zhen-hp.sh.intel.com (HELO zhen-hp) ([10.239.13.116]) by orsmga002.jf.intel.com with ESMTP; 27 May 2019 19:52:42 -0700 Date: Tue, 28 May 2019 10:51:27 +0800 From: Zhenyu Wang To: Gerd Hoffmann Cc: Tina Zhang , intel-gvt-dev@lists.freedesktop.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, alex.williamson@redhat.com, hang.yuan@intel.com, zhiyuan.lv@intel.com Subject: Re: [PATCH 1/2] vfio: ABI for setting mdev display flip eventfd Message-ID: <20190528025127.GI29553@zhen-hp.sh.intel.com> Reply-To: Zhenyu Wang References: <20190527084312.8872-1-tina.zhang@intel.com> <20190527084312.8872-2-tina.zhang@intel.com> <20190527090741.GE29553@zhen-hp.sh.intel.com> <20190527122237.uhd7qm62h6wfv5w7@sirius.home.kraxel.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="z9ECzHErBrwFF8sy" Content-Disposition: inline In-Reply-To: <20190527122237.uhd7qm62h6wfv5w7@sirius.home.kraxel.org> User-Agent: Mutt/1.10.0 (2018-05-17) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --z9ECzHErBrwFF8sy Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2019.05.27 14:22:37 +0200, Gerd Hoffmann wrote: > On Mon, May 27, 2019 at 05:07:41PM +0800, Zhenyu Wang wrote: > > On 2019.05.27 16:43:11 +0800, Tina Zhang wrote: > > > Add VFIO_DEVICE_SET_GFX_FLIP_EVENTFD ioctl command to set eventfd > > > based signaling mechanism to deliver vGPU framebuffer page flip > > > event to userspace. > >=20 > > Should we add probe to see if driver can support gfx flip event? >=20 > Userspace can simply call VFIO_DEVICE_SET_GFX_FLIP_EVENTFD and see if it > worked. If so -> use the eventfd. Otherwise take the fallback path > (timer based polling). I can't see any advantage a separate feature > probe steps adds. >=20 Then we need to define error return which means driver doesn't support e.g -ENOTTY, and driver shouldn't return that for other possible failure, so user space won't get confused. I think if we can define this as generic display event notification? Not necessarily just for flip, just a display change notification to let user space query current state. --=20 Open Source Technology Center, Intel ltd. $gpg --keyserver wwwkeys.pgp.net --recv-keys 4D781827 --z9ECzHErBrwFF8sy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQTXuabgHDW6LPt9CICxBBozTXgYJwUCXOyiLwAKCRCxBBozTXgY Jy7ZAJ9IHhuCGPDYDK9ZUsQm0JS1aSlYrQCfZ2G/aRCELpKd+cSxiSFDvUAuhnM= =AbnB -----END PGP SIGNATURE----- --z9ECzHErBrwFF8sy--