mirror of
https://github.com/xen-project/xen.git
synced 2026-10-29 18:50:05 +01:00
PVH guests with 4GB of RAM or more get a memory map like the following: 0x00000000000000 - 0x000000fee00000 RAM 0x000000fee00000 - 0x00000100000000 RESERVED 0x000000fc009000 - 0x000000fc009040 ACPI 0x000000fc000000 - 0x000000fc001000 ACPI 0x000000fc001000 - 0x000000fc009000 ACPI 0x00000100000000 - 0x000001fb200400 RAM This is wrong because ACPI regions overlap with RAM regions. The cause of this issue is not setting a big enough MMIO hole and marking the whole MMIO hole as reserved, when it actually contains several pieces: - local APIC page. - ACPI tables. - HVM special pages. Of those items only HVM special pages need to be marked as reserved in order to advise the guest against using them for example for memory hotplug. After the fix the layout reported for the same guest is: 0x00000000000000 - 0x000000fc000000 RAM 0x000000feff8000 - 0x000000ff000000 RESERVED 0x000000fc009000 - 0x000000fc009040 ACPI 0x000000fc000000 - 0x000000fc001000 ACPI 0x000000fc001000 - 0x000000fc009000 ACPI 0x00000100000000 - 0x000001fe000400 RAM Signed-off-by: Roger Pau Monné <roger.pau@citrix.com> Release-acked-by: Juergen Gross <jgross@suse.com> Acked-by: Wei Liu <wei.liu2@citrix.com>
87 lines
3.3 KiB
C
87 lines
3.3 KiB
C
/*
|
|
* Copyright (C) 2012 Citrix Ltd.
|
|
*
|
|
* 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.
|
|
*/
|
|
|
|
#ifndef LIBXL_ARCH_H
|
|
#define LIBXL_ARCH_H
|
|
|
|
/* fill the arch specific configuration for the domain */
|
|
_hidden
|
|
int libxl__arch_domain_prepare_config(libxl__gc *gc,
|
|
libxl_domain_config *d_config,
|
|
xc_domain_configuration_t *xc_config);
|
|
|
|
/* save the arch specific configuration for the domain */
|
|
_hidden
|
|
int libxl__arch_domain_save_config(libxl__gc *gc,
|
|
libxl_domain_config *d_config,
|
|
libxl__domain_build_state *state,
|
|
const xc_domain_configuration_t *xc_config);
|
|
|
|
/* arch specific internal domain creation function */
|
|
_hidden
|
|
int libxl__arch_domain_create(libxl__gc *gc, libxl_domain_config *d_config,
|
|
uint32_t domid);
|
|
|
|
/* setup arch specific hardware description, i.e. DTB on ARM */
|
|
_hidden
|
|
int libxl__arch_domain_init_hw_description(libxl__gc *gc,
|
|
libxl_domain_build_info *info,
|
|
libxl__domain_build_state *state,
|
|
struct xc_dom_image *dom);
|
|
/* finalize arch specific hardware description. */
|
|
_hidden
|
|
int libxl__arch_domain_finalise_hw_description(libxl__gc *gc,
|
|
uint32_t domid,
|
|
libxl_domain_config *d_config,
|
|
struct xc_dom_image *dom);
|
|
|
|
/* perform any pending hardware initialization */
|
|
_hidden
|
|
int libxl__arch_build_dom_finish(libxl__gc *gc,
|
|
libxl_domain_build_info *info,
|
|
struct xc_dom_image *dom,
|
|
libxl__domain_build_state *state);
|
|
|
|
/* build vNUMA vmemrange with arch specific information */
|
|
_hidden
|
|
int libxl__arch_vnuma_build_vmemrange(libxl__gc *gc,
|
|
uint32_t domid,
|
|
libxl_domain_build_info *b_info,
|
|
libxl__domain_build_state *state);
|
|
|
|
/* arch specific irq map function */
|
|
_hidden
|
|
int libxl__arch_domain_map_irq(libxl__gc *gc, uint32_t domid, int irq);
|
|
|
|
_hidden
|
|
void libxl__arch_domain_build_info_acpi_setdefault(
|
|
libxl_domain_build_info *b_info);
|
|
|
|
_hidden
|
|
int libxl__arch_extra_memory(libxl__gc *gc,
|
|
const libxl_domain_build_info *info,
|
|
uint64_t *out);
|
|
|
|
#if defined(__i386__) || defined(__x86_64__)
|
|
|
|
#define LAPIC_BASE_ADDRESS 0xfee00000
|
|
#define ACPI_INFO_PHYSICAL_ADDRESS 0xfc000000
|
|
|
|
int libxl__dom_load_acpi(libxl__gc *gc,
|
|
const libxl_domain_build_info *b_info,
|
|
struct xc_dom_image *dom);
|
|
#endif
|
|
|
|
#endif
|