[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v4 08/16] kmsan: convert kmsan_handle_dma to use physical addresses



On Tue, Aug 19, 2025 at 08:36:52PM +0300, Leon Romanovsky wrote:
>  /* Helper function to handle DMA data transfers. */
> -void kmsan_handle_dma(struct page *page, size_t offset, size_t size,
> +void kmsan_handle_dma(phys_addr_t phys, size_t size,
>                     enum dma_data_direction dir)
>  {
> +     struct page *page = phys_to_page(phys);
>       u64 page_offset, to_go, addr;
>  
>       if (PageHighMem(page))
>               return;
> -     addr = (u64)page_address(page) + offset;
> +     addr = (u64)page_address(page) + offset_in_page(phys);

addr = phys_to_virt(phys);

And make addr a void *

Otherwise looks fine

Reviewed-by: Jason Gunthorpe <jgg@xxxxxxxxxx>

Jason



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.