From 04d0ffbd52ccd3d6e9db3d74e29d89dc8ff3fa75 Mon Sep 17 00:00:00 2001 From: Greg Kurz Date: Fri, 30 Jun 2017 15:18:10 +0200 Subject: spapr: make spapr_populate_hotplug_cpu_dt() static Since commit ff9006ddbfd1 ("spapr: move spapr_core_[foo]plug() callbacks close to machine code in spapr.c"), this function doesn't need to be extern anymore. Signed-off-by: Greg Kurz Signed-off-by: David Gibson --- include/hw/ppc/spapr.h | 2 -- 1 file changed, 2 deletions(-) (limited to 'include/hw') diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index a66bbac..12bf969 100644 --- a/include/hw/ppc/spapr.h +++ b/include/hw/ppc/spapr.h @@ -640,8 +640,6 @@ void spapr_hotplug_req_add_by_count_indexed(sPAPRDRConnectorType drc_type, void spapr_hotplug_req_remove_by_count_indexed(sPAPRDRConnectorType drc_type, uint32_t count, uint32_t index); void spapr_cpu_parse_features(sPAPRMachineState *spapr); -void *spapr_populate_hotplug_cpu_dt(CPUState *cs, int *fdt_offset, - sPAPRMachineState *spapr); /* CPU and LMB DRC release callbacks. */ void spapr_core_release(DeviceState *dev); -- cgit v1.1 From 498cd99544a456f003e92342c7be471e967c1f31 Mon Sep 17 00:00:00 2001 From: Greg Kurz Date: Fri, 30 Jun 2017 12:05:32 +0200 Subject: spapr: refresh "platform-specific" hcalls comment We have more of these since the addition of KVMPPC_H_LOGICAL_MEMOP in 2012. Signed-off-by: Greg Kurz Reviewed-by: Thomas Huth Signed-off-by: David Gibson --- include/hw/ppc/spapr.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'include/hw') diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index 12bf969..a184ffa 100644 --- a/include/hw/ppc/spapr.h +++ b/include/hw/ppc/spapr.h @@ -377,9 +377,8 @@ struct sPAPRMachineState { * as well. * * We also need some hcalls which are specific to qemu / KVM-on-POWER. - * So far we just need one for H_RTAS, but in future we'll need more - * for extensions like virtio. We put those into the 0xf000-0xfffc - * range which is reserved by PAPR for "platform-specific" hcalls. + * We put those into the 0xf000-0xfffc range which is reserved by PAPR + * for "platform-specific" hcalls. */ #define KVMPPC_HCALL_BASE 0xf000 #define KVMPPC_H_RTAS (KVMPPC_HCALL_BASE + 0x0) -- cgit v1.1 From 6b762f29a8bc9feb3e45d512169571d3cc8a4f48 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Fri, 16 Jun 2017 16:19:20 +0800 Subject: spapr: Add DRC release method At the moment, spapr_drc_release() has an ugly switch on the DRC type to call the right, device-specific release function. This cleans it up by doing that via a proper QOM method. It's still arguably an abstraction violation for the DRC code to call into the specific device code, but one mess at a time. Signed-off-by: David Gibson Reviewed-by: Laurent Vivier Reviewed-by: Greg Kurz --- include/hw/ppc/spapr_drc.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/hw') diff --git a/include/hw/ppc/spapr_drc.h b/include/hw/ppc/spapr_drc.h index d9cacb3..6fd84d1 100644 --- a/include/hw/ppc/spapr_drc.h +++ b/include/hw/ppc/spapr_drc.h @@ -217,6 +217,7 @@ typedef struct sPAPRDRConnectorClass { sPAPRDREntitySense (*dr_entity_sense)(sPAPRDRConnector *drc); uint32_t (*isolate)(sPAPRDRConnector *drc); uint32_t (*unisolate)(sPAPRDRConnector *drc); + void (*release)(DeviceState *dev); /* QEMU interfaces for managing hotplug operations */ bool (*release_pending)(sPAPRDRConnector *drc); -- cgit v1.1 From 5c1da81215c7f4f010fbc0c146945a6f182e5586 Mon Sep 17 00:00:00 2001 From: David Gibson Date: Mon, 19 Jun 2017 13:16:21 +0800 Subject: spapr: Remove unnecessary differences between hotplug and coldplug paths spapr_drc_attach() has a 'coldplug' parameter which sets the DRC into configured state initially, instead of the usual ISOLATED/UNUSABLE state. It turns out this is unnecessary: although coldplugged devices do need to be in CONFIGURED state once the guest starts, that will already be accomplished by the reset code which will move DRCs for already plugged devices into a coldplug equivalent state. Signed-off-by: David Gibson Reviewed-by: Laurent Vivier Reviewed-by: Greg Kurz --- include/hw/ppc/spapr_drc.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/hw') diff --git a/include/hw/ppc/spapr_drc.h b/include/hw/ppc/spapr_drc.h index 6fd84d1..d15e9eb 100644 --- a/include/hw/ppc/spapr_drc.h +++ b/include/hw/ppc/spapr_drc.h @@ -234,7 +234,7 @@ int spapr_drc_populate_dt(void *fdt, int fdt_offset, Object *owner, uint32_t drc_type_mask); void spapr_drc_attach(sPAPRDRConnector *drc, DeviceState *d, void *fdt, - int fdt_start_offset, bool coldplug, Error **errp); + int fdt_start_offset, Error **errp); void spapr_drc_detach(sPAPRDRConnector *drc, DeviceState *d, Error **errp); #endif /* HW_SPAPR_DRC_H */ -- cgit v1.1 From f2b14e3a9f2e6c6c35a90dd282ea55e8bcb61b8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Le=20Goater?= Date: Wed, 5 Jul 2017 19:13:14 +0200 Subject: spapr: introduce the XIVE_EXPLOIT option in CAS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On POWER9, the Client Architecture Support (CAS) negotiation process determines whether the guest operates in XIVE Legacy compatibility (the former POWER8 interrupt model) or in XIVE exploitation mode (the newer POWER9 interrupt model). Bit 7 of Byte 23 of vector 5 is used for this purpose. Signed-off-by: Cédric Le Goater Signed-off-by: David Gibson --- include/hw/ppc/spapr_ovec.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/hw') diff --git a/include/hw/ppc/spapr_ovec.h b/include/hw/ppc/spapr_ovec.h index f088833..0b464e2 100644 --- a/include/hw/ppc/spapr_ovec.h +++ b/include/hw/ppc/spapr_ovec.h @@ -50,6 +50,7 @@ typedef struct sPAPROptionVector sPAPROptionVector; #define OV5_DRCONF_MEMORY OV_BIT(2, 2) #define OV5_FORM1_AFFINITY OV_BIT(5, 0) #define OV5_HP_EVT OV_BIT(6, 5) +#define OV5_XIVE_EXPLOIT OV_BIT(23, 7) /* ISA 3.00 MMU features: */ #define OV5_MMU_BOTH OV_BIT(24, 0) /* Radix and hash */ -- cgit v1.1