mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 00:03:54 -06:00
ppc patch queue 2017-06-06
Accumulated patches for ppc targets and the pseries machine type. The big thing in this batch is a start on a substantial cleanup of the pseries hotplug mechanisms, which were pretty confusing. For now these shouldn't cause substantial behavioural changes, but I am hoping these lead to clearer code and eventually to fixes for the bugs we have in hotplug handling, particularly when hotplug and migration are combined. The remaining patches are mostly bugfixes. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJZNhgSAAoJEGw4ysog2bOSERwP/A7T7UJ8XXWit9QXGCi+G83w +RUuHxjA9qFqrg1zYqFyLg3ctGl93Sxu7mzI5MOIKwAVXlTsE6+84TH7zBc18DPB fekPWmzJ6jfiVO+1Zg1JPWorMfIHDDc2v6Q6qPfD8KWbt02yPfrXbKlivQB4hVZ4 Qb4VJdjZgBDcVy79xhcW5k6v8dVw8PdSyDmkQrBhccI0noLerhI41Mgt7QQaWQRH Le3ziexUpWelVCRQB0FqE/PIWo2+NY/e0pumX7Aqtjs/G35KjOXy0ja3yKLjfeUW Z4NugIO2I2hncERa68YFar/BqG26DX8KCErNMDkn7LyZcoDAQWhcDH+65G1BNuf2 jW+KApMNm+N1vXabbz8P9BbLjuZpRQQhyPOxB3I8UGaTYGtCPe/lUCe2/V8EbKNa VFavc1UuLftOZuJj/rYGJeU/4JBU6srbAKCO3VVK4Tnd8DyiT3QCpUWEkjv+J6jo co35oYBavLfQPMr+rsX15lgbmZwg7iBV+dgKLa2+cwmKXzCf7aYe38aJy7nRBmhb ivhH3bKtdysy0qq4UYaCgW06qQcVF0QMJaxFQ0X7I+GBNwHA7wdZD/i6IMcO6Z7H 7gQdavBTdukgKb2+pVjR58H13ieHXuBxktonhOz70rvEDVa4xx8pxhnZlpSiH2ha RzpkhanrwEeECG6Lke/3 =QDWB -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-2.10-20170606' into staging ppc patch queue 2017-06-06 Accumulated patches for ppc targets and the pseries machine type. The big thing in this batch is a start on a substantial cleanup of the pseries hotplug mechanisms, which were pretty confusing. For now these shouldn't cause substantial behavioural changes, but I am hoping these lead to clearer code and eventually to fixes for the bugs we have in hotplug handling, particularly when hotplug and migration are combined. The remaining patches are mostly bugfixes. # gpg: Signature made Tue 06 Jun 2017 03:48:50 BST # gpg: using RSA key 0x6C38CACA20D9B392 # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" # gpg: aka "David Gibson (Red Hat) <dgibson@redhat.com>" # gpg: aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" # gpg: aka "David Gibson (kernel.org) <dwg@kernel.org>" # Primary key fingerprint: 75F4 6586 AE61 A66C C44E 87DC 6C38 CACA 20D9 B392 * remotes/dgibson/tags/ppc-for-2.10-20170606: spapr: Remove some non-useful properties on DRC objects spapr: Eliminate spapr_drc_get_type_str() spapr: Move configure-connector state into DRC spapr: Clean up spapr_dr_connector_by_*() spapr: Introduce DRC subclasses spapr/drc: don't migrate DRC of cold-plugged CPUs and LMBs spapr: Allow boot from vhost-*-scsi backends ppc/pnv: check the return value of fdt_setprop() spapr_nvram: Check return value from blk_getlength() target/ppc: Fixup set_spr error in h_register_process_table target-ppc: Fix openpic timer read register offset spapr: Make DRC get_index and get_type methods into plain functions spapr: Abolish DRC set_configured method spapr: Abolish DRC get_fdt method spapr: Move DRC RTAS calls into spapr_drc.c migration: Mark CPU states dirty before incoming migration/loadvm migration: remove register_savevm() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
e02bbe1956
24 changed files with 595 additions and 591 deletions
|
@ -11,7 +11,6 @@
|
|||
struct VIOsPAPRBus;
|
||||
struct sPAPRPHBState;
|
||||
struct sPAPRNVRAM;
|
||||
typedef struct sPAPRConfigureConnectorState sPAPRConfigureConnectorState;
|
||||
typedef struct sPAPREventLogEntry sPAPREventLogEntry;
|
||||
typedef struct sPAPREventSource sPAPREventSource;
|
||||
|
||||
|
@ -102,9 +101,6 @@ struct sPAPRMachineState {
|
|||
bool htab_first_pass;
|
||||
int htab_fd;
|
||||
|
||||
/* RTAS state */
|
||||
QTAILQ_HEAD(, sPAPRConfigureConnectorState) ccs_list;
|
||||
|
||||
/* Pending DIMM unplug cache. It is populated when a LMB
|
||||
* unplug starts. It can be regenerated if a migration
|
||||
* occurs during the unplug process. */
|
||||
|
@ -646,16 +642,6 @@ void *spapr_populate_hotplug_cpu_dt(CPUState *cs, int *fdt_offset,
|
|||
void spapr_core_release(DeviceState *dev);
|
||||
void spapr_lmb_release(DeviceState *dev);
|
||||
|
||||
/* rtas-configure-connector state */
|
||||
struct sPAPRConfigureConnectorState {
|
||||
uint32_t drc_index;
|
||||
int fdt_offset;
|
||||
int fdt_depth;
|
||||
QTAILQ_ENTRY(sPAPRConfigureConnectorState) next;
|
||||
};
|
||||
|
||||
void spapr_ccs_reset_hook(void *opaque);
|
||||
|
||||
void spapr_rtc_read(sPAPRRTCState *rtc, struct tm *tm, uint32_t *ns);
|
||||
int spapr_rtc_import_offset(sPAPRRTCState *rtc, int64_t legacy_offset);
|
||||
|
||||
|
|
|
@ -26,6 +26,48 @@
|
|||
#define SPAPR_DR_CONNECTOR(obj) OBJECT_CHECK(sPAPRDRConnector, (obj), \
|
||||
TYPE_SPAPR_DR_CONNECTOR)
|
||||
|
||||
#define TYPE_SPAPR_DRC_PHYSICAL "spapr-drc-physical"
|
||||
#define SPAPR_DRC_PHYSICAL_GET_CLASS(obj) \
|
||||
OBJECT_GET_CLASS(sPAPRDRConnectorClass, obj, TYPE_SPAPR_DRC_PHYSICAL)
|
||||
#define SPAPR_DRC_PHYSICAL_CLASS(klass) \
|
||||
OBJECT_CLASS_CHECK(sPAPRDRConnectorClass, klass, \
|
||||
TYPE_SPAPR_DRC_PHYSICAL)
|
||||
#define SPAPR_DRC_PHYSICAL(obj) OBJECT_CHECK(sPAPRDRConnector, (obj), \
|
||||
TYPE_SPAPR_DRC_PHYSICAL)
|
||||
|
||||
#define TYPE_SPAPR_DRC_LOGICAL "spapr-drc-logical"
|
||||
#define SPAPR_DRC_LOGICAL_GET_CLASS(obj) \
|
||||
OBJECT_GET_CLASS(sPAPRDRConnectorClass, obj, TYPE_SPAPR_DRC_LOGICAL)
|
||||
#define SPAPR_DRC_LOGICAL_CLASS(klass) \
|
||||
OBJECT_CLASS_CHECK(sPAPRDRConnectorClass, klass, \
|
||||
TYPE_SPAPR_DRC_LOGICAL)
|
||||
#define SPAPR_DRC_LOGICAL(obj) OBJECT_CHECK(sPAPRDRConnector, (obj), \
|
||||
TYPE_SPAPR_DRC_LOGICAL)
|
||||
|
||||
#define TYPE_SPAPR_DRC_CPU "spapr-drc-cpu"
|
||||
#define SPAPR_DRC_CPU_GET_CLASS(obj) \
|
||||
OBJECT_GET_CLASS(sPAPRDRConnectorClass, obj, TYPE_SPAPR_DRC_CPU)
|
||||
#define SPAPR_DRC_CPU_CLASS(klass) \
|
||||
OBJECT_CLASS_CHECK(sPAPRDRConnectorClass, klass, TYPE_SPAPR_DRC_CPU)
|
||||
#define SPAPR_DRC_CPU(obj) OBJECT_CHECK(sPAPRDRConnector, (obj), \
|
||||
TYPE_SPAPR_DRC_CPU)
|
||||
|
||||
#define TYPE_SPAPR_DRC_PCI "spapr-drc-pci"
|
||||
#define SPAPR_DRC_PCI_GET_CLASS(obj) \
|
||||
OBJECT_GET_CLASS(sPAPRDRConnectorClass, obj, TYPE_SPAPR_DRC_PCI)
|
||||
#define SPAPR_DRC_PCI_CLASS(klass) \
|
||||
OBJECT_CLASS_CHECK(sPAPRDRConnectorClass, klass, TYPE_SPAPR_DRC_PCI)
|
||||
#define SPAPR_DRC_PCI(obj) OBJECT_CHECK(sPAPRDRConnector, (obj), \
|
||||
TYPE_SPAPR_DRC_PCI)
|
||||
|
||||
#define TYPE_SPAPR_DRC_LMB "spapr-drc-lmb"
|
||||
#define SPAPR_DRC_LMB_GET_CLASS(obj) \
|
||||
OBJECT_GET_CLASS(sPAPRDRConnectorClass, obj, TYPE_SPAPR_DRC_LMB)
|
||||
#define SPAPR_DRC_LMB_CLASS(klass) \
|
||||
OBJECT_CLASS_CHECK(sPAPRDRConnectorClass, klass, TYPE_SPAPR_DRC_LMB)
|
||||
#define SPAPR_DRC_LMB(obj) OBJECT_CHECK(sPAPRDRConnector, (obj), \
|
||||
TYPE_SPAPR_DRC_LMB)
|
||||
|
||||
/*
|
||||
* Various hotplug types managed by sPAPRDRConnector
|
||||
*
|
||||
|
@ -130,11 +172,16 @@ typedef enum {
|
|||
SPAPR_DR_CC_RESPONSE_NOT_CONFIGURABLE = -9003,
|
||||
} sPAPRDRCCResponse;
|
||||
|
||||
/* rtas-configure-connector state */
|
||||
typedef struct sPAPRConfigureConnectorState {
|
||||
int fdt_offset;
|
||||
int fdt_depth;
|
||||
} sPAPRConfigureConnectorState;
|
||||
|
||||
typedef struct sPAPRDRConnector {
|
||||
/*< private >*/
|
||||
DeviceState parent;
|
||||
|
||||
sPAPRDRConnectorType type;
|
||||
uint32_t id;
|
||||
Object *owner;
|
||||
const char *name;
|
||||
|
@ -148,6 +195,7 @@ typedef struct sPAPRDRConnector {
|
|||
void *fdt;
|
||||
int fdt_start_offset;
|
||||
bool configured;
|
||||
sPAPRConfigureConnectorState *ccs;
|
||||
|
||||
bool awaiting_release;
|
||||
bool signalled;
|
||||
|
@ -163,6 +211,8 @@ typedef struct sPAPRDRConnectorClass {
|
|||
DeviceClass parent;
|
||||
|
||||
/*< public >*/
|
||||
sPAPRDRConnectorTypeShift typeshift;
|
||||
const char *typename; /* used in device tree, PAPR 13.5.2.6 & C.6.1 */
|
||||
|
||||
/* accessors for guest-visible (generally via RTAS) DR state */
|
||||
uint32_t (*set_isolation_state)(sPAPRDRConnector *drc,
|
||||
|
@ -171,16 +221,10 @@ typedef struct sPAPRDRConnectorClass {
|
|||
sPAPRDRIndicatorState state);
|
||||
uint32_t (*set_allocation_state)(sPAPRDRConnector *drc,
|
||||
sPAPRDRAllocationState state);
|
||||
uint32_t (*get_index)(sPAPRDRConnector *drc);
|
||||
uint32_t (*get_type)(sPAPRDRConnector *drc);
|
||||
const char *(*get_name)(sPAPRDRConnector *drc);
|
||||
|
||||
uint32_t (*entity_sense)(sPAPRDRConnector *drc, sPAPRDREntitySense *state);
|
||||
|
||||
/* QEMU interfaces for managing FDT/configure-connector */
|
||||
const void *(*get_fdt)(sPAPRDRConnector *drc, int *fdt_start_offset);
|
||||
void (*set_configured)(sPAPRDRConnector *drc);
|
||||
|
||||
/* QEMU interfaces for managing hotplug operations */
|
||||
void (*attach)(sPAPRDRConnector *drc, DeviceState *d, void *fdt,
|
||||
int fdt_start_offset, bool coldplug, Error **errp);
|
||||
|
@ -189,12 +233,13 @@ typedef struct sPAPRDRConnectorClass {
|
|||
void (*set_signalled)(sPAPRDRConnector *drc);
|
||||
} sPAPRDRConnectorClass;
|
||||
|
||||
sPAPRDRConnector *spapr_dr_connector_new(Object *owner,
|
||||
sPAPRDRConnectorType type,
|
||||
uint32_t spapr_drc_index(sPAPRDRConnector *drc);
|
||||
sPAPRDRConnectorType spapr_drc_type(sPAPRDRConnector *drc);
|
||||
|
||||
sPAPRDRConnector *spapr_dr_connector_new(Object *owner, const char *type,
|
||||
uint32_t id);
|
||||
sPAPRDRConnector *spapr_dr_connector_by_index(uint32_t index);
|
||||
sPAPRDRConnector *spapr_dr_connector_by_id(sPAPRDRConnectorType type,
|
||||
uint32_t id);
|
||||
sPAPRDRConnector *spapr_drc_by_index(uint32_t index);
|
||||
sPAPRDRConnector *spapr_drc_by_id(const char *type, uint32_t id);
|
||||
int spapr_drc_populate_dt(void *fdt, int fdt_offset, Object *owner,
|
||||
uint32_t drc_type_mask);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue