|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH v4 1/4] xen: XENMEM_exchange should only be used/compiled for arch supporting PV guest
Hi Andrew, On 21/09/2020 20:46, Andrew Cooper wrote: On 21/09/2020 19:02, Julien Grall wrote:From: Julien Grall <jgrall@xxxxxxxxxx> XENMEM_exchange can only be used by PV guest but the check is well hidden in steal_page(). This is because paging_model_external() will return false only for PV domain. To make clearer this is PV only, add a check at the beginning of the implementation. Take the opportunity to compile out the code if CONFIG_PV is not set. This change will also help a follow-up patch where the gmfn_mfn() will be completely removed on arch not supporting the M2P. Signed-off-by: Julien Grall <jgrall@xxxxxxxxxx> --- Jan suggested to #ifdef anything after the check to is_pv_domain(). However, it means to have two block of #ifdef as we can't mix declaration and code. I am actually thinking to move the implementation outside of mm.c in possibly arch/x86 or a pv specific directory under common. Any opinion?arch/x86/pv/mm.c, with the case XENMEM_exchange: moving into arch_memory_op(). However, making this happen is incredibly tangled, and we're years overdue a fix here. Lets go with this for now, and tidying up can come later. Acked-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, however... Thanks!
I didn't drop them because I wasn't sure whether we wanted to cater future arch. Anyway, I am happy to do the cleanup :). Cheers, -- Julien Grall
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |