[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-3.1-testing] Merge with xen-unstable for 3.1.0-rc8
# HG changeset patch # User kfraser@xxxxxxxxxxxxxxxxxxxxx # Date 1178407618 -3600 # Node ID 1db5b82369eb0e975d53ba74c8a21dc5e840ee12 # Parent cc5800ecd71fd8116ca3c3de3027ba0e1bca8ce6 # Parent e370c94bd6fd0816fec9d654fecde28d8c618168 Merge with xen-unstable for 3.1.0-rc8 Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx> --- tools/blktap/drivers/block-qcow.c | 3 + tools/libxc/xc_hvm_build.c | 62 +++++++++++++++++++------------------- tools/python/xen/xend/XendAPI.py | 2 - xen/Makefile | 2 - 4 files changed, 35 insertions(+), 34 deletions(-) diff -r cc5800ecd71f -r 1db5b82369eb tools/blktap/drivers/block-qcow.c --- a/tools/blktap/drivers/block-qcow.c Thu May 03 19:28:14 2007 +0100 +++ b/tools/blktap/drivers/block-qcow.c Sun May 06 00:26:58 2007 +0100 @@ -199,7 +199,8 @@ static int init_aio_state(struct disk_dr } /* A segment (i.e. a page) can span multiple clusters */ - s->max_aio_reqs = (getpagesize() / s->cluster_size) + 1; + s->max_aio_reqs = ((getpagesize() / s->cluster_size) + 1) * + MAX_SEGMENTS_PER_REQ * MAX_REQUESTS; /* Initialize AIO */ s->iocb_free_count = s->max_aio_reqs; diff -r cc5800ecd71f -r 1db5b82369eb tools/libxc/xc_hvm_build.c --- a/tools/libxc/xc_hvm_build.c Thu May 03 19:28:14 2007 +0100 +++ b/tools/libxc/xc_hvm_build.c Sun May 06 00:26:58 2007 +0100 @@ -108,43 +108,45 @@ static void build_e820map(void *e820_pag *(((unsigned char *)e820_page) + E820_MAP_NR_OFFSET) = nr_map; } -static int -loadelfimage(struct elf_binary *elf, int xch, uint32_t dom, unsigned long *parray) +static int loadelfimage( + struct elf_binary *elf, int xch, uint32_t dom, unsigned long *parray) { privcmd_mmap_entry_t *entries = NULL; int pages = (elf->pend - elf->pstart + PAGE_SIZE - 1) >> PAGE_SHIFT; int i, rc = -1; - /* map hvmloader address space */ + /* Map address space for initial elf image. */ entries = malloc(pages * sizeof(privcmd_mmap_entry_t)); - if (NULL == entries) + if ( entries == NULL ) goto err; elf->dest = mmap(NULL, pages << PAGE_SHIFT, PROT_READ | PROT_WRITE, MAP_SHARED, xch, 0); - if (MAP_FAILED == elf->dest) + if ( elf->dest == MAP_FAILED ) goto err; - for (i = 0; i < pages; i++) + for ( i = 0; i < pages; i++ ) { entries[i].va = (uintptr_t)elf->dest + (i << PAGE_SHIFT); entries[i].mfn = parray[(elf->pstart >> PAGE_SHIFT) + i]; entries[i].npages = 1; } + rc = xc_map_foreign_ranges(xch, dom, entries, pages); - if (rc < 0) + if ( rc < 0 ) goto err; - /* load hvmloader */ + /* Load the initial elf image. */ elf_load_binary(elf); rc = 0; err: - /* cleanup */ - if (elf->dest) { + if ( elf->dest ) + { munmap(elf->dest, pages << PAGE_SHIFT); elf->dest = NULL; } - if (entries) + + if ( entries ) free(entries); return rc; @@ -166,13 +168,17 @@ static int setup_guest(int xc_handle, int rc; xen_capabilities_info_t caps; - if (0 != elf_init(&elf, image, image_size)) + /* An HVM guest must be initialised with at least 2MB memory. */ + if ( memsize < 2 ) + goto error_out; + + if ( elf_init(&elf, image, image_size) != 0 ) goto error_out; elf_parse_binary(&elf); v_start = 0; v_end = (unsigned long long)memsize << 20; - if (xc_version(xc_handle, XENVER_capabilities, &caps) != 0) + if ( xc_version(xc_handle, XENVER_capabilities, &caps) != 0 ) { PERROR("Could not get Xen capabilities\n"); goto error_out; @@ -185,9 +191,9 @@ static int setup_guest(int xc_handle, } IPRINTF("VIRTUAL MEMORY ARRANGEMENT:\n" - " Loaded HVM loader: %016"PRIx64"->%016"PRIx64"\n" - " TOTAL: %016"PRIx64"->%016"PRIx64"\n" - " ENTRY ADDRESS: %016"PRIx64"\n", + " Loader: %016"PRIx64"->%016"PRIx64"\n" + " TOTAL: %016"PRIx64"->%016"PRIx64"\n" + " ENTRY ADDRESS: %016"PRIx64"\n", elf.pstart, elf.pend, v_start, v_end, elf_uval(&elf, elf.ehdr, e_entry)); @@ -205,9 +211,8 @@ static int setup_guest(int xc_handle, /* Allocate memory for HVM guest, skipping VGA hole 0xA0000-0xC0000. */ rc = xc_domain_memory_populate_physmap( - xc_handle, dom, (nr_pages > 0xa0) ? 0xa0 : nr_pages, - 0, 0, &page_array[0x00]); - if ( (rc == 0) && (nr_pages > 0xc0) ) + xc_handle, dom, 0xa0, 0, 0, &page_array[0x00]); + if ( rc == 0 ) rc = xc_domain_memory_populate_physmap( xc_handle, dom, nr_pages - 0xc0, 0, 0, &page_array[0xc0]); if ( rc != 0 ) @@ -216,7 +221,8 @@ static int setup_guest(int xc_handle, goto error_out; } - loadelfimage(&elf, xc_handle, dom, page_array); + if ( loadelfimage(&elf, xc_handle, dom, page_array) != 0 ) + goto error_out; if ( (e820_page = xc_map_foreign_range( xc_handle, dom, PAGE_SIZE, PROT_READ | PROT_WRITE, @@ -328,12 +334,9 @@ static inline int is_loadable_phdr(Elf32 ((phdr->p_flags & (PF_W|PF_X)) != 0)); } -/* xc_hvm_build - * - * Create a domain for a virtualized Linux, using files/filenames - * +/* xc_hvm_build: + * Create a domain for a virtualized Linux, using files/filenames. */ - int xc_hvm_build(int xc_handle, uint32_t domid, int memsize, @@ -354,12 +357,9 @@ int xc_hvm_build(int xc_handle, return sts; } -/* xc_hvm_build_mem - * - * Create a domain for a virtualized Linux, using buffers - * +/* xc_hvm_build_mem: + * Create a domain for a virtualized Linux, using memory buffers. */ - int xc_hvm_build_mem(int xc_handle, uint32_t domid, int memsize, @@ -379,7 +379,7 @@ int xc_hvm_build_mem(int xc_handle, } img = xc_inflate_buffer(image_buffer, image_size, &img_len); - if (img == NULL) + if ( img == NULL ) { ERROR("unable to inflate ram disk buffer"); return -1; diff -r cc5800ecd71f -r 1db5b82369eb tools/python/xen/xend/XendAPI.py --- a/tools/python/xen/xend/XendAPI.py Thu May 03 19:28:14 2007 +0100 +++ b/tools/python/xen/xend/XendAPI.py Sun May 06 00:26:58 2007 +0100 @@ -1009,7 +1009,7 @@ class XendAPI(object): 'cpu_configuration': node.get_cpu_configuration(), 'metrics': node.host_metrics_uuid, 'capabilities': node.get_capabilities(), - 'supported_bootloaders': 'pygrub', + 'supported_bootloaders': ['pygrub'], 'sched_policy': node.get_vcpus_policy()} return xen_api_success(record) diff -r cc5800ecd71f -r 1db5b82369eb xen/Makefile --- a/xen/Makefile Thu May 03 19:28:14 2007 +0100 +++ b/xen/Makefile Sun May 06 00:26:58 2007 +0100 @@ -2,7 +2,7 @@ # All other places this is stored (eg. compile.h) should be autogenerated. export XEN_VERSION = 3 export XEN_SUBVERSION = 1 -export XEN_EXTRAVERSION ?= .0-rc7$(XEN_VENDORVERSION) +export XEN_EXTRAVERSION ?= .0-rc8$(XEN_VENDORVERSION) export XEN_FULLVERSION = $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION) -include xen-version _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |