From patchwork Wed Aug 26 06:33:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Xu X-Patchwork-Id: 11737239 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 64272109B for ; Wed, 26 Aug 2020 06:33:41 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 03C1820738 for ; Wed, 26 Aug 2020 06:33:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 03C1820738 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D875E6E1CD; Wed, 26 Aug 2020 06:33:38 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by gabe.freedesktop.org (Postfix) with ESMTPS id 0A9646E1CD; Wed, 26 Aug 2020 06:33:36 +0000 (UTC) IronPort-SDR: KDAmUCSy2d/kXfsMAhN4thr9T7miO+WBNbXcJuV33lneUhCKwaa7qiuwOBPqZV4S4+rMaJI5rh EWsctWc6f2JQ== X-IronPort-AV: E=McAfee;i="6000,8403,9724"; a="156233388" X-IronPort-AV: E=Sophos;i="5.76,354,1592895600"; d="scan'208";a="156233388" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2020 23:33:36 -0700 IronPort-SDR: cCEee64HRD5ngdYKUmSth2JTPHHveNZAxVJ2fPPUQr02GFARz+O4aiztjnhTakguiJsboXanYg H7BC/mCNzk+A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,354,1592895600"; d="scan'208";a="500140252" Received: from unknown (HELO coxu-arch-shz.sh.intel.com) ([10.239.160.21]) by fmsmga005.fm.intel.com with ESMTP; 25 Aug 2020 23:33:34 -0700 From: Colin Xu To: zhenyuw@linux.intel.com, intel-gvt-dev@lists.freedesktop.org, intel-gfx@lists.freedesktop.org Date: Wed, 26 Aug 2020 14:33:30 +0800 Message-Id: <20200826063330.680032-1-colin.xu@intel.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Subject: [Intel-gfx] [PATCH v2 0/2] Enable GVT suspend/resume X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" This patchset enables GVT suspend/resume so that GVT enabled VM can continue running after host resuming from suspend state. V2: - Change kzalloc/kfree to vzalloc/vfree since the space allocated from kmalloc may not enough for all saved GGTT entries. - Keep gvt suspend/resume wrapper in intel_gvt.h/intel_gvt.c and move the actual implementation to gvt.h/gvt.c. (zhenyu) - Check gvt config on and active with intel_gvt_active(). (zhenyu) Colin Xu (2): drm/i915/gvt: Save/restore HW status for GVT during suspend/resume drm/i915/gvt: Add GVT suspend/resume routine to i915 drivers/gpu/drm/i915/gvt/gtt.c | 73 +++++++++++++++++++++++++++++ drivers/gpu/drm/i915/gvt/gtt.h | 2 + drivers/gpu/drm/i915/gvt/gvt.c | 15 ++++++ drivers/gpu/drm/i915/gvt/gvt.h | 6 +++ drivers/gpu/drm/i915/gvt/handlers.c | 20 ++++++++ drivers/gpu/drm/i915/gvt/mmio.h | 3 ++ drivers/gpu/drm/i915/gvt/vgpu.c | 1 + drivers/gpu/drm/i915/i915_drv.c | 4 ++ drivers/gpu/drm/i915/intel_gvt.c | 29 ++++++++++++ drivers/gpu/drm/i915/intel_gvt.h | 10 ++++ 10 files changed, 163 insertions(+)