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

Re: [PATCH 3/5] x86/emul: Add a pending_dbg field to x86_emulate_ctxt.retire



On 9/13/23 08:21, Andrew Cooper wrote:
> diff --git a/xen/arch/x86/x86_emulate/x86_emulate.h 
> b/xen/arch/x86/x86_emulate/x86_emulate.h
> index 698750267a90..f0e74d23c378 100644
> --- a/xen/arch/x86/x86_emulate/x86_emulate.h
> +++ b/xen/arch/x86/x86_emulate/x86_emulate.h
> @@ -588,15 +588,26 @@ struct x86_emulate_ctxt
>      /* Canonical opcode (see below) (valid only on X86EMUL_OKAY). */
>      unsigned int opcode;
>  
> -    /* Retirement state, set by the emulator (valid only on X86EMUL_OKAY). */
> +    /*
> +     * Retirement state, set by the emulator (valid only on 
> X86EMUL_OKAY/DONE).
> +     *
> +     * TODO: all this state should be input/output from the VMCS PENDING_DBG,
> +     * INTERRUPTIBILITY and ACTIVITIY fields.
> +     */
>      union {
> -        uint8_t raw;
> +        unsigned long raw;

Minor nit: this should be uint64_t for clarity.  Otherwise, it's not at all
clear that the raw field covers the entire union, unless you remind myself
that Xen does not support 32-bit host.

>          struct {
> +            /*
> +             * Accumulated %dr6 trap bits, positive polarity.  Should only be
> +             * interpreted in the case of X86EMUL_OKAY/DONE.
> +             */
> +            unsigned int pending_dbg;
> +
>              bool hlt:1;          /* Instruction HLTed. */
>              bool mov_ss:1;       /* Instruction sets MOV-SS irq shadow. */
>              bool sti:1;          /* Instruction sets STI irq shadow. */
>              bool unblock_nmi:1;  /* Instruction clears NMI blocking. */
> -            bool singlestep:1;   /* Singlestepping was active. */
> +            bool singlestep:1;   /* Singlestepping was active. (TODO, merge 
> into pending_dbg) */
>          };
>      } retire;
>  

-- 
Sincerely,
Jinoh Kang




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.