Debian Codegraph @

debian/tree/xen-hypervisor-common/etc/default/grub.d/xen.cfg

raw
1 # When running update-grub with the Xen hypervisor installed, there are
2 # some additional variables that can be used to pass options to the
3 # hypervisor or the dom0 kernel.
4 #
5 # The configuration in here makes it possible to have different options set
6 # for the linux kernel when booting with or without Xen.
7
8 echo "Including Xen overrides from /etc/default/grub.d/xen.cfg" >&2
9
10 #######################################################################
11 # Xen Hypervisor Command Line Options
12 #
13 # The first two options are used to generate arguments for the hypervisor.
14 # Commonly used options are:
15 #
16 # dom0_mem=<size> (for arm)
17 # dom0_mem=<size>,max:<size> (for x86)
18 # Sets the amount of memory dom0 uses to a fixed size. All other memory
19 # will be usable for domUs. For x86, this prevents ballooning actions
20 # from happening to take away memory from the dom0 or return it back. For
21 # arm, setting this option is required. E.g. (for x86) dom0_mem=4G,max:4G
22 #
23 # dom0_max_vcpus=<min>-<max>
24 # Limits the amount of physical cpus that dom0 is using, so it will not
25 # try to be scheduled on all available cpus all the time. Xen will try to
26 # provide the maximum value of vcpus, but will also gracefully deal with
27 # a situation of hotplugging physical cpus and reduce the number of vcpus
28 # instead of oversubscribing the system. E.g. dom0_max_vcpus=1-4
29 #
30 # com[12]=<speed>,<data bits><parity><stopbits>
31 # Initialize a serial console for the hypervisor. Note that com1 would be
32 # ttyS0 in Linux when running without Xen. E.g. com1=115200,8n1
33 #
34 # console=<dev>[,<dev> ...]
35 # Specify which console(s) Xen should use. E.g. console=com1,vga
36 #
37 # xpti=dom0=<bool>,domu=<bool> (only for x86)
38 # Override default selection of whether to isolate 64-bit PV guest page
39 # tables. If the dom0 is only used for managing domUs, and no untrusted
40 # code is ran inside, xpti for dom0 can be turned off for performance
41 # reasons. E.g. xpti=dom0=false,domu=true
42 #
43 # noreboot=true
44 # Do not automatically reboot after an error. This is useful for catching
45 # debug output.
46 #
47 # ucode=scan (only for x86)
48 # Scan the multiboot images mentioned in grub configuration for an cpio image
49 # that contains cpu microcode. This enables loading microcode that is stored
50 # in the dom0 initrd.img.
51 #
52 # Please also refer to the "Xen Hypervisor Command Line Options"
53 # documentation for the version of Xen you have installed. This
54 # documentation can be found at https://xenbits.xen.org/
55 #
56 #GRUB_CMDLINE_XEN_DEFAULT=""
57 #GRUB_CMDLINE_XEN=""
58
59 #######################################################################
60 # Dom0 Kernel Command Line Options
61 #
62 # The next options are used for creating kernel arguments for the dom0
63 # kernel. This allows to have different options for the same kernel used
64 # natively or as dom0 kernel.
65 #
66 # For example:
67 #
68 # earlyprintk=xen
69 # Allows to send early printk messages to the Xen hypervisor console
70 #
71 # console=hvc0
72 # Redirects the Linux console to the hypervisor console. When running
73 # under Xen as dom0, this needs to be specified, because the usual ttyS0
74 # will not be available. When viewing the serial console, pressing Ctrl-A
75 # three times will switch between the Linux dom0 and the Xen Hypervisor.
76 #
77 #GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT"
78 #GRUB_CMDLINE_LINUX_XEN_REPLACE="$GRUB_CMDLINE_LINUX"
79
80 # Make booting into Xen the default. Set the following variable to 0 or 1
81 # explicitly to avoid the message warning from being printed.
82 #
83 #XEN_OVERRIDE_GRUB_DEFAULT=
84 #
85 if [ "$XEN_OVERRIDE_GRUB_DEFAULT" = "" ]; then
86 grub_warn "GRUB_DEFAULT changed to boot into Xen by default!" \
87 "Edit /etc/default/grub.d/xen.cfg to avoid this warning."
88 XEN_OVERRIDE_GRUB_DEFAULT=1
89 fi
90 if [ "$XEN_OVERRIDE_GRUB_DEFAULT" = "1" ]; then
91 GRUB_DEFAULT=$( \
92 printf "$(gettext "%s, with Xen hypervisor")" \
93 "$GRUB_DISTRIBUTOR GNU/Linux")
94 fi