|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 2/2] x86/pv: Defer I/O bitmap checks even in 64bit mode for emulate_privilege_op()
>>> On 05.01.17 at 13:00, <andrew.cooper3@xxxxxxxxxx> wrote:
> --- a/xen/arch/x86/traps.c
> +++ b/xen/arch/x86/traps.c
> @@ -2169,6 +2169,19 @@ static int priv_op_read_segment(enum x86_segment seg,
> struct segment_register *reg,
> struct x86_emulate_ctxt *ctxt)
> {
> + /* Check if this is an attempt to access to I/O bitmap. */
> + if ( seg == x86_seg_tr )
> + {
> + switch ( ctxt->opcode )
> + {
> + case 0x6c ... 0x6f: /* ins / outs */
> + case 0xe4 ... 0xe7: /* in / out (immediate port) */
> + case 0xec ... 0xef: /* in / out (port in %dx) */
> + /* Defer the check to priv_op_{read,write}_io(). */
> + return X86EMUL_DONE;
> + }
> + }
Well, I think I did like the old way a little better, but if you prefer this
switch(), then fine. When putting together my variant of the change for
testing I did notice the comment to have a wrong "to" (should be "the"),
so with that adjusted
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |