On Thu, 2025-12-18 at 20:54 +0900, Alexandre Courbot wrote:
> +/// On Turing and GA100, the entries in the `LibosMemoryRegionInitArgument`
> +/// must all be a multiple of GSP_PAGE_SIZE in size, so add padding to force
> it
> +/// to that size.
> +#[repr(C)]
> +pub(crate) struct GspArgumentsAligned {
> + pub(crate) inner: GspArgumentsCached,
> + _padding: [u8; GSP_PAGE_SIZE -
> core::mem::size_of::<bindings::GSP_ARGUMENTS_CACHED>()],
> +}
Shouldn't I also remove the _padding from GspArgumentsCached:
pub(crate) struct GspArgumentsCached(
bindings::GSP_ARGUMENTS_CACHED,
[u8; GSP_PAGE_SIZE -
core::mem::size_of::<bindings::GSP_ARGUMENTS_CACHED>()],
);
and with the padding removed, doesn't this
dma_write!(rmargs[0].inner = fw::GspArgumentsCached::new(&cmdq))?;
now only copy the args and leave the padding completely uninitialized? That's
okay, I think, I just
want to make sure I'm not missing anything.