From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:42089) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yn02s-0001Ug-GK for qemu-devel@nongnu.org; Tue, 28 Apr 2015 03:35:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yn02p-0006cM-8K for qemu-devel@nongnu.org; Tue, 28 Apr 2015 03:35:06 -0400 Date: Tue, 28 Apr 2015 17:26:50 +1000 From: David Gibson Message-ID: <20150428072650.GC24753@voom.redhat.com> References: <1429684100-13354-1-git-send-email-mdroth@linux.vnet.ibm.com> <1429684100-13354-13-git-send-email-mdroth@linux.vnet.ibm.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Sr1nOIr3CvdE5hEN" Content-Disposition: inline In-Reply-To: <1429684100-13354-13-git-send-email-mdroth@linux.vnet.ibm.com> Subject: Re: [Qemu-devel] [PATCH v8 12/16] spapr_pci: add dynamic-reconfiguration option for spapr-pci-host-bridge List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Michael Roth Cc: aik@ozlabs.ru, qemu-devel@nongnu.org, agraf@suse.de, qemu-ppc@nongnu.org, tyreld@linux.vnet.ibm.com, bharata.rao@gmail.com, nfont@linux.vnet.ibm.com --Sr1nOIr3CvdE5hEN Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Apr 22, 2015 at 01:28:16AM -0500, Michael Roth wrote: > This option enables/disables PCI hotplug for a particular PHB. >=20 > Also add machine compatibility code to disable it by default for machine > types prior to pseries-2.4. >=20 > Signed-off-by: Michael Roth > Reviewed-by: David Gibson > --- > hw/ppc/spapr.c | 15 ++++++++++++++- > hw/ppc/spapr_pci.c | 2 ++ > include/hw/pci-host/spapr.h | 1 + > 3 files changed, 17 insertions(+), 1 deletion(-) >=20 > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > index 6fab4d3..837b36d 100644 > --- a/hw/ppc/spapr.c > +++ b/hw/ppc/spapr.c > @@ -1806,12 +1806,20 @@ static const TypeInfo spapr_machine_info =3D { > }, > }; > =20 > +#define SPAPR_COMPAT_2_3 \ > + {\ > + .driver =3D "spapr-pci-host-bridge",\ > + .property =3D "dynamic-reconfiguration",\ > + .value =3D "off",\ > + } > + > #define SPAPR_COMPAT_2_2 \ > {\ > .driver =3D TYPE_SPAPR_PCI_HOST_BRIDGE,\ > .property =3D "mem_win_size",\ > .value =3D "0x20000000",\ > - } > + },\ > + SPAPR_COMPAT_2_3 Convention in PC and other places seems to be to put the next version compat macro at the top of the definition, rather than the bottom. > =20 > #define SPAPR_COMPAT_2_1 \ > SPAPR_COMPAT_2_2 > @@ -1857,12 +1865,17 @@ static const TypeInfo spapr_machine_2_2_info =3D { > =20 > static void spapr_machine_2_3_class_init(ObjectClass *oc, void *data) > { > + static GlobalProperty compat_props[] =3D { > + SPAPR_COMPAT_2_3, > + { /* end of list */ } > + }; > MachineClass *mc =3D MACHINE_CLASS(oc); > =20 > mc->name =3D "pseries-2.3"; > mc->desc =3D "pSeries Logical Partition (PAPR compliant) v2.3"; > mc->alias =3D "pseries"; > mc->is_default =3D 0; > + mc->compat_props =3D compat_props; > } > =20 > static const TypeInfo spapr_machine_2_3_info =3D { > diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c > index 52c5c73..a2dcc6a 100644 > --- a/hw/ppc/spapr_pci.c > +++ b/hw/ppc/spapr_pci.c > @@ -936,6 +936,8 @@ static Property spapr_phb_properties[] =3D { > DEFINE_PROP_UINT64("io_win_addr", sPAPRPHBState, io_win_addr, -1), > DEFINE_PROP_UINT64("io_win_size", sPAPRPHBState, io_win_size, > SPAPR_PCI_IO_WIN_SIZE), > + DEFINE_PROP_BOOL("dynamic-reconfiguration", sPAPRPHBState, dr_enable= d, > + true), > DEFINE_PROP_END_OF_LIST(), > }; > =20 > diff --git a/include/hw/pci-host/spapr.h b/include/hw/pci-host/spapr.h > index 5b497ce..9dca388 100644 > --- a/include/hw/pci-host/spapr.h > +++ b/include/hw/pci-host/spapr.h > @@ -71,6 +71,7 @@ struct sPAPRPHBState { > uint32_t index; > uint64_t buid; > char *dtbusname; > + bool dr_enabled; > =20 > MemoryRegion memspace, iospace; > hwaddr mem_win_addr, mem_win_size, io_win_addr, io_win_size; --=20 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 --Sr1nOIr3CvdE5hEN Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJVPzY6AAoJEGw4ysog2bOS8WMP/39RrXGOnAuZY0CAPz1FXBR0 oOPFYi9EIXlmTH9RVNpSUNgPqzBTUdk4G9O9J6YKJ8pFTUfSRGMDwoRIcYmISy1c K8Q73og36bb0NNghvwFxVA3F+jTc4rJMnVs2VGrYaB5EOAXWBTbgx7slVok5bI14 r1ymL1GB1mBM1vrbZWi55f/YFGgvuuwryIon5x4XW1xFHw2FITgDfNcqGcNp3+6J 1Z+0P8aQUsv3J86u6IEAJ9NISvUxIwPgJOewsZ2SaK7mFsXszSdL+8deA1U9grSw MxNpQwGmZMnhn2kGxwqBmzvKnNkVJH5Dg5JjhXmDX9Bm4oB7HCWXEheICiIX4YHK yE7cfgs278F61S4IRSsxo0HUwc7ECtpAXqgHWdScgBwU6SCBblhtJb9u/5RLK59u mv3WX4N5VNLjJ3nHQ2lzOTnyCguzzkP5/k0i0K0CBfRVBNsgzsJayv1nVRtYGilg Kt3B2Asu1pINrdDCxHKJZ4zZqBVD19I/AXASGjOI326ZfJ4mgJOt6k10tSpabVSW ttnORjvhm/13cw33vStoLVC0EeJ6V2yLn2w2deMFGBe6t4Qf6zZkk7NeKNAvnEi7 J4v3zOY9JNrKj7QpeAHyfh+tUZnyg3Qra6CQvyF5iNwpWbUXWnDDSdKKITLfIWU7 IT1LRzW/6JQgGuUV5p/i =7Kv0 -----END PGP SIGNATURE----- --Sr1nOIr3CvdE5hEN--