Re: Runtime Memory Validation in Intel-TDX and AMD-SNP

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

 



> > > >> Also in general i don't think it will really happen, at least
> > > initially.
> > > >> All the shared buffers we use are allocated and never freed. So such a
> > > >> problem could be deferred.
> > >
> > > Does it not depend on kernel configs? Currently, there is a valid
> > > control path in dma_alloc_coherent which might alloc and free shared
> > > pages.
> >
> > If the device filter is active it won't.
> >
> 
> If I am not missing something, I do not see that the device filter
> checks for CONFIG_DMA_COHERENT_POOL and if it is not enabled,
> dma_alloc_coherent will allocate a regular memory, convert it to
> shared and convert it back to private when it is freed.

What I meant is that the only devices that will be supported (mainly
virtio) initially don't ever free coherent memory
And the device filter enforces that.

Now we probably want to support freeing anyways just to be able to run
without device filter, but it definitely doesn't have to be fast
or efficient. If there's a problem with it it would be a quite reasonable
implementation to keep it in a pool.

-Andi




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux