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

Re: [Xen-devel] [PATCH 3/3] x86/mm: merge ptwr and mmio_ro page fault handlers



On 30/08/17 18:11, Wei Liu wrote:
> Provide a unified entry to avoid going through pte look-up, decode and
> emulation cycle more than necessary. The path taken is determined by
> the faulting address.
>
> Note that the order of checks is changed in the new function, but the
> order of the checks is performed shouldn't matter.
>
> The sole caller is changed to use the new function.
>
> No functional change.
>
> Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
> ---
> Cc: Jan Beulich <jbeulich@xxxxxxxx>
> Cc: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
>
> xtf is happy with this change. Let me know if more tests can be done.

Booting dom0 is probably the best easy test going.

> diff --git a/xen/include/asm-x86/mm.h b/xen/include/asm-x86/mm.h
> index ec7ce3c8c8..85adafdfa2 100644
> --- a/xen/include/asm-x86/mm.h
> +++ b/xen/include/asm-x86/mm.h
> @@ -511,10 +511,8 @@ extern int mmcfg_intercept_write(enum x86_segment seg,
>  int pv_emul_cpuid(uint32_t leaf, uint32_t subleaf,
>                    struct cpuid_leaf *res, struct x86_emulate_ctxt *ctxt);
>  
> -int  ptwr_do_page_fault(struct vcpu *, unsigned long,
> -                        struct cpu_user_regs *);
> -int  mmio_ro_do_page_fault(struct vcpu *, unsigned long,
> -                           struct cpu_user_regs *);
> +int ptwr_or_mmio_ro_do_page_fault(struct vcpu *, unsigned long,
> +                                  struct cpu_user_regs *);

pv_ro_page_fault() ?

>  
>  int audit_adjust_pgtables(struct domain *d, int dir, int noisy);
>  

I was thinking something more like this extra delta (only compile
tested) which drops rather more code.

~Andrew

Attachment: 0001-extra.patch
Description: Text Data

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

 


Rackspace

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