All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [0/3] More pSeries machine tweaks
@ 2011-04-19  1:54 David Gibson
  2011-04-19  1:54 ` [Qemu-devel] [PATCH 1/3] pseries: Increase maximum CPUs to 256 David Gibson
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: David Gibson @ 2011-04-19  1:54 UTC (permalink / raw)
  To: agraf, qemu-devel; +Cc: paulus, anton

Hi Alex,

Here are several more minor tweaks/improvements to the pseries machine emulation.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Qemu-devel] [PATCH 1/3] pseries: Increase maximum CPUs to 256
  2011-04-19  1:54 [Qemu-devel] [0/3] More pSeries machine tweaks David Gibson
@ 2011-04-19  1:54 ` David Gibson
  2011-04-19  7:38   ` Alexander Graf
  2011-04-19  1:54 ` [Qemu-devel] [PATCH 2/3] Make pSeries 'model' property more closely resemble real hardware David Gibson
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 11+ messages in thread
From: David Gibson @ 2011-04-19  1:54 UTC (permalink / raw)
  To: agraf, qemu-devel; +Cc: paulus, anton

From: Anton Blanchard <anton@au1.ibm.com>

The original pSeries machine was limited to 32 CPUs, more or less
arbitrarily.  Particularly when we get SMT KVM guests it will be
pretty easy to exceed this.  Therefore, raise the max number of CPUs
in a pseries machine guest to 256.

Signed-off-by: Anton Blanchard <anton@au1.ibm.com>
Signed-off-by: David Gibson <dwg@au1.ibm.com>
---
 hw/spapr.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/spapr.c b/hw/spapr.c
index 1782cc0..67dd1e5 100644
--- a/hw/spapr.c
+++ b/hw/spapr.c
@@ -51,7 +51,7 @@
 
 #define TIMEBASE_FREQ           512000000ULL
 
-#define MAX_CPUS                32
+#define MAX_CPUS                256
 #define XICS_IRQS		1024
 
 sPAPREnvironment *spapr;
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Qemu-devel] [PATCH 2/3] Make pSeries 'model' property more closely resemble real hardware
  2011-04-19  1:54 [Qemu-devel] [0/3] More pSeries machine tweaks David Gibson
  2011-04-19  1:54 ` [Qemu-devel] [PATCH 1/3] pseries: Increase maximum CPUs to 256 David Gibson
@ 2011-04-19  1:54 ` David Gibson
  2011-04-19  1:54 ` [Qemu-devel] [PATCH 3/3] Place pseries vty devices at addresses more similar to existing machines David Gibson
  2011-04-25 16:42 ` [Qemu-devel] pSeries build breakage Andreas Färber
  3 siblings, 0 replies; 11+ messages in thread
From: David Gibson @ 2011-04-19  1:54 UTC (permalink / raw)
  To: agraf, qemu-devel; +Cc: paulus, anton

Currently, the qemu emulated pseries machine puts
"qemu,emulated-pSeries-LPAR" in the device tree's root level 'model'
property.  Unfortunately this confuses some installers and ybin, which
expect this to start with "IBM" on pSeries machines.  This patch addresses
this problem, making the property more closely resemble the pattern of
existing real hardware.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
---
 hw/spapr.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/hw/spapr.c b/hw/spapr.c
index 67dd1e5..884c667 100644
--- a/hw/spapr.c
+++ b/hw/spapr.c
@@ -93,7 +93,7 @@ static void *spapr_create_fdt_skel(const char *cpu_model,
     /* Root node */
     _FDT((fdt_begin_node(fdt, "")));
     _FDT((fdt_property_string(fdt, "device_type", "chrp")));
-    _FDT((fdt_property_string(fdt, "model", "qemu,emulated-pSeries-LPAR")));
+    _FDT((fdt_property_string(fdt, "model", "IBM pSeries (emulated by qemu)")));
 
     _FDT((fdt_property_cell(fdt, "#address-cells", 0x2)));
     _FDT((fdt_property_cell(fdt, "#size-cells", 0x2)));
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* [Qemu-devel] [PATCH 3/3] Place pseries vty devices at addresses more similar to existing machines
  2011-04-19  1:54 [Qemu-devel] [0/3] More pSeries machine tweaks David Gibson
  2011-04-19  1:54 ` [Qemu-devel] [PATCH 1/3] pseries: Increase maximum CPUs to 256 David Gibson
  2011-04-19  1:54 ` [Qemu-devel] [PATCH 2/3] Make pSeries 'model' property more closely resemble real hardware David Gibson
@ 2011-04-19  1:54 ` David Gibson
  2011-04-25 16:42 ` [Qemu-devel] pSeries build breakage Andreas Färber
  3 siblings, 0 replies; 11+ messages in thread
From: David Gibson @ 2011-04-19  1:54 UTC (permalink / raw)
  To: agraf, qemu-devel; +Cc: paulus, anton

Currently the qemu pseries machine numbers its virtual serial devices
from 0.  However, existing pSeries machines running pHyp number them from
0x30000000.

In theory these indices are arbitrary, since everything necessary for the
kernel to find them is advertised in the device tree.  However the debian
installer, at least, incorrectly looks for a device named vty@30... to
determine whether to use the hypervisor console.

Therefore this patch moves the numbers we use to match the existing pHyp
practice, in order to workaround broken userspace apps of this type.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
---
 hw/spapr.c      |    5 +++--
 hw/spapr_rtas.c |    3 ++-
 hw/spapr_vio.h  |    2 ++
 3 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/hw/spapr.c b/hw/spapr.c
index 884c667..109b774 100644
--- a/hw/spapr.c
+++ b/hw/spapr.c
@@ -362,8 +362,9 @@ static void ppc_spapr_init(ram_addr_t ram_size,
 
     for (i = 0; i < MAX_SERIAL_PORTS; i++, irq++) {
         if (serial_hds[i]) {
-            spapr_vty_create(spapr->vio_bus, i, serial_hds[i],
-                             xics_find_qirq(spapr->icp, irq), irq);
+            spapr_vty_create(spapr->vio_bus, SPAPR_VTY_BASE_ADDRESS + i,
+                             serial_hds[i], xics_find_qirq(spapr->icp, irq),
+                             irq);
         }
     }
 
diff --git a/hw/spapr_rtas.c b/hw/spapr_rtas.c
index 16b6542..00c8ce5 100644
--- a/hw/spapr_rtas.c
+++ b/hw/spapr_rtas.c
@@ -44,7 +44,8 @@ static void rtas_display_character(sPAPREnvironment *spapr,
                                    uint32_t nret, target_ulong rets)
 {
     uint8_t c = rtas_ld(args, 0);
-    VIOsPAPRDevice *sdev = spapr_vio_find_by_reg(spapr->vio_bus, 0);
+    VIOsPAPRDevice *sdev = spapr_vio_find_by_reg(spapr->vio_bus,
+                                                 SPAPR_VTY_BASE_ADDRESS);
 
     if (!sdev) {
         rtas_st(rets, 0, -1);
diff --git a/hw/spapr_vio.h b/hw/spapr_vio.h
index 841b043..603a8c4 100644
--- a/hw/spapr_vio.h
+++ b/hw/spapr_vio.h
@@ -32,6 +32,8 @@ enum VIOsPAPR_TCEAccess {
     SPAPR_TCE_RW = 3,
 };
 
+#define SPAPR_VTY_BASE_ADDRESS     0x30000000
+
 struct VIOsPAPRDevice;
 
 typedef struct VIOsPAPR_RTCE {
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH 1/3] pseries: Increase maximum CPUs to 256
  2011-04-19  1:54 ` [Qemu-devel] [PATCH 1/3] pseries: Increase maximum CPUs to 256 David Gibson
@ 2011-04-19  7:38   ` Alexander Graf
  2011-04-19 12:44     ` David Gibson
  0 siblings, 1 reply; 11+ messages in thread
From: Alexander Graf @ 2011-04-19  7:38 UTC (permalink / raw)
  To: David Gibson; +Cc: paulus, qemu-devel, anton


On 19.04.2011, at 03:54, David Gibson wrote:

> From: Anton Blanchard <anton@au1.ibm.com>
> 
> The original pSeries machine was limited to 32 CPUs, more or less
> arbitrarily.  Particularly when we get SMT KVM guests it will be
> pretty easy to exceed this.  Therefore, raise the max number of CPUs
> in a pseries machine guest to 256.

Are the 256 limited by technical limits or arbitrary as well? :)


Alex

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH 1/3] pseries: Increase maximum CPUs to 256
  2011-04-19  7:38   ` Alexander Graf
@ 2011-04-19 12:44     ` David Gibson
  2011-04-19 15:02       ` Alexander Graf
  0 siblings, 1 reply; 11+ messages in thread
From: David Gibson @ 2011-04-19 12:44 UTC (permalink / raw)
  To: Alexander Graf; +Cc: paulus, qemu-devel, anton

On Tue, Apr 19, 2011 at 09:38:58AM +0200, Alexander Graf wrote:
> 
> On 19.04.2011, at 03:54, David Gibson wrote:
> 
> > From: Anton Blanchard <anton@au1.ibm.com>
> > 
> > The original pSeries machine was limited to 32 CPUs, more or less
> > arbitrarily.  Particularly when we get SMT KVM guests it will be
> > pretty easy to exceed this.  Therefore, raise the max number of CPUs
> > in a pseries machine guest to 256.
> 
> Are the 256 limited by technical limits or arbitrary as well? :)

Still arbitrary, just bigger.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH 1/3] pseries: Increase maximum CPUs to 256
  2011-04-19 12:44     ` David Gibson
@ 2011-04-19 15:02       ` Alexander Graf
  2011-04-20  6:31         ` David Gibson
  0 siblings, 1 reply; 11+ messages in thread
From: Alexander Graf @ 2011-04-19 15:02 UTC (permalink / raw)
  To: qemu-devel, anton, paulus, benh

On 04/19/2011 02:44 PM, David Gibson wrote:
> On Tue, Apr 19, 2011 at 09:38:58AM +0200, Alexander Graf wrote:
>> On 19.04.2011, at 03:54, David Gibson wrote:
>>
>>> From: Anton Blanchard<anton@au1.ibm.com>
>>>
>>> The original pSeries machine was limited to 32 CPUs, more or less
>>> arbitrarily.  Particularly when we get SMT KVM guests it will be
>>> pretty easy to exceed this.  Therefore, raise the max number of CPUs
>>> in a pseries machine guest to 256.
>> Are the 256 limited by technical limits or arbitrary as well? :)
> Still arbitrary, just bigger.

Can't we set it to the real, technical limit then?


Alex

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH 1/3] pseries: Increase maximum CPUs to 256
  2011-04-19 15:02       ` Alexander Graf
@ 2011-04-20  6:31         ` David Gibson
  2011-04-20  7:12           ` Alexander Graf
  0 siblings, 1 reply; 11+ messages in thread
From: David Gibson @ 2011-04-20  6:31 UTC (permalink / raw)
  To: Alexander Graf; +Cc: paulus, qemu-devel, anton

On Tue, Apr 19, 2011 at 05:02:21PM +0200, Alexander Graf wrote:
> On 04/19/2011 02:44 PM, David Gibson wrote:
> >On Tue, Apr 19, 2011 at 09:38:58AM +0200, Alexander Graf wrote:
> >>On 19.04.2011, at 03:54, David Gibson wrote:
> >>
> >>>From: Anton Blanchard<anton@au1.ibm.com>
> >>>
> >>>The original pSeries machine was limited to 32 CPUs, more or less
> >>>arbitrarily.  Particularly when we get SMT KVM guests it will be
> >>>pretty easy to exceed this.  Therefore, raise the max number of CPUs
> >>>in a pseries machine guest to 256.
> >>Are the 256 limited by technical limits or arbitrary as well? :)
> >Still arbitrary, just bigger.
> 
> Can't we set it to the real, technical limit then?

There is no clear real, technical limit.  It would depend on exactly
what generation of pSeries we're talking about, and be in the
thousands.

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] [PATCH 1/3] pseries: Increase maximum CPUs to 256
  2011-04-20  6:31         ` David Gibson
@ 2011-04-20  7:12           ` Alexander Graf
  0 siblings, 0 replies; 11+ messages in thread
From: Alexander Graf @ 2011-04-20  7:12 UTC (permalink / raw)
  To: David Gibson; +Cc: paulus, qemu-devel, anton


On 20.04.2011, at 08:31, David Gibson wrote:

> On Tue, Apr 19, 2011 at 05:02:21PM +0200, Alexander Graf wrote:
>> On 04/19/2011 02:44 PM, David Gibson wrote:
>>> On Tue, Apr 19, 2011 at 09:38:58AM +0200, Alexander Graf wrote:
>>>> On 19.04.2011, at 03:54, David Gibson wrote:
>>>> 
>>>>> From: Anton Blanchard<anton@au1.ibm.com>
>>>>> 
>>>>> The original pSeries machine was limited to 32 CPUs, more or less
>>>>> arbitrarily.  Particularly when we get SMT KVM guests it will be
>>>>> pretty easy to exceed this.  Therefore, raise the max number of CPUs
>>>>> in a pseries machine guest to 256.
>>>> Are the 256 limited by technical limits or arbitrary as well? :)
>>> Still arbitrary, just bigger.
>> 
>> Can't we set it to the real, technical limit then?
> 
> There is no clear real, technical limit.  It would depend on exactly
> what generation of pSeries we're talking about, and be in the
> thousands.

So I suppose we should set the max to the thousands then? Why limit it arbitrarily?


Alex

^ permalink raw reply	[flat|nested] 11+ messages in thread

* [Qemu-devel] pSeries build breakage
  2011-04-19  1:54 [Qemu-devel] [0/3] More pSeries machine tweaks David Gibson
                   ` (2 preceding siblings ...)
  2011-04-19  1:54 ` [Qemu-devel] [PATCH 3/3] Place pseries vty devices at addresses more similar to existing machines David Gibson
@ 2011-04-25 16:42 ` Andreas Färber
  2011-04-26 10:02   ` David Gibson
  3 siblings, 1 reply; 11+ messages in thread
From: Andreas Färber @ 2011-04-25 16:42 UTC (permalink / raw)
  To: David Gibson, Alexander Graf; +Cc: qemu-devel@nongnu.org Developers

Hello,

Building QEMU HEAD (347ac8e35661eff1c2b5ec74d11ee152f2a61856 target- 
i386: switch to softfloat) on OSX/ppc64 results in:

[...]
   LINK  arm-softmmu/qemu-system-arm
make: *** pc-bios/spapr-rtas: No such file or directory.  Stop.
make: *** [romsubdir-spapr-rtas] Error 2

Could this be a VPATH issue? The source pc-bios dir does have such a  
directory but not the build dir.

Regards,
Andreas

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [Qemu-devel] pSeries build breakage
  2011-04-25 16:42 ` [Qemu-devel] pSeries build breakage Andreas Färber
@ 2011-04-26 10:02   ` David Gibson
  0 siblings, 0 replies; 11+ messages in thread
From: David Gibson @ 2011-04-26 10:02 UTC (permalink / raw)
  To: Andreas Färber; +Cc: Alexander Graf, qemu-devel@nongnu.org Developers

On Mon, Apr 25, 2011 at 06:42:25PM +0200, Andreas Färber wrote:
> Hello,
> 
> Building QEMU HEAD (347ac8e35661eff1c2b5ec74d11ee152f2a61856 target-
> i386: switch to softfloat) on OSX/ppc64 results in:
> 
> [...]
>   LINK  arm-softmmu/qemu-system-arm
> make: *** pc-bios/spapr-rtas: No such file or directory.  Stop.
> make: *** [romsubdir-spapr-rtas] Error 2
> 
> Could this be a VPATH issue? The source pc-bios dir does have such a
> directory but not the build dir.

I think it probably is.  I hit something else when fiddling with some
debian packaging, seemed to go away when I built in the source
directory.

The makefile rules for this copied from the ones for optionrom/ and I
don't really understand what's going wrong :/

-- 
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2011-04-26 10:27 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-19  1:54 [Qemu-devel] [0/3] More pSeries machine tweaks David Gibson
2011-04-19  1:54 ` [Qemu-devel] [PATCH 1/3] pseries: Increase maximum CPUs to 256 David Gibson
2011-04-19  7:38   ` Alexander Graf
2011-04-19 12:44     ` David Gibson
2011-04-19 15:02       ` Alexander Graf
2011-04-20  6:31         ` David Gibson
2011-04-20  7:12           ` Alexander Graf
2011-04-19  1:54 ` [Qemu-devel] [PATCH 2/3] Make pSeries 'model' property more closely resemble real hardware David Gibson
2011-04-19  1:54 ` [Qemu-devel] [PATCH 3/3] Place pseries vty devices at addresses more similar to existing machines David Gibson
2011-04-25 16:42 ` [Qemu-devel] pSeries build breakage Andreas Färber
2011-04-26 10:02   ` David Gibson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.