Re: [RFC] [PATCH] Use macros for x86_emulate_ops to avoid future mistakes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jan 20, 2010 at 04:47:21PM +0900, Takuya Yoshikawa wrote:
> The return values from x86_emulate_ops are defined
> in kvm_emulate.h as macros X86EMUL_*.
> 
> But in emulate.c, we are comparing the return values
> from these ops with 0 to check if they're X86EMUL_CONTINUE
> or not: X86EMUL_CONTINUE is defined as 0 now.
> 
> To avoid possible mistakes in the future, this patch
> substitutes "X86EMUL_CONTINUE" for "0" that are being
> compared with the return values from x86_emulate_ops.
> 
>   We think that there are more places we should use these
>   macros, but the meanings of rc values in x86_emulate_insn()
>   were not so clear at a glance. If we use proper macros in
>   this function, we would be able to follow the flow of each
>   emulation more easily and, maybe, more securely.
> 
> Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@xxxxxxxxxxxxx>

Applied, thanks.

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux