[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] merge?
# HG changeset patch # User cl349@xxxxxxxxxxxxxxxxxxxx # Node ID 630feabe7ed6df7bbddbdd87b2ec0194d55dd97f # Parent b402e77aac4674f938591dd718fb1259bb9e2100 # Parent be5c24f2709c84b1ae4305a2f98be1372fd28230 merge? diff -r b402e77aac46 -r 630feabe7ed6 linux-2.6-xen-sparse/arch/xen/configs/xenU_defconfig_x86_64 --- a/linux-2.6-xen-sparse/arch/xen/configs/xenU_defconfig_x86_64 Wed Aug 24 22:22:11 2005 +++ b/linux-2.6-xen-sparse/arch/xen/configs/xenU_defconfig_x86_64 Wed Aug 24 22:24:10 2005 @@ -674,10 +674,10 @@ CONFIG_EXT2_FS_XATTR=y CONFIG_EXT2_FS_POSIX_ACL=y CONFIG_EXT2_FS_SECURITY=y -CONFIG_EXT3_FS=m +CONFIG_EXT3_FS=y CONFIG_EXT3_FS_XATTR=y -CONFIG_EXT3_FS_POSIX_ACL=y -CONFIG_EXT3_FS_SECURITY=y +# CONFIG_EXT3_FS_POSIX_ACL is not set +# CONFIG_EXT3_FS_SECURITY is not set CONFIG_JBD=m # CONFIG_JBD_DEBUG is not set CONFIG_FS_MBCACHE=y diff -r b402e77aac46 -r 630feabe7ed6 linux-2.6-xen-sparse/arch/xen/x86_64/ia32/syscall32.c --- a/linux-2.6-xen-sparse/arch/xen/x86_64/ia32/syscall32.c Wed Aug 24 22:22:11 2005 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/ia32/syscall32.c Wed Aug 24 22:24:10 2005 @@ -128,8 +128,12 @@ #endif return 0; } - -__initcall(init_syscall32); + +/* + * This must be done early in case we have an initrd containing 32-bit + * binaries (e.g., hotplug). This could be pushed upstream to arch/x86_64. + */ +core_initcall(init_syscall32); /* May not be __init: called during resume */ void syscall32_cpu_init(void) diff -r b402e77aac46 -r 630feabe7ed6 linux-2.6-xen-sparse/arch/xen/x86_64/kernel/head.S --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/head.S Wed Aug 24 22:22:11 2005 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/head.S Wed Aug 24 22:24:10 2005 @@ -43,7 +43,7 @@ cld /* Copy the necessary stuff from xen_start_info structure. */ movq $xen_start_info_union,%rdi - movq $64,%rcx /* sizeof (union xen_start_info_union) / sizeof (long) */ + movq $256,%rcx rep movsq #ifdef CONFIG_SMP diff -r b402e77aac46 -r 630feabe7ed6 linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c --- a/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c Wed Aug 24 22:22:11 2005 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c Wed Aug 24 22:24:10 2005 @@ -428,8 +428,9 @@ { unsigned long bootmap_size = init_bootmem(start_pfn, end_pfn); free_bootmem(0, end_pfn << PAGE_SHIFT); - /* XXX KAF: Why can't we leave low 1MB of memory free? */ - reserve_bootmem(0, (PFN_PHYS(start_pfn) + bootmap_size + PAGE_SIZE-1)); + reserve_bootmem(HIGH_MEMORY, + (PFN_PHYS(start_pfn) + bootmap_size + PAGE_SIZE-1) + - HIGH_MEMORY); } #else static void __init contig_initmem_init(void) diff -r b402e77aac46 -r 630feabe7ed6 linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c --- a/linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c Wed Aug 24 22:22:11 2005 +++ b/linux-2.6-xen-sparse/arch/xen/x86_64/mm/init.c Wed Aug 24 22:24:10 2005 @@ -441,6 +441,31 @@ *dst = val; } +static inline int make_readonly(unsigned long paddr) +{ + int readonly = 0; + + /* Make new page tables read-only. */ + if ((paddr < ((table_start << PAGE_SHIFT) + tables_space)) && + (paddr >= (table_start << PAGE_SHIFT))) + readonly = 1; + + /* Make old page tables read-only. */ + if ((paddr < ((xen_start_info.pt_base - __START_KERNEL_map) + + (xen_start_info.nr_pt_frames << PAGE_SHIFT))) && + (paddr >= (xen_start_info.pt_base - __START_KERNEL_map))) + readonly = 1; + + /* + * No need for writable mapping of kernel image. This also ensures that + * page and descriptor tables embedded inside don't have writable mappings. + */ + if ((paddr >= __pa_symbol(&_text)) && (paddr < __pa_symbol(&_end))) + readonly = 1; + + return readonly; +} + void __init phys_pud_init(pud_t *pud, unsigned long address, unsigned long end) { long i, j, k; @@ -477,9 +502,7 @@ pte = alloc_low_page(&pte_phys); pte_save = pte; for (k = 0; k < PTRS_PER_PTE; pte++, k++, paddr += PTE_SIZE) { - if (paddr < (table_start << PAGE_SHIFT) - + tables_space) - { + if (make_readonly(paddr)) { __set_pte(pte, __pte(paddr | (_KERNPG_TABLE & ~_PAGE_RW))); continue; diff -r b402e77aac46 -r 630feabe7ed6 linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c --- a/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c Wed Aug 24 22:22:11 2005 +++ b/linux-2.6-xen-sparse/drivers/xen/blkback/xenbus.c Wed Aug 24 22:24:10 2005 @@ -57,26 +57,26 @@ /* Front end tells us frame. */ static void frontend_changed(struct xenbus_watch *watch, const char *node) { - unsigned long sharedmfn; + unsigned long ring_ref; unsigned int evtchn; int err; struct backend_info *be = container_of(watch, struct backend_info, watch); /* If other end is gone, delete ourself. */ - if (!xenbus_exists(be->frontpath, "")) { + if (node && !xenbus_exists(be->frontpath, "")) { xenbus_rm(be->dev->nodename, ""); device_unregister(&be->dev->dev); return; } - if (be->blkif->status == CONNECTED) - return; - - err = xenbus_gather(be->frontpath, "grant-id", "%lu", &sharedmfn, + if (be->blkif == NULL || be->blkif->status == CONNECTED) + return; + + err = xenbus_gather(be->frontpath, "ring-ref", "%lu", &ring_ref, "event-channel", "%u", &evtchn, NULL); if (err) { xenbus_dev_error(be->dev, err, - "reading %s/grant-id and event-channel", + "reading %s/ring-ref and event-channel", be->frontpath); return; } @@ -113,11 +113,10 @@ } /* Map the shared frame, irq etc. */ - err = blkif_map(be->blkif, sharedmfn, evtchn); - if (err) { - xenbus_dev_error(be->dev, err, - "mapping shared-frame %lu port %u", - sharedmfn, evtchn); + err = blkif_map(be->blkif, ring_ref, evtchn); + if (err) { + xenbus_dev_error(be->dev, err, "mapping ring-ref %lu port %u", + ring_ref, evtchn); goto abort; } @@ -139,133 +138,125 @@ { int err; char *p; - char *frontend; long int handle, pdev; struct backend_info *be = container_of(watch, struct backend_info, backend_watch); struct xenbus_device *dev = be->dev; + + err = xenbus_scanf(dev->nodename, "physical-device", "%li", &pdev); + if (XENBUS_EXIST_ERR(err)) + return; + if (err < 0) { + xenbus_dev_error(dev, err, "reading physical-device"); + return; + } + if (be->pdev && be->pdev != pdev) { + printk(KERN_WARNING + "changing physical-device not supported\n"); + return; + } + be->pdev = pdev; + + /* If there's a read-only node, we're read only. */ + p = xenbus_read(dev->nodename, "read-only", NULL); + if (!IS_ERR(p)) { + be->readonly = 1; + kfree(p); + } + + if (be->blkif == NULL) { + /* Front end dir is a number, which is used as the handle. */ + p = strrchr(be->frontpath, '/') + 1; + handle = simple_strtoul(p, NULL, 0); + + be->blkif = alloc_blkif(be->frontend_id); + if (IS_ERR(be->blkif)) { + err = PTR_ERR(be->blkif); + be->blkif = NULL; + xenbus_dev_error(dev, err, "creating block interface"); + return; + } + + err = vbd_create(be->blkif, handle, be->pdev, be->readonly); + if (err) { + xenbus_dev_error(dev, err, "creating vbd structure"); + return; + } + + /* Pass in NULL node to skip exist test. */ + frontend_changed(&be->watch, NULL); + } +} + +static int blkback_probe(struct xenbus_device *dev, + const struct xenbus_device_id *id) +{ + struct backend_info *be; + char *frontend; + int err; + + be = kmalloc(sizeof(*be), GFP_KERNEL); + if (!be) { + xenbus_dev_error(dev, -ENOMEM, "allocating backend structure"); + return -ENOMEM; + } + memset(be, 0, sizeof(*be)); frontend = NULL; err = xenbus_gather(dev->nodename, "frontend-id", "%li", &be->frontend_id, "frontend", NULL, &frontend, NULL); - if (XENBUS_EXIST_ERR(err) || - strlen(frontend) == 0 || !xenbus_exists(frontend, "")) { + if (XENBUS_EXIST_ERR(err)) + goto free_be; + if (err < 0) { + xenbus_dev_error(dev, err, + "reading %s/frontend or frontend-id", + dev->nodename); + goto free_be; + } + if (strlen(frontend) == 0 || !xenbus_exists(frontend, "")) { /* If we can't get a frontend path and a frontend-id, * then our bus-id is no longer valid and we need to * destroy the backend device. */ - goto device_fail; - } - if (err < 0) { - xenbus_dev_error(dev, err, - "reading %s/frontend or frontend-id", - dev->nodename); - goto device_fail; - } - - if (!be->frontpath || strcmp(frontend, be->frontpath)) { - if (be->watch.node) - unregister_xenbus_watch(&be->watch); - if (be->frontpath) - kfree(be->frontpath); - be->frontpath = frontend; - frontend = NULL; - be->watch.node = be->frontpath; - be->watch.callback = frontend_changed; - err = register_xenbus_watch(&be->watch); - if (err) { - be->watch.node = NULL; - xenbus_dev_error(dev, err, - "adding frontend watch on %s", - be->frontpath); - goto device_fail; - } - } - - err = xenbus_scanf(dev->nodename, "physical-device", "%li", &pdev); - if (XENBUS_EXIST_ERR(err)) - goto out; - if (err < 0) { - xenbus_dev_error(dev, err, "reading physical-device"); - goto device_fail; - } - if (be->pdev && be->pdev != pdev) { - printk(KERN_WARNING - "changing physical-device not supported\n"); - goto device_fail; - } - be->pdev = pdev; - - /* If there's a read-only node, we're read only. */ - p = xenbus_read(dev->nodename, "read-only", NULL); - if (!IS_ERR(p)) { - be->readonly = 1; - kfree(p); - } - - if (be->blkif == NULL) { - /* Front end dir is a number, which is used as the handle. */ - p = strrchr(be->frontpath, '/') + 1; - handle = simple_strtoul(p, NULL, 0); - - be->blkif = alloc_blkif(be->frontend_id); - if (IS_ERR(be->blkif)) { - err = PTR_ERR(be->blkif); - be->blkif = NULL; - xenbus_dev_error(dev, err, "creating block interface"); - goto device_fail; - } - - err = vbd_create(be->blkif, handle, be->pdev, be->readonly); - if (err) { - xenbus_dev_error(dev, err, "creating vbd structure"); - goto device_fail; - } - - frontend_changed(&be->watch, be->frontpath); - } - - out: - if (frontend) - kfree(frontend); - return; - - device_fail: - device_unregister(&be->dev->dev); - goto out; -} - -static int blkback_probe(struct xenbus_device *dev, - const struct xenbus_device_id *id) -{ - struct backend_info *be; - int err; - - be = kmalloc(sizeof(*be), GFP_KERNEL); - if (!be) { - xenbus_dev_error(dev, -ENOMEM, "allocating backend structure"); - return -ENOMEM; - } - - memset(be, 0, sizeof(*be)); + err = -ENOENT; + goto free_be; + } be->dev = dev; be->backend_watch.node = dev->nodename; be->backend_watch.callback = backend_changed; err = register_xenbus_watch(&be->backend_watch); if (err) { + be->backend_watch.node = NULL; xenbus_dev_error(dev, err, "adding backend watch on %s", dev->nodename); goto free_be; } + be->frontpath = frontend; + be->watch.node = be->frontpath; + be->watch.callback = frontend_changed; + err = register_xenbus_watch(&be->watch); + if (err) { + be->watch.node = NULL; + xenbus_dev_error(dev, err, + "adding frontend watch on %s", + be->frontpath); + goto free_be; + } + dev->data = be; backend_changed(&be->backend_watch, dev->nodename); - return err; + return 0; + free_be: + if (be->backend_watch.node) + unregister_xenbus_watch(&be->backend_watch); + if (frontend) + kfree(frontend); kfree(be); return err; } diff -r b402e77aac46 -r 630feabe7ed6 linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c --- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c Wed Aug 24 22:22:11 2005 +++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c Wed Aug 24 22:24:10 2005 @@ -1124,12 +1124,12 @@ xenbus_dev_error(dev, err, "granting access to ring page"); return err; } - info->grant_id = err; + info->ring_ref = err; op.u.alloc_unbound.dom = info->backend_id; err = HYPERVISOR_event_channel_op(&op); if (err) { - gnttab_end_foreign_access(info->grant_id, 0); + gnttab_end_foreign_access(info->ring_ref, 0); free_page((unsigned long)info->ring.sring); info->ring.sring = 0; xenbus_dev_error(dev, err, "allocating event channel"); @@ -1177,9 +1177,9 @@ goto destroy_blkring; } - err = xenbus_printf(dev->nodename, "grant-id","%u", info->grant_id); + err = xenbus_printf(dev->nodename, "ring-ref","%u", info->ring_ref); if (err) { - message = "writing grant-id"; + message = "writing ring-ref"; goto abort_transaction; } err = xenbus_printf(dev->nodename, diff -r b402e77aac46 -r 630feabe7ed6 linux-2.6-xen-sparse/drivers/xen/blkfront/block.h --- a/linux-2.6-xen-sparse/drivers/xen/blkfront/block.h Wed Aug 24 22:22:11 2005 +++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/block.h Wed Aug 24 22:24:10 2005 @@ -112,7 +112,7 @@ int connected; char *backend; int backend_id; - int grant_id; + int ring_ref; blkif_front_ring_t ring; unsigned int evtchn; struct xlbd_major_info *mi; diff -r b402e77aac46 -r 630feabe7ed6 linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c --- a/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Wed Aug 24 22:22:11 2005 +++ b/linux-2.6-xen-sparse/drivers/xen/netfront/netfront.c Wed Aug 24 22:24:10 2005 @@ -201,7 +201,6 @@ [BEST_CONNECTED] = "connected", }; -#define DEBUG #ifdef DEBUG #define DPRINTK(fmt, args...) \ printk(KERN_ALERT "xen_net (%s:%d) " fmt, __FUNCTION__, __LINE__, ##args) diff -r b402e77aac46 -r 630feabe7ed6 linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c Wed Aug 24 22:22:11 2005 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c Wed Aug 24 22:24:10 2005 @@ -639,7 +639,7 @@ bus_register(&xenbus_backend.bus); device_register(&xenbus_frontend.dev); device_register(&xenbus_backend.dev); - + if (!xen_start_info.store_evtchn) return 0; diff -r b402e77aac46 -r 630feabe7ed6 linux-2.6-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h --- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h Wed Aug 24 22:22:11 2005 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/mach-xen/setup_arch_post.h Wed Aug 24 22:24:10 2005 @@ -8,23 +8,12 @@ static char * __init machine_specific_memory_setup(void) { - char *who; - unsigned long start_pfn, max_pfn; - - who = "Xen"; - - /* In dom0, we have to start the fake e820 map above the first - * 1MB, in other domains, it can start at 0. */ - if (xen_start_info.flags & SIF_INITDOMAIN) - start_pfn = 0x100; - else - start_pfn = 0; - max_pfn = xen_start_info.nr_pages; + unsigned long max_pfn = xen_start_info.nr_pages; e820.nr_map = 0; - add_memory_region(PFN_PHYS(start_pfn), PFN_PHYS(max_pfn) - PFN_PHYS(start_pfn), E820_RAM); + add_memory_region(0, PFN_PHYS(max_pfn), E820_RAM); - return who; + return "Xen"; } void __init machine_specific_modify_cpu_capabilities(struct cpuinfo_x86 *c) diff -r b402e77aac46 -r 630feabe7ed6 tools/python/xen/xm/main.py --- a/tools/python/xen/xm/main.py Wed Aug 24 22:22:11 2005 +++ b/tools/python/xen/xm/main.py Wed Aug 24 22:24:10 2005 @@ -666,7 +666,7 @@ sys.exit(1) except XendError, ex: if len(args) > 0: - handle_xend_error(argv[1], args[0], ex) + handle_xend_error(argv[1], args[1], ex) else: print "Unexpected error:", sys.exc_info()[0] print diff -r b402e77aac46 -r 630feabe7ed6 xen/arch/x86/cpu/amd.c --- a/xen/arch/x86/cpu/amd.c Wed Aug 24 22:22:11 2005 +++ b/xen/arch/x86/cpu/amd.c Wed Aug 24 22:24:10 2005 @@ -8,6 +8,20 @@ #include <asm/processor.h> #include "cpu.h" + +/* + * amd_flush_filter={on,off}. Forcibly Enable or disable the TLB flush + * filter on AMD 64-bit processors. + */ +static int flush_filter_force; +static void flush_filter(char *s) +{ + if (!strcmp(s, "off")) + flush_filter_force = -1; + if (!strcmp(s, "on")) + flush_filter_force = 1; +} +custom_param("amd_flush_filter", flush_filter); #define num_physpages 0 @@ -190,6 +204,21 @@ case 6: set_bit(X86_FEATURE_K7, c->x86_capability); break; + } + + if (c->x86 == 15) { + rdmsr(MSR_K7_HWCR, l, h); + printk(KERN_INFO "CPU%d: AMD Flush Filter %sabled", + smp_processor_id(), (l & (1<<6)) ? "dis" : "en"); + if ((flush_filter_force > 0) && (l & (1<<6))) { + l &= ~(1<<6); + printk(" -> Forcibly enabled"); + } else if ((flush_filter_force < 0) && !(l & (1<<6))) { + l |= 1<<6; + printk(" -> Forcibly disabled"); + } + wrmsr(MSR_K7_HWCR, l, h); + printk("\n"); } display_cacheinfo(c); diff -r b402e77aac46 -r 630feabe7ed6 xen/arch/x86/mm.c --- a/xen/arch/x86/mm.c Wed Aug 24 22:22:11 2005 +++ b/xen/arch/x86/mm.c Wed Aug 24 22:24:10 2005 @@ -1449,8 +1449,10 @@ if ( ((x & PGT_type_mask) != PGT_l2_page_table) || ((type & PGT_type_mask) != PGT_l1_page_table) ) MEM_LOG("Bad type (saw %" PRtype_info - "!= exp %" PRtype_info ") for pfn %lx", - x, type, page_to_pfn(page)); + "!= exp %" PRtype_info ") " + "for mfn %lx (pfn %x)", + x, type, page_to_pfn(page), + machine_to_phys_mapping[page_to_pfn(page)]); return 0; } else if ( (x & PGT_va_mask) == PGT_va_mutable ) _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |