Il 04/01/2014 18:59, Jan Kiszka ha scritto:
From: Jan Kiszka <[email protected]>

Some compiler versions (seen with gcc 4.8.1) move the resume label after
the return statement which, of course, causes sever problems.

Can you include the assembly output? Do you mean after the "ret" instruction?

The return should not be needed except for the rule that a label must be followed by a statement. But I would not except any difference between a ";" and a barrier in this case.

Paolo

Signed-off-by: Jan Kiszka <[email protected]>
---
 x86/vmx.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/x86/vmx.c b/x86/vmx.c
index a475aec..f9d5493 100644
--- a/x86/vmx.c
+++ b/x86/vmx.c
@@ -563,7 +563,7 @@ static void do_vmxon_off(void)
        vmx_on();
        vmx_off();
 resume:
-       return;
+       barrier();
 }

 static void do_write_feature_control(void)
@@ -572,7 +572,7 @@ static void do_write_feature_control(void)
        barrier();
        wrmsr(MSR_IA32_FEATURE_CONTROL, 0);
 resume:
-       return;
+       barrier();
 }

 static int test_vmx_feature_control(void)


--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to