[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] merge
# HG changeset patch # User Michael.Fetterman@xxxxxxxxxxxx # Node ID 7363637e2721206caf65521a6677e447bbd663d8 # Parent 14d733e5e1d014e302d72fb78df1428ee08e3ce3 # Parent 48aaa39eaa7e63860f2d7bc2d875665b7083a58c merge Keir did a similar change earlier, but my version removed some special case code as well, now that __gpfn_to_mfn() can protect itself. diff -r 14d733e5e1d0 -r 7363637e2721 install.sh --- a/install.sh Wed Nov 23 13:15:35 2005 +++ b/install.sh Mon Nov 28 14:22:47 2005 @@ -28,7 +28,7 @@ echo "All done." [ -x "$(which udevinfo)" ] && \ - UDEV_VERSION=$(udevinfo -V | sed -e 's/^.*\s\([0-9]\+\)[^0-9]*/\1/') + UDEV_VERSION=$(udevinfo -V | sed -e 's/^.*\ \([0-9]\+\)[^0-9]*/\1/') if [ -n "$UDEV_VERSION" ] && [ $UDEV_VERSION -ge 059 ]; then cp -f $src/etc/udev/rules.d/*.rules $dst/etc/udev/rules.d/ diff -r 14d733e5e1d0 -r 7363637e2721 linux-2.6-xen-sparse/arch/xen/x86_64/ia32/Makefile --- a/linux-2.6-xen-sparse/arch/xen/x86_64/ia32/Makefile Wed Nov 23 13:15:35 2005 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/ia32/Makefile Mon Nov 28 14:22:47 2005 @@ -20,6 +20,12 @@ $(obj)/syscall32.o: $(src)/syscall32.c \ $(foreach F,int80 sysenter syscall,$(obj)/vsyscall-$F.so) + +# syscall32.c currently contains inline asm which has .incbin directives. +# This defeats ccache's signature checks, and also breaks distcc. +# Make sure neither ccache nor distcc compiles this file. +# +$(obj)/syscall32.o: override CC := env CCACHE_DISABLE=1 DISTCC_HOSTS=localhost $(CC) # Teach kbuild about targets targets := $(foreach F,int80 sysenter syscall,vsyscall-$F.o vsyscall-$F.so) diff -r 14d733e5e1d0 -r 7363637e2721 tools/check/check_hotplug --- a/tools/check/check_hotplug Wed Nov 23 13:15:35 2005 +++ b/tools/check/check_hotplug Mon Nov 28 14:22:47 2005 @@ -7,7 +7,7 @@ exit 1 } [ -x "$(which udevinfo)" ] && \ - UDEV_VERSION=$(udevinfo -V | sed -e 's/^.*\s\([0-9]\+\)[^0-9]*/\1/') + UDEV_VERSION=$(udevinfo -V | sed -e 's/^.*\ \([0-9]\+\)[^0-9]*/\1/') if [ -n "$UDEV_VERSION" ] && [ $UDEV_VERSION -ge 059 ]; then exit 0 diff -r 14d733e5e1d0 -r 7363637e2721 xen/arch/x86/shadow.c --- a/xen/arch/x86/shadow.c Wed Nov 23 13:15:35 2005 +++ b/xen/arch/x86/shadow.c Mon Nov 28 14:22:47 2005 @@ -1075,8 +1075,8 @@ entry->next = d->arch.out_of_sync; d->arch.out_of_sync = entry; - FSH_LOG("mark_out_of_sync(va=%lx -> writable_pl1e=%lx)", - va, entry->writable_pl1e); + FSH_LOG("%s(va=%lx -> writable_pl1e=%lx)", + __func__, va, entry->writable_pl1e); } /* diff -r 14d733e5e1d0 -r 7363637e2721 xen/arch/x86/shadow32.c --- a/xen/arch/x86/shadow32.c Wed Nov 23 13:15:35 2005 +++ b/xen/arch/x86/shadow32.c Mon Nov 28 14:22:47 2005 @@ -1423,7 +1423,7 @@ } unsigned long -gpfn_to_mfn_foreign(struct domain *d, unsigned long gpfn) +get_mfn_from_pfn_foreign(struct domain *d, unsigned long gpfn) { unsigned long va, tabpfn; l1_pgentry_t *l1, l1e; @@ -1431,7 +1431,7 @@ ASSERT(shadow_mode_translate(d)); - perfc_incrc(gpfn_to_mfn_foreign); + perfc_incrc(get_mfn_from_pfn_foreign); va = gpfn << PAGE_SHIFT; tabpfn = pagetable_get_pfn(d->arch.phys_table); @@ -1440,8 +1440,8 @@ unmap_domain_page(l2); if ( !(l2e_get_flags(l2e) & _PAGE_PRESENT) ) { - printk("gpfn_to_mfn_foreign(d->id=%d, gpfn=%lx) => 0 l2e=%" PRIpte "\n", - d->domain_id, gpfn, l2e_get_intpte(l2e)); + printk("%s(d->id=%d, gpfn=%lx) => 0 l2e=%" PRIpte "\n", + __func__, d->domain_id, gpfn, l2e_get_intpte(l2e)); return INVALID_MFN; } l1 = map_domain_page(l2e_get_pfn(l2e)); @@ -1449,14 +1449,14 @@ unmap_domain_page(l1); #if 0 - printk("gpfn_to_mfn_foreign(d->id=%d, gpfn=%lx) => %lx tabpfn=%lx l2e=%lx l1tab=%lx, l1e=%lx\n", - d->domain_id, gpfn, l1_pgentry_val(l1e) >> PAGE_SHIFT, tabpfn, l2e, l1tab, l1e); + printk("%s(d->id=%d, gpfn=%lx) => %lx tabpfn=%lx l2e=%lx l1tab=%lx, l1e=%lx\n", + __func__, d->domain_id, gpfn, l1_pgentry_val(l1e) >> PAGE_SHIFT, tabpfn, l2e, l1tab, l1e); #endif if ( !(l1e_get_flags(l1e) & _PAGE_PRESENT) ) { - printk("gpfn_to_mfn_foreign(d->id=%d, gpfn=%lx) => 0 l1e=%" PRIpte "\n", - d->domain_id, gpfn, l1e_get_intpte(l1e)); + printk("%s(d->id=%d, gpfn=%lx) => 0 l1e=%" PRIpte "\n", + __func__, d->domain_id, gpfn, l1e_get_intpte(l1e)); return INVALID_MFN; } @@ -1945,8 +1945,8 @@ entry->next = d->arch.out_of_sync; d->arch.out_of_sync = entry; - FSH_LOG("mark_out_of_sync(va=%lx -> writable_pl1e=%lx)", - va, entry->writable_pl1e); + FSH_LOG("%s(va=%lx -> writable_pl1e=%lx)", + __func__, va, entry->writable_pl1e); } /* diff -r 14d733e5e1d0 -r 7363637e2721 xen/arch/x86/shadow_public.c --- a/xen/arch/x86/shadow_public.c Wed Nov 23 13:15:35 2005 +++ b/xen/arch/x86/shadow_public.c Mon Nov 28 14:22:47 2005 @@ -1607,7 +1607,7 @@ } unsigned long -gpfn_to_mfn_foreign(struct domain *d, unsigned long gpfn) +get_mfn_from_pfn_foreign(struct domain *d, unsigned long gpfn) { unsigned long va, tabpfn; l1_pgentry_t *l1, l1e; @@ -1615,7 +1615,7 @@ ASSERT(shadow_mode_translate(d)); - perfc_incrc(gpfn_to_mfn_foreign); + perfc_incrc(get_mfn_from_pfn_foreign); va = gpfn << PAGE_SHIFT; tabpfn = pagetable_get_pfn(d->arch.phys_table); @@ -1624,8 +1624,8 @@ unmap_domain_page(l2); if ( !(l2e_get_flags(l2e) & _PAGE_PRESENT) ) { - printk("gpfn_to_mfn_foreign(d->id=%d, gpfn=%lx) => 0 l2e=%" PRIpte "\n", - d->domain_id, gpfn, l2e_get_intpte(l2e)); + printk("%s(d->id=%d, gpfn=%lx) => 0 l2e=%" PRIpte "\n", + __func__, d->domain_id, gpfn, l2e_get_intpte(l2e)); return INVALID_MFN; } l1 = map_domain_page(l2e_get_pfn(l2e)); @@ -1633,14 +1633,14 @@ unmap_domain_page(l1); #if 0 - printk("gpfn_to_mfn_foreign(d->id=%d, gpfn=%lx) => %lx tabpfn=%lx l2e=%lx l1tab=%lx, l1e=%lx\n", - d->domain_id, gpfn, l1_pgentry_val(l1e) >> PAGE_SHIFT, tabpfn, l2e, l1tab, l1e); + printk("%s(d->id=%d, gpfn=%lx) => %lx tabpfn=%lx l2e=%lx l1tab=%lx, l1e=%lx\n", + __func__, d->domain_id, gpfn, l1_pgentry_val(l1e) >> PAGE_SHIFT, tabpfn, l2e, l1tab, l1e); #endif if ( !(l1e_get_flags(l1e) & _PAGE_PRESENT) ) { - printk("gpfn_to_mfn_foreign(d->id=%d, gpfn=%lx) => 0 l1e=%" PRIpte "\n", - d->domain_id, gpfn, l1e_get_intpte(l1e)); + printk("%s(d->id=%d, gpfn=%lx) => 0 l1e=%" PRIpte "\n", + __func__, d->domain_id, gpfn, l1e_get_intpte(l1e)); return INVALID_MFN; } diff -r 14d733e5e1d0 -r 7363637e2721 xen/common/grant_table.c --- a/xen/common/grant_table.c Wed Nov 23 13:15:35 2005 +++ b/xen/common/grant_table.c Mon Nov 28 14:22:47 2005 @@ -234,7 +234,7 @@ /* rmb(); */ /* not on x86 */ - frame = __gpfn_to_mfn_foreign(rd, sha->frame); + frame = __gpfn_to_mfn(rd, sha->frame); if ( unlikely(!pfn_valid(frame)) || unlikely(!((dev_hst_ro_flags & GNTMAP_readonly) ? diff -r 14d733e5e1d0 -r 7363637e2721 xen/include/asm-x86/shadow.h --- a/xen/include/asm-x86/shadow.h Wed Nov 23 13:15:35 2005 +++ b/xen/include/asm-x86/shadow.h Mon Nov 28 14:22:47 2005 @@ -283,26 +283,21 @@ /************************************************************************/ -#define __mfn_to_gpfn(_d, mfn) \ - ( (shadow_mode_translate(_d)) \ - ? get_pfn_from_mfn(mfn) \ +#define __mfn_to_gpfn(_d, mfn) \ + ( (shadow_mode_translate(_d)) \ + ? get_pfn_from_mfn(mfn) \ : (mfn) ) -#define __gpfn_to_mfn(_d, gpfn) \ - ({ \ - (shadow_mode_translate(_d)) \ - ? (((_d) == current->domain) ? \ - get_mfn_from_pfn(gpfn) : \ - gpfn_to_mfn_foreign((_d), (gpfn))) \ - : (gpfn); \ +#define __gpfn_to_mfn(_d, gpfn) \ + ({ \ + unlikely(shadow_mode_translate(_d)) \ + ? (likely(current->domain == (_d)) \ + ? get_mfn_from_pfn(gpfn) \ + : get_mfn_from_pfn_foreign(_d, gpfn)) \ + : (gpfn); \ }) -#define __gpfn_to_mfn_foreign(_d, gpfn) \ - ( (shadow_mode_translate(_d)) \ - ? gpfn_to_mfn_foreign(_d, gpfn) \ - : (gpfn) ) - -extern unsigned long gpfn_to_mfn_foreign( +extern unsigned long get_mfn_from_pfn_foreign( struct domain *d, unsigned long gpfn); /************************************************************************/ @@ -873,18 +868,7 @@ if ( l2e_get_flags(gpde) & _PAGE_PRESENT ) { - if ( unlikely((current->domain != d) && !shadow_mode_external(d)) ) - { - // Can't use __gpfn_to_mfn() if we don't have one of this domain's - // page tables currently installed. - // This isn't common -- it only happens during shadow mode setup - // and mode changes. - // - mfn = gpfn_to_mfn_foreign(d, pfn); - } - else - mfn = __gpfn_to_mfn(d, pfn); - + mfn = __gpfn_to_mfn(d, pfn); if ( VALID_MFN(mfn) && (mfn < max_page) ) hl2e = l1e_from_pfn(mfn, __PAGE_HYPERVISOR); } diff -r 14d733e5e1d0 -r 7363637e2721 xen/include/xen/perfc_defn.h --- a/xen/include/xen/perfc_defn.h Wed Nov 23 13:15:35 2005 +++ b/xen/include/xen/perfc_defn.h Mon Nov 28 14:22:47 2005 @@ -114,7 +114,7 @@ PERFCOUNTER_CPU(validate_hl2e_calls, "calls to validate_hl2e_change") PERFCOUNTER_CPU(validate_hl2e_changes, "validate_hl2e makes changes") PERFCOUNTER_CPU(exception_fixed, "pre-exception fixed") -PERFCOUNTER_CPU(gpfn_to_mfn_foreign, "calls to gpfn_to_mfn_foreign") +PERFCOUNTER_CPU(get_mfn_from_pfn_foreign, "calls to get_mfn_from_pfn_foreign") PERFCOUNTER_CPU(remove_all_access, "calls to remove_all_access") PERFCOUNTER_CPU(remove_write_access, "calls to remove_write_access") PERFCOUNTER_CPU(remove_write_access_easy, "easy outs of remove_write_access") _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |