|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 1/3] x86/hypervisor: pass flags to hypervisor_flush_tlb
On Fri, Feb 14, 2020 at 12:34:28PM +0000, Wei Liu wrote:
> Hyper-V's L0 assisted flush has fine-grained control over what gets
> flushed. We need all the flags available to make the best decisions
> possible.
>
> No functional change because Xen's implementation doesn't care about
> what is passed to it.
>
> Signed-off-by: Wei Liu <liuwe@xxxxxxxxxxxxx>
LGTM:
Reviewed-by: Roger Pau Monné <roger.pau@xxxxxxxxxx>
Just one comment below.
> ---
> v2:
> 1. Introduce FLUSH_TLB_FLAGS_MASK
> ---
> xen/arch/x86/guest/hypervisor.c | 7 +++++--
> xen/arch/x86/guest/xen/xen.c | 2 +-
> xen/arch/x86/smp.c | 5 ++---
> xen/include/asm-x86/flushtlb.h | 3 +++
> xen/include/asm-x86/guest/hypervisor.h | 10 +++++-----
> 5 files changed, 16 insertions(+), 11 deletions(-)
>
> diff --git a/xen/arch/x86/guest/hypervisor.c b/xen/arch/x86/guest/hypervisor.c
> index 47e938e287..6ee28c9df1 100644
> --- a/xen/arch/x86/guest/hypervisor.c
> +++ b/xen/arch/x86/guest/hypervisor.c
> @@ -75,10 +75,13 @@ void __init hypervisor_e820_fixup(struct e820map *e820)
> }
>
> int hypervisor_flush_tlb(const cpumask_t *mask, const void *va,
> - unsigned int order)
> + unsigned int flags)
> {
> + if ( flags & ~FLUSH_TLB_FLAGS_MASK )
I think an ASSERT_UNREACHABLE() would be good here, since you are not
supposed to call hypervisor_flush_tlb with non TLB related flags.
Thanks, Roger.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |