[PATCH v3] x86/boot: Setup correctly fs segment for bogus_real_magic

Frediano Ziglio posted 1 patch 11 months, 3 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://gitlab.com/xen-project/patchew/xen tags/patchew/20241111132823.21658-1-frediano.ziglio@cloud.com
xen/arch/x86/boot/wakeup.S | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
[PATCH v3] x86/boot: Setup correctly fs segment for bogus_real_magic
Posted by Frediano Ziglio 11 months, 3 weeks ago
bogus_real_magic code uses fs segment so it should be initialised.

Fixes: d8c8fef09054 ("Provide basic Xen PM infrastructure")
Signed-off-by: Frediano Ziglio <frediano.ziglio@cloud.com>
---
Changes since v1:
- added "Fixes" comment;
- add initialisation, do not remove old one.

Changes since v2:
- move initialisation in bogus_real_magic.
---
 xen/arch/x86/boot/wakeup.S | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/xen/arch/x86/boot/wakeup.S b/xen/arch/x86/boot/wakeup.S
index 08447e1934..ff138314f5 100644
--- a/xen/arch/x86/boot/wakeup.S
+++ b/xen/arch/x86/boot/wakeup.S
@@ -77,8 +77,11 @@ check_vesaw:
         ret
 
 bogus_real_magic:
+        movw    $0xb800, %ax
+        movw    %ax, %fs
+1:
         movw    $0x0e00 + 'B', %fs:(0x12)
-        jmp     bogus_real_magic
+        jmp     1b
 
         .align 4
 real_magic:     .long 0x12345678
-- 
2.34.1
Re: [PATCH v3] x86/boot: Setup correctly fs segment for bogus_real_magic
Posted by Jan Beulich 11 months, 3 weeks ago
On 11.11.2024 14:28, Frediano Ziglio wrote:
> bogus_real_magic code uses fs segment so it should be initialised.
> 
> Fixes: d8c8fef09054 ("Provide basic Xen PM infrastructure")
> Signed-off-by: Frediano Ziglio <frediano.ziglio@cloud.com>

Reviewed-by: Jan Beulich <jbeulich@suse.com>