[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] x86/pv: Unhide writes to d->arch.hv_compat_vstart
- To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
- From: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
- Date: Tue, 9 Dec 2025 18:06:09 +0200
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=7ekjQOCbCdvOSvnHkmr+p7Bj7eN/UBCvwHGLisoA8Ds=; b=Nw1QW7zGc1PajyYZ4DZ9PU6KuAJv1G7H5xBKv6qJgtnsSUBXsH/gY1vYgukRe8ONLgZkMTcBzAKc+zVmJImjSG7HZAKBB5SfVLKI8ID7lyqon8JeECWV/Yp7GQmjatXMM420znQOiVAuJFbrF218N3ADx9POVtZs1xWYnOhB4PGI2g18SWTSLlHKHgWK/DkpJX24I/0sZmBs8nqhRtadHgQgWYMcTYszFzAZo+dopatoOeHc3E+FUUYCvH+q03c2e5ZlI6CVwe85XDDy0eoQFhYY3iZmDx0qf2qS0XD+UB0bAHFE4C6R2mhD8Ps6zT1Dz2bA9KhpQYkKmYLd5twyiw==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=IaugGz+5cgUz47SfLFuBxJb8Q8z5jDs2Isoh2HYgEhWj+QjBex3nA6vI9/cWlkhzGiSE56jzyH5vLhHkxFnkQ4/FHFJe6zTymakjerasioxiaoM7SehSASAn0xzCietUYhGW0TnS1ED6TWyjIN7j8sbvaaN2jycjEpPadc6+ru8GFAou5MZwSmSQJCbi/j7lTaCWmdX3laQNo9wNXqLl5Mr6bIv04zvw+Eb+31+ccJ67VtjgLoNJGFNIyMUfbcqq/8eiMJu6GiMEa6lPGIg8yOUBpB88S/a690Oy/RvbURpWK/3iFXlyaBARQp8krF8PwAo3bq0DSV6WEruxzbqE2w==
- Authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=epam.com;
- Cc: Jan Beulich <JBeulich@xxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
- Delivery-date: Tue, 09 Dec 2025 16:06:23 +0000
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
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 <andrew.cooper3@xxxxxxxxxx>
---
CC: Jan Beulich <JBeulich@xxxxxxxx>
CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
CC: Grygorii Strashko <grygorii_strashko@xxxxxxxx>
---
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
|