Skip to contentSkip to conversation

KVM: x86 emulator: code style cleanup

PATCH Applied Wei Yongjun 3 participants 6 messages Feb 11, 2010

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

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
index 31f4526..8a52616 100644
@@ -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
#1 lore raw
Quoted 12 lines · Wei Yongjun

Just remove redundant semicolon.

---
 arch/x86/kvm/emulate.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kvm/emulate.c +0 -0
index 31f4526..8a52616 100644

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.

#2 lore raw
Quoted 16 lines · Gleb Natapov
Quoted 14 lines · Wei Yongjun

Just remove redundant semicolon.

---
  arch/x86/kvm/emulate.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kvm/emulate.c +0 -0
index 31f4526..8a52616 100644
@@ -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 -1
  	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?

If we reenter the guest the cpu will inject #UD by itself.

Signature · 1 line
error compiling committee.c: too many arguments to function
Applied
#5 lore raw
In reply to Wei Yongjun
Quoted 3 lines · Wei Yongjun

Just remove redundant semicolon.

Applied, thanks.

Signature · 1 line
error compiling committee.c: too many arguments to function
#3 lore raw
In reply to Avi Kivity
Quoted 25 lines · Avi Kivity
Quoted 15 lines · Gleb Natapov
Quoted 14 lines · Wei Yongjun

Just remove redundant semicolon.

---
 arch/x86/kvm/emulate.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kvm/emulate.c +0 -0
index 31f4526..8a52616 100644
@@ -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 -1
 	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 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.

#4 lore raw
Quoted 30 lines · Gleb Natapov
Quoted 28 lines · Avi Kivity
Quoted 26 lines · Gleb Natapov
Quoted 13 lines · Wei Yongjun

Just remove redundant semicolon.

---
  arch/x86/kvm/emulate.c |    2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kvm/emulate.c +0 -0
index 31f4526..8a52616 100644

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?

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