All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] KVM: x86 emulator: code style cleanup
@ 2010-02-11  3:12 Wei Yongjun
  2010-02-11 10:00 ` Gleb Natapov
  2010-02-11 10:04 ` Avi Kivity
  0 siblings, 2 replies; 6+ messages in thread
From: Wei Yongjun @ 2010-02-11  3:12 UTC (permalink / raw)
  To: kvm; +Cc: Avi Kivity

Just remove redundant semicolon.

Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
 arch/x86/kvm/emulate.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
index 31f4526..8a52616 100644
--- a/arch/x86/kvm/emulate.c
+++ b/arch/x86/kvm/emulate.c
@@ -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;
 	}
 
-- 
1.6.3.3



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

* Re: [PATCH] KVM: x86 emulator: code style cleanup
  2010-02-11  3:12 [PATCH] KVM: x86 emulator: code style cleanup Wei Yongjun
@ 2010-02-11 10:00 ` Gleb Natapov
  2010-02-11 10:03   ` Avi Kivity
  2010-02-11 10:04 ` Avi Kivity
  1 sibling, 1 reply; 6+ messages in thread
From: Gleb Natapov @ 2010-02-11 10:00 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: kvm, Avi Kivity

On Thu, Feb 11, 2010 at 11:12:07AM +0800, Wei Yongjun wrote:
> Just remove redundant semicolon.
> 
> Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
> ---
>  arch/x86/kvm/emulate.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
> index 31f4526..8a52616 100644
> --- a/arch/x86/kvm/emulate.c
> +++ b/arch/x86/kvm/emulate.c
> @@ -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.

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

* Re: [PATCH] KVM: x86 emulator: code style cleanup
  2010-02-11 10:00 ` Gleb Natapov
@ 2010-02-11 10:03   ` Avi Kivity
  2010-02-11 10:06     ` Gleb Natapov
  0 siblings, 1 reply; 6+ messages in thread
From: Avi Kivity @ 2010-02-11 10:03 UTC (permalink / raw)
  To: Gleb Natapov; +Cc: Wei Yongjun, kvm

On 02/11/2010 12:00 PM, Gleb Natapov wrote:
> On Thu, Feb 11, 2010 at 11:12:07AM +0800, Wei Yongjun wrote:
>    
>> Just remove redundant semicolon.
>>
>> Signed-off-by: Wei Yongjun<yjwei@cn.fujitsu.com>
>> ---
>>   arch/x86/kvm/emulate.c |    2 +-
>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
>> index 31f4526..8a52616 100644
>> --- a/arch/x86/kvm/emulate.c
>> +++ b/arch/x86/kvm/emulate.c
>> @@ -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?
>
>    

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

-- 
error compiling committee.c: too many arguments to function


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

* Re: [PATCH] KVM: x86 emulator: code style cleanup
  2010-02-11  3:12 [PATCH] KVM: x86 emulator: code style cleanup Wei Yongjun
  2010-02-11 10:00 ` Gleb Natapov
@ 2010-02-11 10:04 ` Avi Kivity
  1 sibling, 0 replies; 6+ messages in thread
From: Avi Kivity @ 2010-02-11 10:04 UTC (permalink / raw)
  To: Wei Yongjun; +Cc: kvm

On 02/11/2010 05:12 AM, Wei Yongjun wrote:
> Just remove redundant semicolon.
>
>   

Applied, thanks.

-- 
error compiling committee.c: too many arguments to function


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

* Re: [PATCH] KVM: x86 emulator: code style cleanup
  2010-02-11 10:03   ` Avi Kivity
@ 2010-02-11 10:06     ` Gleb Natapov
  2010-02-11 10:07       ` Avi Kivity
  0 siblings, 1 reply; 6+ messages in thread
From: Gleb Natapov @ 2010-02-11 10:06 UTC (permalink / raw)
  To: Avi Kivity; +Cc: Wei Yongjun, kvm

On Thu, Feb 11, 2010 at 12:03:18PM +0200, Avi Kivity wrote:
> On 02/11/2010 12:00 PM, Gleb Natapov wrote:
> >On Thu, Feb 11, 2010 at 11:12:07AM +0800, Wei Yongjun wrote:
> >>Just remove redundant semicolon.
> >>
> >>Signed-off-by: Wei Yongjun<yjwei@cn.fujitsu.com>
> >>---
> >>  arch/x86/kvm/emulate.c |    2 +-
> >>  1 files changed, 1 insertions(+), 1 deletions(-)
> >>
> >>diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
> >>index 31f4526..8a52616 100644
> >>--- a/arch/x86/kvm/emulate.c
> >>+++ b/arch/x86/kvm/emulate.c
> >>@@ -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?
> >
> 
> 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.

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

* Re: [PATCH] KVM: x86 emulator: code style cleanup
  2010-02-11 10:06     ` Gleb Natapov
@ 2010-02-11 10:07       ` Avi Kivity
  0 siblings, 0 replies; 6+ messages in thread
From: Avi Kivity @ 2010-02-11 10:07 UTC (permalink / raw)
  To: Gleb Natapov; +Cc: Wei Yongjun, kvm

On 02/11/2010 12:06 PM, Gleb Natapov wrote:
> On Thu, Feb 11, 2010 at 12:03:18PM +0200, Avi Kivity wrote:
>    
>> On 02/11/2010 12:00 PM, Gleb Natapov wrote:
>>      
>>> On Thu, Feb 11, 2010 at 11:12:07AM +0800, Wei Yongjun wrote:
>>>        
>>>> Just remove redundant semicolon.
>>>>
>>>> Signed-off-by: Wei Yongjun<yjwei@cn.fujitsu.com>
>>>> ---
>>>>   arch/x86/kvm/emulate.c |    2 +-
>>>>   1 files changed, 1 insertions(+), 1 deletions(-)
>>>>
>>>> diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
>>>> index 31f4526..8a52616 100644
>>>> --- a/arch/x86/kvm/emulate.c
>>>> +++ b/arch/x86/kvm/emulate.c
>>>> @@ -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?
>>>
>>>        
>> 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.

-- 
error compiling committee.c: too many arguments to function


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

end of thread, other threads:[~2010-02-11 10:07 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-11  3:12 [PATCH] KVM: x86 emulator: code style cleanup Wei Yongjun
2010-02-11 10:00 ` Gleb Natapov
2010-02-11 10:03   ` Avi Kivity
2010-02-11 10:06     ` Gleb Natapov
2010-02-11 10:07       ` Avi Kivity
2010-02-11 10:04 ` Avi Kivity

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.