The G bit in a RISC-V PTE designates a "global" mapping; i.e. a virtual
address mapping that is valid across all contexts. Applying this bit to
kernel mappings offers a small performance benefit as it allows these
translations to be preserved during a normal TLB flush, for example
during a context switch.
This bit is applied to all L1 kernel PTEs, and only these. The spec
declares that the global bit can be set at any level, and is inherited
by all children. Applying it at this level yields the smallest and
simplest diff.
Use of the feature is toggleable via hw.pmap.global_bit_enable tunable.