public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH kvm-unit-test] x86/emulator: Fix inline assembler warning
@ 2015-03-09 18:16 Jan Kiszka
  2015-03-13  1:13 ` Marcelo Tosatti
  0 siblings, 1 reply; 2+ messages in thread
From: Jan Kiszka @ 2015-03-09 18:16 UTC (permalink / raw)
  To: kvm

Code compiles to the same binary, but now with one warning less.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 x86/emulator.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/x86/emulator.c b/x86/emulator.c
index 0964e6a..e5c1c6b 100644
--- a/x86/emulator.c
+++ b/x86/emulator.c
@@ -838,7 +838,7 @@ static void test_jmp_noncanonical(uint64_t *mem)
 
 	exceptions = 0;
 	handle_exception(GP_VECTOR, advance_rip_by_3_and_note_exception);
-	asm volatile ("jmp %0" : : "m"(*mem));
+	asm volatile ("jmp *%0" : : "m"(*mem));
 	report("jump to non-canonical address", exceptions == 1);
 	handle_exception(GP_VECTOR, 0);
 }
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH kvm-unit-test] x86/emulator: Fix inline assembler warning
  2015-03-09 18:16 [PATCH kvm-unit-test] x86/emulator: Fix inline assembler warning Jan Kiszka
@ 2015-03-13  1:13 ` Marcelo Tosatti
  0 siblings, 0 replies; 2+ messages in thread
From: Marcelo Tosatti @ 2015-03-13  1:13 UTC (permalink / raw)
  To: Jan Kiszka; +Cc: kvm

On Mon, Mar 09, 2015 at 07:16:59PM +0100, Jan Kiszka wrote:
> Code compiles to the same binary, but now with one warning less.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  x86/emulator.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/x86/emulator.c b/x86/emulator.c
> index 0964e6a..e5c1c6b 100644
> --- a/x86/emulator.c
> +++ b/x86/emulator.c
> @@ -838,7 +838,7 @@ static void test_jmp_noncanonical(uint64_t *mem)
>  
>  	exceptions = 0;
>  	handle_exception(GP_VECTOR, advance_rip_by_3_and_note_exception);
> -	asm volatile ("jmp %0" : : "m"(*mem));
> +	asm volatile ("jmp *%0" : : "m"(*mem));
>  	report("jump to non-canonical address", exceptions == 1);
>  	handle_exception(GP_VECTOR, 0);
>  }
> -- 
> 2.1.4

Applied, thanks.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-03-13  1:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-03-09 18:16 [PATCH kvm-unit-test] x86/emulator: Fix inline assembler warning Jan Kiszka
2015-03-13  1:13 ` Marcelo Tosatti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox