From 7469f4dcc0a7564ae68b76e6500b6fa40dfae1e9 Mon Sep 17 00:00:00 2001 From: Pekka Enberg Date: Wed, 14 Jul 2010 15:20:21 +0300 Subject: [PATCH] kvm: Use 32-bit operand size prefix for rdfs8() E820 memory map resides in EBDA region which starts at address 0x9fc00 which doesn't fit in 16 bits. Therefore, use 'addr32' operand size prefix to fix the following error: bios/e820.c: Assembler messages: bios/e820.c:14: Warning: 654336 shortened to 64512 Acked-by: Cyrill Gorcunov Signed-off-by: Pekka Enberg --- tools/kvm/bios/e820.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/kvm/bios/e820.c b/tools/kvm/bios/e820.c index 4032871849a8..6f00cb6848ed 100644 --- a/tools/kvm/bios/e820.c +++ b/tools/kvm/bios/e820.c @@ -11,7 +11,9 @@ static inline void outb(uint8_t v, uint16_t port) static inline uint8_t rdfs8(unsigned long addr) { uint8_t v; - asm volatile("movb %%fs:%1,%0" : "=q" (v) : "m" (*(uint8_t *)addr)); + + asm volatile("addr32 movb %%fs:%1,%0" : "=q" (v) : "m" (*(uint8_t *)addr)); + return v; } -- 2.39.5