Re: [PATCH 1/2] KVM: x86 emulator: Move ModRM flags for groups to top level opcode tables

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

 



On 04/30/2012 11:46 AM, Takuya Yoshikawa wrote:
> From: Takuya Yoshikawa <yoshikawa.takuya@xxxxxxxxxxxxx>
>
> Needed for the following patch which simplifies ModRM fetching code.
>
> Signed-off-by: Takuya Yoshikawa <yoshikawa.takuya@xxxxxxxxxxxxx>
> ---
>  arch/x86/kvm/emulate.c |  111 ++++++++++++++++++++++++------------------------
>  1 files changed, 56 insertions(+), 55 deletions(-)
>
> diff --git a/arch/x86/kvm/emulate.c b/arch/x86/kvm/emulate.c
> index 0d151e2..8d2c3d0 100644
> --- a/arch/x86/kvm/emulate.c
> +++ b/arch/x86/kvm/emulate.c
> @@ -3359,8 +3359,8 @@ static int check_perm_out(struct x86_emulate_ctxt *ctxt)
>  		      .check_perm = (_p) }
>  #define N    D(0)
>  #define EXT(_f, _e) { .flags = ((_f) | RMExt), .u.group = (_e) }
> -#define G(_f, _g) { .flags = ((_f) | Group), .u.group = (_g) }
> -#define GD(_f, _g) { .flags = ((_f) | GroupDual), .u.gdual = (_g) }
> +#define G(_f, _g) { .flags = ((_f) | Group | ModRM), .u.group = (_g) }
> +#define GD(_f, _g) { .flags = ((_f) | GroupDual | ModRM), .u.gdual = (_g) }
>  #define I(_f, _e) { .flags = (_f), .u.execute = (_e) }
>  #define II(_f, _e, _i) \
>  	{ .flags = (_f), .u.execute = (_e), .intercept = x86_intercept_##_i }
> @@ -3380,25 +3380,25 @@ static int check_perm_out(struct x86_emulate_ctxt *ctxt)
>  		I2bv(((_f) & ~Lock) | DstAcc | SrcImm, _e)
>  
>  static struct opcode group7_rm1[] = {
> -	DI(SrcNone | ModRM | Priv, monitor),
> -	DI(SrcNone | ModRM | Priv, mwait),
> +	DI(SrcNone | Priv, monitor),
> +	DI(SrcNone | Priv, mwait),
>  	N, N, N, N, N, N,
>  };
>

Removing ModRM everywhere isn't strictly necessary (but is okay).

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

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