[PATCH] x86/dom0: enable pf-fixup by default for PVH dom0

Roger Pau Monne posted 1 patch 3 weeks, 1 day ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20260508090911.51941-1-roger.pau@citrix.com
There is a newer version of this series
docs/misc/xen-command-line.pandoc | 2 +-
xen/arch/x86/hvm/emulate.c        | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
[PATCH] x86/dom0: enable pf-fixup by default for PVH dom0
Posted by Roger Pau Monne 3 weeks, 1 day ago
A non-trivial amount of issues related to PVH dom0 are fixed by enabling
the `pf-fixup` command line option, and no issues have been reported as a
result of its usage.  Enable the option by default to make PVH dom0 more
robust in its default configuration.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
 docs/misc/xen-command-line.pandoc | 2 +-
 xen/arch/x86/hvm/emulate.c        | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/docs/misc/xen-command-line.pandoc b/docs/misc/xen-command-line.pandoc
index 6c77129732bf..0cbac1093928 100644
--- a/docs/misc/xen-command-line.pandoc
+++ b/docs/misc/xen-command-line.pandoc
@@ -849,7 +849,7 @@ Controls for how dom0 is constructed on x86 systems.
     If using this option is necessary to fix an issue, please report a bug.
 
 *   The `pf-fixup` boolean is only applicable when using a PVH dom0 and
-    defaults to false.
+    defaults to true.
 
     When running dom0 in PVH mode the dom0 kernel has no way to map MMIO
     regions into its physical memory map, such mode relies on Xen dom0 builder
diff --git a/xen/arch/x86/hvm/emulate.c b/xen/arch/x86/hvm/emulate.c
index f3aae158e9f8..bb1bb03ac4e9 100644
--- a/xen/arch/x86/hvm/emulate.c
+++ b/xen/arch/x86/hvm/emulate.c
@@ -165,7 +165,7 @@ void hvmemul_cancel(struct vcpu *v)
     hvmemul_cache_disable(v);
 }
 
-bool __ro_after_init opt_dom0_pf_fixup;
+bool __ro_after_init opt_dom0_pf_fixup = true;
 static int hwdom_fixup_p2m(paddr_t addr)
 {
     unsigned long gfn = paddr_to_pfn(addr);
-- 
2.53.0


Re: [PATCH] x86/dom0: enable pf-fixup by default for PVH dom0
Posted by Jan Beulich 3 weeks, 1 day ago
On 08.05.2026 11:09, Roger Pau Monne wrote:
> --- a/docs/misc/xen-command-line.pandoc
> +++ b/docs/misc/xen-command-line.pandoc
> @@ -849,7 +849,7 @@ Controls for how dom0 is constructed on x86 systems.
>      If using this option is necessary to fix an issue, please report a bug.
>  
>  *   The `pf-fixup` boolean is only applicable when using a PVH dom0 and
> -    defaults to false.
> +    defaults to true.
>  
>      When running dom0 in PVH mode the dom0 kernel has no way to map MMIO
>      regions into its physical memory map, such mode relies on Xen dom0 builder

While this paragraph is okay to keep as is, imo the last paragraph concerning
this option would want re-wording to reflect the changed default. Plus, as
indicated on Matrix, add a hint that people needing to use this option (in its
negative form) should report that fact (and relevant details).

Jan