I will remove corresponding comments from the balloon's {increase|decrease}_reservation
On 06/12/2018 09:41 AM, Oleksandr Andrushchenko wrote:
One more thing: please add a comment here saying that frames array is array of PFNs (in Xen granularity), which is what XENMEM_populate_physmap requires. And remove (or update to name the actual call you are making) the corresponding comment in increase_reservation().
Please see above
+
+int xenmem_reservation_increase(int count, xen_pfn_t *frames)
+{
+ÂÂÂ struct xen_memory_reservation reservation = {
+ÂÂÂÂÂÂÂ .address_bits = 0,
+ÂÂÂÂÂÂÂ .extent_order = EXTENT_ORDER,
+ÂÂÂÂÂÂÂ .domidÂÂÂÂÂÂÂ = DOMID_SELF
+ÂÂÂ };
+
+ÂÂÂ set_xen_guest_handle(reservation.extent_start, frames);
+ÂÂÂ reservation.nr_extents = count;
+ÂÂÂ return HYPERVISOR_memory_op(XENMEM_populate_physmap, &reservation);
+}
+EXPORT_SYMBOL_GPL(xenmem_reservation_increase);
And similarly, here we are requesting GFNs, and update decrease_reservation().
Thank you,
-boris
+
+int xenmem_reservation_decrease(int count, xen_pfn_t *frames)
+{
+ÂÂÂ struct xen_memory_reservation reservation = {
+ÂÂÂÂÂÂÂ .address_bits = 0,
+ÂÂÂÂÂÂÂ .extent_order = EXTENT_ORDER,
+ÂÂÂÂÂÂÂ .domidÂÂÂÂÂÂÂ = DOMID_SELF
+ÂÂÂ };
+
+ÂÂÂ set_xen_guest_handle(reservation.extent_start, frames);
+ÂÂÂ reservation.nr_extents = count;
+ÂÂÂ return HYPERVISOR_memory_op(XENMEM_decrease_reservation, &reservation);