[{"id":3679774,"web_url":"http://patchwork.ozlabs.org/comment/3679774/","msgid":"<DHYQGLYYXEN6.11Q3FQGZMWCJ6@nvidia.com>","list_archive_url":null,"date":"2026-04-21T09:42:12","subject":"Re: [PATCH v2 4/5] gpu: nova-core: send UNLOADING_GUEST_DRIVER GSP\n command upon unloading","submitter":{"id":93201,"url":"http://patchwork.ozlabs.org/api/people/93201/","name":"Eliot Courtney","email":"ecourtney@nvidia.com"},"content":"On Tue Apr 21, 2026 at 3:16 PM JST, Alexandre Courbot wrote:\n> Currently, the GSP is left running after the driver is unbound. This is\n> not great for several reasons, notably that it can still access shared\n> memory areas that the kernel will now reclaim (especially problematic on\n> setups without an IOMMU).\n>\n> Fix this by sending the `UNLOADING_GUEST_DRIVER` GSP command when\n> unbinding. This stops the GSP and lets us proceed with the rest of the\n> unbind sequence in the next patch.\n>\n> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>\n> ---\n>  drivers/gpu/nova-core/gpu.rs                      |  5 +++\n>  drivers/gpu/nova-core/gsp/boot.rs                 | 40 +++++++++++++++++++++++\n>  drivers/gpu/nova-core/gsp/commands.rs             | 36 ++++++++++++++++++++\n>  drivers/gpu/nova-core/gsp/fw.rs                   |  4 +++\n>  drivers/gpu/nova-core/gsp/fw/commands.rs          | 23 +++++++++++++\n>  drivers/gpu/nova-core/gsp/fw/r570_144/bindings.rs |  8 +++++\n>  6 files changed, 116 insertions(+)\n>\n> diff --git a/drivers/gpu/nova-core/gpu.rs b/drivers/gpu/nova-core/gpu.rs\n> index 1701c2600538..8f2ae9e8a519 100644\n> --- a/drivers/gpu/nova-core/gpu.rs\n> +++ b/drivers/gpu/nova-core/gpu.rs\n> @@ -277,12 +277,17 @@ pub(crate) fn new<'a>(\n>  \n>      /// Called when the corresponding [`Device`](device::Device) is unbound.\n>      ///\n> +    /// Prepares the GPU for unbinding by shutting down the GSP and unregistering the sysmem flush\n> +    /// memory page.\n> +    ///\n>      /// Note: This method must only be called from `Driver::unbind`.\n>      pub(crate) fn unbind(&self, dev: &device::Device<device::Core>) {\n>          let Ok(bar) = kernel::warn_on_err!(self.bar.access(dev)) else {\n>              return;\n>          };\n>  \n> +        let _ = kernel::warn_on_err!(self.gsp.unload(dev, bar, &self.gsp_falcon));\n> +\n\nIf I remember correctly, at least on blackwell, doing the full unloading\nprocedure here actually resets the sysmem flush register, so you get a\nspurious warning. In my local branch I actually swapped the order of\nthis and unregister to get rid of it (not sure if this is correct though).\nMy sysmem flush patch that skips printing the warning if the value is 0\nwould also fix this, if we care. Have you noticed this happening too?\n\n>          self.sysmem_flush.unregister(bar);\n>      }\n>  }\n> diff --git a/drivers/gpu/nova-core/gsp/boot.rs b/drivers/gpu/nova-core/gsp/boot.rs\n> index 18f356c9178e..3f4e99b2497b 100644\n> --- a/drivers/gpu/nova-core/gsp/boot.rs\n> +++ b/drivers/gpu/nova-core/gsp/boot.rs\n> @@ -33,6 +33,7 @@\n>      },\n>      gpu::Chipset,\n>      gsp::{\n> +        cmdq::Cmdq,\n>          commands,\n>          sequencer::{\n>              GspSequencer,\n> @@ -237,4 +238,43 @@ pub(crate) fn boot(\n>  \n>          Ok(())\n>      }\n> +\n> +    /// Shut down the GSP and wait until it is offline.\n> +    fn shutdown_gsp(\n> +        cmdq: &Cmdq,\n> +        bar: &Bar0,\n> +        gsp_falcon: &Falcon<Gsp>,\n> +        suspend: bool,\n> +    ) -> Result<()> {\n> +        // Send command to shutdown GSP and wait for response.\n> +        cmdq.send_command(bar, commands::UnloadingGuestDriver::new(suspend))?;\n> +\n> +        // Wait until GSP signals it is suspended.\n> +        const LIBOS_INTERRUPT_PROCESSOR_SUSPENDED: u32 = 0x8000_0000;\n\nIf this can change based on firmware, should it be taken in via\nbindings? I also noticed in openrm 595, this is waited on by checking the\nbit rather than by strict equality (see _kgspIsProcessorSuspended). So\nit may be more defensive to check the bit rather than strict equality\n(even though that is correct for 570 according to openrm code).\n\n> +        read_poll_timeout(\n> +            || Ok(gsp_falcon.read_mailbox0(bar)),\n> +            |&mb0| mb0 == LIBOS_INTERRUPT_PROCESSOR_SUSPENDED,\n> +            Delta::from_millis(10),\n> +            Delta::from_secs(5),\n> +        )\n> +        .map(|_| ())\n> +    }\n> +\n> +    /// Attempts to unload the GSP firmware.\n> +    ///\n> +    /// This stops all activity on the GSP.\n> +    pub(crate) fn unload(\n> +        &self,\n> +        dev: &device::Device<device::Bound>,\n> +        bar: &Bar0,\n> +        gsp_falcon: &Falcon<Gsp>,\n> +    ) -> Result {\n> +        // Shut down the GSP.\n> +\n> +        Self::shutdown_gsp(&self.cmdq, bar, gsp_falcon, false)\n> +            .inspect_err(|e| dev_err!(dev, \"unload guest driver failed: {:?}\", e))?;\n\nIt looks like \"suspend\" is only ever false here? Will this be used\nlater? If we want to keep this, it may be nice to use a 2 discriminant\nenum so we don't have misc boolean parameters hanging around.\n\nnit: dev_err! should have \\n?\n\n> +        dev_dbg!(dev, \"GSP shut down\\n\");\n> +\n> +        Ok(())\n> +    }\n>  }\n> diff --git a/drivers/gpu/nova-core/gsp/commands.rs b/drivers/gpu/nova-core/gsp/commands.rs\n> index c80df421702c..fb94460c451e 100644\n> --- a/drivers/gpu/nova-core/gsp/commands.rs\n> +++ b/drivers/gpu/nova-core/gsp/commands.rs\n> @@ -237,3 +237,39 @@ pub(crate) fn gpu_name(&self) -> core::result::Result<&str, GpuNameError> {\n>  pub(crate) fn get_gsp_info(cmdq: &Cmdq, bar: &Bar0) -> Result<GetGspStaticInfoReply> {\n>      cmdq.send_command(bar, GetGspStaticInfo)\n>  }\n> +\n> +pub(crate) struct UnloadingGuestDriver {\n> +    suspend: bool,\n> +}\n\nThis feels like it only makes sense to call from within the gsp module,\nso I wonder if it can be pub(super) (prolly a few others in this file\ncould be too, ofc not relevant for this series).\n\nnit: Should this have doc comment?\n\n> +\n> +impl UnloadingGuestDriver {\n> +    pub(crate) fn new(suspend: bool) -> Self {\n> +        Self { suspend }\n> +    }\n> +}\n> +\n> +impl CommandToGsp for UnloadingGuestDriver {\n> +    const FUNCTION: MsgFunction = MsgFunction::UnloadingGuestDriver;\n> +    type Command = fw::commands::UnloadingGuestDriver;\n> +    type Reply = UnloadingGuestDriverReply;\n> +    type InitError = Infallible;\n> +\n> +    fn init(&self) -> impl Init<Self::Command, Self::InitError> {\n> +        fw::commands::UnloadingGuestDriver::new(self.suspend)\n> +    }\n> +}\n> +\n> +pub(crate) struct UnloadingGuestDriverReply;\n> +\n> +impl MessageFromGsp for UnloadingGuestDriverReply {\n> +    const FUNCTION: MsgFunction = MsgFunction::UnloadingGuestDriver;\n> +    type InitError = Infallible;\n> +    type Message = ();\n> +\n> +    fn read(\n> +        _msg: &Self::Message,\n> +        _sbuffer: &mut SBufferIter<array::IntoIter<&[u8], 2>>,\n> +    ) -> Result<Self, Self::InitError> {\n> +        Ok(UnloadingGuestDriverReply)\n> +    }\n> +}\n> diff --git a/drivers/gpu/nova-core/gsp/fw.rs b/drivers/gpu/nova-core/gsp/fw.rs\n> index 0c8a74f0e8ac..59b4c4883185 100644\n> --- a/drivers/gpu/nova-core/gsp/fw.rs\n> +++ b/drivers/gpu/nova-core/gsp/fw.rs\n> @@ -278,6 +278,7 @@ pub(crate) enum MsgFunction {\n>      Nop = bindings::NV_VGPU_MSG_FUNCTION_NOP,\n>      SetGuestSystemInfo = bindings::NV_VGPU_MSG_FUNCTION_SET_GUEST_SYSTEM_INFO,\n>      SetRegistry = bindings::NV_VGPU_MSG_FUNCTION_SET_REGISTRY,\n> +    UnloadingGuestDriver = bindings::NV_VGPU_MSG_FUNCTION_UNLOADING_GUEST_DRIVER,\n>  \n>      // Event codes\n>      GspInitDone = bindings::NV_VGPU_MSG_EVENT_GSP_INIT_DONE,\n> @@ -322,6 +323,9 @@ fn try_from(value: u32) -> Result<MsgFunction> {\n>                  Ok(MsgFunction::SetGuestSystemInfo)\n>              }\n>              bindings::NV_VGPU_MSG_FUNCTION_SET_REGISTRY => Ok(MsgFunction::SetRegistry),\n> +            bindings::NV_VGPU_MSG_FUNCTION_UNLOADING_GUEST_DRIVER => {\n> +                Ok(MsgFunction::UnloadingGuestDriver)\n> +            }\n>  \n>              // Event codes\n>              bindings::NV_VGPU_MSG_EVENT_GSP_INIT_DONE => Ok(MsgFunction::GspInitDone),\n> diff --git a/drivers/gpu/nova-core/gsp/fw/commands.rs b/drivers/gpu/nova-core/gsp/fw/commands.rs\n> index db46276430be..71c8690c9322 100644\n> --- a/drivers/gpu/nova-core/gsp/fw/commands.rs\n> +++ b/drivers/gpu/nova-core/gsp/fw/commands.rs\n> @@ -129,3 +129,26 @@ unsafe impl AsBytes for GspStaticConfigInfo {}\n>  // SAFETY: This struct only contains integer types for which all bit patterns\n>  // are valid.\n>  unsafe impl FromBytes for GspStaticConfigInfo {}\n> +\n> +/// Payload of the `UnloadingGuestDriver` command and message.\n> +#[repr(transparent)]\n> +#[derive(Clone, Copy, Debug, Zeroable)]\n> +pub(crate) struct UnloadingGuestDriver(bindings::rpc_unloading_guest_driver_v1F_07);\n> +\n> +impl UnloadingGuestDriver {\n> +    pub(crate) fn new(suspend: bool) -> Self {\n> +        Self(bindings::rpc_unloading_guest_driver_v1F_07 {\n> +            bInPMTransition: u8::from(suspend),\n> +            bGc6Entering: 0,\n> +            newLevel: if suspend { 3 } else { 0 },\n\nWhy '3'? Is there a binding that it makes sense to use for this?\n\n> +            ..Zeroable::zeroed()\n> +        })\n> +    }\n> +}\n> +\n> +// SAFETY: Padding is explicit and will not contain uninitialized data.\n> +unsafe impl AsBytes for UnloadingGuestDriver {}\n> +\n> +// SAFETY: This struct only contains integer types for which all bit patterns\n> +// are valid.\n> +unsafe impl FromBytes for UnloadingGuestDriver {}\n> diff --git a/drivers/gpu/nova-core/gsp/fw/r570_144/bindings.rs b/drivers/gpu/nova-core/gsp/fw/r570_144/bindings.rs\n> index 334e8be5fde8..5d8e4c0ad904 100644\n> --- a/drivers/gpu/nova-core/gsp/fw/r570_144/bindings.rs\n> +++ b/drivers/gpu/nova-core/gsp/fw/r570_144/bindings.rs\n> @@ -880,6 +880,14 @@ fn default() -> Self {\n>      }\n>  }\n>  #[repr(C)]\n> +#[derive(Debug, Default, Copy, Clone, MaybeZeroable)]\n> +pub struct rpc_unloading_guest_driver_v1F_07 {\n> +    pub bInPMTransition: u8_,\n> +    pub bGc6Entering: u8_,\n> +    pub __bindgen_padding_0: [u8; 2usize],\n> +    pub newLevel: u32_,\n> +}\n> +#[repr(C)]\n>  #[derive(Debug, Default, MaybeZeroable)]\n>  pub struct rpc_run_cpu_sequencer_v17_00 {\n>      pub bufferSizeDWord: u32_,","headers":{"Return-Path":"\n <linux-pci+bounces-52831-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-pci@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256\n header.s=selector2 header.b=OhFGH/Jd;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-pci+bounces-52831-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com\n header.b=\"OhFGH/Jd\"","smtp.subspace.kernel.org;\n arc=fail smtp.client-ip=52.101.48.62","smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=nvidia.com","smtp.subspace.kernel.org;\n spf=fail smtp.mailfrom=nvidia.com","dkim=none (message not signed)\n header.d=none;dmarc=none action=none header.from=nvidia.com;"],"Received":["from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g0HV11RnSz1yGs\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2026 19:43:21 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 1072B3025724\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2026 09:42:26 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id A12B23988E4;\n\tTue, 21 Apr 2026 09:42:24 +0000 (UTC)","from MW6PR02CU001.outbound.protection.outlook.com\n (mail-westus2azon11012062.outbound.protection.outlook.com [52.101.48.62])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id E2CA2332ED3;\n\tTue, 21 Apr 2026 09:42:22 +0000 (UTC)","from BL0PR12MB2353.namprd12.prod.outlook.com (2603:10b6:207:4c::31)\n by SA0PR12MB4413.namprd12.prod.outlook.com (2603:10b6:806:9e::9) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9846.16; Tue, 21 Apr\n 2026 09:42:16 +0000","from BL0PR12MB2353.namprd12.prod.outlook.com\n ([fe80::99b:dcff:8d6d:78e0]) by BL0PR12MB2353.namprd12.prod.outlook.com\n ([fe80::99b:dcff:8d6d:78e0%4]) with mapi id 15.20.9846.016; Tue, 21 Apr 2026\n 09:42:16 +0000"],"ARC-Seal":["i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776764544; cv=fail;\n b=MakD16HxM3ot1XWTSymW8O1nqD2tC7+qFj2zXJPr34Mu12U7Y78FMPsDdyGrqUh1UPUZEyHdiSRuBGvAoOyft2Nx0oXWK2wM3kcUZ9QFrt949nE2WPYLB4EsPscuuFRlB5Job1iuvzLEkc7WRw0ipBqW//5z3/3horhFqJNueIE=","i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;\n b=f5uuLls2fQ5a3aj554Xk//ZNh7VcgxBEC7G4OPPLU7aqJCcISwVV9vqjWTQfruXhq9LGgf/DqT0UI0Q5cM36onuHFPRUF71Ca1n09YG8V74HnUnrySKweLzjTHO7JE2RKveITq1LcYdshatviv7lssxKhLrzOrU2GBIJc3spYQoVcKiZ1pwbJ9kU2bJNhlZvC7oe6BAxJs3kg3EqhSKWL36t3ejbiTDcULfoo1Kbn+FSh+vaFJQlbYE/Zjs+rUBaeiHzrH4CQZAed9zq4DDaTRqE/fA/83QWXzOh1aEA5W4Pm8G18itBZQnZr8ql9KUrwTa6qHRkpmg0p5Sh+Sq99w=="],"ARC-Message-Signature":["i=2; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776764544; c=relaxed/simple;\n\tbh=2o19P5eWKrdFrlCm/vIcQYFL9cp3nGXy8ahyj7bYexc=;\n\th=Content-Type:Date:Message-Id:To:Cc:Subject:From:References:\n\t In-Reply-To:MIME-Version;\n b=l9LJZi4wF41TWMIoDgHh9bfgQ0JVTj1pjFhXW9OlE69tneo/N+kPPKmN4EyEwYE+T3gEs44Dzrv3ldGINiSL+zhJMogNH0Y4R8mnFtzrdNwjsU2uOySoVJuYSNFZl3hQbTnl6g65mkUmEkXcpQuxcxRF0k9Aqk7n0PlFZmZxX3U=","i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector10001;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=kah2V0EgyuRmauLyhNZvK0heFPDdTXc5vGeUFP6//os=;\n b=NYPTpC2JD9L5kj6z78CnLs2/WCxQIVfYFcnv15HHtud1bAvzq2MDrllUbSrVrEJA/mnWEeEyUTOwC7P/DAQ1Dln1AJqZ9iLnXpY9SQpjXE6B+TucP1868cqzCj5pWIz9XGGmiQfedBKjdnq33lHKG6ttPRKqO5HzTe1k0LAOPGavSbG0+5q6uzX3cud8CkdAq9EujKiiBS868Sd94TP7k1z7Ye+7dPAet6ppJKQt/wEWIQR1hH7TNpfcXfiujOUn1QJckjzjgzrQ4P0T3iXUEsgk1loG4766x7Ypf++IceOplce5PbICGwyK3nSHjZQGrijL5WBgwefEa3yCucQOsA=="],"ARC-Authentication-Results":["i=2; smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=nvidia.com;\n spf=fail smtp.mailfrom=nvidia.com;\n dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com\n header.b=OhFGH/Jd; arc=fail smtp.client-ip=52.101.48.62","i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com;\n dkim=pass header.d=nvidia.com; arc=none"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;\n s=selector2;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=kah2V0EgyuRmauLyhNZvK0heFPDdTXc5vGeUFP6//os=;\n b=OhFGH/JdrYk0krtDauvFSDaoqFxx7patDdbiUWfSiC2PrhRs0lpI/NOzdSavAn3z5tG1Eoqxk/X9UOcRCkBaIHTSvIvFhHh8qMs+A0YGYKaJkTjLskMybr/1AGRG+jOYj8MJA8zVfKskMRR5PQQ6sZmEQYP0K2nM+pmuAhPu9DmIG5CPoekaP9gLKa81RmveclOCggcuJLR672RSKWLVcltaCmdCMySVnCbdOnXiV2HjCNHGlE7J4TQTYQJWP+BkSjvQsZah7BNzl7likCtQdZGb40KmOB2SUXvdfJ8x3mrM9GfSXWB0MCXDfdYLICyOuY1PmcAQCFwlXwMxlDVMKA==","Content-Transfer-Encoding":"quoted-printable","Content-Type":"text/plain; charset=UTF-8","Date":"Tue, 21 Apr 2026 18:42:12 +0900","Message-Id":"<DHYQGLYYXEN6.11Q3FQGZMWCJ6@nvidia.com>","To":"\"Alexandre Courbot\" <acourbot@nvidia.com>,\n \"Danilo Krummrich\" <dakr@kernel.org>, \"Alice Ryhl\" <aliceryhl@google.com>,\n \"David Airlie\" <airlied@gmail.com>, \"Simona Vetter\" <simona@ffwll.ch>,\n \"Bjorn Helgaas\" <bhelgaas@google.com>,\n =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= <kwilczynski@kernel.org>,\n \"Miguel Ojeda\" <ojeda@kernel.org>, \"Gary Guo\" <gary@garyguo.net>,\n\t=?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@protonmail.com>,\n \"Benno Lossin\" <lossin@kernel.org>,\n \"Andreas Hindborg\" <a.hindborg@kernel.org>,\n \"Trevor Gross\" <tmgross@umich.edu>, \"Boqun Feng\" <boqun@kernel.org>","Cc":"\"John Hubbard\" <jhubbard@nvidia.com>, \"Alistair Popple\"\n <apopple@nvidia.com>, \"Joel Fernandes\" <joelagnelf@nvidia.com>, \"Timur\n Tabi\" <ttabi@nvidia.com>, \"Eliot Courtney\" <ecourtney@nvidia.com>,\n <nouveau@lists.freedesktop.org>, <dri-devel@lists.freedesktop.org>,\n <linux-kernel@vger.kernel.org>, <linux-pci@vger.kernel.org>,\n <rust-for-linux@vger.kernel.org>","Subject":"Re: [PATCH v2 4/5] gpu: nova-core: send UNLOADING_GUEST_DRIVER GSP\n command upon unloading","From":"\"Eliot Courtney\" <ecourtney@nvidia.com>","X-Mailer":"aerc 0.21.0-0-g5549850facc2","References":"<20260421-nova-unload-v2-0-2fe54963af8b@nvidia.com>\n <20260421-nova-unload-v2-4-2fe54963af8b@nvidia.com>","In-Reply-To":"<20260421-nova-unload-v2-4-2fe54963af8b@nvidia.com>","X-ClientProxiedBy":"TYCP301CA0079.JPNP301.PROD.OUTLOOK.COM\n (2603:1096:405:7b::15) To BL0PR12MB2353.namprd12.prod.outlook.com\n (2603:10b6:207:4c::31)","Precedence":"bulk","X-Mailing-List":"linux-pci@vger.kernel.org","List-Id":"<linux-pci.vger.kernel.org>","List-Subscribe":"<mailto:linux-pci+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-pci+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","X-MS-PublicTrafficType":"Email","X-MS-TrafficTypeDiagnostic":"BL0PR12MB2353:EE_|SA0PR12MB4413:EE_","X-MS-Office365-Filtering-Correlation-Id":"c91402b2-abe9-4d6c-9582-08de9f8a45d6","X-MS-Exchange-SenderADCheck":"1","X-MS-Exchange-AntiSpam-Relay":"0","X-Microsoft-Antispam":"\n\tBCL:0;ARA:13230040|10070799003|366016|7416014|376014|1800799024|921020|56012099003|22082099003|18002099003;","X-Microsoft-Antispam-Message-Info":"\n\tCjoy2uU26uDN5Yb1AVRQV8Qm6Z6K8QmNx6QXlY8hcsz25EL59AuEXNUS1B8o2ONFQQFB4/wn9nGwMoLbVzQTq9k5KDUSCtJOJ+QoAM9BTQ2I54rb1Rg1fZp7cF1kPbiXYaQc0MVwSZRLqLIzs1Q+ak2paS+t5ISvf7F8W/ee2zP6iVYrxwnb7j/NeQnTZHmTvyg/WKP1a/DlMwQeavjWfO88EwzOajuOReKqcJasunAv/aSHx6hIeXMlWgzn3LBdi/x8suHQtkR+DyWwFduI9D9CEiF1fFfqNnC4+bS4Udf6YrPSkBQiqSaq85tLLw+0odr8zMcfqYcmwyOs+j2kMvRTtDe7j3AmCn4O9K5Sj/Tysn1K4gJF6VYzyhRcc/l2HhQ74ArXxQIAr4hIrKqPVN7qtQMDGNJoqK8pAzWqkvcYRZDRYKHutqNfhWlCg0k0/8GogkK3UiTFbo31FHCUWUg/GhR3Zv66ok9TdZbOD9CYJo5x33p1TbF5Ge+cmpyRyqKbDF2XU0jFwFToH4TA0v8ZMt4uZ/ZMjfXYWZz6ONae8ufF/HotYRLtCJqJ85Jku8vgSL40KWOC/kKodEeUs7pWI5SuidYhdNfI7ZDgFwlXYyx3n9zB4gfU9MDMCU67VV58pQH+X6Bkc0Na1RD5afxNYC1Jor/yIz30UxY0mgfNuQJRUleybjPjsiZKsdShgo1NtlTliUBU4VYdx3OKhKz9WhKnbNeE/nldtzkuAim3qZ0uSOy7grvdvt8NrItzrBGFAo4yCkZCB1FQO2B2aQ==","X-Forefront-Antispam-Report":"\n\tCIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL0PR12MB2353.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(10070799003)(366016)(7416014)(376014)(1800799024)(921020)(56012099003)(22082099003)(18002099003);DIR:OUT;SFP:1101;","X-MS-Exchange-AntiSpam-MessageData-ChunkCount":"2","X-MS-Exchange-AntiSpam-MessageData-0":"=?utf-8?q?CyvfD1LckVDAFS6nap45ukh9AOHb?=\n\t=?utf-8?q?qEXNcvyVl8d8XNJJ77RaVdqp+I0EiB5PYoe4VeIYRfO1qx9BOqKDfwmQ/MaJbsqMO?=\n\t=?utf-8?q?rCQ0uKLp2a2CktTXW/dukC1tZq8cuw9NEWG4o5IVIuZYfrJQKY+SX/E1Ow0xB+n/m?=\n\t=?utf-8?q?WelVJ83DFKJPilI57wpfCGgL1vGhBobczt1+TiCpFkmM+7zY87F4FgB/kwR57yZU1?=\n\t=?utf-8?q?YntuCdVGOtzSr4W1jZ90rN4rz7/CAj3o9l2s/HRa5f0ICu0UehnP7C6xbmZXDAZlV?=\n\t=?utf-8?q?4yJwm7yAmxEapH65A8pjaRLyyb6C8XQp4PPS8UiZjYRdIEPi4oep4Dvq4Heos5Jpv?=\n\t=?utf-8?q?z05gaVus8KluYYhpVx33JksuYoKexr7Z/FPDHKoweGdadFctxuJrqlBLdn1JhLct4?=\n\t=?utf-8?q?HddxHui9MDiaFbTIa6ViQc/hSU89CgDMZEsnOx3XaiEz4zFPd0nxgiETchbBaEbaR?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YOC+Zb7xvGnitpZerbw0yIpvMi6RKkoAg6RzqsuVinmv15WZF7TYWlYADo?=\n\t=?utf-8?q?YtTTxzJrGz9uIb+2ozEbYTYNBC+/qDDi6Fb7NnYn19urX6Wi0skGYtZqRnjP+rhsZ?=\n\t=?utf-8?q?QtUXIFKVrE52TMtYl4aG81iHr+YV0qXk1G5WN7KW4u7GKzDzxckGWBnYtS3qlWXxD?=\n\t=?utf-8?q?hLWl5ihtWd2Rv7IKGQV/upFA1GEr8MUlfYMveNV+mFpb+PY+pvOgsVZdmMBQeTlQa?=\n\t=?utf-8?q?g/q/ZoPIxfSPkz4TarwTSURguNTKus4q4LgtMicuVQri4mNlVvkCKr8bpEhSFLexK?=\n\t=?utf-8?q?U4ryPEfZ6uBmrCgN7PtahJRdvH2hup49iHVYGGpYJxH0rRC2blGfUjud3s3fbR9wS?=\n\t=?utf-8?q?mne3cwPe6TlZN1gZN2eZYFaZR+37sM1S3kT3yrTt15YGWkX3I3/XRsHJIM5CsC1aL?=\n\t=?utf-8?q?5wMzlj0lRC5bGV/H9?=","X-MS-Exchange-AntiSpam-MessageData-1":"Nj+k8BGagP/F3Q==","X-OriginatorOrg":"Nvidia.com","X-MS-Exchange-CrossTenant-Network-Message-Id":"\n c91402b2-abe9-4d6c-9582-08de9f8a45d6","X-MS-Exchange-CrossTenant-AuthSource":"BL0PR12MB2353.namprd12.prod.outlook.com","X-MS-Exchange-CrossTenant-AuthAs":"Internal","X-MS-Exchange-CrossTenant-OriginalArrivalTime":"21 Apr 2026 09:42:16.0977\n (UTC)","X-MS-Exchange-CrossTenant-FromEntityHeader":"Hosted","X-MS-Exchange-CrossTenant-Id":"43083d15-7273-40c1-b7db-39efd9ccc17a","X-MS-Exchange-CrossTenant-MailboxType":"HOSTED","X-MS-Exchange-CrossTenant-UserPrincipalName":"\n IGi6dX/KyAn8+VJResL8Jjg9dOF4KGPV6gYcarkOOQ/8Gw6BDReOzdySGkU+4L79zIr3GMXxO2oxKDTHIGuirA==","X-MS-Exchange-Transport-CrossTenantHeadersStamped":"SA0PR12MB4413"}},{"id":3679917,"web_url":"http://patchwork.ozlabs.org/comment/3679917/","msgid":"<DHYWJ32M02N4.2954OSJXFGD1G@nvidia.com>","list_archive_url":null,"date":"2026-04-21T14:27:33","subject":"Re: [PATCH v2 4/5] gpu: nova-core: send UNLOADING_GUEST_DRIVER GSP\n command upon unloading","submitter":{"id":13521,"url":"http://patchwork.ozlabs.org/api/people/13521/","name":"Alexandre Courbot","email":"acourbot@nvidia.com"},"content":"On Tue Apr 21, 2026 at 6:42 PM JST, Eliot Courtney wrote:\n> On Tue Apr 21, 2026 at 3:16 PM JST, Alexandre Courbot wrote:\n>> Currently, the GSP is left running after the driver is unbound. This is\n>> not great for several reasons, notably that it can still access shared\n>> memory areas that the kernel will now reclaim (especially problematic on\n>> setups without an IOMMU).\n>>\n>> Fix this by sending the `UNLOADING_GUEST_DRIVER` GSP command when\n>> unbinding. This stops the GSP and lets us proceed with the rest of the\n>> unbind sequence in the next patch.\n>>\n>> Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>\n>> ---\n>>  drivers/gpu/nova-core/gpu.rs                      |  5 +++\n>>  drivers/gpu/nova-core/gsp/boot.rs                 | 40 +++++++++++++++++++++++\n>>  drivers/gpu/nova-core/gsp/commands.rs             | 36 ++++++++++++++++++++\n>>  drivers/gpu/nova-core/gsp/fw.rs                   |  4 +++\n>>  drivers/gpu/nova-core/gsp/fw/commands.rs          | 23 +++++++++++++\n>>  drivers/gpu/nova-core/gsp/fw/r570_144/bindings.rs |  8 +++++\n>>  6 files changed, 116 insertions(+)\n>>\n>> diff --git a/drivers/gpu/nova-core/gpu.rs b/drivers/gpu/nova-core/gpu.rs\n>> index 1701c2600538..8f2ae9e8a519 100644\n>> --- a/drivers/gpu/nova-core/gpu.rs\n>> +++ b/drivers/gpu/nova-core/gpu.rs\n>> @@ -277,12 +277,17 @@ pub(crate) fn new<'a>(\n>>  \n>>      /// Called when the corresponding [`Device`](device::Device) is unbound.\n>>      ///\n>> +    /// Prepares the GPU for unbinding by shutting down the GSP and unregistering the sysmem flush\n>> +    /// memory page.\n>> +    ///\n>>      /// Note: This method must only be called from `Driver::unbind`.\n>>      pub(crate) fn unbind(&self, dev: &device::Device<device::Core>) {\n>>          let Ok(bar) = kernel::warn_on_err!(self.bar.access(dev)) else {\n>>              return;\n>>          };\n>>  \n>> +        let _ = kernel::warn_on_err!(self.gsp.unload(dev, bar, &self.gsp_falcon));\n>> +\n>\n> If I remember correctly, at least on blackwell, doing the full unloading\n> procedure here actually resets the sysmem flush register, so you get a\n> spurious warning. In my local branch I actually swapped the order of\n> this and unregister to get rid of it (not sure if this is correct though).\n> My sysmem flush patch that skips printing the warning if the value is 0\n> would also fix this, if we care. Have you noticed this happening too?\n\nI haven't - this patch works fine and without any warning on my\nBlackwell card. But that deserves further investigation, so let's\nrevisit once we add the Blackwell series and your own patch, as this\nseries only supports Turing/Ampere for now.\n\n>\n>>          self.sysmem_flush.unregister(bar);\n>>      }\n>>  }\n>> diff --git a/drivers/gpu/nova-core/gsp/boot.rs b/drivers/gpu/nova-core/gsp/boot.rs\n>> index 18f356c9178e..3f4e99b2497b 100644\n>> --- a/drivers/gpu/nova-core/gsp/boot.rs\n>> +++ b/drivers/gpu/nova-core/gsp/boot.rs\n>> @@ -33,6 +33,7 @@\n>>      },\n>>      gpu::Chipset,\n>>      gsp::{\n>> +        cmdq::Cmdq,\n>>          commands,\n>>          sequencer::{\n>>              GspSequencer,\n>> @@ -237,4 +238,43 @@ pub(crate) fn boot(\n>>  \n>>          Ok(())\n>>      }\n>> +\n>> +    /// Shut down the GSP and wait until it is offline.\n>> +    fn shutdown_gsp(\n>> +        cmdq: &Cmdq,\n>> +        bar: &Bar0,\n>> +        gsp_falcon: &Falcon<Gsp>,\n>> +        suspend: bool,\n>> +    ) -> Result<()> {\n>> +        // Send command to shutdown GSP and wait for response.\n>> +        cmdq.send_command(bar, commands::UnloadingGuestDriver::new(suspend))?;\n>> +\n>> +        // Wait until GSP signals it is suspended.\n>> +        const LIBOS_INTERRUPT_PROCESSOR_SUSPENDED: u32 = 0x8000_0000;\n>\n> If this can change based on firmware, should it be taken in via\n> bindings? I also noticed in openrm 595, this is waited on by checking the\n> bit rather than by strict equality (see _kgspIsProcessorSuspended). So\n> it may be more defensive to check the bit rather than strict equality\n> (even though that is correct for 570 according to openrm code).\n\nIndeed, in 570.144 the code is actually\n\n    return (mailbox == 0x80000000);\n\n... but I checked against `main` and it has been changed to what you\nsaid, so testing the bit is probably better indeed.\n\nThe value is also a file-local constant, so not something we can get\nthrough bindings unfortunately. :/ But I suspect we can rely on it being\nstable.\n\n>\n>> +        read_poll_timeout(\n>> +            || Ok(gsp_falcon.read_mailbox0(bar)),\n>> +            |&mb0| mb0 == LIBOS_INTERRUPT_PROCESSOR_SUSPENDED,\n>> +            Delta::from_millis(10),\n>> +            Delta::from_secs(5),\n>> +        )\n>> +        .map(|_| ())\n>> +    }\n>> +\n>> +    /// Attempts to unload the GSP firmware.\n>> +    ///\n>> +    /// This stops all activity on the GSP.\n>> +    pub(crate) fn unload(\n>> +        &self,\n>> +        dev: &device::Device<device::Bound>,\n>> +        bar: &Bar0,\n>> +        gsp_falcon: &Falcon<Gsp>,\n>> +    ) -> Result {\n>> +        // Shut down the GSP.\n>> +\n>> +        Self::shutdown_gsp(&self.cmdq, bar, gsp_falcon, false)\n>> +            .inspect_err(|e| dev_err!(dev, \"unload guest driver failed: {:?}\", e))?;\n>\n> It looks like \"suspend\" is only ever false here? Will this be used\n> later? If we want to keep this, it may be nice to use a 2 discriminant\n> enum so we don't have misc boolean parameters hanging around.\n\nIt is in prevision of suspend/resume support yes. Agreed about the enum.\n\n>\n> nit: dev_err! should have \\n?\n\nIt should!\n\n>\n>> +        dev_dbg!(dev, \"GSP shut down\\n\");\n>> +\n>> +        Ok(())\n>> +    }\n>>  }\n>> diff --git a/drivers/gpu/nova-core/gsp/commands.rs b/drivers/gpu/nova-core/gsp/commands.rs\n>> index c80df421702c..fb94460c451e 100644\n>> --- a/drivers/gpu/nova-core/gsp/commands.rs\n>> +++ b/drivers/gpu/nova-core/gsp/commands.rs\n>> @@ -237,3 +237,39 @@ pub(crate) fn gpu_name(&self) -> core::result::Result<&str, GpuNameError> {\n>>  pub(crate) fn get_gsp_info(cmdq: &Cmdq, bar: &Bar0) -> Result<GetGspStaticInfoReply> {\n>>      cmdq.send_command(bar, GetGspStaticInfo)\n>>  }\n>> +\n>> +pub(crate) struct UnloadingGuestDriver {\n>> +    suspend: bool,\n>> +}\n>\n> This feels like it only makes sense to call from within the gsp module,\n> so I wonder if it can be pub(super) (prolly a few others in this file\n> could be too, ofc not relevant for this series).\n\nI'll review that, we do want to limit visibility as much as possible.\n\n>\n> nit: Should this have doc comment?\n\nYep, I'll add that.\n\n>\n>> +\n>> +impl UnloadingGuestDriver {\n>> +    pub(crate) fn new(suspend: bool) -> Self {\n>> +        Self { suspend }\n>> +    }\n>> +}\n>> +\n>> +impl CommandToGsp for UnloadingGuestDriver {\n>> +    const FUNCTION: MsgFunction = MsgFunction::UnloadingGuestDriver;\n>> +    type Command = fw::commands::UnloadingGuestDriver;\n>> +    type Reply = UnloadingGuestDriverReply;\n>> +    type InitError = Infallible;\n>> +\n>> +    fn init(&self) -> impl Init<Self::Command, Self::InitError> {\n>> +        fw::commands::UnloadingGuestDriver::new(self.suspend)\n>> +    }\n>> +}\n>> +\n>> +pub(crate) struct UnloadingGuestDriverReply;\n>> +\n>> +impl MessageFromGsp for UnloadingGuestDriverReply {\n>> +    const FUNCTION: MsgFunction = MsgFunction::UnloadingGuestDriver;\n>> +    type InitError = Infallible;\n>> +    type Message = ();\n>> +\n>> +    fn read(\n>> +        _msg: &Self::Message,\n>> +        _sbuffer: &mut SBufferIter<array::IntoIter<&[u8], 2>>,\n>> +    ) -> Result<Self, Self::InitError> {\n>> +        Ok(UnloadingGuestDriverReply)\n>> +    }\n>> +}\n>> diff --git a/drivers/gpu/nova-core/gsp/fw.rs b/drivers/gpu/nova-core/gsp/fw.rs\n>> index 0c8a74f0e8ac..59b4c4883185 100644\n>> --- a/drivers/gpu/nova-core/gsp/fw.rs\n>> +++ b/drivers/gpu/nova-core/gsp/fw.rs\n>> @@ -278,6 +278,7 @@ pub(crate) enum MsgFunction {\n>>      Nop = bindings::NV_VGPU_MSG_FUNCTION_NOP,\n>>      SetGuestSystemInfo = bindings::NV_VGPU_MSG_FUNCTION_SET_GUEST_SYSTEM_INFO,\n>>      SetRegistry = bindings::NV_VGPU_MSG_FUNCTION_SET_REGISTRY,\n>> +    UnloadingGuestDriver = bindings::NV_VGPU_MSG_FUNCTION_UNLOADING_GUEST_DRIVER,\n>>  \n>>      // Event codes\n>>      GspInitDone = bindings::NV_VGPU_MSG_EVENT_GSP_INIT_DONE,\n>> @@ -322,6 +323,9 @@ fn try_from(value: u32) -> Result<MsgFunction> {\n>>                  Ok(MsgFunction::SetGuestSystemInfo)\n>>              }\n>>              bindings::NV_VGPU_MSG_FUNCTION_SET_REGISTRY => Ok(MsgFunction::SetRegistry),\n>> +            bindings::NV_VGPU_MSG_FUNCTION_UNLOADING_GUEST_DRIVER => {\n>> +                Ok(MsgFunction::UnloadingGuestDriver)\n>> +            }\n>>  \n>>              // Event codes\n>>              bindings::NV_VGPU_MSG_EVENT_GSP_INIT_DONE => Ok(MsgFunction::GspInitDone),\n>> diff --git a/drivers/gpu/nova-core/gsp/fw/commands.rs b/drivers/gpu/nova-core/gsp/fw/commands.rs\n>> index db46276430be..71c8690c9322 100644\n>> --- a/drivers/gpu/nova-core/gsp/fw/commands.rs\n>> +++ b/drivers/gpu/nova-core/gsp/fw/commands.rs\n>> @@ -129,3 +129,26 @@ unsafe impl AsBytes for GspStaticConfigInfo {}\n>>  // SAFETY: This struct only contains integer types for which all bit patterns\n>>  // are valid.\n>>  unsafe impl FromBytes for GspStaticConfigInfo {}\n>> +\n>> +/// Payload of the `UnloadingGuestDriver` command and message.\n>> +#[repr(transparent)]\n>> +#[derive(Clone, Copy, Debug, Zeroable)]\n>> +pub(crate) struct UnloadingGuestDriver(bindings::rpc_unloading_guest_driver_v1F_07);\n>> +\n>> +impl UnloadingGuestDriver {\n>> +    pub(crate) fn new(suspend: bool) -> Self {\n>> +        Self(bindings::rpc_unloading_guest_driver_v1F_07 {\n>> +            bInPMTransition: u8::from(suspend),\n>> +            bGc6Entering: 0,\n>> +            newLevel: if suspend { 3 } else { 0 },\n>\n> Why '3'? Is there a binding that it makes sense to use for this?\n\nIt's for suspend level 3 (suspend to RAM) if `suspend` is true, or\nnormal destructive unloading otherwise. OpenRM has a set of possible\nvalues (`NV2080_CTRL_GPU_SET_POWER_STATE_GPU_LEVEL_*`) that directly\ntranslate to the corresponding number, but at least they limit the\npossible values to the valid set. I'll add an enum and the corresponding\nbindings.\n\nThanks for the review!","headers":{"Return-Path":"\n <linux-pci+bounces-52837-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-pci@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256\n header.s=selector2 header.b=mWuJe4K+;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=2600:3c0a:e001:db::12fc:5321; helo=sea.lore.kernel.org;\n envelope-from=linux-pci+bounces-52837-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com\n header.b=\"mWuJe4K+\"","smtp.subspace.kernel.org;\n arc=fail smtp.client-ip=52.101.46.5","smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=nvidia.com","smtp.subspace.kernel.org;\n spf=fail smtp.mailfrom=nvidia.com","dkim=none (message not signed)\n header.d=none;dmarc=none action=none header.from=nvidia.com;"],"Received":["from sea.lore.kernel.org (sea.lore.kernel.org\n [IPv6:2600:3c0a:e001:db::12fc:5321])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g0Pxn3f1Hz1yGt\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 00:34:21 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id 232D83005776\n\tfor <incoming@patchwork.ozlabs.org>; Tue, 21 Apr 2026 14:27:50 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 0D50A1C862D;\n\tTue, 21 Apr 2026 14:27:49 +0000 (UTC)","from CO1PR03CU002.outbound.protection.outlook.com\n (mail-westus2azon11010005.outbound.protection.outlook.com [52.101.46.5])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id 5EC051BD9CE;\n\tTue, 21 Apr 2026 14:27:47 +0000 (UTC)","from CH2PR12MB3990.namprd12.prod.outlook.com (2603:10b6:610:28::18)\n by CH1PPFDA34A4201.namprd12.prod.outlook.com (2603:10b6:61f:fc00::625) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9818.21; Tue, 21 Apr\n 2026 14:27:37 +0000","from CH2PR12MB3990.namprd12.prod.outlook.com\n ([fe80::7de1:4fe5:8ead:5989]) by CH2PR12MB3990.namprd12.prod.outlook.com\n ([fe80::7de1:4fe5:8ead:5989%4]) with mapi id 15.20.9846.016; Tue, 21 Apr 2026\n 14:27:37 +0000"],"ARC-Seal":["i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776781668; cv=fail;\n b=O5xZzmQmHVUXkeTEbEF5xF9W6Ri3N5Mo9+oEFEeucVJlvqNtYGTwueIIz/ROhsXDZtX8GBQq+YG/CvsXtQbHT+UJluAaqEA/Mfqm46e5WtbVPIZ4edfE1bfkzKtgQjXzCvMZbS8Zax4VpQb8tcZux4YdaPYADKLSEDtQxXqEgc4=","i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;\n b=M9uVHvhQ2uwSnrWQlYWc7QKzE6mbe0NHYb7l1Hmg8n2TVmqQVgaBfKSL/RwzAtFJsr6oBWw5AiwMWa/wnbE5OKivJcWq/3l8sT3swU2rMYp/fOPx2p0y9aLDVhNbom1dEsR/YHhe0SapUauPc+MR/HikvaLt8Eeoh6d+8x47U8gB2ZWmm5dxIsQjMwXsntSoUnqvp4uYgfJRt3Ogg/xrR00cvZTZjxGCAvVwmf2TRlvibLKlb8KtG3hFJw564lGnvQgpgrT9hxN3vA1Y+ASw/dXs+8jgRxaQn72G7syWc9fVGclhh4VWXxWYW9dDLN9U265Pgd/dlRhCeFM0hvj3Gw=="],"ARC-Message-Signature":["i=2; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776781668; c=relaxed/simple;\n\tbh=bHpyvLPesHDbglT4V7i6XGUTvZAml+n1YrGdoYdVYm0=;\n\th=Content-Type:Date:Message-Id:From:To:Cc:Subject:References:\n\t In-Reply-To:MIME-Version;\n b=qCk6PTOwsBed+imZgHqvRTjuYbyHciB92vzI8HyFJrSSxOkw9QaD9zThpw0DODWL/f7UTHPhYJ8S2B02nA2OBh0sRUW8WPRUZbcZBkLm+xksy1fnPeRF2wqVUVA+iaHW9BxH7Epwn9mXcxCxbZG1OjjQwB+3/CY0py+iDPtuSMo=","i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector10001;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=qB0Jj/T0Kujz8AGG03SQNUTOv8Vu+AQGlUXDm1kJuF8=;\n b=l0t5vLoX4+lDDQKMFPpbBkmIvTXrKajMpscPPoj++R5F4X5eQEbLZqwsLWs1FVO763cWMf4avIW7rpTZCBDgybO5hShftQ1LHmpXIQcCwWyjgDpCZLXThgj4YDTJ7G029fs4ENa3SEQqnQgbmyTwwFhz/3PKARnDtxR0luF9E8NtQuY48Yo8txemkVQDye8Zvl3UukxPS5kD+LhLbGS5LBhyLjH4BQpy1UuBc9hmAyinGjiiLALOFoxj3cSOSbp0mVp6lOD6x8CenrXC5HMfqEQOTe4D//PPUtpqReFFzV3gp0bN4ZsH9grKULAZIfDk2Lp6nJMDuOqQwcf8oZ0Kng=="],"ARC-Authentication-Results":["i=2; smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=nvidia.com;\n spf=fail smtp.mailfrom=nvidia.com;\n dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com\n header.b=mWuJe4K+; arc=fail smtp.client-ip=52.101.46.5","i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com;\n dkim=pass header.d=nvidia.com; arc=none"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;\n s=selector2;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=qB0Jj/T0Kujz8AGG03SQNUTOv8Vu+AQGlUXDm1kJuF8=;\n b=mWuJe4K+xIkSV3BkyMxvRMpN7wEC9K+QXMCyoe1tNjy82GGHGx8K3at2PIA5TQjsN5DRgiXq9qqvV+1R7+tNnFHhU4fkr2IL7b595sJhsuFTSn/aG4kiRMu1vFH4FSpizWJTbqUyJGB6gLCHHb2Hg6LWkWSzHclFVMSBQDquqMGO/hlBmnyV0QMBSalQQhTzgCvpMeKiRsGmTX7OlNmRb6zAjtkn8W9TY/PRtOKbqFb2wqxllFqMNq3/oQX8t4ZZP+PFA5ByPhQPgJESVKZqsn0n2tjjvIEFw5ZxOeuMfhwieXStxhJggeTQforkTYdebaFANxaqstyxodnTZ6NYEw==","Content-Transfer-Encoding":"quoted-printable","Content-Type":"text/plain; charset=UTF-8","Date":"Tue, 21 Apr 2026 23:27:33 +0900","Message-Id":"<DHYWJ32M02N4.2954OSJXFGD1G@nvidia.com>","From":"\"Alexandre Courbot\" <acourbot@nvidia.com>","To":"\"Eliot Courtney\" <ecourtney@nvidia.com>","Cc":"\"Danilo Krummrich\" <dakr@kernel.org>, \"Alice Ryhl\" <aliceryhl@google.com>,\n \"David Airlie\" <airlied@gmail.com>, \"Simona Vetter\" <simona@ffwll.ch>,\n \"Bjorn Helgaas\" <bhelgaas@google.com>,\n =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= <kwilczynski@kernel.org>,\n \"Miguel Ojeda\" <ojeda@kernel.org>, \"Gary Guo\" <gary@garyguo.net>,\n\t=?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@protonmail.com>,\n \"Benno Lossin\" <lossin@kernel.org>,\n \"Andreas Hindborg\" <a.hindborg@kernel.org>,\n \"Trevor Gross\" <tmgross@umich.edu>, \"Boqun Feng\" <boqun@kernel.org>,\n \"John Hubbard\" <jhubbard@nvidia.com>, \"Alistair Popple\" <apopple@nvidia.com>,\n \"Joel Fernandes\" <joelagnelf@nvidia.com>, \"Timur Tabi\" <ttabi@nvidia.com>,\n <nouveau@lists.freedesktop.org>, <dri-devel@lists.freedesktop.org>,\n <linux-kernel@vger.kernel.org>, <linux-pci@vger.kernel.org>,\n <rust-for-linux@vger.kernel.org>","Subject":"Re: [PATCH v2 4/5] gpu: nova-core: send UNLOADING_GUEST_DRIVER GSP\n command upon unloading","References":"<20260421-nova-unload-v2-0-2fe54963af8b@nvidia.com>\n <20260421-nova-unload-v2-4-2fe54963af8b@nvidia.com>\n <DHYQGLYYXEN6.11Q3FQGZMWCJ6@nvidia.com>","In-Reply-To":"<DHYQGLYYXEN6.11Q3FQGZMWCJ6@nvidia.com>","X-ClientProxiedBy":"TYCP286CA0076.JPNP286.PROD.OUTLOOK.COM\n (2603:1096:400:2b3::13) To CH2PR12MB3990.namprd12.prod.outlook.com\n (2603:10b6:610:28::18)","Precedence":"bulk","X-Mailing-List":"linux-pci@vger.kernel.org","List-Id":"<linux-pci.vger.kernel.org>","List-Subscribe":"<mailto:linux-pci+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-pci+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","X-MS-PublicTrafficType":"Email","X-MS-TrafficTypeDiagnostic":"CH2PR12MB3990:EE_|CH1PPFDA34A4201:EE_","X-MS-Office365-Filtering-Correlation-Id":"0479f95b-a382-4047-6a1a-08de9fb222a6","X-MS-Exchange-SenderADCheck":"1","X-MS-Exchange-AntiSpam-Relay":"0","X-Microsoft-Antispam":"\n\tBCL:0;ARA:13230040|1800799024|10070799003|366016|7416014|376014|18002099003|22082099003|56012099003;","X-Microsoft-Antispam-Message-Info":"\n\tch2lIj7zyTD7Q/IL3RTPRt5kIp43U5AQyU1YfOFiy1UZJtFrXHemk1lsiq5hc8ojFkZbhxaIEY/PNOvv20m8drRyH0uK3mFsW0YC8IugRVpA1C/CKzF4PHKlznqDVJ1mKfWeaCDNk1JpRwAw5tH2LGtnVQjmptfzxfxVVBb3qh6huNl5MTU67NyRLLnCzYHMm9pG2rPBQBbhwFALZUJNNGFNDxsGUVYRlTmUEFuI+UfcqgbP0ig9B7y3BhekL5jszcRTe6FX+JOJdrwrwOXJBc9su3MD7e2pf0rXowEYXcgMST5z0RTjNMK13/JGe6vnJCOOrHezZ57Z2k44CjiwGope7DpY+LBakStOqIoBdPGhVHWGujt0Po3/fQpH6RqsFmuDle3426eTw28uHjHmdC8y++rhSKBwRN4M4e/uE2iwBONC6+IytJW4SWcSQfAlz2yb8fv4bPx0l2w+tfbXF0FOL9tYF7XEuQdcrO9EwvGym5ZvI+1hPaPKK2zfChFSfPFYnwhMkeO1700H8cD/TOyY9PfTcWp0MiaKRx5yO7KB5RlJGieFZ6S4/PXUvlxxr3pHumffZzHT+ipQyfWPejlvTPfvyfpGtIKixpZi7VDUWoJWi0LT9CI4ruX+goyBO6jbB4k3rsKkBITK/x5CAQqu9mmu9EdZjCjyvQUSKWTw6zOz8dypFqkuIUFfubc7bSl5TlSThWuxbzZXph4nW3z9ijV0GXk26ukL8StSS/c=","X-Forefront-Antispam-Report":"\n\tCIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH2PR12MB3990.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(10070799003)(366016)(7416014)(376014)(18002099003)(22082099003)(56012099003);DIR:OUT;SFP:1101;","X-MS-Exchange-AntiSpam-MessageData-ChunkCount":"2","X-MS-Exchange-AntiSpam-MessageData-0":"=?utf-8?q?mZ6y1PhDO8s1YMMmHRcW3Kf6FW+T?=\n\t=?utf-8?q?B8cmkXDPHqqcq/hFuhkL3GXpxdIBsJsDYLF0bYNGlRUrBcib0BuYOc4BBivejqw2s?=\n\t=?utf-8?q?DpYTcgJqtP4r0JDYbK1m8FK/KFQ9DprKIOswUFL5tYUy8/zk6jOxC0uF21yPATvJl?=\n\t=?utf-8?q?DrkVkDM4CS9WxupMTwsavF+/k/bwdq+/bXXpcLrer4JneHMGrqwPOgRcU1DKkwgDM?=\n\t=?utf-8?q?a1mXqetlRXcVeafB+E4ITCy2sqsCWfOknjHUEJ1HtuKzofMhClaDn1vyHrJ1S6qDq?=\n\t=?utf-8?q?wXhsC50tcrE7JxqkbiyHA1Ld/EKn04yJ7pFrV9tikVLUoEkkIlYJ8ohsdq170Yrn8?=\n\t=?utf-8?q?rYJF3+niSHiT8yskWjUO5bK+uVUZmJmA9Dk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gJ0jeIEEPNjHzjL?=\n\t=?utf-8?q?bNTFBg3fS8D4IaltVLfDN78fp4rGA93hguqCZMF+Uw3boDbOpt9/KEDnr0154ex1j?=\n\t=?utf-8?q?i6tMWS92Fs/HGBbC5Ulqliv7UpLd1BH3mFPDy0YnuFp/9Fm46LZAV1eT1POpMdSvu?=\n\t=?utf-8?q?UL+Cj9TvXWr22zFYv3xi8/rlQqGnuD7Lx4bdoqoMUBvWPMUMQ7WaahP5P4BDAbulg?=\n\t=?utf-8?q?4mMXzEgX+uIQmYFNOs+bEMqoRWgodpGDJQRUU2IZbm6EIdTbou7Zi+FCESubPdM9b?=\n\t=?utf-8?q?tddBNctpWLqFwwG/lWOQHyNFHWG55W9ykSPAfY/b65qbh3u0UXuHKiGYn/Dv1sbVz?=\n\t=?utf-8?q?J1MNZiPZQkotIl/rCQt5PkvAURfLeAto3fiR+QTz1Zt8JjakvKiTyMSJ1huRBoEDW?=\n\t=?utf-8?q?Pu57pIGu4b1S1NS/MZ8X/eH4/BZEpMNDsCK5HbhBpPT9l6cUNexV2DRRTbPwi1ThL?=\n\t=?utf-8?q?uao6djj5Mnn1Kn5myZJF0u3c1wRTSLmejp9wwH04LofcSLe+eibwAlClquIQ0RrCH?=\n\t=?utf-8?q?zmoUAvpuZHii5CAwC?=","X-MS-Exchange-AntiSpam-MessageData-1":"ZQvvHxCaftyr2A==","X-OriginatorOrg":"Nvidia.com","X-MS-Exchange-CrossTenant-Network-Message-Id":"\n 0479f95b-a382-4047-6a1a-08de9fb222a6","X-MS-Exchange-CrossTenant-AuthSource":"CH2PR12MB3990.namprd12.prod.outlook.com","X-MS-Exchange-CrossTenant-AuthAs":"Internal","X-MS-Exchange-CrossTenant-OriginalArrivalTime":"21 Apr 2026 14:27:37.2524\n (UTC)","X-MS-Exchange-CrossTenant-FromEntityHeader":"Hosted","X-MS-Exchange-CrossTenant-Id":"43083d15-7273-40c1-b7db-39efd9ccc17a","X-MS-Exchange-CrossTenant-MailboxType":"HOSTED","X-MS-Exchange-CrossTenant-UserPrincipalName":"\n IvAcGAbO6AUihVRIOEbGBbXrUUsIMkGXIj2KzrpZGfHUNIj8FfChpmcAct1aygCXlcVTv/TW0++eIK625gDcOQ==","X-MS-Exchange-Transport-CrossTenantHeadersStamped":"CH1PPFDA34A4201"}},{"id":3680468,"web_url":"http://patchwork.ozlabs.org/comment/3680468/","msgid":"<DHZMHF1YVBI4.F11YKDDKBNTQ@nvidia.com>","list_archive_url":null,"date":"2026-04-22T10:47:51","subject":"Re: [PATCH v2 4/5] gpu: nova-core: send UNLOADING_GUEST_DRIVER GSP\n command upon unloading","submitter":{"id":13521,"url":"http://patchwork.ozlabs.org/api/people/13521/","name":"Alexandre Courbot","email":"acourbot@nvidia.com"},"content":"On Tue Apr 21, 2026 at 11:27 PM JST, Alexandre Courbot wrote:\n<snip>\n>>> +        dev_dbg!(dev, \"GSP shut down\\n\");\n>>> +\n>>> +        Ok(())\n>>> +    }\n>>>  }\n>>> diff --git a/drivers/gpu/nova-core/gsp/commands.rs b/drivers/gpu/nova-core/gsp/commands.rs\n>>> index c80df421702c..fb94460c451e 100644\n>>> --- a/drivers/gpu/nova-core/gsp/commands.rs\n>>> +++ b/drivers/gpu/nova-core/gsp/commands.rs\n>>> @@ -237,3 +237,39 @@ pub(crate) fn gpu_name(&self) -> core::result::Result<&str, GpuNameError> {\n>>>  pub(crate) fn get_gsp_info(cmdq: &Cmdq, bar: &Bar0) -> Result<GetGspStaticInfoReply> {\n>>>      cmdq.send_command(bar, GetGspStaticInfo)\n>>>  }\n>>> +\n>>> +pub(crate) struct UnloadingGuestDriver {\n>>> +    suspend: bool,\n>>> +}\n>>\n>> This feels like it only makes sense to call from within the gsp module,\n>> so I wonder if it can be pub(super) (prolly a few others in this file\n>> could be too, ofc not relevant for this series).\n>\n> I'll review that, we do want to limit visibility as much as possible.\n\nMmm looking more closely I am not sure this is something we want/can do.\nAs the driver expands, it looks likely that some of these types will be\nused outside of the `gsp` module - in particular some of the responses\ncan be used outside, I think this actually happens with the MM series.\n\nSo I think I will keep the visibility as-is for now.","headers":{"Return-Path":"\n <linux-pci+bounces-52953-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-pci@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256\n header.s=selector2 header.b=Id+YpQnz;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.234.253.10; helo=sea.lore.kernel.org;\n envelope-from=linux-pci+bounces-52953-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com\n header.b=\"Id+YpQnz\"","smtp.subspace.kernel.org;\n arc=fail smtp.client-ip=52.101.56.30","smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=nvidia.com","smtp.subspace.kernel.org;\n spf=fail smtp.mailfrom=nvidia.com","dkim=none (message not signed)\n header.d=none;dmarc=none action=none header.from=nvidia.com;"],"Received":["from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g0wxz6VvWz1yD5\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 20:51:19 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sea.lore.kernel.org (Postfix) with ESMTP id C89653012E81\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 22 Apr 2026 10:48:05 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id EBD153537C6;\n\tWed, 22 Apr 2026 10:48:04 +0000 (UTC)","from BN1PR04CU002.outbound.protection.outlook.com\n (mail-eastus2azon11010030.outbound.protection.outlook.com [52.101.56.30])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id E731A3CCFD8;\n\tWed, 22 Apr 2026 10:48:02 +0000 (UTC)","from CH2PR12MB3990.namprd12.prod.outlook.com (2603:10b6:610:28::18)\n by MN0PR12MB6125.namprd12.prod.outlook.com (2603:10b6:208:3c7::15) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9846.19; Wed, 22 Apr\n 2026 10:47:56 +0000","from CH2PR12MB3990.namprd12.prod.outlook.com\n ([fe80::7de1:4fe5:8ead:5989]) by CH2PR12MB3990.namprd12.prod.outlook.com\n ([fe80::7de1:4fe5:8ead:5989%4]) with mapi id 15.20.9846.019; Wed, 22 Apr 2026\n 10:47:56 +0000"],"ARC-Seal":["i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776854884; cv=fail;\n b=WcXyP1TNiKF8W7hsdlAWcIxh4J0IbYsB/I/9RnsbOgrWGanOcXs+RL9mtTeEivrz0yBEsLsLPCR1/AVnvcpVmE3kDkY76CbfLTxrsfGL09cpF10yBgENPjAbyjekXHJWVi4893TZakqr53D5K5jYd211hmE1ObLckxfQcQH9s/w=","i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;\n b=ZTTrs0sSJENrQOiPVmSY8n7+Mnm9S/Xfz84KGchbm6OYxcA6SQSklS4knE4GgO5wWl2odJLa21MUr1T1YcZ7NsGLow+lV1AGMl9eWmMa4aE1OxEwiVW2sNiXz7XjouFZ0a+3CFd9whoXYLToQruaIsSHLQR/XzmWCMvoPVkE3x561KSWUbONHl6+4Une9M4n4caOh1FW8aadB3HSEcVDTrLaYCJu46hoacsc1QH8KfUTpCLCukDJCrAvl36E0QrKbsJZepc2yH0UstHC9iItiGvxya6W3OhYDunBvxoZBmEg4ej5INV4sKgAcBcuD2aD8V24wmKs7n3sGK/3Y0EMQg=="],"ARC-Message-Signature":["i=2; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776854884; c=relaxed/simple;\n\tbh=3rkRmejF4nrZppn6+ZXolZkqkthM84tNeCCMZeOvauk=;\n\th=Content-Type:Date:Message-Id:Subject:From:To:Cc:References:\n\t In-Reply-To:MIME-Version;\n b=Ib3j4nFDWtK3tuXWoZANEkKOfgcqICw8yf518nM+byTK+8U6KpAOjQMGa79VpghE8QJZHv1decNYDa9UMZq6RjiavPc8kq1eosvhRxt1Ui7TX+LeCfw0ftXqPmqTbO/7A5ZNOJh13u/TQ2sZ7LEMxqPoAz/sIvUkSG8IZ3MBZ3Q=","i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector10001;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=wdnHCuDpVi+lIW0L9JskM5kgeRaRFqLC4IEKxq4ZtnU=;\n b=kwaPTrH1kUhxnH3IJja4vk2zgKAAo4pMnITOTKdGyvjeTFdllP7Mz1CjjSFEqE5bdAzvjIhmmcGidTi/g+zL5p+2tgitOZerj8qLlN9geZV0bnvVB+1zJhWx5ZOLbdOSZFWU0XSz3XF9FM6trPnnmD03WEQV0fWBC57Jh2IHrCLcsRQ6sxOO+DJLQZarmq8rVihlTJWhbzLqMHS9OBXo5usiZUSmx5Yca4Nf4VSAIUOHnmFYW+IyNpLv5BVC9S3jSKL3ZcBPUwg861lhICvjPY1sZuzwJ6HbjRGP4djFt3k4M9ffkSCkYoKYMavIWC4gie3wGTUDn9XIaJakkJh9rQ=="],"ARC-Authentication-Results":["i=2; smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=nvidia.com;\n spf=fail smtp.mailfrom=nvidia.com;\n dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com\n header.b=Id+YpQnz; arc=fail smtp.client-ip=52.101.56.30","i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com;\n dkim=pass header.d=nvidia.com; arc=none"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;\n s=selector2;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=wdnHCuDpVi+lIW0L9JskM5kgeRaRFqLC4IEKxq4ZtnU=;\n b=Id+YpQnzu2WF0anmn/Yo5DxYdTrXiTck3XlMbrjCgvgHosKcRPyWBPnpvPvrR5lhqyovahWhgR09Zcat54zeB6vyj3RhjahWWg5fNILC3dzq42m8YnfA6BXdrk6IpI8jHIDgT/yOOlUSkwF4DoemVsdokz19C2RPb0+aL9jM6eYB5KjlMMZ+ZJgI8a/qVVxOMq/qOeMwQoNkK1ZxJVVymuUAVwANeZi3OYmv3dC/VB7DbrSxsv/6y0l94G9BWJyq67YeKduBSJH9ToWkViYdFi/V0h8CwAcZwKG76T3bpk1EqzpK5wOMq/sXaLdPDrNRDJbiyM+IaUYZKHaiJMe47w==","Content-Transfer-Encoding":"quoted-printable","Content-Type":"text/plain; charset=UTF-8","Date":"Wed, 22 Apr 2026 19:47:51 +0900","Message-Id":"<DHZMHF1YVBI4.F11YKDDKBNTQ@nvidia.com>","Subject":"Re: [PATCH v2 4/5] gpu: nova-core: send UNLOADING_GUEST_DRIVER GSP\n command upon unloading","From":"\"Alexandre Courbot\" <acourbot@nvidia.com>","To":"\"Eliot Courtney\" <ecourtney@nvidia.com>","Cc":"\"Danilo Krummrich\" <dakr@kernel.org>, \"Alice Ryhl\" <aliceryhl@google.com>,\n \"David Airlie\" <airlied@gmail.com>, \"Simona Vetter\" <simona@ffwll.ch>,\n \"Bjorn Helgaas\" <bhelgaas@google.com>,\n =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= <kwilczynski@kernel.org>,\n \"Miguel Ojeda\" <ojeda@kernel.org>, \"Gary Guo\" <gary@garyguo.net>,\n\t=?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@protonmail.com>,\n \"Benno Lossin\" <lossin@kernel.org>,\n \"Andreas Hindborg\" <a.hindborg@kernel.org>,\n \"Trevor Gross\" <tmgross@umich.edu>, \"Boqun Feng\" <boqun@kernel.org>,\n \"John Hubbard\" <jhubbard@nvidia.com>, \"Alistair Popple\" <apopple@nvidia.com>,\n \"Joel Fernandes\" <joelagnelf@nvidia.com>, \"Timur Tabi\" <ttabi@nvidia.com>,\n <nouveau@lists.freedesktop.org>, <dri-devel@lists.freedesktop.org>,\n <linux-kernel@vger.kernel.org>, <linux-pci@vger.kernel.org>,\n <rust-for-linux@vger.kernel.org>","References":"<20260421-nova-unload-v2-0-2fe54963af8b@nvidia.com>\n <20260421-nova-unload-v2-4-2fe54963af8b@nvidia.com>\n <DHYQGLYYXEN6.11Q3FQGZMWCJ6@nvidia.com>\n <DHYWJ32M02N4.2954OSJXFGD1G@nvidia.com>","In-Reply-To":"<DHYWJ32M02N4.2954OSJXFGD1G@nvidia.com>","X-ClientProxiedBy":"TYWP286CA0015.JPNP286.PROD.OUTLOOK.COM\n (2603:1096:400:178::13) To CH2PR12MB3990.namprd12.prod.outlook.com\n (2603:10b6:610:28::18)","Precedence":"bulk","X-Mailing-List":"linux-pci@vger.kernel.org","List-Id":"<linux-pci.vger.kernel.org>","List-Subscribe":"<mailto:linux-pci+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-pci+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","X-MS-PublicTrafficType":"Email","X-MS-TrafficTypeDiagnostic":"CH2PR12MB3990:EE_|MN0PR12MB6125:EE_","X-MS-Office365-Filtering-Correlation-Id":"a62d6df8-147b-40db-11cc-08dea05c9cc7","X-MS-Exchange-SenderADCheck":"1","X-MS-Exchange-AntiSpam-Relay":"0","X-Microsoft-Antispam":"\n\tBCL:0;ARA:13230040|366016|7416014|1800799024|10070799003|376014|18002099003|56012099003|22082099003;","X-Microsoft-Antispam-Message-Info":"\n\tFaYNQkJejaxFnf0KmCyl1VhifR7VZGrNbml9KjvEriH7QhQTgig6W4CVJ16EpjKyBSlUa0to768Y4JIce2SR9KsXq/8e4ujcmBfr3iuTU8v/z13Rl9q1u2dyBFNEovhjAR+YxSvO4WE746n0dnSiJ4kVra3GrY4jlQn5DPv0epB9p6yId9ii8M8KTwu56yWwLDxPd5EhdyeQFi8rbA86rJwBFvXHIl/GxYZfIspIXtPNmieH1nf5UX4pzC7ipD1L+xwmKTDLNSVHhxjjycmiim9/H919CAzM/8KlYodNjMCIbHqzpoZbz1kkX7T12CHZV/qpuqj7CJgm46mibc5sG2bmaO86PG2PwG8h/Z+QQzX8mkn+Ddw13Gxb+cFoZuMW7M091hSnH+MykzbWVHu4eVAgKqgSxah/Gmwyy6LbrvXVB0N/eRfI8fRuOcFRJNrXgqUvyBRPbkNPkEaXFTL4flC6dLW2Bv/ImToClAEcQwzDB8/hIQZipT3/8ZKu1PTAEgD/01ZKuG5r+2Nb7w4jTqCtPNZPdWDieBHLqcsw3CfQi6oBTWSwxmEkHaQc4vedrUAGiQGSnaZfMyfwi6f4M1WXFHxmO7zFLC+JTk8rmcw3hqEZu8VTBINrlKqsfvTC5VhWSSCbsOzLJKgr28qE4eRo9aXhswJp59yUOkzlWBmy4qAOoKzsYLKjUKx+BxiOgR+WMveiCGFFd06oJfD21weomfVGOHmbhyLOeqXH/x4=","X-Forefront-Antispam-Report":"\n\tCIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH2PR12MB3990.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(7416014)(1800799024)(10070799003)(376014)(18002099003)(56012099003)(22082099003);DIR:OUT;SFP:1101;","X-MS-Exchange-AntiSpam-MessageData-ChunkCount":"2","X-MS-Exchange-AntiSpam-MessageData-0":"=?utf-8?q?eAErH9OOPYNymhgJUMfKaJMQtmIp?=\n\t=?utf-8?q?DxT2ctUwZtjfQ4LvCLwJ9ZUMkqH99cECslWDp+huhAEeSPZnLwBvibwb2O69usPGW?=\n\t=?utf-8?q?LhswO2rryzchgGox/Mx5LYMO+rmjzcWlMjSB55E0DI8I5Jmjk8hAIr8axIlByr5J1?=\n\t=?utf-8?q?81v1GQqx5KtTT+p+m3UQkcHYXRU3Yj4EFNcMoPIS8PwlQqcmE5b1YI2mh6RQ6c/lZ?=\n\t=?utf-8?q?uZacWP3pSccBi4fObSRnZ5m7pP+eRQyCIQd6SFx8XASNE3GOW/IiHeKupEmUqMU38?=\n\t=?utf-8?q?2dTV4djzcrBElVXnzvJ6FcfcO8uHy9IQilOx/JFSTVjwhgCorrLyHJrSA39YZditk?=\n\t=?utf-8?q?Y/TbQQ/TLkk8iyiwCnL9F2uDIRf78y129w4xHwF6e/W+I3icoFdwLDBktWRrgshU6?=\n\t=?utf-8?q?qngNmNMgAxmB0mC2vv1yR2FVX91eswdNN4h0+DZSBdF1PJ0153swb08+8oV4kM4Ky?=\n\t=?utf-8?q?veGp0LNnMgp33+QD2+xbBYofXwRh4eGt7PGFu/Fp+1N5lTQxNbwX0sU5nTnfYpoI5?=\n\t=?utf-8?q?SGrvyuG5iFGY7pVx3+4WaR4AelnGQU7WJS7680ZYUJ5VJH3O4XUVH7yWL9rpEnca2?=\n\t=?utf-8?q?+lUlugIuIINgJaJO51tRM3e8EvMEGIzrbwlylvApOqxt+/iIQubBy7J2qJ/TxzuZU?=\n\t=?utf-8?q?3mt0V5Uh9JNKf5W87QK8LpRQnGKiyJXnMlm8EhFX5NzrFjos4S21H5lFly/PzlKzi?=\n\t=?utf-8?q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RpYZtNaQooGXfm7V2XhoDfwiB/33ZvIP2ii+L+1pNexq7?=\n\t=?utf-8?q?KW1GdcJNy6DRribVBt6JPkPmYhlR+0fE4Km0vF6etuZS7Dc9nFwd33N+jsOIc6p/k?=\n\t=?utf-8?q?0e+eub5txUNXjH0NVVs0+JVcUbAN+Ai0NXVKj5ScHQ3bYlDvtJUGgZPu5ygE6y88e?=\n\t=?utf-8?q?3YtNUGyUnBIzJVUz+?=","X-MS-Exchange-AntiSpam-MessageData-1":"8LdU0nQHXnD0OA==","X-OriginatorOrg":"Nvidia.com","X-MS-Exchange-CrossTenant-Network-Message-Id":"\n a62d6df8-147b-40db-11cc-08dea05c9cc7","X-MS-Exchange-CrossTenant-AuthSource":"CH2PR12MB3990.namprd12.prod.outlook.com","X-MS-Exchange-CrossTenant-AuthAs":"Internal","X-MS-Exchange-CrossTenant-OriginalArrivalTime":"22 Apr 2026 10:47:56.2836\n (UTC)","X-MS-Exchange-CrossTenant-FromEntityHeader":"Hosted","X-MS-Exchange-CrossTenant-Id":"43083d15-7273-40c1-b7db-39efd9ccc17a","X-MS-Exchange-CrossTenant-MailboxType":"HOSTED","X-MS-Exchange-CrossTenant-UserPrincipalName":"\n LWRcH0zgQTuCHcyIKIIeGqk7oPh7AxpTbp2zcuenK7aGnFEd2M4J9ghNQ3/ESngLjujwVl4/M8r2gj8wdruRZw==","X-MS-Exchange-Transport-CrossTenantHeadersStamped":"MN0PR12MB6125"}},{"id":3681250,"web_url":"http://patchwork.ozlabs.org/comment/3681250/","msgid":"<DI06KFG7C6P7.1NR2L62JY2RSF@nvidia.com>","list_archive_url":null,"date":"2026-04-23T02:32:09","subject":"Re: [PATCH v2 4/5] gpu: nova-core: send UNLOADING_GUEST_DRIVER GSP\n command upon unloading","submitter":{"id":93201,"url":"http://patchwork.ozlabs.org/api/people/93201/","name":"Eliot Courtney","email":"ecourtney@nvidia.com"},"content":"On Wed Apr 22, 2026 at 7:47 PM JST, Alexandre Courbot wrote:\n> On Tue Apr 21, 2026 at 11:27 PM JST, Alexandre Courbot wrote:\n> <snip>\n>>>> +        dev_dbg!(dev, \"GSP shut down\\n\");\n>>>> +\n>>>> +        Ok(())\n>>>> +    }\n>>>>  }\n>>>> diff --git a/drivers/gpu/nova-core/gsp/commands.rs b/drivers/gpu/nova-core/gsp/commands.rs\n>>>> index c80df421702c..fb94460c451e 100644\n>>>> --- a/drivers/gpu/nova-core/gsp/commands.rs\n>>>> +++ b/drivers/gpu/nova-core/gsp/commands.rs\n>>>> @@ -237,3 +237,39 @@ pub(crate) fn gpu_name(&self) -> core::result::Result<&str, GpuNameError> {\n>>>>  pub(crate) fn get_gsp_info(cmdq: &Cmdq, bar: &Bar0) -> Result<GetGspStaticInfoReply> {\n>>>>      cmdq.send_command(bar, GetGspStaticInfo)\n>>>>  }\n>>>> +\n>>>> +pub(crate) struct UnloadingGuestDriver {\n>>>> +    suspend: bool,\n>>>> +}\n>>>\n>>> This feels like it only makes sense to call from within the gsp module,\n>>> so I wonder if it can be pub(super) (prolly a few others in this file\n>>> could be too, ofc not relevant for this series).\n>>\n>> I'll review that, we do want to limit visibility as much as possible.\n>\n> Mmm looking more closely I am not sure this is something we want/can do.\n> As the driver expands, it looks likely that some of these types will be\n> used outside of the `gsp` module - in particular some of the responses\n> can be used outside, I think this actually happens with the MM series.\n>\n> So I think I will keep the visibility as-is for now.\n\nI think some will be used outside yeah. For UnloadingGuestDriver do you\nreckon it makes sense for it to be called outside of the gsp module? It\nlooks like it should only happen on unload and needs to be a part of a\nbunch of other tear down code to work.","headers":{"Return-Path":"\n <linux-pci+bounces-53033-incoming=patchwork.ozlabs.org@vger.kernel.org>","X-Original-To":["incoming@patchwork.ozlabs.org","linux-pci@vger.kernel.org"],"Delivered-To":"patchwork-incoming@legolas.ozlabs.org","Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=Nvidia.com header.i=@Nvidia.com header.a=rsa-sha256\n header.s=selector2 header.b=V8zfvEt6;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org\n (client-ip=172.232.135.74; helo=sto.lore.kernel.org;\n envelope-from=linux-pci+bounces-53033-incoming=patchwork.ozlabs.org@vger.kernel.org;\n receiver=patchwork.ozlabs.org)","smtp.subspace.kernel.org;\n\tdkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com\n header.b=\"V8zfvEt6\"","smtp.subspace.kernel.org;\n arc=fail smtp.client-ip=52.101.62.28","smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=nvidia.com","smtp.subspace.kernel.org;\n spf=fail smtp.mailfrom=nvidia.com","dkim=none (message not signed)\n header.d=none;dmarc=none action=none header.from=nvidia.com;"],"Received":["from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4g1Kqq0BHTz1yD5\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 23 Apr 2026 12:32:23 +1000 (AEST)","from smtp.subspace.kernel.org (conduit.subspace.kernel.org\n [100.90.174.1])\n\tby sto.lore.kernel.org (Postfix) with ESMTP id 276823006138\n\tfor <incoming@patchwork.ozlabs.org>; Thu, 23 Apr 2026 02:32:20 +0000 (UTC)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby smtp.subspace.kernel.org (Postfix) with ESMTP id 211ED346AD3;\n\tThu, 23 Apr 2026 02:32:19 +0000 (UTC)","from DM5PR21CU001.outbound.protection.outlook.com\n (mail-centralusazon11011028.outbound.protection.outlook.com [52.101.62.28])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby smtp.subspace.kernel.org (Postfix) with ESMTPS id A9E122D0606;\n\tThu, 23 Apr 2026 02:32:17 +0000 (UTC)","from BL0PR12MB2353.namprd12.prod.outlook.com (2603:10b6:207:4c::31)\n by CH2PR12MB4280.namprd12.prod.outlook.com (2603:10b6:610:ac::11) with\n Microsoft SMTP Server (version=TLS1_2,\n cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9769.46; Thu, 23 Apr\n 2026 02:32:12 +0000","from BL0PR12MB2353.namprd12.prod.outlook.com\n ([fe80::99b:dcff:8d6d:78e0]) by BL0PR12MB2353.namprd12.prod.outlook.com\n ([fe80::99b:dcff:8d6d:78e0%4]) with mapi id 15.20.9846.019; Thu, 23 Apr 2026\n 02:32:12 +0000"],"ARC-Seal":["i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;\n\tt=1776911539; cv=fail;\n b=PjS+MAZm/dAyoaIvSCymD1BCqOtz0ceZnpOh9pZGk2egNvjWNRXYDEGrnGedbvFpl6zo8J6yp8lk9OV0a7/Offa52RnpgkaWWf5IVBKF26vUP2RmAwgp1sMdkqGNCj6VbBdR3W448O63uDt3yBg84lpVKgvI6+cYWo3HWnj9/mY=","i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none;\n b=FebXwFCdVx3dZKlVtEED0lSzLSzyAwKTkTnF0wHslng+IdTh4us3qhkLGuYPNvnB7WjQqjB2pb8XtEO7tMfxJjoozoC7YQ5U5fNdeykgDt0wK1vEeoAM1qt7nzRl4XRF/UPIyk0EdDV36/XmeCbBRQdH/Ex3Rgq9OMOqkI7MCYyLlHm916Wu9ZQr/oPiF6iB3Pl5qMXENYrIX+VveslJiC28r8C269nFe5W4YbmjEWE/2NoM8xRgvLdJqGZFLDeJgANoOat4v6Xbt4wyp6Xnb/VHEheN5aoAiJGyS7B8j8EVAJdbp07pP8yp8Z5iKZpTClo27c1zMDvPtVkib7ba5w=="],"ARC-Message-Signature":["i=2; a=rsa-sha256; d=subspace.kernel.org;\n\ts=arc-20240116; t=1776911539; c=relaxed/simple;\n\tbh=xw4itXIyFEdru7eNXSNAwQF+WJcj7SZ8GAjX4e6SCsE=;\n\th=Content-Type:Date:Message-Id:From:To:Cc:Subject:References:\n\t In-Reply-To:MIME-Version;\n b=uU4R2UWTVF/SUUbsHBWxUks2/fN8qe6+NOTi70XfInHKnu9dLQS9i5Q9kuwEVFJPrvwa1DL37kH/bxsrXZXCeOKGL0RhznI6vsTpJmRFReL9zyAcrOZtz5Vt9cMQ97FX57l1WZm0hEY+sXXsDzJZeQZxPjT6XfDlH4uZYm2yoIQ=","i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com;\n s=arcselector10001;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1;\n bh=fSG6BgYyMI5Qoj4e7kg83fw7rkvk35lyoBn8XjymU0k=;\n b=f9xwF1sASI32pAdpE239A98gqJ0DJ1X9laYvM4UFLT7YHCTqp/9d2rvuPHZY+z8QYkZ7lIHF25P97jOitOl3YaaG7j7MNBft+nCO8kzhmFs9MqwdiEWmh6nWe4OTy2RM+zNnzgoKK5f4LOuTHELn6lDKexsakt/4vzNmvCVQGa21eZcsDNXNjfJv7DzCfOhGjkgT86ScIxbqP+16DKS+w9eU/qXjHQ+gBqC/T7iWa1llgVJJ2sb6IwXlUPEiH5EIsYYLbU4LDNZ/c1odz2RxOQzdNevd1+QyEUmX2yM3D3QYXYw1QSbtWRK6qL8btCVjx1AZWw8tFm88cRBgeULOxw=="],"ARC-Authentication-Results":["i=2; smtp.subspace.kernel.org;\n dmarc=pass (p=reject dis=none) header.from=nvidia.com;\n spf=fail smtp.mailfrom=nvidia.com;\n dkim=pass (2048-bit key) header.d=Nvidia.com header.i=@Nvidia.com\n header.b=V8zfvEt6; arc=fail smtp.client-ip=52.101.62.28","i=1; mx.microsoft.com 1; spf=pass\n smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com;\n dkim=pass header.d=nvidia.com; arc=none"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com;\n s=selector2;\n h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck;\n bh=fSG6BgYyMI5Qoj4e7kg83fw7rkvk35lyoBn8XjymU0k=;\n b=V8zfvEt6WUgludypxhaNOXgIC0lG/e6MnSiXOfAjp2IwtbYNjjrVhB6ukn0DVT2FsY7iXnTAnP5kAePDD5RFAYNZb3nhQ7/mfopbwY4YZl4MCG/knoiXhHPwl+rfizu2XIzPBcwHORtonNVxyAeemijs44BgXN4Jkp16+BUU6T0yWBkO+faySZmBRR8sYVMojEIrEbNfUuPl1NVifQKPusFA4/Ljq50lxNMJmMb+90YRfBx0p7onU906oAtZDadiymCMjAtYER1OJMzGeYhwu+qhnTIiWn7Bsh/Na/ro8/eNj66C7+Svx6ahRxAgnYUN/SFrylu75FymU1MfOazIfg==","Content-Transfer-Encoding":"quoted-printable","Content-Type":"text/plain; charset=UTF-8","Date":"Thu, 23 Apr 2026 11:32:09 +0900","Message-Id":"<DI06KFG7C6P7.1NR2L62JY2RSF@nvidia.com>","From":"\"Eliot Courtney\" <ecourtney@nvidia.com>","To":"\"Alexandre Courbot\" <acourbot@nvidia.com>, \"Eliot Courtney\"\n <ecourtney@nvidia.com>","Cc":"\"Danilo Krummrich\" <dakr@kernel.org>, \"Alice Ryhl\" <aliceryhl@google.com>,\n \"David Airlie\" <airlied@gmail.com>, \"Simona Vetter\" <simona@ffwll.ch>,\n \"Bjorn Helgaas\" <bhelgaas@google.com>,\n =?utf-8?q?Krzysztof_Wilczy=C5=84ski?= <kwilczynski@kernel.org>,\n \"Miguel Ojeda\" <ojeda@kernel.org>, \"Gary Guo\" <gary@garyguo.net>,\n\t=?utf-8?q?Bj=C3=B6rn_Roy_Baron?= <bjorn3_gh@protonmail.com>,\n \"Benno Lossin\" <lossin@kernel.org>,\n \"Andreas Hindborg\" <a.hindborg@kernel.org>,\n \"Trevor Gross\" <tmgross@umich.edu>, \"Boqun Feng\" <boqun@kernel.org>,\n \"John Hubbard\" <jhubbard@nvidia.com>, \"Alistair Popple\" <apopple@nvidia.com>,\n \"Joel Fernandes\" <joelagnelf@nvidia.com>, \"Timur Tabi\" <ttabi@nvidia.com>,\n <nouveau@lists.freedesktop.org>, <dri-devel@lists.freedesktop.org>,\n <linux-kernel@vger.kernel.org>, <linux-pci@vger.kernel.org>,\n <rust-for-linux@vger.kernel.org>","Subject":"Re: [PATCH v2 4/5] gpu: nova-core: send UNLOADING_GUEST_DRIVER GSP\n command upon unloading","X-Mailer":"aerc 0.21.0-0-g5549850facc2","References":"<20260421-nova-unload-v2-0-2fe54963af8b@nvidia.com>\n <20260421-nova-unload-v2-4-2fe54963af8b@nvidia.com>\n <DHYQGLYYXEN6.11Q3FQGZMWCJ6@nvidia.com>\n <DHYWJ32M02N4.2954OSJXFGD1G@nvidia.com>\n <DHZMHF1YVBI4.F11YKDDKBNTQ@nvidia.com>","In-Reply-To":"<DHZMHF1YVBI4.F11YKDDKBNTQ@nvidia.com>","X-ClientProxiedBy":"DM6PR10CA0031.namprd10.prod.outlook.com\n (2603:10b6:5:60::44) To BL0PR12MB2353.namprd12.prod.outlook.com\n (2603:10b6:207:4c::31)","Precedence":"bulk","X-Mailing-List":"linux-pci@vger.kernel.org","List-Id":"<linux-pci.vger.kernel.org>","List-Subscribe":"<mailto:linux-pci+subscribe@vger.kernel.org>","List-Unsubscribe":"<mailto:linux-pci+unsubscribe@vger.kernel.org>","MIME-Version":"1.0","X-MS-PublicTrafficType":"Email","X-MS-TrafficTypeDiagnostic":"BL0PR12MB2353:EE_|CH2PR12MB4280:EE_","X-MS-Office365-Filtering-Correlation-Id":"e26a563d-1f10-446b-bb5e-08dea0e08654","X-MS-Exchange-SenderADCheck":"1","X-MS-Exchange-AntiSpam-Relay":"0","X-Microsoft-Antispam":"\n\tBCL:0;ARA:13230040|376014|7416014|366016|1800799024|10070799003|22082099003|18002099003|56012099003;","X-Microsoft-Antispam-Message-Info":"\n\t1vnkujns5nCh3QxbeJIQB6J47yb91A1Owlp6Ng28Fy3UEm+Nj5ljkv5ree5MPLdvHtiYrjvC6y5fW19j3es2ejWExxZo+SYX4v4jC83aHiMKEAbAQGZw2xlaXEvLtftYyjaPo3kcPc/kBrNla5mfKcNyzc3c6hDVVYcO8SC2O/hMGcpEK7cMbmC7vh7yo+FKkYIOQENOa4EMuaU6zI/NjR9LLrihJpIFNcNXebr+9b0Kvz/IG2s5FihVwA9BIV5mz3r24mszflJBODbbzG87uoZWER7i38P4bkrnseJkPeityNkk4ewBh1gVnuBc2nzPPu1fVFkH5WDhKrzhVwNibG6bsUG9aqACBHIt1KjTWosoo03H2st434GXIkiu1J1dy2dWQNTT2IjLt9ItjsIUk8e4Xu/5Y04QHxU4nE2w1FCPq2jvCd43mxJrExBa4dBb5JiwZkzmdnqy78l3Mc45e/08fxxYqmJdhUoGGhspNftf4eFE18zGgNJsMzYABS2MT7mtyWB8xafbrf/dtJCOX1Lcu0EM0/AxHc/RzUdYYOuGrSIqwP0Bje9ea69B+lWiG+GCL0buHfwmaehlWotCRdJaU1ejr1K02FknHDNNKrXRxs7cC/wBkRqm1vFQ6X2iRHt13FSMeDgPsESgmZd4ghb/muPZ/MVIovImn6RG/c4uKprzQFQ/Aeh7CLQT52OLNao8BIfL2T4s9uQJ2f1VHOIb6CCOGzlA3nTl8+O41wo=","X-Forefront-Antispam-Report":"\n\tCIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BL0PR12MB2353.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(376014)(7416014)(366016)(1800799024)(10070799003)(22082099003)(18002099003)(56012099003);DIR:OUT;SFP:1101;","X-MS-Exchange-AntiSpam-MessageData-ChunkCount":"2","X-MS-Exchange-AntiSpam-MessageData-0":"=?utf-8?q?gUwpLCE4PFgK9NMZCAeR+vnpE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hvfaUfhJWj/GsTIj04Y1Ah?=\n\t=?utf-8?q?blp6WUY1o9UJjRJfM?=","X-MS-Exchange-AntiSpam-MessageData-1":"1PSClHCN2aYXhQ==","X-OriginatorOrg":"Nvidia.com","X-MS-Exchange-CrossTenant-Network-Message-Id":"\n e26a563d-1f10-446b-bb5e-08dea0e08654","X-MS-Exchange-CrossTenant-AuthSource":"BL0PR12MB2353.namprd12.prod.outlook.com","X-MS-Exchange-CrossTenant-AuthAs":"Internal","X-MS-Exchange-CrossTenant-OriginalArrivalTime":"23 Apr 2026 02:32:12.2703\n (UTC)","X-MS-Exchange-CrossTenant-FromEntityHeader":"Hosted","X-MS-Exchange-CrossTenant-Id":"43083d15-7273-40c1-b7db-39efd9ccc17a","X-MS-Exchange-CrossTenant-MailboxType":"HOSTED","X-MS-Exchange-CrossTenant-UserPrincipalName":"\n Loq+dBwL46O89A1jliE3yiPOQtm0iRRsJkIqYwo8KxgvZEe0CfyXgnyHAgwFy8l/L1l2qZO2Mh8haAhdhyl8BA==","X-MS-Exchange-Transport-CrossTenantHeadersStamped":"CH2PR12MB4280"}}]