On 30/08/17 18:11, Wei Liu wrote:
> diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
> index ed80df02fa..5b840cc603 100644
> --- a/xen/arch/x86/mm.c
> +++ b/xen/arch/x86/mm.c
> @@ -4956,9 +4956,9 @@ long arch_memory_op(unsigned long cmd, 
> XEN_GUEST_HANDLE_PARAM(void) arg)
>   */
>  
>  struct ptwr_emulate_ctxt {
> -    struct x86_emulate_ctxt ctxt;
>      unsigned long cr2;
>      l1_pgentry_t  pte;
> +    struct x86_emulate_ctxt *ctxt;

You can do away with this pointer entirely if you modify
ptwr_emulated_update() to take the full x86_emulate_ctxt.  Locally, you
can just declare

struct ptwr_emulate_ctxt *ptwr_ctxt = ctxt->data;

Otherwise, LGTM.

~Andrew

>  };
>  
>  static int ptwr_emulated_read(
>


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

Reply via email to