> From: linux-hyperv-ow...@vger.kernel.org
> On Behalf Of Wei Hu
> Sent: Tuesday, October 22, 2019 4:11 AM
> ...
> + /* Allocate from CMA */
> + // request_pages = (request_size >> PAGE_SHIFT) + 1;
"//" seems rare in Linux kernel code.
IMO "/* */" is more common.
> +
From: Wei Hu Sent: Tuesday, October 22, 2019 4:11 AM
>
> On Hyper-V, Generation 1 VMs can directly use VM's physical memory for
> their framebuffers. This can improve the efficiency of framebuffer and
> overall performence for VM. The physical memory assigned to framebuffer
> must be contiguous.
Thanks for the review. Please see my response inline.
> > + select DMA_CMA
>
> Thіs needs to be
>
> select DMA_CMA if HAVE_DMA_CONTIGUOUS
>
> > +#include
>
> > + /* Allocate from CMA */
> > + // request_pages = (request_size >> PAGE_SHIFT) + 1;
> > + request_pages = (round_up(re
> + select DMA_CMA
Thіs needs to be
select DMA_CMA if HAVE_DMA_CONTIGUOUS
> +#include
> + /* Allocate from CMA */
> + // request_pages = (request_size >> PAGE_SHIFT) + 1;
> + request_pages = (round_up(request_size, PAGE_SIZE) >> PAGE_SHIFT);
> + page = dma_alloc_fro
On Hyper-V, Generation 1 VMs can directly use VM's physical memory for
their framebuffers. This can improve the efficiency of framebuffer and
overall performence for VM. The physical memory assigned to framebuffer
must be contiguous. We use CMA allocator to get contiguouse physicial
memory when the