[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH v3 3/3] x86: move {clear_,copy_,scrub-}page.S to arch-specific library


  • To: "xen-devel@xxxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Jan Beulich <jbeulich@xxxxxxxx>
  • Date: Tue, 16 Dec 2025 10:18:30 +0100
  • Autocrypt: addr=jbeulich@xxxxxxxx; keydata= xsDiBFk3nEQRBADAEaSw6zC/EJkiwGPXbWtPxl2xCdSoeepS07jW8UgcHNurfHvUzogEq5xk hu507c3BarVjyWCJOylMNR98Yd8VqD9UfmX0Hb8/BrA+Hl6/DB/eqGptrf4BSRwcZQM32aZK 7Pj2XbGWIUrZrd70x1eAP9QE3P79Y2oLrsCgbZJfEwCgvz9JjGmQqQkRiTVzlZVCJYcyGGsD /0tbFCzD2h20ahe8rC1gbb3K3qk+LpBtvjBu1RY9drYk0NymiGbJWZgab6t1jM7sk2vuf0Py O9Hf9XBmK0uE9IgMaiCpc32XV9oASz6UJebwkX+zF2jG5I1BfnO9g7KlotcA/v5ClMjgo6Gl MDY4HxoSRu3i1cqqSDtVlt+AOVBJBACrZcnHAUSuCXBPy0jOlBhxPqRWv6ND4c9PH1xjQ3NP nxJuMBS8rnNg22uyfAgmBKNLpLgAGVRMZGaGoJObGf72s6TeIqKJo/LtggAS9qAUiuKVnygo 3wjfkS9A3DRO+SpU7JqWdsveeIQyeyEJ/8PTowmSQLakF+3fote9ybzd880fSmFuIEJldWxp Y2ggPGpiZXVsaWNoQHN1c2UuY29tPsJgBBMRAgAgBQJZN5xEAhsDBgsJCAcDAgQVAggDBBYC AwECHgECF4AACgkQoDSui/t3IH4J+wCfQ5jHdEjCRHj23O/5ttg9r9OIruwAn3103WUITZee e7Sbg12UgcQ5lv7SzsFNBFk3nEQQCACCuTjCjFOUdi5Nm244F+78kLghRcin/awv+IrTcIWF hUpSs1Y91iQQ7KItirz5uwCPlwejSJDQJLIS+QtJHaXDXeV6NI0Uef1hP20+y8qydDiVkv6l IreXjTb7DvksRgJNvCkWtYnlS3mYvQ9NzS9PhyALWbXnH6sIJd2O9lKS1Mrfq+y0IXCP10eS FFGg+Av3IQeFatkJAyju0PPthyTqxSI4lZYuJVPknzgaeuJv/2NccrPvmeDg6Coe7ZIeQ8Yj t0ARxu2xytAkkLCel1Lz1WLmwLstV30g80nkgZf/wr+/BXJW/oIvRlonUkxv+IbBM3dX2OV8 AmRv1ySWPTP7AAMFB/9PQK/VtlNUJvg8GXj9ootzrteGfVZVVT4XBJkfwBcpC/XcPzldjv+3 HYudvpdNK3lLujXeA5fLOH+Z/G9WBc5pFVSMocI71I8bT8lIAzreg0WvkWg5V2WZsUMlnDL9 mpwIGFhlbM3gfDMs7MPMu8YQRFVdUvtSpaAs8OFfGQ0ia3LGZcjA6Ik2+xcqscEJzNH+qh8V m5jjp28yZgaqTaRbg3M/+MTbMpicpZuqF4rnB0AQD12/3BNWDR6bmh+EkYSMcEIpQmBM51qM EKYTQGybRCjpnKHGOxG0rfFY1085mBDZCH5Kx0cl0HVJuQKC+dV2ZY5AqjcKwAxpE75MLFkr wkkEGBECAAkFAlk3nEQCGwwACgkQoDSui/t3IH7nnwCfcJWUDUFKdCsBH/E5d+0ZnMQi+G0A nAuWpQkjM1ASeQwSHEeAWPgskBQL
  • Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Tue, 16 Dec 2025 09:18:35 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

These are pretty similar to the standard library memset() / memcpy().

Switch to building scrub-page.S unconditionally; the linker will simply
not pick it up when not needed.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
---
v3: New.
---
While moving I noticed that the files here have .file at the top, while
mem{cpy,set}.S don't. There not being any static symbols, likely we could
omit the directives here, too? Or should mem{cpy,set}.S gain them?
---
 xen/arch/x86/Makefile                           | 3 ---
 xen/arch/x86/lib/Makefile                       | 3 +++
 xen/arch/x86/{clear_page.S => lib/clear-page.S} | 0
 xen/arch/x86/{copy_page.S => lib/copy-page.S}   | 0
 xen/arch/x86/{ => lib}/scrub-page.S             | 0
 5 files changed, 3 insertions(+), 3 deletions(-)
 rename xen/arch/x86/{clear_page.S => lib/clear-page.S} (100%)
 rename xen/arch/x86/{copy_page.S => lib/copy-page.S} (100%)
 rename xen/arch/x86/{ => lib}/scrub-page.S (100%)

diff --git a/xen/arch/x86/Makefile b/xen/arch/x86/Makefile
index 43117c88e59d..1fc651146f10 100644
--- a/xen/arch/x86/Makefile
+++ b/xen/arch/x86/Makefile
@@ -17,8 +17,6 @@ obj-y += apic.o
 obj-y += bhb-thunk.o
 obj-y += bitops.o
 obj-bin-y += bzimage.init.o
-obj-bin-y += clear_page.o
-obj-bin-y += copy_page.o
 obj-y += cpu-policy.o
 obj-y += cpuid.o
 obj-$(CONFIG_PV) += compat.o
@@ -57,7 +55,6 @@ obj-y += pci.o
 obj-y += physdev.o
 obj-$(CONFIG_COMPAT) += x86_64/physdev.o
 obj-$(CONFIG_X86_PSR) += psr.o
-obj-bin-$(CONFIG_DEBUG) += scrub-page.o
 obj-y += setup.o
 obj-y += shutdown.o
 obj-y += smp.o
diff --git a/xen/arch/x86/lib/Makefile b/xen/arch/x86/lib/Makefile
index a5169f5e19c1..b9a65c662a56 100644
--- a/xen/arch/x86/lib/Makefile
+++ b/xen/arch/x86/lib/Makefile
@@ -1,5 +1,8 @@
+lib-y += clear-page.o
 lib-y += copy-guest.o
+lib-y += copy-page.o
 lib-y += copy-unsafe.o
 lib-y += generic-hweightl.o
 lib-y += memcpy.o
 lib-y += memset.o
+lib-y += scrub-page.o
diff --git a/xen/arch/x86/clear_page.S b/xen/arch/x86/lib/clear-page.S
similarity index 100%
rename from xen/arch/x86/clear_page.S
rename to xen/arch/x86/lib/clear-page.S
diff --git a/xen/arch/x86/copy_page.S b/xen/arch/x86/lib/copy-page.S
similarity index 100%
rename from xen/arch/x86/copy_page.S
rename to xen/arch/x86/lib/copy-page.S
diff --git a/xen/arch/x86/scrub-page.S b/xen/arch/x86/lib/scrub-page.S
similarity index 100%
rename from xen/arch/x86/scrub-page.S
rename to xen/arch/x86/lib/scrub-page.S




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.