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 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (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 68C60C27C6E for ; Mon, 17 Jun 2024 09:08:10 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.742015.1148728 (Exim 4.92) (envelope-from ) id 1sJ8LI-0005x2-Bh; Mon, 17 Jun 2024 09:08:00 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 742015.1148728; Mon, 17 Jun 2024 09:08:00 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sJ8LI-0005wv-93; Mon, 17 Jun 2024 09:08:00 +0000 Received: by outflank-mailman (input) for mailman id 742015; Mon, 17 Jun 2024 09:07:59 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1sJ8LH-0005wo-Mw for xen-devel@lists.xenproject.org; Mon, 17 Jun 2024 09:07:59 +0000 Received: from mail-ej1-x630.google.com (mail-ej1-x630.google.com [2a00:1450:4864:20::630]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id 16ac8145-2c89-11ef-b4bb-af5377834399; Mon, 17 Jun 2024 11:07:57 +0200 (CEST) Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a6f7720e6e8so120212966b.3 for ; Mon, 17 Jun 2024 02:07:57 -0700 (PDT) Received: from [10.156.60.236] (ip-037-024-206-209.um08.pools.vodafone-ip.de. [37.24.206.209]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a6f6fb084f5sm299310766b.163.2024.06.17.02.07.55 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 17 Jun 2024 02:07:56 -0700 (PDT) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: 16ac8145-2c89-11ef-b4bb-af5377834399 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=google; t=1718615277; x=1719220077; darn=lists.xenproject.org; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:from:to:cc:subject:date:message-id:reply-to; bh=wmCUQhRrp+U/l5cgP6xim2f8AZbvbWBWfJybaQLpqlg=; b=Bf3RxvfHMyX1ttpc2GJl4f2zwy54y/n0HNybQqKq/5js4wO/iuNq0MCdhkD9oqG/0t OkzVicV2Vu2BjvFHpO7u1r/QOPvxDxaH61UfJbJbcqIyzFjSee/9BLm4R9fEywzzLJMz hvzNTC2WZBX5RmP55rIlB6gMeEkvV1IJHNLWIlw8lGjoWojbftolEVLNdomFB5K6JvML 3TVJqBNCxcAIdcHuh++Q/R2ldxXO+8dA4X/Jo4qV45U6lFgmLyl+Os1/YxadAyjal7W8 yAWK26ZkoWz0GqN19FhRQTC85Ra2MDGZoNkZaDZ2C0f4sLBv90AgUVySbNz53uJlEsLE SKjg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718615277; x=1719220077; h=content-transfer-encoding:in-reply-to:autocrypt:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=wmCUQhRrp+U/l5cgP6xim2f8AZbvbWBWfJybaQLpqlg=; b=xUtGY/m9bx+5O48t/bLngPt98QfzLY6ys5zhB9rTsyG6Gj3C3LwWBSQ/o84PBSQWTJ FRo2wZ0PvyLLCTyELsWvE0gni/mzQdAzSR+WG0CwWXQAG6EITrd6f5ngshltsA005uQN I2W5Ij+dwnM6BZE57w/BqQH7xGUqJGCxfd0QkNNF/iwXffwV8+S5OrCqQPbptJaanH2X FxyvaqSDv7YYiDOlY9kojsPR8FvFyeb6m4ZlJdj7imWk7ImhDXjpVt2AdL48BKpHFMer UWIq2btfZqklnS60+jivPOk3N5do7cuR11jksTgKOJgvbBKa0V6iBdPtjamPQeamMEtR Cv5Q== X-Forwarded-Encrypted: i=1; AJvYcCX5WnmSCn7WUbWrjbjjCx5Y5hAFJJHNdLvAIYM44SieHhieTa9fIkgB5egX4jJctou7dXTGVtB+6JKD8aXxsUqYp2dHrNFN216eVPRIktM= X-Gm-Message-State: AOJu0Ywe19AfZt5JCL6wVkPACUYhXLUecE/N65jsSzZIchGhzQ+S8cFF VjzwE4ZX1TZc9JZ9+BA+wzRVqENolmBe6P8oQdLoVVQlBhZoWJl6jt7Qhrpc1A== X-Google-Smtp-Source: AGHT+IEVZI4QO0poLx8usLv0/oKq7jfbDDfGVZLS/ifZCrzljM2fJEiYp+9DO8HFdoJfwrUxp8/iBA== X-Received: by 2002:a17:906:a0c:b0:a6f:d57:aedc with SMTP id a640c23a62f3a-a6f60dc50eamr754825366b.57.1718615276836; Mon, 17 Jun 2024 02:07:56 -0700 (PDT) Message-ID: <10c2ab19-e2b7-4f5f-ae73-213e0194bb8e@suse.com> Date: Mon, 17 Jun 2024 11:07:54 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Design session notes: GPU acceleration in Xen To: Demi Marie Obenour Cc: Xenia Ragiadakou , =?UTF-8?Q?Marek_Marczykowski-G=C3=B3recki?= , Ray Huang , Xen developer discussion , Andrew Cooper , =?UTF-8?Q?Roger_Pau_Monn=C3=A9?= References: <440d6444-3b02-4756-a4fa-02aae3b24b14@suse.com> Content-Language: en-US From: Jan Beulich Autocrypt: addr=jbeulich@suse.com; keydata= xsDiBFk3nEQR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PTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 14.06.2024 18:44, Demi Marie Obenour wrote: > On Fri, Jun 14, 2024 at 10:12:40AM +0200, Jan Beulich wrote: >> On 14.06.2024 09:21, Roger Pau Monné wrote: >>> I'm not sure it's possible to ensure that when using system RAM such >>> memory comes from the guest rather than the host, as it would likely >>> require some very intrusive hooks into the kernel logic, and >>> negotiation with the guest to allocate the requested amount of >>> memory and hand it over to dom0. If the maximum size of the buffer is >>> known in advance maybe dom0 can negotiate with the guest to allocate >>> such a region and grant it access to dom0 at driver attachment time. >> >> Besides the thought of transiently converting RAM to kind-of-MMIO, this >> makes me think of another possible option: Could Dom0 transfer ownership >> of the RAM that wants mapping in the guest (remotely resembling >> grant-transfer)? Would require the guest to have ballooned down enough >> first, of course. (In both cases it would certainly need working out how >> the conversion / transfer back could be made work safely and reasonably >> cleanly.) > > The kernel driver needs to be able to reclaim the memory at any time. > My understanding is that this is used to migrate memory between VRAM and > system RAM. It might also be used for other purposes. Except: How would the kernel driver reclaim the memory when it's mapped by a DomU? Jan