Hi Andrew,

On 09.12.25 17:57, Andrew Cooper wrote:
The variable is never 0, but because the writes into it are hidden behind the
HYPERVISOR_COMPAT_VIRT_START() macro, it does a good impression of appearing
to be 0.

No functional change.

Signed-off-by: Andrew Cooper <[email protected]>
---
CC: Jan Beulich <[email protected]>
CC: Roger Pau MonnĂ© <[email protected]>
CC: Grygorii Strashko <[email protected]>
---
  xen/arch/x86/domain.c        | 2 +-
  xen/arch/x86/pv/dom0_build.c | 2 +-
  2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/xen/arch/x86/domain.c b/xen/arch/x86/domain.c
index bd75d044a01b..d33a42c8824c 100644
--- a/xen/arch/x86/domain.c
+++ b/xen/arch/x86/domain.c
@@ -891,7 +891,7 @@ int arch_domain_create(struct domain *d,
      d->arch.emulation_flags = emflags;
#ifdef CONFIG_PV32
-    HYPERVISOR_COMPAT_VIRT_START(d) =
+    d->arch.hv_compat_vstart =
          is_pv_domain(d) ? __HYPERVISOR_COMPAT_VIRT_START : ~0u;
  #endif

Any chances it can be moved in pv_domain_initialise()?

diff --git a/xen/arch/x86/pv/dom0_build.c b/xen/arch/x86/pv/dom0_build.c
index 21158ce1812e..fed03dc15dcf 100644
--- a/xen/arch/x86/pv/dom0_build.c
+++ b/xen/arch/x86/pv/dom0_build.c
@@ -521,7 +521,7 @@ static int __init dom0_construct(const struct boot_domain 
*bd)
                  printk("Dom0 expects too high a hypervisor start address\n");
                  return -ERANGE;
              }
-            HYPERVISOR_COMPAT_VIRT_START(d) =
+            d->arch.hv_compat_vstart =
                  max_t(unsigned int, m2p_compat_vstart, value);
          }


Thank you.

--
Best regards,
-grygorii


Reply via email to