ppc-for-3.0 queue 2018-06-22
The following changes since commit 46012db666990ff2eed1d3dc199ab8006439a93b:
Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20180619' into staging (2018-06-20 09:51:30 +0100)
are available in the Git repository at:
git://github.com/dgibson/qemu.git tags/ppc-for-3.0-20180622
for you to fetch changes up to e5ca28ecab5c69b7578e22391a66c97c3979ffd8:
spapr: Don't rewrite mmu capabilities in KVM mode (2018-06-22 14:19:07 +1000)
----------------------------------------------------------------
ppc patch queue 2018-06-22
Another assorted patch of patches for ppc and spapr.
* Rework of guest pagesize handling for ppc, which avoids guest visibly different behaviour between accelerators
* A number of Pnv cleanups, working towards more complete POWER9 support
* Migration of VPA data, a significant bugfix
----------------------------------------------------------------
Alexey Kardashevskiy (1):
pseries: Update SLOF firmware image to qemu-slof-20180621
BALATON Zoltan (3):
ppc4xx_i2c: Remove unimplemented sdata and intr registers
ppc4xx_i2c: Implement directcntl register target/ppc: Add missing opcode for icbt on PPC440
Cédric Le Goater (6):
ppc/pnv: introduce a new intc_create() operation to the chip model ppc/pnv: introduce a new isa_create() operation to the chip model ppc/pnv: introduce Pnv8Chip and Pnv9Chip models ppc/pnv: consolidate the creation of the ISA bus device tree
spapr: split the IRQ allocation sequence
spapr: remove unused spapr_irq routines
David Gibson (9):
target/ppc: Allow cpu compatiblity checks based on type, not instance
spapr: Compute effective capability values earlier
spapr: Add cpu_apply hook to capabilities
target/ppc: Add kvmppc_hpt_needs_host_contiguous_pages() helper
spapr: Maximum (HPT) pagesize property
spapr: Use maximum page size capability to simplify memory backend checking target/ppc: Add ppc_hash64_filter_pagesizes()
spapr: Limit available pagesizes to provide a consistent guest environment
spapr: Don't rewrite mmu capabilities in KVM mode
Greg Kurz (2):
spapr_cpu_core: migrate per-CPU data
spapr_cpu_core: migrate VPA related state
John Arbuckle (1):
fpu_helper.c: fix helper_fpscr_clrbit() function
Sebastian Bauer (1):
sm501: Fix hardware cursor color conversion
default-configs/ppc-softmmu.mak | 1 + default-configs/ppcemb-softmmu.mak | 1 + hw/display/sm501.c | 6 +- hw/i2c/ppc4xx_i2c.c | 30 ++- hw/ppc/pnv.c | 383 +++++++++++++++++++++++-------------- hw/ppc/pnv_core.c | 18 +- hw/ppc/pnv_lpc.c | 30 ++- hw/ppc/spapr.c | 122 ++++++------ hw/ppc/spapr_caps.c | 158 +++++++++++++-- hw/ppc/spapr_cpu_core.c | 91 ++++++++- hw/ppc/spapr_events.c | 18 +- hw/ppc/spapr_pci.c | 23 ++- hw/ppc/spapr_vio.c | 10 +- include/hw/i2c/ppc4xx_i2c.h | 8 +- include/hw/ppc/pnv.h | 26 ++- include/hw/ppc/pnv_lpc.h | 3 +- include/hw/ppc/spapr.h | 19 +- include/hw/ppc/spapr_cpu_core.h | 1 + pc-bios/README | 2 +- pc-bios/slof.bin | Bin 913880 -> 924840 bytes roms/SLOF | 2 +- target/ppc/compat.c | 27 ++- target/ppc/cpu.h | 4 + target/ppc/fpu_helper.c | 28 +++ target/ppc/kvm.c | 146 +++++++------- target/ppc/kvm_ppc.h | 11 +- target/ppc/mmu-hash64.c | 59 ++++++ target/ppc/mmu-hash64.h | 3 + target/ppc/translate.c | 2 + 29 files changed, 865 insertions(+), 367 deletions(-)
[Qemu-devel] [PULL 01/25] ppc/pnv: introduce a new intc_create() operation to the chip model
From: Cédric Le Goater <[email protected]>
On Power9, the thread interrupt presenter has a different type and is linked to the chip owning the cores.
--- hw/ppc/pnv.c | 21 +++++++++++++++++++-- hw/ppc/pnv_core.c | 18 +++++++++--------- include/hw/ppc/pnv.h | 1 + 3 files changed, 29 insertions(+), 11 deletions(-)
hw/ppc/pnv.c +19 -2
@@ -671,6 +671,13 @@ static uint32_t pnv_chip_core_pir_p8(PnvChip *chip, uint32_t core_id)return (chip->chip_id <<7 ) | (core_id <<3 ); } +static Object *pnv_chip_power8_intc_create (PnvChip *chip,Object *child, +Error **errp) +{ +return icp_create (child,TYPE_PNV_ICP ,XICS_FABRIC (qdev_get_machine ()), + errp); +} +/* * 0:48 Reserved - Read as zeroes * 49:52 Node ID
@@ -686,6 +693,12 @@ static uint32_t pnv_chip_core_pir_p9(PnvChip *chip, uint32_t core_id)return (chip->chip_id <<8 ) | (core_id <<2 ); } +static Object *pnv_chip_power9_intc_create (PnvChip *chip,Object *child, +Error **errp) +{ +return NULL ; +} +/* Allowed core identifiers on a POWER8 Processor Chip : * * <EX0 reserved>
@@ -721,6 +734,7 @@ static void pnv_chip_power8e_class_init(ObjectClass *klass, void *data) k->chip_cfam_id =0x221ef04980000000ull ;/* P8 Murano DD2.1 */ k->cores_mask =POWER8E_CORE_MASK ; k->core_pir = pnv_chip_core_pir_p8; + k->intc_create = pnv_chip_power8_intc_create; k->xscom_base =0x003fc0000000000ull ; dc->desc ="PowerNV Chip POWER8E" ; }
@@ -734,6 +748,7 @@ static void pnv_chip_power8_class_init(ObjectClass *klass, void *data) k->chip_cfam_id =0x220ea04980000000ull ;/* P8 Venice DD2.0 */ k->cores_mask =POWER8_CORE_MASK ; k->core_pir = pnv_chip_core_pir_p8; + k->intc_create = pnv_chip_power8_intc_create; k->xscom_base =0x003fc0000000000ull ; dc->desc ="PowerNV Chip POWER8" ; }
@@ -747,6 +762,7 @@ static void pnv_chip_power8nvl_class_init(ObjectClass *klass, void *data) k->chip_cfam_id =0x120d304980000000ull ;/* P8 Naples DD1.0 */ k->cores_mask =POWER8_CORE_MASK ; k->core_pir = pnv_chip_core_pir_p8; + k->intc_create = pnv_chip_power8_intc_create; k->xscom_base =0x003fc0000000000ull ; dc->desc ="PowerNV Chip POWER8NVL" ; }
@@ -760,6 +776,7 @@ static void pnv_chip_power9_class_init(ObjectClass *klass, void *data) k->chip_cfam_id =0x220d104900008000ull ;/* P9 Nimbus DD2.0 */ k->cores_mask =POWER9_CORE_MASK ; k->core_pir = pnv_chip_core_pir_p9; + k->intc_create = pnv_chip_power9_intc_create; k->xscom_base =0x00603fc00000000ull ; dc->desc ="PowerNV Chip POWER9" ; }
@@ -892,8 +909,8 @@ static void pnv_chip_core_realize(PnvChip *chip, Error **errp)object_property_set_int (OBJECT (pnv_core), pcc->core_pir (chip, core_hwid),"pir" , &error_fatal); -object_property_add_const_link (OBJECT (pnv_core),"xics" , -qdev_get_machine (), &error_fatal); +object_property_add_const_link (OBJECT (pnv_core),"chip" , +OBJECT (chip), &error_fatal);object_property_set_bool (OBJECT (pnv_core), true,"realized" , &error_fatal);object_unref (OBJECT (pnv_core));
hw/ppc/pnv_core.c +9 -9
@@ -99,13 +99,14 @@ static const MemoryRegionOps pnv_core_xscom_ops = { .endianness = DEVICE_BIG_ENDIAN, }; -static void pnv_realize_vcpu (PowerPCCPU *cpu,XICSFabric *xi,Error **errp) +static void pnv_realize_vcpu (PowerPCCPU *cpu,PnvChip *chip,Error **errp) {CPUPPCState *env = &cpu->env;int core_pir;int thread_index =0 ;/* TODO: TCG supports only one thread */ ppc_spr_t *pir = &env->spr_cb[SPR_PIR ];Error *local_err =NULL ; +PnvChipClass *pcc =PNV_CHIP_GET_CLASS (chip);object_property_set_bool (OBJECT (cpu), true,"realized" , &local_err);if (local_err) {
@@ -113,7 +114,7 @@ static void pnv_realize_vcpu(PowerPCCPU *cpu, XICSFabric *xi, Error **errp)return ; } - cpu->intc =icp_create (OBJECT (cpu),TYPE_PNV_ICP , xi, &local_err); + cpu->intc = pcc->intc_create (chip,OBJECT (cpu), &local_err);if (local_err) {error_propagate (errp, local_err);return ;
@@ -143,13 +144,12 @@ static void pnv_core_realize(DeviceState *dev, Error **errp)void *obj;int i, j;char name[32 ]; -Object *xi; +Object *chip; - xi =object_property_get_link (OBJECT (dev),"xics" , &local_err); -if (!xi) { -error_setg (errp,"%s: required link 'xics' not found: %s" , - __func__,error_get_pretty (local_err)); -return ; + chip =object_property_get_link (OBJECT (dev),"chip" , &local_err); +if (!chip) { +error_propagate (errp, local_err); +error_prepend (errp,"required link 'chip' not found: " ); } pc->threads = g_new(PowerPCCPU *, cc->nr_threads);
@@ -166,7 +166,7 @@ static void pnv_core_realize(DeviceState *dev, Error **errp) }for (j =0 ; j < cc->nr_threads; j++) { -pnv_realize_vcpu (pc->threads[j],XICS_FABRIC (xi), &local_err); +pnv_realize_vcpu (pc->threads[j],PNV_CHIP (chip), &local_err);if (local_err) { goto err; }
include/hw/ppc/pnv.h +1 -0
@@ -76,6 +76,7 @@ typedef struct PnvChipClass {hwaddr xscom_base;uint32_t (*core_pir)(PnvChip *chip,uint32_t core_id); + Object *(*intc_create)(PnvChip *chip, Object *child, Error **errp); } PnvChipClass;#define PNV_CHIP_TYPE_SUFFIX "-" TYPE_PNV_CHIP
Signature · 1 line
2.17.1
[Qemu-devel] [PULL 09/25] spapr: Add cpu_apply hook to capabilities
In reply to David Gibsonspapr capabilities have an apply hook to actually activate (or deactivate) the feature in the system at reset time. However, a number of capabilities affect the setup of cpus, and need to be applied to each of them - including hotplugged cpus for extra complication. To make this simpler, add an optional cpu_apply hook that is called from spapr_cpu_reset().
--- hw/ppc/spapr_caps.c | 19 +++++++++++++++++++ hw/ppc/spapr_cpu_core.c | 2 ++ include/hw/ppc/spapr.h | 1 + 3 files changed, 22 insertions(+)
hw/ppc/spapr_caps.c +19 -0
@@ -59,6 +59,8 @@ typedef struct sPAPRCapabilityInfo {sPAPRCapPossible *possible;/* Make sure the virtual hardware can support this capability */ void (*apply)(sPAPRMachineState *spapr,uint8_t val,Error **errp); +void (*cpu_apply)(sPAPRMachineState *spapr,PowerPCCPU *cpu, +uint8_t val,Error **errp); } sPAPRCapabilityInfo; static void spapr_cap_get_bool(Object *obj, Visitor *v, const char *name,
@@ -472,6 +474,23 @@ void spapr_caps_apply(sPAPRMachineState *spapr) } } +void spapr_caps_cpu_apply (sPAPRMachineState *spapr,PowerPCCPU *cpu) +{ +int i; + +for (i =0 ; i <SPAPR_CAP_NUM ; i++) { +sPAPRCapabilityInfo *info = &capability_table[i]; + +/* +* If the apply function can't set the desired level and thinks it's +* fatal, it should cause that. +*/ +if (info->cpu_apply) { + info->cpu_apply (spapr, cpu, spapr->eff.caps[i], &error_fatal); + } + } +} +void spapr_caps_add_properties (sPAPRMachineClass *smc,Error **errp) {Error *local_err =NULL ;
hw/ppc/spapr_cpu_core.c +2 -0
@@ -76,6 +76,8 @@ static void spapr_cpu_reset(void *opaque) spapr_cpu->slb_shadow_size =0 ; spapr_cpu->dtl_addr =0 ; spapr_cpu->dtl_size =0 ; + +spapr_caps_cpu_apply (SPAPR_MACHINE (qdev_get_machine ()), cpu); }void spapr_cpu_set_entry_state (PowerPCCPU *cpu,target_ulong nip,target_ulong r3)
include/hw/ppc/spapr.h +1 -0
@@ -800,6 +800,7 @@ static inline uint8_t spapr_get_cap(sPAPRMachineState *spapr, int cap)void spapr_caps_init (sPAPRMachineState *spapr);void spapr_caps_apply (sPAPRMachineState *spapr); +void spapr_caps_cpu_apply (sPAPRMachineState *spapr,PowerPCCPU *cpu);void spapr_caps_add_properties (sPAPRMachineClass *smc,Error **errp);int spapr_caps_post_migration (sPAPRMachineState *spapr);
Signature · 1 line
2.17.1
[Qemu-devel] [PULL 04/25] spapr_cpu_core: migrate VPA related state
In reply to David GibsonFrom: Greg Kurz <[email protected]>
QEMU implements the "Shared Processor LPAR" (SPLPAR) option, which allows the hypervisor to time-slice a physical processor into multiple virtual processor. The intent is to allow more guests to run, and to optimize processor utilization.
The guest OS can cede idle VCPUs, so that their processing capacity may be used by other VCPUs, with the H_CEDE hcall. The guest OS can also optimize spinlocks, by confering the time-slice of a spinning VCPU to the spinlock holder if it's currently notrunning, with the H_CONFER hcall.
Both hcalls depend on a "Virtual Processor Area" (VPA) to be registered by the guest OS, generally during early boot. Other per-VCPU areas can be registered: the "SLB Shadow Buffer" which allows a more efficient dispatching of VCPUs, and the "Dispatch Trace Log Buffer" (DTL) which is used to compute time stolen by the hypervisor. Both DTL and SLB Shadow areas depend on the VPA to be registered.
The VPA/SLB Shadow/DTL are state that QEMU should migrate, but this doesn't happen, for no apparent reason other than it was just never coded. This causes the features listed above to stop working after migration, and it breaks the logic of the H_REGISTER_VPA hcall in the destination.
The VPA is set at the guest request, ie, we don't have to migrate it before the guest has actually set it. This patch hence adds an "spapr_cpu/vpa" subsection to the recently introduced per-CPU machine data migration stream.
Since DTL and SLB Shadow are optional and both depend on VPA, they get their own subsections "spapr_cpu/vpa/slb_shadow" and "spapr_cpu/vpa/dtl" hanging from the "spapr_cpu/vpa" subsection.
Note that this won't break migration to older QEMUs. Is is already handled by only registering the vmstate handler for per-CPU data with newer machine types.
--- hw/ppc/spapr_cpu_core.c | 65 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+)
hw/ppc/spapr_cpu_core.c +65 -0
@@ -129,6 +129,67 @@ static void spapr_cpu_core_unrealize(DeviceState *dev, Error **errp)g_free (sc->threads); } +static bool slb_shadow_needed (void *opaque) +{ +sPAPRCPUState *spapr_cpu = opaque; + +return spapr_cpu->slb_shadow_addr !=0 ; +} + +static const VMStateDescription vmstate_spapr_cpu_slb_shadow = { + .name ="spapr_cpu/vpa/slb_shadow" , + .version_id =1 , + .minimum_version_id =1 , + .needed = slb_shadow_needed, + .fields = (VMStateField []) { +VMSTATE_UINT64 (slb_shadow_addr, sPAPRCPUState), +VMSTATE_UINT64 (slb_shadow_size, sPAPRCPUState), +VMSTATE_END_OF_LIST () + } +}; + +static bool dtl_needed (void *opaque) +{ +sPAPRCPUState *spapr_cpu = opaque; + +return spapr_cpu->dtl_addr !=0 ; +} + +static const VMStateDescription vmstate_spapr_cpu_dtl = { + .name ="spapr_cpu/vpa/dtl" , + .version_id =1 , + .minimum_version_id =1 , + .needed = dtl_needed, + .fields = (VMStateField []) { +VMSTATE_UINT64 (dtl_addr, sPAPRCPUState), +VMSTATE_UINT64 (dtl_size, sPAPRCPUState), +VMSTATE_END_OF_LIST () + } +}; + +static bool vpa_needed (void *opaque) +{ +sPAPRCPUState *spapr_cpu = opaque; + +return spapr_cpu->vpa_addr !=0 ; +} + +static const VMStateDescription vmstate_spapr_cpu_vpa = { + .name ="spapr_cpu/vpa" , + .version_id =1 , + .minimum_version_id =1 , + .needed = vpa_needed, + .fields = (VMStateField []) { +VMSTATE_UINT64 (vpa_addr, sPAPRCPUState), +VMSTATE_END_OF_LIST () + }, + .subsections = (const VMStateDescription * []) { + &vmstate_spapr_cpu_slb_shadow, + &vmstate_spapr_cpu_dtl, +NULL + } +}; +static const VMStateDescription vmstate_spapr_cpu_state = { .name ="spapr_cpu" , .version_id =1 ,
@@ -136,6 +197,10 @@ static const VMStateDescription vmstate_spapr_cpu_state = { .fields = (VMStateField[]) {VMSTATE_END_OF_LIST () }, + .subsections = (const VMStateDescription * []) { + &vmstate_spapr_cpu_vpa, +NULL + } }; static void spapr_realize_vcpu(PowerPCCPU *cpu, sPAPRMachineState *spapr,
Signature · 1 line
2.17.1
[Qemu-devel] [PULL 08/25] spapr: Compute effective capability values earlier
In reply to David GibsonPreviously, the effective values of the various spapr capability flags were only determined at machine reset time. That was a lazy way of making sure it was after cpu initialization so it could use the cpu object to inform the defaults.
But we've now improved the compat checking code so that we don't need to instantiate the cpus to use it. That lets us move the resolution of the capability defaults much earlier.
This is going to be necessary for some future capabilities.
--- hw/ppc/spapr.c | 6 ++++-- hw/ppc/spapr_caps.c | 9 ++++++--- include/hw/ppc/spapr.h | 3 ++- 3 files changed, 12 insertions(+), 6 deletions(-)
hw/ppc/spapr.c +4 -2
@@ -1612,7 +1612,7 @@ static void spapr_machine_reset(void)void *fdt;int rc; -spapr_caps_reset (spapr); +spapr_caps_apply (spapr); first_ppc_cpu =POWERPC_CPU (first_cpu); if (kvm_enabled() && kvmppc_has_cap_mmu_radix() &&
@@ -2526,7 +2526,9 @@ static void spapr_machine_init(MachineState *machine)QLIST_INIT (&spapr->phbs);QTAILQ_INIT (&spapr->pending_dimm_unplugs); -/* Check HPT resizing availability */ +/* Determine capabilities to run with */ +spapr_caps_init (spapr); +kvmppc_check_papr_resize_hpt (&resize_hpt_err);if (spapr->resize_hpt ==SPAPR_RESIZE_HPT_DEFAULT ) {/*
hw/ppc/spapr_caps.c +6 -3
@@ -439,12 +439,12 @@ SPAPR_CAP_MIG_STATE(cfpc, SPAPR_CAP_CFPC);SPAPR_CAP_MIG_STATE (sbbc,SPAPR_CAP_SBBC );SPAPR_CAP_MIG_STATE (ibs,SPAPR_CAP_IBS ); -void spapr_caps_reset (sPAPRMachineState *spapr) +void spapr_caps_init (sPAPRMachineState *spapr) {sPAPRCapabilities default_caps;int i; -/* First compute the actual set of caps we're running with.. */ +/* Compute the actual set of caps we should run with */ default_caps =default_caps_with_cpu (spapr,MACHINE (spapr)->cpu_type);for (i =0 ; i <SPAPR_CAP_NUM ; i++) {
@@ -455,8 +455,11 @@ void spapr_caps_reset(sPAPRMachineState *spapr) spapr->eff.caps[i] = default_caps.caps[i]; } } +} -/* .. then apply those caps to the virtual hardware */ +void spapr_caps_apply (sPAPRMachineState *spapr) +{ +int i;for (i =0 ; i <SPAPR_CAP_NUM ; i++) {sPAPRCapabilityInfo *info = &capability_table[i];
include/hw/ppc/spapr.h +2 -1
@@ -798,7 +798,8 @@ static inline uint8_t spapr_get_cap(sPAPRMachineState *spapr, int cap)return spapr->eff.caps[cap]; } -void spapr_caps_reset (sPAPRMachineState *spapr); +void spapr_caps_init (sPAPRMachineState *spapr); +void spapr_caps_apply (sPAPRMachineState *spapr);void spapr_caps_add_properties (sPAPRMachineClass *smc,Error **errp);int spapr_caps_post_migration (sPAPRMachineState *spapr);
Signature · 1 line
2.17.1
[Qemu-devel] [PULL 06/25] ppc/pnv: consolidate the creation of the ISA bus device tree
In reply to David GibsonFrom: Cédric Le Goater <[email protected]>
The device tree node of the ISA bus was being partially done in different places. Move all the nodes creation under the same routine.
--- hw/ppc/pnv.c | 51 +++++++++++++++++++++++---------------------------- 1 file changed, 23 insertions(+), 28 deletions(-)
hw/ppc/pnv.c +23 -28
@@ -265,18 +265,6 @@ static void pnv_dt_icp(PnvChip *chip, void *fdt, uint32_t pir,g_free (reg); } -static int pnv_chip_lpc_offset (PnvChip *chip,void *fdt) -{ -char *name; -int offset; - - name =g_strdup_printf ("/xscom@%" PRIx64"/isa@%x" , - (uint64_t )PNV_XSCOM_BASE (chip),PNV_XSCOM_LPC_BASE ); - offset =fdt_path_offset (fdt, name); -g_free (name); -return offset; -} -static void pnv_dt_chip (PnvChip *chip,void *fdt) {const char *typename =pnv_chip_core_typename (chip);
@@ -285,16 +273,6 @@ static void pnv_dt_chip(PnvChip *chip, void *fdt)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" -* property. -*/ -if (chip->chip_id ==0x0 ) { -int lpc_offset =pnv_chip_lpc_offset (chip, fdt); - -_FDT ((fdt_setprop (fdt, lpc_offset,"primary" ,NULL ,0 ))); - } -for (i =0 ; i < chip->nr_cores; i++) {PnvCore *pnv_core =PNV_CORE (chip->cores + i * typesize);
@@ -418,16 +396,35 @@ static int pnv_dt_isa_device(DeviceState *dev, void *opaque)return 0 ; } -static void pnv_dt_isa (ISABus *bus,void *fdt,int lpc_offset) +static int pnv_chip_isa_offset (PnvChip *chip,void *fdt) +{ +char *name; +int offset; + + name =g_strdup_printf ("/xscom@%" PRIx64"/isa@%x" , + (uint64_t )PNV_XSCOM_BASE (chip),PNV_XSCOM_LPC_BASE ); + offset =fdt_path_offset (fdt, name); +g_free (name); +return offset; +} + +/* The default LPC bus of a multichip system is on chip 0. It's +* recognized by the firmware (skiboot) using a "primary" property. +*/ +static void pnv_dt_isa (PnvMachineState *pnv,void *fdt) { +int isa_offset =pnv_chip_isa_offset (pnv->chips[0 ], fdt);ForeachPopulateArgs args = { .fdt = fdt, - .offset = lpc_offset, + .offset = isa_offset, }; +_FDT ((fdt_setprop (fdt, isa_offset,"primary" ,NULL ,0 ))); +/* ISA devices are not necessarily parented to the ISA bus so we * can not use object_child_foreach() */ -qbus_walk_children (BUS (bus), pnv_dt_isa_device,NULL ,NULL ,NULL , &args); +qbus_walk_children (BUS (pnv->isa_bus), pnv_dt_isa_device,NULL ,NULL ,NULL , + &args); }static void *pnv_dt_create (MachineState *machine)
@@ -438,7 +435,6 @@ static void *pnv_dt_create(MachineState *machine)char *buf;int off;int i; -int lpc_offset; fdt =g_malloc0 (FDT_MAX_SIZE );_FDT ((fdt_create_empty_tree (fdt,FDT_MAX_SIZE )));
@@ -480,8 +476,7 @@ static void *pnv_dt_create(MachineState *machine) }/* Populate ISA devices on chip 0 */ - lpc_offset =pnv_chip_lpc_offset (pnv->chips[0 ], fdt); -pnv_dt_isa (pnv->isa_bus, fdt, lpc_offset); +pnv_dt_isa (pnv, fdt);if (pnv->bmc) {pnv_dt_bmc_sensors (pnv->bmc, fdt);
Signature · 1 line
2.17.1
[Qemu-devel] [PULL 07/25] target/ppc: Allow cpu compatiblity checks based on type, not instance
In reply to David Gibsonppc_check_compat() is used in a number of places to check if a cpu object supports a certain compatiblity mode, subject to various constraints.
It takes a PowerPCCPU *, however it really only depends on the cpu's class. We have upcoming cases where it would be useful to make compatibility checks before we fully instantiate the cpu objects.
ppc_type_check_compat() will now make an equivalent check, but based on a CPU's QOM typename instead of an instantiated CPU object.
We make use of the new interface in several places in spapr, where we're essentially making a global check, rather than one specific to a particular cpu. This avoids some ugly uses of first_cpu to grab a "representative" instance.
--- hw/ppc/spapr.c | 10 ++++------ hw/ppc/spapr_caps.c | 19 +++++++++---------- target/ppc/compat.c | 27 +++++++++++++++++++++------ target/ppc/cpu.h | 4 ++++ 4 files changed, 38 insertions(+), 22 deletions(-)
hw/ppc/spapr.c +4 -6
@@ -1616,8 +1616,8 @@ static void spapr_machine_reset(void) first_ppc_cpu =POWERPC_CPU (first_cpu);if (kvm_enabled () &&kvmppc_has_cap_mmu_radix () && -ppc_check_compat (first_ppc_cpu,CPU_POWERPC_LOGICAL_3_00 ,0 , - spapr->max_compat_pvr)) { +ppc_type_check_compat (machine->cpu_type,CPU_POWERPC_LOGICAL_3_00 ,0 , + spapr->max_compat_pvr)) {/* If using KVM with radix mode available, VCPUs can be started * without a HPT because KVM will start them in radix mode. * Set the GR bit in PATB so that we know there is no HPT. */
@@ -2520,7 +2520,6 @@ static void spapr_machine_init(MachineState *machine)long load_limit, fw_size;char *filename;Error *resize_hpt_err =NULL ; -PowerPCCPU *first_ppc_cpu; msi_nonbroken = true;
@@ -2618,10 +2617,9 @@ static void spapr_machine_init(MachineState *machine)/* init CPUs */ spapr_init_cpus (spapr); - first_ppc_cpu =POWERPC_CPU (first_cpu);if ((!kvm_enabled () ||kvmppc_has_cap_mmu_radix ()) && -ppc_check_compat (first_ppc_cpu,CPU_POWERPC_LOGICAL_3_00 ,0 , - spapr->max_compat_pvr)) { +ppc_type_check_compat (machine->cpu_type,CPU_POWERPC_LOGICAL_3_00 ,0 , + spapr->max_compat_pvr)) {/* KVM and TCG always allow GTSE with radix... */ spapr_ovec_set (spapr->ov5,OV5_MMU_RADIX_GTSE ); }
hw/ppc/spapr_caps.c +9 -10
@@ -327,27 +327,26 @@ sPAPRCapabilityInfo capability_table[SPAPR_CAP_NUM] = { };static sPAPRCapabilities default_caps_with_cpu (sPAPRMachineState *spapr, -CPUState *cs) +const char *cputype) {sPAPRMachineClass *smc =SPAPR_MACHINE_GET_CLASS (spapr); -PowerPCCPU *cpu =POWERPC_CPU (cs);sPAPRCapabilities caps; caps = smc->default_caps; -if (!ppc_check_compat (cpu,CPU_POWERPC_LOGICAL_2_07 , -0 , spapr->max_compat_pvr)) { +if (!ppc_type_check_compat (cputype,CPU_POWERPC_LOGICAL_2_07 , +0 , spapr->max_compat_pvr)) { caps.caps[SPAPR_CAP_HTM ] =SPAPR_CAP_OFF ; caps.caps[SPAPR_CAP_CFPC ] =SPAPR_CAP_BROKEN ; } -if (!ppc_check_compat (cpu,CPU_POWERPC_LOGICAL_2_06_PLUS , -0 , spapr->max_compat_pvr)) { +if (!ppc_type_check_compat (cputype,CPU_POWERPC_LOGICAL_2_06_PLUS , +0 , spapr->max_compat_pvr)) { caps.caps[SPAPR_CAP_SBBC ] =SPAPR_CAP_BROKEN ; } -if (!ppc_check_compat (cpu,CPU_POWERPC_LOGICAL_2_06 , -0 , spapr->max_compat_pvr)) { +if (!ppc_type_check_compat (cputype,CPU_POWERPC_LOGICAL_2_06 , +0 , spapr->max_compat_pvr)) { caps.caps[SPAPR_CAP_VSX ] =SPAPR_CAP_OFF ; caps.caps[SPAPR_CAP_DFP ] =SPAPR_CAP_OFF ; caps.caps[SPAPR_CAP_IBS ] =SPAPR_CAP_BROKEN ;
@@ -384,7 +383,7 @@ int spapr_caps_post_migration(sPAPRMachineState *spapr)sPAPRCapabilities dstcaps = spapr->eff;sPAPRCapabilities srccaps; - srccaps =default_caps_with_cpu (spapr, first_cpu); + srccaps =default_caps_with_cpu (spapr,MACHINE (spapr)->cpu_type);for (i =0 ; i <SPAPR_CAP_NUM ; i++) {/* If not default value then assume came in with the migration */ if (spapr->mig.caps[i] != spapr->def.caps[i]) {
@@ -446,7 +445,7 @@ void spapr_caps_reset(sPAPRMachineState *spapr)int i;/* First compute the actual set of caps we're running with.. */ - default_caps =default_caps_with_cpu (spapr, first_cpu); + default_caps =default_caps_with_cpu (spapr,MACHINE (spapr)->cpu_type);for (i =0 ; i <SPAPR_CAP_NUM ; i++) {/* Store the defaults */
target/ppc/compat.c +21 -6
@@ -105,17 +105,13 @@ static const CompatInfo *compat_by_pvr(uint32_t pvr)return NULL ; } -bool ppc_check_compat (PowerPCCPU *cpu,uint32_t compat_pvr, -uint32_t min_compat_pvr,uint32_t max_compat_pvr) +static bool pcc_compat (PowerPCCPUClass *pcc,uint32_t compat_pvr, +uint32_t min_compat_pvr,uint32_t max_compat_pvr) { -PowerPCCPUClass *pcc =POWERPC_CPU_GET_CLASS (cpu);const CompatInfo *compat =compat_by_pvr (compat_pvr);const CompatInfo *min =compat_by_pvr (min_compat_pvr);const CompatInfo *max =compat_by_pvr (max_compat_pvr); -#if !defined(CONFIG_USER_ONLY ) -g_assert (cpu->vhyp); -#endif g_assert (!min_compat_pvr || min);g_assert (!max_compat_pvr || max);
@@ -134,6 +130,25 @@ bool ppc_check_compat(PowerPCCPU *cpu, uint32_t compat_pvr,return true; } +bool ppc_check_compat (PowerPCCPU *cpu,uint32_t compat_pvr, +uint32_t min_compat_pvr,uint32_t max_compat_pvr) +{ +PowerPCCPUClass *pcc =POWERPC_CPU_GET_CLASS (cpu); + +#if !defined(CONFIG_USER_ONLY ) +g_assert (cpu->vhyp); +#endif + +return pcc_compat (pcc, compat_pvr, min_compat_pvr, max_compat_pvr); +} + +bool ppc_type_check_compat (const char *cputype,uint32_t compat_pvr, +uint32_t min_compat_pvr,uint32_t max_compat_pvr) +{ +PowerPCCPUClass *pcc =POWERPC_CPU_CLASS (object_class_by_name (cputype)); +return pcc_compat (pcc, compat_pvr, min_compat_pvr, max_compat_pvr); +} +void ppc_set_compat (PowerPCCPU *cpu,uint32_t compat_pvr,Error **errp) {const CompatInfo *compat =compat_by_pvr (compat_pvr);
target/ppc/cpu.h +4 -0
@@ -1369,7 +1369,11 @@ static inline int cpu_mmu_index (CPUPPCState *env, bool ifetch)#if defined(TARGET_PPC64 )bool ppc_check_compat (PowerPCCPU *cpu,uint32_t compat_pvr,uint32_t min_compat_pvr,uint32_t max_compat_pvr); +bool ppc_type_check_compat (const char *cputype,uint32_t compat_pvr, +uint32_t min_compat_pvr,uint32_t max_compat_pvr); +void ppc_set_compat (PowerPCCPU *cpu,uint32_t compat_pvr,Error **errp); +#if !defined(CONFIG_USER_ONLY )void ppc_set_compat_all (uint32_t compat_pvr,Error **errp);#endif
Signature · 1 line
2.17.1
[Qemu-devel] [PULL 10/25] target/ppc: Add kvmppc_hpt_needs_host_contiguous_pages() helper
In reply to David GibsonKVM HV has a restriction that for HPT mode guests, guest pages must be hpa contiguous as well as gpa contiguous. We have to account for that in various places. We determine whether we're subject to this restriction from the SMMU information exposed by KVM.
Planned cleanups to the way we handle this will require knowing whether this restriction is in play in wider parts of the code. So, expose a helper function which returns it.
This does mean some redundant calls to kvm_get_smmu_info(), but they'll go away again with future cleanups.
--- target/ppc/kvm.c | 17 +++++++++++++++-- target/ppc/kvm_ppc.h | 6 ++++++ 2 files changed, 21 insertions(+), 2 deletions(-)
target/ppc/kvm.c +15 -2
@@ -406,9 +406,22 @@ target_ulong kvmppc_configure_v3_mmu(PowerPCCPU *cpu, } } +bool kvmppc_hpt_needs_host_contiguous_pages (void ) +{ +PowerPCCPU *cpu =POWERPC_CPU (first_cpu); +static struct kvm_ppc_smmu_info smmu_info; + +if (!kvm_enabled ()) { +return false; + } + +kvm_get_smmu_info (cpu, &smmu_info); +return !!(smmu_info.flags &KVM_PPC_PAGE_SIZES_REAL ); +} +static bool kvm_valid_page_size (uint32_t flags,long rampgsize,uint32_t shift) { -if (!(flags &KVM_PPC_PAGE_SIZES_REAL )) { +if (!kvmppc_hpt_needs_host_contiguous_pages ()) {return true; }
@@ -445,7 +458,7 @@ static void kvm_fixup_page_sizes(PowerPCCPU *cpu)/* If we have HV KVM, we need to forbid CI large pages if our * host page size is smaller than 64K. */ -if (smmu_info.flags &KVM_PPC_PAGE_SIZES_REAL ) { +if (kvmppc_hpt_needs_host_contiguous_pages ()) {if (getpagesize () >=0x10000 ) { cpu->hash64_opts->flags |=PPC_HASH64_CI_LARGEPAGE ; }else {
target/ppc/kvm_ppc.h +6 -0
@@ -70,6 +70,7 @@ int kvmppc_resize_hpt_prepare(PowerPCCPU *cpu, target_ulong flags, int shift);int kvmppc_resize_hpt_commit (PowerPCCPU *cpu,target_ulong flags,int shift);bool kvmppc_pvr_workaround_required (PowerPCCPU *cpu); +bool kvmppc_hpt_needs_host_contiguous_pages (void );bool kvmppc_is_mem_backend_page_size_ok (const char *obj_path);#else
@@ -222,6 +223,11 @@ static inline uint64_t kvmppc_rma_size(uint64_t current_size,return ram_size; } +static inline bool kvmppc_hpt_needs_host_contiguous_pages (void ) +{ +return false; +} +static inline bool kvmppc_is_mem_backend_page_size_ok (const char *obj_path) {return true;
Signature · 1 line
2.17.1
[Qemu-devel] [PULL 14/25] sm501: Fix hardware cursor color conversion
In reply to David GibsonFrom: Sebastian Bauer <[email protected]>
According to the sm501 specs the hardware cursor colors are to be given in the rgb565 format, but the code currently interprets them as bgr565.
Therefore, the colors of the hardware cursors are wrong in the QEMU display, e.g., the standard mouse pointer of AmigaOS appears blue instead of red. This change fixes this issue by replacing the existing naive bgr565 => rgb888 conversion with a standard rgb565 => rgb888 one that also scales the color component values properly.
--- hw/display/sm501.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
hw/display/sm501.c +3 -3
@@ -652,9 +652,9 @@ static inline void get_hwc_palette(SM501State *state, int crt, uint8_t *palette) }else { rgb565 = color_reg &0xFFFF ; } - palette[i *3 +0 ] = (rgb565 <<3 ) &0xf8 ;/* red */ - palette[i *3 +1 ] = (rgb565 >>3 ) &0xfc ;/* green */ - palette[i *3 +2 ] = (rgb565 >>8 ) &0xf8 ;/* blue */ + palette[i *3 +0 ] = ((rgb565 >>11 ) *527 +23 ) >>6 ;/* r */ + palette[i *3 +1 ] = (((rgb565 >>5 ) &0x3f ) *259 +33 ) >>6 ;/* g */ + palette[i *3 +2 ] = ((rgb565 &0x1f ) *527 +23 ) >>6 ;/* b */ } }
Signature · 1 line
2.17.1
[Qemu-devel] [PULL 02/25] ppc/pnv: introduce a new isa_create() operation to the chip model
In reply to David GibsonFrom: Cédric Le Goater <[email protected]>
This moves the details of the ISA bus creation under the LPC model but more important, the new PnvChip operation will let us choose the chip class to use when we introduce the different chip classes for Power9 and Power8. It hides away the processor chip controllers from the machine.
--- hw/ppc/pnv.c | 34 +++++++++++++++++++--------------- hw/ppc/pnv_lpc.c | 30 +++++++++++++++++++++++++----- include/hw/ppc/pnv.h | 1 + include/hw/ppc/pnv_lpc.h | 3 +-- 4 files changed, 46 insertions(+), 22 deletions(-)
hw/ppc/pnv.c +19 -15
@@ -529,24 +529,24 @@ static void pnv_reset(void)cpu_physical_memory_write (PNV_FDT_ADDR , fdt,fdt_totalsize (fdt)); } -static ISABus *pnv_isa_create (PnvChip *chip) +static ISABus *pnv_chip_power8_isa_create (PnvChip *chip,Error **errp) { -PnvLpcController *lpc = &chip->lpc; -ISABus *isa_bus; -qemu_irq *irqs; -PnvChipClass *pcc =PNV_CHIP_GET_CLASS (chip); +return pnv_lpc_isa_create (&chip->lpc, true, errp); +} -/* let isa_bus_new() create its own bridge on SysBus otherwise -* devices speficied on the command line won't find the bus and -* will fail to create. -*/ - isa_bus =isa_bus_new (NULL , &lpc->isa_mem, &lpc->isa_io, - &error_fatal); +static ISABus *pnv_chip_power8nvl_isa_create (PnvChip *chip,Error **errp) +{ +return pnv_lpc_isa_create (&chip->lpc, false, errp); +} - irqs =pnv_lpc_isa_irq_create (lpc, pcc->chip_type,ISA_NUM_IRQS ); +static ISABus *pnv_chip_power9_isa_create (PnvChip *chip,Error **errp) +{ +return NULL ; +} -isa_bus_irqs (isa_bus, irqs); -return isa_bus; +static ISABus *pnv_isa_create (PnvChip *chip,Error **errp) +{ +return PNV_CHIP_GET_CLASS (chip)->isa_create (chip, errp); }static void pnv_init (MachineState *machine)
@@ -646,7 +646,7 @@ static void pnv_init(MachineState *machine)g_free (chip_typename);/* Instantiate ISA bus on chip 0 */ - pnv->isa_bus =pnv_isa_create (pnv->chips[0 ]); + pnv->isa_bus =pnv_isa_create (pnv->chips[0 ], &error_fatal);/* Create serial port */ serial_hds_isa_init (pnv->isa_bus,0 ,MAX_ISA_SERIAL_PORTS );
@@ -735,6 +735,7 @@ static void pnv_chip_power8e_class_init(ObjectClass *klass, void *data) k->cores_mask =POWER8E_CORE_MASK ; k->core_pir = pnv_chip_core_pir_p8; k->intc_create = pnv_chip_power8_intc_create; + k->isa_create = pnv_chip_power8_isa_create; k->xscom_base =0x003fc0000000000ull ; dc->desc ="PowerNV Chip POWER8E" ; }
@@ -749,6 +750,7 @@ static void pnv_chip_power8_class_init(ObjectClass *klass, void *data) k->cores_mask =POWER8_CORE_MASK ; k->core_pir = pnv_chip_core_pir_p8; k->intc_create = pnv_chip_power8_intc_create; + k->isa_create = pnv_chip_power8_isa_create; k->xscom_base =0x003fc0000000000ull ; dc->desc ="PowerNV Chip POWER8" ; }
@@ -763,6 +765,7 @@ static void pnv_chip_power8nvl_class_init(ObjectClass *klass, void *data) k->cores_mask =POWER8_CORE_MASK ; k->core_pir = pnv_chip_core_pir_p8; k->intc_create = pnv_chip_power8_intc_create; + k->isa_create = pnv_chip_power8nvl_isa_create; k->xscom_base =0x003fc0000000000ull ; dc->desc ="PowerNV Chip POWER8NVL" ; }
@@ -777,6 +780,7 @@ static void pnv_chip_power9_class_init(ObjectClass *klass, void *data) k->cores_mask =POWER9_CORE_MASK ; k->core_pir = pnv_chip_core_pir_p9; k->intc_create = pnv_chip_power9_intc_create; + k->isa_create = pnv_chip_power9_isa_create; k->xscom_base =0x00603fc00000000ull ; dc->desc ="PowerNV Chip POWER9" ; }
hw/ppc/pnv_lpc.c +25 -5
@@ -22,6 +22,7 @@#include "target/ppc/cpu.h" #include "qapi/error.h" #include "qemu/log.h" +#include "hw/isa/isa.h" #include "hw/ppc/pnv.h" #include "hw/ppc/pnv_lpc.h"
@@ -535,16 +536,35 @@ static void pnv_lpc_isa_irq_handler(void *opaque, int n, int level) } } -qemu_irq *pnv_lpc_isa_irq_create (PnvLpcController *lpc,int chip_type, -int nirqs) +ISABus *pnv_lpc_isa_create (PnvLpcController *lpc,bool use_cpld,Error **errp) { +Error *local_err =NULL ; +ISABus *isa_bus; +qemu_irq *irqs; +qemu_irq_handler handler; + +/* let isa_bus_new() create its own bridge on SysBus otherwise +* devices speficied on the command line won't find the bus and +* will fail to create. +*/ + isa_bus =isa_bus_new (NULL , &lpc->isa_mem, &lpc->isa_io, &local_err); +if (local_err) { +error_propagate (errp, local_err); +return NULL ; + } +/* Not all variants have a working serial irq decoder. If not, * handling of LPC interrupts becomes a platform issue (some * platforms have a CPLD to do it). */ -if (chip_type ==PNV_CHIP_POWER8NVL ) { -return qemu_allocate_irqs (pnv_lpc_isa_irq_handler, lpc, nirqs); +if (use_cpld) { + handler = pnv_lpc_isa_irq_handler_cpld; }else { -return qemu_allocate_irqs (pnv_lpc_isa_irq_handler_cpld, lpc, nirqs); + handler = pnv_lpc_isa_irq_handler; } + + irqs =qemu_allocate_irqs (handler, lpc,ISA_NUM_IRQS ); + +isa_bus_irqs (isa_bus, irqs); +return isa_bus; }
include/hw/ppc/pnv.h +1 -0
@@ -77,6 +77,7 @@ typedef struct PnvChipClass {uint32_t (*core_pir)(PnvChip *chip,uint32_t core_id); Object *(*intc_create)(PnvChip *chip, Object *child, Error **errp); + ISABus *(*isa_create)(PnvChip *chip, Error **errp); } PnvChipClass;#define PNV_CHIP_TYPE_SUFFIX "-" TYPE_PNV_CHIP
include/hw/ppc/pnv_lpc.h +1 -2
@@ -70,7 +70,6 @@ typedef struct PnvLpcController { PnvPsi *psi; } PnvLpcController; -qemu_irq *pnv_lpc_isa_irq_create (PnvLpcController *lpc,int chip_type, -int nirqs); +ISABus *pnv_lpc_isa_create (PnvLpcController *lpc,bool use_cpld,Error **errp);#endif /* _PPC_PNV_LPC_H */
Signature · 1 line
2.17.1
[Qemu-devel] [PULL 03/25] spapr_cpu_core: migrate per-CPU data
In reply to David GibsonFrom: Greg Kurz <[email protected]>
A per-CPU machine data pointer was recently added to PowerPCCPU. The motivation is to to hide platform specific details from the core CPU code. This per-CPU data can hold state which is relevant to the guest though, eg, Virtual Processor Areas, and we should migrate this state.
This patch adds the plumbing so that we can migrate the per-CPU data for PAPR guests. We only do this for newer machine types for the sake of backward compatibility. No state is migrated for the moment: the vmstate_spapr_cpu_state structure will be populated by subsequent patches.
--- hw/ppc/spapr.c | 7 ++++++- hw/ppc/spapr_cpu_core.c | 22 ++++++++++++++++++++-- include/hw/ppc/spapr_cpu_core.h | 1 + 3 files changed, 27 insertions(+), 3 deletions(-)
hw/ppc/spapr.c +6 -1
@@ -4115,7 +4115,12 @@ DEFINE_SPAPR_MACHINE(3_0, "3.0", true);HW_COMPAT_2_12 \ { \ .driver = TYPE_POWERPC_CPU, \ - .property = "pre-3.0-migration", \ + .property = "pre-3.0-migration", \ + .value = "on", \ + }, \ + { \ + .driver = TYPE_SPAPR_CPU_CORE, \ + .property = "pre-3.0-migration", \ .value = "on", \ },
hw/ppc/spapr_cpu_core.c +20 -2
@@ -129,6 +129,15 @@ static void spapr_cpu_core_unrealize(DeviceState *dev, Error **errp)g_free (sc->threads); } +static const VMStateDescription vmstate_spapr_cpu_state = { + .name ="spapr_cpu" , + .version_id =1 , + .minimum_version_id =1 , + .fields = (VMStateField []) { +VMSTATE_END_OF_LIST () + }, +}; +static void spapr_realize_vcpu (PowerPCCPU *cpu,sPAPRMachineState *spapr,Error **errp) {
@@ -194,6 +203,10 @@ static PowerPCCPU *spapr_create_vcpu(sPAPRCPUCore *sc, int i, Error **errp) } cpu->machine_data =g_new0 (sPAPRCPUState,1 ); +if (!sc->pre_3_0_migration) { +vmstate_register (NULL , cs->cpu_index, &vmstate_spapr_cpu_state, + cpu->machine_data); + }object_unref (obj);return cpu;
@@ -204,10 +217,13 @@ err:return NULL ; } -static void spapr_delete_vcpu (PowerPCCPU *cpu) +static void spapr_delete_vcpu (PowerPCCPU *cpu,sPAPRCPUCore *sc) {sPAPRCPUState *spapr_cpu =spapr_cpu_state (cpu); +if (!sc->pre_3_0_migration) { +vmstate_unregister (NULL , &vmstate_spapr_cpu_state, cpu->machine_data); + } cpu->machine_data =NULL ;g_free (spapr_cpu);object_unparent (OBJECT (cpu));
@@ -253,7 +269,7 @@ err_unrealize: } err:while (--i >=0 ) { -spapr_delete_vcpu (sc->threads[i]); +spapr_delete_vcpu (sc->threads[i], sc); }g_free (sc->threads);error_propagate (errp, local_err);
@@ -261,6 +277,8 @@ err:static Property spapr_cpu_core_properties[] = {DEFINE_PROP_INT32 ("node-id" , sPAPRCPUCore, node_id,CPU_UNSET_NUMA_NODE_ID ), +DEFINE_PROP_BOOL ("pre-3.0-migration" , sPAPRCPUCore, pre_3_0_migration, + false),DEFINE_PROP_END_OF_LIST () };
include/hw/ppc/spapr_cpu_core.h +1 -0
@@ -31,6 +31,7 @@ typedef struct sPAPRCPUCore {/*< public >*/ PowerPCCPU **threads;int node_id; +bool pre_3_0_migration;/* older machine don't know about sPAPRCPUState */ } sPAPRCPUCore; typedef struct sPAPRCPUCoreClass {
Signature · 1 line
2.17.1
[Qemu-devel] [PULL 13/25] fpu_helper.c: fix helper_fpscr_clrbit() function
In reply to David GibsonFrom: John Arbuckle <[email protected]>
Fix the helper_fpscr_clrbit() function so it correctly sets the FEX and VX bits.
Determining the value for the Floating Point Status and Control Register's (FPSCR) FEX bit is suppose to be done like this:
FEX = (VX & VE) | (OX & OE) | (UX & UE) | (ZX & ZE) | (XX & XE))
It is described as "the logical OR of all the floating-point exception bits masked by their respective enable bits". It was not implemented correctly. The value of FEX would stay on even when all other bits were set to off.
The VX bit is described as "the logical OR of all of the invalid operation exceptions". This bit was also not implemented correctly. It too would stay on when all the other bits were set to off.
My main source of information is an IBM document called:
PowerPC Microprocessor Family:
The Programming Environments for 32-Bit Microprocessors
Page 62 is where the FPSCR information is located.
This is an older copy than the one I use but it is still very useful:
https://www.pdfdrive.net/powerpc-microprocessor-family-the-programming-environments-for-32-e3087633.html
I use a G3 and G5 iMac to compare bit values with QEMU. This patch fixed all the problems I was having with these bits.
--- target/ppc/fpu_helper.c | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+)
target/ppc/fpu_helper.c +28 -0
@@ -325,6 +325,34 @@ void helper_fpscr_clrbit(CPUPPCState *env, uint32_t bit)case FPSCR_RN :fpscr_set_rounding_mode (env);break ; +case FPSCR_VXSNAN : +case FPSCR_VXISI : +case FPSCR_VXIDI : +case FPSCR_VXZDZ : +case FPSCR_VXIMZ : +case FPSCR_VXVC : +case FPSCR_VXSOFT : +case FPSCR_VXSQRT : +case FPSCR_VXCVI : +if (!fpscr_ix) { +/* Set VX bit to zero */ + env->fpscr &= ~(1 <<FPSCR_VX ); + } +break ; +case FPSCR_OX : +case FPSCR_UX : +case FPSCR_ZX : +case FPSCR_XX : +case FPSCR_VE : +case FPSCR_OE : +case FPSCR_UE : +case FPSCR_ZE : +case FPSCR_XE : +if (!fpscr_eex) { +/* Set the FEX bit */ + env->fpscr &= ~(1 <<FPSCR_FEX ); + } +break ;default :break ; }
Signature · 1 line
2.17.1
[Qemu-devel] [PULL 15/25] ppc4xx_i2c: Remove unimplemented sdata and intr registers
In reply to David GibsonFrom: BALATON Zoltan <[email protected]>
We don't emulate slave mode so related registers are not needed. [lh]sadr are only retained to avoid too many warnings and simplify debugging but sdata is not even correct because device has a 4 byte FIFO instead so just remove this unimplemented register for now.
The intr register is also not implemented correctly, it is for diagnostics and normally not even visible on device without explicitly enabling it. As no guests are known to need this remove it as well.
--- hw/i2c/ppc4xx_i2c.c | 16 +--------------- include/hw/i2c/ppc4xx_i2c.h | 4 +--- 2 files changed, 2 insertions(+), 18 deletions(-)
hw/i2c/ppc4xx_i2c.c +1 -15
@@ -3,7 +3,7 @@* * Copyright (c) 2007 Jocelyn Mayer * Copyright (c) 2012 François Revol -* Copyright (c) 2016 BALATON Zoltan +* Copyright (c) 2016-2018 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
@@ -63,7 +63,6 @@ static void ppc4xx_i2c_reset(DeviceState *s) i2c->mdcntl =0 ; i2c->sts =0 ; i2c->extsts =0x8f ; - i2c->sdata =0 ; i2c->lsadr =0 ; i2c->hsadr =0 ; i2c->clkdiv =0 ;
@@ -71,7 +70,6 @@ static void ppc4xx_i2c_reset(DeviceState *s) i2c->xfrcnt =0 ; i2c->xtcntlss =0 ; i2c->directcntl =0xf ; - i2c->intr =0 ; }static inline bool ppc4xx_i2c_is_master (PPC4xxI2CState *i2c)
@@ -139,9 +137,6 @@ static uint64_t ppc4xx_i2c_readb(void *opaque, hwaddr addr, unsigned int size) TYPE_PPC4xx_I2C, __func__); }break ; -case 2 : - ret = i2c->sdata; -break ;case 4 : ret = i2c->lmadr;break ;
@@ -181,9 +176,6 @@ static uint64_t ppc4xx_i2c_readb(void *opaque, hwaddr addr, unsigned int size)case 16 : ret = i2c->directcntl;break ; -case 17 : - ret = i2c->intr; -break ;default :if (addr < PPC4xx_I2C_MEM_SIZE) { qemu_log_mask(LOG_UNIMP, "%s: Unimplemented register 0x%"
@@ -229,9 +221,6 @@ static void ppc4xx_i2c_writeb(void *opaque, hwaddr addr, uint64_t value, } }break ; -case 2 : - i2c->sdata = value; -break ;case 4 : i2c->lmadr = value;if (i2c_bus_busy (i2c->bus)) {
@@ -302,9 +291,6 @@ static void ppc4xx_i2c_writeb(void *opaque, hwaddr addr, uint64_t value,case 16 : i2c->directcntl = value &0x7 ;break ; -case 17 : - i2c->intr = value; -break ;default :if (addr < PPC4xx_I2C_MEM_SIZE) { qemu_log_mask(LOG_UNIMP, "%s: Unimplemented register 0x%"
include/hw/i2c/ppc4xx_i2c.h +1 -3
@@ -3,7 +3,7 @@* * Copyright (c) 2007 Jocelyn Mayer * Copyright (c) 2012 François Revol -* Copyright (c) 2016 BALATON Zoltan +* Copyright (c) 2016-2018 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
@@ -49,7 +49,6 @@ typedef struct PPC4xxI2CState {uint8_t mdcntl;uint8_t sts;uint8_t extsts; -uint8_t sdata;uint8_t lsadr;uint8_t hsadr;uint8_t clkdiv;
@@ -57,7 +56,6 @@ typedef struct PPC4xxI2CState {uint8_t xfrcnt;uint8_t xtcntlss; uint8_t directcntl; - uint8_t intr; } PPC4xxI2CState;#endif /* PPC4XX_I2C_H */
Signature · 1 line
2.17.1
[Qemu-devel] [PULL 16/25] ppc4xx_i2c: Implement directcntl register
In reply to David GibsonFrom: BALATON Zoltan <[email protected]>
As well as being able to generate its own i2c transactions, the ppc4xx i2c controller has a DIRECTCNTL register which allows explicit control of the i2c lines.
Using this register an OS can directly bitbang i2c operations. In order to let emulated i2c devices respond to this, we need to wire up the DIRECTCNTL register to qemu's bitbanged i2c handling code.
--- default-configs/ppc-softmmu.mak | 1 + default-configs/ppcemb-softmmu.mak | 1 + hw/i2c/ppc4xx_i2c.c | 14 +++++++++++++- include/hw/i2c/ppc4xx_i2c.h | 4 ++++ 4 files changed, 19 insertions(+), 1 deletion(-)
default-configs/ppc-softmmu.mak +1 -0
@@ -26,6 +26,7 @@ CONFIG_USB_EHCI_SYSBUS=y CONFIG_SM501=y CONFIG_IDE_SII3112=y CONFIG_I2C=y +CONFIG_BITBANG_I2C=y # For Macs CONFIG_MAC=y
default-configs/ppcemb-softmmu.mak +1 -0
@@ -19,3 +19,4 @@ CONFIG_USB_EHCI_SYSBUS=y CONFIG_SM501=y CONFIG_IDE_SII3112=y CONFIG_I2C=y +CONFIG_BITBANG_I2C=y
hw/i2c/ppc4xx_i2c.c +13 -1
@@ -30,6 +30,7 @@#include "cpu.h" #include "hw/hw.h" #include "hw/i2c/ppc4xx_i2c.h" +#include "bitbang_i2c.h" #define PPC4xx_I2C_MEM_SIZE 18
@@ -46,6 +47,11 @@#define IIC_XTCNTLSS_SRST (1 << 0) +#define IIC_DIRECTCNTL_SDAC (1 << 3) +#define IIC_DIRECTCNTL_SCLC (1 << 2) +#define IIC_DIRECTCNTL_MSDA (1 << 1) +#define IIC_DIRECTCNTL_MSCL (1 << 0) +static void ppc4xx_i2c_reset (DeviceState *s) {PPC4xxI2CState *i2c =PPC4xx_I2C (s);
@@ -289,7 +295,12 @@ static void ppc4xx_i2c_writeb(void *opaque, hwaddr addr, uint64_t value, i2c->xtcntlss = value;break ;case 16 : - i2c->directcntl = value &0x7 ; + i2c->directcntl = value & (IIC_DIRECTCNTL_SDAC &IIC_DIRECTCNTL_SCLC ); + i2c->directcntl |= (value &IIC_DIRECTCNTL_SCLC ?1 :0 ); +bitbang_i2c_set (i2c->bitbang,BITBANG_I2C_SCL , + i2c->directcntl &IIC_DIRECTCNTL_MSCL ); + i2c->directcntl |=bitbang_i2c_set (i2c->bitbang,BITBANG_I2C_SDA , + (value &IIC_DIRECTCNTL_SDAC ) !=0 ) <<1 ;break ;default :if (addr < PPC4xx_I2C_MEM_SIZE) {
@@ -322,6 +333,7 @@ static void ppc4xx_i2c_init(Object *o)sysbus_init_mmio (SYS_BUS_DEVICE (s), &s->iomem);sysbus_init_irq (SYS_BUS_DEVICE (s), &s->irq); s->bus =i2c_init_bus (DEVICE (s),"i2c" ); + s->bitbang =bitbang_i2c_init (s->bus); }static void ppc4xx_i2c_class_init (ObjectClass *klass,void *data)
include/hw/i2c/ppc4xx_i2c.h +4 -0
@@ -31,6 +31,9 @@#include "hw/sysbus.h" #include "hw/i2c/i2c.h" +/* from hw/i2c/bitbang_i2c.h */ +typedef struct bitbang_i2c_interface bitbang_i2c_interface ; +#define TYPE_PPC4xx_I2C "ppc4xx-i2c"#define PPC4xx_I2C (obj) OBJECT_CHECK(PPC4xxI2CState, (obj), TYPE_PPC4xx_I2C)
@@ -42,6 +45,7 @@ typedef struct PPC4xxI2CState {I2CBus *bus;qemu_irq irq;MemoryRegion iomem; +bitbang_i2c_interface *bitbang;uint8_t mdata;uint8_t lmadr;uint8_t hmadr;
Signature · 1 line
2.17.1
[Qemu-devel] [PULL 17/25] target/ppc: Add missing opcode for icbt on PPC440
In reply to David GibsonFrom: BALATON Zoltan <[email protected]>
According to PPC440 User Manual PPC440 has multiple opcodes for icbt
instruction: one for compatibility with older cores and two 440 specific opcodes one of which is defined in BookE. QEMU only implements two of these, add the missing one.
--- target/ppc/translate.c | 2 ++ 1 file changed, 2 insertions(+)
target/ppc/translate.c +2 -0
@@ -6707,6 +6707,8 @@ GEN_HANDLER_E(mbar, 0x1F, 0x16, 0x1a, 0x001FF801,GEN_HANDLER (msync_4xx,0x1F ,0x16 ,0x12 ,0x03FFF801 ,PPC_BOOKE ),GEN_HANDLER2_E (icbt_440,"icbt" ,0x1F ,0x16 ,0x00 ,0x03E00001 ,PPC_BOOKE ,PPC2_BOOKE206 ), +GEN_HANDLER2 (icbt_440,"icbt" ,0x1F ,0x06 ,0x08 ,0x03E00001 , +PPC_440_SPEC ),GEN_HANDLER (lvsl,0x1f ,0x06 ,0x00 ,0x00000001 ,PPC_ALTIVEC ),GEN_HANDLER (lvsr,0x1f ,0x06 ,0x01 ,0x00000001 ,PPC_ALTIVEC ), GEN_HANDLER(mfvscr, 0x04, 0x2, 0x18, 0x001ff800, PPC_ALTIVEC),
Signature · 1 line
2.17.1
[Qemu-devel] [PULL 12/25] spapr: remove unused spapr_irq routines
In reply to David GibsonFrom: Cédric Le Goater <[email protected]>
spapr_irq_alloc_block and spapr_irq_alloc() are now deprecated.
--- hw/ppc/spapr.c | 80 +----------------------------------------- include/hw/ppc/spapr.h | 4 --- 2 files changed, 1 insertion(+), 83 deletions(-)
hw/ppc/spapr.c +1 -79
@@ -3846,84 +3846,6 @@ int spapr_irq_find(sPAPRMachineState *spapr, int num, bool align, Error **errp)return first + ics->offset; } -/* -* Allocate the IRQ number and set the IRQ type, LSI or MSI -*/ -static void spapr_irq_set_lsi (sPAPRMachineState *spapr,int irq,bool lsi) -{ -ics_set_irq_type (spapr->ics, irq - spapr->ics->offset, lsi); -} - -int spapr_irq_alloc (sPAPRMachineState *spapr,int irq_hint,bool lsi, -Error **errp) -{ -ICSState *ics = spapr->ics; -int irq; - -assert (ics); - -if (irq_hint) { -if (!ICS_IRQ_FREE (ics, irq_hint - ics->offset)) { -error_setg (errp,"can't allocate IRQ %d: already in use" , irq_hint); -return -1 ; - } - irq = irq_hint; - }else { - irq =ics_find_free_block (ics,1 ,1 ); -if (irq <0 ) { -error_setg (errp,"can't allocate IRQ: no IRQ left" ); -return -1 ; - } - irq += ics->offset; - } - -spapr_irq_set_lsi (spapr, irq, lsi); -trace_spapr_irq_alloc (irq); - -return irq; -} - -/* -* Allocate block of consecutive IRQs, and return the number of the first IRQ in -* the block. If align==true, aligns the first IRQ number to num. -*/ -int spapr_irq_alloc_block (sPAPRMachineState *spapr,int num,bool lsi, -bool align,Error **errp) -{ -ICSState *ics = spapr->ics; -int i, first =-1 ; - -assert (ics); - -/* -* MSIMesage::data is used for storing VIRQ so -* it has to be aligned to num to support multiple -* MSI vectors. MSI-X is not affected by this. -* The hint is used for the first IRQ, the rest should -* be allocated continuously. -*/ -if (align) { -assert ((num ==1 ) || (num ==2 ) || (num ==4 ) || - (num ==8 ) || (num ==16 ) || (num ==32 )); - first =ics_find_free_block (ics, num, num); - }else { - first =ics_find_free_block (ics, num,1 ); - } -if (first <0 ) { -error_setg (errp,"can't find a free %d-IRQ block" , num); -return -1 ; - } - - first += ics->offset; -for (i = first; i < first + num; ++i) { -spapr_irq_set_lsi (spapr, i, lsi); - } - -trace_spapr_irq_alloc_block (first, num, lsi, align); - -return first; -} -int spapr_irq_claim (sPAPRMachineState *spapr,int irq,bool lsi,Error **errp) {ICSState *ics = spapr->ics;
@@ -3940,7 +3862,7 @@ int spapr_irq_claim(sPAPRMachineState *spapr, int irq, bool lsi, Error **errp)return -1 ; } -spapr_irq_set_lsi (spapr, irq, lsi); +ics_set_irq_type (ics, irq - ics->offset, lsi);return 0 ; }
include/hw/ppc/spapr.h +0 -4
@@ -772,10 +772,6 @@ int spapr_get_vcpu_id(PowerPCCPU *cpu);void spapr_set_vcpu_id (PowerPCCPU *cpu,int cpu_index,Error **errp);PowerPCCPU *spapr_find_cpu (int vcpu_id); -int spapr_irq_alloc (sPAPRMachineState *spapr,int irq_hint,bool lsi, -Error **errp); -int spapr_irq_alloc_block (sPAPRMachineState *spapr,int num,bool lsi, -bool align,Error **errp);int spapr_irq_find (sPAPRMachineState *spapr,int num,bool align,Error **errp);#define spapr_irq_findone (spapr, errp) spapr_irq_find(spapr, 1, false, errp)
Signature · 1 line
2.17.1
[Qemu-devel] [PULL 20/25] spapr: Use maximum page size capability to simplify memory backend checking
In reply to David GibsonThe way we used to handle KVM allowable guest pagesizes for PAPR guests required some convoluted checking of memory attached to the guest.
The allowable pagesizes advertised to the guest cpus depended on the memory which was attached at boot, but then we needed to ensure that any memory later hotplugged didn't change which pagesizes were allowed.
Now that we have an explicit machine option to control the allowable maximum pagesize we can simplify this. We just check all memory backends against that declared pagesize. We check base and cold-plugged memory at reset time, and hotplugged memory at pre_plug() time.
--- hw/ppc/spapr.c | 17 +++++++---------- hw/ppc/spapr_caps.c | 21 +++++++++++++++++++++ include/hw/ppc/spapr.h | 3 +++ target/ppc/kvm.c | 14 -------------- target/ppc/kvm_ppc.h | 6 ------ 5 files changed, 31 insertions(+), 30 deletions(-)
hw/ppc/spapr.c +7 -10
@@ -3192,11 +3192,13 @@ static void spapr_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev, Error **errp) {const sPAPRMachineClass *smc =SPAPR_MACHINE_GET_CLASS (hotplug_dev); +sPAPRMachineState *spapr =SPAPR_MACHINE (hotplug_dev);PCDIMMDevice *dimm =PC_DIMM (dev);PCDIMMDeviceClass *ddc =PC_DIMM_GET_CLASS (dimm);MemoryRegion *mr;uint64_t size; -char *mem_dev; +Object *memdev; +hwaddr pagesize;if (!smc->dr_lmb_enabled) {error_setg (errp,"Memory hotplug not supported for this machine" );
@@ -3215,15 +3217,10 @@ static void spapr_memory_pre_plug(HotplugHandler *hotplug_dev, DeviceState *dev,return ; } - mem_dev =object_property_get_str (OBJECT (dimm),PC_DIMM_MEMDEV_PROP ,NULL ); -if (mem_dev && !kvmppc_is_mem_backend_page_size_ok (mem_dev)) { -error_setg (errp,"Memory backend has bad page size. " -"Use 'memory-backend-file' with correct mem-path." ); - goto out; - } - -out: -g_free (mem_dev); + memdev =object_property_get_link (OBJECT (dimm),PC_DIMM_MEMDEV_PROP , + &error_abort); + pagesize =host_memory_backend_pagesize (MEMORY_BACKEND (memdev)); +spapr_check_pagesize (spapr, pagesize, errp); }struct sPAPRDIMMState {
hw/ppc/spapr_caps.c +21 -0
@@ -26,6 +26,7 @@#include "qapi/error.h" #include "qapi/visitor.h" #include "sysemu/hw_accel.h" +#include "exec/ram_addr.h" #include "target/ppc/cpu.h" #include "target/ppc/mmu-hash64.h" #include "cpu-models.h"
@@ -304,14 +305,34 @@ static void cap_safe_indirect_branch_apply(sPAPRMachineState *spapr,#define VALUE_DESC_TRISTATE " (broken, workaround, fixed)" +void spapr_check_pagesize (sPAPRMachineState *spapr,hwaddr pagesize, +Error **errp) +{ +hwaddr maxpagesize = (1ULL << spapr->eff.caps[SPAPR_CAP_HPT_MAXPAGESIZE ]); + +if (!kvmppc_hpt_needs_host_contiguous_pages ()) { +return ; + } + +if (maxpagesize > pagesize) { +error_setg (errp, +"Can't support %" HWADDR_PRIu" kiB guest pages with %" + HWADDR_PRIu" kiB host pages with this KVM implementation" , + maxpagesize >>10 , pagesize >>10 ); + } +} +static void cap_hpt_maxpagesize_apply (sPAPRMachineState *spapr,uint8_t val,Error **errp) {if (val <12 ) {error_setg (errp,"Require at least 4kiB hpt-max-page-size" ); +return ; }else if (val <16 ) {warn_report ("Many guests require at least 64kiB hpt-max-page-size" ); } + +spapr_check_pagesize (spapr,qemu_getrampagesize (), errp); }sPAPRCapabilityInfo capability_table[SPAPR_CAP_NUM ] = {
include/hw/ppc/spapr.h +3 -0
@@ -806,4 +806,7 @@ void spapr_caps_cpu_apply(sPAPRMachineState *spapr, PowerPCCPU *cpu);void spapr_caps_add_properties (sPAPRMachineClass *smc,Error **errp);int spapr_caps_post_migration (sPAPRMachineState *spapr); +void spapr_check_pagesize (sPAPRMachineState *spapr,hwaddr pagesize, +Error **errp); +#endif /* HW_SPAPR_H */
target/ppc/kvm.c +0 -14
@@ -500,26 +500,12 @@ static void kvm_fixup_page_sizes(PowerPCCPU *cpu) cpu->hash64_opts->flags &= ~PPC_HASH64_1TSEG; } } - -bool kvmppc_is_mem_backend_page_size_ok (const char *obj_path) -{ -Object *mem_obj =object_resolve_path (obj_path,NULL ); -long pagesize =host_memory_backend_pagesize (MEMORY_BACKEND (mem_obj)); - -return pagesize >= max_cpu_page_size; -} -#else /* defined (TARGET_PPC64) */ static inline void kvm_fixup_page_sizes (PowerPCCPU *cpu) { } -bool kvmppc_is_mem_backend_page_size_ok (const char *obj_path) -{ -return true; -} -#endif /* !defined (TARGET_PPC64) */ unsigned long kvm_arch_vcpu_id (CPUState *cpu)
target/ppc/kvm_ppc.h +0 -6
@@ -71,7 +71,6 @@ int kvmppc_resize_hpt_commit(PowerPCCPU *cpu, target_ulong flags, int shift);bool kvmppc_pvr_workaround_required (PowerPCCPU *cpu);bool kvmppc_hpt_needs_host_contiguous_pages (void ); -bool kvmppc_is_mem_backend_page_size_ok (const char *obj_path);#else
@@ -228,11 +227,6 @@ static inline bool kvmppc_hpt_needs_host_contiguous_pages(void)return false; } -static inline bool kvmppc_is_mem_backend_page_size_ok (const char *obj_path) -{ -return true; -} -static inline bool kvmppc_has_cap_spapr_vfio (void ) {return false;
Signature · 1 line
2.17.1
[Qemu-devel] [PULL 22/25] spapr: Limit available pagesizes to provide a consistent guest environment
In reply to David GibsonKVM HV has some limitations (deriving from the hardware) that mean not all host-cpu supported pagesizes may be usable in the guest. At present this means that KVM guests and TCG guests may see different available page sizes even if they notionally have the same vcpu model. This is confusing and also prevents migration between TCG and KVM.
This patch makes the environment consistent by always allowing the same set of pagesizes. Since we can't remove the KVM limitations, we do this by always applying the same limitations it has, even to TCG guests.
--- hw/ppc/spapr_caps.c | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+)
hw/ppc/spapr_caps.c +34 -0
@@ -335,6 +335,39 @@ static void cap_hpt_maxpagesize_apply(sPAPRMachineState *spapr,spapr_check_pagesize (spapr,qemu_getrampagesize (), errp); } +static bool spapr_pagesize_cb (void *opaque,uint32_t seg_pshift, +uint32_t pshift) +{ +unsigned maxshift = *((unsigned *)opaque); + +assert (pshift >= seg_pshift); + +/* Don't allow the guest to use pages bigger than the configured +* maximum size */ +if (pshift > maxshift) { +return false; + } + +/* For whatever reason, KVM doesn't allow multiple pagesizes +* within a segment, *except* for the case of 16M pages in a 4k or +* 64k segment. Always exclude other cases, so that TCG and KVM +* guests see a consistent environment */ +if ((pshift != seg_pshift) && (pshift !=24 )) { +return false; + } + +return true; +} + +static void cap_hpt_maxpagesize_cpu_apply (sPAPRMachineState *spapr, +PowerPCCPU *cpu, +uint8_t val,Error **errp) +{ +unsigned maxshift = val; + +ppc_hash64_filter_pagesizes (cpu, spapr_pagesize_cb, &maxshift); +} +sPAPRCapabilityInfo capability_table[SPAPR_CAP_NUM ] = { [SPAPR_CAP_HTM ] = { .name ="htm" ,
@@ -402,6 +435,7 @@ sPAPRCapabilityInfo capability_table[SPAPR_CAP_NUM] = { .set = spapr_cap_set_pagesize, .type = "int", .apply = cap_hpt_maxpagesize_apply, + .cpu_apply = cap_hpt_maxpagesize_cpu_apply, }, };
Signature · 1 line
2.17.1
[Qemu-devel] [PULL 25/25] mac_newworld: always enable disable_direct_reg3_writes for ADB machines
In reply to David GibsonFrom: Mark Cave-Ayland <[email protected]>
Commit 84051eb400 "adb: add property to disable direct reg 3 writes" added a workaround for MacOS 9 incorrectly setting the mouse address during boot of PMU machines.
Further testing has shown that since fb6649f172 "adb: fix read reg 3 byte ordering" this can still sometimes happen with the CUDA mac99 machine, so let's enable this workaround for all New World machines using ADB for now.
--- hw/ppc/mac_newworld.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
hw/ppc/mac_newworld.c +2 -2
@@ -407,11 +407,11 @@ static void ppc_core99_init(MachineState *machine) adb_bus =qdev_get_child_bus (dev,"adb.0" ); dev =qdev_create (adb_bus,TYPE_ADB_KEYBOARD ); -qdev_prop_set_bit (dev,"disable-direct-reg3-writes" , has_pmu); +qdev_prop_set_bit (dev,"disable-direct-reg3-writes" , true);qdev_init_nofail (dev); dev =qdev_create (adb_bus,TYPE_ADB_MOUSE ); -qdev_prop_set_bit (dev,"disable-direct-reg3-writes" , has_pmu); +qdev_prop_set_bit (dev,"disable-direct-reg3-writes" , true);qdev_init_nofail (dev); }
Signature · 1 line
2.17.1
[Qemu-devel] [PULL 05/25] ppc/pnv: introduce Pnv8Chip and Pnv9Chip models
In reply to David GibsonFrom: Cédric Le Goater <[email protected]>
It introduces a base PnvChip class from which the specific processor chip classes, Pnv8Chip and Pnv9Chip, inherit. Each of them needs to define an init and a realize routine which will create the controllers of the target processor. For the moment, the base PnvChip class handles the XSCOM bus and the cores.
--- hw/ppc/pnv.c | 281 +++++++++++++++++++++++++++---------------- include/hw/ppc/pnv.h | 24 +++- 2 files changed, 202 insertions(+), 103 deletions(-)
hw/ppc/pnv.c +179 -102
@@ -531,12 +531,14 @@ static void pnv_reset(void)static ISABus *pnv_chip_power8_isa_create (PnvChip *chip,Error **errp) { -return pnv_lpc_isa_create (&chip->lpc, true, errp); +Pnv8Chip *chip8 =PNV8_CHIP (chip); +return pnv_lpc_isa_create (&chip8->lpc, true, errp); }static ISABus *pnv_chip_power8nvl_isa_create (PnvChip *chip,Error **errp) { -return pnv_lpc_isa_create (&chip->lpc, false, errp); +Pnv8Chip *chip8 =PNV8_CHIP (chip); +return pnv_lpc_isa_create (&chip8->lpc, false, errp); }static ISABus *pnv_chip_power9_isa_create (PnvChip *chip,Error **errp)
@@ -725,6 +727,103 @@ static Object *pnv_chip_power9_intc_create(PnvChip *chip, Object *child,*/ #define POWER9_CORE_MASK (0xffffffffffffffull) +static void pnv_chip_power8_instance_init (Object *obj) +{ +Pnv8Chip *chip8 =PNV8_CHIP (obj); + +object_initialize (&chip8->psi,sizeof (chip8->psi),TYPE_PNV_PSI ); +object_property_add_child (obj,"psi" ,OBJECT (&chip8->psi),NULL ); +object_property_add_const_link (OBJECT (&chip8->psi),"xics" , +OBJECT (qdev_get_machine ()), &error_abort); + +object_initialize (&chip8->lpc,sizeof (chip8->lpc),TYPE_PNV_LPC ); +object_property_add_child (obj,"lpc" ,OBJECT (&chip8->lpc),NULL ); +object_property_add_const_link (OBJECT (&chip8->lpc),"psi" , +OBJECT (&chip8->psi), &error_abort); + +object_initialize (&chip8->occ,sizeof (chip8->occ),TYPE_PNV_OCC ); +object_property_add_child (obj,"occ" ,OBJECT (&chip8->occ),NULL ); +object_property_add_const_link (OBJECT (&chip8->occ),"psi" , +OBJECT (&chip8->psi), &error_abort); +} + +static void pnv_chip_icp_realize (Pnv8Chip *chip8,Error **errp) + { +PnvChip *chip =PNV_CHIP (chip8); +PnvChipClass *pcc =PNV_CHIP_GET_CLASS (chip); +const char *typename =pnv_chip_core_typename (chip); +size_t typesize =object_type_get_instance_size (typename); +int i, j; +char *name; +XICSFabric *xi =XICS_FABRIC (qdev_get_machine ()); + + name =g_strdup_printf ("icp-%x" , chip->chip_id); +memory_region_init (&chip8->icp_mmio,OBJECT (chip), name,PNV_ICP_SIZE ); +sysbus_init_mmio (SYS_BUS_DEVICE (chip), &chip8->icp_mmio); +g_free (name); + +sysbus_mmio_map (SYS_BUS_DEVICE (chip),1 ,PNV_ICP_BASE (chip)); + +/* Map the ICP registers for each thread */ +for (i =0 ; i < chip->nr_cores; i++) { +PnvCore *pnv_core =PNV_CORE (chip->cores + i * typesize); +int core_hwid =CPU_CORE (pnv_core)->core_id; + +for (j =0 ; j <CPU_CORE (pnv_core)->nr_threads; j++) { +uint32_t pir = pcc->core_pir (chip, core_hwid) + j; +PnvICPState *icp =PNV_ICP (xics_icp_get (xi, pir)); + +memory_region_add_subregion (&chip8->icp_mmio, pir <<12 , + &icp->mmio); + } + } +} + +static void pnv_chip_power8_realize (DeviceState *dev,Error **errp) +{ +PnvChipClass *pcc =PNV_CHIP_GET_CLASS (dev); +PnvChip *chip =PNV_CHIP (dev); +Pnv8Chip *chip8 =PNV8_CHIP (dev); +Error *local_err =NULL ; + + pcc->parent_realize (dev, &local_err); +if (local_err) { +error_propagate (errp, local_err); +return ; + } + +/* Processor Service Interface (PSI) Host Bridge */ +object_property_set_int (OBJECT (&chip8->psi),PNV_PSIHB_BASE (chip), +"bar" , &error_fatal); +object_property_set_bool (OBJECT (&chip8->psi), true,"realized" , &local_err); +if (local_err) { +error_propagate (errp, local_err); +return ; + } +pnv_xscom_add_subregion (chip,PNV_XSCOM_PSIHB_BASE , &chip8->psi.xscom_regs); + +/* Create LPC controller */ +object_property_set_bool (OBJECT (&chip8->lpc), true,"realized" , + &error_fatal); +pnv_xscom_add_subregion (chip,PNV_XSCOM_LPC_BASE , &chip8->lpc.xscom_regs); + +/* Interrupt Management Area. This is the memory region holding +* all the Interrupt Control Presenter (ICP) registers */ +pnv_chip_icp_realize (chip8, &local_err); +if (local_err) { +error_propagate (errp, local_err); +return ; + } + +/* Create the simplified OCC model */ +object_property_set_bool (OBJECT (&chip8->occ), true,"realized" , &local_err); +if (local_err) { +error_propagate (errp, local_err); +return ; + } +pnv_xscom_add_subregion (chip,PNV_XSCOM_OCC_BASE , &chip8->occ.xscom_regs); +} +static void pnv_chip_power8e_class_init (ObjectClass *klass,void *data) {DeviceClass *dc =DEVICE_CLASS (klass);
@@ -738,6 +837,9 @@ static void pnv_chip_power8e_class_init(ObjectClass *klass, void *data) k->isa_create = pnv_chip_power8_isa_create; k->xscom_base =0x003fc0000000000ull ; dc->desc ="PowerNV Chip POWER8E" ; + +device_class_set_parent_realize (dc, pnv_chip_power8_realize, + &k->parent_realize); }static void pnv_chip_power8_class_init (ObjectClass *klass,void *data)
@@ -753,6 +855,9 @@ static void pnv_chip_power8_class_init(ObjectClass *klass, void *data) k->isa_create = pnv_chip_power8_isa_create; k->xscom_base =0x003fc0000000000ull ; dc->desc ="PowerNV Chip POWER8" ; + +device_class_set_parent_realize (dc, pnv_chip_power8_realize, + &k->parent_realize); }static void pnv_chip_power8nvl_class_init (ObjectClass *klass,void *data)
@@ -768,6 +873,25 @@ static void pnv_chip_power8nvl_class_init(ObjectClass *klass, void *data) k->isa_create = pnv_chip_power8nvl_isa_create; k->xscom_base =0x003fc0000000000ull ; dc->desc ="PowerNV Chip POWER8NVL" ; + +device_class_set_parent_realize (dc, pnv_chip_power8_realize, + &k->parent_realize); +} + +static void pnv_chip_power9_instance_init (Object *obj) +{ +} + +static void pnv_chip_power9_realize (DeviceState *dev,Error **errp) +{ +PnvChipClass *pcc =PNV_CHIP_GET_CLASS (dev); +Error *local_err =NULL ; + + pcc->parent_realize (dev, &local_err); +if (local_err) { +error_propagate (errp, local_err); +return ; + } }static void pnv_chip_power9_class_init (ObjectClass *klass,void *data)
@@ -783,6 +907,9 @@ static void pnv_chip_power9_class_init(ObjectClass *klass, void *data) k->isa_create = pnv_chip_power9_isa_create; k->xscom_base =0x00603fc00000000ull ; dc->desc ="PowerNV Chip POWER9" ; + +device_class_set_parent_realize (dc, pnv_chip_power9_realize, + &k->parent_realize); }static void pnv_chip_core_sanitize (PnvChip *chip,Error **errp)
@@ -815,59 +942,9 @@ static void pnv_chip_core_sanitize(PnvChip *chip, Error **errp) } } -static void pnv_chip_init (Object *obj) +static void pnv_chip_instance_init (Object *obj) { -PnvChip *chip =PNV_CHIP (obj); -PnvChipClass *pcc =PNV_CHIP_GET_CLASS (chip); - - chip->xscom_base = pcc->xscom_base; - -object_initialize (&chip->lpc,sizeof (chip->lpc),TYPE_PNV_LPC ); -object_property_add_child (obj,"lpc" ,OBJECT (&chip->lpc),NULL ); - -object_initialize (&chip->psi,sizeof (chip->psi),TYPE_PNV_PSI ); -object_property_add_child (obj,"psi" ,OBJECT (&chip->psi),NULL ); -object_property_add_const_link (OBJECT (&chip->psi),"xics" , -OBJECT (qdev_get_machine ()), &error_abort); - -object_initialize (&chip->occ,sizeof (chip->occ),TYPE_PNV_OCC ); -object_property_add_child (obj,"occ" ,OBJECT (&chip->occ),NULL ); -object_property_add_const_link (OBJECT (&chip->occ),"psi" , -OBJECT (&chip->psi), &error_abort); - -/* The LPC controller needs PSI to generate interrupts */ -object_property_add_const_link (OBJECT (&chip->lpc),"psi" , -OBJECT (&chip->psi), &error_abort); -} - -static void pnv_chip_icp_realize (PnvChip *chip,Error **errp) -{ -PnvChipClass *pcc =PNV_CHIP_GET_CLASS (chip); -const char *typename =pnv_chip_core_typename (chip); -size_t typesize =object_type_get_instance_size (typename); -int i, j; -char *name; -XICSFabric *xi =XICS_FABRIC (qdev_get_machine ()); - - name =g_strdup_printf ("icp-%x" , chip->chip_id); -memory_region_init (&chip->icp_mmio,OBJECT (chip), name,PNV_ICP_SIZE ); -sysbus_init_mmio (SYS_BUS_DEVICE (chip), &chip->icp_mmio); -g_free (name); - -sysbus_mmio_map (SYS_BUS_DEVICE (chip),1 ,PNV_ICP_BASE (chip)); - -/* Map the ICP registers for each thread */ -for (i =0 ; i < chip->nr_cores; i++) { -PnvCore *pnv_core =PNV_CORE (chip->cores + i * typesize); -int core_hwid =CPU_CORE (pnv_core)->core_id; - -for (j =0 ; j <CPU_CORE (pnv_core)->nr_threads; j++) { -uint32_t pir = pcc->core_pir (chip, core_hwid) + j; -PnvICPState *icp =PNV_ICP (xics_icp_get (xi, pir)); - -memory_region_add_subregion (&chip->icp_mmio, pir <<12 , &icp->mmio); - } - } +PNV_CHIP (obj)->xscom_base =PNV_CHIP_GET_CLASS (obj)->xscom_base; }static void pnv_chip_core_realize (PnvChip *chip,Error **errp)
@@ -951,37 +1028,6 @@ static void pnv_chip_realize(DeviceState *dev, Error **errp)error_propagate (errp, error);return ; } - -/* Create LPC controller */ -object_property_set_bool (OBJECT (&chip->lpc), true,"realized" , - &error_fatal); -pnv_xscom_add_subregion (chip,PNV_XSCOM_LPC_BASE , &chip->lpc.xscom_regs); - -/* Interrupt Management Area. This is the memory region holding -* all the Interrupt Control Presenter (ICP) registers */ -pnv_chip_icp_realize (chip, &error); -if (error) { -error_propagate (errp, error); -return ; - } - -/* Processor Service Interface (PSI) Host Bridge */ -object_property_set_int (OBJECT (&chip->psi),PNV_PSIHB_BASE (chip), -"bar" , &error_fatal); -object_property_set_bool (OBJECT (&chip->psi), true,"realized" , &error); -if (error) { -error_propagate (errp, error); -return ; - } -pnv_xscom_add_subregion (chip,PNV_XSCOM_PSIHB_BASE , &chip->psi.xscom_regs); - -/* Create the simplified OCC model */ -object_property_set_bool (OBJECT (&chip->occ), true,"realized" , &error); -if (error) { -error_propagate (errp, error); -return ; - } -pnv_xscom_add_subregion (chip,PNV_XSCOM_OCC_BASE , &chip->occ.xscom_regs); }static Property pnv_chip_properties[] = {
@@ -1009,8 +1055,10 @@ static ICSState *pnv_ics_get(XICSFabric *xi, int irq)int i;for (i =0 ; i < pnv->num_chips; i++) { -if (ics_valid_irq (&pnv->chips[i]->psi.ics, irq)) { -return &pnv->chips[i]->psi.ics; +Pnv8Chip *chip8 =PNV8_CHIP (pnv->chips[i]); + +if (ics_valid_irq (&chip8->psi.ics, irq)) { +return &chip8->psi.ics; } }return NULL ;
@@ -1022,7 +1070,8 @@ static void pnv_ics_resend(XICSFabric *xi)int i;for (i =0 ; i < pnv->num_chips; i++) { -ics_resend (&pnv->chips[i]->psi.ics); +Pnv8Chip *chip8 =PNV8_CHIP (pnv->chips[i]); +ics_resend (&chip8->psi.ics); } }
@@ -1063,7 +1112,8 @@ static void pnv_pic_print_info(InterruptStatsProvider *obj, }for (i =0 ; i < pnv->num_chips; i++) { -ics_pic_print_info (&pnv->chips[i]->psi.ics, mon); +Pnv8Chip *chip8 =PNV8_CHIP (pnv->chips[i]); +ics_pic_print_info (&chip8->psi.ics, mon); } }
@@ -1098,7 +1148,7 @@ static void pnv_set_num_chips(Object *obj, Visitor *v, const char *name, pnv->num_chips = num_chips; } -static void pnv_machine_initfn (Object *obj) +static void pnv_machine_instance_init (Object *obj) {PnvMachineState *pnv =PNV_MACHINE (obj); pnv->num_chips =1 ;
@@ -1138,11 +1188,18 @@ static void pnv_machine_class_init(ObjectClass *oc, void *data)pnv_machine_class_props_init (oc); } -#define DEFINE_PNV_CHIP_TYPE (type, class_initfn) \ - { \ - .name = type, \ - .class_init = class_initfn, \ - .parent = TYPE_PNV_CHIP, \ +#define DEFINE_PNV8_CHIP_TYPE (type, class_initfn) \ + { \ + .name = type, \ + .class_init = class_initfn, \ + .parent = TYPE_PNV8_CHIP, \ + } + +#define DEFINE_PNV9_CHIP_TYPE (type, class_initfn) \ + { \ + .name = type, \ + .class_init = class_initfn, \ + .parent = TYPE_PNV9_CHIP, \ }static const TypeInfo types[] = {
@@ -1150,7 +1207,7 @@ static const TypeInfo types[] = { .name = TYPE_PNV_MACHINE, .parent = TYPE_MACHINE, .instance_size = sizeof(PnvMachineState), - .instance_init = pnv_machine_initfn, + .instance_init = pnv_machine_instance_init, .class_init = pnv_machine_class_init, .interfaces = (InterfaceInfo []) { {TYPE_XICS_FABRIC },
@@ -1162,16 +1219,36 @@ static const TypeInfo types[] = { .name = TYPE_PNV_CHIP, .parent = TYPE_SYS_BUS_DEVICE, .class_init = pnv_chip_class_init, - .instance_init = pnv_chip_init, + .instance_init = pnv_chip_instance_init, .instance_size = sizeof(PnvChip), .class_size = sizeof(PnvChipClass), .abstract = true, }, - DEFINE_PNV_CHIP_TYPE(TYPE_PNV_CHIP_POWER9, pnv_chip_power9_class_init), - DEFINE_PNV_CHIP_TYPE(TYPE_PNV_CHIP_POWER8, pnv_chip_power8_class_init), - DEFINE_PNV_CHIP_TYPE(TYPE_PNV_CHIP_POWER8E, pnv_chip_power8e_class_init), -DEFINE_PNV_CHIP_TYPE (TYPE_PNV_CHIP_POWER8NVL , - pnv_chip_power8nvl_class_init), + +/* +* P9 chip and variants +*/ + { + .name = TYPE_PNV9_CHIP, + .parent = TYPE_PNV_CHIP, + .instance_init = pnv_chip_power9_instance_init, + .instance_size =sizeof (Pnv9Chip), + }, +DEFINE_PNV9_CHIP_TYPE (TYPE_PNV_CHIP_POWER9 , pnv_chip_power9_class_init), + +/* +* P8 chip and variants +*/ + { + .name = TYPE_PNV8_CHIP, + .parent = TYPE_PNV_CHIP, + .instance_init = pnv_chip_power8_instance_init, + .instance_size = sizeof(Pnv8Chip), + }, +DEFINE_PNV8_CHIP_TYPE (TYPE_PNV_CHIP_POWER8 , pnv_chip_power8_class_init), +DEFINE_PNV8_CHIP_TYPE (TYPE_PNV_CHIP_POWER8E , pnv_chip_power8e_class_init), +DEFINE_PNV8_CHIP_TYPE (TYPE_PNV_CHIP_POWER8NVL , + pnv_chip_power8nvl_class_init), };DEFINE_TYPES (types)
include/hw/ppc/pnv.h +23 -1
@@ -57,12 +57,32 @@ typedef struct PnvChip {MemoryRegion xscom_mmio;MemoryRegion xscom;AddressSpace xscom_as; +} PnvChip; + +#define TYPE_PNV8_CHIP "pnv8-chip" +#define PNV8_CHIP (obj) OBJECT_CHECK(Pnv8Chip, (obj), TYPE_PNV8_CHIP) + +typedef struct Pnv8Chip { +/*< private >*/ +PnvChip parent_obj; + +/*< public >*/ MemoryRegion icp_mmio;PnvLpcController lpc;PnvPsi psi;PnvOCC occ; -} PnvChip; +}Pnv8Chip ; + +#define TYPE_PNV9_CHIP "pnv9-chip" +#define PNV9_CHIP (obj) OBJECT_CHECK(Pnv9Chip, (obj), TYPE_PNV9_CHIP) + +typedef struct Pnv9Chip { +/*< private >*/ +PnvChip parent_obj; + +/*< public >*/ +}Pnv9Chip ; typedef struct PnvChipClass { /*< private >*/
@@ -75,6 +95,8 @@ typedef struct PnvChipClass {hwaddr xscom_base; +DeviceRealize parent_realize; +uint32_t (*core_pir)(PnvChip *chip,uint32_t core_id); Object *(*intc_create)(PnvChip *chip, Object *child, Error **errp); ISABus *(*isa_create)(PnvChip *chip, Error **errp);
Signature · 1 line
2.17.1
[Qemu-devel] [PULL 24/25] mac_dbdma: only dump commands for debug enabled channels
In reply to David GibsonFrom: Mark Cave-Ayland <[email protected]>
This enables us to apply the same filter in DEBUG_DBDMA_CHANMASK to the DBDMA command execution debug output.
--- hw/misc/macio/mac_dbdma.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-)
hw/misc/macio/mac_dbdma.c +11 -10
@@ -71,18 +71,19 @@ static DBDMAState *dbdma_from_ch(DBDMA_channel *ch) }#if DEBUG_DBDMA -static void dump_dbdma_cmd (dbdma_cmd *cmd) +static void dump_dbdma_cmd (DBDMA_channel *ch,dbdma_cmd *cmd) { -printf ("dbdma_cmd %p\n" , cmd); -printf (" req_count 0x%04x\n" ,le16_to_cpu (cmd->req_count)); -printf (" command 0x%04x\n" ,le16_to_cpu (cmd->command)); -printf (" phy_addr 0x%08x\n" ,le32_to_cpu (cmd->phy_addr)); -printf (" cmd_dep 0x%08x\n" ,le32_to_cpu (cmd->cmd_dep)); -printf (" res_count 0x%04x\n" ,le16_to_cpu (cmd->res_count)); -printf (" xfer_status 0x%04x\n" ,le16_to_cpu (cmd->xfer_status)); +DBDMA_DPRINTFCH (ch,"dbdma_cmd %p\n" , cmd); +DBDMA_DPRINTFCH (ch," req_count 0x%04x\n" ,le16_to_cpu (cmd->req_count)); +DBDMA_DPRINTFCH (ch," command 0x%04x\n" ,le16_to_cpu (cmd->command)); +DBDMA_DPRINTFCH (ch," phy_addr 0x%08x\n" ,le32_to_cpu (cmd->phy_addr)); +DBDMA_DPRINTFCH (ch," cmd_dep 0x%08x\n" ,le32_to_cpu (cmd->cmd_dep)); +DBDMA_DPRINTFCH (ch," res_count 0x%04x\n" ,le16_to_cpu (cmd->res_count)); +DBDMA_DPRINTFCH (ch," xfer_status 0x%04x\n" , +le16_to_cpu (cmd->xfer_status)); }#else -static void dump_dbdma_cmd (dbdma_cmd *cmd) +static void dump_dbdma_cmd (DBDMA_channel *ch,dbdma_cmd *cmd) { }#endif
@@ -448,7 +449,7 @@ static void channel_run(DBDMA_channel *ch)uint32_t phy_addr;DBDMA_DPRINTFCH (ch,"channel_run\n" ); -dump_dbdma_cmd (current); +dump_dbdma_cmd (ch, current);/* clear WAKE flag at command fetch */
Signature · 1 line
2.17.1
[Qemu-devel] [PULL 11/25] spapr: split the IRQ allocation sequence
In reply to David GibsonFrom: Cédric Le Goater <[email protected]>
Today, when a device requests for IRQ number in a sPAPR machine, the spapr_irq_alloc() routine first scans the ICSState status array to find an empty slot and then performs the assignement of the selected numbers. Split this sequence in two distinct routines : spapr_irq_find() for lookups and spapr_irq_claim() for claiming the IRQ numbers.
This will ease the introduction of a static layout of IRQ numbers.
--- hw/ppc/spapr.c | 50 ++++++++++++++++++++++++++++++++++++++++++ hw/ppc/spapr_events.c | 18 +++++++++++---- hw/ppc/spapr_pci.c | 23 ++++++++++++++++--- hw/ppc/spapr_vio.c | 10 ++++++++- include/hw/ppc/spapr.h | 4 ++++ 5 files changed, 97 insertions(+), 8 deletions(-)
hw/ppc/spapr.c +50 -0
@@ -3816,6 +3816,36 @@ static int ics_find_free_block(ICSState *ics, int num, int alignnum)return -1 ; } +int spapr_irq_find (sPAPRMachineState *spapr,int num,bool align,Error **errp) +{ +ICSState *ics = spapr->ics; +int first =-1 ; + +assert (ics); + +/* +* MSIMesage::data is used for storing VIRQ so +* it has to be aligned to num to support multiple +* MSI vectors. MSI-X is not affected by this. +* The hint is used for the first IRQ, the rest should +* be allocated continuously. +*/ +if (align) { +assert ((num ==1 ) || (num ==2 ) || (num ==4 ) || + (num ==8 ) || (num ==16 ) || (num ==32 )); + first =ics_find_free_block (ics, num, num); + }else { + first =ics_find_free_block (ics, num,1 ); + } + +if (first <0 ) { +error_setg (errp,"can't find a free %d-IRQ block" , num); +return -1 ; + } + +return first + ics->offset; +} +/* * Allocate the IRQ number and set the IRQ type, LSI or MSI */
@@ -3894,6 +3924,26 @@ int spapr_irq_alloc_block(sPAPRMachineState *spapr, int num, bool lsi,return first; } +int spapr_irq_claim (sPAPRMachineState *spapr,int irq,bool lsi,Error **errp) +{ +ICSState *ics = spapr->ics; + +assert (ics); + +if (!ics_valid_irq (ics, irq)) { +error_setg (errp,"IRQ %d is invalid" , irq); +return -1 ; + } + +if (!ICS_IRQ_FREE (ics, irq - ics->offset)) { +error_setg (errp,"IRQ %d is not free" , irq); +return -1 ; + } + +spapr_irq_set_lsi (spapr, irq, lsi); +return 0 ; +} +void spapr_irq_free (sPAPRMachineState *spapr,int irq,int num) {ICSState *ics = spapr->ics;
hw/ppc/spapr_events.c +14 -4
@@ -707,13 +707,18 @@ void spapr_clear_pending_events(sPAPRMachineState *spapr)void spapr_events_init (sPAPRMachineState *spapr) { +int epow_irq; + + epow_irq =spapr_irq_findone (spapr, &error_fatal); + +spapr_irq_claim (spapr, epow_irq, false, &error_fatal); +QTAILQ_INIT (&spapr->pending_events); spapr->event_sources =spapr_event_sources_new ();spapr_event_sources_register (spapr->event_sources,EVENT_CLASS_EPOW , -spapr_irq_alloc (spapr,0 , false, - &error_fatal)); + epow_irq);/* NOTE: if machine supports modern/dedicated hotplug event source, * we add it to the device-tree unconditionally. This means we may
@@ -724,9 +729,14 @@ void spapr_events_init(sPAPRMachineState *spapr)* checking that it's enabled. */ if (spapr->use_hotplug_event_source) { +int hp_irq; + + hp_irq =spapr_irq_findone (spapr, &error_fatal); + +spapr_irq_claim (spapr, hp_irq, false, &error_fatal); +spapr_event_sources_register (spapr->event_sources,EVENT_CLASS_HOT_PLUG , -spapr_irq_alloc (spapr,0 , false, - &error_fatal)); + hp_irq); } spapr->epow_notifier.notify = spapr_powerdown_req;
hw/ppc/spapr_pci.c +20 -3
@@ -279,6 +279,7 @@ static void rtas_ibm_change_msi(PowerPCCPU *cpu, sPAPRMachineState *spapr,spapr_pci_msi *msi;int *config_addr_key;Error *err =NULL ; +int i;/* Fins sPAPRPHBState */ phb =spapr_pci_find_phb (spapr, buid);
@@ -371,8 +372,7 @@ static void rtas_ibm_change_msi(PowerPCCPU *cpu, sPAPRMachineState *spapr, }/* Allocate MSIs */ - irq =spapr_irq_alloc_block (spapr, req_num, false, - ret_intr_type ==RTAS_TYPE_MSI , &err); + irq =spapr_irq_find (spapr, req_num, ret_intr_type ==RTAS_TYPE_MSI , &err);if (err) {error_reportf_err (err,"Can't allocate MSIs for device %x: " , config_addr);
@@ -380,6 +380,16 @@ static void rtas_ibm_change_msi(PowerPCCPU *cpu, sPAPRMachineState *spapr,return ; } +for (i =0 ; i < req_num; i++) { +spapr_irq_claim (spapr, irq + i, false, &err); +if (err) { +error_reportf_err (err,"Can't allocate MSIs for device %x: " , + config_addr); +rtas_st (rets,0 ,RTAS_OUT_HW_ERROR ); +return ; + } + } +/* Release previous MSIs */ if (msi) {spapr_irq_free (spapr, msi->first_irq, msi->num);
@@ -1698,7 +1708,14 @@ static void spapr_phb_realize(DeviceState *dev, Error **errp)uint32_t irq;Error *local_err =NULL ; - irq =spapr_irq_alloc_block (spapr,1 , true, false, &local_err); + irq =spapr_irq_findone (spapr, &local_err); +if (local_err) { +error_propagate (errp, local_err); +error_prepend (errp,"can't allocate LSIs: " ); +return ; + } + +spapr_irq_claim (spapr, irq, true, &local_err);if (local_err) {error_propagate (errp, local_err);error_prepend (errp,"can't allocate LSIs: " );
hw/ppc/spapr_vio.c +9 -1
@@ -475,7 +475,15 @@ static void spapr_vio_busdev_realize(DeviceState *qdev, Error **errp) dev->qdev.id = id; } - dev->irq =spapr_irq_alloc (spapr, dev->irq, false, &local_err); +if (!dev->irq) { + dev->irq =spapr_irq_findone (spapr, &local_err); +if (local_err) { +error_propagate (errp, local_err); +return ; + } + } + +spapr_irq_claim (spapr, dev->irq, false, &local_err);if (local_err) {error_propagate (errp, local_err);return ;
include/hw/ppc/spapr.h +4 -0
@@ -776,6 +776,10 @@ int spapr_irq_alloc(sPAPRMachineState *spapr, int irq_hint, bool lsi, Error **errp);int spapr_irq_alloc_block (sPAPRMachineState *spapr,int num,bool lsi,bool align,Error **errp); +int spapr_irq_find (sPAPRMachineState *spapr,int num,bool align, +Error **errp); +#define spapr_irq_findone (spapr, errp) spapr_irq_find(spapr, 1, false, errp) +int spapr_irq_claim (sPAPRMachineState *spapr,int irq,bool lsi,Error **errp);void spapr_irq_free (sPAPRMachineState *spapr,int irq,int num);qemu_irq spapr_qirq (sPAPRMachineState *spapr,int irq);
Signature · 1 line
2.17.1
[Qemu-devel] [PULL 19/25] spapr: Maximum (HPT) pagesize property
In reply to David GibsonThe way the POWER Hash Page Table (HPT) MMU is virtualized by KVM HV means that every page that the guest puts in the pagetables must be truly physically contiguous, not just GPA-contiguous. In effect this means that an HPT guest can't use any pagesizes greater than the host page size used to back its memory.
At present we handle this by changing what we advertise to the guest based on the backing pagesizes. This is pretty bad, because it means the guest sees a different environment depending on what should be host configuration details.
As a start on fixing this, we add a new capability parameter to the pseries machine type which gives the maximum allowed pagesizes for an HPT guest. For now we just create and validate the parameter without making it do anything.
For backwards compatibility, on older machine types we set it to the max available page size for the host. For the 3.0 machine type, we fix it to 16, the intention being to only allow HPT pagesizes up to 64kiB by default in future.
--- hw/ppc/spapr.c | 12 +++++++++ hw/ppc/spapr_caps.c | 56 ++++++++++++++++++++++++++++++++++++++++++ include/hw/ppc/spapr.h | 4 ++- 3 files changed, 71 insertions(+), 1 deletion(-)
hw/ppc/spapr.c +12 -0
@@ -63,6 +63,7 @@#include "hw/virtio/vhost-scsi-common.h" #include "exec/address-spaces.h" +#include "exec/ram_addr.h" #include "hw/usb.h" #include "qemu/config-file.h" #include "qemu/error-report.h"
@@ -4015,6 +4016,7 @@ static void spapr_machine_class_init(ObjectClass *oc, void *data) smc->default_caps.caps[SPAPR_CAP_CFPC ] =SPAPR_CAP_BROKEN ; smc->default_caps.caps[SPAPR_CAP_SBBC ] =SPAPR_CAP_BROKEN ; smc->default_caps.caps[SPAPR_CAP_IBS ] =SPAPR_CAP_BROKEN ; + smc->default_caps.caps[SPAPR_CAP_HPT_MAXPAGESIZE ] =16 ;/* 64kiB */ spapr_caps_add_properties (smc, &error_abort); }
@@ -4103,8 +4105,18 @@ static void spapr_machine_2_12_instance_options(MachineState *machine)static void spapr_machine_2_12_class_options (MachineClass *mc) { +sPAPRMachineClass *smc =SPAPR_MACHINE_CLASS (mc); +uint8_t mps; +spapr_machine_3_0_class_options (mc);SET_MACHINE_COMPAT (mc,SPAPR_COMPAT_2_12 ); + +if (kvmppc_hpt_needs_host_contiguous_pages ()) { + mps =ctz64 (qemu_getrampagesize ()); + }else { + mps =34 ;/* allow everything up to 16GiB, i.e. everything */ + } + smc->default_caps.caps[SPAPR_CAP_HPT_MAXPAGESIZE ] = mps; } DEFINE_SPAPR_MACHINE(2_12, "2.12", false);
hw/ppc/spapr_caps.c +56 -0
80 lines not on this page · raw message
include/hw/ppc/spapr.h +3 -1
@@ -66,8 +66,10 @@ typedef enum {#define SPAPR_CAP_SBBC 0x04/* Indirect Branch Serialisation */ #define SPAPR_CAP_IBS 0x05 +/* HPT Maximum Page Size (encoded as a shift) */ +#define SPAPR_CAP_HPT_MAXPAGESIZE 0x06/* Num Caps */ -#define SPAPR_CAP_NUM (SPAPR_CAP_IBS + 1) +#define SPAPR_CAP_NUM (SPAPR_CAP_HPT_MAXPAGESIZE + 1)/* * Capability Values
Signature · 1 line
2.17.1
[Qemu-devel] [PULL 21/25] target/ppc: Add ppc_hash64_filter_pagesizes()
In reply to David GibsonThe paravirtualized PAPR platform sometimes needs to restrict the guest to using only some of the page sizes actually supported by the host's MMU. At the moment this is handled in KVM specific code, but for consistency we want to apply the same limitations to all accelerators.
This makes a start on this by providing a helper function in the cpu code to allow platform code to remove some of the cpu's page size definitions via a caller supplied callback.
--- target/ppc/mmu-hash64.c | 59 +++++++++++++++++++++++++++++++++++++++++ target/ppc/mmu-hash64.h | 3 +++ 2 files changed, 62 insertions(+)
target/ppc/mmu-hash64.c +59 -0
@@ -1166,3 +1166,62 @@ const PPCHash64Options ppc_hash64_opts_POWER7 = { }, } }; + +void ppc_hash64_filter_pagesizes (PowerPCCPU *cpu, +bool (*cb)(void *,uint32_t ,uint32_t ), +void *opaque) +{ +PPCHash64Options *opts = cpu->hash64_opts; +int i; +int n =0 ; +bool ci_largepage = false; + +assert (opts); + + n =0 ; +for (i =0 ; i <ARRAY_SIZE (opts->sps); i++) { +PPCHash64SegmentPageSizes *sps = &opts->sps[i]; +int j; +int m =0 ; + +assert (n <= i); + +if (!sps->page_shift) { +break ; + } + +for (j =0 ; j <ARRAY_SIZE (sps->enc); j++) { +PPCHash64PageSize *ps = &sps->enc[j]; + +assert (m <= j); +if (!ps->page_shift) { +break ; + } + +if (cb (opaque, sps->page_shift, ps->page_shift)) { +if (ps->page_shift >=16 ) { + ci_largepage = true; + } + sps->enc[m++] = *ps; + } + } + +/* Clear rest of the row */ +for (j = m; j <ARRAY_SIZE (sps->enc); j++) { +memset (&sps->enc[j],0 ,sizeof (sps->enc[j])); + } + +if (m) { + n++; + } + } + +/* Clear the rest of the table */ +for (i = n; i <ARRAY_SIZE (opts->sps); i++) { +memset (&opts->sps[i],0 ,sizeof (opts->sps[i])); + } + +if (!ci_largepage) { + opts->flags &= ~PPC_HASH64_CI_LARGEPAGE ; + } +}
target/ppc/mmu-hash64.h +3 -0
@@ -20,6 +20,9 @@ unsigned ppc_hash64_hpte_page_shift_noslb(PowerPCCPU *cpu,void ppc_store_lpcr (PowerPCCPU *cpu,target_ulong val);void ppc_hash64_init (PowerPCCPU *cpu);void ppc_hash64_finalize (PowerPCCPU *cpu); +void ppc_hash64_filter_pagesizes (PowerPCCPU *cpu, +bool (*cb)(void *,uint32_t ,uint32_t ), +void *opaque);#endif /*
Signature · 1 line
2.17.1
[Qemu-devel] [PULL 23/25] spapr: Don't rewrite mmu capabilities in KVM mode
In reply to David GibsonCurrently during KVM initialization on POWER, kvm_fixup_page_sizes() rewrites a bunch of information in the cpu state to reflect the capabilities of the host MMU and KVM. This overwrites the information that's already there reflecting how the TCG implementation of the MMU will operate.
This means that we can get guest-visibly different behaviour between KVM and TCG (and between different KVM implementations). That's bad. It also prevents migration between KVM and TCG.
The pseries machine type now has filtering of the pagesizes it allows the guest to use which means it can present a consistent model of the MMU across all accelerators.
So, we can now replace kvm_fixup_page_sizes() with kvm_check_mmu() which merely verifies that the expected cpu model can be faithfully handled by KVM, rather than updating the cpu model to match KVM.
We call kvm_check_mmu() from the spapr cpu reset code. This is a hack:
conceptually it makes more sense where fixup_page_sizes() was - in the KVM cpu init path. However, doing that would require moving the platform's pagesize filtering much earlier, which would require a lot of work making further adjustments. There wouldn't be a lot of concrete point to doing that, since the only KVM implementation which has the awkward MMU restrictions is KVM HV, which can only work with an spapr guest anyway.
--- hw/ppc/spapr_cpu_core.c | 2 + target/ppc/kvm.c | 133 ++++++++++++++++++++-------------------- target/ppc/kvm_ppc.h | 5 ++ 3 files changed, 72 insertions(+), 68 deletions(-)
hw/ppc/spapr_cpu_core.c +2 -0
@@ -78,6 +78,8 @@ static void spapr_cpu_reset(void *opaque) spapr_cpu->dtl_size =0 ;spapr_caps_cpu_apply (SPAPR_MACHINE (qdev_get_machine ()), cpu); + +kvm_check_mmu (cpu, &error_fatal); }void spapr_cpu_set_entry_state (PowerPCCPU *cpu,target_ulong nip,target_ulong r3)
target/ppc/kvm.c +65 -68
167 lines not on this page · raw message
target/ppc/kvm_ppc.h +5 -0
@@ -71,6 +71,7 @@ int kvmppc_resize_hpt_commit(PowerPCCPU *cpu, target_ulong flags, int shift);bool kvmppc_pvr_workaround_required (PowerPCCPU *cpu);bool kvmppc_hpt_needs_host_contiguous_pages (void ); +void kvm_check_mmu (PowerPCCPU *cpu,Error **errp);#else
@@ -227,6 +228,10 @@ static inline bool kvmppc_hpt_needs_host_contiguous_pages(void)return false; } +static inline void kvm_check_mmu (PowerPCCPU *cpu,Error **errp) +{ +} +static inline bool kvmppc_has_cap_spapr_vfio (void ) {return false;
Signature · 1 line
2.17.1
[Qemu-devel] [PULL 18/25] pseries: Update SLOF firmware image to qemu-slof-20180621
In reply to David GibsonFrom: Alexey Kardashevskiy <[email protected]>
The changes are:
1. fixed broken_sc1;
2. added switching between boot consoles;
3. added PXE boot.
The full list is:
Quoted 12 lines
lib/libnet/pxelinux: Fix two off-by-one bugs in the pxelinux.cfg parserlib/libnet/pxelinux: Make the size handling forpxelinux_load_cfgmore logical
libc: Add a simple implementation of anassert()function
libnet: Support UUID-based pxelinux.cfg file names
slof: Add a helper function to get the contents of a property in C code
libnet: Add support for DHCPv4 options 209 and 210
libnet: Wire up pxelinux.cfg network booting
libnet: Add functions for downloading and parsing pxelinux.cfg files
libnet: Put code for determing TFTP error strings into a separate function
libc: Add thesnprintf()function
libnet: Passip_versionvia structfilename_ip
resolve ihandle and xt handle in the input command (like for the output)
Quoted 8 lines
Fix output word
obp-tftp: Make sure to not overwrite paflof in memory
libnet: Get rid of unusedhuge_loadandblock_sizeparameters
libc: Check for NULL pointers infree()
libc: Implementstrrchr()
libnet: Get rid of unnecessary (char *) castsbroken_sc1: check forH_PRIVILEGE
OF: Use new property "stdout-path" for boot console
--- pc-bios/README | 2 +- pc-bios/slof.bin | Bin 913880 -> 924840 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-20171214. + built from git tag qemu-slof-20180621. - 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 2317427ce76006723f7ae103a6998ab41dd79c68 +Subproject commit 7d37babcfa48a6eb08e726a8d13b745cb2eebe1c
Signature · 1 line
2.17.1
This series failed docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally.
Hi,
This series failed docker-mingw@fedora build test. Please find the testing commands and their output below. If you have Docker installed, you can probably reproduce it locally.
Type: series
Message-id: [email protected]
Subject: [Qemu-devel] [PULL 00/25] ppc-for-3.0 queue 2018-06-22
=== TEST SCRIPT BEGIN ===
#!/bin/bash
set -e
git submodule update --init dtc
# Let docker tests dump environment info
export SHOW_ENV=1
export J=8
time make docker-test-mingw@fedora
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'f371f772af mac_newworld: always enable disable_direct_reg3_writes for ADB machines 382c7f8b1a mac_dbdma: only dump commands for debug enabled channels f42f94fc44 spapr: Don't rewrite mmu capabilities in KVM mode647c6b7b1b spapr: Limit available pagesizes to provide a consistent guest environment cde4d3686c target/ppc: Add ppc_hash64_filter_pagesizes()c8be97a6b8 spapr: Use maximum page size capability to simplify memory backend checking dc32980d80 spapr: Maximum (HPT) pagesize property9af6045be3 pseries: Update SLOF firmware image to qemu-slof-20180621 48b53f833e target/ppc: Add missing opcode for icbt on PPC440fe603e6137 ppc4xx_i2c: Implement directcntl registerfa0708b281 ppc4xx_i2c: Remove unimplemented sdata and intr registers c82cd13219 sm501: Fix hardware cursor color conversionba9df9a120 fpu_helper.c: fix helper_fpscr_clrbit() function661d19e254 spapr: remove unused spapr_irq routines0e4bc13f40 spapr: split the IRQ allocation sequencebac1f04828 target/ppc: Add kvmppc_hpt_needs_host_contiguous_pages() helper be02f5eae0 spapr: Add cpu_apply hook to capabilitiescee082584e spapr: Compute effective capability values earlier2cc304ba20 target/ppc: Allow cpu compatiblity checks based on type, not instance ff8d040111 ppc/pnv: consolidate the creation of the ISA bus device tree c08c38d895 ppc/pnv: introduce Pnv8Chip and Pnv9Chip models105a97650a spapr_cpu_core: migrate VPA related stated404c5a81a spapr_cpu_core: migrate per-CPU datac32bf7629b ppc/pnv: introduce a new isa_create() operation to the chip model d84acdec84 ppc/pnv: introduce a new intc_create() operation to the chip model
=== OUTPUT BEGIN ===
Submodule 'dtc' (git://git.qemu-project.org/dtc.git) registered for path 'dtc'
Cloning into '/var/tmp/patchew-tester-tmp-8ft1b4rs/src/dtc'...
Submodule path 'dtc': checked out 'e54388015af1fb4bf04d0bca99caba1074d9cc42'
BUILD fedora
make[1]: Entering directory '/var/tmp/patchew-tester-tmp-8ft1b4rs/src'
GEN /var/tmp/patchew-tester-tmp-8ft1b4rs/src/docker-src.2018-06-22-09.43.36.24811/qemu.tar
Cloning into '/var/tmp/patchew-tester-tmp-8ft1b4rs/src/docker-src.2018-06-22-09.43.36.24811/qemu.tar.vroot'... done.
Checking out files: 47% (2968/6275) Checking out files: 48% (3012/6275) Checking out files: 49% (3075/6275) Checking out files: 50% (3138/6275) Checking out files: 51% (3201/6275) Checking out files: 52% (3263/6275) Checking out files: 53% (3326/6275) Checking out files: 54% (3389/6275) Checking out files: 55% (3452/6275) Checking out files: 56% (3514/6275) Checking out files: 57% (3577/6275) Checking out files: 58% (3640/6275) Checking out files: 59% (3703/6275) Checking out files: 60% (3765/6275) Checking out files: 61% (3828/6275) Checking out files: 62% (3891/6275) Checking out files: 63% (3954/6275) Checking out files: 64% (4016/6275) Checking out files: 65% (4079/6275) Checking out files: 66% (4142/6275) Checking out files: 67% (4205/6275) Checking out files: 68% (4267/6275) Checking out files: 69% (4330/6275) Checking out files: 70% (4393/6275) Checking out files: 71% (4456/6275) Checking out files: 72% (4518/6275) Checking out files: 73% (4581/6275) Checking out files: 74% (4644/6275) Checking out files: 75% (4707/6275) Checking out files: 76% (4769/6275) Checking out files: 77% (4832/6275) Checking out files: 78% (4895/6275) Checking out files: 79% (4958/6275) Checking out files: 80% (5020/6275) Checking out files: 81% (5083/6275) Checking out files: 82% (5146/6275) Checking out files: 83% (5209/6275) Checking out files: 84% (5271/6275) Checking out files: 85% (5334/6275) Checking out files: 86% (5397/6275) Checking out files: 87% (5460/6275) Checking out files: 88% (5522/6275) Checking out files: 89% (5585/6275) Checking out files: 90% (5648/6275) Checking out files: 91% (5711/6275) Checking out files: 92% (5773/6275) Checking out files: 93% (5836/6275) Checking out files: 94% (5899/6275) Checking out files: 95% (5962/6275) Checking out files: 96% (6024/6275) Checking out files: 97% (6087/6275) Checking out files: 98% (6150/6275) Checking out files: 99% (6213/6275) Checking out files: 100% (6275/6275) Checking out files: 100% (6275/6275), done.
Your branch is up-to-date with 'origin/test'.
Submodule 'dtc' (git://git.qemu-project.org/dtc.git) registered for path 'dtc'
Cloning into '/var/tmp/patchew-tester-tmp-8ft1b4rs/src/docker-src.2018-06-22-09.43.36.24811/qemu.tar.vroot/dtc'... Submodule path 'dtc': checked out 'e54388015af1fb4bf04d0bca99caba1074d9cc42'
Submodule 'ui/keycodemapdb' (git://git.qemu.org/keycodemapdb.git) registered for path 'ui/keycodemapdb' Cloning into '/var/tmp/patchew-tester-tmp-8ft1b4rs/src/docker-src.2018-06-22-09.43.36.24811/qemu.tar.vroot/ui/keycodemapdb'... Submodule path 'ui/keycodemapdb': checked out '6b3d716e2b6472eb7189d3220552280ef3d832ce'
COPY RUNNER
RUN test-mingw in qemu:fedora
Packages installed:
SDL2-devel-2.0.8-5.fc28.x86_64
bc-1.07.1-5.fc28.x86_64
bison-3.0.4-9.fc28.x86_64
bluez-libs-devel-5.49-3.fc28.x86_64
brlapi-devel-0.6.7-12.fc28.x86_64
bzip2-1.0.6-26.fc28.x86_64
bzip2-devel-1.0.6-26.fc28.x86_64
ccache-3.4.2-2.fc28.x86_64
clang-6.0.0-5.fc28.x86_64
device-mapper-multipath-devel-0.7.4-2.git07e7bd5.fc28.x86_64
findutils-4.6.0-19.fc28.x86_64
flex-2.6.1-7.fc28.x86_64
gcc-8.1.1-1.fc28.x86_64
gcc-c++-8.1.1-1.fc28.x86_64
gettext-0.19.8.1-14.fc28.x86_64
git-2.17.1-2.fc28.x86_64
glib2-devel-2.56.1-3.fc28.x86_64
glusterfs-api-devel-4.0.2-1.fc28.x86_64
gnutls-devel-3.6.2-1.fc28.x86_64
gtk3-devel-3.22.30-1.fc28.x86_64
hostname-3.20-3.fc28.x86_64
libaio-devel-0.3.110-11.fc28.x86_64
libasan-8.1.1-1.fc28.x86_64
libattr-devel-2.4.47-23.fc28.x86_64
libcap-devel-2.25-9.fc28.x86_64
libcap-ng-devel-0.7.9-1.fc28.x86_64
libcurl-devel-7.59.0-3.fc28.x86_64
libfdt-devel-1.4.6-4.fc28.x86_64
libpng-devel-1.6.34-3.fc28.x86_64
librbd-devel-12.2.5-1.fc28.x86_64
libssh2-devel-1.8.0-7.fc28.x86_64
libubsan-8.1.1-1.fc28.x86_64
libusbx-devel-1.0.21-6.fc28.x86_64
libxml2-devel-2.9.7-4.fc28.x86_64
llvm-6.0.0-11.fc28.x86_64
lzo-devel-2.08-12.fc28.x86_64
make-4.2.1-6.fc28.x86_64
mingw32-SDL2-2.0.5-3.fc27.noarch
mingw32-bzip2-1.0.6-9.fc27.noarch
mingw32-curl-7.57.0-1.fc28.noarch
mingw32-glib2-2.54.1-1.fc28.noarch
mingw32-gmp-6.1.2-2.fc27.noarch
mingw32-gnutls-3.5.13-2.fc27.noarch
mingw32-gtk3-3.22.16-1.fc27.noarch
mingw32-libjpeg-turbo-1.5.1-3.fc27.noarch
mingw32-libpng-1.6.29-2.fc27.noarch
mingw32-libssh2-1.8.0-3.fc27.noarch
mingw32-libtasn1-4.13-1.fc28.noarch
mingw32-nettle-3.3-3.fc27.noarch
mingw32-pixman-0.34.0-3.fc27.noarch
mingw32-pkg-config-0.28-9.fc27.x86_64
mingw64-SDL2-2.0.5-3.fc27.noarch
mingw64-bzip2-1.0.6-9.fc27.noarch
mingw64-curl-7.57.0-1.fc28.noarch
mingw64-glib2-2.54.1-1.fc28.noarch
mingw64-gmp-6.1.2-2.fc27.noarch
mingw64-gnutls-3.5.13-2.fc27.noarch
mingw64-gtk3-3.22.16-1.fc27.noarch
mingw64-libjpeg-turbo-1.5.1-3.fc27.noarch
mingw64-libpng-1.6.29-2.fc27.noarch
mingw64-libssh2-1.8.0-3.fc27.noarch
mingw64-libtasn1-4.13-1.fc28.noarch
mingw64-nettle-3.3-3.fc27.noarch
mingw64-pixman-0.34.0-3.fc27.noarch
mingw64-pkg-config-0.28-9.fc27.x86_64
ncurses-devel-6.1-5.20180224.fc28.x86_64
nettle-devel-3.4-2.fc28.x86_64
nss-devel-3.36.1-1.1.fc28.x86_64
numactl-devel-2.0.11-8.fc28.x86_64
package PyYAML is not installed
package libjpeg-devel is not installed
perl-5.26.2-411.fc28.x86_64
pixman-devel-0.34.0-8.fc28.x86_64
python3-3.6.5-1.fc28.x86_64
snappy-devel-1.1.7-5.fc28.x86_64
sparse-0.5.2-1.fc28.x86_64
spice-server-devel-0.14.0-4.fc28.x86_64
systemtap-sdt-devel-3.2-11.fc28.x86_64
tar-1.30-3.fc28.x86_64
usbredir-devel-0.7.1-7.fc28.x86_64
virglrenderer-devel-0.6.0-4.20170210git76b3da97b.fc28.x86_64
vte3-devel-0.36.5-6.fc28.x86_64
which-2.21-8.fc28.x86_64
xen-devel-4.10.1-3.fc28.x86_64
zlib-devel-1.2.11-8.fc28.x86_64
Environment variables:
TARGET_LIST=
PACKAGES=ccache gettext git tar PyYAML sparse flex bison python3 bzip2 hostname gcc gcc-c++ llvm clang make perl which bc findutils glib2-devel libaio-devel pixman-devel zlib-devel libfdt-devel libasan libubsan bluez-libs-devel brlapi-devel bzip2-devel device-mapper-multipath-devel glusterfs-api-devel gnutls-devel gtk3-devel libattr-devel libcap-devel libcap-ng-devel libcurl-devel libjpeg-devel libpng-devel librbd-devel libssh2-devel libusbx-devel libxml2-devel lzo-devel ncurses-devel nettle-devel nss-devel numactl-devel SDL2-devel snappy-devel spice-server-devel systemtap-sdt-devel usbredir-devel virglrenderer-devel vte3-devel xen-devel mingw32-pixman mingw32-glib2 mingw32-gmp mingw32-SDL2 mingw32-pkg-config mingw32-gtk3 mingw32-gnutls mingw32-nettle mingw32-libtasn1 mingw32-libjpeg-turbo mingw32-libpng mingw32-curl mingw32-libssh2 mingw32-bzip2 mingw64-pixman mingw64-glib2 mingw64-gmp mingw64-SDL2 mingw64-pkg-config mingw64-gtk3 mingw64-gnutls mingw64-nettle mingw64-libtasn1 mingw64-libjpeg-turbo mingw64-libpng mingw64-curl mingw64-libssh2 mingw64-bzip2
J=8
V=
HOSTNAME=1e005065ed42
DEBUG=
SHOW_ENV=1
PWD=/
HOME=/root
CCACHE_DIR=/var/tmp/ccache
DISTTAG=f28container
QEMU_CONFIGURE_OPTS=--python=/usr/bin/python3
FGC=f28
TEST_DIR=/tmp/qemu-test
SHLVL=1
FEATURES=mingw clang pyyaml asan dtc PATH=/usr/lib/ccache:/usr/lib64/ccache:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin MAKEFLAGS= -j8
EXTRA_CONFIGURE_OPTS=
_=/usr/bin/env
Configure options:
--enable-werror --target-list=x86_64-softmmu,aarch64-softmmu --prefix=/tmp/qemu-test/install --python=/usr/bin/python3 --cross-prefix=x86_64-w64-mingw32- --enable-trace-backends=simple --enable-gnutls --enable-nettle --enable-curl --enable-vnc --enable-bzip2 --enable-guest-agent --with-sdlabi=2.0 --with-gtkabi=3.0
Install prefix /tmp/qemu-test/install BIOS directory /tmp/qemu-test/install firmware path /tmp/qemu-test/install/share/qemu-firmware binary directory /tmp/qemu-test/install
library directory /tmp/qemu-test/install/lib
module directory /tmp/qemu-test/install/lib
libexec directory /tmp/qemu-test/install/libexec
include directory /tmp/qemu-test/install/include
config directory /tmp/qemu-test/install
local state directory queried at runtime
Windows SDK no Source path /tmp/qemu-test/src GIT binary git GIT submodules C compiler x86_64-w64-mingw32-gcc Host C compiler cc C++ compiler x86_64-w64-mingw32-g++ Objective-C compiler clang ARFLAGS rv CFLAGS -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -g QEMU_CFLAGS -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/pixman-1 -I$(SRC_PATH)/dtc/libfdt -Werror -DHAS_LIBSSH2_SFTP_FSYNC -mms-bitfields -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/glib-2.0 -I/usr/x86_64-w64-mingw32/sys-root/mingw/lib/glib-2.0/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -m64 -mcx16 -mthreads -D__USE_MINGW_ANSI_STDIO=1 -DWIN32_LEAN_AND_MEAN -DWINVER=0x501 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -fwrapv -Wexpansion-to-defined -Wendif-labels -Wno-shift-negative-value -Wno-missing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/p11-kit-1 -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/libpng16 LDFLAGS -Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase -Wl,--warn-common -m64 -g QEMU_LDFLAGS -L$(BUILD_DIR)/dtc/libfdt make make install install python /usr/bin/python3 -B smbd /usr/sbin/smbd module support no host CPU x86_64 host big endian no target list x86_64-softmmu aarch64-softmmu gprof enabled no sparse enabled no strip binaries yes profiler no static build no SDL support yes (2.0.5) GTK support yes (3.22.16) GTK GL support no VTE support no TLS priority NORMAL GNUTLS support yes GNUTLS rnd yes libgcrypt no libgcrypt kdf no nettle yes (3.3) nettle kdf yes libtasn1 yes curses support no virgl support no curl support yes mingw32 support yes Audio drivers dsound
Block whitelist (rw)
Block whitelist (ro)
VirtFS support no
Multipath support no
VNC support yes VNC SASL support no VNC JPEG support yes VNC PNG support yes xen support no brlapi support no bluez support no Documentation no PIE no vde support no netmap support no Linux AIO support no ATTR/XATTR support no Install blobs yes KVM support no HAX support yes HVF support no WHPX support no TCG support yes TCG debug enabled no TCG interpreter no malloc trim support no RDMA support no fdt support git membarrier no preadv support no fdatasync no madvise no posix_madvise no posix_memalign no
libcap-ng support no
vhost-net support no
vhost-crypto support no
vhost-scsi support no
vhost-vsock support no
vhost-user support no
Trace backends simple
Trace output file trace-<pid>
spice support no rbd support no xfsctl support no smartcard support no libusb no usb net redir no OpenGL support no OpenGL dmabufs no libiscsi support no libnfs support no
build guest agent yes
QGA VSS support no
QGA w32 disk info yes
QGA MSI support no
seccomp support no
coroutine backend win32
coroutine pool yes
debug stack usage no
crypto afalg no
GlusterFS support no
gcov gcov gcov enabled no TPM support yes libssh2 support yes TPM passthrough no TPM emulator no QOM debugging yes Live block migration yes lzo support no snappy support no bzip2 support yes NUMA host support no libxml2 no tcmalloc support no jemalloc support no
avx2 optimization yes
replication support yes
VxHS block device no
capstone no
docker no
NOTE: cross-compilers enabled: 'x86_64-w64-mingw32-gcc'
GEN x86_64-softmmu/config-devices.mak.tmp GEN aarch64-softmmu/config-devices.mak.tmp GEN config-host.h GEN qemu-options.def GEN qapi-gen GEN trace/generated-helpers-wrappers.h GEN trace/generated-tcg-tracers.h GEN trace/generated-helpers.h GEN trace/generated-helpers.c GEN module_block.h GEN x86_64-softmmu/config-devices.mak GEN ui/input-keymap-atset1-to-qcode.c GEN aarch64-softmmu/config-devices.mak GEN ui/input-keymap-linux-to-qcode.c GEN ui/input-keymap-qcode-to-atset3.c GEN ui/input-keymap-qcode-to-atset1.c GEN ui/input-keymap-qcode-to-atset2.c GEN ui/input-keymap-qcode-to-linux.c GEN ui/input-keymap-qcode-to-qnum.c GEN ui/input-keymap-qcode-to-sun.c GEN ui/input-keymap-qnum-to-qcode.c GEN ui/input-keymap-usb-to-qcode.c GEN ui/input-keymap-win32-to-qcode.c GEN ui/input-keymap-x11-to-qcode.c GEN ui/input-keymap-xorgevdev-to-qcode.c GEN ui/input-keymap-xorgkbd-to-qcode.c GEN ui/input-keymap-xorgxquartz-to-qcode.c GEN ui/input-keymap-xorgxwin-to-qcode.c GEN ui/input-keymap-osx-to-qcode.c GEN tests/test-qapi-gen GEN trace-root.h GEN accel/kvm/trace.h GEN accel/tcg/trace.h GEN audio/trace.h GEN block/trace.h GEN chardev/trace.h GEN crypto/trace.h GEN hw/9pfs/trace.h GEN hw/acpi/trace.h GEN hw/alpha/trace.h GEN hw/arm/trace.h GEN hw/audio/trace.h GEN hw/block/trace.h GEN hw/block/dataplane/trace.h GEN hw/char/trace.h GEN hw/display/trace.h GEN hw/dma/trace.h GEN hw/hppa/trace.h GEN hw/i2c/trace.h GEN hw/i386/trace.h GEN hw/i386/xen/trace.h GEN hw/ide/trace.h GEN hw/input/trace.h GEN hw/intc/trace.h GEN hw/isa/trace.h GEN hw/mem/trace.h GEN hw/misc/trace.h GEN hw/misc/macio/trace.h GEN hw/net/trace.h GEN hw/nvram/trace.h GEN hw/pci/trace.h GEN hw/pci-host/trace.h GEN hw/ppc/trace.h GEN hw/rdma/trace.h GEN hw/rdma/vmw/trace.h GEN hw/s390x/trace.h GEN hw/scsi/trace.h GEN hw/sd/trace.h GEN hw/sparc/trace.h GEN hw/sparc64/trace.h GEN hw/timer/trace.h GEN hw/tpm/trace.h GEN hw/usb/trace.h GEN hw/vfio/trace.h GEN hw/virtio/trace.h GEN hw/xen/trace.h GEN io/trace.h GEN linux-user/trace.h GEN migration/trace.h GEN nbd/trace.h GEN net/trace.h GEN qapi/trace.h GEN qom/trace.h GEN scsi/trace.h GEN target/arm/trace.h GEN target/i386/trace.h GEN target/mips/trace.h GEN target/ppc/trace.h GEN target/s390x/trace.h GEN target/sparc/trace.h GEN ui/trace.h GEN util/trace.h GEN trace-root.c GEN accel/kvm/trace.c GEN accel/tcg/trace.c GEN audio/trace.c GEN block/trace.c GEN chardev/trace.c GEN crypto/trace.c GEN hw/9pfs/trace.c GEN hw/acpi/trace.c GEN hw/alpha/trace.c GEN hw/arm/trace.c GEN hw/audio/trace.c GEN hw/block/trace.c GEN hw/block/dataplane/trace.c GEN hw/char/trace.c GEN hw/display/trace.c GEN hw/dma/trace.c GEN hw/hppa/trace.c GEN hw/i2c/trace.c GEN hw/i386/trace.c GEN hw/i386/xen/trace.c GEN hw/ide/trace.c GEN hw/input/trace.c GEN hw/intc/trace.c GEN hw/isa/trace.c GEN hw/mem/trace.c GEN hw/misc/trace.c GEN hw/misc/macio/trace.c GEN hw/net/trace.c GEN hw/nvram/trace.c GEN hw/pci/trace.c GEN hw/pci-host/trace.c GEN hw/ppc/trace.c GEN hw/rdma/trace.c GEN hw/rdma/vmw/trace.c GEN hw/s390x/trace.c GEN hw/scsi/trace.c GEN hw/sd/trace.c GEN hw/sparc/trace.c GEN hw/sparc64/trace.c GEN hw/timer/trace.c GEN hw/tpm/trace.c GEN hw/usb/trace.c GEN hw/vfio/trace.c GEN hw/virtio/trace.c GEN hw/xen/trace.c GEN io/trace.c GEN linux-user/trace.c GEN migration/trace.c GEN nbd/trace.c GEN net/trace.c GEN qapi/trace.c GEN qom/trace.c GEN scsi/trace.c GEN target/arm/trace.c GEN target/i386/trace.c GEN target/mips/trace.c GEN target/ppc/trace.c GEN target/s390x/trace.c GEN target/sparc/trace.c GEN ui/trace.c GEN util/trace.c GEN config-all-devices.mak
DEP /tmp/qemu-test/src/dtc/tests/dumptrees.c
DEP /tmp/qemu-test/src/dtc/tests/trees.S
DEP /tmp/qemu-test/src/dtc/tests/testutils.c
DEP /tmp/qemu-test/src/dtc/tests/value-labels.c DEP /tmp/qemu-test/src/dtc/tests/asm_tree_dump.c DEP /tmp/qemu-test/src/dtc/tests/truncated_property.c DEP /tmp/qemu-test/src/dtc/tests/check_path.c
DEP /tmp/qemu-test/src/dtc/tests/overlay_bad_fixup.c DEP /tmp/qemu-test/src/dtc/tests/overlay.c
DEP /tmp/qemu-test/src/dtc/tests/subnode_iterate.c DEP /tmp/qemu-test/src/dtc/tests/property_iterate.c DEP /tmp/qemu-test/src/dtc/tests/utilfdt_test.c DEP /tmp/qemu-test/src/dtc/tests/integer-expressions.c DEP /tmp/qemu-test/src/dtc/tests/path_offset_aliases.c DEP /tmp/qemu-test/src/dtc/tests/add_subnode_with_nops.c DEP /tmp/qemu-test/src/dtc/tests/dtbs_equal_unordered.c DEP /tmp/qemu-test/src/dtc/tests/dtb_reverse.c DEP /tmp/qemu-test/src/dtc/tests/dtbs_equal_ordered.c DEP /tmp/qemu-test/src/dtc/tests/extra-terminating-null.c DEP /tmp/qemu-test/src/dtc/tests/incbin.c
DEP /tmp/qemu-test/src/dtc/tests/boot-cpuid.c
DEP /tmp/qemu-test/src/dtc/tests/phandle_format.c DEP /tmp/qemu-test/src/dtc/tests/path-references.c DEP /tmp/qemu-test/src/dtc/tests/references.c
DEP /tmp/qemu-test/src/dtc/tests/string_escapes.c DEP /tmp/qemu-test/src/dtc/tests/propname_escapes.c DEP /tmp/qemu-test/src/dtc/tests/appendprop2.c DEP /tmp/qemu-test/src/dtc/tests/appendprop1.c DEP /tmp/qemu-test/src/dtc/tests/del_node.c
DEP /tmp/qemu-test/src/dtc/tests/del_property.c DEP /tmp/qemu-test/src/dtc/tests/setprop.c
DEP /tmp/qemu-test/src/dtc/tests/set_name.c
DEP /tmp/qemu-test/src/dtc/tests/rw_tree1.c
DEP /tmp/qemu-test/src/dtc/tests/open_pack.c
DEP /tmp/qemu-test/src/dtc/tests/nopulate.c
DEP /tmp/qemu-test/src/dtc/tests/mangle-layout.c DEP /tmp/qemu-test/src/dtc/tests/move_and_save.c DEP /tmp/qemu-test/src/dtc/tests/sw_tree1.c
DEP /tmp/qemu-test/src/dtc/tests/nop_node.c
DEP /tmp/qemu-test/src/dtc/tests/nop_property.c DEP /tmp/qemu-test/src/dtc/tests/setprop_inplace.c DEP /tmp/qemu-test/src/dtc/tests/stringlist.c
DEP /tmp/qemu-test/src/dtc/tests/addr_size_cells.c DEP /tmp/qemu-test/src/dtc/tests/sized_cells.c DEP /tmp/qemu-test/src/dtc/tests/notfound.c
DEP /tmp/qemu-test/src/dtc/tests/get_alias.c
DEP /tmp/qemu-test/src/dtc/tests/char_literal.c DEP /tmp/qemu-test/src/dtc/tests/node_offset_by_compatible.c DEP /tmp/qemu-test/src/dtc/tests/node_check_compatible.c DEP /tmp/qemu-test/src/dtc/tests/node_offset_by_phandle.c DEP /tmp/qemu-test/src/dtc/tests/node_offset_by_prop_value.c DEP /tmp/qemu-test/src/dtc/tests/parent_offset.c DEP /tmp/qemu-test/src/dtc/tests/supernode_atdepth_offset.c DEP /tmp/qemu-test/src/dtc/tests/get_path.c
DEP /tmp/qemu-test/src/dtc/tests/getprop.c
DEP /tmp/qemu-test/src/dtc/tests/get_phandle.c DEP /tmp/qemu-test/src/dtc/tests/get_name.c
DEP /tmp/qemu-test/src/dtc/tests/path_offset.c DEP /tmp/qemu-test/src/dtc/tests/find_property.c DEP /tmp/qemu-test/src/dtc/tests/subnode_offset.c DEP /tmp/qemu-test/src/dtc/tests/root_node.c
DEP /tmp/qemu-test/src/dtc/tests/get_mem_rsv.c DEP /tmp/qemu-test/src/dtc/libfdt/fdt_overlay.c DEP /tmp/qemu-test/src/dtc/libfdt/fdt_addresses.c DEP /tmp/qemu-test/src/dtc/libfdt/fdt_empty_tree.c DEP /tmp/qemu-test/src/dtc/libfdt/fdt_strerror.c DEP /tmp/qemu-test/src/dtc/libfdt/fdt_rw.c
DEP /tmp/qemu-test/src/dtc/libfdt/fdt_sw.c
DEP /tmp/qemu-test/src/dtc/libfdt/fdt_wip.c
DEP /tmp/qemu-test/src/dtc/libfdt/fdt_ro.c
DEP /tmp/qemu-test/src/dtc/libfdt/fdt.c
DEP /tmp/qemu-test/src/dtc/util.c
DEP /tmp/qemu-test/src/dtc/fdtoverlay.c
DEP /tmp/qemu-test/src/dtc/fdtput.c
DEP /tmp/qemu-test/src/dtc/fdtget.c
LEX convert-dtsv0-lexer.lex.c
DEP /tmp/qemu-test/src/dtc/fdtdump.c
DEP /tmp/qemu-test/src/dtc/srcpos.c
BISON dtc-parser.tab.c
LEX dtc-lexer.lex.c
DEP /tmp/qemu-test/src/dtc/treesource.c
DEP /tmp/qemu-test/src/dtc/livetree.c
DEP /tmp/qemu-test/src/dtc/fstree.c
DEP /tmp/qemu-test/src/dtc/flattree.c
DEP /tmp/qemu-test/src/dtc/dtc.c
DEP /tmp/qemu-test/src/dtc/checks.c
DEP /tmp/qemu-test/src/dtc/data.c
DEP convert-dtsv0-lexer.lex.c
DEP dtc-parser.tab.c
DEP dtc-lexer.lex.c
CHK version_gen.h
UPD version_gen.h
DEP /tmp/qemu-test/src/dtc/util.c
CC libfdt/fdt.o
CC libfdt/fdt_ro.o
CC libfdt/fdt_rw.o
CC libfdt/fdt_wip.o
CC libfdt/fdt_empty_tree.o
CC libfdt/fdt_sw.o
CC libfdt/fdt_addresses.o
CC libfdt/fdt_strerror.o
CC libfdt/fdt_overlay.o
AR libfdt/libfdt.a
x86_64-w64-mingw32-ar: creating libfdt/libfdt.a
a - libfdt/fdt.o
a - libfdt/fdt_ro.o
a - libfdt/fdt_wip.o
a - libfdt/fdt_sw.o
a - libfdt/fdt_rw.o
a - libfdt/fdt_strerror.o
a - libfdt/fdt_empty_tree.o
a - libfdt/fdt_addresses.o
a - libfdt/fdt_overlay.o
RC version.o
GEN qga/qapi-generated/qapi-gen
CC qapi/qapi-builtin-types.o
CC qapi/qapi-types.o
CC qapi/qapi-types-block-core.o
CC qapi/qapi-types-block.o
CC qapi/qapi-types-crypto.o
CC qapi/qapi-types-char.o
CC qapi/qapi-types-common.o
CC qapi/qapi-types-introspect.o
CC qapi/qapi-types-job.o
CC qapi/qapi-types-migration.o
CC qapi/qapi-types-misc.o
CC qapi/qapi-types-net.o
CC qapi/qapi-types-rocker.o
CC qapi/qapi-types-run-state.o
CC qapi/qapi-types-sockets.o
CC qapi/qapi-types-tpm.o
CC qapi/qapi-types-trace.o
CC qapi/qapi-types-transaction.o
CC qapi/qapi-types-ui.o
CC qapi/qapi-builtin-visit.o
CC qapi/qapi-visit.o
CC qapi/qapi-visit-block-core.o
CC qapi/qapi-visit-block.o
CC qapi/qapi-visit-common.o
CC qapi/qapi-visit-char.o
CC qapi/qapi-visit-crypto.o
CC qapi/qapi-visit-introspect.o
CC qapi/qapi-visit-job.o
CC qapi/qapi-visit-migration.o
CC qapi/qapi-visit-misc.o
CC qapi/qapi-visit-net.o
CC qapi/qapi-visit-rocker.o
CC qapi/qapi-visit-run-state.o
CC qapi/qapi-visit-sockets.o
CC qapi/qapi-visit-tpm.o
CC qapi/qapi-visit-trace.o
CC qapi/qapi-visit-transaction.o
CC qapi/qapi-visit-ui.o
CC qapi/qapi-events.o
CC qapi/qapi-events-block-core.o
CC qapi/qapi-events-block.o
CC qapi/qapi-events-char.o
CC qapi/qapi-events-common.o
CC qapi/qapi-events-crypto.o
CC qapi/qapi-events-introspect.o
CC qapi/qapi-events-job.o
CC qapi/qapi-events-migration.o
CC qapi/qapi-events-misc.o
CC qapi/qapi-events-net.o
CC qapi/qapi-events-rocker.o
CC qapi/qapi-events-run-state.o
CC qapi/qapi-events-sockets.o
CC qapi/qapi-events-tpm.o
CC qapi/qapi-events-trace.o
CC qapi/qapi-events-transaction.o
CC qapi/qapi-introspect.o
CC qapi/qapi-events-ui.o
CC qapi/qapi-visit-core.o
CC qapi/qapi-dealloc-visitor.o
CC qapi/qobject-input-visitor.o
CC qapi/qobject-output-visitor.o
CC qapi/qmp-registry.o
CC qapi/qmp-dispatch.o
CC qapi/string-input-visitor.o
CC qapi/string-output-visitor.o
CC qapi/opts-visitor.o
CC qapi/qapi-clone-visitor.o
CC qapi/qmp-event.o
CC qapi/qapi-util.o
CC qobject/qnull.o
CC qobject/qnum.o
CC qobject/qstring.o
CC qobject/qdict.o
CC qobject/qlist.o
CC qobject/qbool.o
CC qobject/qlit.o
CC qobject/qjson.o
CC qobject/qobject.o
CC qobject/json-lexer.o
CC qobject/json-streamer.o
CC qobject/json-parser.o
CC qobject/block-qdict.o
CC trace/simple.o
CC trace/control.o
CC trace/qmp.o
CC util/osdep.o
CC util/cutils.o
CC util/unicode.o
CC util/qemu-timer-common.o
CC util/bufferiszero.o
CC util/lockcnt.o
CC util/aiocb.o
CC util/aio-wait.o
CC util/async.o
CC util/thread-pool.o
CC util/qemu-timer.o
CC util/main-loop.o
CC util/iohandler.o
CC util/aio-win32.o
CC util/event_notifier-win32.o
CC util/oslib-win32.o
CC util/qemu-thread-win32.o
CC util/envlist.o
CC util/path.o
CC util/module.o
CC util/host-utils.o
CC util/bitmap.o
CC util/bitops.o
CC util/hbitmap.o
CC util/fifo8.o
CC util/acl.o
CC util/cacheinfo.o
CC util/error.o
CC util/qemu-error.o
CC util/id.o
CC util/iov.o
CC util/qemu-config.o
CC util/qemu-sockets.o
CC util/uri.o
CC util/notify.o
CC util/qemu-option.o
CC util/qemu-progress.o
CC util/keyval.o
CC util/hexdump.o
CC util/crc32c.o
CC util/uuid.o
CC util/getauxval.o
CC util/throttle.o
CC util/readline.o
CC util/rcu.o
CC util/qemu-coroutine.o
CC util/qemu-coroutine-lock.o
CC util/qemu-coroutine-io.o
CC util/qemu-coroutine-sleep.o
CC util/coroutine-win32.o
CC util/timed-average.o
CC util/buffer.o
CC util/base64.o
CC util/log.o
CC util/pagesize.o
CC util/qdist.o
CC util/qht.o
CC util/range.o
CC util/stats64.o
CC util/systemd.o
CC util/iova-tree.o
CC trace-root.o
CC accel/kvm/trace.o
CC accel/tcg/trace.o
CC audio/trace.o
CC block/trace.o
CC chardev/trace.o
CC crypto/trace.o
CC hw/9pfs/trace.o
CC hw/acpi/trace.o
CC hw/alpha/trace.o
CC hw/arm/trace.o
CC hw/audio/trace.o
CC hw/block/dataplane/trace.o
CC hw/block/trace.o
CC hw/char/trace.o
CC hw/display/trace.o
CC hw/dma/trace.o
CC hw/hppa/trace.o
CC hw/i2c/trace.o
CC hw/i386/trace.o
CC hw/i386/xen/trace.o
CC hw/ide/trace.o
CC hw/input/trace.o
CC hw/intc/trace.o
CC hw/isa/trace.o
CC hw/mem/trace.o
CC hw/misc/trace.o
CC hw/misc/macio/trace.o
CC hw/net/trace.o
CC hw/nvram/trace.o
CC hw/pci/trace.o
CC hw/pci-host/trace.o
CC hw/ppc/trace.o
CC hw/rdma/trace.o
CC hw/rdma/vmw/trace.o
CC hw/s390x/trace.o
CC hw/scsi/trace.o
CC hw/sd/trace.o
CC hw/sparc/trace.o
CC hw/sparc64/trace.o
CC hw/timer/trace.o
CC hw/tpm/trace.o
CC hw/usb/trace.o
CC hw/vfio/trace.o
CC hw/virtio/trace.o
CC hw/xen/trace.o
CC io/trace.o
CC linux-user/trace.o
CC migration/trace.o
CC nbd/trace.o
CC net/trace.o
CC qapi/trace.o
CC qom/trace.o
CC scsi/trace.o
CC target/i386/trace.o
CC target/arm/trace.o
CC target/mips/trace.o
CC target/ppc/trace.o
CC target/s390x/trace.o
CC ui/trace.o
CC target/sparc/trace.o
CC util/trace.o
CC crypto/pbkdf-stub.o
CC stubs/arch-query-cpu-def.o
CC stubs/arch-query-cpu-model-expansion.o
CC stubs/arch-query-cpu-model-comparison.o
CC stubs/arch-query-cpu-model-baseline.o
CC stubs/bdrv-next-monitor-owned.o
CC stubs/blk-commit-all.o
CC stubs/blockdev-close-all-bdrv-states.o
CC stubs/clock-warp.o
CC stubs/cpu-get-clock.o
CC stubs/cpu-get-icount.o
CC stubs/error-printf.o
CC stubs/dump.o
CC stubs/fdset.o
CC stubs/gdbstub.o
CC stubs/get-vm-name.o
CC stubs/iothread.o
CC stubs/iothread-lock.o
CC stubs/is-daemonized.o
CC stubs/machine-init-done.o
CC stubs/migr-blocker.o
CC stubs/change-state-handler.o
CC stubs/monitor.o
CC stubs/notify-event.o
CC stubs/qtest.o
CC stubs/replay.o
CC stubs/runstate-check.o
CC stubs/set-fd-handler.o
CC stubs/sysbus.o
CC stubs/slirp.o
CC stubs/tpm.o
CC stubs/trace-control.o
CC stubs/uuid.o
CC stubs/vm-stop.o
CC stubs/vmstate.o
CC stubs/fd-register.o
CC stubs/qmp_memory_device.o
CC stubs/target-monitor-defs.o
CC stubs/target-get-monitor-def.o
CC stubs/pc_madt_cpu_entry.o
CC stubs/vmgenid.o
CC stubs/xen-common.o
CC stubs/xen-hvm.o
CC stubs/pci-host-piix.o
CC stubs/ram-block.o
GEN qemu-img-cmds.h
CC block.o
CC blockjob.o
CC job.o
CC qemu-io-cmds.o
CC replication.o
CC block/raw-format.o
CC block/qcow.o
CC block/vdi.o
CC block/vmdk.o
CC block/cloop.o
CC block/bochs.o
CC block/vpc.o
CC block/vvfat.o
CC block/dmg.o
CC block/qcow2.o
CC block/qcow2-refcount.o
CC block/qcow2-cluster.o
CC block/qcow2-snapshot.o
CC block/qcow2-cache.o
CC block/qcow2-bitmap.o
CC block/qed.o
CC block/qed-l2-cache.o
CC block/qed-table.o
CC block/qed-cluster.o
CC block/qed-check.o
CC block/vhdx.o
CC block/vhdx-endian.o
CC block/vhdx-log.o
CC block/quorum.o
CC block/parallels.o
CC block/blkdebug.o
CC block/blkverify.o
CC block/blkreplay.o
CC block/block-backend.o
CC block/snapshot.o
CC block/qapi.o
CC block/file-win32.o
CC block/win32-aio.o
CC block/null.o
CC block/mirror.o
CC block/commit.o
CC block/io.o
CC block/create.o
CC block/throttle-groups.o
CC block/nbd.o
CC block/nbd-client.o
CC block/accounting.o
CC block/sheepdog.o
CC block/dirty-bitmap.o
CC block/write-threshold.o
CC block/backup.o
CC block/replication.o
CC block/throttle.o
CC block/copy-on-read.o
CC block/crypto.o
CC nbd/server.o
CC nbd/client.o
CC nbd/common.o
CC scsi/utils.o
CC block/curl.o
CC block/ssh.o
CC block/dmg-bz2.o
CC crypto/init.o
CC crypto/hash.o
CC crypto/hash-nettle.o
CC crypto/hmac.o
CC crypto/hmac-nettle.o
CC crypto/aes.o
CC crypto/desrfb.o
CC crypto/cipher.o
CC crypto/tlscreds.o
CC crypto/tlscredsanon.o
CC crypto/tlscredsx509.o
CC crypto/tlssession.o
CC crypto/secret.o
CC crypto/random-gnutls.o
CC crypto/pbkdf.o
CC crypto/pbkdf-nettle.o
CC crypto/ivgen.o
CC crypto/ivgen-essiv.o
CC crypto/ivgen-plain.o
CC crypto/ivgen-plain64.o
CC crypto/afsplit.o
CC crypto/xts.o
CC crypto/block.o
CC crypto/block-qcow.o
CC crypto/block-luks.o
CC io/channel.o
CC io/channel-buffer.o
CC io/channel-command.o
CC io/channel-file.o
CC io/channel-socket.o
CC io/channel-tls.o
CC io/channel-watch.o
CC io/channel-websock.o
CC io/channel-util.o
CC io/dns-resolver.o
CC io/net-listener.o
CC io/task.o
CC qom/object.o
CC qom/container.o
CC qom/qom-qobject.o
CC qom/object_interfaces.o
CC qemu-io.o
CC blockdev.o
CC blockdev-nbd.o
CC bootdevice.o
CC iothread.o
CC job-qmp.o
CC qdev-monitor.o
CC device-hotplug.o
CC os-win32.o
CC bt-host.o
CC bt-vhci.o
CC dma-helpers.o
CC vl.o
CC tpm.o
CC device_tree.o
CC qapi/qapi-commands.o
CC qapi/qapi-commands-block-core.o
CC qapi/qapi-commands-block.o
CC qapi/qapi-commands-char.o
CC qapi/qapi-commands-common.o
CC qapi/qapi-commands-crypto.o
CC qapi/qapi-commands-introspect.o
CC qapi/qapi-commands-job.o
CC qapi/qapi-commands-migration.o
CC qapi/qapi-commands-misc.o
CC qapi/qapi-commands-net.o
CC qapi/qapi-commands-rocker.o
CC qapi/qapi-commands-run-state.o
CC qapi/qapi-commands-sockets.o
CC qapi/qapi-commands-tpm.o
CC qapi/qapi-commands-trace.o
CC qapi/qapi-commands-transaction.o
CC qapi/qapi-commands-ui.o
CC qmp.o
CC hmp.o
CC cpus-common.o
CC audio/audio.o
CC audio/noaudio.o
CC audio/wavaudio.o
CC audio/mixeng.o
CC audio/dsoundaudio.o
CC audio/audio_win_int.o
CC audio/wavcapture.o
CC backends/rng.o
CC backends/rng-egd.o
CC backends/tpm.o
CC backends/hostmem.o
CC backends/hostmem-ram.o
CC backends/cryptodev.o
CC backends/cryptodev-builtin.o
CC backends/cryptodev-vhost.o
CC block/stream.o
CC chardev/msmouse.o
CC chardev/wctablet.o
CC chardev/testdev.o
CC disas/arm.o
CXX disas/arm-a64.o
CC disas/i386.o
CXX disas/libvixl/vixl/utils.o
/tmp/qemu-test/src/nbd/server.c: In function 'nbd_trip':
/tmp/qemu-test/src/nbd/server.c:1980:19: error: 'end' may be used uninitialized in this function [-Werror=maybe-uninitialized]
*length = end - offset;
~~~~^~~~~~~~
/tmp/qemu-test/src/nbd/server.c:1940:30: note: 'end' was declared here
uint64_t begin = offset, end;
^~~cc1: all warnings being treated as errors
make: *** [/tmp/qemu-test/src/rules.mak:69: nbd/server.o] Error 1
make: *** Waiting for unfinished jobs....
Traceback (most recent call last):
File "./tests/docker/docker.py", line 526, in <module>
sys.exit(main())
File "./tests/docker/docker.py", line 523, in main
return args.cmdobj.run(args, argv)
File "./tests/docker/docker.py", line 279, in run
return Docker().run(argv, args.keep, quiet=args.quiet)
File "./tests/docker/docker.py", line 247, in run
quiet=quiet)
File "./tests/docker/docker.py", line 154, in _do_check
return subprocess.check_call(self._command + cmd, **kwargs)
File "/usr/lib64/python2.7/subprocess.py", line 186, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['docker', 'run', '--label', 'com.qemu.instance.uuid=4a7633a2762211e8aa8552540069c830', '-u', '0', '--security-opt', 'seccomp=unconfined', '--rm', '--net=none', '-e', 'TARGET_LIST=', '-e', 'EXTRA_CONFIGURE_OPTS=', '-e', 'V=', '-e', 'J=8', '-e', 'DEBUG=', '-e', 'SHOW_ENV=1', '-e', 'CCACHE_DIR=/var/tmp/ccache', '-v', '/root/.cache/qemu-docker-ccache:/var/tmp/ccache:z', '-v', '/var/tmp/patchew-tester-tmp-8ft1b4rs/src/docker-src.2018-06-22-09.43.36.24811:/var/tmp/qemu:z,ro', 'qemu:fedora', '/var/tmp/qemu/run', 'test-mingw']' returned non-zero exit status 2 make[1]: *** [tests/docker/Makefile.include:164: docker-run] Error 1
make[1]: Leaving directory '/var/tmp/patchew-tester-tmp-8ft1b4rs/src'
make: *** [tests/docker/Makefile.include:198: docker-run-test-mingw@fedora] Error 2
real 2m1.005s
user 0m4.841s
sys 0m3.977s
=== OUTPUT END ===
Test command exited with code: 2
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to [email protected]
Peter Maydell
AppliedQuoted 15 lines · David Gibson
The following changes since commit
46012db666990ff2eed1d3dc199ab8006439a93b:Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20180619' into staging (2018-06-20 09:51:30 +0100)
are available in the Git repository at:
git://github.com/dgibson/qemu.gittags/ppc-for-3.0-20180622for you to fetch changes up to
e5ca28ecab5c69b7578e22391a66c97c3979ffd8:spapr: Don't rewrite mmu capabilities in KVM mode (2018-06-22 14:19:07 +1000)
----------------------------------------------------------------
ppc patch queue 2018-06-22
Quoted 6 lines
Another assorted patch of patches for ppc and spapr.
* Rework of guest pagesize handling for ppc, which avoids guest visibly different behaviour between accelerators
* A number of Pnv cleanups, working towards more complete POWER9 support
* Migration of VPA data, a significant bugfix
Applied, thanks.
-- PMM
Quoted 23 lines · Peter Maydell
Quoted 15 lines · David Gibson
The following changes since commit
46012db666990ff2eed1d3dc199ab8006439a93b:Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20180619' into staging (2018-06-20 09:51:30 +0100)are available in the Git repository at:
git://github.com/dgibson/qemu.git tags/ppc-for-3.0-20180622for you to fetch changes up to
e5ca28ecab5c69b7578e22391a66c97c3979ffd8:spapr: Don't rewrite mmu capabilities in KVM mode (2018-06-22 14:19:07 +1000)
----------------------------------------------------------------
ppc patch queue 2018-06-22Quoted 6 lines
Another assorted patch of patches for ppc and spapr.
* Rework of guest pagesize handling for ppc, which avoids guest visibly different behaviour between accelerators
* A number of Pnv cleanups, working towards more complete POWER9 support
* Migration of VPA data, a significant bugfix
Quoted 3 lines
Applied, thanks.
-- PMM
Looks like this is missing the 2 Mac commits I submitted that David added to the PR this morning?
https://lists.gnu.org/archive/html/qemu-devel/2018-06/msg06540.html
https://lists.gnu.org/archive/html/qemu-devel/2018-06/msg06536.html
David, did you forget to re-push the updated tag?
ATB,
Mark.
Quoted 28 lines · Peter Maydell
Quoted 24 lines · David Gibson
Quoted 15 lines
The following changes since commit
46012db666990ff2eed1d3dc199ab8006439a93b:Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20180619' into staging (2018-06-20 09:51:30 +0100)are available in the Git repository at:
git://github.com/dgibson/qemu.git tags/ppc-for-3.0-20180622for you to fetch changes up to
e5ca28ecab5c69b7578e22391a66c97c3979ffd8:spapr: Don't rewrite mmu capabilities in KVM mode (2018-06-22 14:19:07 +1000)
----------------------------------------------------------------
ppc patch queue 2018-06-22Quoted 6 lines
Another assorted patch of patches for ppc and spapr.
* Rework of guest pagesize handling for ppc, which avoids guest visibly different behaviour between accelerators
* A number of Pnv cleanups, working towards more complete POWER9 support
* Migration of VPA data, a significant bugfixQuoted 3 lines
Applied, thanks.
-- PMM
Quoted 7 lines
Looks like this is missing the 2 Mac commits I submitted that David added to the PR this morning?
https://lists.gnu.org/archive/html/qemu-devel/2018-06/msg06540.html
https://lists.gnu.org/archive/html/qemu-devel/2018-06/msg06536.htmlDavid, did you forget to re-push the updated tag?
They just missed the window, sorry. I merged them after I'd already tagged and tested the pull request.
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 33 lines · David Gibson
Quoted 31 lines · Peter Maydell
Quoted 24 lines · David Gibson
Quoted 15 lines
The following changes since commit
46012db666990ff2eed1d3dc199ab8006439a93b:Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20180619' into staging (2018-06-20 09:51:30 +0100)are available in the Git repository at:
git://github.com/dgibson/qemu.git tags/ppc-for-3.0-20180622for you to fetch changes up to
e5ca28ecab5c69b7578e22391a66c97c3979ffd8:spapr: Don't rewrite mmu capabilities in KVM mode (2018-06-22 14:19:07 +1000)----------------------------------------------------------------
ppc patch queue 2018-06-22Quoted 6 lines
Another assorted patch of patches for ppc and spapr.
* Rework of guest pagesize handling for ppc, which avoids guest visibly different behaviour between accelerators
* A number of Pnv cleanups, working towards more complete POWER9 support
* Migration of VPA data, a significant bugfixQuoted 3 lines
Applied, thanks.
-- PMM
Looks like this is missing the 2 Mac commits I submitted that David added to the PR this morning?
Quoted 7 lines
Quoted 4 lines
https://lists.gnu.org/archive/html/qemu-devel/2018-06/msg06540.html
https://lists.gnu.org/archive/html/qemu-devel/2018-06/msg06536.htmlDavid, did you forget to re-push the updated tag?
They just missed the window, sorry. I merged them after I'd already tagged and tested the pull request.
Okay, as long as you didn't forget them :)
My confusion came from the fact that the emails you sent for the PR yesterday contained my patches as patches 24 and 25, although they aren't included in the cover letter or the github tag.
ATB,
Mark.
Quoted 40 lines · Mark Cave-Ayland
Quoted 38 lines · David Gibson
Quoted 35 lines · Peter Maydell
Quoted 24 lines · David Gibson
Quoted 15 lines
The following changes since commit
46012db666990ff2eed1d3dc199ab8006439a93b:Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20180619' into staging (2018-06-20 09:51:30 +0100)are available in the Git repository at:
git://github.com/dgibson/qemu.git tags/ppc-for-3.0-20180622for you to fetch changes up to
e5ca28ecab5c69b7578e22391a66c97c3979ffd8:spapr: Don't rewrite mmu capabilities in KVM mode (2018-06-22 14:19:07 +1000)----------------------------------------------------------------
ppc patch queue 2018-06-22Quoted 6 lines
Another assorted patch of patches for ppc and spapr.
* Rework of guest pagesize handling for ppc, which avoids guest visibly different behaviour between accelerators
* A number of Pnv cleanups, working towards more complete POWER9 support
* Migration of VPA data, a significant bugfixQuoted 3 lines
Applied, thanks.
-- PMM
Looks like this is missing the 2 Mac commits I submitted that David added to the PR this morning?
https://lists.gnu.org/archive/html/qemu-devel/2018-06/msg06540.html
https://lists.gnu.org/archive/html/qemu-devel/2018-06/msg06536.htmlDavid, did you forget to re-push the updated tag?
Quoted 8 lines
Quoted 2 lines
They just missed the window, sorry. I merged them after I'd already tagged and tested the pull request.
Okay, as long as you didn't forget them :)
My confusion came from the fact that the emails you sent for the PR yesterday contained my patches as patches 24 and 25, although they aren't included in the cover letter or the github tag.
Ah, right. So I realized that bogus set of mails was the result of pointing git send-email at a git range instead of the batch of mails already prepared for the pull request. Which meant for one they weren't properly formatted for a PR, and also it included the couple of patches of yours I'd applied after tagging the PR.
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