ia64/xen-unstable

changeset 13953:c7251801580a

[POWERPC][XEN] Opt out of new libxc domain builder.
PowerPC needs more flexibility than the new framework allows.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
author Hollis Blanchard <hollisb@us.ibm.com>
date Fri Feb 09 14:43:21 2007 -0600 (2007-02-09)
parents 1b74475ad511
children 632d8e576900
files tools/libxc/Makefile tools/libxc/xc_dom_powerpc64.c
line diff
     1.1 --- a/tools/libxc/Makefile	Fri Feb 09 14:43:21 2007 -0600
     1.2 +++ b/tools/libxc/Makefile	Fri Feb 09 14:43:21 2007 -0600
     1.3 @@ -49,15 +49,8 @@ GUEST_SRCS-y += $(LIBELF_SRCS)
     1.4  GUEST_SRCS-y += xc_dom_core.c xc_dom_boot.c
     1.5  GUEST_SRCS-y += xc_dom_elfloader.c
     1.6  GUEST_SRCS-y += xc_dom_binloader.c
     1.7 -
     1.8 -ifeq ($(CONFIG_POWERPC),y)
     1.9 -# big endian boxes
    1.10 -GUEST_SRCS-y += xc_dom_powerpc64.c
    1.11 -else
    1.12 -# little endian boxes
    1.13  GUEST_SRCS-y += xc_dom_x86.c
    1.14  GUEST_SRCS-y += xc_dom_ia64.c
    1.15 -endif
    1.16  
    1.17  GUEST_SRCS-$(CONFIG_X86)     += xc_dom_compat_linux.c
    1.18  GUEST_SRCS-$(CONFIG_IA64)    += xc_dom_compat_linux.c
     2.1 --- a/tools/libxc/xc_dom_powerpc64.c	Fri Feb 09 14:43:21 2007 -0600
     2.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.3 @@ -1,100 +0,0 @@
     2.4 -/*
     2.5 - * Xen domain builder -- ia64 bits.
     2.6 - *
     2.7 - * Most architecture-specific code for ia64 goes here.
     2.8 - *   - fill architecture-specific structs.
     2.9 - *
    2.10 - * This code is licenced under the GPL.
    2.11 - * written 2006 by Gerd Hoffmann <kraxel@suse.de>.
    2.12 - *
    2.13 - */
    2.14 -#include <stdio.h>
    2.15 -#include <stdlib.h>
    2.16 -#include <string.h>
    2.17 -#include <inttypes.h>
    2.18 -
    2.19 -#include <xen/xen.h>
    2.20 -
    2.21 -#include "xg_private.h"
    2.22 -#include "xc_dom.h"
    2.23 -
    2.24 -/* ------------------------------------------------------------------------ */
    2.25 -
    2.26 -static int alloc_magic_pages(struct xc_dom_image *dom)
    2.27 -{
    2.28 -    /* allocate special pages */
    2.29 -    dom->low_top--; /* shared_info */
    2.30 -    dom->xenstore_pfn = --dom->low_top;
    2.31 -    dom->console_pfn = --dom->low_top;
    2.32 -    dom->start_info_pfn = --dom->low_top;
    2.33 -    return 0;
    2.34 -}
    2.35 -
    2.36 -static int start_info(struct xc_dom_image *dom)
    2.37 -{
    2.38 -    start_info_t *si =
    2.39 -	xc_dom_pfn_to_ptr(dom, dom->start_info_pfn, 1);
    2.40 -
    2.41 -    xc_dom_printf("%s\n", __FUNCTION__);
    2.42 -
    2.43 -    snprintf(si->magic, sizeof(si->magic), "xen-%d.%d-powerpc64HV", 3, 0);
    2.44 -
    2.45 -    si->nr_pages = dom->total_pages;
    2.46 -    si->shared_info = (dom->total_pages - 1) << PAGE_SHIFT;
    2.47 -    si->store_mfn = dom->xenstore_pfn;
    2.48 -    si->store_evtchn = dom->store_evtchn;
    2.49 -    si->console.domU.mfn = dom->console_pfn;
    2.50 -    si->console.domU.evtchn = dom->console_evtchn;
    2.51 -    return 0;
    2.52 -}
    2.53 -
    2.54 -static int shared_info(struct xc_dom_image *dom, void *ptr)
    2.55 -{
    2.56 -    shared_info_t *shared_info = ptr;
    2.57 -    int i;
    2.58 -
    2.59 -    xc_dom_printf("%s: called\n", __FUNCTION__);
    2.60 -
    2.61 -    memset(shared_info, 0, sizeof(*shared_info));
    2.62 -    return 0;
    2.63 -}
    2.64 -
    2.65 -static int vcpu(struct xc_dom_image *dom, void *ptr)
    2.66 -{
    2.67 -    vcpu_guest_context_t *ctxt = ptr;
    2.68 -
    2.69 -    xc_dom_printf("%s: called\n", __FUNCTION__);
    2.70 -
    2.71 -    /* clear everything */
    2.72 -    memset(ctxt, 0, sizeof(*ctxt));
    2.73 -
    2.74 -    memset(&ctxt->user_regs, 0x55, sizeof(ctxt.user_regs));
    2.75 -    ctxt->user_regs.pc = dsi->v_kernentry;
    2.76 -    ctxt->user_regs.msr = 0;
    2.77 -    ctxt->user_regs.gprs[1] = 0; /* Linux uses its own stack */
    2.78 -    ctxt->user_regs.gprs[3] = devtree_addr;
    2.79 -    ctxt->user_regs.gprs[4] = kern_addr;
    2.80 -    ctxt->user_regs.gprs[5] = 0;
    2.81 -
    2.82 -    /* There is a buggy kernel that does not zero the "local_paca", so
    2.83 -     * we must make sure this register is 0 */
    2.84 -    ctxt->user_regs.gprs[13] = 0;
    2.85 -
    2.86 -    return 0;
    2.87 -}
    2.88 -
    2.89 -/* ------------------------------------------------------------------------ */
    2.90 -
    2.91 -static struct xc_dom_arch xc_dom_arch = {
    2.92 -    .guest_type = "xen-3.0-powerpc64",
    2.93 -    .page_shift = FIXME,
    2.94 -    .alloc_magic_pages = alloc_magic_pages,
    2.95 -    .start_info = start_info,
    2.96 -    .shared_info = shared_info,
    2.97 -    .vcpu = vcpu,
    2.98 -};
    2.99 -
   2.100 -static void __init register_arch_hooks(void)
   2.101 -{
   2.102 -    xc_dom_register_arch_hooks(&xc_dom_arch);
   2.103 -}