More pSeries machine tweaks
cover More pSeries machine tweaks
Hi Alex,
Here are several more minor tweaks/improvements to the pseries machine emulation.
PATCH 1/3 pseries: Increase maximum CPUs to 256
From: Anton Blanchard <[email protected]>
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.
--- hw/spapr.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
hw/spapr.c +1 -1
@@ -51,7 +51,7 @@#define TIMEBASE_FREQ 512000000ULL -#define MAX_CPUS 32 +#define MAX_CPUS 256#define XICS_IRQS 1024sPAPREnvironment *spapr;
Signature · 1 line
1.7.1
Re: [Qemu-devel] [PATCH 1/3] pseries: Increase maximum CPUs to 256
Quoted 6 lines · David Gibson
From: Anton Blanchard <[email protected]>
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
Re: [Qemu-devel] [PATCH 1/3] pseries: Increase maximum CPUs to 256
Quoted 11 lines · Alexander Graf
Quoted 6 lines · David Gibson
From: Anton Blanchard <[email protected]>
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.
Signature · 4 lines
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
Re: [Qemu-devel] [PATCH 1/3] pseries: Increase maximum CPUs to 256
Quoted 11 lines · David Gibson
Quoted 9 lines · Alexander Graf
Quoted 6 lines · David Gibson
From: Anton Blanchard<[email protected]>
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
Re: [Qemu-devel] [PATCH 1/3] pseries: Increase maximum CPUs to 256
Quoted 6 lines · Alexander Graf
Quoted 5 lines · David Gibson
Quoted 4 lines · Alexander Graf
Quoted 2 lines · David Gibson
From: Anton Blanchard<[email protected]>
Quoted 8 lines
Quoted 6 lines
Quoted 5 lines
Quoted 4 lines
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.
Signature · 4 lines
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
Re: [Qemu-devel] [PATCH 1/3] pseries: Increase maximum CPUs to 256
Quoted 11 lines · David Gibson
Quoted 10 lines · Alexander Graf
Quoted 9 lines · David Gibson
Quoted 8 lines · Alexander Graf
Quoted 6 lines · David Gibson
From: Anton Blanchard<[email protected]>
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.
Quoted 8 lines
Quoted 4 lines
Quoted 2 lines
Quoted 1 line
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
PATCH 2/3 Make pSeries 'model' property more closely resemble real hardware
In reply to David GibsonCurrently, 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.
--- hw/spapr.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
hw/spapr.c +1 -1
@@ -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 )));
Signature · 1 line
1.7.1
PATCH 3/3 Place pseries vty devices at addresses more similar to existing machines
In reply to David GibsonCurrently 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.
--- hw/spapr.c | 5 +++-- hw/spapr_rtas.c | 3 ++- hw/spapr_vio.h | 2 ++ 3 files changed, 7 insertions(+), 3 deletions(-)
hw/spapr.c +3 -2
@@ -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); } }
hw/spapr_rtas.c +2 -1
@@ -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 );
hw/spapr_vio.h +2 -0
@@ -32,6 +32,8 @@ enum VIOsPAPR_TCEAccess { SPAPR_TCE_RW = 3, }; +#define SPAPR_VTY_BASE_ADDRESS 0x30000000 +struct VIOsPAPRDevice ; typedef struct VIOsPAPR_RTCE {
Signature · 1 line
1.7.1
[Qemu-devel] pSeries build breakage
In reply to David GibsonHello,
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
Re: [Qemu-devel] pSeries build breakage
Quoted 5 lines · Andreas Färber
Hello,
Building QEMU HEAD (
347ac8e35661eff1c2b5ec74d11ee152f2a61856target-
i386: switch to softfloat) on OSX/ppc64 results in:
Quoted 7 lines
[...]
LINK arm-softmmu/qemu-system-arm
make: *** pc-bios/spapr-rtas: No such file or directory. Stop.
make: *** [romsubdir-spapr-rtas] Error 2Could 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 :/
Signature · 4 lines
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