direct-io.hg

changeset 11796:7ec648fdb392

[XEN] remove dead code from shadow auditing.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
author Tim Deegan <Tim.Deegan@xensource.com>
date Tue Oct 17 15:18:51 2006 +0100 (2006-10-17)
parents a0d33cc09333
children 87fc080f555b
files xen/arch/x86/mm/shadow/multi.c xen/arch/x86/mm/shadow/private.h
line diff
     1.1 --- a/xen/arch/x86/mm/shadow/multi.c	Tue Oct 17 11:14:17 2006 +0100
     1.2 +++ b/xen/arch/x86/mm/shadow/multi.c	Tue Oct 17 15:18:51 2006 +0100
     1.3 @@ -2880,7 +2880,6 @@ static int sh_page_fault(struct vcpu *v,
     1.4      shadow_audit_tables(v);
     1.5      reset_early_unshadow(v);
     1.6      shadow_unlock(d);
     1.7 -    sh_log_mmio(v, gpa);
     1.8      handle_mmio(va, gpa);
     1.9      return EXCRET_fault_fixed;
    1.10  
     2.1 --- a/xen/arch/x86/mm/shadow/private.h	Tue Oct 17 11:14:17 2006 +0100
     2.2 +++ b/xen/arch/x86/mm/shadow/private.h	Tue Oct 17 15:18:51 2006 +0100
     2.3 @@ -178,77 +178,6 @@ extern void shadow_audit_p2m(struct doma
     2.4  
     2.5  
     2.6  /******************************************************************************
     2.7 - * Mechanism for double-checking the optimized pagefault path: this
     2.8 - * structure contains a record of actions taken by the fault handling
     2.9 - * code.  In paranoid mode, the fast-path code fills out one of these
    2.10 - * structures (but doesn't take any actual action) and then the normal 
    2.11 - * path fills in another.  When the fault handler finishes, the 
    2.12 - * two are compared */
    2.13 -
    2.14 -#ifdef SHADOW_OPTIMIZATION_PARANOIA
    2.15 -
    2.16 -typedef struct shadow_action_log sh_log_t;
    2.17 -struct shadow_action_log {
    2.18 -    paddr_t ad[CONFIG_PAGING_LEVELS];  /* A & D bits propagated here */
    2.19 -    paddr_t mmio;                      /* Address of an mmio operation */
    2.20 -    int rv;                            /* Result of the fault handler */
    2.21 -};
    2.22 -
    2.23 -/* There are two logs, one for the fast path, one for the normal path */
    2.24 -enum sh_log_type { log_slow = 0, log_fast= 1 };
    2.25 -
    2.26 -/* Alloc and zero the logs */
    2.27 -static inline void sh_init_log(struct vcpu *v) 
    2.28 -{
    2.29 -    if ( unlikely(!v->arch.shadow.action_log) ) 
    2.30 -        v->arch.shadow.action_log = xmalloc_array(sh_log_t, 2);
    2.31 -    ASSERT(v->arch.shadow.action_log);
    2.32 -    memset(v->arch.shadow.action_log, 0, 2 * sizeof (sh_log_t));
    2.33 -}
    2.34 -
    2.35 -/* Log an A&D-bit update */
    2.36 -static inline void sh_log_ad(struct vcpu *v, paddr_t e, unsigned int level)
    2.37 -{
    2.38 -    v->arch.shadow.action_log[v->arch.shadow.action_index].ad[level] = e;
    2.39 -}
    2.40 -
    2.41 -/* Log an MMIO address */
    2.42 -static inline void sh_log_mmio(struct vcpu *v, paddr_t m)
    2.43 -{
    2.44 -    v->arch.shadow.action_log[v->arch.shadow.action_index].mmio = m;
    2.45 -}
    2.46 -
    2.47 -/* Log the result */
    2.48 -static inline void sh_log_rv(struct vcpu *v, int rv)
    2.49 -{
    2.50 -    v->arch.shadow.action_log[v->arch.shadow.action_index].rv = rv;
    2.51 -}
    2.52 -
    2.53 -/* Set which mode we're in */
    2.54 -static inline void sh_set_log_mode(struct vcpu *v, enum sh_log_type t) 
    2.55 -{
    2.56 -    v->arch.shadow.action_index = t;
    2.57 -}
    2.58 -
    2.59 -/* Know not to take action, because we're only checking the mechanism */
    2.60 -static inline int sh_take_no_action(struct vcpu *v) 
    2.61 -{
    2.62 -    return (v->arch.shadow.action_index == log_fast);
    2.63 -}
    2.64 -
    2.65 -#else /* Non-paranoid mode: these logs do not exist */
    2.66 -
    2.67 -#define sh_init_log(_v) do { (void)(_v); } while(0)
    2.68 -#define sh_set_log_mode(_v,_t) do { (void)(_v); } while(0)
    2.69 -#define sh_log_ad(_v,_e,_l) do { (void)(_v),(void)(_e),(void)(_l); } while (0)
    2.70 -#define sh_log_mmio(_v,_m) do { (void)(_v),(void)(_m); } while (0)
    2.71 -#define sh_log_rv(_v,_r) do { (void)(_v),(void)(_r); } while (0)
    2.72 -#define sh_take_no_action(_v) (((void)(_v)), 0)
    2.73 -
    2.74 -#endif /* SHADOW_OPTIMIZATION_PARANOIA */
    2.75 -
    2.76 -
    2.77 -/******************************************************************************
    2.78   * Macro for dealing with the naming of the internal names of the
    2.79   * shadow code's external entry points.
    2.80   */