ia64/xen-unstable

changeset 5754:12edc2f2ca18

Fix Xen build with PAE enabled, and a fix to help
domU PAE.
Signed-off-by: Gerd Knorr <kraxel@suse.de>
author kaf24@firebug.cl.cam.ac.uk
date Tue Jul 12 16:12:48 2005 +0000 (2005-07-12)
parents 9f6057761c8f
children be1153585cb0
files xen/include/asm-x86/config.h xen/include/asm-x86/shadow.h
line diff
     1.1 --- a/xen/include/asm-x86/config.h	Tue Jul 12 13:19:10 2005 +0000
     1.2 +++ b/xen/include/asm-x86/config.h	Tue Jul 12 16:12:48 2005 +0000
     1.3 @@ -267,7 +267,11 @@ extern unsigned long _end; /* standard E
     1.4  #define L2_PAGETABLE_XEN_SLOTS \
     1.5      (L2_PAGETABLE_LAST_XEN_SLOT - L2_PAGETABLE_FIRST_XEN_SLOT + 1)
     1.6  
     1.7 -#define PGT_base_page_table PGT_l2_page_table
     1.8 +#ifdef CONFIG_X86_PAE
     1.9 +# define PGT_base_page_table PGT_l3_page_table
    1.10 +#else
    1.11 +# define PGT_base_page_table PGT_l2_page_table
    1.12 +#endif
    1.13  
    1.14  #define __HYPERVISOR_CS 0xe008
    1.15  #define __HYPERVISOR_DS 0xe010
     2.1 --- a/xen/include/asm-x86/shadow.h	Tue Jul 12 13:19:10 2005 +0000
     2.2 +++ b/xen/include/asm-x86/shadow.h	Tue Jul 12 16:12:48 2005 +0000
     2.3 @@ -630,6 +630,83 @@ static inline void shadow_sync_and_drop_
     2.4      shadow_unlock(d);
     2.5  }
     2.6  #endif
     2.7 +
     2.8 +#if CONFIG_PAGING_LEVELS == 3
     2.9 +/* dummy functions, PAE has no shadow support yet */
    2.10 +
    2.11 +static inline void
    2.12 +__shadow_get_l2e(
    2.13 +    struct vcpu *v, unsigned long va, l2_pgentry_t *psl2e)
    2.14 +{
    2.15 +    BUG();
    2.16 +}
    2.17 +
    2.18 +static inline void
    2.19 +__shadow_set_l2e(
    2.20 +    struct vcpu *v, unsigned long va, l2_pgentry_t value)
    2.21 +{
    2.22 +    BUG();
    2.23 +}
    2.24 +
    2.25 +static inline void
    2.26 +__guest_get_l2e(
    2.27 +    struct vcpu *v, unsigned long va, l2_pgentry_t *pl2e)
    2.28 +{
    2.29 +    BUG();
    2.30 +}
    2.31 +
    2.32 +static inline void
    2.33 +__guest_set_l2e(
    2.34 +    struct vcpu *v, unsigned long va, l2_pgentry_t value)
    2.35 +{
    2.36 +    BUG();
    2.37 +}
    2.38 +
    2.39 +static inline void shadow_drop_references(
    2.40 +    struct domain *d, struct pfn_info *page)
    2.41 +{
    2.42 +    if ( likely(!shadow_mode_refcounts(d)) ||
    2.43 +         ((page->u.inuse.type_info & PGT_count_mask) == 0) )
    2.44 +        return;
    2.45 +    BUG();
    2.46 +}
    2.47 +
    2.48 +static inline void shadow_sync_and_drop_references(
    2.49 +    struct domain *d, struct pfn_info *page)
    2.50 +{
    2.51 +    if ( likely(!shadow_mode_refcounts(d)) )
    2.52 +        return;
    2.53 +    BUG();
    2.54 +}
    2.55 +
    2.56 +static inline int l1pte_write_fault(
    2.57 +    struct vcpu *v, l1_pgentry_t *gpte_p, l1_pgentry_t *spte_p,
    2.58 +    unsigned long va)
    2.59 +{
    2.60 +    BUG();
    2.61 +    return 42;
    2.62 +}
    2.63 +
    2.64 +static inline int l1pte_read_fault(
    2.65 +    struct domain *d, l1_pgentry_t *gpte_p, l1_pgentry_t *spte_p)
    2.66 +{
    2.67 +    BUG();
    2.68 +    return 42;
    2.69 +}
    2.70 +
    2.71 +void static inline
    2.72 +shadow_set_l1e(unsigned long va, l1_pgentry_t new_spte, int create_l1_shadow)
    2.73 +{
    2.74 +    BUG();
    2.75 +}
    2.76 +
    2.77 +static inline unsigned long gva_to_gpa(unsigned long gva)
    2.78 +{
    2.79 +    BUG();
    2.80 +    return 42;
    2.81 +}
    2.82 +#endif
    2.83 +    
    2.84  /************************************************************************/
    2.85  
    2.86  /*