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

Re: [Xen-devel] [PATCH 22/34] x86/mm: put HVM only code under CONFIG_HVM



On 8/17/18 6:12 PM, Wei Liu wrote:
> Going through the code, nested EPT, EPT, and ALTP2M depend on HVM code. Put
> these components under CONFIG_HVM. This further requires putting one
> of the vm event under CONFIG_HVM.
> 
> Also make hap_enabled evaluate to false when !CONFIG_HVM. This in turn
> requires marking a variable in p2m_set_entry as __maybe_unused.
> 
> Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
> ---
>  xen/arch/x86/mm/Makefile         |  5 +++--
>  xen/arch/x86/mm/hap/Makefile     |  2 +-
>  xen/arch/x86/mm/p2m.c            | 17 ++++++++++-------
>  xen/common/vm_event.c            |  2 ++
>  xen/include/asm-x86/hvm/domain.h |  4 ++++
>  5 files changed, 20 insertions(+), 10 deletions(-)
> 
> diff --git a/xen/arch/x86/mm/Makefile b/xen/arch/x86/mm/Makefile
> index 3017119..156a321 100644
> --- a/xen/arch/x86/mm/Makefile
> +++ b/xen/arch/x86/mm/Makefile
> @@ -2,8 +2,9 @@ subdir-y += shadow
>  subdir-y += hap
>  
>  obj-y += paging.o
> -obj-y += p2m.o p2m-pt.o p2m-ept.o p2m-pod.o
> -obj-y += altp2m.o
> +obj-y += p2m.o p2m-pt.o p2m-pod.o
> +obj-$(CONFIG_HVM) += p2m-ept.o
> +obj-$(CONFIG_HVM) += altp2m.o

I am able to compile xen.gz by running make in xen/ with no issues with
the following patch applied:

diff --git a/xen/arch/x86/mm/altp2m.c b/xen/arch/x86/mm/altp2m.c
index 930bdc2669..b2867fdaf7 100644
--- a/xen/arch/x86/mm/altp2m.c
+++ b/xen/arch/x86/mm/altp2m.c
@@ -15,8 +15,6 @@
  * this program; If not, see <http://www.gnu.org/licenses/>.
  */

-#include <asm/hvm/support.h>
-#include <asm/hvm/hvm.h>
 #include <asm/p2m.h>
 #include <asm/altp2m.h>

So I wonder if those includes are simply leftovers that, once removed,
would simplify your patch.


Thanks,
Razvan

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.