RE: [PATCH v8 1/6] arm64: hyperv: Add Hyper-V hypercall and register access utilities

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

 



From: Sunil Muthuswamy <sunilmut@xxxxxxxxxxxxx> Sent: Wednesday, March 3, 2021 10:28 AM
> 
> > > +
> > > +	/*
> > > +	 * Allocate a power of 2 size so alignment to that size is
> > > +	 * guaranteed, since the hypercall input and output areas
> > > +	 * must not cross a page boundary.
> > > +	 */
> > > +	input = kzalloc(roundup_pow_of_two(sizeof(input->header) +
> > > +				sizeof(input->element[0])), GFP_ATOMIC);
> > > +	output = kmalloc(roundup_pow_of_two(sizeof(*output)), GFP_ATOMIC);
> > > +
> > Check for null from these malloc routines? Here and in other places.
> 
> Between, is there a plan to setup a percpu input/output page for hypercall
> input/output on ARM (like we do for x64)? I didn't check the specific size requirement
> for this particular call, but, that generally will remove the need for these
> allocations.

I'm not planning to add percpu input/output pages in this patch set.  As noted
in another reply, we can eliminate these memory allocations entirely by using
"fast" hypercalls.  At that point, there would be no usage of percpu input/output
pages in this patch set.  If the need arises in the context of future work, we can
add them at that time.

Michael




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux