ia64/xen-unstable

changeset 15798:c398dad9d50a

hvm: Provide an HVMOP_flush_tlbs to flush VCPU TLBs.
From: Peter Johnston <pjohnston@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Thu Aug 30 09:57:09 2007 +0100 (2007-08-30)
parents b485d8d7347a
children 1c19a3430ab1
files xen/arch/x86/hvm/hvm.c xen/include/public/hvm/hvm_op.h
line diff
     1.1 --- a/xen/arch/x86/hvm/hvm.c	Wed Aug 29 15:47:55 2007 +0100
     1.2 +++ b/xen/arch/x86/hvm/hvm.c	Thu Aug 30 09:57:09 2007 +0100
     1.3 @@ -1166,6 +1166,12 @@ static int hvmop_set_pci_link_route(
     1.4      return rc;
     1.5  }
     1.6  
     1.7 +static int hvmop_flush_tlb_all(void)
     1.8 +{
     1.9 +    flush_tlb_mask(current->domain->domain_dirty_cpumask);
    1.10 +    return 0;
    1.11 +}
    1.12 +
    1.13  long do_hvm_op(unsigned long op, XEN_GUEST_HANDLE(void) arg)
    1.14  
    1.15  {
    1.16 @@ -1257,6 +1263,10 @@ long do_hvm_op(unsigned long op, XEN_GUE
    1.17              guest_handle_cast(arg, xen_hvm_set_pci_link_route_t));
    1.18          break;
    1.19  
    1.20 +    case HVMOP_flush_tlbs:
    1.21 +        rc = guest_handle_is_null(arg) ? hvmop_flush_tlb_all() : -ENOSYS;
    1.22 +        break;
    1.23 +
    1.24      default:
    1.25      {
    1.26          gdprintk(XENLOG_WARNING, "Bad HVM op %ld.\n", op);
     2.1 --- a/xen/include/public/hvm/hvm_op.h	Wed Aug 29 15:47:55 2007 +0100
     2.2 +++ b/xen/include/public/hvm/hvm_op.h	Thu Aug 30 09:57:09 2007 +0100
     2.3 @@ -70,4 +70,7 @@ struct xen_hvm_set_pci_link_route {
     2.4  typedef struct xen_hvm_set_pci_link_route xen_hvm_set_pci_link_route_t;
     2.5  DEFINE_XEN_GUEST_HANDLE(xen_hvm_set_pci_link_route_t);
     2.6  
     2.7 +/* Flushes all VCPU TLBs: @arg must be NULL. */
     2.8 +#define HVMOP_flush_tlbs          5
     2.9 +
    2.10  #endif /* __XEN_PUBLIC_HVM_HVM_OP_H__ */