From 5cc436c1d2b3b0be3f42104582f53eec3969b43a Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Fri, 28 May 2010 09:30:19 +0100 Subject: libxc: eliminate static variables, use xentoollog; API change This patch eliminate the global variables in libxenctrl (used for logging and error reporting). Instead the information which was in the global variables is now in a new xc_interface* opaque structure, which xc_interface open returns instead of the raw file descriptor; furthermore, logging is done via xentoollog. There are three new parameters to xc_interface_open to control the logging, but existing callers can just pass "0" for all three to get the old behaviour. All libxc callers have been adjusted accordingly. Also update QEMU_TAG for corresponding qemu change. Signed-off-by: Ian Jackson --- stubdom/grub/kexec.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'stubdom') diff --git a/stubdom/grub/kexec.c b/stubdom/grub/kexec.c index 5b86c502dc..5281d0b194 100644 --- a/stubdom/grub/kexec.c +++ b/stubdom/grub/kexec.c @@ -50,7 +50,7 @@ static unsigned long *pages; static unsigned long *pages_mfns; static unsigned long allocated; -int pin_table(int xc_handle, unsigned int type, unsigned long mfn, +int pin_table(xc_interface *xc_handle, unsigned int type, unsigned long mfn, domid_t dom); /* We need mfn to appear as target_pfn, so exchange with the MFN there */ @@ -109,7 +109,7 @@ void kexec(void *kernel, long kernel_size, void *module, long module_size, char int rc; domid_t domid = DOMID_SELF; xen_pfn_t pfn; - int xc_handle; + xc_interface *xc_handle; unsigned long i; void *seg; xen_pfn_t boot_page_mfn = virt_to_mfn(&_boot_page); @@ -118,9 +118,9 @@ void kexec(void *kernel, long kernel_size, void *module, long module_size, char unsigned long nr_m2p_updates; DEBUG("booting with cmdline %s\n", cmdline); - xc_handle = xc_interface_open(); + xc_handle = xc_interface_open(0,0,0); - dom = xc_dom_allocate(cmdline, features); + dom = xc_dom_allocate(xc_handle, cmdline, features); dom->allocate = kexec_allocate; dom->kernel_blob = kernel; @@ -160,7 +160,7 @@ void kexec(void *kernel, long kernel_size, void *module, long module_size, char #endif /* equivalent of xc_dom_mem_init */ - dom->arch_hooks = xc_dom_find_arch_hooks(dom->guest_type); + dom->arch_hooks = xc_dom_find_arch_hooks(xc_handle, dom->guest_type); dom->total_pages = start_info.nr_pages; /* equivalent of arch_setup_meminit */ @@ -238,7 +238,7 @@ void kexec(void *kernel, long kernel_size, void *module, long module_size, char munmap((void*) pages[pfn], PAGE_SIZE); /* Pin the boot page table base */ - if ( (rc = pin_table(dom->guest_xc, + if ( (rc = pin_table(dom->xch, #ifdef __i386__ MMUEXT_PIN_L3_TABLE, #endif -- cgit v1.2.3