From patchwork Tue Feb 4 22:41:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lis, Tomasz" X-Patchwork-Id: 13960021 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 116CDC02196 for ; Tue, 4 Feb 2025 22:41:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8B72D10E101; Tue, 4 Feb 2025 22:41:41 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Y1grtiCW"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7708D10E101 for ; Tue, 4 Feb 2025 22:41:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1738708899; x=1770244899; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=F7dxtK7+1wsXWVpEakheOhZf9YINx2tRRNCmDD8GGl0=; b=Y1grtiCWraM4JlXtFAg8SQB+QRSckMJPaUZnBpBymmRGmhe1xFS+ftdJ 53jZdJJmxk3ARFj3ouARmUJEXk0MhwnJsKrEiBkNk/RsuQVBtuaYGWK2J txtQt6t/6gKhh1W66XPsuzdV0jovGU1r+vgpN+4xCOrCsmDmJoVAScLY8 ZDDSUDfRDmACiArJTrHWVcIGmE03y9QHLVGIJkgxEXjdddMYCa/epOaq8 JfzY9I/yK229nS8O4zMD0kh86EvePzNKO4ubYILNQC5l/EAljQY+ahVkS crsY3iQL7f5Hi9zqqM2Hxwhs77koLZO6L8od/OpEQVBgpln3bzoyJoEJg Q==; X-CSE-ConnectionGUID: 4ulWk2tORdKSOla1UE0jcw== X-CSE-MsgGUID: ahOVTUYuTGGmy+WLB7aQHg== X-IronPort-AV: E=McAfee;i="6700,10204,11336"; a="56685998" X-IronPort-AV: E=Sophos;i="6.13,259,1732608000"; d="scan'208";a="56685998" Received: from fmviesa010.fm.intel.com ([10.60.135.150]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Feb 2025 14:41:39 -0800 X-CSE-ConnectionGUID: lJjDoCy8RFaKlKkEo6Qfww== X-CSE-MsgGUID: Bvi1A7VfRTm7dTzLBHVLdA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,259,1732608000"; d="scan'208";a="111272716" Received: from gkczarna.igk.intel.com ([10.211.131.163]) by fmviesa010.fm.intel.com with ESMTP; 04 Feb 2025 14:41:37 -0800 From: Tomasz Lis To: dri-devel@lists.freedesktop.org Cc: Nirmoy Das , =?utf-8?q?Christian_K=C3=B6nig?= , =?utf-8?b?Vmls?= =?utf-8?b?bGUgU3lyasOkbMOk?= , =?utf-8?q?Mic?= =?utf-8?q?ha=C5=82_Winiarski?= , =?utf-8?q?Mich?= =?utf-8?q?a=C5=82_Wajdeczko?= , =?utf-8?q?Piotr?= =?utf-8?q?_Pi=C3=B3rkowski?= Subject: [RFC 0/1] drm/mm: Introduce address space shifting Date: Tue, 4 Feb 2025 23:41:35 +0100 Message-Id: <20250204224136.3183710-1-tomasz.lis@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This RFC asks for introduction of an interface which allows to shift a range managed by drm_mm instance without repeating the node list creation. The long explanation: Single Root I/O Virtualization is becoming a standard GFX feature in server environments. Virtual Machines provided with direct access to virtualized GFX hardware, in form of VFs, need to support the standard set of features expected by Virtual Machine Managers. These standard features include ability to save the VM state, and later restore the VM, possibly on another machine with different setup. For the restore to succeed, the GFX hardware model must match; but for its configuration, some differences are often allowed. Such alterations may include a different range of non-virtualized resources assigned to the VF, including global address spaces. If any non-virtualized address space is saved, as part of VM state, on one machine and restored on another, it may happen that the target range differs from source range. To shift the address space, currently creating a new drm_mm object is required, and moving all nodes to the new object while adding the shift. GFX hardware handled by Xe driver contains Global Graphics Translation Table, which is an example of such non-virtualized resource. Should this interface change be accepted, a series which utilizes this interface in Xe driver will be prepared. Signed-off-by: Tomasz Lis Tomasz Lis (1): drm_mm: Introduce address space shifting drivers/gpu/drm/drm_mm.c | 24 ++++++++++++++++++++++++ include/drm/drm_mm.h | 1 + 2 files changed, 25 insertions(+)