Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1147782ybl; Wed, 8 Jan 2020 11:52:30 -0800 (PST) X-Google-Smtp-Source: APXvYqxp6mbwbpqSXIJpBhlrqo18dEUiYq7auzr3U60DkOqGt80bOFp4FwJC5RR1WLqzUUN8VUMo X-Received: by 2002:aca:d4ca:: with SMTP id l193mr212878oig.133.1578513150343; Wed, 08 Jan 2020 11:52:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578513150; cv=none; d=google.com; s=arc-20160816; b=Sy5WpJvDpsbWRHSwfuLHTKCz6NOK31hdd5aDcuGQeqMaAS8DP8IWzSgZZtBHXIBqBX N+qN6hloAvkijKyNu//+GsuSbeOzydazJZvKdGWaH8Ibc5cCch3fS8r0rHDGl36CHqwQ J/KeAYD7ZpvGj9SSxeExMyra4xzipVQX8U4wJxvheKX5iW4XgC/IPfYpxmRWIo8KdqKs Mv1EZVjtdD7rc/QbrITaFF7VBXQTCv8XJcqlc+QX5prmtKA8XT7hJ8KqyDRCvGimRSRp q7K6XpaIK0vTWtKLDmygIVbCpIPzP0SOza9brq/eihtOsAPbGwtqcb626fC8S5YmVQS4 OmOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:organization:references:in-reply-to:date:cc:to:from :subject:message-id:dkim-signature; bh=iMgpRwMfBTA/wg1V1yYv/ptKkHdbwk4G6gGbVx8IaEQ=; b=SOFBQm+vZesCzjLvsK+YOpSv1FogPw3rPTDKp7WAu534z7zFgOOYNF3UpC/VIxo7f9 4WkWKqUGW/z/2aJpHDvYjZ+N78MQX8ws87Ap0aqMFczQjnHH/qhwGFW9KERwydX2qBsE eHNBq134HBuda1MkBWbmTXORFgyoM8lYAsXFRx/LgfKHwxuM/cMwURHj0KHvSyftIlEh 5zpFPX86DhqUx09DG2ZDff7iSrs4XTi2UBuKtm3LmxlqJG6TRBqv3PRxD5H4pSrA80qd HMVn7uvsYbj1rJsHLfWkSFfAnDYrI/b3dEDbovD0EbxDMpRQwWGlChdd4WTMEO/4v45v yl8g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@cyberus-technology.de header.s=default1911 header.b=lgY7QYci; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k9si2354616oih.157.2020.01.08.11.52.18; Wed, 08 Jan 2020 11:52:30 -0800 (PST) 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; dkim=fail header.i=@cyberus-technology.de header.s=default1911 header.b=lgY7QYci; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728241AbgAHQIe (ORCPT + 99 others); Wed, 8 Jan 2020 11:08:34 -0500 Received: from www413.your-server.de ([88.198.28.140]:59188 "EHLO www413.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726401AbgAHQIe (ORCPT ); Wed, 8 Jan 2020 11:08:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cyberus-technology.de; s=default1911; h=Content-Transfer-Encoding: MIME-Version:Content-Type:References:In-Reply-To:Date:Cc:To:From:Subject: Message-ID:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=iMgpRwMfBTA/wg1V1yYv/ptKkHdbwk4G6gGbVx8IaEQ=; b=lgY7QYcicyoKwvccg83IZQro0 0cResX5TJ+zvSIpLlLQDFaZF2/s8crlziDLa9UCb79Wo0iA+5QxfM4z5XRTmg3g4n5H+lVAFrSgZj hULgkB/qa5xtNPoCCeiIC8EWWw2G0H2wVMXZCb3Igvu20TWgiaC0FsbfKTrtGpWj+EWHOG+oFr3rK EbVEVokH/sT2XBGNxUG26c8bpcGw89Ema7TtlHzGoG6sZK9KhEogvk412Iwu8lDMVygkugjpMd5va atSePYPRa/H/tDRUmpPyfO7p8MhV7yjSL5w4rmoO10ezG/P0N8AjxUM57OseHrcutrOQBZmnUYKSL /dNK9O48A==; Received: from sslproxy05.your-server.de ([78.46.172.2]) by www413.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89_1) (envelope-from ) id 1ipDsk-00028w-O8; Wed, 08 Jan 2020 17:08:30 +0100 Received: from [24.134.37.229] (helo=192-168-0-109.rdsnet.ro) by sslproxy05.your-server.de with esmtpsa (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1ipDsk-0002Bk-C4; Wed, 08 Jan 2020 17:08:30 +0100 Message-ID: <5e98e9666bfeb275ec168df24bb8e9a33781229e.camel@cyberus-technology.de> Subject: Re: [PATCH 2/3] drm/i915/gvt: make gvt oblivious of kvmgt data structures From: Julian Stecklina To: Jani Nikula , intel-gvt-dev@lists.freedesktop.org Cc: linux-kernel@vger.kernel.org, hang.yuan@intel.com, dri-devel@lists.freedesktop.org, zhiyuan.lv@intel.com Date: Wed, 08 Jan 2020 18:08:28 +0200 In-Reply-To: <87tv56qm9m.fsf@intel.com> References: <20200106140622.14393-1-julian.stecklina@cyberus-technology.de> <20200106140622.14393-2-julian.stecklina@cyberus-technology.de> <87tv56qm9m.fsf@intel.com> Organization: Cyberus Technology GmbH Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.34.2 (3.34.2-1.fc31) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Authenticated-Sender: julian.stecklina@cyberus-technology.de X-Virus-Scanned: Clear (ClamAV 0.101.4/25688/Wed Jan 8 10:56:24 2020) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2020-01-08 at 12:24 +0200, Jani Nikula wrote: > On Mon, 06 Jan 2020, Julian Stecklina > wrote: [...] > > + /* Hypervisor-specific device state. */ > > + void *vdev; > > I have no clue about the relative merits of the patch, but you can use > the actual type for the pointer with a forward declaration. You don't > need the definition for that. > > i.e. > > struct kvmgt_vdev; > ... > struct kvmgt_vdev *vdev; The goal here is to make the GVT code independent of the hypervisor backend. Different hypervisor backends need to keep different per-device state, so using the KVM type here defeats the purpose. I assume this is not only useful for us, but also for other hypervisor backends, such as Xen or 3rd-party hypervisors. Julian