ppc-for-2.12 queue 20180108
The following changes since commit 281f327487c9c9b1599f93c589a408bbf4a651b8:
Merge remote-tracking branch 'remotes/vivier/tags/m68k-for-2.12-pull-request' into staging (2017-12-22 00:11:36 +0000)
are available in the Git repository at:
git://github.com/dgibson/qemu.git tags/ppc-for-2.12-20180108
for you to fetch changes up to 9f173585d3f35345b2facce50620ce2cdda05f2f:
spapr: Correct compatibility mode setting for hotplugged CPUs (2018-01-08 13:33:17 +1100)
----------------------------------------------------------------
ppc patch queue 2018-01-08
This pull requests supersedes both ppc-for-2.12-20180103 and ppc-for-2.12-20171219. We've discovered that some substantial extensions to the proposed capabilities infrastructure will be valuable, amongst other things for managing/advertising workarounds for the dreaded Meltdown/Spectre bugs.
Although that could be done as follow on changes, since the caps infrastructure hasn't been merged yet, we might as well pull it out while we rework, and just merge the unrelated bugfixes.
The last two pull requests apparently had problems on some arm32 systems. I haven't been able to reproduce those, so I have no idea which patch is causing them. If we get lucky and it was one of the patches I've removed from this series, this may also serve to unjam the other fixes.
Higlights from this series:
* SLOF update
* Significant TCG speedup from Paolo
* Several new devices for embedded platforms
* Fix to correctly set compatiblity mode for hotplugged CPUs
* dtc compile fix for older MacOS versions
----------------------------------------------------------------
Alexey Kardashevskiy (1):
pseries: Update SLOF firmware image to qemu-slof-20171214
BALATON Zoltan (4):
sm501: Add panel hardware cursor registers also to read function
sm501: Add some more unimplemented registers
ppc4xx_i2c: Implement basic I2C functions
hw/ide: Emulate SiI3112 SATA controller
Cédric Le Goater (2):
ppc/pnv: change powernv_ prefix to pnv_ for overall naming consistency target/ppc: more use of the PPC_*() macros
David Gibson (1):
spapr: Correct compatibility mode setting for hotplugged CPUs
Greg Kurz (1):
spapr_pci: use warn_report()
John Arbuckle (1):
Update dtc to fix compilation problem on Mac OS 10.6
Thomas Huth (1):
hw/ppc: Remove the deprecated spapr-pci-vfio-host-bridge device
[email protected] (1):
target-ppc: optimize cmp translation
MAINTAINERS | 6 + default-configs/ppcemb-softmmu.mak | 1 + dtc | 2 +- hw/display/sm501.c | 30 +++ hw/i2c/ppc4xx_i2c.c | 198 +++++++++++++++++--- hw/ide/Makefile.objs | 1 + hw/ide/sii3112.c | 368 +++++++++++++++++++++++++++++++++++++ hw/ide/trace-events | 5 + hw/ppc/pnv.c | 94 +++++----- hw/ppc/pnv_bmc.c | 2 +- hw/ppc/pnv_core.c | 8 +- hw/ppc/pnv_lpc.c | 16 +- hw/ppc/pnv_psi.c | 4 +- hw/ppc/pnv_xscom.c | 10 +- hw/ppc/spapr.c | 2 +- hw/ppc/spapr_pci.c | 6 +- hw/ppc/spapr_pci_vfio.c | 47 ----- hw/ppc/spapr_rtas.c | 9 + include/hw/i2c/ppc4xx_i2c.h | 3 + include/hw/ppc/pnv.h | 10 +- include/hw/ppc/pnv_xscom.h | 4 +- pc-bios/README | 2 +- pc-bios/slof.bin | Bin 905200 -> 913880 bytes qemu-doc.texi | 5 - roms/SLOF | 2 +- scripts/device-crash-test | 1 - target/ppc/cpu.h | 56 +++--- target/ppc/int_helper.c | 2 +- target/ppc/translate.c | 29 ++- 29 files changed, 717 insertions(+), 206 deletions(-) create mode 100644 hw/ide/sii3112.c
[Qemu-devel] [PULL 01/12] target-ppc: optimize cmp translation
From: "[email protected]" <[email protected]>
We know that only one bit (in addition to SO) is going to be set in the condition register, so do two movconds instead of three setconds, three shifts and two ORs.
For ppc64-linux-user, the code size reduction is around 5% and the performance improvement slightly less than 10%. For softmmu, the improvement is around 5%.
--- target/ppc/translate.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-)
target/ppc/translate.c +12 -17
@@ -605,27 +605,22 @@ static opc_handler_t invalid_handler = {static inline void gen_op_cmp (TCGv arg0,TCGv arg1,int s,int crf) {TCGv t0 =tcg_temp_new (); -TCGv_i32 t1 =tcg_temp_new_i32 (); - -tcg_gen_trunc_tl_i32 (cpu_crf[crf], cpu_so); - -tcg_gen_setcond_tl ((s ?TCG_COND_LT :TCG_COND_LTU ), t0, arg0, arg1); -tcg_gen_trunc_tl_i32 (t1, t0); -tcg_gen_shli_i32 (t1, t1,CRF_LT_BIT ); -tcg_gen_or_i32 (cpu_crf[crf], cpu_crf[crf], t1); +TCGv t1 =tcg_temp_new (); +TCGv_i32 t =tcg_temp_new_i32 (); -tcg_gen_setcond_tl ((s ?TCG_COND_GT :TCG_COND_GTU ), t0, arg0, arg1); -tcg_gen_trunc_tl_i32 (t1, t0); -tcg_gen_shli_i32 (t1, t1,CRF_GT_BIT ); -tcg_gen_or_i32 (cpu_crf[crf], cpu_crf[crf], t1); +tcg_gen_movi_tl (t0,CRF_EQ ); +tcg_gen_movi_tl (t1,CRF_LT ); +tcg_gen_movcond_tl ((s ?TCG_COND_LT :TCG_COND_LTU ), t0, arg0, arg1, t1, t0); +tcg_gen_movi_tl (t1,CRF_GT ); +tcg_gen_movcond_tl ((s ?TCG_COND_GT :TCG_COND_GTU ), t0, arg0, arg1, t1, t0); -tcg_gen_setcond_tl (TCG_COND_EQ , t0, arg0, arg1); -tcg_gen_trunc_tl_i32 (t1, t0); -tcg_gen_shli_i32 (t1, t1,CRF_EQ_BIT ); -tcg_gen_or_i32 (cpu_crf[crf], cpu_crf[crf], t1); +tcg_gen_trunc_tl_i32 (t, t0); +tcg_gen_trunc_tl_i32 (cpu_crf[crf], cpu_so); +tcg_gen_or_i32 (cpu_crf[crf], cpu_crf[crf], t);tcg_temp_free (t0); -tcg_temp_free_i32 (t1); +tcg_temp_free (t1); +tcg_temp_free_i32 (t); }static inline void gen_op_cmpi (TCGv arg0,target_ulong arg1,int s,int crf)
Signature · 1 line
2.14.3
Re: [Qemu-devel] [PULL 01/12] target-ppc: optimize cmp translation
Quoted 51 lines · David Gibson
From: "[email protected]" <[email protected]>
We know that only one bit (in addition to SO) is going to be set in the condition register, so do two movconds instead of three setconds, three shifts and two ORs.
For ppc64-linux-user, the code size reduction is around 5% and the performance improvement slightly less than 10%. For softmmu, the improvement is around 5%.
Signed-off-by Paolo Bonzini <[email protected]>Signed-off-by David Gibson <[email protected]>--- target/ppc/translate.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-)target/ppc/translate.c +8
-16@@ -605,27 +605,22 @@ static opc_handler_t invalid_handler = {static inline void gen_op_cmp (TCGv arg0,TCGv arg1,int s,int crf) {TCGv t0 =tcg_temp_new (); -TCGv_i32 t1 =tcg_temp_new_i32 (); - -tcg_gen_trunc_tl_i32 (cpu_crf[crf], cpu_so); - -tcg_gen_setcond_tl ((s ?TCG_COND_LT :TCG_COND_LTU ), t0, arg0, arg1); -tcg_gen_trunc_tl_i32 (t1, t0); -tcg_gen_shli_i32 (t1, t1,CRF_LT_BIT ); -tcg_gen_or_i32 (cpu_crf[crf], cpu_crf[crf], t1); +TCGv t1 =tcg_temp_new (); +TCGv_i32 t =tcg_temp_new_i32 (); -tcg_gen_setcond_tl ((s ?TCG_COND_GT :TCG_COND_GTU ), t0, arg0, arg1); -tcg_gen_trunc_tl_i32 (t1, t0); -tcg_gen_shli_i32 (t1, t1,CRF_GT_BIT ); -tcg_gen_or_i32 (cpu_crf[crf], cpu_crf[crf], t1); +tcg_gen_movi_tl (t0,CRF_EQ ); +tcg_gen_movi_tl (t1,CRF_LT ); +tcg_gen_movcond_tl ((s ?TCG_COND_LT :TCG_COND_LTU ), t0, arg0, arg1, t1, t0); +tcg_gen_movi_tl (t1,CRF_GT ); +tcg_gen_movcond_tl ((s ?TCG_COND_GT :TCG_COND_GTU ), t0, arg0, arg1, t1, t0); -tcg_gen_setcond_tl (TCG_COND_EQ , t0, arg0, arg1); -tcg_gen_trunc_tl_i32 (t1, t0); -tcg_gen_shli_i32 (t1, t1,CRF_EQ_BIT ); -tcg_gen_or_i32 (cpu_crf[crf], cpu_crf[crf], t1); +tcg_gen_trunc_tl_i32 (t, t0);
target/ppc/translate.c static opc_handler_t invalid_handler = { · line 626
Quoted 10 lines
target/ppc/translate.c +4
-1+tcg_gen_trunc_tl_i32 (cpu_crf[crf], cpu_so); +tcg_gen_or_i32 (cpu_crf[crf], cpu_crf[crf], t);tcg_temp_free (t0); -tcg_temp_free_i32 (t1); +tcg_temp_free (t1); +tcg_temp_free_i32 (t); }static inline void gen_op_cmpi (TCGv arg0,target_ulong arg1,int s,int crf)
David, can you queue this again now that the ARM backend has been fixed?
Thanks,
Paolo
Re: [Qemu-devel] [PULL 01/12] target-ppc: optimize cmp translation
Quoted 60 lines · Paolo Bonzini
Quoted 59 lines · David Gibson
From: "[email protected]" <[email protected]>
We know that only one bit (in addition to SO) is going to be set in the condition register, so do two movconds instead of three setconds, three shifts and two ORs.
For ppc64-linux-user, the code size reduction is around 5% and the performance improvement slightly less than 10%. For softmmu, the improvement is around 5%.
Signed-off-by Paolo Bonzini <[email protected]>Signed-off-by David Gibson <[email protected]>--- target/ppc/translate.c | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-)target/ppc/translate.c +12
-17@@ -605,27 +605,22 @@ static opc_handler_t invalid_handler = {static inline void gen_op_cmp (TCGv arg0,TCGv arg1,int s,int crf) {TCGv t0 =tcg_temp_new (); -TCGv_i32 t1 =tcg_temp_new_i32 (); - -tcg_gen_trunc_tl_i32 (cpu_crf[crf], cpu_so); - -tcg_gen_setcond_tl ((s ?TCG_COND_LT :TCG_COND_LTU ), t0, arg0, arg1); -tcg_gen_trunc_tl_i32 (t1, t0); -tcg_gen_shli_i32 (t1, t1,CRF_LT_BIT ); -tcg_gen_or_i32 (cpu_crf[crf], cpu_crf[crf], t1); +TCGv t1 =tcg_temp_new (); +TCGv_i32 t =tcg_temp_new_i32 (); -tcg_gen_setcond_tl ((s ?TCG_COND_GT :TCG_COND_GTU ), t0, arg0, arg1); -tcg_gen_trunc_tl_i32 (t1, t0); -tcg_gen_shli_i32 (t1, t1,CRF_GT_BIT ); -tcg_gen_or_i32 (cpu_crf[crf], cpu_crf[crf], t1); +tcg_gen_movi_tl (t0,CRF_EQ ); +tcg_gen_movi_tl (t1,CRF_LT ); +tcg_gen_movcond_tl ((s ?TCG_COND_LT :TCG_COND_LTU ), t0, arg0, arg1, t1, t0); +tcg_gen_movi_tl (t1,CRF_GT ); +tcg_gen_movcond_tl ((s ?TCG_COND_GT :TCG_COND_GTU ), t0, arg0, arg1, t1, t0); -tcg_gen_setcond_tl (TCG_COND_EQ , t0, arg0, arg1); -tcg_gen_trunc_tl_i32 (t1, t0); -tcg_gen_shli_i32 (t1, t1,CRF_EQ_BIT ); -tcg_gen_or_i32 (cpu_crf[crf], cpu_crf[crf], t1); +tcg_gen_trunc_tl_i32 (t, t0); +tcg_gen_trunc_tl_i32 (cpu_crf[crf], cpu_so); +tcg_gen_or_i32 (cpu_crf[crf], cpu_crf[crf], t);tcg_temp_free (t0); -tcg_temp_free_i32 (t1); +tcg_temp_free (t1); +tcg_temp_free_i32 (t); }
Quoted 5 lines
target/ppc/translate.c static opc_handler_t invalid_handler = { · line 626
Quoted 2 lines
target/ppc/translate.c +0
-0static inline void gen_op_cmpi (TCGv arg0,target_ulong arg1,int s,int crf)David, can you queue this again now that the ARM backend has been fixed?
Done, thanks.
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
[Qemu-devel] [PULL 04/12] sm501: Add some more unimplemented registers
In reply to David GibsonFrom: BALATON Zoltan <[email protected]>
These are not really implemented (just return zero or default values) but add these so guests accessing them can run.
--- hw/display/sm501.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+)
hw/display/sm501.c +17 -0
@@ -795,6 +795,8 @@ static uint64_t sm501_system_config_read(void *opaque, hwaddr addr,case SM501_ARBTRTN_CONTROL : ret = s->arbitration_control;break ; +case SM501_COMMAND_LIST_STATUS : + ret =0x00180002 ;/* FIFOs are empty, everything idle */ case SM501_IRQ_MASK : ret = s->irq_mask;break ;
@@ -812,6 +814,9 @@ static uint64_t sm501_system_config_read(void *opaque, hwaddr addr,case SM501_POWER_MODE_CONTROL : ret = s->power_mode_control;break ; +case SM501_ENDIAN_CONTROL : + ret =0 ;/* Only default little endian mode is supported */ +break ;default : printf("sm501 system config : not implemented register read."
@@ -865,6 +870,12 @@ static void sm501_system_config_write(void *opaque, hwaddr addr,case SM501_POWER_MODE_CONTROL : s->power_mode_control = value &0x00000003 ;break ; +case SM501_ENDIAN_CONTROL : +if (value &0x00000001 ) { +printf ("sm501 system config : big endian mode not implemented.\n" ); +abort (); + } +break ;default : printf("sm501 system config : not implemented register write."
@@ -924,6 +935,9 @@ static uint64_t sm501_disp_ctrl_read(void *opaque, hwaddr addr,case SM501_DC_PANEL_PANNING_CONTROL : ret = s->dc_panel_panning_control;break ; +case SM501_DC_PANEL_COLOR_KEY : +/* Not implemented yet */ +break ;case SM501_DC_PANEL_FB_ADDR : ret = s->dc_panel_fb_addr;break ;
@@ -1035,6 +1049,9 @@ static void sm501_disp_ctrl_write(void *opaque, hwaddr addr,case SM501_DC_PANEL_PANNING_CONTROL : s->dc_panel_panning_control = value &0xFF3FFF3F ;break ; +case SM501_DC_PANEL_COLOR_KEY : +/* Not implemented yet */ +break ;case SM501_DC_PANEL_FB_ADDR : s->dc_panel_fb_addr = value &0x8FFFFFF0 ;break ;
Signature · 1 line
2.14.3
[Qemu-devel] [PULL 10/12] Update dtc to fix compilation problem on Mac OS 10.6
In reply to David GibsonFrom: John Arbuckle <[email protected]>
Currently QEMU does not build on Mac OS 10.6
because of a missing patch in the dtc
subproject. Updating dtc to make the patch
available fixes this problem.
--- dtc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
dtc +1 -1
@@ -1 +1 @@ -Subproject commit 558cd81bdd432769b59bff01240c44f82cfb1a9d +Subproject commit e54388015af1fb4bf04d0bca99caba1074d9cc42
Signature · 1 line
2.14.3
[Qemu-devel] [PULL 03/12] sm501: Add panel hardware cursor registers also to read function
In reply to David GibsonFrom: BALATON Zoltan <[email protected]>
These were forgotten when adding panel layer support in ffd39257018 "SM501 emulation for R2D-SH4".
--- hw/display/sm501.c | 13 +++++++++++++ 1 file changed, 13 insertions(+)
hw/display/sm501.c +13 -0
@@ -956,6 +956,19 @@ static uint64_t sm501_disp_ctrl_read(void *opaque, hwaddr addr, ret = s->dc_panel_v_sync;break ; +case SM501_DC_PANEL_HWC_ADDR : + ret = s->dc_panel_hwc_addr; +break ; +case SM501_DC_PANEL_HWC_LOC : + ret = s->dc_panel_hwc_location; +break ; +case SM501_DC_PANEL_HWC_COLOR_1_2 : + ret = s->dc_panel_hwc_color_1_2; +break ; +case SM501_DC_PANEL_HWC_COLOR_3 : + ret = s->dc_panel_hwc_color_3; +break ; +case SM501_DC_VIDEO_CONTROL : ret = s->dc_video_control;break ;
Signature · 1 line
2.14.3
[Qemu-devel] [PULL 06/12] spapr_pci: use warn_report()
In reply to David GibsonFrom: Greg Kurz <[email protected]>
These two are definitely warnings. Let's use the appropriate API.
--- hw/ppc/spapr_pci.c | 6 +++--- hw/ppc/spapr_pci_vfio.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-)
hw/ppc/spapr_pci.c +3 -3
@@ -1696,9 +1696,9 @@ static void spapr_phb_realize(DeviceState *dev, Error **errp)/* DMA setup */ if (((sphb->page_size_mask &qemu_getrampagesize ()) ==0 ) &&kvm_enabled ()) { -error_report ("System page size 0x%lx is not enabled in page_size_mask " -"(0x%" PRIx64"). Performance may be slow" , -qemu_getrampagesize (), sphb->page_size_mask); +warn_report ("System page size 0x%lx is not enabled in page_size_mask " +"(0x%" PRIx64"). Performance may be slow" , +qemu_getrampagesize (), sphb->page_size_mask); }for (i =0 ; i < windows_supported; ++i) {
hw/ppc/spapr_pci_vfio.c +1 -1
@@ -50,7 +50,7 @@ static Property spapr_phb_vfio_properties[] = {static void spapr_phb_vfio_instance_init (Object *obj) {if (!qtest_enabled ()) { -error_report ("spapr-pci-vfio-host-bridge is deprecated" ); +warn_report ("spapr-pci-vfio-host-bridge is deprecated" ); } }
Signature · 1 line
2.14.3
[Qemu-devel] [PULL 09/12] target/ppc: more use of the PPC_*() macros
In reply to David GibsonFrom: Cédric Le Goater <[email protected]>
Also introduce utilities to manipulate bitmasks (originaly from OPAL) which be will be used in the model of the XIVE interrupt controller.
--- hw/ppc/pnv_lpc.c | 10 ++++----- target/ppc/cpu.h | 56 ++++++++++++++++++++++++++++++------------------- target/ppc/int_helper.c | 2 +- 3 files changed, 40 insertions(+), 28 deletions(-)
hw/ppc/pnv_lpc.c +5 -5
@@ -146,13 +146,13 @@ static bool opb_write(PnvLpcController *lpc, uint32_t addr, uint8_t *data,return success; } -#define ECCB_CTL_READ (1ull << (63 - 15)) +#define ECCB_CTL_READ PPC_BIT(15)#define ECCB_CTL_SZ_LSH (63 - 7) -#define ECCB_CTL_SZ_MASK (0xfull << ECCB_CTL_SZ_LSH) -#define ECCB_CTL_ADDR_MASK 0xffffffffu; +#define ECCB_CTL_SZ_MASK PPC_BITMASK(4, 7) +#define ECCB_CTL_ADDR_MASK PPC_BITMASK(32, 63) -#define ECCB_STAT_OP_DONE (1ull << (63 - 52)) -#define ECCB_STAT_OP_ERR (1ull << (63 - 52)) +#define ECCB_STAT_OP_DONE PPC_BIT(52) +#define ECCB_STAT_OP_ERR PPC_BIT(52)#define ECCB_STAT_RD_DATA_LSH (63 - 37)#define ECCB_STAT_RD_DATA_MASK (0xffffffff << ECCB_STAT_RD_DATA_LSH)
target/ppc/cpu.h +34 -22
72 lines not on this page · raw message
target/ppc/int_helper.c +1 -1
@@ -183,7 +183,7 @@ uint64_t helper_bpermd(uint64_t rs, uint64_t rb)for (i =0 ; i <8 ; i++) {int index = (rs >> (i*8 )) &0xFF ;if (index <64 ) { -if (rb & (1ull << (63 -index))) { +if (rb &PPC_BIT (index)) { ra |=1 << i; } }
Signature · 1 line
2.14.3
[Qemu-devel] [PULL 11/12] hw/ppc: Remove the deprecated spapr-pci-vfio-host-bridge device
In reply to David GibsonFrom: Thomas Huth <[email protected]>
It's a deprecated dummy device since QEMU v2.6.0. That should have been enough time to allow the users to update their scripts in case they still use it, so let's remove this legacy code now.
--- hw/ppc/spapr_pci_vfio.c | 47 ----------------------------------------------- qemu-doc.texi | 5 ----- scripts/device-crash-test | 1 - 3 files changed, 53 deletions(-)
hw/ppc/spapr_pci_vfio.c +0 -47
@@ -29,31 +29,6 @@#include "qemu/error-report.h" #include "sysemu/qtest.h" -#define TYPE_SPAPR_PCI_VFIO_HOST_BRIDGE "spapr-pci-vfio-host-bridge" - -#define SPAPR_PCI_VFIO_HOST_BRIDGE (obj) \ - OBJECT_CHECK(sPAPRPHBVFIOState, (obj), TYPE_SPAPR_PCI_VFIO_HOST_BRIDGE) - -typedef struct sPAPRPHBVFIOState sPAPRPHBVFIOState ; - -struct sPAPRPHBVFIOState { -sPAPRPHBState phb; - -int32_t iommugroupid; -}; - -static Property spapr_phb_vfio_properties[] = { -DEFINE_PROP_INT32 ("iommu" , sPAPRPHBVFIOState, iommugroupid,-1 ), -DEFINE_PROP_END_OF_LIST (), -}; - -static void spapr_phb_vfio_instance_init (Object *obj) -{ -if (!qtest_enabled ()) { -warn_report ("spapr-pci-vfio-host-bridge is deprecated" ); - } -} -bool spapr_phb_eeh_available (sPAPRPHBState *sphb) {return vfio_eeh_as_ok (&sphb->iommu_as);
@@ -218,25 +193,3 @@ int spapr_phb_vfio_eeh_configure(sPAPRPHBState *sphb)return RTAS_OUT_SUCCESS ; } - -static void spapr_phb_vfio_class_init (ObjectClass *klass,void *data) -{ -DeviceClass *dc =DEVICE_CLASS (klass); - - dc->props = spapr_phb_vfio_properties; -} - -static const TypeInfo spapr_phb_vfio_info = { - .name =TYPE_SPAPR_PCI_VFIO_HOST_BRIDGE , - .parent =TYPE_SPAPR_PCI_HOST_BRIDGE , - .instance_size =sizeof (sPAPRPHBVFIOState), - .instance_init = spapr_phb_vfio_instance_init, - .class_init = spapr_phb_vfio_class_init, -}; - -static void spapr_pci_vfio_register_types (void ) -{ -type_register_static (&spapr_phb_vfio_info); -} - -type_init (spapr_pci_vfio_register_types)
qemu-doc.texi +0 -5
@@ -2744,11 +2744,6 @@ The ``host_net_remove'' command is replaced by the ``netdev_del'' command. The ``ivshmem'' device type is replaced by either the ``ivshmem-plain'' or ``ivshmem-doorbell`` device types. -@subsection spapr-pci-vfio-host-bridge (since 2.6.0) - -The ``spapr-pci-vfio-host-bridge'' device type is replaced by -the ``spapr-pci-host-bridge'' device type. - @section System emulator machines @subsection Xilinx EP108 (since 2.11.0)
scripts/device-crash-test +0 -1
@@ -119,7 +119,6 @@ ERROR_WHITELIST = [ {'device':'scsi-generic', 'expected':True}, # drive property not set {'device':'scsi-hd', 'expected':True}, # drive property not set {'device':'spapr-pci-host-bridge', 'expected':True}, # BUID not specified for PHB - {'device':'spapr-pci-vfio-host-bridge', 'expected':True}, # BUID not specified for PHB {'device':'spapr-rng', 'expected':True}, # spapr-rng needs an RNG backend! {'device':'spapr-vty', 'expected':True}, # chardev property not set {'device':'tpm-tis', 'expected':True}, # tpm_tis: backend driver with id (null) could not be found
Signature · 1 line
2.14.3
[Qemu-devel] [PULL 12/12] spapr: Correct compatibility mode setting for hotplugged CPUs
In reply to David GibsonCurrently the pseries machine sets the compatibility mode for the guest's cpus in two places: 1) at machine reset and 2) after CAS negotiation.
This means that if we set or negotiate a compatiblity mode, then hotplug a cpu, the hotplugged cpu doesn't get the right mode set and will incorrectly have the full native features.
To correct this, we set the compatibility mode on a cpu when it is brought online with the 'start-cpu' RTAS call. Given that we no longer need to set the compatibility mode on all CPUs at machine reset, so we change that to only set the mode for the boot cpu.
--- hw/ppc/spapr.c | 2 +- hw/ppc/spapr_rtas.c | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-)
hw/ppc/spapr.c +1 -1
@@ -1504,7 +1504,7 @@ static void spapr_machine_reset(void)spapr_ovec_cleanup (spapr->ov5_cas); spapr->ov5_cas =spapr_ovec_new (); -ppc_set_compat_all (spapr->max_compat_pvr, &error_fatal); +ppc_set_compat (first_ppc_cpu, spapr->max_compat_pvr, &error_fatal); } fdt =spapr_build_fdt (spapr, rtas_addr, spapr->rtas_size);
hw/ppc/spapr_rtas.c +9 -0
@@ -163,6 +163,7 @@ static void rtas_start_cpu(PowerPCCPU *cpu_, sPAPRMachineState *spapr,CPUState *cs =CPU (cpu);CPUPPCState *env = &cpu->env;PowerPCCPUClass *pcc =POWERPC_CPU_GET_CLASS (cpu); +Error *local_err =NULL ;if (!cs->halted) {rtas_st (rets,0 ,RTAS_OUT_HW_ERROR );
@@ -174,6 +175,14 @@ static void rtas_start_cpu(PowerPCCPU *cpu_, sPAPRMachineState *spapr,* new cpu enters */ kvm_cpu_synchronize_state (cs); +/* Set compatibility mode to match existing cpus */ +ppc_set_compat (cpu,POWERPC_CPU (first_cpu)->compat_pvr, &local_err); +if (local_err) { +error_report_err (local_err); +rtas_st (rets,0 ,RTAS_OUT_HW_ERROR ); +return ; + } + env->msr = (1ULL <<MSR_SF ) | (1ULL <<MSR_ME );/* Enable Power-saving mode Exit Cause exceptions for the new CPU */
Signature · 1 line
2.14.3
[Qemu-devel] [PULL 05/12] ppc4xx_i2c: Implement basic I2C functions
In reply to David GibsonFrom: BALATON Zoltan <[email protected]>
Enough to please U-Boot and make it able to detect SDRAM SPD EEPROMs
--- hw/i2c/ppc4xx_i2c.c | 198 +++++++++++++++++++++++++++++++++++++------- include/hw/i2c/ppc4xx_i2c.h | 3 + 2 files changed, 171 insertions(+), 30 deletions(-)
hw/i2c/ppc4xx_i2c.c +168 -30
@@ -2,6 +2,8 @@* PPC4xx I2C controller emulation * * Copyright (c) 2007 Jocelyn Mayer +* Copyright (c) 2012 François Revol +* Copyright (c) 2016 BALATON Zoltan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal
@@ -25,26 +27,118 @@#include "qemu/osdep.h" #include "qapi/error.h" #include "qemu-common.h" +#include "qemu/log.h" #include "cpu.h" #include "hw/hw.h" #include "hw/i2c/ppc4xx_i2c.h" -/*#define DEBUG_I2C*/ +#define PPC4xx_I2C_MEM_SIZE 0x12 -#define PPC4xx_I2C_MEM_SIZE 0x11 +#define IIC_CNTL_PT (1 << 0) +#define IIC_CNTL_READ (1 << 1) +#define IIC_CNTL_CHT (1 << 2) +#define IIC_CNTL_RPST (1 << 3) + +#define IIC_STS_PT (1 << 0) +#define IIC_STS_ERR (1 << 2) +#define IIC_STS_MDBS (1 << 5) + +#define IIC_EXTSTS_XFRA (1 << 0) + +#define IIC_XTCNTLSS_SRST (1 << 0) + +static void ppc4xx_i2c_reset (DeviceState *s) +{ +PPC4xxI2CState *i2c =PPC4xx_I2C (s); + +/* FIXME: Should also reset bus? +*if (s->address != ADDR_RESET) { +* i2c_end_transfer(s->bus); +*} +*/ + + i2c->mdata =0 ; + i2c->lmadr =0 ; + i2c->hmadr =0 ; + i2c->cntl =0 ; + i2c->mdcntl =0 ; + i2c->sts =0 ; + i2c->extsts =0x8f ; + i2c->sdata =0 ; + i2c->lsadr =0 ; + i2c->hsadr =0 ; + i2c->clkdiv =0 ; + i2c->intrmsk =0 ; + i2c->xfrcnt =0 ; + i2c->xtcntlss =0 ; + i2c->directcntl =0x0f ; + i2c->intr =0 ; +} + +static inline bool ppc4xx_i2c_is_master (PPC4xxI2CState *i2c) +{ +return true; +}static uint64_t ppc4xx_i2c_readb (void *opaque,hwaddr addr,unsigned int size) {PPC4xxI2CState *i2c =PPC4xx_I2C (opaque);uint64_t ret; -#ifdef DEBUG_I2C -printf ("%s: addr " TARGET_FMT_plx"\n" , __func__, addr); -#endif switch (addr) {case 0x00 : -/*i2c_readbyte(&i2c->mdata);*/ ret = i2c->mdata; +if (ppc4xx_i2c_is_master (i2c)) { + ret =0xff ; + +if (!(i2c->sts &IIC_STS_MDBS )) { +qemu_log_mask (LOG_GUEST_ERROR ,"[%s]%s: Trying to read " +"without starting transfer\n" , + TYPE_PPC4xx_I2C, __func__); + }else { +int pending = (i2c->cntl >>4 ) &3 ; + +/* get the next byte */ +int byte =i2c_recv (i2c->bus); + +if (byte <0 ) { +qemu_log_mask (LOG_GUEST_ERROR ,"[%s]%s: read failed " +"for device 0x%02x\n" , TYPE_PPC4xx_I2C, + __func__, i2c->lmadr); + ret =0xff ; + }else { + ret = byte; +/* Raise interrupt if enabled */ +/*ppc4xx_i2c_raise_interrupt(i2c)*/ ; + } + +if (!pending) { + i2c->sts &= ~IIC_STS_MDBS ; +/*i2c_end_transfer(i2c->bus);*/ +/*} else if (i2c->cntl & (IIC_CNTL_RPST | IIC_CNTL_CHT)) {*/ + }else if (pending) { +/* current smbus implementation doesn't like +multibyte xfer repeated start */ +i2c_end_transfer (i2c->bus); +if (i2c_start_transfer (i2c->bus, i2c->lmadr >>1 ,1 )) { +/* if non zero is returned, the adress is not valid */ + i2c->sts &= ~IIC_STS_PT ; + i2c->sts |=IIC_STS_ERR ; + i2c->extsts |=IIC_EXTSTS_XFRA ; + }else { +/*i2c->sts |= IIC_STS_PT;*/ + i2c->sts |=IIC_STS_MDBS ; + i2c->sts &= ~IIC_STS_ERR ; + i2c->extsts =0 ; + } + } + pending--; + i2c->cntl = (i2c->cntl &0xcf ) | (pending <<4 ); + } + }else { +qemu_log_mask (LOG_UNIMP ,"[%s]%s: slave mode not implemented\n" , + TYPE_PPC4xx_I2C, __func__); + }break ;case 0x02 : ret = i2c->sdata;
@@ -88,13 +182,15 @@ static uint64_t ppc4xx_i2c_readb(void *opaque, hwaddr addr, unsigned int size)case 0x10 : ret = i2c->directcntl;break ; +case 0x11 : + ret = i2c->intr; +break ;default : - ret =0x00 ; +qemu_log_mask (LOG_GUEST_ERROR ,"[%s]%s: Bad address at offset 0x%" + HWADDR_PRIx"\n" , TYPE_PPC4xx_I2C, __func__, addr); + ret =0 ;break ; } -#ifdef DEBUG_I2C -printf ("%s: addr " TARGET_FMT_plx" %02" PRIx64"\n" , __func__, addr, ret); -#endif return ret; }
@@ -103,26 +199,70 @@ static void ppc4xx_i2c_writeb(void *opaque, hwaddr addr, uint64_t value, unsigned int size) {PPC4xxI2CState *i2c = opaque; -#ifdef DEBUG_I2C -printf ("%s: addr " TARGET_FMT_plx" val %08" PRIx64"\n" , - __func__, addr, value); -#endif +switch (addr) {case 0x00 : i2c->mdata = value; -/*i2c_sendbyte(&i2c->mdata);*/ +if (!i2c_bus_busy (i2c->bus)) { +/* assume we start a write transfer */ +if (i2c_start_transfer (i2c->bus, i2c->lmadr >>1 ,0 )) { +/* if non zero is returned, the adress is not valid */ + i2c->sts &= ~IIC_STS_PT ; + i2c->sts |=IIC_STS_ERR ; + i2c->extsts |=IIC_EXTSTS_XFRA ; + }else { + i2c->sts |=IIC_STS_PT ; + i2c->sts &= ~IIC_STS_ERR ; + i2c->extsts =0 ; + } + } +if (i2c_bus_busy (i2c->bus)) { +if (i2c_send (i2c->bus, i2c->mdata)) { +/* if the target return non zero then end the transfer */ + i2c->sts &= ~IIC_STS_PT ; + i2c->sts |=IIC_STS_ERR ; + i2c->extsts |=IIC_EXTSTS_XFRA ; +i2c_end_transfer (i2c->bus); + } + }break ;case 0x02 : i2c->sdata = value;break ;case 0x04 : i2c->lmadr = value; +if (i2c_bus_busy (i2c->bus)) { +i2c_end_transfer (i2c->bus); + }break ;case 0x05 : i2c->hmadr = value;break ;case 0x06 : i2c->cntl = value; +if (i2c->cntl &IIC_CNTL_PT ) { +if (i2c->cntl &IIC_CNTL_READ ) { +if (i2c_bus_busy (i2c->bus)) { +/* end previous transfer */ + i2c->sts &= ~IIC_STS_PT ; +i2c_end_transfer (i2c->bus); + } +if (i2c_start_transfer (i2c->bus, i2c->lmadr >>1 ,1 )) { +/* if non zero is returned, the adress is not valid */ + i2c->sts &= ~IIC_STS_PT ; + i2c->sts |=IIC_STS_ERR ; + i2c->extsts |=IIC_EXTSTS_XFRA ; + }else { +/*i2c->sts |= IIC_STS_PT;*/ + i2c->sts |=IIC_STS_MDBS ; + i2c->sts &= ~IIC_STS_ERR ; + i2c->extsts =0 ; + } + }else { +/* we actually already did the write transfer... */ + i2c->sts &= ~IIC_STS_PT ; + } + }break ;case 0x07 : i2c->mdcntl = value &0xDF ;
@@ -135,6 +275,7 @@ static void ppc4xx_i2c_writeb(void *opaque, hwaddr addr, uint64_t value,break ;case 0x0A : i2c->lsadr = value; +/*i2c_set_slave_address(i2c->bus, i2c->lsadr);*/ break ;case 0x0B : i2c->hsadr = value;
@@ -149,11 +290,23 @@ static void ppc4xx_i2c_writeb(void *opaque, hwaddr addr, uint64_t value, i2c->xfrcnt = value &0x77 ;break ;case 0x0F : +if (value &IIC_XTCNTLSS_SRST ) { +/* Is it actually a full reset? U-Boot sets some regs before */ +ppc4xx_i2c_reset (DEVICE (i2c)); +break ; + } i2c->xtcntlss = value;break ;case 0x10 : i2c->directcntl = value &0x7 ;break ; +case 0x11 : + i2c->intr = value; +break ; +default : +qemu_log_mask (LOG_GUEST_ERROR ,"[%s]%s: Bad address at offset 0x%" + HWADDR_PRIx"\n" , TYPE_PPC4xx_I2C, __func__, addr); +break ; } }
@@ -167,21 +320,6 @@ static const MemoryRegionOps ppc4xx_i2c_ops = { .endianness = DEVICE_NATIVE_ENDIAN, }; -static void ppc4xx_i2c_reset (DeviceState *s) -{ -PPC4xxI2CState *i2c =PPC4xx_I2C (s); - - i2c->mdata =0x00 ; - i2c->sdata =0x00 ; - i2c->cntl =0x00 ; - i2c->mdcntl =0x00 ; - i2c->sts =0x00 ; - i2c->extsts =0x00 ; - i2c->clkdiv =0x00 ; - i2c->xfrcnt =0x00 ; - i2c->directcntl =0x0F ; -} -static void ppc4xx_i2c_init (Object *o) {PPC4xxI2CState *s =PPC4xx_I2C (o);
include/hw/i2c/ppc4xx_i2c.h +3 -0
@@ -2,6 +2,8 @@* PPC4xx I2C controller emulation * * Copyright (c) 2007 Jocelyn Mayer +* Copyright (c) 2012 François Revol +* Copyright (c) 2016 BALATON Zoltan * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal
@@ -55,6 +57,7 @@ typedef struct PPC4xxI2CState {uint8_t xfrcnt;uint8_t xtcntlss;uint8_t directcntl; + uint8_t intr; } PPC4xxI2CState;#endif /* PPC4XX_I2C_H */
Signature · 1 line
2.14.3
[Qemu-devel] [PULL 07/12] hw/ide: Emulate SiI3112 SATA controller
In reply to David GibsonFrom: BALATON Zoltan <[email protected]>
This is a common generic PCI SATA controller that is also used in PCs but more importantly guests running on the Sam460ex board prefer this card and have a driver for it (unlike for other SATA controllers already emulated).
--- MAINTAINERS | 6 + default-configs/ppcemb-softmmu.mak | 1 + hw/ide/Makefile.objs | 1 + hw/ide/sii3112.c | 368 +++++++++++++++++++++++++++++++++++++ hw/ide/trace-events | 5 + 5 files changed, 381 insertions(+) create mode 100644 hw/ide/sii3112.c
MAINTAINERS +6 -0
@@ -765,6 +765,12 @@ L: [email protected] S: Odd Fixes F: hw/ppc/virtex_ml507.c +sam460ex +M: BALATON Zoltan <[email protected]> +L: [email protected] +S: Maintained +F: hw/ide/sii3112.c + SH4 Machines ------------ R2D
default-configs/ppcemb-softmmu.mak +1 -0
@@ -16,3 +16,4 @@ CONFIG_I8259=y CONFIG_XILINX=y CONFIG_XILINX_ETHLITE=y CONFIG_SM501=y +CONFIG_IDE_SII3112=y
hw/ide/Makefile.objs +1 -0
@@ -11,3 +11,4 @@ common-obj-$(CONFIG_MICRODRIVE) += microdrive.o common-obj-$(CONFIG_AHCI) += ahci.o common-obj-$(CONFIG_AHCI) += ich.o common-obj-$(CONFIG_ALLWINNER_A10) += ahci-allwinner.o +common-obj-$(CONFIG_IDE_SII3112) += sii3112.o
hw/ide/sii3112.c new file +368 -0
368 lines not on this page · raw message
hw/ide/trace-events +5 -0
@@ -37,6 +37,11 @@ bmdma_addr_write(uint64_t data) "data: 0x%016"PRIx64 bmdma_read(uint64_t addr, uint8_t val) "bmdma: readb 0x%"PRIx64" : 0x%02x" bmdma_write(uint64_t addr, uint64_t val) "bmdma: writeb 0x%"PRIx64" : 0x%02"PRIx64 +# hw/ide/sii3112.c +sii3112_read(int size, uint64_t addr, uint64_t val) "bmdma: read (size %d) 0x%"PRIx64" : 0x%02"PRIx64 +sii3112_write(int size, uint64_t addr, uint64_t val) "bmdma: write (size %d) 0x%"PRIx64" : 0x%02"PRIx64 +sii3112_set_irq(int channel, int level) "channel %d level %d" + # hw/ide/via.c bmdma_read_via(uint64_t addr, uint32_t val) "bmdma: readb 0x%"PRIx64" : 0x%02x" bmdma_write_via(uint64_t addr, uint64_t val) "bmdma: writeb 0x%"PRIx64" : 0x%02"PRIx64
Signature · 1 line
2.14.3
[Qemu-devel] [PULL 08/12] ppc/pnv: change powernv_ prefix to pnv_ for overall naming consistency
In reply to David GibsonFrom: Cédric Le Goater <[email protected]>
The 'pnv' prefix is now used for all and the routines populating the device tree start with 'pnv_dt'. The handler of the PnvXScomInterface is also renamed to 'dt_xscom' which should reflect that it is populating the device tree under the 'xscom@' node of the chip.
--- hw/ppc/pnv.c | 94 ++++++++++++++++++++++------------------------ hw/ppc/pnv_bmc.c | 2 +- hw/ppc/pnv_core.c | 8 ++-- hw/ppc/pnv_lpc.c | 6 +-- hw/ppc/pnv_psi.c | 4 +- hw/ppc/pnv_xscom.c | 10 ++--- include/hw/ppc/pnv.h | 10 ++--- include/hw/ppc/pnv_xscom.h | 4 +- 8 files changed, 67 insertions(+), 71 deletions(-)
hw/ppc/pnv.c +45 -49
@@ -77,8 +77,7 @@ static const char *pnv_chip_core_typename(const PnvChip *o)* that has a different "affinity". In practice, it means one range * per chip. */ -static void powernv_populate_memory_node (void *fdt,int chip_id,hwaddr start, -hwaddr size) +static void pnv_dt_memory (void *fdt,int chip_id,hwaddr start,hwaddr size) {char *mem_name;uint64_t mem_reg_property[2 ];
@@ -119,7 +118,7 @@ static int get_cpus_node(void *fdt)* device tree, used in XSCOM to address cores and in interrupt * servers. */ -static void powernv_create_core_node (PnvChip *chip,PnvCore *pc,void *fdt) +static void pnv_dt_core (PnvChip *chip,PnvCore *pc,void *fdt) {CPUState *cs =CPU (DEVICE (pc->threads));DeviceClass *dc =DEVICE_GET_CLASS (cs);
@@ -228,8 +227,8 @@ static void powernv_create_core_node(PnvChip *chip, PnvCore *pc, void *fdt) servers_prop, sizeof(servers_prop)))); } -static void powernv_populate_icp (PnvChip *chip,void *fdt,uint32_t pir, -uint32_t nr_threads) +static void pnv_dt_icp (PnvChip *chip,void *fdt,uint32_t pir, +uint32_t nr_threads) {uint64_t addr =PNV_ICP_BASE (chip) | (pir <<12 );char *name;
@@ -277,13 +276,13 @@ static int pnv_chip_lpc_offset(PnvChip *chip, void *fdt)return offset; } -static void powernv_populate_chip (PnvChip *chip,void *fdt) +static void pnv_dt_chip (PnvChip *chip,void *fdt) {const char *typename =pnv_chip_core_typename (chip);size_t typesize =object_type_get_instance_size (typename);int i; -pnv_xscom_populate (chip, fdt,0 ); +pnv_dt_xscom (chip, fdt,0 );/* The default LPC bus of a multichip system is on chip 0. It's * recognized by the firmware (skiboot) using a "primary"
@@ -298,20 +297,18 @@ static void powernv_populate_chip(PnvChip *chip, void *fdt)for (i =0 ; i < chip->nr_cores; i++) {PnvCore *pnv_core =PNV_CORE (chip->cores + i * typesize); -powernv_create_core_node (chip, pnv_core, fdt); +pnv_dt_core (chip, pnv_core, fdt);/* Interrupt Control Presenters (ICP). One per core. */ -powernv_populate_icp (chip, fdt, pnv_core->pir, -CPU_CORE (pnv_core)->nr_threads); +pnv_dt_icp (chip, fdt, pnv_core->pir,CPU_CORE (pnv_core)->nr_threads); }if (chip->ram_size) { -powernv_populate_memory_node (fdt, chip->chip_id, chip->ram_start, - chip->ram_size); +pnv_dt_memory (fdt, chip->chip_id, chip->ram_start, chip->ram_size); } } -static void powernv_populate_rtc (ISADevice *d,void *fdt,int lpc_off) +static void pnv_dt_rtc (ISADevice *d,void *fdt,int lpc_off) {uint32_t io_base = d->ioport_id;uint32_t io_regs[] = {
@@ -331,7 +328,7 @@ static void powernv_populate_rtc(ISADevice *d, void *fdt, int lpc_off)_FDT ((fdt_setprop_string (fdt, node,"compatible" ,"pnpPNP,b00" ))); } -static void powernv_populate_serial (ISADevice *d,void *fdt,int lpc_off) +static void pnv_dt_serial (ISADevice *d,void *fdt,int lpc_off) {const char compatible[] ="ns16550\0pnpPNP,501" ;uint32_t io_base = d->ioport_id;
@@ -362,7 +359,7 @@ static void powernv_populate_serial(ISADevice *d, void *fdt, int lpc_off)_FDT ((fdt_setprop_string (fdt, node,"device_type" ,"serial" ))); } -static void powernv_populate_ipmi_bt (ISADevice *d,void *fdt,int lpc_off) +static void pnv_dt_ipmi_bt (ISADevice *d,void *fdt,int lpc_off) {const char compatible[] ="bt\0ipmi-bt" ;uint32_t io_base;
@@ -401,17 +398,17 @@ typedef struct ForeachPopulateArgs {int offset; } ForeachPopulateArgs; -static int powernv_populate_isa_device (DeviceState *dev,void *opaque) +static int pnv_dt_isa_device (DeviceState *dev,void *opaque) {ForeachPopulateArgs *args = opaque;ISADevice *d =ISA_DEVICE (dev);if (object_dynamic_cast (OBJECT (dev),TYPE_MC146818_RTC )) { -powernv_populate_rtc (d, args->fdt, args->offset); +pnv_dt_rtc (d, args->fdt, args->offset); }else if (object_dynamic_cast (OBJECT (dev),TYPE_ISA_SERIAL )) { -powernv_populate_serial (d, args->fdt, args->offset); +pnv_dt_serial (d, args->fdt, args->offset); }else if (object_dynamic_cast (OBJECT (dev),"isa-ipmi-bt" )) { -powernv_populate_ipmi_bt (d, args->fdt, args->offset); +pnv_dt_ipmi_bt (d, args->fdt, args->offset); }else {error_report ("unknown isa device %s@i%x" ,qdev_fw_name (dev), d->ioport_id);
@@ -420,7 +417,7 @@ static int powernv_populate_isa_device(DeviceState *dev, void *opaque)return 0 ; } -static void powernv_populate_isa (ISABus *bus,void *fdt,int lpc_offset) +static void pnv_dt_isa (ISABus *bus,void *fdt,int lpc_offset) {ForeachPopulateArgs args = { .fdt = fdt,
@@ -429,14 +426,13 @@ static void powernv_populate_isa(ISABus *bus, void *fdt, int lpc_offset)/* ISA devices are not necessarily parented to the ISA bus so we * can not use object_child_foreach() */ -qbus_walk_children (BUS (bus), powernv_populate_isa_device, -NULL ,NULL ,NULL , &args); +qbus_walk_children (BUS (bus), pnv_dt_isa_device,NULL ,NULL ,NULL , &args); } -static void *powernv_create_fdt (MachineState *machine) +static void *pnv_dt_create (MachineState *machine) {const char plat_compat[] ="qemu,powernv\0ibm,powernv" ; -PnvMachineState *pnv =POWERNV_MACHINE (machine); +PnvMachineState *pnv =PNV_MACHINE (machine);void *fdt;char *buf;int off;
@@ -479,15 +475,15 @@ static void *powernv_create_fdt(MachineState *machine)/* Populate device tree for each chip */ for (i =0 ; i < pnv->num_chips; i++) { -powernv_populate_chip (pnv->chips[i], fdt); +pnv_dt_chip (pnv->chips[i], fdt); }/* Populate ISA devices on chip 0 */ lpc_offset =pnv_chip_lpc_offset (pnv->chips[0 ], fdt); -powernv_populate_isa (pnv->isa_bus, fdt, lpc_offset); +pnv_dt_isa (pnv->isa_bus, fdt, lpc_offset);if (pnv->bmc) { -pnv_bmc_populate_sensors (pnv->bmc, fdt); +pnv_dt_bmc_sensors (pnv->bmc, fdt); }return fdt;
@@ -495,17 +491,17 @@ static void *powernv_create_fdt(MachineState *machine)static void pnv_powerdown_notify (Notifier *n,void *opaque) { -PnvMachineState *pnv =POWERNV_MACHINE (qdev_get_machine ()); +PnvMachineState *pnv =PNV_MACHINE (qdev_get_machine ());if (pnv->bmc) {pnv_bmc_powerdown (pnv->bmc); } } -static void ppc_powernv_reset (void ) +static void pnv_reset (void ) {MachineState *machine =MACHINE (qdev_get_machine ()); -PnvMachineState *pnv =POWERNV_MACHINE (machine); +PnvMachineState *pnv =PNV_MACHINE (machine);void *fdt;Object *obj;
@@ -524,7 +520,7 @@ static void ppc_powernv_reset(void) pnv->bmc =IPMI_BMC (obj); } - fdt =powernv_create_fdt (machine); + fdt =pnv_dt_create (machine);/* Pack resulting tree */ _FDT ((fdt_pack (fdt)));
@@ -552,9 +548,9 @@ static ISABus *pnv_isa_create(PnvChip *chip)return isa_bus; } -static void ppc_powernv_init (MachineState *machine) +static void pnv_init (MachineState *machine) { -PnvMachineState *pnv =POWERNV_MACHINE (machine); +PnvMachineState *pnv =PNV_MACHINE (machine);MemoryRegion *ram;char *fw_filename;long fw_size;
@@ -567,7 +563,7 @@ static void ppc_powernv_init(MachineState *machine) } ram =g_new (MemoryRegion,1 ); -memory_region_allocate_system_memory (ram,NULL ,"ppc_powernv.ram" , +memory_region_allocate_system_memory (ram,NULL ,"pnv.ram" , machine->ram_size);memory_region_add_subregion (get_system_memory (),0 , ram);
@@ -974,7 +970,7 @@ static void pnv_chip_class_init(ObjectClass *klass, void *data)static ICSState *pnv_ics_get (XICSFabric *xi,int irq) { -PnvMachineState *pnv =POWERNV_MACHINE (xi); +PnvMachineState *pnv =PNV_MACHINE (xi);int i;for (i =0 ; i < pnv->num_chips; i++) {
@@ -987,7 +983,7 @@ static ICSState *pnv_ics_get(XICSFabric *xi, int irq)static void pnv_ics_resend (XICSFabric *xi) { -PnvMachineState *pnv =POWERNV_MACHINE (xi); +PnvMachineState *pnv =PNV_MACHINE (xi);int i;for (i =0 ; i < pnv->num_chips; i++) {
@@ -1021,7 +1017,7 @@ static ICPState *pnv_icp_get(XICSFabric *xi, int pir)static void pnv_pic_print_info (InterruptStatsProvider *obj,Monitor *mon) { -PnvMachineState *pnv =POWERNV_MACHINE (obj); +PnvMachineState *pnv =PNV_MACHINE (obj);int i;CPUState *cs;
@@ -1039,13 +1035,13 @@ static void pnv_pic_print_info(InterruptStatsProvider *obj,static void pnv_get_num_chips (Object *obj,Visitor *v,const char *name,void *opaque,Error **errp) { -visit_type_uint32 (v, name, &POWERNV_MACHINE (obj)->num_chips, errp); +visit_type_uint32 (v, name, &PNV_MACHINE (obj)->num_chips, errp); }static void pnv_set_num_chips (Object *obj,Visitor *v,const char *name,void *opaque,Error **errp) { -PnvMachineState *pnv =POWERNV_MACHINE (obj); +PnvMachineState *pnv =PNV_MACHINE (obj);uint32_t num_chips;Error *local_err =NULL ;
@@ -1067,13 +1063,13 @@ static void pnv_set_num_chips(Object *obj, Visitor *v, const char *name, pnv->num_chips = num_chips; } -static void powernv_machine_initfn (Object *obj) +static void pnv_machine_initfn (Object *obj) { -PnvMachineState *pnv =POWERNV_MACHINE (obj); +PnvMachineState *pnv =PNV_MACHINE (obj); pnv->num_chips =1 ; } -static void powernv_machine_class_props_init (ObjectClass *oc) +static void pnv_machine_class_props_init (ObjectClass *oc) { object_class_property_add(oc, "num-chips", "uint32", pnv_get_num_chips, pnv_set_num_chips,
@@ -1083,15 +1079,15 @@ static void powernv_machine_class_props_init(ObjectClass *oc) NULL); } -static void powernv_machine_class_init (ObjectClass *oc,void *data) +static void pnv_machine_class_init (ObjectClass *oc,void *data) {MachineClass *mc =MACHINE_CLASS (oc);XICSFabricClass *xic =XICS_FABRIC_CLASS (oc);InterruptStatsProviderClass *ispc =INTERRUPT_STATS_PROVIDER_CLASS (oc); mc->desc ="IBM PowerNV (Non-Virtualized)" ; - mc->init = ppc_powernv_init; - mc->reset = ppc_powernv_reset; + mc->init = pnv_init; + mc->reset = pnv_reset; mc->max_cpus =MAX_CPUS ; mc->default_cpu_type =POWERPC_CPU_TYPE_NAME ("power8_v2.0" ); mc->block_default_type =IF_IDE ;/* Pnv provides a AHCI device for
@@ -1104,7 +1100,7 @@ static void powernv_machine_class_init(ObjectClass *oc, void *data) xic->ics_resend = pnv_ics_resend; ispc->print_info = pnv_pic_print_info; -powernv_machine_class_props_init (oc); +pnv_machine_class_props_init (oc); }#define DEFINE_PNV_CHIP_TYPE (type, class_initfn) \
@@ -1116,11 +1112,11 @@ static void powernv_machine_class_init(ObjectClass *oc, void *data)static const TypeInfo types[] = { { - .name =TYPE_POWERNV_MACHINE , + .name =TYPE_PNV_MACHINE , .parent =TYPE_MACHINE , .instance_size =sizeof (PnvMachineState), - .instance_init = powernv_machine_initfn, - .class_init = powernv_machine_class_init, + .instance_init = pnv_machine_initfn, + .class_init = pnv_machine_class_init, .interfaces = (InterfaceInfo []) { {TYPE_XICS_FABRIC }, {TYPE_INTERRUPT_STATS_PROVIDER },
hw/ppc/pnv_bmc.c +1 -1
@@ -73,7 +73,7 @@ void pnv_bmc_powerdown(IPMIBmc *bmc)pnv_gen_oem_sel (bmc,SOFT_OFF ); } -void pnv_bmc_populate_sensors (IPMIBmc *bmc,void *fdt) +void pnv_dt_bmc_sensors (IPMIBmc *bmc,void *fdt) {int offset;int i;
hw/ppc/pnv_core.c +4 -4
@@ -37,7 +37,7 @@ static const char *pnv_core_cpu_typename(PnvCore *pc)return cpu_type; } -static void powernv_cpu_reset (void *opaque) +static void pnv_cpu_reset (void *opaque) {PowerPCCPU *cpu = opaque;CPUState *cs =CPU (cpu);
@@ -54,7 +54,7 @@ static void powernv_cpu_reset(void *opaque) env->msr |=MSR_HVB ;/* Hypervisor mode */ } -static void powernv_cpu_init (PowerPCCPU *cpu,Error **errp) +static void pnv_cpu_init (PowerPCCPU *cpu,Error **errp) {CPUPPCState *env = &cpu->env;int core_pir;
@@ -73,7 +73,7 @@ static void powernv_cpu_init(PowerPCCPU *cpu, Error **errp)/* Set time-base frequency to 512 MHz */ cpu_ppc_tb_init (env,PNV_TIMEBASE_FREQ ); -qemu_register_reset (powernv_cpu_reset, cpu); +qemu_register_reset (pnv_cpu_reset, cpu); }/*
@@ -139,7 +139,7 @@ static void pnv_core_realize_child(Object *child, XICSFabric *xi, Error **errp)return ; } -powernv_cpu_init (cpu, &local_err); +pnv_cpu_init (cpu, &local_err);if (local_err) {error_propagate (errp, local_err);return ;
hw/ppc/pnv_lpc.c +3 -3
@@ -92,7 +92,7 @@ enum {#define LPC_HC_REGS_OPB_SIZE 0x00001000 -static int pnv_lpc_populate (PnvXScomInterface *dev,void *fdt,int xscom_offset) +static int pnv_lpc_dt_xscom (PnvXScomInterface *dev,void *fdt,int xscom_offset) {const char compat[] ="ibm,power8-lpc\0ibm,lpc" ;char *name;
@@ -482,7 +482,7 @@ static void pnv_lpc_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);PnvXScomInterfaceClass *xdc =PNV_XSCOM_INTERFACE_CLASS (klass); - xdc->populate = pnv_lpc_populate; + xdc->dt_xscom = pnv_lpc_dt_xscom; dc->realize = pnv_lpc_realize; }
@@ -515,7 +515,7 @@ type_init(pnv_lpc_register_types)*/ static void pnv_lpc_isa_irq_handler_cpld (void *opaque,int n,int level) { -PnvMachineState *pnv =POWERNV_MACHINE (qdev_get_machine ()); +PnvMachineState *pnv =PNV_MACHINE (qdev_get_machine ());uint32_t old_state = pnv->cpld_irqstate;PnvLpcController *lpc =PNV_LPC (opaque);
hw/ppc/pnv_psi.c +2 -2
@@ -510,7 +510,7 @@ static void pnv_psi_realize(DeviceState *dev, Error **errp) } } -static int pnv_psi_populate (PnvXScomInterface *dev,void *fdt,int xscom_offset) +static int pnv_psi_dt_xscom (PnvXScomInterface *dev,void *fdt,int xscom_offset) {const char compat[] ="ibm,power8-psihb-x\0ibm,psihb-x" ;char *name;
@@ -546,7 +546,7 @@ static void pnv_psi_class_init(ObjectClass *klass, void *data)DeviceClass *dc =DEVICE_CLASS (klass);PnvXScomInterfaceClass *xdc =PNV_XSCOM_INTERFACE_CLASS (klass); - xdc->populate = pnv_psi_populate; + xdc->dt_xscom = pnv_psi_dt_xscom; dc->realize = pnv_psi_realize; dc->props = pnv_psi_properties;
hw/ppc/pnv_xscom.c +5 -5
@@ -207,15 +207,15 @@ typedef struct ForeachPopulateArgs {int xscom_offset; } ForeachPopulateArgs; -static int xscom_populate_child (Object *child,void *opaque) +static int xscom_dt_child (Object *child,void *opaque) {if (object_dynamic_cast (child,TYPE_PNV_XSCOM_INTERFACE )) {ForeachPopulateArgs *args = opaque;PnvXScomInterface *xd =PNV_XSCOM_INTERFACE (child);PnvXScomInterfaceClass *xc =PNV_XSCOM_INTERFACE_GET_CLASS (xd); -if (xc->populate) { -_FDT ((xc->populate (xd, args->fdt, args->xscom_offset))); +if (xc->dt_xscom) { +_FDT ((xc->dt_xscom (xd, args->fdt, args->xscom_offset))); } }return 0 ;
@@ -224,7 +224,7 @@ static int xscom_populate_child(Object *child, void *opaque)static const char compat_p8[] ="ibm,power8-xscom\0ibm,xscom" ;static const char compat_p9[] ="ibm,power9-xscom\0ibm,xscom" ; -int pnv_xscom_populate (PnvChip *chip,void *fdt,int root_offset) +int pnv_dt_xscom (PnvChip *chip,void *fdt,int root_offset) {uint64_t reg[] = {cpu_to_be64 (PNV_XSCOM_BASE (chip)),cpu_to_be64 (PNV_XSCOM_SIZE ) };
@@ -255,7 +255,7 @@ int pnv_xscom_populate(PnvChip *chip, void *fdt, int root_offset) args.fdt = fdt; args.xscom_offset = xscom_offset; -object_child_foreach (OBJECT (chip), xscom_populate_child, &args); +object_child_foreach (OBJECT (chip), xscom_dt_child, &args);return 0 ; }
include/hw/ppc/pnv.h +5 -5
@@ -26,7 +26,7 @@#include "hw/ppc/pnv_psi.h" #include "hw/ppc/pnv_occ.h" -#define TYPE_PNV_CHIP "powernv-chip" +#define TYPE_PNV_CHIP "pnv-chip"#define PNV_CHIP (obj) OBJECT_CHECK(PnvChip, (obj), TYPE_PNV_CHIP)#define PNV_CHIP_CLASS (klass) \ OBJECT_CLASS_CHECK(PnvChipClass, (klass), TYPE_PNV_CHIP)
@@ -117,9 +117,9 @@ typedef struct PnvChipClass {#define PNV_CHIP_INDEX (chip) \ (((chip)->chip_id >> 2) * 2 + ((chip)->chip_id & 0x3)) -#define TYPE_POWERNV_MACHINE MACHINE_TYPE_NAME("powernv") -#define POWERNV_MACHINE (obj) \ - OBJECT_CHECK(PnvMachineState, (obj), TYPE_POWERNV_MACHINE) +#define TYPE_PNV_MACHINE MACHINE_TYPE_NAME("powernv") +#define PNV_MACHINE (obj) \ + OBJECT_CHECK(PnvMachineState, (obj), TYPE_PNV_MACHINE) typedef struct PnvMachineState { /*< private >*/
@@ -144,7 +144,7 @@ typedef struct PnvMachineState {/* * BMC helpers */ -void pnv_bmc_populate_sensors (IPMIBmc *bmc,void *fdt); +void pnv_dt_bmc_sensors (IPMIBmc *bmc,void *fdt);void pnv_bmc_powerdown (IPMIBmc *bmc);/*
include/hw/ppc/pnv_xscom.h +2 -2
@@ -36,7 +36,7 @@ typedef struct PnvXScomInterface {typedef struct PnvXScomInterfaceClass {InterfaceClass parent; -int (*populate)(PnvXScomInterface *dev,void *fdt,int offset); +int (*dt_xscom)(PnvXScomInterface *dev,void *fdt,int offset); }PnvXScomInterfaceClass ;/*
@@ -67,7 +67,7 @@ typedef struct PnvXScomInterfaceClass {#define PNV_XSCOM_OCC_SIZE 0x6000extern void pnv_xscom_realize (PnvChip *chip,Error **errp); -extern int pnv_xscom_populate (PnvChip *chip,void *fdt,int offset); +extern int pnv_dt_xscom (PnvChip *chip,void *fdt,int offset);extern void pnv_xscom_add_subregion (PnvChip *chip,hwaddr offset,MemoryRegion *mr);
Signature · 1 line
2.14.3
[Qemu-devel] [PULL 02/12] pseries: Update SLOF firmware image to qemu-slof-20171214
In reply to David GibsonFrom: Alexey Kardashevskiy <[email protected]>
The main changes are:
- able to handle more devices with specified bootindex;
- implements flatten device tree rendering, for both QEMU and guest kernel.
The full list is:
Quoted 9 lines
boot: use a temporary bootdev-buf
boot: do not concatenate bootdev
libvirtio: Mark structvirtio_scsi_req_cmdas packed
fdt: Implement "fdt-fetch" method for client interface
rtas: Store RTAS address and entry in the device tree
board-qemu: Fix slof-build-id length
fdt: Pass the resulting device tree to QEMU
fdt: Fix version and add a word for FDT header size
tree: Rework set-chosen-cpu and store /chosen ihandle and phandle
Quoted 8 lines
node: Add some documentation
Revert various SLOF-to-QEMU private hypercalls
Use input-device and output-device
netboot: Create bootp-response when bootp is used libnet/ipv6: assigntimes_askedvalue directly
usb-xhci: Reset ERSTSZ together with ERSTBA
virtio-net: rework the driver to support multiple open
board-qemu: add private hcall to inform host on "phandle" update
--- pc-bios/README | 2 +- pc-bios/slof.bin | Bin 905200 -> 913880 bytes roms/SLOF | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-)
pc-bios/README +1 -1
@@ -17,7 +17,7 @@ - SLOF (Slimline Open Firmware) is a free IEEE 1275 Open Firmware implementation for certain IBM POWER hardware. The sources are at https://github.com/aik/SLOF, and the image currently in qemu is - built from git tag qemu-slof-20170724. + built from git tag qemu-slof-20171214. - sgabios (the Serial Graphics Adapter option ROM) provides a means for legacy x86 software to communicate with an attached serial console as
pc-bios/slof.bin binary +0 -0
roms/SLOF +1 -1
@@ -1 +1 @@ -Subproject commit 89f519f09bf850918b60526e50409afb663418aa +Subproject commit fa981320a1e0968d6fc1b8de319723ff8212b337
Signature · 1 line
2.14.3
Quoted 25 lines · David Gibson
The following changes since commit
281f327487c9c9b1599f93c589a408bbf4a651b8:Merge remote-tracking branch 'remotes/vivier/tags/m68k-for-2.12-pull-request' into staging (2017-12-22 00:11:36 +0000)
are available in the Git repository at:
git://github.com/dgibson/qemu.gittags/ppc-for-2.12-20180108for you to fetch changes up to
9f173585d3f35345b2facce50620ce2cdda05f2f:spapr: Correct compatibility mode setting for hotplugged CPUs (2018-01-08 13:33:17 +1100)
----------------------------------------------------------------
ppc patch queue 2018-01-08This pull requests supersedes both ppc-for-2.12-20180103 and ppc-for-2.12-20171219. We've discovered that some substantial extensions to the proposed capabilities infrastructure will be valuable, amongst other things for managing/advertising workarounds for the dreaded Meltdown/Spectre bugs.
Although that could be done as follow on changes, since the caps infrastructure hasn't been merged yet, we might as well pull it out while we rework, and just merge the unrelated bugfixes.
Quoted 5 lines
The last two pull requests apparently had problems on some arm32 systems. I haven't been able to reproduce those, so I have no idea which patch is causing them. If we get lucky and it was one of the patches I've removed from this series, this may also serve to unjam the other fixes.
This still hangs on my arm32 setup in the migration test. I'll see if I can identify what is going wrong.
thanks
-- PMM
Quoted 26 lines · Peter Maydell
Quoted 25 lines · David Gibson
The following changes since commit
281f327487c9c9b1599f93c589a408bbf4a651b8:Merge remote-tracking branch 'remotes/vivier/tags/m68k-for-2.12-pull-request' into staging (2017-12-22 00:11:36 +0000)
are available in the Git repository at:
git://github.com/dgibson/qemu.gittags/ppc-for-2.12-20180108for you to fetch changes up to
9f173585d3f35345b2facce50620ce2cdda05f2f:spapr: Correct compatibility mode setting for hotplugged CPUs (2018-01-08 13:33:17 +1100)
----------------------------------------------------------------
ppc patch queue 2018-01-08This pull requests supersedes both ppc-for-2.12-20180103 and ppc-for-2.12-20171219. We've discovered that some substantial extensions to the proposed capabilities infrastructure will be valuable, amongst other things for managing/advertising workarounds for the dreaded Meltdown/Spectre bugs.
Although that could be done as follow on changes, since the caps infrastructure hasn't been merged yet, we might as well pull it out while we rework, and just merge the unrelated bugfixes.
Quoted 8 lines
Quoted 5 lines
The last two pull requests apparently had problems on some arm32 systems. I haven't been able to reproduce those, so I have no idea which patch is causing them. If we get lucky and it was one of the patches I've removed from this series, this may also serve to unjam the other fixes.
This still hangs on my arm32 setup in the migration test. I'll see if I can identify what is going wrong.
Thanks. Even if you can identify which patch it is and we can postpone that one would be a bug help.
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
Quoted 2 lines · David Gibson
Thanks. Even if you can identify which patch it is and we can postpone that one would be a bug help.
Bisection blames this one:
[email protected] (1):
target-ppc: optimize cmp translation
A plain boot doesn't work either:
./build/ppc/ppc64-softmmu/qemu-system-ppc64 -display none -serial stdio
SLOF ********************************************************************** QEMU Starting
Build Date = Jul 24 2017 15:15:46
FW Version = git-89f519f09bf85091
Press "s" to enter Open Firmware.
Populating /vdevice methods
Populating /vdevice/vty@71000000
Populating /vdevice/nvram@71000001
Populating /vdevice/l-lan@71000002
Populating /vdevice/v-scsi@71000003
SCSI: Looking for devices
00000000 CD-ROM : "QEMU QEMU CD-ROM 2.5+"
Populating /pci@0000000
00 0000 (D) : 1234 1111 qemu vga
00 0800 (D) : 1033 0194 serial bus [ usb-xhci ]No NVRAM common partition, re-initializing...
E
and then keeps printing out spaces for ever as far as I can see.
A working build does
SLOF ********************************************************************** QEMU Starting
Build Date = Jul 24 2017 15:15:46
FW Version = git-89f519f09bf85091
Press "s" to enter Open Firmware.
Populating /vdevice methods
Populating /vdevice/vty@71000000
Populating /vdevice/nvram@71000001
Populating /vdevice/l-lan@71000002
Populating /vdevice/v-scsi@71000003
SCSI: Looking for devices
8200000000000000 CD-ROM : "QEMU QEMU CD-ROM 2.5+"
Populating /pci@800000020000000
00 0000 (D) : 1234 1111 qemu vga
00 0800 (D) : 1033 0194 serial bus [ usb-xhci ]No NVRAM common partition, re-initializing...
Installing QEMU fb
Scanning USB
XHCI: Initializing
USB Keyboard
USB mouse
No console specified using screen & keyboard
[etc etc]
so you can see it's already diverged because it prints out a different value for the name of the pci node and the SCSI line has 8200000000000000 vs 00000000.
(This is a build for arm32, running in a chroot on an aarch64 box, non-debug build.)
thanks
-- PMM
Quoting Peter Maydell (2018-01-09 09:15:25)
Quoted 65 lines · David Gibson
Quoted 2 lines
Thanks. Even if you can identify which patch it is and we can postpone that one would be a bug help.
Bisection blames this one:
[email protected] (1):
target-ppc: optimize cmp translationA plain boot doesn't work either:
./build/ppc/ppc64-softmmu/qemu-system-ppc64 -display none -serial stdioSLOF ********************************************************************** QEMU Starting
Build Date = Jul 24 2017 15:15:46
FW Version = git-89f519f09bf85091
Press "s" to enter Open Firmware.Populating /vdevice methods
Populating /vdevice/vty@71000000
Populating /vdevice/nvram@71000001
Populating /vdevice/l-lan@71000002
Populating /vdevice/v-scsi@71000003
SCSI: Looking for devices
00000000 CD-ROM : "QEMU QEMU CD-ROM 2.5+"Populating /pci@0000000
00 0000 (D) : 1234 1111 qemu vga 00 0800 (D) : 1033 0194 serial bus [ usb-xhci ]No NVRAM common partition, re-initializing...
Eand then keeps printing out spaces for ever as far as I can see.
A working build does
SLOF ********************************************************************** QEMU Starting
Build Date = Jul 24 2017 15:15:46
FW Version = git-89f519f09bf85091
Press "s" to enter Open Firmware.Populating /vdevice methods
Populating /vdevice/vty@71000000
Populating /vdevice/nvram@71000001
Populating /vdevice/l-lan@71000002
Populating /vdevice/v-scsi@71000003
SCSI: Looking for devices
8200000000000000 CD-ROM : "QEMU QEMU CD-ROM 2.5+"
Populating /pci@80000002000000000 0000 (D) : 1234 1111 qemu vga 00 0800 (D) : 1033 0194 serial bus [ usb-xhci ]No NVRAM common partition, re-initializing...
Installing QEMU fbScanning USB
XHCI: Initializing
USB Keyboard
USB mouse
No console specified using screen & keyboard
Quoted 5 lines
[etc etc]
so you can see it's already diverged because it prints out a different value for the name of the pci node and the SCSI line has 8200000000000000 vs 00000000.
FYI I actually see this with a raspberry pi 3 too, with repeating spaces as well. I didn't notice it before since in my case the ufd_version_check() in test-migration.c was failing so the migration tests were reporting success but were actually just getting skipped.
Quoted 7 lines
(This is a build for arm32, running in a chroot on an aarch64 box, non-debug build.)
thanks
-- PMM
Quoted 4 lines · Michael Roth
Quoted 3 lines
so you can see it's already diverged because it prints out a different value for the name of the pci node and the SCSI line has 8200000000000000 vs 00000000.
FYI I actually see this with a raspberry pi 3 too
Is this an arm32 or aarch64 install? From Peter's report, I am tempted to blame the ARM backend (I tested 32-bit x86 and it works). But a bug in both 32-bit ARM and aarch64 would be less likely.
Paolo
Quoted 5 lines
, with repeating spaces
as well. I didn't notice it before since in my case theufd_version_check()intest-migration.cwas failing so the migration tests were reporting success but were actually just getting skipped.
Quoting Paolo Bonzini (2018-01-09 11:34:48)
Quoted 9 lines · Michael Roth
Quoted 4 lines
Quoted 3 lines
so you can see it's already diverged because it prints out a different value for the name of the pci node and the SCSI line has 8200000000000000 vs 00000000.
FYI I actually see this with a raspberry pi 3 too
Is this an arm32 or aarch64 install? From Peter's report, I am tempted to blame the ARM backend (I tested 32-bit x86 and it works). But a bug in both 32-bit ARM and aarch64 would be less likely.
In my case it's a 32-bit kernel/userspace:
pi@rpi-office:~/dev/qemu-build $ uname -a
Linux rpi-office 4.4.38-v7+ #938 SMP Thu Dec 15 15:22:21 GMT 2016 armv7l GNU/Linux
pi@rpi-office:~/dev/qemu-build $ file ppc64-softmmu/qemu-system-ppc64 ppc64-softmmu/qemu-system-ppc64: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, for GNU/Linux 2.6.32, BuildID[sha1]=4e3e0c8ddbab91a672e4c29b5bfcee9d22459cf7, not stripped
Quoted 9 lines
Paolo
Quoted 5 lines
, with repeating spaces
as well. I didn't notice it before since in my case theufd_version_check()intest-migration.cwas failing so the migration tests were reporting success but were actually just getting skipped.
Quoted 2 lines · Peter Maydell
(This is a build for arm32, running in a chroot on an aarch64 box, non-debug build.)
It's an arm backend problem.
For 64-bit setcond2, we do
0x6e5c3fa4: e1570008 cmp r7, r8 0x6e5c3fa8: 01550004 cmpeq r5, r4 0x6e5c3fac: b3a09001 movlt sb, #1 0x6e5c3fb0: a3a09000 movge sb, #0
which looks good, but only works for LTU not LT.
I'll work on a fix.
r~
Quoted 8 lines · Peter Maydell
Quoted 2 lines · David Gibson
Thanks. Even if you can identify which patch it is and we can postpone that one would be a bug help.
Bisection blames this one:
[email protected] (1):
target-ppc: optimize cmp translation
Aha! Ok, I'll pull that one out until we find a fix.
[snip]
Quoted 2 lines
(This is a build for arm32, running in a chroot on an aarch64 box, non-debug build.)
Ah.. but since it's a chroot, still an aarch64 cpu behind it all. I think the machines I managed to borrow were all much older slower really truly arm32 machines, which I guess didn't show the problem.
Oh.. and probably a debug (default) build as well.
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
Quoted 11 lines · David Gibson
Quoted 8 lines · Peter Maydell
Quoted 2 lines · David Gibson
Thanks. Even if you can identify which patch it is and we can postpone that one would be a bug help.
Bisection blames this one:
[email protected] (1):
target-ppc: optimize cmp translationAha! Ok, I'll pull that one out until we find a fix.
Richard posted one, it's an ARM32 backend bug.
Quoted 5 lines
[snip]
Quoted 2 lines
(This is a build for arm32, running in a chroot on an aarch64 box, non-debug build.)
Ah.. but since it's a chroot, still an aarch64 cpu behind it all.
No, it's running 32-bit ARM code.
Paolo
I
Quoted 5 lines
think the machines I managed to borrow were all much older slower really truly arm32 machines, which I guess didn't show the problem.
Oh.. and probably a debug (default) build as well.
Quoted 15 lines · Paolo Bonzini
Quoted 11 lines · David Gibson
Quoted 8 lines · Peter Maydell
Quoted 2 lines · David Gibson
Thanks. Even if you can identify which patch it is and we can postpone that one would be a bug help.
Bisection blames this one:
[email protected] (1):
target-ppc: optimize cmp translationAha! Ok, I'll pull that one out until we find a fix.
Richard posted one, it's an ARM32 backend bug.
Quoted 7 lines
Quoted 5 lines
[snip]
Quoted 2 lines
(This is a build for arm32, running in a chroot on an aarch64 box, non-debug build.)
Ah.. but since it's a chroot, still an aarch64 cpu behind it all.
No, it's running 32-bit ARM code.
Ah. But maybe a different version to older ARM32s?
I'm trying to figure out why I entirely failed to reproduce this on a Raspberry Pi 1 (and a couple of other arm32 machines, but I forget the details of them).
Quoted 7 lines
I
Quoted 5 lines
think the machines I managed to borrow were all much older slower really truly arm32 machines, which I guess didn't show the problem.
Oh.. and probably a debug (default) build as well.
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
Quoted 1 line · David Gibson
Ah. But maybe a different version to older ARM32s?
No, the bug affected all arm32 back to the beginning of time.
Quoted 3 lines
I'm trying to figure out why I entirely failed to reproduce this on a Raspberry Pi 1 (and a couple of other arm32 machines, but I forget the details of them).
I can't imagine, really. You should have been able to see it there.
r~
Hi devs sorry if i enter in the discussion about.
gcc gave errors in building this queue.
here i paste my build log.
This is my machine infos and so and so
Architecture: ppc64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Big Endian CPU(s): 4 On-line CPU(s) list: 0-3 Thread(s) per core: 1 Core(s) per socket: 1 Socket(s): 4 NUMA node(s): 1 Model: 1.1 (pvr 0044 0101) Model name: PPC970MP, altivec supported CPU max MHz: 2500.0000 CPU min MHz: 1250.0000 L1d cache: 32K L1i cache: 64K L2 cache: 1024K NUMA node0 CPU(s): 0-3
uname -a
Linux debian 4.9.67 #1 SMP Sat Dec 9 12:20:20 CET 2017 ppc64 GNU/Linux
gcc --version
gcc (Debian 7.2.0-19) 7.2.0
Regards
Luigi
________________________________
Da: Qemu-ppc <[email protected]> per conto di David Gibson <[email protected]>
Inviato: martedì 9 gennaio 2018 13:16
A: Peter Maydell
Cc: Michael Roth; QEMU Developers; [email protected]; Greg Kurz; [email protected]
Oggetto: Re: [Qemu-ppc] [PULL 00/12] ppc-for-2.12 queue 20180108
Quoted 26 lines · Peter Maydell
Quoted 25 lines · David Gibson
The following changes since commit
281f327487c9c9b1599f93c589a408bbf4a651b8:Merge remote-tracking branch 'remotes/vivier/tags/m68k-for-2.12-pull-request' into staging (2017-12-22 00:11:36 +0000)
are available in the Git repository at:
git://github.com/dgibson/qemu.gittags/ppc-for-2.12-20180108for you to fetch changes up to
9f173585d3f35345b2facce50620ce2cdda05f2f:spapr: Correct compatibility mode setting for hotplugged CPUs (2018-01-08 13:33:17 +1100)
----------------------------------------------------------------
ppc patch queue 2018-01-08This pull requests supersedes both ppc-for-2.12-20180103 and ppc-for-2.12-20171219. We've discovered that some substantial extensions to the proposed capabilities infrastructure will be valuable, amongst other things for managing/advertising workarounds for the dreaded Meltdown/Spectre bugs.
Although that could be done as follow on changes, since the caps infrastructure hasn't been merged yet, we might as well pull it out while we rework, and just merge the unrelated bugfixes.
Quoted 8 lines
Quoted 5 lines
The last two pull requests apparently had problems on some arm32 systems. I haven't been able to reproduce those, so I have no idea which patch is causing them. If we get lucky and it was one of the patches I've removed from this series, this may also serve to unjam the other fixes.
This still hangs on my arm32 setup in the migration test. I'll see if I can identify what is going wrong.
Thanks. Even if you can identify which patch it is and we can postpone that one would be a bug help.
--
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
[http://www.ozlabs.org/~dgibson/dgibson-small.jpg]<http://www.ozlabs.org/~dgibson>
David Gibson's Home Page - OzLabs<http://www.ozlabs.org/~dgibson>
www.ozlabs.org
Home; Papers; Junk code; PGP Key; Ozlabs. David Gibson's Home Page. I'm a Linux kernel hacker, mostly, though I've also worked on other projects including, recently ...
Quoted 7 lines · luigi burdo
Hi devs sorry if i enter in the discussion about.
gcc gave errors in building this queue.
here i paste my build log.
Thanks. This is the relevant bit of the log:
/home/amigaone/src/new/tags/ppc-for-2.12-20180108/target/s390x/mem_helper.c:2567:1:
internal compiler error: Segmentation fault
}
^
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-7/README.Bugs> for instructions.
This means that gcc crashed. This is either:
(a) a hardware problem with your machine (eg bad memory)
or
(b) a bug in gcc (which you can report to the gcc team
as they suggest in the error message)
You should check whether gcc reliably crashes in the same way every time you try to build that source file. If it does, that suggests a gcc bug is more likely. If it sometimes works and sometimes doesn't, I would suspect hardware problems.
thanks
-- PMM
Hi Peter,
thanks for reply.
I will check the ram banks and will try again to build it .
but i have more fear about gcc now because the issue come exactly in the same point every time i try to rebuild everyting.
Thankyou
Luigi
________________________________________
This means that gcc crashed. This is either:
(a) a hardware problem with your machine (eg bad memory)
or
(b) a bug in gcc (which you can report to the gcc team
as they suggest in the error message)
You should check whether gcc reliably crashes in the same way every time you try to build that source file. If it does, that suggests a gcc bug is more likely. If it sometimes works and sometimes doesn't, I would suspect hardware problems.
thanks
-- PMM