/* * PVH variables. * * The variable xen_pvh needs to live in a data segment since it is used * after startup_{32|64} is invoked, which will clear the .bss segment.
*/ bool __ro_after_init xen_pvh;
EXPORT_SYMBOL_GPL(xen_pvh);
#ifdef CONFIG_XEN_DOM0 int xen_pvh_setup_gsi(int gsi, int trigger, int polarity)
{ int ret; struct physdev_setup_gsi setup_gsi;
/* * Reserve e820 UNUSABLE regions to inflate the memory balloon. * * On PVH dom0 the host memory map is used, RAM regions available to dom0 are * located as the same place as in the native memory map, but since dom0 gets * less memory than the total amount of host RAM the ranges that can't be * populated are converted from RAM -> UNUSABLE. Use such regions (up to the * ratio signaled in EXTRA_MEM_RATIO) in order to inflate the balloon driver at * boot. Doing so prevents the guest (even if just temporary) from using holes * in the memory map in order to map grants or foreign addresses, and * hopefully limits the risk of a clash with a device MMIO region. Ideally the * hypervisor should notify us which memory ranges are suitable for creating * foreign mappings, but that's not yet implemented.
*/ staticvoid __init pvh_reserve_extra_memory(void)
{ struct boot_params *bootp = &boot_params; unsignedint i, ram_pages = 0, extra_pages;
for (i = 0; i < bootp->e820_entries; i++) { struct boot_e820_entry *e = &bootp->e820_table[i];
/* Max amount of extra memory. */
extra_pages = EXTRA_MEM_RATIO * ram_pages;
/* * Convert UNUSABLE ranges to RAM and reserve them for foreign mapping * purposes.
*/ for (i = 0; i < bootp->e820_entries && extra_pages; i++) { struct boot_e820_entry *e = &bootp->e820_table[i]; unsignedlong pages;
if (xen_initial_domain()) {
xen_add_preferred_consoles();
/* * Disable usage of CPU idle and frequency drivers: when * running as hardware domain the exposed native ACPI tables * causes idle and/or frequency drivers to attach and * malfunction. It's Xen the entity that controls the idle and * frequency states. * * For unprivileged domains the exposed ACPI tables are * fabricated and don't contain such data.
*/
disable_cpuidle();
disable_cpufreq();
WARN_ON(xen_set_default_idle());
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.