On Thu, Jan 28, 2010 at 10:56:52PM +0900, Takuya Yoshikawa wrote:
> These functions returns X86EMUL_* or 0 or 1 or ...
> This patch fix the conflicts between these values and make
> them return one of X86EMUL_* values.
> 
> NOTE: In these functions, directly returning the ret value
>   from the kvm_load_segment_descriptor should have been fixed.
> 
> Signed-off-by: Takuya Yoshikawa <[email protected]>
> ---
>  arch/x86/kvm/emulate.c |   44 +++++++++++++++++++++-----------------------
>  1 files changed, 21 insertions(+), 23 deletions(-)
> 
> -     rc = kvm_load_segment_descriptor(ctxt->vcpu, (u16)selector, 1, seg);
> +     if (kvm_load_segment_descriptor(ctxt->vcpu, (u16)selector, 1, seg))
> +             return X86EMUL_UNHANDLEABLE;

Its better to propagate the return value from
kvm_load_segment_descriptor (which can be updated to return accurate
codes, eg PROPAGATE_FAULT if exception has been raised).

Also please send logic changes separately from macro replacement.

--
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