Re: [XenPPC][Patch] Kernel patch for xm save/restore

2006-11-01 Thread Hollis Blanchard
On Wed, 2006-11-01 at 17:21 -0500, geyi wrote:
> diff -r f4d382795e57 arch/powerpc/platforms/xen/reboot.c
> --- a/arch/powerpc/platforms/xen/reboot.c   Wed Oct 25 17:22:54
> 2006 -0400
> +++ b/arch/powerpc/platforms/xen/reboot.c   Wed Nov 01 17:11:58
> 2006 -0500
> @@ -1,9 +1,19 @@
>   #include 
> +#include 
>   #include 
>   #include 
>   #include 
>   #include 
>   #include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#define  SHUTDOWN_INVALID  -1
> +
> +static int shutting_down ; 

This patch won't apply (notice the whitespace problems). You will need
to use a mailer other than Thunderbird.

-- 
Hollis Blanchard
IBM Linux Technology Center


___
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel


[XenPPC][Patch] Kernel patch for xm save/restore

2006-11-01 Thread geyi

diff -r f4d382795e57 arch/powerpc/platforms/xen/hcall.c
--- a/arch/powerpc/platforms/xen/hcall.cWed Oct 25 17:22:54 2006 -0400
+++ b/arch/powerpc/platforms/xen/hcall.cFri Oct 13 13:56:04 2006 -0500
@@ -256,6 +256,7 @@ static int xenppc_privcmd_domctl(privcmd
case XEN_DOMCTL_pausedomain:
case XEN_DOMCTL_unpausedomain:
case XEN_DOMCTL_getdomaininfo:
+   case XEN_DOMCTL_getshadowlist:
break;
case XEN_DOMCTL_getmemlist:
ret = xencomm_create(
diff -r f4d382795e57 arch/powerpc/platforms/xen/reboot.c
--- a/arch/powerpc/platforms/xen/reboot.c   Wed Oct 25 17:22:54 2006 -0400
+++ b/arch/powerpc/platforms/xen/reboot.c   Wed Nov 01 17:11:58 2006 -0500
@@ -1,9 +1,19 @@
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#define  SHUTDOWN_INVALID  -1
+
+static int shutting_down ;

 static void domain_machine_restart(char * __unused)
 {
@@ -31,3 +41,86 @@ void xen_reboot_init(struct machdep_call
ppc_md.halt  = domain_machine_power_off;
}
 }
+
+static void switch_idle_mm(void)
+{
+   struct mm_struct *mm = current->active_mm;
+
+   if (mm == &init_mm)
+   return;
+
+   atomic_inc(&init_mm.mm_count);
+   switch_mm(mm, &init_mm, current);
+   current->active_mm = &init_mm;
+   mmdrop(mm);
+}
+
+int ppc_do_suspend(void *ignore)
+{
+   int  err;
+   enum system_states temp_state;
+
+   BUG_ON(smp_processor_id() != 0);
+   BUG_ON(in_interrupt());
+
+#ifndef CONFIG_PPC_XEN
+   if (xen_feature(XENFEAT_auto_translated_physmap)) {
+   printk(KERN_WARNING "Cannot suspend in "
+  "auto_translated_physmap mode.\n");
+   return -EOPNOTSUPP;
+   }
+#endif
+   err = smp_suspend();
+   if (err)
+   return err;
+
+   xenbus_suspend();
+
+   preempt_disable();
+
+   __cli();
+   
+   temp_state = system_state;
+   system_state = SYSTEM_SUSPEND_DISK;
+
+   preempt_enable();
+
+   gnttab_suspend();
+
+   HYPERVISOR_shared_info = (shared_info_t *)empty_zero_page;
+
+   xen_start_info->store_mfn = mfn_to_pfn(xen_start_info->store_mfn);
+   xen_start_info->console_mfn = mfn_to_pfn(xen_start_info->console_mfn);
+
+   /*
+* We'll stop somewhere inside this hypercall. When it returns,
+* we'll start resuming after the restore.
+*/
+   HYPERVISOR_suspend(virt_to_mfn(xen_start_info));
+
+   shutting_down = SHUTDOWN_INVALID;
+   
+   printk("Here we're resuming \n");  //DEBUG
+
+	HYPERVISOR_shared_info = (shared_info_t 
*)__va(xen_start_info->shared_info);

+   memset(empty_zero_page, 0, PAGE_SIZE);
+
+   gnttab_resume();
+
+   irq_resume();
+
+   switch_idle_mm();
+
+   system_state = temp_state;
+
+   __sti();
+
+   xencons_resume();
+
+   xenbus_resume();
+
+   smp_resume();
+
+   return err;
+}
+
diff -r f4d382795e57 drivers/xen/core/reboot.c
--- a/drivers/xen/core/reboot.c Wed Oct 25 17:22:54 2006 -0400
+++ b/drivers/xen/core/reboot.c Wed Nov 01 17:14:40 2006 -0500
@@ -151,7 +151,7 @@ static int __do_suspend(void *ignore)
HYPERVISOR_suspend(virt_to_mfn(xen_start_info));

shutting_down = SHUTDOWN_INVALID;
-
+   
set_fixmap(FIX_SHARED_INFO, xen_start_info->shared_info);

HYPERVISOR_shared_info = (shared_info_t *)fix_to_virt(FIX_SHARED_INFO);
@@ -192,13 +192,15 @@ static int __do_suspend(void *ignore)

return err;
 }
-#else  /* CONFIG_PPC_XEN */
+
+#else
+int ppc_do_suspend(void *ignore);
 static int __do_suspend(void *ignore)
 {
printk("SUSPEND!!??\n");
-   return 0;
-}
-#endif  /* CONFIG_PPC_XEN */
+   return ppc_do_suspend(ignore);
+}
+#endif

 static int shutdown_process(void *__unused)
 {
diff -r f4d382795e57 include/asm-powerpc/system.h
--- a/include/asm-powerpc/system.h  Wed Oct 25 17:22:54 2006 -0400
+++ b/include/asm-powerpc/system.h  Thu Oct 05 15:13:38 2006 -0500
@@ -433,5 +433,12 @@ extern void account_system_vtime(struct
 extern void account_system_vtime(struct task_struct *);
 #endif

+#ifndef__cli
+
+#define __cli() local_irq_disable()
+#define__sti() local_irq_enable()
+#endif /* __cli */
+
+
 #endif /* __KERNEL__ */
 #endif /* _ASM_POWERPC_SYSTEM_H */
diff -r f4d382795e57 include/asm-powerpc/xen/asm/hypercall.h
--- a/include/asm-powerpc/xen/asm/hypercall.h   Wed Oct 25 17:22:54 2006 -0400
+++ b/include/asm-powerpc/xen/asm/hypercall.h   Thu Oct 05 15:16:40 2006 -0500
@@ -60,6 +60,16 @@ static inline int HYPERVISOR_shutdown(un
return HYPERVISOR_sched_op(SCHEDOP_shutdown, &sched_shutdown);
 }

+
+static inline int HYPERVISOR_suspend(unsigned long srec)
+{
+   struct sched_shutdown sched_shutdown = {
+   .reason = SHUTDOWN_suspend
+   };
+
+   return HYPERVISOR_sched_op

[XenPPC][Patch] xc_ppc_linux_save.c xc_ppc_linux_restore.c

2006-11-01 Thread geyi

These two files need to be put under tools/libxc/powerpc64 .
/**
 * xc_ppc_linux_save.c
 *
 * Save the state of a running Linux session.
 *
 * Copyright (c) 2003, K A Fraser.
 *  Rewritten for ppc
 */

#include 
#include 
#include 
#include 
#include 
#include "htab.h"

#include "xg_private.h"

/*
** Default values for important tuning parameters. Can override by passing
** non-zero replacement values to xc_linux_save().
**
** XXX SMH: should consider if want to be able to override MAX_MBIT_RATE too.
**
*/
#define DEF_MAX_ITERS(4 - 1)/* limit us to 4 times round loop  */
#define DEF_MAX_FACTOR   3  /* never send more than 3x nr_pfns */

/*
** During (live) save/migrate, we maintain a number of bitmaps to track
** which pages we have to send, and to skip.
*/

#define DECOR 0x8000// indicates htab address
//#define DECOR 0x40// indicates htab address
#define LOG_PTE_SIZE4

#define INVALID_MFN   (~0ULL)

#define BITS_PER_LONG (sizeof(unsigned long) * 8)

#define BITMAP_ENTRY(_nr,_bmap) \
   ((unsigned long *)(_bmap))[(_nr)/BITS_PER_LONG]

#define BITMAP_SHIFT(_nr) ((_nr) % BITS_PER_LONG)

static inline int test_bit (int nr, volatile void * addr)
{
return (BITMAP_ENTRY(nr, addr) >> BITMAP_SHIFT(nr)) & 1;
}

static inline void clear_bit (int nr, volatile void * addr)
{
BITMAP_ENTRY(nr, addr) &= ~(1UL << BITMAP_SHIFT(nr));
}

static inline void set_bit ( int nr, volatile void * addr)
{
BITMAP_ENTRY(nr, addr) |= (1UL << BITMAP_SHIFT(nr));
}

/* total number of pages used by the current guest */
static unsigned long max_pfn;


static int
suspend_and_state(int (*suspend)(int), int xc_handle, int io_fd,
  int dom, xc_dominfo_t *info)
{
int i = 0;

DPRINTF("suspend_and_state()\n");
if (!(*suspend)(dom)) {
ERROR("Suspend request failed");
return -1;
}

retry:
if (xc_domain_getinfo(xc_handle, dom, 1, info) != 1) {
ERROR("Could not get domain info");
return -1;
}

if (info->shutdown && info->shutdown_reason == SHUTDOWN_suspend)
return 0; // success

if (info->paused) {
// try unpausing domain, wait, and retest
xc_domain_unpause(xc_handle, dom);

ERROR("Domain was paused. Wait and re-test.");
usleep(1);  // 10ms

goto retry;
}


if(++i < 100) {
ERROR("Retry suspend domain.");
usleep(1);  // 10ms
goto retry;
}

ERROR("Unable to suspend domain.");

return -1;
}

static inline ssize_t
write_exact(int fd, void *buf, size_t count)
{
if (write(fd, buf, count) != count)
return 0;
return 1;
}

int
xc_linux_save(int xc_handle, int io_fd, uint32_t dom, uint32_t max_iters,
  uint32_t max_factor, uint32_t flags, int (*suspend)(int))
{
DECLARE_DOMCTL;
xc_dominfo_t info;

int rc = 1;
int debug = 0;

/* The new domain's shared-info frame number. */
unsigned long shared_info_frame;

/* A copy of the CPU context of the guest. */
vcpu_guest_context_t ctxt;

xen_pfn_t *page_array = NULL;

/* Live mapping of shared info structure */
shared_info_t *live_shinfo = NULL;


DPRINTF("xc_linux_save (ppc): started dom=%d\n", dom);

if (xc_domain_getinfo(xc_handle, dom, 1, &info) != 1) {
ERROR("Could not get domain info");
return 1;
}

shared_info_frame = info.shared_info_frame;

/* Map the shared info frame */
live_shinfo = xc_map_foreign_range(xc_handle, dom, PAGE_SIZE,
   PROT_READ, shared_info_frame);
if (!live_shinfo) {
ERROR("Couldn't map live_shinfo");
goto out;
}

max_pfn = info.max_memkb >> (PAGE_SHIFT - 10);

DPRINTF("max_pfn: 0x%08lx\n", max_pfn);

page_array = malloc(max_pfn * sizeof(xen_pfn_t));
if (page_array == NULL) {
ERROR("Could not allocate memory");
goto out;
}

/* This is expected by xm restore.  */
if (!write_exact(io_fd, &max_pfn, sizeof(unsigned long))) {
ERROR("write: max_pfn");
goto out;
}

/* xc_linux_restore starts to read here.  */
/* Write a version number.  This can avoid searching for a stupid bug
   if the format change.
   The version is hard-coded, don't forget to change the restore code
   too!  */
{
unsigned long version = 1;

if (!write_exact(io_fd, &version, sizeof(unsigned long))) {
ERROR("write: version");
goto out;
}
}

#if 0
domctl.cmd = XEN_DOMCTL_arch_setup;
domctl.domain = (domid_t)dom;
domctl.u.arch_setup.flags = XEN_DOMAINSETUP_query;
if (xc_domctl(xc_handle, &domctl) < 0) {
ERROR("Could not get domain setup");
goto out;
}
if (!write_exact(io_fd, &domctl.u.arch_setup,
 sizeof(domctl.u.arch_setup

Re: FYI: Re: [XenPPC] problem of ssh to domU on js21

2006-11-01 Thread Hao Yu
Hi Jimi,

It's great you can reproduce the problem. I do not recall that I have seen
those lines. I need to check it in 30 mins. Right now, the environment is
under rebuilding.

Thanks,
Hao



   
 Jimi Xenidis  
 <[EMAIL PROTECTED] 
 .com>  To 
   Hao Yu/Watson/[EMAIL PROTECTED]  
   
 11/01/2006 03:19   cc 
 PMxen-ppc-devel@lists.xensource.com   
   Subject 
   Re: FYI: Re: [XenPPC] problem of
   ssh to domU on js21 
   
   
   
   
   
   




Thanks Hao, I'm able to reproduce this.
The only reason we can actually use anything is because networking is
S forgiving.
I think I have the solution to this, it will require some re-writing
which should get done by the end of the week.

BTW: you should have gotten lines like:
   (XEN) (file=grant_table.c, line=356) Bad handle (2).
   (XEN) (file=grant_table.c, line=356) Bad handle (13).
   (XEN) (file=grant_table.c, line=356) Bad handle (6).
   gnt_unmap: -2
   (XEN) (file=grant_table.c, line=356) Bad handle (16).
   gnt_unmap: -2
   (XEN) (file=grant_table.c, line=356) Bad handle (2).

out of the machine console, do you see those as well?

Thanks.
-JX
On Nov 1, 2006, at 12:18 PM, Hao Yu wrote:

> Hi, Here is backtrace message from the 0.mon> console
>
> 0:mon> t
> [c06ab530] c02dbf7c .network_tx_buf_gc+0x11c/0x2f0
> (unreliable)
> [c06ab610] c02deed4 .netif_int+0x54/0x120
> [c06ab6b0] c008b824 .handle_IRQ_event+0x84/0x100
> [c06ab750] c008ba70 .__do_IRQ+0x1d0/0x2b0
> [c06ab810] c02c777c .evtchn_do_upcall+0x11c/0x170
> [c06ab8d0] c00445a0 .xen_get_irq+0x10/0x30
> [c06ab950] c000bf10 .do_IRQ+0x70/0x100
> [c06ab9d0] c00041ec hardware_interrupt_entry+0xc/0x10
> --- Exception: 501 (Hardware Interrupt) at c003bcc0
> .plpar_hcall_norets+0x10/0x1c
> [link register   ] c0045534 .HYPERVISOR_sched_op+0x124/0x150
> [c06abcc0] c05a06e0 (unreliable)
> [c06abd70] c004609c .xen_power_save+0x7c/0xa0
> [c06abdf0] c0012060 .cpu_idle+0xe0/0x150
> [c06abe70] c00095dc .rest_init+0x3c/0x60
> [c06abef0] c052d958 .start_kernel+0x278/0x2e0
> [c06abf90] c00084fc .start_here_common+0x50/0x54
> 0:mon> X
> Oops: Kernel access of bad area, sig: 11 [#1]
> SMP NR_CPUS=32
> Modules linked in:
> NIP: C02DBFB0 LR: C02DBF8C CTR: C02DEE80
> REGS: c06ab2b0 TRAP: 0300   Not tainted  (2.6.17-Xen)
> MSR: 80001432   CR: 2882  XER: 6005
> DAR: 00C2, DSISR: 4000
> TASK = c05748a0[0] 'swapper' THREAD: c06a8000 CPU: 0
> GPR00:  C06AB530 C06A9718
> C0003FFB9678
> GPR04:  C071B5D8 C06AB510
> 
> GPR08:  0003 D8008000
> 00C2
> GPR12: 80009032 C0575100 
> 
> GPR16:   
> C0003FFB8000
> GPR20: C0568100 C0003FFB8670 0004
> 004C
> GPR24: 0048 0020 0002
> 004B
> GPR28: 0004 C0003FFB9680 C05FB020
> C0003FFB8500
> NIP [C02DBFB0] .network_tx_buf_gc+0x150/0x2f0
> LR [C02DBF8C] .network_tx_buf_gc+0x12c/0x2f0
> Call Trace:
> [C06AB530] [C02DBF7C] .network_tx_buf_gc+0x11c/0x2f0
> (unreliable)
> [C06AB610] [C02DEED4] .netif_int+0x54/0x120
> [C06AB6B0] [C008B824] .handle_IRQ_event+0x84/0x100
> [C06AB750] [C008BA70] .__do_IRQ+0x1d0/0x2b0
> [C06AB810] [C02C777C] .evtchn_do_upcall+0x11c/0x170
> [C06AB8D0] [C00445A0] .xen_get_irq+0x10/0x30
> [C06AB950] [C000BF10] .do_IRQ+0x70/0x100
> [C06AB9D0] [C00041EC] hardware_interrupt_entry+0xc/
> 0x10
> --- Exception: 501 at .plpar_

Re: [XenPPC] Re: [Xen Wiki] Update of "XenPPC/Run" by JeroneYoung

2006-11-01 Thread Segher Boessenkool

+ SLOTH firmware loads up. You will PXE boot the Xen image built


putting an example of the command line to enter when using Sloth. I  
was


It's not called SLOTH, it's SLOF :-)


Segher


___
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel


Re: FYI: Re: [XenPPC] problem of ssh to domU on js21

2006-11-01 Thread Jimi Xenidis

Thanks Hao, I'm able to reproduce this.
The only reason we can actually use anything is because networking is  
S forgiving.
I think I have the solution to this, it will require some re-writing  
which should get done by the end of the week.


BTW: you should have gotten lines like:
  (XEN) (file=grant_table.c, line=356) Bad handle (2).
  (XEN) (file=grant_table.c, line=356) Bad handle (13).
  (XEN) (file=grant_table.c, line=356) Bad handle (6).
  gnt_unmap: -2
  (XEN) (file=grant_table.c, line=356) Bad handle (16).
  gnt_unmap: -2
  (XEN) (file=grant_table.c, line=356) Bad handle (2).

out of the machine console, do you see those as well?

Thanks.
-JX
On Nov 1, 2006, at 12:18 PM, Hao Yu wrote:


Hi, Here is backtrace message from the 0.mon> console

0:mon> t
[c06ab530] c02dbf7c .network_tx_buf_gc+0x11c/0x2f0
(unreliable)
[c06ab610] c02deed4 .netif_int+0x54/0x120
[c06ab6b0] c008b824 .handle_IRQ_event+0x84/0x100
[c06ab750] c008ba70 .__do_IRQ+0x1d0/0x2b0
[c06ab810] c02c777c .evtchn_do_upcall+0x11c/0x170
[c06ab8d0] c00445a0 .xen_get_irq+0x10/0x30
[c06ab950] c000bf10 .do_IRQ+0x70/0x100
[c06ab9d0] c00041ec hardware_interrupt_entry+0xc/0x10
--- Exception: 501 (Hardware Interrupt) at c003bcc0
.plpar_hcall_norets+0x10/0x1c
[link register   ] c0045534 .HYPERVISOR_sched_op+0x124/0x150
[c06abcc0] c05a06e0 (unreliable)
[c06abd70] c004609c .xen_power_save+0x7c/0xa0
[c06abdf0] c0012060 .cpu_idle+0xe0/0x150
[c06abe70] c00095dc .rest_init+0x3c/0x60
[c06abef0] c052d958 .start_kernel+0x278/0x2e0
[c06abf90] c00084fc .start_here_common+0x50/0x54
0:mon> X
Oops: Kernel access of bad area, sig: 11 [#1]
SMP NR_CPUS=32
Modules linked in:
NIP: C02DBFB0 LR: C02DBF8C CTR: C02DEE80
REGS: c06ab2b0 TRAP: 0300   Not tainted  (2.6.17-Xen)
MSR: 80001432   CR: 2882  XER: 6005
DAR: 00C2, DSISR: 4000
TASK = c05748a0[0] 'swapper' THREAD: c06a8000 CPU: 0
GPR00:  C06AB530 C06A9718  
C0003FFB9678
GPR04:  C071B5D8 C06AB510  

GPR08:  0003 D8008000  
00C2
GPR12: 80009032 C0575100   

GPR16:     
C0003FFB8000
GPR20: C0568100 C0003FFB8670 0004  
004C
GPR24: 0048 0020 0002  
004B
GPR28: 0004 C0003FFB9680 C05FB020  
C0003FFB8500

NIP [C02DBFB0] .network_tx_buf_gc+0x150/0x2f0
LR [C02DBF8C] .network_tx_buf_gc+0x12c/0x2f0
Call Trace:
[C06AB530] [C02DBF7C] .network_tx_buf_gc+0x11c/0x2f0
(unreliable)
[C06AB610] [C02DEED4] .netif_int+0x54/0x120
[C06AB6B0] [C008B824] .handle_IRQ_event+0x84/0x100
[C06AB750] [C008BA70] .__do_IRQ+0x1d0/0x2b0
[C06AB810] [C02C777C] .evtchn_do_upcall+0x11c/0x170
[C06AB8D0] [C00445A0] .xen_get_irq+0x10/0x30
[C06AB950] [C000BF10] .do_IRQ+0x70/0x100
[C06AB9D0] [C00041EC] hardware_interrupt_entry+0xc/ 
0x10

--- Exception: 501 at .plpar_hcall_norets+0x10/0x1c
LR = .HYPERVISOR_sched_op+0x124/0x150
[C06ABCC0] [C05A06E0] 0xc05a06e0 (unreliable)
[C06ABD70] [C004609C] .xen_power_save+0x7c/0xa0
[C06ABDF0] [C0012060] .cpu_idle+0xe0/0x150
[C06ABE70] [C00095DC] .rest_init+0x3c/0x60
[C06ABEF0] [C052D958] .start_kernel+0x278/0x2e0
[C06ABF90] [C00084FC] .start_here_common+0x50/0x54
Instruction dump:
809d000c 387f1178 4bfec5c9 6000 3800 397a00c0 901d000c  
6000
e93f0170 7d35c92a fb9f0170 7c2004ac <7c005828> 3000 7c00592d  
40c2fff4

 <0>Kernel panic - not syncing: Fatal exception in interrupt
 <0>Rebooting in 180 seconds..

Hao Yu





 Jimi Xenidis
 <[EMAIL PROTECTED]
 .com> 
  To

   Hao Yu/Watson/[EMAIL PROTECTED]
 11/01/2006  
12:01   cc
 PMxen-ppc- 
[EMAIL PROTECTED]

Subject
   FYI: Re: [XenPPC] problem of  
ssh to

   domU on js21










Thank you Hao for posting the issue to the list!
I'll be posting this highly experimental patch to the list shortly.
-JX

On Nov 1, 2006, at 11:55 AM, Hao Yu wrote:



With Jimi's new patch, the ping works fine, lasting forever (stay

Re: FYI: Re: [XenPPC] problem of ssh to domU on js21

2006-11-01 Thread Hao Yu
Hi Jimi,

Just found out the problem is not only about 'ssh'. dom0 breaks when I
tried invoke java in dom0. Here are the console message and backtraces.
Just hope the info can help you on the potentially broken xen you mentioned
when you put out the two patches.

Thanks,
Hao

cso83:/ # cpu 0x0: Vector: 400 (Instruction Access) at [c00031873090]
pc: : .__start+0x4000/0x8
lr: c00b5e10: .get_vma_policy+0x60/0xd0
sp: c00031873310
   msr: 800040009032
  current = 0xc00032626040
  paca= 0xc058c100
pid   = 7287, comm = java
enter ? for help
0:mon>

0:mon> t
[link register   ] c00b5e10 .get_vma_policy+0x60/0xd0
[c00031873310] d02a0fd8 .cxiTraceExit+0x78/0x98 [mmfslinux]
(unreliable)
[c00031873390] c00b73f4 .alloc_page_vma+0x34/0x140
[c00031873430] c00a577c .__handle_mm_fault+0xb5c/0xf90
[c00031873540] c0032868 .do_page_fault+0x558/0x830
[c00031873720] c00048e0 .handle_page_fault+0x20/0x54
--- Exception: 301 (Data Access) at c0037830
.__clear_user+0x14/0x7c
[link register   ] c0118b28 .padzero+0x88/0x130
[c00031873a10] c0118b00 .padzero+0x60/0x130 (unreliable)
[c00031873aa0] c011a40c .load_elf_binary+0x8fc/0x1c70
[c00031873c30] c00dc4c8 .search_binary_handler+0xe8/0x3f0
[c00031873ce0] c0110870 .compat_do_execve+0x1a0/0x2c0
[c00031873d90] c0017724 .compat_sys_execve+0x74/0x100
[c00031873e30] c000861c syscall_exit+0x0/0x40
--- Exception: c01 (System Call) at 0fe10c68
SP (ffde07f0) is in userspace


0:mon> X
Oops: Kernel access of bad area, sig: 11 [#1]
SMP NR_CPUS=32 NUMA
Modules linked in: mmfs mmfslinux tracedev
NIP:  LR: C00B5E10 CTR: 
REGS: c00031873090 TRAP: 0400   Tainted: PF  (2.6.17-Xen)
MSR: 800040009032   CR: 84224488  XER: 
TASK = c00032626040[7287] 'java' THREAD: c0003187 CPU: 0
GPR00:  C00031873310  C00075CE59E8
GPR04: 10024316 10024316 C00AFFFC C00075CE59E8
GPR08:  D02E5E58  
GPR12: D02B97E8 C058C100 6DB6DB6DB6DB6DB7 
GPR16: C000318734A0 100214E8  C000
GPR20: C00075DB7000 C00075CE59E8 C000756A0998 10024316
GPR24: 10024000 C00031ADE210 0120 10024316
GPR28: 000200D2 C00031AD8120 C05BB350 C00075CE59E8
NIP [] .__start+0x4000/0x8
LR [C00B5E10] .get_vma_policy+0x60/0xd0
Call Trace:
[C00031873310] [D02A0FD8] .cxiTraceExit+0x78/0x98 [mmfslinux]
(unreliable)
[C00031873390] [C00B73F4] .alloc_page_vma+0x34/0x140
[C00031873430] [C00A577C] .__handle_mm_fault+0xb5c/0xf90
[C00031873540] [C0032868] .do_page_fault+0x558/0x830
[C00031873720] [C00048E0] .handle_page_fault+0x20/0x54
--- Exception: 301 at .__clear_user+0x14/0x7c
LR = .padzero+0x88/0x130
[C00031873A10] [C0118B00] .padzero+0x60/0x130 (unreliable)
[C00031873AA0] [C011A40C] .load_elf_binary+0x8fc/0x1c70
[C00031873C30] [C00DC4C8] .search_binary_handler+0xe8/0x3f0
[C00031873CE0] [C0110870] .compat_do_execve+0x1a0/0x2c0
[C00031873D90] [C0017724] .compat_sys_execve+0x74/0x100
[C00031873E30] [C000861C] syscall_exit+0x0/0x40
Instruction dump:
       
       
 <3>Badness in __mutex_unlock_slowpath at
/root/xen-maria-latest/linux/linux-xen-ppc/kernel/mutex.c:209
Call Trace:
[C00031B7F240] [C000F864] .show_stack+0x54/0x1f0 (unreliable)
[C00031B7F2F0] [C00278E8] .program_check_exception+0x508/0x6a0
[C00031B7F3D0] [C00044EC] program_check_common+0xec/0x100
--- Exception: 700 at .__mutex_unlock_slowpath+0x21c/0x230
LR = .gpfs_fill_super+0x768/0x818 [mmfslinux]
[C00031B7F6C0] [C00031B7F760] 0xc00031b7f760 (unreliable)
[C00031B7F760] [D02AD5B4] .gpfs_fill_super+0x768/0x818
[mmfslinux]
[C00031B7F870] [C00D6F68] .get_sb_nodev+0x88/0x150
[C00031B7F910] [D02AD6BC] .gpfs_get_sb+0x58/0xd0 [mmfslinux]
[C00031B7F9A0] [C00D66EC] .vfs_kern_mount+0x7c/0x170
[C00031B7FA40] [C00D683C] .do_kern_mount+0x4c/0x80
[C00031B7FAE0] [C00F795C] .do_mount+0x31c/0x8f0
[C00031B7FD70] [C0110A68] .compat_sys_mount+0xd8/0x2b0
[C00031B7FE30] [C000861C] syscall_exit+0x0/0x40






   
 Jimi Xenidis  
 <[EMAIL PROTECTED] 

[XenPPC] Re: [Xen Wiki] Update of "XenPPC/Run" by JeroneYoung

2006-11-01 Thread Jerone Young
On Wed, 2006-11-01 at 13:27 -0500, Jimi Xenidis wrote:
> First, I really appreciate you updating the wiki, I think its awesome!
> 
> On Oct 31, 2006, at 4:24 PM, [EMAIL PROTECTED] wrote:
> >
> > + === Example ===
> > + Have a machine with Linux install on /dev/hda3. We do not have  
> > any parameters to pass to the Xen hypervisor. So once
> > + SLOTH firmware loads up. You will PXE boot the Xen image built  
> > (no command line paramters specified in the build) and specify the  
> > parameters on here:
> 
> What do you mean "PXE boot"? I think this is an intel/x86 world term.
> This is a standard Open Firmware command:
>"boot  "
sigh...me coming from x86, I screwed the terminology. I will change it,
if it has not already been changed. "netboot" would be a much better
word.

> 
> Specifically, (assuming you have not defined the file, IP  
> configuration, and TFTP server) in this case you will be TFTPing the  
> image that that a BOOTP packet tells "net1" to load
> 
> > + {{{
> > + boot net1 xen -- root=/dev/hda3
> > + }}}

Yes I left out the part about setting up the bootp & tftp enviroment
(figured most folks whould probably know that part), mainly I was
putting an example of the command line to enter when using Sloth. I was
at first just doing "netboot root=/dev/hda3". I can rework the example
and make it more clear. But thought there needed to be a clear example
for folks to try and understand. 

> 
> > +  - note the word "xen" is placed as the parameter for the  
> > Hypervisor because you cannot have no parameter, so just put  
> > somehting that will just be dropped.
> 
> Is this _still_ true?  I think at some point Xen actually wanted to  
> see this string to verify that the person actually wanted to boot Xen  
> and has since been removed.  You should be able to boot without it,  
> if not we need to find out why.

I'll give it a try and let everyone know.

> -JX
> 
> 


___
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel


[XenPPC] Re: [Xen Wiki] Update of "XenPPC/Run" by JeroneYoung

2006-11-01 Thread Jimi Xenidis

First, I really appreciate you updating the wiki, I think its awesome!

On Oct 31, 2006, at 4:24 PM, [EMAIL PROTECTED] wrote:


+ === Example ===
+ Have a machine with Linux install on /dev/hda3. We do not have  
any parameters to pass to the Xen hypervisor. So once
+ SLOTH firmware loads up. You will PXE boot the Xen image built  
(no command line paramters specified in the build) and specify the  
parameters on here:


What do you mean "PXE boot"? I think this is an intel/x86 world term.
This is a standard Open Firmware command:
  "boot  "

Specifically, (assuming you have not defined the file, IP  
configuration, and TFTP server) in this case you will be TFTPing the  
image that that a BOOTP packet tells "net1" to load



+ {{{
+ boot net1 xen -- root=/dev/hda3
+ }}}


+  - note the word "xen" is placed as the parameter for the  
Hypervisor because you cannot have no parameter, so just put  
somehting that will just be dropped.


Is this _still_ true?  I think at some point Xen actually wanted to  
see this string to verify that the person actually wanted to boot Xen  
and has since been removed.  You should be able to boot without it,  
if not we need to find out why.


-JX



___
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel


Re: FYI: Re: [XenPPC] problem of ssh to domU on js21

2006-11-01 Thread Hao Yu
Hi, Here is backtrace message from the 0.mon> console

0:mon> t
[c06ab530] c02dbf7c .network_tx_buf_gc+0x11c/0x2f0
(unreliable)
[c06ab610] c02deed4 .netif_int+0x54/0x120
[c06ab6b0] c008b824 .handle_IRQ_event+0x84/0x100
[c06ab750] c008ba70 .__do_IRQ+0x1d0/0x2b0
[c06ab810] c02c777c .evtchn_do_upcall+0x11c/0x170
[c06ab8d0] c00445a0 .xen_get_irq+0x10/0x30
[c06ab950] c000bf10 .do_IRQ+0x70/0x100
[c06ab9d0] c00041ec hardware_interrupt_entry+0xc/0x10
--- Exception: 501 (Hardware Interrupt) at c003bcc0
.plpar_hcall_norets+0x10/0x1c
[link register   ] c0045534 .HYPERVISOR_sched_op+0x124/0x150
[c06abcc0] c05a06e0 (unreliable)
[c06abd70] c004609c .xen_power_save+0x7c/0xa0
[c06abdf0] c0012060 .cpu_idle+0xe0/0x150
[c06abe70] c00095dc .rest_init+0x3c/0x60
[c06abef0] c052d958 .start_kernel+0x278/0x2e0
[c06abf90] c00084fc .start_here_common+0x50/0x54
0:mon> X
Oops: Kernel access of bad area, sig: 11 [#1]
SMP NR_CPUS=32
Modules linked in:
NIP: C02DBFB0 LR: C02DBF8C CTR: C02DEE80
REGS: c06ab2b0 TRAP: 0300   Not tainted  (2.6.17-Xen)
MSR: 80001432   CR: 2882  XER: 6005
DAR: 00C2, DSISR: 4000
TASK = c05748a0[0] 'swapper' THREAD: c06a8000 CPU: 0
GPR00:  C06AB530 C06A9718 C0003FFB9678
GPR04:  C071B5D8 C06AB510 
GPR08:  0003 D8008000 00C2
GPR12: 80009032 C0575100  
GPR16:    C0003FFB8000
GPR20: C0568100 C0003FFB8670 0004 004C
GPR24: 0048 0020 0002 004B
GPR28: 0004 C0003FFB9680 C05FB020 C0003FFB8500
NIP [C02DBFB0] .network_tx_buf_gc+0x150/0x2f0
LR [C02DBF8C] .network_tx_buf_gc+0x12c/0x2f0
Call Trace:
[C06AB530] [C02DBF7C] .network_tx_buf_gc+0x11c/0x2f0
(unreliable)
[C06AB610] [C02DEED4] .netif_int+0x54/0x120
[C06AB6B0] [C008B824] .handle_IRQ_event+0x84/0x100
[C06AB750] [C008BA70] .__do_IRQ+0x1d0/0x2b0
[C06AB810] [C02C777C] .evtchn_do_upcall+0x11c/0x170
[C06AB8D0] [C00445A0] .xen_get_irq+0x10/0x30
[C06AB950] [C000BF10] .do_IRQ+0x70/0x100
[C06AB9D0] [C00041EC] hardware_interrupt_entry+0xc/0x10
--- Exception: 501 at .plpar_hcall_norets+0x10/0x1c
LR = .HYPERVISOR_sched_op+0x124/0x150
[C06ABCC0] [C05A06E0] 0xc05a06e0 (unreliable)
[C06ABD70] [C004609C] .xen_power_save+0x7c/0xa0
[C06ABDF0] [C0012060] .cpu_idle+0xe0/0x150
[C06ABE70] [C00095DC] .rest_init+0x3c/0x60
[C06ABEF0] [C052D958] .start_kernel+0x278/0x2e0
[C06ABF90] [C00084FC] .start_here_common+0x50/0x54
Instruction dump:
809d000c 387f1178 4bfec5c9 6000 3800 397a00c0 901d000c 6000
e93f0170 7d35c92a fb9f0170 7c2004ac <7c005828> 3000 7c00592d 40c2fff4
 <0>Kernel panic - not syncing: Fatal exception in interrupt
 <0>Rebooting in 180 seconds..

Hao Yu




   
 Jimi Xenidis  
 <[EMAIL PROTECTED] 
 .com>  To 
   Hao Yu/Watson/[EMAIL PROTECTED]  
   
 11/01/2006 12:01   cc 
 PMxen-ppc-devel@lists.xensource.com   
   Subject 
   FYI: Re: [XenPPC] problem of ssh to 
   domU on js21
   
   
   
   
   
   




Thank you Hao for posting the issue to the list!
I'll be posting this highly experimental patch to the list shortly.
-JX

On Nov 1, 2006, at 11:55 AM, Hao Yu wrote:

>
> With Jimi's new patch, the ping works fine, lasting forever (stayed
> for 1.5
> hours). However, I could not stop it using ^C or ^Z .
>
> 

[XenPPC] Experimental patch that get more networking but still buggy.

2006-11-01 Thread Jimi Xenidis

2 patches that need to be applied one after the other.
netback works for a little longer, but it is still buggy.

Any feedback on this is good.
-JX
===

diff -r f4d382795e57 arch/powerpc/platforms/xen/gnttab.c
--- a/arch/powerpc/platforms/xen/gnttab.c   Wed Oct 25 17:22:54 2006 -0400
+++ b/arch/powerpc/platforms/xen/gnttab.c   Fri Oct 27 15:39:57 2006 -0500
@@ -25,6 +25,33 @@ static ulong foreign_map_base;
 static ulong foreign_map_base;
 static ulong foreign_map_end;
 
+
+/* hijack _mapcount */
+static inline int gnt_mapcount(struct page *page)
+{
+   return atomic_read(&(page)->_mapcount) + 1;
+}
+
+static inline int gnt_map(struct page *page)
+{
+   /* return true is transition from -1 to 0 */
+   return atomic_inc_and_test(&page->_mapcount);
+}
+
+static inline int gnt_unmap(struct page *page)
+{
+   int val;
+
+   val = atomic_dec_return(&page->_mapcount);
+   if (val < -1) {
+   atomic_inc(&page->_mapcount);
+   printk(KERN_EMERG "%s: %d\n", __func__, val);
+   }
+
+   return (val == -1);
+}
+
+
 static long map_to_linear(ulong paddr)
 {
unsigned long vaddr;
@@ -136,21 +163,20 @@ static void gnttab_pre_unmap_grant_ref(
int i;
ulong ea;
unsigned long dummy1, dummy2;
+   ulong flags;
+
+   /* paranoia */
+   local_irq_save(flags);
 
for (i = 0 ; i < count; i++) {
struct page *page;
 
ea = unmap[i].host_addr;
page = virt_to_page(ea);
-
-   /* Unfortunately, there is no put_page_testone() like
-* put_page_testzero(). The Linear Map starts all
-* pages with a count of 1, so there may be SMP issues
-* here. */
-
-   put_page(page);
-   if (page_count(page) > 1) {
-   DBG("%s: skip: 0x%lx\n", __func__, ea);
+   
+   if (!gnt_unmap(page)) {
+   DBG("%s[0x%x]: skip: 0x%lx, mapcount 0x%x\n",
+   __func__, i, ea, gnt_mapcount(page));
continue;
}
slot = find_map_slot(ea);
@@ -160,10 +186,11 @@ static void gnttab_pre_unmap_grant_ref(
continue;
}
 
-   DBG("%s: 0x%lx: page count: 0x%x\n",
-  __func__, ea, page_count(virt_to_page(ea)));
+   DBG("%s[0x%x]: 0x%lx: mapcount: 0x%x\n",
+   __func__, i, ea, gnt_mapcount(page));
plpar_pte_remove(0, slot, 0, &dummy1, &dummy2);
}
+   local_irq_restore(flags);
 }
 
 static void gnttab_post_map_grant_ref(
@@ -171,6 +198,10 @@ static void gnttab_post_map_grant_ref(
 {
int i;
long slot;
+   ulong flags;
+
+   /* paranoia */
+   local_irq_save(flags);
 
for (i = 0 ; i < count; i++) {
ulong pa = map[i].dev_bus_addr;
@@ -182,10 +213,7 @@ static void gnttab_post_map_grant_ref(
map[i].host_addr = (ulong)__va(pa);
page = virt_to_page(map[i].host_addr);
 
-   DBG("%s: 0x%lx: 0x%x\n",
-   __func__, pa, page_count(page));
-
-   if (page_count(page) == 1) {
+   if (gnt_map(page)) {
 #ifdef DEBUG   
/* we need to get smarted than this */
slot = find_map_slot((ulong)__va(pa));
@@ -195,11 +223,15 @@ static void gnttab_post_map_grant_ref(
}
 #endif
slot = map_to_linear(pa);
+   DBG("%s[0x%x]: 0x%lx, mapcount:0x%x\n",
+   __func__, i, pa, gnt_mapcount(page));
+
} else {
-   DBG("%s: skip 0x%lx\n", __func__, pa);
-   }
-   get_page(page);
-   }
+   DBG("%s[0x%x] skip 0x%lx, mapcount:0x%x\n",
+   __func__, i, pa, gnt_mapcount(page));
+   }
+   }
+   local_irq_restore(flags);
 }
 
 int HYPERVISOR_grant_table_op(unsigned int cmd, void *op, unsigned int count)
diff -r f4d382795e57 drivers/xen/netback/netback.c
--- a/drivers/xen/netback/netback.c Wed Oct 25 17:22:54 2006 -0400
+++ b/drivers/xen/netback/netback.c Fri Oct 27 15:54:04 2006 -0500
@@ -84,6 +84,9 @@ static inline void update_mmap_pages(
unsigned int idx, gnttab_map_grant_ref_t *mop)
 {
struct page *p;
+
+   p = pfn_to_page(mop->dev_bus_addr >> PAGE_SHIFT);
+
 #ifdef PPC_NOT_YET
struct page *cp = mmap_pages[idx];
extern int arch_is_foreign_page(struct page *page);
@@ -97,11 +100,9 @@ static inline void update_mmap_pages(
//  __free_page(mmap_pages[idx]);
}

+   printk(KERN_EMERG "%s insert[%d]:  %p, 0x%x\n",
+  __func__, idx, __va(mop->dev_bus_addr), page_count(p));
 #endif
-   p = pfn_to_page(mop->dev_bus_addr >> PAG

FYI: Re: [XenPPC] problem of ssh to domU on js21

2006-11-01 Thread Jimi Xenidis

Thank you Hao for posting the issue to the list!
I'll be posting this highly experimental patch to the list shortly.
-JX

On Nov 1, 2006, at 11:55 AM, Hao Yu wrote:



With Jimi's new patch, the ping works fine, lasting forever (stayed  
for 1.5

hours). However, I could not stop it using ^C or ^Z .

The problem here is when I try to use ssh, domU crashes with following
messages

cso232:/ # passwd
Changing password for root.
New Password:
Bad password: too simple
Reenter New Password:
Password changed.
cso232:/ # cpu 0x0: Vector: 300 (Data Access) at [c06ab2b0]
pc: c02dbfb0: .network_tx_buf_gc+0x150/0x2f0
lr: c02dbf8c: .network_tx_buf_gc+0x12c/0x2f0
sp: c06ab530
   msr: 80001032
   dar: c2
 dsisr: 4000
  current = 0xc05748a0
  paca= 0xc0575100
pid   = 0, comm = swapper
enter ? for help
0:mon>

Here is the complete message of booting domU and the crash: (See  
attached

file: p-ssh-domu.txt)

Regards,
Hao Yu


___
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel



___
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel


[XenPPC] problem of ssh to domU on js21

2006-11-01 Thread Hao Yu

With Jimi's new patch, the ping works fine, lasting forever (stayed for 1.5
hours). However, I could not stop it using ^C or ^Z .

The problem here is when I try to use ssh, domU crashes with following
messages

cso232:/ # passwd
Changing password for root.
New Password:
Bad password: too simple
Reenter New Password:
Password changed.
cso232:/ # cpu 0x0: Vector: 300 (Data Access) at [c06ab2b0]
pc: c02dbfb0: .network_tx_buf_gc+0x150/0x2f0
lr: c02dbf8c: .network_tx_buf_gc+0x12c/0x2f0
sp: c06ab530
   msr: 80001032
   dar: c2
 dsisr: 4000
  current = 0xc05748a0
  paca= 0xc0575100
pid   = 0, comm = swapper
enter ? for help
0:mon>

Here is the complete message of booting domU and the crash: (See attached
file: p-ssh-domu.txt)

Regards,
Hao Yu



p-ssh-domu.txt
Description: Binary data
___
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel

[XenPPC] Re: [Xen-devel] [PATCH 10/10][TOOLS][XM-TEST] Fix Memory assumptions in the create tests

2006-11-01 Thread Ewan Mellor
On Tue, Oct 31, 2006 at 01:16:03PM +1100, Tony Breeds wrote:

> On Tue, Oct 24, 2006 at 02:54:16PM +0100, Ewan Mellor wrote:
>  
> > OK, I've taken the most of the patch, but with the 16MiB low limit left in.
> > What's this bit though (I haven't taken this yet)?
> 
> Hi Ewan,
>   What are the outstanding issues with this patch?  I'm keen to
> get it merged if you're happy with it.

Nothing wrong with it -- I just forgot about it.  Applied now.

Thanks,

Ewan.

___
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel


[XenPPC] Re: [Xen-devel] [PATCH 0/3][TOOLS][XM-TEST] Update block tests to use xvd rather than SCSI or IDE

2006-11-01 Thread Ewan Mellor
On Mon, Oct 30, 2006 at 04:38:58PM +1100, Tony Breeds wrote:

> Hello All,
>   This patch Updates all the block specific tests in xm-test to
> use the Xen Virtual Block Devices rather than overriding the SCSI or
> IDE subsystems.  It also cleans up some whitespace problems (Which
> looking back I should have done in a separate patchset).
> 
> The last patch (3/3) bumps the version number of xm-test to 1.1, as
> these new block tests will certainly fail with older initrd's due to the
> lack of xvd device nodes in the initrd.
> 
> I've tested these patches with no regressions on x86, and a number of
> improvements on PPC.
> 
> Signed-off-by: Tony Breeds <[EMAIL PROTECTED]>

Series applied, thanks Tony.  It's queuing up behind a big change, but its on
the way once our tests have passed.

Ewan.

___
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel


[XenPPC] Fwd: [PATCH] powerpc: Eliminate "exceeds stub group size" linker warning

2006-11-01 Thread Jimi Xenidis
well, I'm happy that this was tracked down, should still be harmless,  
I don't have any intention of back-porting it at the moment, just an  
FYI.

-JX

Begin forwarded message:


From: Paul Mackerras <[EMAIL PROTECTED]>
Date: October 31, 2006 8:01:16 PM EST
To: Linus Torvalds <[EMAIL PROTECTED]>
Cc: [EMAIL PROTECTED], [EMAIL PROTECTED], linux- 
[EMAIL PROTECTED]
Subject: [PATCH] powerpc: Eliminate "exceeds stub group size"  
linker warning


It turns out that the linker warnings on 64-bit powerpc about "section
blah exceeds stub group size" were being triggered by conditional
branches in head_64.S branching to global symbols, whether in
head_64.S or in other files.  This eliminates the warnings by making
some global symbols in head_64.S no longer global, and by rearranging
some branches.

Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
---
Linus,

If you think this is 2.6.19 material, feel free to put it in your
tree.  Otherwise I'll put it in the powerpc.git tree to go in for
2.6.20.

Paul.

diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/ 
head_64.S

index 47fcff1..c005f15 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -505,7 +505,7 @@ BEGIN_FTR_SECTION
rlwimi  r13,r12,16,0x20
mfcrr12
cmpwi   r13,0x2c
-   beq .do_stab_bolted_pSeries
+   beq do_stab_bolted_pSeries
mtcrf   0x80,r12
mfspr   r12,SPRN_SPRG2
 END_FTR_SECTION_IFCLR(CPU_FTR_SLB)
@@ -635,7 +635,7 @@ masked_interrupt:
b   .

.align  7
-_GLOBAL(do_stab_bolted_pSeries)
+do_stab_bolted_pSeries:
mtcrf   0x80,r12
mfspr   r12,SPRN_SPRG2
EXCEPTION_PROLOG_PSERIES(PACA_EXSLB, .do_stab_bolted)
@@ -1090,7 +1090,7 @@ slb_miss_fault:
li  r5,0
std r4,_DAR(r1)
std r5,_DSISR(r1)
-   b   .handle_page_fault
+   b   handle_page_fault

 unrecov_user_slb:
EXCEPTION_PROLOG_COMMON(0x4200, PACA_EXGEN)
@@ -1218,12 +1218,13 @@ program_check_common:
.globl fp_unavailable_common
 fp_unavailable_common:
EXCEPTION_PROLOG_COMMON(0x800, PACA_EXGEN)
-   bne .load_up_fpu/* if from user, just load it up */
+   bne 1f  /* if from user, just load it up */
bl  .save_nvgprs
addir3,r1,STACK_FRAME_OVERHEAD
ENABLE_INTS
bl  .kernel_fp_unavailable_exception
BUG_OPCODE
+1: b   .load_up_fpu

.align  7
.globl altivec_unavailable_common
@@ -1323,10 +1324,10 @@ _GLOBAL(do_hash_page)
std r4,_DSISR(r1)

andis.  r0,r4,0xa450/* weird error? */
-   bne-.handle_page_fault  /* if not, try to insert a HPTE */
+   bne-handle_page_fault   /* if not, try to insert a HPTE */
 BEGIN_FTR_SECTION
andis.  r0,r4,0x0020/* Is it a segment table fault? */
-   bne-.do_ste_alloc   /* If so handle it */
+   bne-do_ste_alloc/* If so handle it */
 END_FTR_SECTION_IFCLR(CPU_FTR_SLB)

/*
@@ -1368,7 +1369,7 @@ BEGIN_FW_FTR_SECTION
 * because ret_from_except_lite will check for and handle pending
 * interrupts if necessary.
 */
-   beq .ret_from_except_lite
+   beq 14f
 END_FW_FTR_SECTION_IFSET(FW_FEATURE_ISERIES)
 #endif
 BEGIN_FW_FTR_SECTION
@@ -1390,16 +1391,17 @@ END_FW_FTR_SECTION_IFCLR(FW_FEATURE_ISER
ld  r3,SOFTE(r1)
bl  .local_irq_restore
b   11f
+14:b   .ret_from_except_lite

 /* Here we have a page fault that hash_page can't handle. */
-_GLOBAL(handle_page_fault)
+handle_page_fault:
ENABLE_INTS
 11:ld  r4,_DAR(r1)
ld  r5,_DSISR(r1)
addir3,r1,STACK_FRAME_OVERHEAD
bl  .do_page_fault
cmpdi   r3,0
-   beq+.ret_from_except_lite
+   beq+14b
bl  .save_nvgprs
mr  r5,r3
addir3,r1,STACK_FRAME_OVERHEAD
@@ -1417,11 +1419,11 @@ _GLOBAL(handle_page_fault)
b   .ret_from_except

/* here we have a segment miss */
-_GLOBAL(do_ste_alloc)
+do_ste_alloc:
bl  .ste_allocate   /* try to insert stab entry */
cmpdi   r3,0
-   beq+fast_exception_return
-   b   .handle_page_fault
+   bne-handle_page_fault
+   b   fast_exception_return

 /*
  * r13 points to the PACA, r9 contains the saved CR,
___
Linuxppc-dev mailing list
[EMAIL PROTECTED]
https://ozlabs.org/mailman/listinfo/linuxppc-dev



___
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel