Dom0 is using this value for sizing its maptrack table.
-### global-pages (x86)
-> `= <boolean>`
+### global-pages
+ = <boolean>
+
+ Applicability: x86
+ Default: true unless running virtualized on AMD or Hygon hardware
-> Default: `true` unless running virtualized on AMD or Hygon hardware
+Control whether to use global pages for PV guests, and thus the need to
+perform TLB flushes by writing to CR4. This is a performance trade-off.
-Set whether the PGE bit in CR4 will be enabled for PV guests. This controls the
-usage of global pages, and thus the need to perform tlb flushes by writing to
-CR4.
+AMD SVM does not support selective trapping of CR4 writes, which means that a
+global TLB flush (two CR4 writes) takes two VMExits, and massively outweigh
+the benefit of using global pages to begin with. This case is easy for Xen to
+spot, and is accounted for in the default setting.
-Note it's disabled by default when running virtualized on AMD or Hygon hardware
-since AMD SVM doesn't support selective trapping of CR4, so global pages are
-not enabled in order to reduce the overhead of TLB flushes.
+Other cases where this option might be a benefit is on VT-x hardware when
+selective CR4 writes are not supported/enabled by the hypervisor, or in any
+virtualised case using shadow paging. These are not easy for Xen to spot, so
+are not accounted for in the default setting.
### guest_loglvl
> `= <level>[/<rate-limited level>]` where level is `none | error | warning | info | debug | all`
{
if ( opt_global_pages == -1 )
opt_global_pages = !cpu_has_hypervisor ||
- (boot_cpu_data.x86_vendor &
- (X86_VENDOR_AMD | X86_VENDOR_HYGON));
+ !(boot_cpu_data.x86_vendor &
+ (X86_VENDOR_AMD | X86_VENDOR_HYGON));
return 0;
}