KVM: x86 emulator: code style cleanup
PATCH 1/1 KVM: x86 emulator: code style cleanup
Just remove redundant semicolon.
--- arch/x86/kvm/emulate.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kvm/emulate.c +1 -1
@@ -1012,7 +1012,7 @@ done_prefixes: }if (mode ==X86EMUL_MODE_PROT64 && (c->d & No64)) { -kvm_report_emulation_failure (ctxt->vcpu,"invalid x86/64 instruction" );; +kvm_report_emulation_failure (ctxt->vcpu,"invalid x86/64 instruction" );return -1 ; }
Signature · 1 line
1.6.3.3
Quoted 12 lines · Wei Yongjun
Just remove redundant semicolon.
Signed-off-by Wei Yongjun <[email protected]>--- arch/x86/kvm/emulate.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/x86/kvm/emulate.c +0
-0
arch/x86/kvm/emulate.c done_prefixes: · line 1018
Quoted 8 lines
arch/x86/kvm/emulate.c +1
-1@@ -1012,7 +1012,7 @@ done_prefixes: }if (mode ==X86EMUL_MODE_PROT64 && (c->d & No64)) { -kvm_report_emulation_failure (ctxt->vcpu,"invalid x86/64 instruction" );; +kvm_report_emulation_failure (ctxt->vcpu,"invalid x86/64 instruction" );return -1 ; }
Shouldn't we inject #UD here?
--
Gleb.
Quoted 16 lines · Gleb Natapov
Quoted 14 lines · Wei Yongjun
Just remove redundant semicolon.
Signed-off-by Wei Yongjun<[email protected]>--- arch/x86/kvm/emulate.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/x86/kvm/emulate.c +0
-0@@ -1012,7 +1012,7 @@ done_prefixes: }
Quoted 10 lines
arch/x86/kvm/emulate.c done_prefixes: · line 1018
Quoted 7 lines
arch/x86/kvm/emulate.c +1
-1if (mode ==X86EMUL_MODE_PROT64 && (c->d& No64)) { -kvm_report_emulation_failure (ctxt->vcpu,"invalid x86/64 instruction" );; +kvm_report_emulation_failure (ctxt->vcpu,"invalid x86/64 instruction" );return -1 ; }Shouldn't we inject #UD here?
If we reenter the guest the cpu will inject #UD by itself.
Signature · 1 line
error compiling committee.c: too many arguments to function
Avi Kivity
AppliedQuoted 3 lines · Wei Yongjun
Just remove redundant semicolon.
Applied, thanks.
Signature · 1 line
error compiling committee.c: too many arguments to function
Quoted 25 lines · Avi Kivity
Quoted 15 lines · Gleb Natapov
Quoted 14 lines · Wei Yongjun
Just remove redundant semicolon.
Signed-off-by Wei Yongjun<[email protected]>--- arch/x86/kvm/emulate.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/x86/kvm/emulate.c +0
-0@@ -1012,7 +1012,7 @@ done_prefixes: }Quoted 8 lines
arch/x86/kvm/emulate.c done_prefixes: · line 1018
Quoted 6 lines
arch/x86/kvm/emulate.c +1
-1if (mode ==X86EMUL_MODE_PROT64 && (c->d& No64)) { -kvm_report_emulation_failure (ctxt->vcpu,"invalid x86/64 instruction" );; +kvm_report_emulation_failure (ctxt->vcpu,"invalid x86/64 instruction" );return -1 ; }Shouldn't we inject #UD here?
Quoted 2 lines
If we reenter the guest the cpu will inject #UD by itself.
But why rely on that instead of make it explicit? We want to have self contained emulator.
--
Gleb.
Quoted 30 lines · Gleb Natapov
Quoted 28 lines · Avi Kivity
Quoted 26 lines · Gleb Natapov
Quoted 13 lines · Wei Yongjun
Just remove redundant semicolon.
Signed-off-by Wei Yongjun<[email protected]>--- arch/x86/kvm/emulate.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/x86/kvm/emulate.c +0
-0arch/x86/kvm/emulate.c done_prefixes: · line 1018
Quoted 8 lines
arch/x86/kvm/emulate.c +1
-1@@ -1012,7 +1012,7 @@ done_prefixes: }if (mode ==X86EMUL_MODE_PROT64 && (c->d& No64)) { -kvm_report_emulation_failure (ctxt->vcpu,"invalid x86/64 instruction" );; +kvm_report_emulation_failure (ctxt->vcpu,"invalid x86/64 instruction" );return -1 ; }Shouldn't we inject #UD here?
Quoted 7 lines
Quoted 3 lines
If we reenter the guest the cpu will inject #UD by itself.
But why rely on that instead of make it explicit? We want to have self contained emulator.
Good point.
Signature · 1 line
error compiling committee.c: too many arguments to function