common code changes for PowerPC merge
PATCH 1/1 common code changes for PowerPC merge
As requested, here are the broken-out changes to common code for the PowerPC merge. These patches do not depend on each other.
Signature · 2 lines
Hollis Blanchard IBM Linux Technology Center
_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel
PATCH 1/1 add PowerPC files to .hgignore
# HG changeset patch
# User Hollis Blanchard <[email protected]> # Date 1152744165 18000
# Node ID f1fa1cc62c4c821f15fb530db8f5bb291bd77a4c # Parent a1c2cede77c78d2af99088d7dece8f74f2a27260 [powerpc] add PowerPC files to .hgignore
.hgignore +4 -0
@@ -203,3 +203,7 @@ ^xen/xen$ ^xen/xen-syms$ ^xen/xen\..*$ +^xen/arch/ppc/dom0\.bin$ +^xen/arch/ppc/asm-offsets\.s$ +^xen/arch/ppc/firmware +^xen/arch/ppc/firmware_image
PATCH 1/1 add arch-powerpc.h to xen.h
In reply to Hollis Blanchard# HG changeset patch
# User Hollis Blanchard <[email protected]> # Date 1152744165 18000
# Node ID f4654c1450a8c56bf9f439f09026c093cf3cb7d9 # Parent f1fa1cc62c4c821f15fb530db8f5bb291bd77a4c [powerpc] add arch-powerpc.h to xen.h
xen/include/public/xen.h +2 -0
@@ -15,6 +15,8 @@#include "arch-x86_64.h" #elif defined(__ia64__)#include "arch-ia64.h" +#elif defined(__powerpc__) +#include "arch-powerpc.h" #else #error "Unsupported architecture"#endif
PATCH 1/1 add PowerPC support to Makefiles
In reply to Hollis Blanchard# HG changeset patch
# User Hollis Blanchard <[email protected]> # Date 1152744165 18000
# Node ID 49de99129bc4d762bc71b5559d0102c5691aa61e # Parent f4654c1450a8c56bf9f439f09026c093cf3cb7d9 [powerpc] add PowerPC support to Makefiles
Config.mk +2 -2
@@ -3,8 +3,8 @@ # A debug build of Xen and tools? debug ?= n -# Currently supported architectures: x86_32, x86_64 -XEN_COMPILE_ARCH ?= $(shell uname -m | sed -e s/i.86/x86_32/) +XEN_COMPILE_ARCH ?= $(shell uname -m | sed -e s/i.86/x86_32/ \ + -e s/ppc/powerpc/) XEN_TARGET_ARCH ?= $(XEN_COMPILE_ARCH) XEN_TARGET_X86_PAE ?= n
xen/Rules.mk +4 -2
@@ -23,8 +23,10 @@ include $(XEN_ROOT)/Config.mk # Set ARCH/SUBARCH appropriately. override COMPILE_SUBARCH := $(XEN_COMPILE_ARCH) override TARGET_SUBARCH := $(XEN_TARGET_ARCH) -override COMPILE_ARCH := $(patsubst x86%,x86,$(XEN_COMPILE_ARCH)) -override TARGET_ARCH := $(patsubst x86%,x86,$(XEN_TARGET_ARCH)) +override COMPILE_ARCH := $(shell echo $(XEN_COMPILE_ARCH) | \ + sed -e 's/\(x86\|powerpc\).*/\1/') +override TARGET_ARCH := $(shell echo $(XEN_TARGET_ARCH) | \ + sed -e 's/\(x86\|powerpc\).*/\1/') TARGET := $(BASEDIR)/xen
PATCH 1/1 PPC doesn't support ballooning yet
In reply to Hollis Blanchard# HG changeset patch
# User Hollis Blanchard <[email protected]> # Date 1152744165 18000
# Node ID 5a11149db4c2f30cd81689a5eefc370c7fc4c410 # Parent 49de99129bc4d762bc71b5559d0102c5691aa61e [powerpc] [xend] PPC doesn't support ballooning yet
tools/python/xen/xend/XendDomainInfo.py +3 -2
@@ -1282,8 +1282,9 @@ class XendDomainInfo: xc.domain_setmaxmem(self.domid, m) init_reservation = self.info['memory'] * 1024 - if os.uname()[4] == 'ia64': - # Workaround until ia64 properly supports ballooning. + if os.uname()[4] in ('ia64', 'ppc64'): + # Workaround for architectures that don't yet support + # ballooning. init_reservation = m xc.domain_memory_increase_reservation(self.domid, init_reservation,
PATCH 1/1 print page->count_info as unsigned long
In reply to Hollis Blanchard# HG changeset patch
# User Hollis Blanchard <[email protected]> # Date 1152744166 18000
# Node ID 9157cbc1793231f2c95a4bdbba4a8e70681b1c6d # Parent 5a11149db4c2f30cd81689a5eefc370c7fc4c410 [powerpc] print page->count_info as unsigned long
xen/common/memory.c +2 -2
@@ -174,9 +174,9 @@ guest_remove_page( {/* We'll make this a guest-visible error in future, so take heed! */ DPRINTK ("Dom%d freeing in-use page %lx (pseudophys %lx):" -" count=%x type=%lx\n" , +" count=%lx type=%lx\n" , d->domain_id, mfn,get_gpfn_from_mfn (mfn), - page->count_info, page->u.inuse.type_info); + (unsigned long )page->count_info, page->u.inuse.type_info); }guest_physmap_remove_page (d, gmfn, mfn);
PATCH 1/1 support additional interrupt controller types in xen/arch/x86/irq.c
In reply to Hollis Blanchard# HG changeset patch
# User Hollis Blanchard <[email protected]>
# Date 1152744166 18000
# Node ID d3533a195a15902ad8b7bd0b9118118fae18e79c
# Parent 9157cbc1793231f2c95a4bdbba4a8e70681b1c6d
[powerpc] support additional interrupt controller types in xen/arch/x86/irq.c PowerPC #includes xen/arch/x86/irq.c, so we need to support MPIC and XT-PIC interrupt controllers here.
xen/arch/x86/irq.c +14 -0
@@ -397,6 +397,20 @@ int pirq_acktype(int irq)*/ if ( !strcmp (desc->handler->typename,"IO-APIC-level" ) )return ioapic_ack_new ?ACKTYPE_EOI :ACKTYPE_UNMASK ; + +/* Legacy PIC interrupts can be acknowledged from any CPU. */ +if ( !strcmp (desc->handler->typename,"XT-PIC" ) ) +return ACKTYPE_UNMASK ; + +if (strstr (desc->handler->typename,"MPIC" ) ) { +if (desc->status &IRQ_LEVEL ) { +if (desc->status &IRQ_PER_CPU ) +return ACKTYPE_EOI ; +else +return ACKTYPE_UNMASK ; + } +return ACKTYPE_NONE ; + }BUG ();return 0 ;
xen/include/xen/irq.h +1 -0
@@ -22,6 +22,7 @@ struct irqaction#define IRQ_PENDING 4/* IRQ pending - replay on enable */ #define IRQ_REPLAY 8/* IRQ has been replayed but not acked yet */ #define IRQ_GUEST 16/* IRQ is handled by guest OS(es) */ +#define IRQ_LEVEL 64/* IRQ level triggered */ #define IRQ_PER_CPU 256/* IRQ is per CPU */ /*
PATCH 1/1 add PowerPC support to libxc
In reply to Hollis Blanchard# HG changeset patch
# User Hollis Blanchard <[email protected]> # Date 1152744261 18000
# Node ID 8400d02096faf9fd566c9ea73a57811ac5d34acd # Parent d3533a195a15902ad8b7bd0b9118118fae18e79c [powerpc] add PowerPC support to libxc
tools/libxc/Makefile +4 -2
@@ -26,11 +26,13 @@ CTRL_SRCS-$(CONFIG_Linux) += xc_linux.c CTRL_SRCS-$(CONFIG_Linux) += xc_linux.c GUEST_SRCS-y := -GUEST_SRCS-y += xc_linux_build.c GUEST_SRCS-y += xc_load_bin.c GUEST_SRCS-y += xc_load_elf.c GUEST_SRCS-y += xg_private.c -GUEST_SRCS-$(CONFIG_IA64) += xc_ia64_stubs.c +GUEST_SRCS-$(CONFIG_POWERPC) += xc_ppc_linux_build.c +GUEST_SRCS-$(CONFIG_X86) += xc_linux_build.c +GUEST_SRCS-$(CONFIG_IA64) += xc_ia64_stubs.c xc_linux_build.c +GUEST_SRCS-$(CONFIG_PLAN9) += xc_load_aout9.c GUEST_SRCS-$(CONFIG_MIGRATE) += xc_linux_restore.c xc_linux_save.c GUEST_SRCS-$(CONFIG_HVM) += xc_hvm_build.c
tools/libxc/xc_load_elf.c +4 -0
@@ -38,6 +38,10 @@ loadelfsymtab(#define ELFCLASS ELFCLASS64#define ELFDATA ELFDATA2LSB#define ELFMACHINE EM_X86_64 +#elif defined(__powerpc__) +#define ELFCLASS ELFCLASS64 +#define ELFDATA ELFDATA2MSB +#define ELFMACHINE EM_PPC64#endif int probe_elf(const char *image,
tools/libxc/xenctrl.h +5 -0
@@ -47,6 +47,11 @@#define mb ()#define rmb ()#define wmb () +#elif defined(__powerpc__) +/* XXX loosen these up later */ +#define mb () __asm__ __volatile__ ("sync" : : : "memory") +#define rmb () __asm__ __volatile__ ("sync" : : : "memory")/* lwsync? */ +#define wmb () __asm__ __volatile__ ("sync" : : : "memory")/* eieio? */ #else #error "Define barriers"#endif
PATCH 1/1 add xencomm header, which is shared with Linux
In reply to Hollis Blanchard# HG changeset patch
# User Hollis Blanchard <[email protected]>
# Date 1152744412 18000
# Node ID d9aba25e6e7d3a5811850c73b98e07d67187928a # Parent 8400d02096faf9fd566c9ea73a57811ac5d34acd [powerpc] add xencomm header, which is shared with Linux
Re: [PATCH 7 of 8] [powerpc] add PowerPC support to libxc
In reply to Hollis BlanchardLe Jeudi 13 Juillet 2006 00:55, Hollis Blanchard a écrit :
[...]
On ia64, we have created a tools/libxc/ia64 directory.
This is because we have a few ia64 specific files (at least 4). This hasn't been merged yet but the idea seems to have already been discussed and accepted.
Tristan.