kvm-unit-tests: minor: remove unused variable
PATCH 1/1 kvm-unit-tests: minor: remove unused variable
Remove unused variable to get rid of compiler warning. And remove commented out code (it can always be restored from git logs).
Signed-off-by Eugene Korenevsky <[email protected]>
--- x86/vmx_tests.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)
x86/vmx_tests.c +3 -7
@@ -1439,12 +1439,10 @@ static int dbgctls_init(struct vmcs *vmcs)static void dbgctls_main (void ) { -u64 dr7, debugctl; +u64 dr7; asmvolatile ("mov %%dr7,%0" :"=r" (dr7)); - debugctl =rdmsr (MSR_IA32_DEBUGCTLMSR ); -/* Commented out: KVM does not support DEBUGCTL so far */ -report ("Load debug controls" , dr7 ==0x404 /* && debugctl == 0x2 */ ); +report ("Load debug controls" , dr7 ==0x404 ); dr7 =0x408 ; asmvolatile ("mov %0,%%dr7" : :"r" (dr7));
@@ -1463,9 +1461,7 @@ static void dbgctls_main(void)vmcall (); asmvolatile ("mov %%dr7,%0" :"=r" (dr7)); - debugctl =rdmsr (MSR_IA32_DEBUGCTLMSR ); -/* Commented out: KVM does not support DEBUGCTL so far */ -report ("Guest=host debug controls" , dr7 ==0x402 /* && debugctl == 0x1 */ ); +report ("Guest=host debug controls" , dr7 ==0x402 ); dr7 =0x408 ; asmvolatile ("mov %0,%%dr7" : :"r" (dr7));
Signature · 1 line
2.0.4
Paolo Bonzini
maintainerQuoted 3 lines · Eugene Korenevsky
Remove unused variable to get rid of compiler warning. And remove commented out code (it can always be restored from git logs).
This is also specifying that the behavior is incorrect. It should be changed to an XFAIL instead.
Paolo
Quoted 36 lines
Signed-off-by Eugene Korenevsky <[email protected]>--- x86/vmx_tests.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-)x86/vmx_tests.c +3
-7@@ -1439,12 +1439,10 @@ static int dbgctls_init(struct vmcs *vmcs)static void dbgctls_main (void ) { -u64 dr7, debugctl; +u64 dr7; asmvolatile ("mov %%dr7,%0" :"=r" (dr7)); - debugctl =rdmsr (MSR_IA32_DEBUGCTLMSR ); -/* Commented out: KVM does not support DEBUGCTL so far */ -report ("Load debug controls" , dr7 ==0x404 /* && debugctl == 0x2 */ ); +report ("Load debug controls" , dr7 ==0x404 ); dr7 =0x408 ; asmvolatile ("mov %0,%%dr7" : :"r" (dr7));@@ -1463,9 +1461,7 @@ static void dbgctls_main(void)vmcall (); asmvolatile ("mov %%dr7,%0" :"=r" (dr7)); - debugctl =rdmsr (MSR_IA32_DEBUGCTLMSR ); -/* Commented out: KVM does not support DEBUGCTL so far */ -report ("Guest=host debug controls" , dr7 ==0x402 /* && debugctl == 0x1 */ ); +report ("Guest=host debug controls" , dr7 ==0x402 ); dr7 =0x408 ; asmvolatile ("mov %0,%%dr7" : :"r" (dr7));