Files
xen/tools/libxl/libxl_arm.h
T
Shannon Zhao 38cd0664a6 libxl/arm: Add the size of ACPI tables to maxmem
Here it adds the ACPI tables size to set the target maxmem to avoid
providing less available memory for guest.

Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Acked-by: Wei Liu <wei.liu2@citrix.com>
2016-09-30 11:47:27 +01:00

49 lines
1.4 KiB
C

/*
* Copyright (C) 2016 Linaro Ltd.
*
* Author: Shannon Zhao <shannon.zhao@linaro.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published
* by the Free Software Foundation; version 2.1 only. with the special
* exception on linking described in file LICENSE.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*/
#include "libxl_internal.h"
#include "libxl_arch.h"
#include <xc_dom.h>
_hidden
int libxl__prepare_acpi(libxl__gc *gc, libxl_domain_build_info *info,
struct xc_dom_image *dom);
_hidden
int libxl__get_acpi_size(libxl__gc *gc,
const libxl_domain_build_info *info,
uint64_t *out);
static inline uint64_t libxl__compute_mpdir(unsigned int cpuid)
{
/*
* According to ARM CPUs bindings, the reg field should match
* the MPIDR's affinity bits. We will use AFF0 and AFF1 when
* constructing the reg value of the guest at the moment, for it
* is enough for the current max vcpu number.
*/
return (cpuid & 0x0f) | (((cpuid >> 4) & 0xff) << 8);
}
/*
* Local variables:
* mode: C
* c-basic-offset: 4
* indent-tabs-mode: nil
* End:
*/