Re: [XenPPC] mpic reset

2006-10-10 Thread Michal Ostrowski
It should not be a problem; I'm fairly certain I've done this at some
point with no ill effects.

If it is a problem, it may be an issue with a specific implementation.

-- 
Michal Ostrowski <[EMAIL PROTECTED]>


On Tue, 2006-10-10 at 19:16 -0400, Amos Waterland wrote:
> I don't see a definitive statement in the mpic spec.  Is it ok to reset
> the mpic an arbitrary number of times, or even more than once, after
> power on?  We are allowing dom0 to reset it at the moment ...
> 
> 
> > diff -r b9e38b262f64 arch/powerpc/sysdev/mpic.c
> > --- a/arch/powerpc/sysdev/mpic.cSun Oct 08 14:22:12 2006 -0400
> > +++ b/arch/powerpc/sysdev/mpic.cTue Oct 10 18:10:53 2006 -0400
> > @@ -619,6 +619,7 @@ struct mpic * __init mpic_alloc(unsigned
> > mpic->tmregs = mpic->gregs + ((MPIC_TIMER_BASE - MPIC_GREG_BASE) >> 2);
> > BUG_ON(mpic->gregs == NULL);
> >  
> > +#if 0
> > /* Reset */
> > if (flags & MPIC_WANTS_RESET) {
> > mpic_write(mpic->gregs, MPIC_GREG_GLOBAL_CONF_0,
> > @@ -628,6 +629,7 @@ struct mpic * __init mpic_alloc(unsigned
> >& MPIC_GREG_GCONF_RESET)
> > mb();
> > }
> > +#endif
> 
> ___
> 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] mpic reset

2006-10-10 Thread Amos Waterland
I don't see a definitive statement in the mpic spec.  Is it ok to reset
the mpic an arbitrary number of times, or even more than once, after
power on?  We are allowing dom0 to reset it at the moment ...


> diff -r b9e38b262f64 arch/powerpc/sysdev/mpic.c
> --- a/arch/powerpc/sysdev/mpic.c  Sun Oct 08 14:22:12 2006 -0400
> +++ b/arch/powerpc/sysdev/mpic.c  Tue Oct 10 18:10:53 2006 -0400
> @@ -619,6 +619,7 @@ struct mpic * __init mpic_alloc(unsigned
>   mpic->tmregs = mpic->gregs + ((MPIC_TIMER_BASE - MPIC_GREG_BASE) >> 2);
>   BUG_ON(mpic->gregs == NULL);
>  
> +#if 0
>   /* Reset */
>   if (flags & MPIC_WANTS_RESET) {
>   mpic_write(mpic->gregs, MPIC_GREG_GLOBAL_CONF_0,
> @@ -628,6 +629,7 @@ struct mpic * __init mpic_alloc(unsigned
>  & MPIC_GREG_GCONF_RESET)
>   mb();
>   }
> +#endif

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


[XenPPC] [PATCH/RFC] Initial IPI framework

2006-10-10 Thread Amos Waterland
This is the minimal set of changes/hacks necessary to get interprocessor
interrupts delivered reliably.

This is certainly not for submission, I am just posting it because I
would appreciate any feedback on the direction this is headed.

Basically, we are "sharing" the mpic less, but I have not ripped it
entirely out of dom0 and made a proper virtual PIC.

---

 mpic.c |4 
 1 file changed, 4 insertions(+)

diff -r b9e38b262f64 arch/powerpc/sysdev/mpic.c
--- a/arch/powerpc/sysdev/mpic.cSun Oct 08 14:22:12 2006 -0400
+++ b/arch/powerpc/sysdev/mpic.cTue Oct 10 18:10:53 2006 -0400
@@ -619,6 +619,7 @@ struct mpic * __init mpic_alloc(unsigned
mpic->tmregs = mpic->gregs + ((MPIC_TIMER_BASE - MPIC_GREG_BASE) >> 2);
BUG_ON(mpic->gregs == NULL);
 
+#if 0
/* Reset */
if (flags & MPIC_WANTS_RESET) {
mpic_write(mpic->gregs, MPIC_GREG_GLOBAL_CONF_0,
@@ -628,6 +629,7 @@ struct mpic * __init mpic_alloc(unsigned
   & MPIC_GREG_GCONF_RESET)
mb();
}
+#endif
 
/* Read feature register, calculate num CPUs and, for non-ISU
 * MPICs, num sources as well. On ISU MPICs, sources are counted
@@ -741,6 +743,7 @@ void __init mpic_init(struct mpic *mpic)
   (MPIC_VEC_TIMER_0 + i));
}
 
+#if 0
/* Initialize IPIs to our reserved vectors and mark them disabled for 
now */
mpic_test_broken_ipi(mpic);
for (i = 0; i < 4; i++) {
@@ -755,6 +758,7 @@ void __init mpic_init(struct mpic *mpic)
irq_desc[mpic->ipi_offset+i].chip = &mpic->hc_ipi;
 #endif /* CONFIG_SMP */
}
+#endif
 
/* Initialize interrupt sources */
if (mpic->irq_count == 0)

---

 exceptions.c |3 +++
 external.c   |8 +++-
 mpic.c   |   24 +---
 mpic_init.c  |5 -
 setup.c  |   50 ++
 smp.c|7 +--
 6 files changed, 70 insertions(+), 27 deletions(-)

diff -r 3583d2701405 xen/arch/powerpc/exceptions.c
--- a/xen/arch/powerpc/exceptions.c Sun Oct 08 11:52:28 2006 -0400
+++ b/xen/arch/powerpc/exceptions.c Tue Oct 10 18:11:10 2006 -0400
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -44,6 +45,8 @@ void do_timer(struct cpu_user_regs *regs
 /* Set HDEC high so it stops firing and can be reprogrammed by
  * set_preempt() */
 mthdec(INT_MAX);
+if (mftb() % 2048 == 0)
+mpic_send_ipi(3,2);
 raise_softirq(TIMER_SOFTIRQ);
 }
 
diff -r 3583d2701405 xen/arch/powerpc/external.c
--- a/xen/arch/powerpc/external.c   Sun Oct 08 11:52:28 2006 -0400
+++ b/xen/arch/powerpc/external.c   Tue Oct 10 11:27:30 2006 -0400
@@ -85,7 +85,13 @@ void do_external(struct cpu_user_regs *r
 if (vec != -1) {
 DBG("EE:0x%lx isrc: %d\n", regs->msr, vec);
 regs->entry_vector = vec;
-do_IRQ(regs);
+if (vec != 131)
+   do_IRQ(regs);
+else {
+   printk("%s: got IPI: cpu #%d!\n", __func__, smp_processor_id());
+   void mpic_end_ipi(unsigned int irq);
+   mpic_end_ipi(vec);
+}
 
 BUG_ON(mfmsr() & MSR_EE);
 spur_count = 0;
diff -r 3583d2701405 xen/arch/powerpc/mpic.c
--- a/xen/arch/powerpc/mpic.c   Sun Oct 08 11:52:28 2006 -0400
+++ b/xen/arch/powerpc/mpic.c   Tue Oct 10 11:30:04 2006 -0400
@@ -27,8 +27,6 @@
 
 
 #define alloc_bootmem(x) xmalloc_bytes(x)
-#define request_irq(irq, handler, f, devname, dev_id) \
-panic("IPI requested: %d: %p: %s: %p\n", irq, handler, devname, dev_id)
 
 typedef int irqreturn_t;
 
@@ -598,7 +596,8 @@ static void mpic_disable_ipi(unsigned in
/* NEVER disable an IPI... that's just plain wrong! */
 }
 
-static void mpic_end_ipi(unsigned int irq)
+void mpic_end_ipi(unsigned int irq);
+void mpic_end_ipi(unsigned int irq)
 {
struct mpic *mpic = mpic_from_ipi(irq);
 
@@ -1065,6 +1064,25 @@ int mpic_get_irq(struct pt_regs *regs)
 
 
 #ifdef CONFIG_SMP
+
+#define SA_INTERRUPT   0x2000u
+
+/*  request_irq - allocate an interrupt line
+ *  @irq: Interrupt line to allocate
+ *  @handler: Function to be called when the IRQ occurs
+ *  @irqflags: Interrupt type flags
+ *  @devname: An ascii name for the claiming device
+ *  @dev_id: A cookie passed back to the handler function
+ */
+static int request_irq(unsigned int irq,
+irqreturn_t (*handler)(int, void *, struct pt_regs *),
+unsigned long irqflags, const char * devname, void *dev_id)
+{
+printk("IPI requested: %d: %p: %s: %p\n", irq, handler, devname, dev_id);
+mpic_enable_ipi(irq);
+return 0;
+}
+
 void mpic_request_ipis(void)
 {
struct mpic *mpic = mpic_primary;
diff -r 3583d2701405 xen/arch/powerpc/mpic_init.c
--- a/xen/arch/powerpc/mpic_init.c  Sun Oct 08 11:52:28 2006 -0400
+++ b/xen/arch/powerpc/mpic_init.c  Mon Oct 0

Re: VIO work complete Was: [XenPPC] [linux-ppc-2.6] [LINUX][XEN][POWERPC] Enable PowerPC use of netback

2006-10-10 Thread Tony Breeds
On Tue, Oct 10, 2006 at 10:38:46AM -0400, Jimi Xenidis wrote:
 
> This patch "completes" the VIO work for Net and Block.
> It works for most xm-tests and all my manual checks.

Excellent!
 
> Some xm-tests fail because they lose console because they reset  
> "extra" and the domain no longer gets:
>   extra = "xencons=tty128 console=tty128"

Which ones?  I'll fix them when I get back.

Yours Tony

   linux.conf.au   http://linux.conf.au/ || http://lca2007.linux.org.au/
   Jan 15-20 2007  The Australian Linux Technical Conference!


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


[XenPPC] Error msgs when running gpfs on dom0

2006-10-10 Thread Dilma DaSilva

I'm successfully running the file system gpfs on dom0. The mount
operation issues some kernel messages (included below), but it
succeeds and the file system is working.
These messages do not appear when running without Xen (on the same
linux kernel).

Is this "badness in __mutex_unlock_slowpath" familiar to anyone?

Thanks,

Dilma
=
Badness in __mutex_unlock_slowpath at 
/root/xen2/linux/linux-ppc-2.6.hg/kernel/mutex.c:209
Call Trace:
[C000779D3240] [C000F844] .show_stack+0x54/0x1f0 (unreliable)
[C000779D32F0] [C0027818] .program_check_exception+0x508/0x6a0
[C000779D33D0] [C00044EC] program_check_common+0xec/0x100
--- Exception: 700 at .__mutex_unlock_slowpath+0x21c/0x230
LR = .gpfs_fill_super+0x768/0x818 [mmfslinux]
[C000779D36C0] [C000779D3760] 0xc000779d3760 (unreliable)
[C000779D3760] [D0AB55B4] .gpfs_fill_super+0x768/0x818 [mmfslinux]
[C000779D3870] [C00CAF18] .get_sb_nodev+0x88/0x150
[C000779D3910] [D0AB56BC] .gpfs_get_sb+0x58/0xd0 [mmfslinux]
[C000779D39A0] [C00CA69C] .vfs_kern_mount+0x7c/0x170
[C000779D3A40] [C00CA7EC] .do_kern_mount+0x4c/0x80
[C000779D3AE0] [C00EB90C] .do_mount+0x31c/0x8f0
[C000779D3D70] [C0104A78] .compat_sys_mount+0xd8/0x2b0
[C000779D3E30] [C000861C] syscall_exit+0x0/0x40
Badness in do_exit at /root/xen2/linux/linux-ppc-2.6.hg/kernel/exit.c:849
Call Trace:
[C000779D3850] [C000F844] .show_stack+0x54/0x1f0 (unreliable)
[C000779D3900] [C0027818] .program_check_exception+0x508/0x6a0
[C000779D39E0] [C00044EC] program_check_common+0xec/0x100
--- Exception: 700 at .do_exit+0x48/0xa20
LR = .do_group_exit+0x44/0xc0
[C000779D3CD0] [0FFEBFF4] 0xffebff4 (unreliable)
[C000779D3DA0] [C005CAA4] .do_group_exit+0x44/0xc0
[C000779D3E30] [C000861C] syscall_exit+0x0/0x40

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


Re: [XenPPC] NAP state

2006-10-10 Thread Hollis Blanchard
On Tue, 2006-10-10 at 13:12 -0400, Amos Waterland wrote:
> Just as a sanity check, is the intention is to put the processor in the
> NAP state when .sleep() is invoked?

Yes.

> If so, is the following behavior expected?
> 
> @@ -395,12 +396,34 @@ static void __init __start_xen(multiboot
>  console_endboot();
>  
> +while (1) {
> +long before, after;
> +before = mftb(); sleep(); after = mftb();
> +printk("hid0 = %lx: slept for %ld timebase ticks (%ld seconds)\n", 
> +   mfhid0(), after - before, (after - before) / timebase_freq);
> +}
> 
>  /* Hide UART from DOM0 if we're using it */
>  serial_endboot();
> 
> (XEN) hid0 = 5101018000: slept for 1952282840 timebase ticks (9 seconds)
> (XEN) hid0 = 5101018000: slept for 52834590 timebase ticks (0 seconds)
> (XEN) hid0 = 5101018000: slept for 2078791813 timebase ticks (10 seconds)
> (XEN) hid0 = 5101018000: slept for 52797943 timebase ticks (0 seconds)
> (XEN) hid0 = 5101018000: slept for 2078719926 timebase ticks (10 seconds)
> (XEN) hid0 = 5101018000: slept for 52860659 timebase ticks (0 seconds)
> (XEN) hid0 = 5101018000: slept for 2078655488 timebase ticks (10 seconds)
> (XEN) hid0 = 5101018000: slept for 52932165 timebase ticks (0 seconds)
> (XEN) hid0 = 5101018000: slept for 2078598776 timebase ticks (10 seconds)
> ...

When the decrementer goes off in HV mode, it is set to 0x7fff. The
decrementer frequency on my Maple seems to be 0x0a6e49c0. At that rate,
it should take ~12 seconds for the decrementer to fire again, waking the
processor. That seems to match your output.

I'm not sure about the zero second results. Perhaps there was an
interrupt pending when you went to sleep? I think the UART would be
unmasked at that point...

We should probably set the decrementer to approx. the time the next Xen
timer will fire before going to sleep.

-- 
Hollis Blanchard
IBM Linux Technology Center


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


Re: xm-test Was: [XenPPC] [xenppc-unstable] [TOOLS][XM-TEST] *

2006-10-10 Thread Jimi Xenidis


On Oct 10, 2006, at 1:38 PM, Dan Smith wrote:




Does block-{attach,detach} work on PPC?


Ok tried it manually and it does :)
-JX


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


Re: xm-test Was: [XenPPC] [xenppc-unstable] [TOOLS][XM-TEST] *

2006-10-10 Thread Jimi Xenidis


On Oct 10, 2006, at 2:03 PM, Dan Smith wrote:


JX> This one does since 01_block_attach_device_pos.py has:
JX> config = {"disk":"phy:/dev/ram0,hda1,w"}
JX> domain = XmTestDomain(extraConfig=config)

You must be talking about something other than what is in mainline
xm-test, is that right?  In my copy of xen-unstable.hg, I don't see
01_block_attach changing the domain config.


Oh jeez, mine is way old.. like May 05 old.. oop!
-JX


PGP.sig
Description: This is a digitally signed message part
___
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel

Re: xm-test Was: [XenPPC] [xenppc-unstable] [TOOLS][XM-TEST] *

2006-10-10 Thread Dan Smith
JX> This one does since 01_block_attach_device_pos.py has: 
JX> config = {"disk":"phy:/dev/ram0,hda1,w"} 
JX> domain = XmTestDomain(extraConfig=config)

You must be talking about something other than what is in mainline
xm-test, is that right?  In my copy of xen-unstable.hg, I don't see
01_block_attach changing the domain config.

JX> and it does not make it thru, are you saying something strips it?
JX> am I missing something?

Perhaps some of the PPC changes to XmTestLib are causing problems?

-- 
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: [EMAIL PROTECTED]


pgp8JfONoZPzi.pgp
Description: PGP signature
___
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel

Re: xm-test Was: [XenPPC] [xenppc-unstable] [TOOLS][XM-TEST] *

2006-10-10 Thread Jimi Xenidis


On Oct 10, 2006, at 1:38 PM, Dan Smith wrote:


(Note: I'm going only on the information provided in this mail, so if
I'm missing a bigger picture, please let me know)


REASON: Device is not actually attached to domU FAIL:
04_block_attach_device_repeatedly_pos.test


This test starts a domain (not necessarily with any disk) and
attaches and detaches a disk several times.

JX> the scrip tbuild for 01_block_attach_device_pos.test is missing
JX> the "disk=" definition.

...which is perfectly valid...

Ok.


JX> This is not easily fixed AFAICT.

The domain configuration object will create a "disk=" line if disks
have been added to the domain object before the domain is created.


This one does since 01_block_attach_device_pos.py has:
config = {"disk":"phy:/dev/ram0,hda1,w"}
domain = XmTestDomain(extraConfig=config)

and it does not make it thru, are you saying something strips it? am  
I missing something?




JX> Any thougths on this would be appreciated.

Does block-{attach,detach} work on PPC?


How can I tell?! :-D
-JX



PGP.sig
Description: This is a digitally signed message part
___
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel

Re: [XenPPC] NAP state

2006-10-10 Thread Jimi Xenidis


On Oct 10, 2006, at 1:12 PM, Amos Waterland wrote:

Just as a sanity check, is the intention is to put the processor in  
the

NAP state when .sleep() is invoked?  If so, is the following behavior
expected?

Yes!
Sleep turns the EE bit on and you have enabled HDEC so they are both  
firing waking you from sleep at different times
Also if you take 0x7fff/timebase_freq you'll find it is about 9  
seconds :)


To demonstrate let modify the patch a little:
diff -r 294577be7c02 xen/arch/powerpc/setup.c
--- a/xen/arch/powerpc/setup.c  Tue Oct 10 12:02:56 2006 -0400
+++ b/xen/arch/powerpc/setup.c  Tue Oct 10 13:46:30 2006 -0400
@@ -403,6 +403,16 @@ static void __init __start_xen(multiboot
 console_endboot();
+printk("tbf: %d\n", timebase_freq);
+while (1) {
+long before, after;
+printk(">>dec %d hdec %d\n", mfdec(), mfhdec());
+before = mftb(); sleep(); after = mftb();
+printk("<+printk("hid0 = %lx: slept for %ld timebase ticks (%ld  
seconds)\n",
+   mfhid0(), after - before, (after - before) /  
timebase_freq);

+}
+
 /* Hide UART from DOM0 if we're using it */
 serial_endboot();


output is (comments with >>):

(XEN) tbf: 17500
>> 0x7fff/17500 = 9

(XEN) >>dec 13921793 hdec 2112442338
>>> 
(XEN) <(XEN) hid0 = 5101018000: slept for 13369891 timebase ticks (0  
seconds)

>>> matches
(XEN) >>dec 2145746886 hdec 2096849271
^^
(XEN) <(XEN) hid0 = 5101018000: slept for 2096268461 timebase ticks (11  
seconds)

 matches   ^^


I am however surprised that HDEC will wake from any kind of sleep,  
Cell and P5+ processors do not do this.

-JX


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


Re: xm-test Was: [XenPPC] [xenppc-unstable] [TOOLS][XM-TEST] *

2006-10-10 Thread Dan Smith
(Note: I'm going only on the information provided in this mail, so if
I'm missing a bigger picture, please let me know)

>> REASON: Device is not actually attached to domU FAIL:
>> 04_block_attach_device_repeatedly_pos.test

This test starts a domain (not necessarily with any disk) and
attaches and detaches a disk several times.

JX> the scrip tbuild for 01_block_attach_device_pos.test is missing
JX> the "disk=" definition.

...which is perfectly valid...

JX> This is not easily fixed AFAICT.  

The domain configuration object will create a "disk=" line if disks
have been added to the domain object before the domain is created.

JX> Any thougths on this would be appreciated.

Does block-{attach,detach} work on PPC?

-- 
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: [EMAIL PROTECTED]


pgp7P2RL1KxpE.pgp
Description: PGP signature
___
Xen-ppc-devel mailing list
Xen-ppc-devel@lists.xensource.com
http://lists.xensource.com/xen-ppc-devel

Re: xm-test Was: [XenPPC] [xenppc-unstable] [TOOLS][XM-TEST] *

2006-10-10 Thread Jimi Xenidis


On Oct 10, 2006, at 12:54 PM, Jimi Xenidis wrote:


These patches mostly from Tony allow us to run xm-test to completion.
There is no claim that all of these work, but at least we are able  
to generate reports.
See http://wiki.xensource.com/xenwiki/XenPPC/Run/XM-Test for more  
info.


Here is the passfail output of the default test suite (no analysis  
has been done yet):


REASON: block-attach failed: device did not switch to Connected state
FAIL: 01_block_attach_device_pos.test

REASON: block-attach failed: device did not switch to Connected state
FAIL: 02_block_attach_file_device_pos.test

REASON: Device is not actually attached to domU
FAIL: 04_block_attach_device_repeatedly_pos.test


Ok, so xm-test is not all the way there.
The above failures are cause by the xm-test python script creatin an  
incorrect Domain script:


the scrip tbuild for 01_block_attach_device_pos.test is missing the  
"disk=" definition.



# cat /tmp/xm-test.conf
# Xen configuration generated by xm-test
ramdisk = "/root/work/xen/xenppc-unstable.hg/tools/xm-test/ramdisk/ 
initrd.img"

kernel = "/boot/vmlinux-2.6.17-Xen"
name = "01_block_attach_device_pos-1160358219"
extra = "xencons=tty128 console=tty128"
vcpus = 1
memory = 64
root = "/dev/ram0"


This is not easily fixed AFAICT.
Any thougths on this would be appreciated.
-JX



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


[XenPPC] NAP state

2006-10-10 Thread Amos Waterland
Just as a sanity check, is the intention is to put the processor in the
NAP state when .sleep() is invoked?  If so, is the following behavior
expected?

@@ -395,12 +396,34 @@ static void __init __start_xen(multiboot
 console_endboot();
 
+while (1) {
+long before, after;
+before = mftb(); sleep(); after = mftb();
+printk("hid0 = %lx: slept for %ld timebase ticks (%ld seconds)\n", 
+   mfhid0(), after - before, (after - before) / timebase_freq);
+}

 /* Hide UART from DOM0 if we're using it */
 serial_endboot();

(XEN) hid0 = 5101018000: slept for 1952282840 timebase ticks (9 seconds)
(XEN) hid0 = 5101018000: slept for 52834590 timebase ticks (0 seconds)
(XEN) hid0 = 5101018000: slept for 2078791813 timebase ticks (10 seconds)
(XEN) hid0 = 5101018000: slept for 52797943 timebase ticks (0 seconds)
(XEN) hid0 = 5101018000: slept for 2078719926 timebase ticks (10 seconds)
(XEN) hid0 = 5101018000: slept for 52860659 timebase ticks (0 seconds)
(XEN) hid0 = 5101018000: slept for 2078655488 timebase ticks (10 seconds)
(XEN) hid0 = 5101018000: slept for 52932165 timebase ticks (0 seconds)
(XEN) hid0 = 5101018000: slept for 2078598776 timebase ticks (10 seconds)
...


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


xm-test Was: [XenPPC] [xenppc-unstable] [TOOLS][XM-TEST] *

2006-10-10 Thread Jimi Xenidis

These patches mostly from Tony allow us to run xm-test to completion.
There is no claim that all of these work, but at least we are able to  
generate reports.

See http://wiki.xensource.com/xenwiki/XenPPC/Run/XM-Test for more info.

Here is the passfail output of the default test suite (no analysis  
has been done yet):


REASON: block-attach failed: device did not switch to Connected state
FAIL: 01_block_attach_device_pos.test

REASON: block-attach failed: device did not switch to Connected state
FAIL: 02_block_attach_file_device_pos.test

REASON: Device is not actually attached to domU
FAIL: 04_block_attach_device_repeatedly_pos.test

REASON: block-attach failed: device did not switch to Connected state
FAIL: 05_block_attach_and_dettach_device_repeatedly_pos.test

PASS: 06_block_attach_baddomain_neg.test

PASS: 07_block_attach_baddevice_neg.test

PASS: 08_block_attach_bad_filedevice_neg.test

REASON: File created was lost or not updated!
FAIL: 09_block_attach_and_dettach_device_check_data_pos.test

PASS: 11_block_attach_shared_dom0.test

FAIL: 12_block_attach_shared_domU.test

PASS: 01_block-destroy_btblock_pos.test

PASS: 02_block-destroy_rtblock_pos.test

PASS: 03_block-destroy_nonexist_neg.test

PASS: 04_block-destroy_nonattached_neg.test

PASS: 05_block-destroy_byname_pos.test

PASS: 06_block-destroy_check_list_pos.test

PASS: 01_block-list_pos.test

PASS: 02_block-list_attachbd_pos.test

PASS: 03_block-list_anotherbd_pos.test

PASS: 04_block-list_nodb_pos.test

PASS: 05_block-list_nonexist_neg.test

PASS: 06_block-list_checkremove_pos.test

PASS: 01_block_device_read_verify.test

PASS: 02_block_device_write_verify.test

PASS: 01_console_badopt_neg.test

PASS: 02_console_baddom_neg.test

PASS: 01_create_basic_pos.test

PASS: 02_create_noparm_neg.test

PASS: 03_create_badparm_neg.test

PASS: 04_create_conflictname_neg.test

PASS: 06_create_mem_neg.test

PASS: 07_create_mem64_pos.test

PASS: 08_create_mem128_pos.test

PASS: 09_create_mem256_pos.test

PASS: 10_create_fastdestroy.test

REASON: [0] Failed to create domain
FAIL: 11_create_concurrent_pos.test

REASON: Failed to start 12_create_concurrent_stress_pos-1160359394
FAIL: 12_create_concurrent_stress_pos.test

PASS: 13_create_multinic_pos.test

PASS: 14_create_blockroot_pos.test

REASON: Unable to start a domain with 32 MB
FAIL: 15_create_smallmem_pos.test

REASON: Unable to start a domain with 16 MB
FAIL: 16_create_smallmem_neg.test

PASS: 01_destroy_basic_pos.test

PASS: 02_destroy_noparm_neg.test

PASS: 03_destroy_nonexist_neg.test

PASS: 04_destroy_badparm_neg.test

PASS: 05_destroy_byid_pos.test

PASS: 06_destroy_dom0_neg.test

PASS: 07_destroy_stale_pos.test

PASS: 01_dmesg_basic_pos.test

PASS: 02_dmesg_basic_neg.test

PASS: 01_domid_basic_pos.test

PASS: 02_domid_basic_neg.test

PASS: 01_domname_basic_pos.test

PASS: 02_domname_basic_neg.test

REASON: Host not capable of running test
SKIP: 01_enforce_dom0_cpus_basic_pos.test
PASS: 01_help_basic_pos.test

PASS: 02_help_basic_neg.test

PASS: 03_help_badparm_neg.test

PASS: 04_help_long_pos.test

PASS: 05_help_nonroot_pos.test

PASS: 06_help_allcmds.test

PASS: 01_info_basic_pos.test

PASS: 02_info_compiledata_pos.test

PASS: 01_list_basic_pos.test

PASS: 02_list_badparm_neg.test

PASS: 03_list_nonexist_neg.test

PASS: 04_list_goodparm_pos.test

PASS: 05_list_long_pos.test

PASS: 06_list_nonroot.test

PASS: 01_memmax_badparm_neg.test

REASON: Invalid domU meminfo line
FAIL: 01_memset_basic_pos.test

PASS: 02_memset_badparm_neg.test

REASON: Invalid domU meminfo line
FAIL: 03_memset_random_pos.test

PASS: 04_memset_smallmem_pos.test

REASON: xm migrate returned invalid 256 != 0
FAIL: 01_migrate_localhost_pos.test

REASON: ping loopback failed for size 65507. ping eth0 failed for  
size 65507.

XFAIL: 02_network_local_ping_pos.test

PASS: 03_network_local_tcp_pos.test

PASS: 04_network_local_udp_pos.test

XPASS: 05_network_dom0_ping_pos.test

REASON: XM-TEST: xm list not responding
FAIL: 06_network_dom0_tcp_pos.test

REASON: XM-TEST: xm list not responding
FAIL: 07_network_dom0_udp_pos.test

REASON: XM-TEST: xm list not responding
XFAIL: 11_network_domU_ping_pos.test

REASON: XM-TEST: xm list not responding
FAIL: 12_network_domU_tcp_pos.test

REASON: XM-TEST: xm list not responding
FAIL: 13_network_domU_udp_pos.test

REASON: XM-TEST: xm list not responding
FAIL: 01_network_attach_pos.test

REASON: XM-TEST: xm list not responding
FAIL: 02_network_attach_detach_pos.test

REASON: XM-TEST: xm list not responding
FAIL: 03_network_attach_detach_multiple_pos.test

REASON: XM-TEST: xm list not responding
FAIL: 04_network_attach_baddomain_neg.test

REASON: XM-TEST: xm list not responding
FAIL: 01_pause_basic_pos.test

REASON: XM-TEST: xm list not responding
FAIL: 02_pause_badopt_neg.test

REASON: XM-TEST: xm list not responding
FAIL: 03_pause_badname_neg.test

REASON: XM-TEST: xm list not responding
FAIL: 04_pause_badid_neg.test

REASON: XM-TEST: xm list not responding
FAIL: 01_reboot_basic_pos.test

R

[XenPPC] [xenppc-unstable] [TOOLS][XM-TEST] Use arch specific defaults for initial values

2006-10-10 Thread Xen patchbot-xenppc-unstable
# HG changeset patch
# User Jimi Xenidis <[EMAIL PROTECTED]>
# Node ID 294577be7c024b72f897d32d7a22edcf265c09b6
# Parent  c02e48cca22ef60b7d448351184118ba6015c50a
[TOOLS][XM-TEST] Use arch specific defaults for initial values

Signed-off-by: Jimi Xenidis <[EMAIL PROTECTED]>
---
 tools/xm-test/lib/XmTestLib/XenDomain.py |2 +-
 1 files changed, 1 insertion(+), 1 deletion(-)

diff -r c02e48cca22e -r 294577be7c02 tools/xm-test/lib/XmTestLib/XenDomain.py
--- a/tools/xm-test/lib/XmTestLib/XenDomain.py  Tue Oct 10 11:38:24 2006 -0400
+++ b/tools/xm-test/lib/XmTestLib/XenDomain.py  Tue Oct 10 12:02:56 2006 -0400
@@ -50,7 +50,7 @@ class XenConfig:
 class XenConfig:
 """An object to help create a xen-compliant config file"""
 def __init__(self):
-self.defaultOpts = {}
+self.defaultOpts = arch.configDefaults
 
 # These options need to be lists
 self.defaultOpts["disk"] = []

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


[XenPPC] [xenppc-unstable] [TOOLS][XM-TEST][POWERPC] Add configuration data for powerpc.

2006-10-10 Thread Xen patchbot-xenppc-unstable
# HG changeset patch
# User Jimi Xenidis <[EMAIL PROTECTED]>
# Node ID 3a7a59a7f103ae4f9382adf54f049dee95cfb55f
# Parent  6de50cbbee18df14f1d8aa8e8cd14379be1db25b
[TOOLS][XM-TEST][POWERPC] Add configuration data for powerpc.

Allows for building of initrd, and running of tests.

Signed-off-by: Tony Breeds <[EMAIL PROTECTED]>
Signed-off-by: Jimi Xenidis <[EMAIL PROTECTED]>
---

 tools/xm-test/lib/XmTestLib/arch.py |   26 +
 tools/xm-test/lib/XmTestReport/arch.py  |6 
 tools/xm-test/ramdisk/Makefile.am   |2 
 tools/xm-test/ramdisk/configs/buildroot-powerpc |  334 
 4 files changed, 367 insertions(+), 1 deletion(-)

diff -r 6de50cbbee18 -r 3a7a59a7f103 tools/xm-test/lib/XmTestLib/arch.py
--- a/tools/xm-test/lib/XmTestLib/arch.py   Tue Oct 10 11:28:12 2006 -0400
+++ b/tools/xm-test/lib/XmTestLib/arch.py   Tue Oct 10 11:28:16 2006 -0400
@@ -80,6 +80,26 @@ ia_HVMDefaults =  {"memory"   : 
 }
 # End  : Intel ia32 and ia64 as well as AMD 32-bit and 64-bit processors
 
+# Begin: PowerPC
+def ppc_minSafeMem():
+return 64
+
+def ppc_getDefaultKernel():
+"""Get the path to the default DomU kernel"""
+dom0Ver = commands.getoutput("uname -r");
+domUVer = dom0Ver.replace("xen0", "xenU");
+
+return "/boot/vmlinux-" + domUVer;
+
+ppc_ParavirtDefaults = {"memory"  : 64,
+"vcpus"   : 1,
+"kernel"  : ppc_getDefaultKernel(),
+"root": "/dev/ram0",
+"ramdisk" : getRdPath() + "/initrd.img",
+"extra"   : "xencons=tty128 console=tty128",
+}
+# End  : PowerPC
+
 """Convert from uname specification to a more general platform."""
 _uname_to_arch_map = {
 "i386"  : "x86",
@@ -87,6 +107,8 @@ _uname_to_arch_map = {
 "i586"  : "x86",
 "i686"  : "x86",
 "ia64"  : "ia64",
+"ppc"   : "powerpc",
+"ppc64" : "powerpc",
 }
 
 # Lookup current platform.
@@ -98,5 +120,9 @@ if _arch == "x86" or _arch == "ia64":
 configDefaults = ia_HVMDefaults
 else:
 configDefaults = ia_ParavirtDefaults
+elif _arch == "powerpc":
+minSafeMem = ppc_minSafeMem
+getDefaultKernel = ppc_getDefaultKernel
+configDefaults = ppc_ParavirtDefaults
 else:
 raise ValueError, "Unknown architecture!"
diff -r 6de50cbbee18 -r 3a7a59a7f103 tools/xm-test/lib/XmTestReport/arch.py
--- a/tools/xm-test/lib/XmTestReport/arch.pyTue Oct 10 11:28:12 2006 -0400
+++ b/tools/xm-test/lib/XmTestReport/arch.pyTue Oct 10 11:28:16 2006 -0400
@@ -29,6 +29,8 @@ _uname_to_arch_map = {
 "i586"  : "x86",
 "i686"  : "x86",
 "ia64"  : "ia64",
+"ppc"   : "powerpc",
+"ppc64" : "powerpc",
 }
 
 _arch = _uname_to_arch_map.get(os.uname()[4], "Unknown")
@@ -38,5 +40,9 @@ elif _arch == "ia64":
 elif _arch == "ia64":
 cpuValues = {"arch" : "Unknown",
  "features" : "Unknown"}
+elif _arch == "powerpc":
+cpuValues = {"cpu"  : "Unknown",
+ "platform" : "Unknown",
+ "revision" : "Unknown"}
 else:
 raise ValueError, "Unknown architecture!"
diff -r 6de50cbbee18 -r 3a7a59a7f103 tools/xm-test/ramdisk/Makefile.am
--- a/tools/xm-test/ramdisk/Makefile.am Tue Oct 10 11:28:12 2006 -0400
+++ b/tools/xm-test/ramdisk/Makefile.am Tue Oct 10 11:28:16 2006 -0400
@@ -2,7 +2,7 @@ INITRD ?= http://xm-test.xensource.com/r
 
 EXTRA_DIST = skel configs patches
 
-BR_ARCH = $(shell uname -m | sed -e s/i.86/i386/)
+BR_ARCH = $(shell uname -m | sed -e s/i.86/i386/ -e 's/ppc\(64\)*/powerpc/')
 
 BR_TAR = buildroot-snapshot.tar.bz2
 BR_URL = http://buildroot.uclibc.org/downloads/snapshots/$(BR_TAR)
diff -r 6de50cbbee18 -r 3a7a59a7f103 
tools/xm-test/ramdisk/configs/buildroot-powerpc
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/tools/xm-test/ramdisk/configs/buildroot-powerpc   Tue Oct 10 11:28:16 
2006 -0400
@@ -0,0 +1,334 @@
+#
+# Automatically generated make config: don't edit
+#
+BR2_HAVE_DOT_CONFIG=y
+# BR2_alpha is not set
+# BR2_arm is not set
+# BR2_armeb is not set
+# BR2_cris is not set
+# BR2_i386 is not set
+# BR2_m68k is not set
+# BR2_mips is not set
+# BR2_mipsel is not set
+# BR2_nios2 is not set
+BR2_powerpc=y
+# BR2_sh is not set
+# BR2_sh64 is not set
+# BR2_sparc is not set
+# BR2_x86_64 is not set
+# BR2_x86_i386 is not set
+# BR2_x86_i486 is not set
+# BR2_x86_i586 is not set
+# BR2_x86_i686 is not set
+BR2_ARCH="powerpc"
+BR2_ENDIAN="BIG"
+
+#
+# Build options
+#
+BR2_WGET="wget --passive-ftp"
+BR2_SVN="svn co"
+BR2_TAR_OPTIONS=""
+BR2_DL_DIR="$(BASE_DIR)/dl"
+BR2_SOURCEFORGE_MIRROR="easynews"
+BR2_STAGING_DIR="$(BUILD_DIR)/staging_dir"
+BR2_TOPDIR_PREFIX=""
+BR2_TOPDIR_SUFFIX=""
+BR2_GNU_BUILD_SUFFIX="pc-linux-gnu"
+BR2_GNU_TARGET_SUFFIX="linux-uclibc"
+BR2_JLEVEL=1
+
+#
+# Toolchain Options
+#
+
+#
+# Kernel Header Options
+#
+# BR2_KERNEL_HEADERS_2_4_25 is not set
+# BR2_KERNEL_HEADERS_2_4_27 is not set
+# BR2_KERNEL_HEADERS_2_4_29 is not 

[XenPPC] [xenppc-unstable] [TOOLS][XM-TEST] ignore generated .test files

2006-10-10 Thread Xen patchbot-xenppc-unstable
# HG changeset patch
# User Jimi Xenidis <[EMAIL PROTECTED]>
# Node ID c02e48cca22ef60b7d448351184118ba6015c50a
# Parent  3a7a59a7f103ae4f9382adf54f049dee95cfb55f
[TOOLS][XM-TEST] ignore generated .test files

Signed-off-by: Jimi Xenidis <[EMAIL PROTECTED]>
---
 .hgignore |1 +
 1 files changed, 1 insertion(+)

diff -r 3a7a59a7f103 -r c02e48cca22e .hgignore
--- a/.hgignore Tue Oct 10 11:28:16 2006 -0400
+++ b/.hgignore Tue Oct 10 11:38:24 2006 -0400
@@ -189,6 +189,7 @@
 ^tools/xm-test/.*/Makefile(.in)*$
 ^tools/xm-test/lib/XmTestLib/config.py$
 ^tools/xm-test/lib/XmTestReport/xmtest.py$
+^tools/xm-test/tests/.*\.test$
 ^xen/BLOG$
 ^xen/TAGS$
 ^xen/arch/x86/asm-offsets\.s$

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


[XenPPC] [xenppc-unstable] [TOOLS][XM-TEST] Refactor code to encapsulate architecture decisions in one place.

2006-10-10 Thread Xen patchbot-xenppc-unstable
# HG changeset patch
# User Jimi Xenidis <[EMAIL PROTECTED]>
# Node ID 6de50cbbee18df14f1d8aa8e8cd14379be1db25b
# Parent  1720886f7fd1f03de52323fc8d9637013213990a
[TOOLS][XM-TEST] Refactor code to encapsulate architecture decisions in one 
place.

Also includes some whitespace fixes.

Signed-off-by: Tony Breeds <[EMAIL PROTECTED]>
Signed-off-by: Jimi Xenidis <[EMAIL PROTECTED]>
---

 tools/xm-test/lib/XmTestLib/XenDomain.py   |   73 
 tools/xm-test/lib/XmTestLib/arch.py|  102 +
 tools/xm-test/lib/XmTestReport/OSReport.py |   10 --
 tools/xm-test/lib/XmTestReport/arch.py |   42 +++
 4 files changed, 161 insertions(+), 66 deletions(-)

diff -r 1720886f7fd1 -r 6de50cbbee18 tools/xm-test/lib/XmTestLib/XenDomain.py
--- a/tools/xm-test/lib/XmTestLib/XenDomain.py  Tue Oct 10 11:28:07 2006 -0400
+++ b/tools/xm-test/lib/XmTestLib/XenDomain.py  Tue Oct 10 11:28:12 2006 -0400
@@ -20,33 +20,22 @@
 
 import sys
 import commands
-import os
 import re
 import time
 
 from Xm import *
+from arch import *
 from Test import *
 from config import *
 from Console import *
 from XenDevice import *
 
-BLOCK_ROOT_DEV = "hda"
-
-def getDeviceModel():
-"""Get the path to the device model based on
-the architecture reported in uname"""
-arch = os.uname()[4]
-if re.search("64", arch):
-return "/usr/lib64/xen/bin/qemu-dm"
-else:
-return "/usr/lib/xen/bin/qemu-dm"
 
 def getDefaultKernel():
-"""Get the path to the default DomU kernel"""
-dom0Ver = commands.getoutput("uname -r");
-domUVer = dom0Ver.replace("xen0", "xenU");
-
-return "/boot/vmlinuz-" + domUVer;
+return arch.getDefaultKernel()
+
+def getRdPath():
+return arch.getRdPath()
 
 def getUniqueName():
 """Get a uniqueish name for use in a domain"""
@@ -55,43 +44,8 @@ def getUniqueName():
 test_name = re.sub("\.test", "", test_name)
 test_name = re.sub("[\/\.]", "", test_name)
 name = "%s-%i" % (test_name, unixtime)
-
+
 return name
-
-def getRdPath():
-rdpath = os.environ.get("RD_PATH")
-if not rdpath:
-rdpath = "../../ramdisk"
-rdpath = os.path.abspath(rdpath)
-
-return rdpath
-
-ParavirtDefaults = {"memory"   : 64,
-"vcpus": 1,
-"kernel"   : getDefaultKernel(),
-"root" : "/dev/ram0",
-"ramdisk"  : getRdPath() + "/initrd.img"
-}
-HVMDefaults =  {"memory"   : 64,
-"vcpus": 1,
-"acpi" : 0,
-"apic" : 0,
-"disk" : ["file:%s/disk.img,ioemu:%s,w!" %
-   (getRdPath(), BLOCK_ROOT_DEV)],
-"kernel"   : "/usr/lib/xen/boot/hvmloader",
-"builder"  : "hvm",
-"sdl"  : 0,
-"vnc"  : 0,
-"vncviewer": 0,
-"nographic": 1,
-"serial"   : "pty",
-"device_model" : getDeviceModel()
-}
-
-if ENABLE_HVM_SUPPORT:
-configDefaults = HVMDefaults
-else:
-configDefaults = ParavirtDefaults
 
 class XenConfig:
 """An object to help create a xen-compliant config file"""
@@ -140,7 +94,8 @@ class XenConfig:
 
 def setOpt(self, name, value):
 """Set an option in the config"""
-if name in self.opts.keys() and isinstance(self.opts[name], list) and 
not isinstance(value, list):
+if name in self.opts.keys() and isinstance(self.opts[name] ,
+list) and not isinstance(value, list):
 self.opts[name] = [value]
 else:
 self.opts[name] = value
@@ -177,7 +132,7 @@ class DomainError(Exception):
 self.errorcode = int(errorcode)
 except Exception, e:
 self.errorcode = -1
-
+
 def __str__(self):
 return str(self.msg)
 
@@ -199,7 +154,7 @@ class XenDomain:
 self.devices = {}
 self.netEnv = "bridge"
 
-# Set domain type, either PV for ParaVirt domU or HVM for 
+# Set domain type, either PV for ParaVirt domU or HVM for
 # FullVirt domain
 if ENABLE_HVM_SUPPORT:
 self.type = "HVM"
@@ -332,7 +287,8 @@ class XenDomain:
 
 class XmTestDomain(XenDomain):
 
-def __init__(self, name=None, extraConfig=None, baseConfig=configDefaults):
+def __init__(self, name=None, extraConfig=None,
+ baseConfig=arch.configDefaults):
 """Create a new xm-test domain
 @param name: The requested domain name
 @param extraConfig: Additional configuration options
@@ -351,11 +307,12 @@ class XmTestDomain(XenDomain):
 XenDomain.__init__(self, config.getOpt("name"), config=config)
 
 def minSafeMem(self):
-ret

[XenPPC] [xenppc-unstable] [TOOLS][XM-TEST] Update .hgignore to remove artifacts of ramdisk build.

2006-10-10 Thread Xen patchbot-xenppc-unstable
# HG changeset patch
# User Jimi Xenidis <[EMAIL PROTECTED]>
# Node ID 1720886f7fd1f03de52323fc8d9637013213990a
# Parent  e00e016022c22108431a54b1eecae5e1de1729c7
[TOOLS][XM-TEST] Update .hgignore to remove artifacts of ramdisk build.

Signed-off-by: Tony Breeds <[EMAIL PROTECTED]>
Signed-off-by: Jimi Xenidis <[EMAIL PROTECTED]>
---

 .hgignore |9 +
 1 files changed, 9 insertions(+)

diff -r e00e016022c2 -r 1720886f7fd1 .hgignore
--- a/.hgignore Tue Oct 10 11:28:04 2006 -0400
+++ b/.hgignore Tue Oct 10 11:28:07 2006 -0400
@@ -180,6 +180,15 @@
 ^tools/domctrl/domctrl$
 ^tools/domctrl/domctrl.dbg$
 ^tools/xm-test/ramdisk/buildroot
+^tools/xm-test/aclocal.m4$
+^tools/xm-test/autom4te
+^tools/xm-test/install-sh$
+^tools/xm-test/missing$
+^tools/xm-test/config(ure|.log|.status)$
+^tools/xm-test/Makefile(.in)*$
+^tools/xm-test/.*/Makefile(.in)*$
+^tools/xm-test/lib/XmTestLib/config.py$
+^tools/xm-test/lib/XmTestReport/xmtest.py$
 ^xen/BLOG$
 ^xen/TAGS$
 ^xen/arch/x86/asm-offsets\.s$

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


[XenPPC] [xenppc-unstable] [TOOLS][XM-TEST] rename buildroot -> buildroot-i386.

2006-10-10 Thread Xen patchbot-xenppc-unstable
# HG changeset patch
# User Jimi Xenidis <[EMAIL PROTECTED]>
# Node ID e00e016022c22108431a54b1eecae5e1de1729c7
# Parent  b09b2e0b1389a9d47903de283c2e046bec87aaac
[TOOLS][XM-TEST] rename buildroot -> buildroot-i386.

Also update Makefile.

Signed-off-by: Tony Breeds <[EMAIL PROTECTED]>
Signed-off-by: Jimi Xenidis <[EMAIL PROTECTED]>
---

 tools/xm-test/ramdisk/configs/buildroot  |  330 ---
 tools/xm-test/ramdisk/Makefile.am|2 
 tools/xm-test/ramdisk/configs/buildroot-i386 |  330 +++
 3 files changed, 331 insertions(+), 331 deletions(-)

diff -r b09b2e0b1389 -r e00e016022c2 tools/xm-test/ramdisk/Makefile.am
--- a/tools/xm-test/ramdisk/Makefile.am Tue Oct 10 11:28:01 2006 -0400
+++ b/tools/xm-test/ramdisk/Makefile.am Tue Oct 10 11:28:04 2006 -0400
@@ -31,7 +31,7 @@ endif
tar xjf $(BR_TAR)
 
 $(BR_IMG): $(BR_SRC)
-   cp configs/buildroot $(BR_SRC)/.config
+   cp configs/buildroot-$(BR_ARCH) $(BR_SRC)/.config
cp configs/busybox $(BR_SRC)/package/busybox/busybox.config
cp configs/uClibc $(BR_SRC)/toolchain/uClibc/uClibc.config
(for i in patches/buildroot/*.patch; do \
diff -r b09b2e0b1389 -r e00e016022c2 
tools/xm-test/ramdisk/configs/buildroot-i386
--- /dev/null   Thu Jan 01 00:00:00 1970 +
+++ b/tools/xm-test/ramdisk/configs/buildroot-i386  Tue Oct 10 11:28:04 
2006 -0400
@@ -0,0 +1,330 @@
+#
+# Automatically generated make config: don't edit
+#
+BR2_HAVE_DOT_CONFIG=y
+# BR2_alpha is not set
+# BR2_arm is not set
+# BR2_armeb is not set
+# BR2_cris is not set
+BR2_i386=y
+# BR2_m68k is not set
+# BR2_mips is not set
+# BR2_mipsel is not set
+# BR2_nios2 is not set
+# BR2_powerpc is not set
+# BR2_sh is not set
+# BR2_sparc is not set
+# BR2_x86_64 is not set
+BR2_x86_i386=y
+# BR2_x86_i486 is not set
+# BR2_x86_i586 is not set
+# BR2_x86_i686 is not set
+BR2_ARCH="i386"
+BR2_ENDIAN="LITTLE"
+
+#
+# Build options
+#
+BR2_WGET="wget --passive-ftp"
+BR2_SVN="svn co"
+BR2_TAR_OPTIONS=""
+BR2_DL_DIR="$(BASE_DIR)/dl"
+BR2_SOURCEFORGE_MIRROR="easynews"
+BR2_STAGING_DIR="$(BUILD_DIR)/staging_dir"
+BR2_TOPDIR_PREFIX=""
+BR2_TOPDIR_SUFFIX=""
+BR2_GNU_BUILD_SUFFIX="pc-linux-gnu"
+BR2_JLEVEL=1
+
+#
+# Toolchain Options
+#
+
+#
+# Kernel Header Options
+#
+# BR2_KERNEL_HEADERS_2_4_25 is not set
+# BR2_KERNEL_HEADERS_2_4_27 is not set
+# BR2_KERNEL_HEADERS_2_4_29 is not set
+# BR2_KERNEL_HEADERS_2_4_31 is not set
+# BR2_KERNEL_HEADERS_2_6_9 is not set
+# BR2_KERNEL_HEADERS_2_6_11 is not set
+BR2_KERNEL_HEADERS_2_6_12=y
+BR2_DEFAULT_KERNEL_HEADERS="2.6.12"
+
+#
+# uClibc Options
+#
+# BR2_UCLIBC_VERSION_SNAPSHOT is not set
+# BR2_ENABLE_LOCALE is not set
+# BR2_PTHREADS_NONE is not set
+# BR2_PTHREADS is not set
+BR2_PTHREADS_OLD=y
+# BR2_PTHREADS_NATIVE is not set
+
+#
+# Binutils Options
+#
+# BR2_BINUTILS_VERSION_2_14_90_0_8 is not set
+# BR2_BINUTILS_VERSION_2_15 is not set
+# BR2_BINUTILS_VERSION_2_15_94_0_2_2 is not set
+# BR2_BINUTILS_VERSION_2_15_97 is not set
+# BR2_BINUTILS_VERSION_2_16_1 is not set
+# BR2_BINUTILS_VERSION_2_16_90_0_3 is not set
+# BR2_BINUTILS_VERSION_2_16_91_0_3 is not set
+# BR2_BINUTILS_VERSION_2_16_91_0_4 is not set
+# BR2_BINUTILS_VERSION_2_16_91_0_5 is not set
+# BR2_BINUTILS_VERSION_2_16_91_0_6 is not set
+BR2_BINUTILS_VERSION_2_16_91_0_7=y
+BR2_BINUTILS_VERSION="2.16.91.0.7"
+BR2_EXTRA_BINUTILS_CONFIG_OPTIONS=""
+
+#
+# Gcc Options
+#
+# BR2_GCC_VERSION_3_3_5 is not set
+# BR2_GCC_VERSION_3_3_6 is not set
+# BR2_GCC_VERSION_3_4_2 is not set
+# BR2_GCC_VERSION_3_4_3 is not set
+# BR2_GCC_VERSION_3_4_4 is not set
+# BR2_GCC_VERSION_3_4_5 is not set
+BR2_GCC_VERSION_3_4_6=y
+# BR2_GCC_VERSION_4_0_0 is not set
+# BR2_GCC_VERSION_4_0_1 is not set
+# BR2_GCC_VERSION_4_0_2 is not set
+# BR2_GCC_VERSION_4_0_3 is not set
+# BR2_GCC_VERSION_4_1_0 is not set
+# BR2_GCC_VERSION_4_2 is not set
+# BR2_GCC_IS_SNAP is not set
+BR2_GCC_VERSION="3.4.6"
+# BR2_GCC_USE_SJLJ_EXCEPTIONS is not set
+BR2_EXTRA_GCC_CONFIG_OPTIONS=""
+# BR2_INSTALL_LIBSTDCPP is not set
+# BR2_INSTALL_OBJC is not set
+
+#
+# Ccache Options
+#
+BR2_CCACHE=y
+
+#
+# Gdb Options
+#
+# BR2_PACKAGE_GDB is not set
+# BR2_PACKAGE_GDB_SERVER is not set
+# BR2_PACKAGE_GDB_HOST is not set
+
+#
+# elf2flt
+#
+# BR2_ELF2FLT is not set
+
+#
+# Common Toolchain Options
+#
+# BR2_PACKAGE_SSTRIP_TARGET is not set
+# BR2_PACKAGE_SSTRIP_HOST is not set
+BR2_ENABLE_MULTILIB=y
+BR2_LARGEFILE=y
+BR2_TARGET_OPTIMIZATION="-Os -pipe"
+BR2_CROSS_TOOLCHAIN_TARGET_UTILS=y
+
+#
+# Package Selection for the target
+#
+
+#
+# The default minimal system
+#
+BR2_PACKAGE_BUSYBOX=y
+# BR2_PACKAGE_BUSYBOX_SNAPSHOT is not set
+BR2_PACKAGE_BUSYBOX_INSTALL_SYMLINKS=y
+BR2_PACKAGE_BUSYBOX_CONFIG="package/busybox/busybox.config"
+
+#
+# The minimum needed to build a uClibc development system
+#
+# BR2_PACKAGE_BASH is not set
+# BR2_PACKAGE_BZIP2 is not set
+# BR2_PACKAGE_COREUTILS is not set
+# BR2_PACKAGE_DIFFUTILS is not set
+# BR2_PACKAGE_ED is not set
+

[XenPPC] [xenppc-unstable] [TOOLS][XM-TEST] Remove hard coded reference to i386.

2006-10-10 Thread Xen patchbot-xenppc-unstable
# HG changeset patch
# User Jimi Xenidis <[EMAIL PROTECTED]>
# Node ID b09b2e0b1389a9d47903de283c2e046bec87aaac
# Parent  5620501536931f9936c7ff24cb368eb8f145bb24
[TOOLS][XM-TEST] Remove hard coded reference to i386.

In preparation for other architectures.

Signed-off-by: Tony Breeds <[EMAIL PROTECTED]>
Signed-off-by: Jimi Xenidis <[EMAIL PROTECTED]>
---

 tools/xm-test/ramdisk/Makefile.am |6 --
 1 files changed, 4 insertions(+), 2 deletions(-)

diff -r 562050153693 -r b09b2e0b1389 tools/xm-test/ramdisk/Makefile.am
--- a/tools/xm-test/ramdisk/Makefile.am Tue Oct 10 11:27:57 2006 -0400
+++ b/tools/xm-test/ramdisk/Makefile.am Tue Oct 10 11:28:01 2006 -0400
@@ -2,12 +2,14 @@ INITRD ?= http://xm-test.xensource.com/r
 
 EXTRA_DIST = skel configs patches
 
+BR_ARCH = $(shell uname -m | sed -e s/i.86/i386/)
+
 BR_TAR = buildroot-snapshot.tar.bz2
 BR_URL = http://buildroot.uclibc.org/downloads/snapshots/$(BR_TAR)
 BR_SRC = buildroot
-BR_IMG = $(BR_SRC)/rootfs.i386.ext2
+BR_IMG = $(BR_SRC)/rootfs.$(BR_ARCH).ext2
 
-BR_ROOT = build_i386/root
+BR_ROOT = build_$(BR_ARCH)/root
 
 HVM_SCRIPT = bin/create_disk_image
 

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


[XenPPC] [xenppc-unstable] [TOOLS][XM-TEST] Update to use uClib buildroot-snapshot.

2006-10-10 Thread Xen patchbot-xenppc-unstable
# HG changeset patch
# User Jimi Xenidis <[EMAIL PROTECTED]>
# Node ID 5620501536931f9936c7ff24cb368eb8f145bb24
# Parent  05c8ce1d697cd7d16adbfb706680adfb95d4490f
[TOOLS][XM-TEST] Update to use uClib buildroot-snapshot.

Dated file no longer exists on upstream server.

Signed-off-by: Tony Breeds <[EMAIL PROTECTED]>
Signed-off-by: Jimi Xenidis <[EMAIL PROTECTED]>
---

 tools/xm-test/ramdisk/Makefile.am |3 +--
 1 files changed, 1 insertion(+), 2 deletions(-)

diff -r 05c8ce1d697c -r 562050153693 tools/xm-test/ramdisk/Makefile.am
--- a/tools/xm-test/ramdisk/Makefile.am Tue Oct 10 09:11:32 2006 -0400
+++ b/tools/xm-test/ramdisk/Makefile.am Tue Oct 10 11:27:57 2006 -0400
@@ -2,9 +2,8 @@ INITRD ?= http://xm-test.xensource.com/r
 
 EXTRA_DIST = skel configs patches
 
-BR_TAR = buildroot-20060606.tar.bz2
+BR_TAR = buildroot-snapshot.tar.bz2
 BR_URL = http://buildroot.uclibc.org/downloads/snapshots/$(BR_TAR)
-#BR_URL = 
http://buildroot.uclibc.org/downloads/snapshots/buildroot-snapshot.tar.bz2
 BR_SRC = buildroot
 BR_IMG = $(BR_SRC)/rootfs.i386.ext2
 

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


VIO work complete Was: [XenPPC] [linux-ppc-2.6] [LINUX][XEN][POWERPC] Enable PowerPC use of netback

2006-10-10 Thread Jimi Xenidis

barring bugs :)
On Oct 10, 2006, at 10:03 AM, Xen patchbot-linux-ppc-2.6 wrote:


# HG changeset patch
# User Jimi Xenidis <[EMAIL PROTECTED]>
# Node ID d2b37a151f5b27924e5aa59b4701ae8a7a623b25
# Parent  f18ec562c11cabed94d448a12754660c63497fac
[LINUX][XEN][POWERPC] Enable PowerPC use of netback


This patch "completes" the VIO work for Net and Block.
It works for most xm-tests and all my manual checks.

Some xm-tests fail because they lose console because they reset  
"extra" and the domain no longer gets:

  extra = "xencons=tty128 console=tty128"

anyway, here is my net.dom script:

#  -*- mode: python; -*-
import time

kernel = "vmlinux.strip"

ramdisk = "/root/ramdisk.image.gz"
memory = 64

name = "S-%s" % time.strftime("%x-%X")

vif = [ '' ]
# Number of Virtual CPUS to use, default is 1
#vcpus = 1

# cmdline
extra = "ip=dhcp xencons=tty128 console=tty128"


and my disk.dom script (/root/disk1 is the initrd from xm-test):

#  -*- mode: python; -*-
import time

kernel = "vmlinux.strip"

#ramdisk = "/root/ramdisk.image.gz"
memory = 64

name = "S-%s" % time.strftime("%x-%X")

# Number of Virtual CPUS to use, default is 1
#vcpus = 1

#vif = [ '' ]
#disk = [ 'phy:hda3,hda3,r' ]
disk = [ 'file:/root/disk1,hda1,w']


# cmdline
extra = "root=/dev/hda1 rw init=/bin/sh sysrq=1 debug  
xencons=tty128 console=tty128"





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


[XenPPC] [linux-ppc-2.6] [LINUX][XEN][POWERPC] make sure set_phys_to_machine() asserts out memory model

2006-10-10 Thread Xen patchbot-linux-ppc-2 . 6
# HG changeset patch
# User Jimi Xenidis <[EMAIL PROTECTED]>
# Node ID 23cc5f7d71e01bc9908026b0f53e310ece230f60
# Parent  b9e38b262f6479dfa7260fea8efb0dcdc1e6e256
[LINUX][XEN][POWERPC] make sure set_phys_to_machine() asserts out memory model

Currently we run with mfn == pfn, we need to BUG() if any caller
assumes otherwise.

Signed-off-by: Jimi Xenidis <[EMAIL PROTECTED]>
---
 include/asm-powerpc/xen/asm/hypervisor.h |   11 ++-
 1 files changed, 10 insertions(+), 1 deletion(-)

diff -r b9e38b262f64 -r 23cc5f7d71e0 include/asm-powerpc/xen/asm/hypervisor.h
--- a/include/asm-powerpc/xen/asm/hypervisor.h  Sun Oct 08 14:22:12 2006 -0400
+++ b/include/asm-powerpc/xen/asm/hypervisor.h  Mon Oct 09 17:20:44 2006 -0400
@@ -224,7 +224,16 @@ MULTI_update_va_mapping_otherdomain(
 #endif
 }
 
-#define set_phys_to_machine(_x,_y) do {} while (0)
+#define INVALID_P2M_ENTRY (~0UL)
+#define FOREIGN_FRAME(m) (m)
+static inline void set_phys_to_machine(unsigned long pfn, unsigned long mfn)
+{
+   if (pfn != mfn && mfn != INVALID_P2M_ENTRY)
+   printk(KERN_EMERG "%s: pfn: 0x%lx mfn: 0x%lx\n",
+  __func__, pfn, mfn);
+   
+   return;
+}
 #define pfn_pte_ma(pfn, prot)  __pte(((pfn) << PAGE_SHIFT) | pgprot_val(prot))
 
 typedef unsigned long maddr_t;

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


[XenPPC] [linux-ppc-2.6] [LINUX][XEN][POWERPC] More accurate Grant Table Ops

2006-10-10 Thread Xen patchbot-linux-ppc-2 . 6
# HG changeset patch
# User Jimi Xenidis <[EMAIL PROTECTED]>
# Node ID f18ec562c11cabed94d448a12754660c63497fac
# Parent  2765c83b576d5af048d381c481e33f597c2be258
[LINUX][XEN][POWERPC] More accurate Grant Table Ops

This patch add the following:
 - More DBG() points of interest
 - If we run out of Bolted PTEs simply report it and let the "natural"
   page fault occur
 - Use the page counters to track PTE redundancies
 - BUG() if GNTTABOP_transfer is ever used
 - Add GNTTABOP_copy

The use of page counters may have SMP ramifications since the Linear
map inits the refcount to 1 and there is no atomic methods to inc/dec
and see if counter == 1.

Signed-off-by: Jimi Xenidis <[EMAIL PROTECTED]>
---
 arch/powerpc/platforms/xen/gnttab.c |  109 +++-
 1 files changed, 82 insertions(+), 27 deletions(-)

diff -r 2765c83b576d -r f18ec562c11c arch/powerpc/platforms/xen/gnttab.c
--- a/arch/powerpc/platforms/xen/gnttab.c   Mon Oct 09 19:57:42 2006 -0400
+++ b/arch/powerpc/platforms/xen/gnttab.c   Tue Oct 10 09:48:33 2006 -0400
@@ -39,6 +39,8 @@ static long map_to_linear(ulong paddr)
mode = _PAGE_ACCESSED | _PAGE_DIRTY | _PAGE_COHERENT | PP_RWXX;
vaddr = (ulong)__va(paddr);
 
+   DBG("%s: 0x%lx: 0x%x\n",
+   __func__, paddr, page_count(virt_to_page(vaddr)));
{
unsigned long vpn, hash, hpteg;
unsigned long vsid = get_kernel_vsid(vaddr);
@@ -57,25 +59,13 @@ static long map_to_linear(ulong paddr)
BUG_ON(!ppc_md.hpte_insert);
slot = ppc_md.hpte_insert(hpteg, va, paddr,
  tmp_mode, HPTE_V_BOLTED, psize);
-   BUG_ON(slot < 0);
+   if (slot < 0)
+   printk(KERN_EMERG
+  "%s: no more bolted entries "
+  "HTAB[0x%lx]: 0x%lx\n",
+  __func__, hpteg, paddr);
}
return slot;
-}
-
-static void gnttab_post_map_grant_ref(
-   struct gnttab_map_grant_ref *map, int count)
-{
-   int i;
-   long slot;
-
-   for (i = 0 ; i < count; i++) {
-   ulong pa = map[i].dev_bus_addr;
-   BUG_ON(pa < foreign_map_base || pa >= foreign_map_end);
-
-   slot = map_to_linear(pa);
-   /* store the slot somewhere */
-   map[i].host_addr = (ulong)__va(pa);
-   }
 }
 
 static unsigned long get_hpte_vsid(ulong slot)
@@ -128,29 +118,89 @@ static long find_hpte_slot(unsigned long
return -1;
 } 
 
+static long find_map_slot(ulong ea)
+{
+   int psize = MMU_PAGE_4K;
+   ulong vsid;
+   ulong va;
+
+   vsid = get_kernel_vsid(ea);
+   va = (vsid << 28) | (ea & 0x0fff);
+   
+   return find_hpte_slot(va, psize);
+}
+
+
 static void gnttab_pre_unmap_grant_ref(
struct gnttab_unmap_grant_ref *unmap, int count)
 {
long slot;
-   ulong vsid;
-   ulong va;
-   int psize = MMU_PAGE_4K;
int i;
ulong ea;
unsigned long dummy1, dummy2;
 
for (i = 0 ; i < count; i++) {
+   struct page *page;
+
ea = unmap[i].host_addr;
-   vsid = get_kernel_vsid(ea);
-   va = (vsid << 28) | (ea & 0x0fff);
-
-   slot = find_hpte_slot(va, psize);
-   BUG_ON(slot < 0);
-
+   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);
+   continue;
+   }
+   slot = find_map_slot(ea);
+   if (slot < 0) {
+   printk(KERN_EMERG "%s: PTE not found: 0x%lx\n",
+  __func__, ea);
+   continue;
+   }
+
+   DBG("%s: 0x%lx: 0x%x\n",
+  __func__, ea, page_count(virt_to_page(ea)));
plpar_pte_remove(0, slot, 0, &dummy1, &dummy2);
 
DBG("%s: remove_pages(0x%lx, 0x%lx)\n",
__func__, unmap[i].host_addr, unmap[i].dev_bus_addr);
+   }
+}
+
+static void gnttab_post_map_grant_ref(
+   struct gnttab_map_grant_ref *map, int count)
+{
+   int i;
+   long slot;
+
+   for (i = 0 ; i < count; i++) {
+   ulong pa = map[i].dev_bus_addr;
+   struct page *page;
+
+   BUG_ON(pa < foreign_map_base || pa >= foreign_map_end);
+
+   /* ??? store the slot somewhere ??? */
+   map[i].host_addr = (ulong)__va(pa);
+   page = virt_to_page(map[i].host_addr);
+
+   if (page_count(page) == 1) {
+#ifdef DEBU

[XenPPC] [linux-ppc-2.6] [LINUX][XEN][POWERPC] Enable PowerPC use of netback

2006-10-10 Thread Xen patchbot-linux-ppc-2 . 6
# HG changeset patch
# User Jimi Xenidis <[EMAIL PROTECTED]>
# Node ID d2b37a151f5b27924e5aa59b4701ae8a7a623b25
# Parent  f18ec562c11cabed94d448a12754660c63497fac
[LINUX][XEN][POWERPC] Enable PowerPC use of netback

This patch uses ifdefs heavilty simply to identify areas of change so
that arch independent interfaces can be introduced later as we update
with upstream changes.

Signed-off-by: Jimi Xenidis <[EMAIL PROTECTED]>
---
 drivers/xen/netback/netback.c |   72 +++---
 1 files changed, 60 insertions(+), 12 deletions(-)

diff -r f18ec562c11c -r d2b37a151f5b drivers/xen/netback/netback.c
--- a/drivers/xen/netback/netback.c Tue Oct 10 09:48:33 2006 -0400
+++ b/drivers/xen/netback/netback.c Tue Oct 10 09:57:12 2006 -0400
@@ -71,9 +71,35 @@ static struct sk_buff_head rx_queue;
 static struct sk_buff_head rx_queue;
 
 static unsigned long mmap_vstart;
+#ifdef CONFIG_PPC_XEN
+
+
+static ulong mmap_vaddrs[MAX_PENDING_REQS];
+#define MMAP_VADDR(_req) (mmap_vaddrs[(_req)])
+
+static inline void PPC_map_vaddrs(int idx, gnttab_map_grant_ref_t *mop)
+{
+   struct page *page;
+   ulong virt = mop->host_addr;
+
+   page = virt_to_page(virt);
+   get_page(page);
+
+#if 0
+   SetPageForeign(page, netif_page_release);
+#else
+   (void)netif_page_release;
+#endif
+   mmap_vaddrs[idx] = virt;
+}
+#define _mmap_vaddrs(i,op) do { mmap_vaddrs[(i)] = mop->host_addr;
+#else
 #define MMAP_VADDR(_req) (mmap_vstart + ((_req) * PAGE_SIZE))
-
+#endif
+
+#ifndef CONFIG_PPC_XEN
 static void *rx_mmap_area;
+#endif
 
 #define PKT_PROT_LEN 64
 
@@ -939,9 +965,13 @@ static int netbk_tx_check_mop(struct sk_
pending_ring[MASK_PEND_IDX(pending_prod++)] = pending_idx;
netif_put(netif);
} else {
+#ifdef CONFIG_PPC_XEN
+   PPC_map_vaddrs(pending_idx, mop);
+#else
set_phys_to_machine(
__pa(MMAP_VADDR(pending_idx)) >> PAGE_SHIFT,
FOREIGN_FRAME(mop->dev_bus_addr >> PAGE_SHIFT));
+#endif
grant_tx_handle[pending_idx] = mop->handle;
}
 
@@ -956,9 +986,13 @@ static int netbk_tx_check_mop(struct sk_
/* Check error status: if okay then remember grant handle. */
newerr = (++mop)->status;
if (likely(!newerr)) {
+#ifdef CONFIG_PPC_XEN
+   PPC_map_vaddrs(pending_idx, mop);
+#else
set_phys_to_machine(
__pa(MMAP_VADDR(pending_idx))>>PAGE_SHIFT,
FOREIGN_FRAME(mop->dev_bus_addr>>PAGE_SHIFT));
+#endif
grant_tx_handle[pending_idx] = mop->handle;
/* Had a previous error? Invalidate this fragment. */
if (unlikely(err))
@@ -1317,17 +1351,20 @@ static void netif_page_release(struct pa
 {
u16 pending_idx = page - virt_to_page(mmap_vstart);
 
+#ifdef CONFIG_PPC_XEN  /* Ready for next use. */
+   BUG();
+#endif 
+   init_page_count(page);
+   netif_idx_release(pending_idx);
+}
+
+#ifndef CONFIG_PPC_XEN
+static void netif_rx_page_release(struct page *page)
+{
/* Ready for next use. */
init_page_count(page);
-
-   netif_idx_release(pending_idx);
-}
-
-static void netif_rx_page_release(struct page *page)
-{
-   /* Ready for next use. */
-   init_page_count(page);
-}
+}
+#endif
 
 irqreturn_t netif_be_int(int irq, void *dev_id, struct pt_regs *regs)
 {
@@ -1437,6 +1474,10 @@ static int __init netback_init(void)
if (!is_running_on_xen())
return -ENODEV;
 
+#ifdef CONFIG_PPC_XEN
+   if (!(xen_start_info->flags & SIF_INITDOMAIN))
+   return -ENODEV;
+#endif
/* We can increase reservation by this much in net_rx_action(). */
balloon_update_driver_allowance(NET_RX_RING_SIZE);
 
@@ -1446,7 +1487,11 @@ static int __init netback_init(void)
init_timer(&net_timer);
net_timer.data = 0;
net_timer.function = net_alarm;
-
+
+#ifdef CONFIG_PPC_XEN
+   (void)page;
+   mmap_vstart = foreign_alloc_empty_page_range(MAX_PENDING_REQS);
+#else
page = balloon_alloc_empty_page_range(MAX_PENDING_REQS);
if (page == NULL)
return -ENOMEM;
@@ -1458,7 +1503,9 @@ static int __init netback_init(void)
init_page_count(page);
SetPageForeign(page, netif_page_release);
}
-
+#endif
+
+#ifndef CONFIG_PPC_XEN
page = balloon_alloc_empty_page_range(NET_RX_RING_SIZE);
BUG_ON(page == NULL);
rx_mmap_area = pfn_to_kaddr(page_to_pfn(page));
@@ -1468,6 +1515,7 @@ static int __init netback_init(void)
init_page_count(page);
SetPageForeign(page, netif_rx_page_release);
}
+#endif
 
pending_cons = 0;
pending_prod = MAX_PENDING_REQS;

___
Xen-ppc-devel mailing list

[XenPPC] [linux-ppc-2.6] [LINUX][XEN][POWERPC] implement HYPERVISOR_multicall()

2006-10-10 Thread Xen patchbot-linux-ppc-2 . 6
# HG changeset patch
# User Jimi Xenidis <[EMAIL PROTECTED]>
# Node ID 2765c83b576d5af048d381c481e33f597c2be258
# Parent  23cc5f7d71e01bc9908026b0f53e310ece230f60
[LINUX][XEN][POWERPC] implement HYPERVISOR_multicall()

Sadly, the xencomm thing makes performing the multicall loop in Xen
prohibitive, so for now we blow it out here.  I think some level of
atomicity is expected from the multicall so we precheck all the ops
and the turn off interrupts while we make all the calls.

Signed-off-by: Jimi Xenidis <[EMAIL PROTECTED]>
---
 arch/powerpc/platforms/xen/hcall.c |   34 --
 1 files changed, 32 insertions(+), 2 deletions(-)

diff -r 23cc5f7d71e0 -r 2765c83b576d arch/powerpc/platforms/xen/hcall.c
--- a/arch/powerpc/platforms/xen/hcall.cMon Oct 09 17:20:44 2006 -0400
+++ b/arch/powerpc/platforms/xen/hcall.cMon Oct 09 19:57:42 2006 -0400
@@ -189,10 +189,40 @@ HYPERVISOR_poll(
 }
 EXPORT_SYMBOL(HYPERVISOR_poll);
 
+typedef ulong (mf_t)(ulong arg0, ...);
+
+static mf_t *multicall_funcs[] = {
+   [__HYPERVISOR_grant_table_op] = (mf_t *)HYPERVISOR_grant_table_op,
+};
+
 int HYPERVISOR_multicall(void *call_list, int nr_calls)
 {
-   BUG();
-   return -ENOSYS;
+   /* we blow out the multicall because the xencomm stuff is jsut
+* too tricky */
+   multicall_entry_t *mcl = (multicall_entry_t *)call_list;
+   multicall_entry_t *c;
+   int i;
+   mf_t *mf;
+   int res;
+   ulong flags;
+
+   /* let make sure all the calls are supported */
+   for (i = 0; i < nr_calls; i++) {
+   mf = multicall_funcs[mcl[i].op];
+   BUG_ON(mf == NULL);
+   }
+   /* disable interrupts until we are done all calls */
+   local_irq_save(flags);
+   for (i = 0; i < nr_calls; i++) {
+   /* lookup supported multicalls */
+   c = &mcl[i];
+   mf = multicall_funcs[c->op];
+   res = mf(c->args[0], c->args[1], c->args[2],
+c->args[3], c->args[4], c->args[5]);
+   c->result = res;
+   }
+   local_irq_restore(flags);
+   return 0;
 }
 EXPORT_SYMBOL(HYPERVISOR_multicall);
 

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


Re: [XenPPC] [xenppc-unstable] [XEN][POWERPC] Remove pfn2mfn() now that it is understood

2006-10-10 Thread Jimi Xenidis


On Oct 10, 2006, at 9:20 AM, Xen patchbot-xenppc-unstable wrote:


# HG changeset patch
# User Jimi Xenidis <[EMAIL PROTECTED]>
# Node ID 7af3636da4b955e556af19af91b03633b565cce2
# Parent  3583d270140501b208f08335e10105d3f05c52d8
[XEN][POWERPC] Remove pfn2mfn() now that it is understood

That should be "Remove pfn2mfn() BUG()..."


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


[XenPPC] [xenppc-unstable] [XEN][POWERPC] New interface ATTN() to conact the HW probe

2006-10-10 Thread Xen patchbot-xenppc-unstable
# HG changeset patch
# User Jimi Xenidis <[EMAIL PROTECTED]>
# Node ID 05c8ce1d697cd7d16adbfb706680adfb95d4490f
# Parent  7af3636da4b955e556af19af91b03633b565cce2
[XEN][POWERPC] New interface ATTN() to conact the HW probe

Sometimes it is useful to have your code contact the HW probe directly
rather than call BUG().

Signed-off-by: Jimi Xenidis <[EMAIL PROTECTED]>
---
 xen/arch/powerpc/setup.c   |   12 ++--
 xen/include/asm-powerpc/debugger.h |3 +++
 2 files changed, 13 insertions(+), 2 deletions(-)

diff -r 7af3636da4b9 -r 05c8ce1d697c xen/arch/powerpc/setup.c
--- a/xen/arch/powerpc/setup.c  Tue Oct 10 09:09:38 2006 -0400
+++ b/xen/arch/powerpc/setup.c  Tue Oct 10 09:11:32 2006 -0400
@@ -114,12 +114,20 @@ static void __init do_initcalls(void)
 }
 }
 
-static void hw_probe_attn(unsigned char key, struct cpu_user_regs *regs)
+
+void noinline __attn(void)
 {
 /* To continue the probe will step over the ATTN instruction.  The
  * NOP is there to make sure there is something sane to "step
  * over" to. */
-asm volatile(".long 0x0200; nop");
+console_start_sync();
+asm volatile("attn");
+console_end_sync();
+}
+
+static void hw_probe_attn(unsigned char key, struct cpu_user_regs *regs)
+{
+__attn();
 }
 
 static void percpu_init_areas(void)
diff -r 7af3636da4b9 -r 05c8ce1d697c xen/include/asm-powerpc/debugger.h
--- a/xen/include/asm-powerpc/debugger.hTue Oct 10 09:09:38 2006 -0400
+++ b/xen/include/asm-powerpc/debugger.hTue Oct 10 09:11:32 2006 -0400
@@ -68,6 +68,9 @@ extern void __warn(char *file, int line)
 #define WARN() __warn(__FILE__, __LINE__)
 #define WARN_ON(_p) do { if (_p) WARN(); } while ( 0 )
 
+extern void __attn(void);
+#define ATTN() __attn();
+
 #define FORCE_CRASH() __force_crash()
 
 #ifdef CRASH_DEBUG

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


[XenPPC] [xenppc-unstable] [XEN][POWERPC] Remove pfn2mfn() now that it is understood

2006-10-10 Thread Xen patchbot-xenppc-unstable
# HG changeset patch
# User Jimi Xenidis <[EMAIL PROTECTED]>
# Node ID 7af3636da4b955e556af19af91b03633b565cce2
# Parent  3583d270140501b208f08335e10105d3f05c52d8
[XEN][POWERPC] Remove pfn2mfn() now that it is understood

It is possible (thank you xm-test) to initiate a grant copy to a page
belonging to a dying domain, the page end up being owned by nobody
which is what the original test asserted.

Signed-off-by: Jimi Xenidis <[EMAIL PROTECTED]>
---
 xen/arch/powerpc/mm.c |   13 -
 1 files changed, 12 insertions(+), 1 deletion(-)

diff -r 3583d2701405 -r 7af3636da4b9 xen/arch/powerpc/mm.c
--- a/xen/arch/powerpc/mm.c Sun Oct 08 11:52:28 2006 -0400
+++ b/xen/arch/powerpc/mm.c Tue Oct 10 09:09:38 2006 -0400
@@ -416,7 +416,18 @@ ulong pfn2mfn(struct domain *d, ulong pf
 cur_pfn += pe_pages;
 }
 }
-BUG_ON(t != PFN_TYPE_NONE && page_get_owner(mfn_to_page(mfn)) != d);
+#ifdef DEBUG
+if (t != PFN_TYPE_NONE &&
+(d->domain_flags & DOMF_dying) &&
+page_get_owner(mfn_to_page(mfn)) != d) {
+printk("%s: page type: %d owner Dom[%d]:%p expected Dom[%d]:%p\n",
+   __func__, t,
+   page_get_owner(mfn_to_page(mfn))->domain_id,
+   page_get_owner(mfn_to_page(mfn)),
+   d->domain_id, d);
+BUG();
+}
+#endif
 }
 
 if (t == PFN_TYPE_NONE) {

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