* [Qemu-devel] [PATCH 1/3] pci: allow devices being tagged as not hotpluggable.
2010-11-30 13:26 [Qemu-devel] [PATCH 0/3] add hotplug opt-out option for pci devices Gerd Hoffmann
@ 2010-11-30 13:26 ` Gerd Hoffmann
2011-01-06 14:53 ` [Qemu-devel] " Michael S. Tsirkin
2010-11-30 13:26 ` [Qemu-devel] [PATCH 2/3] piix: tag " Gerd Hoffmann
` (2 subsequent siblings)
3 siblings, 1 reply; 15+ messages in thread
From: Gerd Hoffmann @ 2010-11-30 13:26 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
This patch adds a field to PCIDeviceInfo to tag devices as being
not hotpluggable. Any attempt to plug-in or -out such a device
will throw an error.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/pci.c | 10 ++++++++++
hw/pci.h | 3 +++
qerror.c | 4 ++++
qerror.h | 3 +++
4 files changed, 20 insertions(+), 0 deletions(-)
diff --git a/hw/pci.c b/hw/pci.c
index 438c0d1..aee8d63 100644
--- a/hw/pci.c
+++ b/hw/pci.c
@@ -1546,6 +1546,11 @@ static int pci_qdev_init(DeviceState *qdev, DeviceInfo *base)
info->is_bridge);
if (pci_dev == NULL)
return -1;
+ if (qdev->hotplugged && info->no_hotplug) {
+ qerror_report(QERR_DEVICE_NO_HOTPLUG, info->qdev.name);
+ do_pci_unregister_device(pci_dev);
+ return -1;
+ }
rc = info->init(pci_dev);
if (rc != 0) {
do_pci_unregister_device(pci_dev);
@@ -1575,7 +1580,12 @@ static int pci_qdev_init(DeviceState *qdev, DeviceInfo *base)
static int pci_unplug_device(DeviceState *qdev)
{
PCIDevice *dev = DO_UPCAST(PCIDevice, qdev, qdev);
+ PCIDeviceInfo *info = container_of(qdev->info, PCIDeviceInfo, qdev);
+ if (info->no_hotplug) {
+ qerror_report(QERR_DEVICE_NO_HOTPLUG, info->qdev.name);
+ return -1;
+ }
return dev->bus->hotplug(dev->bus->hotplug_qdev, dev,
PCI_HOTPLUG_DISABLED);
}
diff --git a/hw/pci.h b/hw/pci.h
index 09b3e4c..1d1c515 100644
--- a/hw/pci.h
+++ b/hw/pci.h
@@ -431,6 +431,9 @@ typedef struct {
/* pcie stuff */
int is_express; /* is this device pci express? */
+ /* device isn't hot-pluggable */
+ int no_hotplug;
+
/* rom bar */
const char *romfile;
} PCIDeviceInfo;
diff --git a/qerror.c b/qerror.c
index ac2cdaf..9d0cdeb 100644
--- a/qerror.c
+++ b/qerror.c
@@ -101,6 +101,10 @@ static const QErrorStringTable qerror_table[] = {
.desc = "Device '%(device)' has no child bus",
},
{
+ .error_fmt = QERR_DEVICE_NO_HOTPLUG,
+ .desc = "Device '%(device)' does not support hotplugging",
+ },
+ {
.error_fmt = QERR_DUPLICATE_ID,
.desc = "Duplicate ID '%(id)' for %(object)",
},
diff --git a/qerror.h b/qerror.h
index 943a24b..b0f69da 100644
--- a/qerror.h
+++ b/qerror.h
@@ -90,6 +90,9 @@ QError *qobject_to_qerror(const QObject *obj);
#define QERR_DEVICE_NO_BUS \
"{ 'class': 'DeviceNoBus', 'data': { 'device': %s } }"
+#define QERR_DEVICE_NO_HOTPLUG \
+ "{ 'class': 'DeviceNoHotplug', 'data': { 'device': %s } }"
+
#define QERR_DUPLICATE_ID \
"{ 'class': 'DuplicateId', 'data': { 'id': %s, 'object': %s } }"
--
1.7.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] Re: [PATCH 1/3] pci: allow devices being tagged as not hotpluggable.
2010-11-30 13:26 ` [Qemu-devel] [PATCH 1/3] pci: allow devices being tagged as not hotpluggable Gerd Hoffmann
@ 2011-01-06 14:53 ` Michael S. Tsirkin
0 siblings, 0 replies; 15+ messages in thread
From: Michael S. Tsirkin @ 2011-01-06 14:53 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel
On Tue, Nov 30, 2010 at 02:26:02PM +0100, Gerd Hoffmann wrote:
> This patch adds a field to PCIDeviceInfo to tag devices as being
> not hotpluggable. Any attempt to plug-in or -out such a device
> will throw an error.
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
> ---
> hw/pci.c | 10 ++++++++++
> hw/pci.h | 3 +++
> qerror.c | 4 ++++
> qerror.h | 3 +++
> 4 files changed, 20 insertions(+), 0 deletions(-)
>
> diff --git a/hw/pci.c b/hw/pci.c
> index 438c0d1..aee8d63 100644
> --- a/hw/pci.c
> +++ b/hw/pci.c
> @@ -1546,6 +1546,11 @@ static int pci_qdev_init(DeviceState *qdev, DeviceInfo *base)
> info->is_bridge);
> if (pci_dev == NULL)
> return -1;
> + if (qdev->hotplugged && info->no_hotplug) {
> + qerror_report(QERR_DEVICE_NO_HOTPLUG, info->qdev.name);
> + do_pci_unregister_device(pci_dev);
> + return -1;
> + }
> rc = info->init(pci_dev);
> if (rc != 0) {
> do_pci_unregister_device(pci_dev);
> @@ -1575,7 +1580,12 @@ static int pci_qdev_init(DeviceState *qdev, DeviceInfo *base)
> static int pci_unplug_device(DeviceState *qdev)
> {
> PCIDevice *dev = DO_UPCAST(PCIDevice, qdev, qdev);
> + PCIDeviceInfo *info = container_of(qdev->info, PCIDeviceInfo, qdev);
>
> + if (info->no_hotplug) {
> + qerror_report(QERR_DEVICE_NO_HOTPLUG, info->qdev.name);
> + return -1;
> + }
> return dev->bus->hotplug(dev->bus->hotplug_qdev, dev,
> PCI_HOTPLUG_DISABLED);
> }
> diff --git a/hw/pci.h b/hw/pci.h
> index 09b3e4c..1d1c515 100644
> --- a/hw/pci.h
> +++ b/hw/pci.h
> @@ -431,6 +431,9 @@ typedef struct {
> /* pcie stuff */
> int is_express; /* is this device pci express? */
>
> + /* device isn't hot-pluggable */
> + int no_hotplug;
> +
> /* rom bar */
> const char *romfile;
> } PCIDeviceInfo;
> diff --git a/qerror.c b/qerror.c
> index ac2cdaf..9d0cdeb 100644
> --- a/qerror.c
> +++ b/qerror.c
> @@ -101,6 +101,10 @@ static const QErrorStringTable qerror_table[] = {
> .desc = "Device '%(device)' has no child bus",
> },
> {
> + .error_fmt = QERR_DEVICE_NO_HOTPLUG,
> + .desc = "Device '%(device)' does not support hotplugging",
> + },
> + {
> .error_fmt = QERR_DUPLICATE_ID,
> .desc = "Duplicate ID '%(id)' for %(object)",
> },
> diff --git a/qerror.h b/qerror.h
> index 943a24b..b0f69da 100644
> --- a/qerror.h
> +++ b/qerror.h
> @@ -90,6 +90,9 @@ QError *qobject_to_qerror(const QObject *obj);
> #define QERR_DEVICE_NO_BUS \
> "{ 'class': 'DeviceNoBus', 'data': { 'device': %s } }"
>
> +#define QERR_DEVICE_NO_HOTPLUG \
> + "{ 'class': 'DeviceNoHotplug', 'data': { 'device': %s } }"
> +
> #define QERR_DUPLICATE_ID \
> "{ 'class': 'DuplicateId', 'data': { 'id': %s, 'object': %s } }"
>
> --
> 1.7.1
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Qemu-devel] [PATCH 2/3] piix: tag as not hotpluggable.
2010-11-30 13:26 [Qemu-devel] [PATCH 0/3] add hotplug opt-out option for pci devices Gerd Hoffmann
2010-11-30 13:26 ` [Qemu-devel] [PATCH 1/3] pci: allow devices being tagged as not hotpluggable Gerd Hoffmann
@ 2010-11-30 13:26 ` Gerd Hoffmann
2011-01-05 19:44 ` [Qemu-devel] " Michael S. Tsirkin
2010-11-30 13:26 ` [Qemu-devel] [PATCH 3/3] vga: tag as not hotplugable Gerd Hoffmann
2011-01-05 15:57 ` [Qemu-devel] Re: [PATCH 0/3] add hotplug opt-out option for pci devices Michael S. Tsirkin
3 siblings, 1 reply; 15+ messages in thread
From: Gerd Hoffmann @ 2010-11-30 13:26 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
This patch tags all pci devices which belong to the piix3/4 chipsets as
not hotpluggable (Host bridge, ISA bridge, IDE controller, ACPI bridge).
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/acpi_piix4.c | 2 ++
hw/ide/piix.c | 2 ++
hw/piix4.c | 1 +
hw/piix_pci.c | 2 ++
4 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c
index 173d781..273097d 100644
--- a/hw/acpi_piix4.c
+++ b/hw/acpi_piix4.c
@@ -428,6 +428,8 @@ static PCIDeviceInfo piix4_pm_info = {
.qdev.desc = "PM",
.qdev.size = sizeof(PIIX4PMState),
.qdev.vmsd = &vmstate_acpi,
+ .qdev.no_user = 1,
+ .no_hotplug = 1,
.init = piix4_pm_initfn,
.config_write = pm_write_config,
.qdev.props = (Property[]) {
diff --git a/hw/ide/piix.c b/hw/ide/piix.c
index 07483e8..173ba4b 100644
--- a/hw/ide/piix.c
+++ b/hw/ide/piix.c
@@ -184,11 +184,13 @@ static PCIDeviceInfo piix_ide_info[] = {
.qdev.name = "piix3-ide",
.qdev.size = sizeof(PCIIDEState),
.qdev.no_user = 1,
+ .no_hotplug = 1,
.init = pci_piix3_ide_initfn,
},{
.qdev.name = "piix4-ide",
.qdev.size = sizeof(PCIIDEState),
.qdev.no_user = 1,
+ .no_hotplug = 1,
.init = pci_piix4_ide_initfn,
},{
/* end of list */
diff --git a/hw/piix4.c b/hw/piix4.c
index 5489386..1678898 100644
--- a/hw/piix4.c
+++ b/hw/piix4.c
@@ -113,6 +113,7 @@ static PCIDeviceInfo piix4_info[] = {
.qdev.desc = "ISA bridge",
.qdev.size = sizeof(PCIDevice),
.qdev.no_user = 1,
+ .qdev.no_hotplug = 1,
.init = piix4_initfn,
},{
/* end of list */
diff --git a/hw/piix_pci.c b/hw/piix_pci.c
index b5589b9..44a1524 100644
--- a/hw/piix_pci.c
+++ b/hw/piix_pci.c
@@ -348,6 +348,7 @@ static PCIDeviceInfo i440fx_info[] = {
.qdev.size = sizeof(PCII440FXState),
.qdev.vmsd = &vmstate_i440fx,
.qdev.no_user = 1,
+ .no_hotplug = 1,
.init = i440fx_initfn,
.config_write = i440fx_write_config,
},{
@@ -356,6 +357,7 @@ static PCIDeviceInfo i440fx_info[] = {
.qdev.size = sizeof(PIIX3State),
.qdev.vmsd = &vmstate_piix3,
.qdev.no_user = 1,
+ .no_hotplug = 1,
.init = piix3_initfn,
},{
/* end of list */
--
1.7.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] Re: [PATCH 2/3] piix: tag as not hotpluggable.
2010-11-30 13:26 ` [Qemu-devel] [PATCH 2/3] piix: tag " Gerd Hoffmann
@ 2011-01-05 19:44 ` Michael S. Tsirkin
2011-01-06 8:40 ` Gerd Hoffmann
0 siblings, 1 reply; 15+ messages in thread
From: Michael S. Tsirkin @ 2011-01-05 19:44 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel
On Tue, Nov 30, 2010 at 02:26:03PM +0100, Gerd Hoffmann wrote:
> This patch tags all pci devices which belong to the piix3/4 chipsets as
> not hotpluggable (Host bridge, ISA bridge, IDE controller, ACPI bridge).
>
> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
> ---
> hw/acpi_piix4.c | 2 ++
> hw/ide/piix.c | 2 ++
> hw/piix4.c | 1 +
> hw/piix_pci.c | 2 ++
> 4 files changed, 7 insertions(+), 0 deletions(-)
>
> diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c
> index 173d781..273097d 100644
> --- a/hw/acpi_piix4.c
> +++ b/hw/acpi_piix4.c
> @@ -428,6 +428,8 @@ static PCIDeviceInfo piix4_pm_info = {
> .qdev.desc = "PM",
> .qdev.size = sizeof(PIIX4PMState),
> .qdev.vmsd = &vmstate_acpi,
> + .qdev.no_user = 1,
> + .no_hotplug = 1,
> .init = piix4_pm_initfn,
> .config_write = pm_write_config,
> .qdev.props = (Property[]) {
> diff --git a/hw/ide/piix.c b/hw/ide/piix.c
> index 07483e8..173ba4b 100644
> --- a/hw/ide/piix.c
> +++ b/hw/ide/piix.c
> @@ -184,11 +184,13 @@ static PCIDeviceInfo piix_ide_info[] = {
> .qdev.name = "piix3-ide",
> .qdev.size = sizeof(PCIIDEState),
> .qdev.no_user = 1,
> + .no_hotplug = 1,
> .init = pci_piix3_ide_initfn,
> },{
> .qdev.name = "piix4-ide",
> .qdev.size = sizeof(PCIIDEState),
> .qdev.no_user = 1,
> + .no_hotplug = 1,
> .init = pci_piix4_ide_initfn,
> },{
> /* end of list */
> diff --git a/hw/piix4.c b/hw/piix4.c
> index 5489386..1678898 100644
> --- a/hw/piix4.c
> +++ b/hw/piix4.c
> @@ -113,6 +113,7 @@ static PCIDeviceInfo piix4_info[] = {
> .qdev.desc = "ISA bridge",
> .qdev.size = sizeof(PCIDevice),
> .qdev.no_user = 1,
> + .qdev.no_hotplug = 1,
> .init = piix4_initfn,
> },{
> /* end of list */
This one breaks the build for me. The below seems to help - but begs
the question: was this tested?
Thanks,
diff --git a/hw/piix4.c b/hw/piix4.c
index 1678898..00da049 100644
--- a/hw/piix4.c
+++ b/hw/piix4.c
@@ -113,7 +113,7 @@ static PCIDeviceInfo piix4_info[] = {
.qdev.desc = "ISA bridge",
.qdev.size = sizeof(PCIDevice),
.qdev.no_user = 1,
- .qdev.no_hotplug = 1,
+ .no_hotplug = 1,
.init = piix4_initfn,
},{
/* end of list */
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] Re: [PATCH 2/3] piix: tag as not hotpluggable.
2011-01-05 19:44 ` [Qemu-devel] " Michael S. Tsirkin
@ 2011-01-06 8:40 ` Gerd Hoffmann
2011-01-06 9:29 ` Michael S. Tsirkin
0 siblings, 1 reply; 15+ messages in thread
From: Gerd Hoffmann @ 2011-01-06 8:40 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: qemu-devel
>> diff --git a/hw/piix4.c b/hw/piix4.c
>> index 5489386..1678898 100644
>> --- a/hw/piix4.c
>> +++ b/hw/piix4.c
>> @@ -113,6 +113,7 @@ static PCIDeviceInfo piix4_info[] = {
>> .qdev.desc = "ISA bridge",
>> .qdev.size = sizeof(PCIDevice),
>> .qdev.no_user = 1,
>> + .qdev.no_hotplug = 1,
>> .init = piix4_initfn,
>> },{
>> /* end of list */
>
> This one breaks the build for me. The below seems to help - but begs
> the question: was this tested?
Tested on x86. piix4 chipset is used by hw/mips_malta.c, looks like I
forgot to do a testbuild with all targets enabled :-(
> diff --git a/hw/piix4.c b/hw/piix4.c
> index 1678898..00da049 100644
> --- a/hw/piix4.c
> +++ b/hw/piix4.c
> @@ -113,7 +113,7 @@ static PCIDeviceInfo piix4_info[] = {
> .qdev.desc = "ISA bridge",
> .qdev.size = sizeof(PCIDevice),
> .qdev.no_user = 1,
> - .qdev.no_hotplug = 1,
> + .no_hotplug = 1,
> .init = piix4_initfn,
> },{
> /* end of list */
This is correct. Do you just squash in the fix or do you want me respin
the patch series?
cheers,
Gerd
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Qemu-devel] Re: [PATCH 2/3] piix: tag as not hotpluggable.
2011-01-06 8:40 ` Gerd Hoffmann
@ 2011-01-06 9:29 ` Michael S. Tsirkin
2011-01-06 14:14 ` Gerd Hoffmann
0 siblings, 1 reply; 15+ messages in thread
From: Michael S. Tsirkin @ 2011-01-06 9:29 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel
On Thu, Jan 06, 2011 at 09:40:52AM +0100, Gerd Hoffmann wrote:
> >>diff --git a/hw/piix4.c b/hw/piix4.c
> >>index 5489386..1678898 100644
> >>--- a/hw/piix4.c
> >>+++ b/hw/piix4.c
> >>@@ -113,6 +113,7 @@ static PCIDeviceInfo piix4_info[] = {
> >> .qdev.desc = "ISA bridge",
> >> .qdev.size = sizeof(PCIDevice),
> >> .qdev.no_user = 1,
> >>+ .qdev.no_hotplug = 1,
> >> .init = piix4_initfn,
> >> },{
> >> /* end of list */
> >
> >This one breaks the build for me. The below seems to help - but begs
> >the question: was this tested?
>
> Tested on x86. piix4 chipset is used by hw/mips_malta.c, looks like
> I forgot to do a testbuild with all targets enabled :-(
Let's just patch whatever was tested for now?
> >diff --git a/hw/piix4.c b/hw/piix4.c
> >index 1678898..00da049 100644
> >--- a/hw/piix4.c
> >+++ b/hw/piix4.c
> >@@ -113,7 +113,7 @@ static PCIDeviceInfo piix4_info[] = {
> > .qdev.desc = "ISA bridge",
> > .qdev.size = sizeof(PCIDevice),
> > .qdev.no_user = 1,
> >- .qdev.no_hotplug = 1,
> >+ .no_hotplug = 1,
> > .init = piix4_initfn,
> > },{
> > /* end of list */
>
> This is correct. Do you just squash in the fix or do you want me
> respin the patch series?
>
> cheers,
> Gerd
Could you split the tested and untested parts to separate patches,
noting the status in the commit message?
We could then queue the tested parts directly and wait for
maintainer's ack for the rest.
--
MST
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Qemu-devel] Re: [PATCH 2/3] piix: tag as not hotpluggable.
2011-01-06 9:29 ` Michael S. Tsirkin
@ 2011-01-06 14:14 ` Gerd Hoffmann
2011-01-06 14:34 ` Michael S. Tsirkin
0 siblings, 1 reply; 15+ messages in thread
From: Gerd Hoffmann @ 2011-01-06 14:14 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: qemu-devel
Hi,
> Could you split the tested and untested parts to separate patches,
> noting the status in the commit message?
I think this is overkill given how simple the change is. Respin goes to
the list shortly.
cheers,
Gerd
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Qemu-devel] Re: [PATCH 2/3] piix: tag as not hotpluggable.
2011-01-06 14:14 ` Gerd Hoffmann
@ 2011-01-06 14:34 ` Michael S. Tsirkin
2011-01-06 18:45 ` Marcelo Tosatti
0 siblings, 1 reply; 15+ messages in thread
From: Michael S. Tsirkin @ 2011-01-06 14:34 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel
On Thu, Jan 06, 2011 at 03:14:18PM +0100, Gerd Hoffmann wrote:
> Hi,
>
> >Could you split the tested and untested parts to separate patches,
> >noting the status in the commit message?
>
> I think this is overkill given how simple the change is.
Yes but I don't know whether the untested devices this
patch touches are intended to be non hotpluggable.
I guess, I'll just ack the pci.c part and let Anthony deal
with this.
> Respin
> goes to the list shortly.
>
> cheers,
> Gerd
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] Re: [PATCH 2/3] piix: tag as not hotpluggable.
2011-01-06 14:34 ` Michael S. Tsirkin
@ 2011-01-06 18:45 ` Marcelo Tosatti
2011-01-07 11:42 ` Michael S. Tsirkin
0 siblings, 1 reply; 15+ messages in thread
From: Marcelo Tosatti @ 2011-01-06 18:45 UTC (permalink / raw)
To: Michael S. Tsirkin; +Cc: Gerd Hoffmann, qemu-devel
On Thu, Jan 06, 2011 at 04:34:38PM +0200, Michael S. Tsirkin wrote:
> On Thu, Jan 06, 2011 at 03:14:18PM +0100, Gerd Hoffmann wrote:
> > Hi,
> >
> > >Could you split the tested and untested parts to separate patches,
> > >noting the status in the commit message?
> >
> > I think this is overkill given how simple the change is.
>
> Yes but I don't know whether the untested devices this
> patch touches are intended to be non hotpluggable.
> I guess, I'll just ack the pci.c part and let Anthony deal
> with this.
Michael,
PCI hotplug is only supported on x86 via ACPI, and there the piix
devices are not hotpluggable.
^ permalink raw reply [flat|nested] 15+ messages in thread
* Re: [Qemu-devel] Re: [PATCH 2/3] piix: tag as not hotpluggable.
2011-01-06 18:45 ` Marcelo Tosatti
@ 2011-01-07 11:42 ` Michael S. Tsirkin
0 siblings, 0 replies; 15+ messages in thread
From: Michael S. Tsirkin @ 2011-01-07 11:42 UTC (permalink / raw)
To: Marcelo Tosatti, aurelien; +Cc: Gerd Hoffmann, qemu-devel
On Thu, Jan 06, 2011 at 04:45:20PM -0200, Marcelo Tosatti wrote:
> On Thu, Jan 06, 2011 at 04:34:38PM +0200, Michael S. Tsirkin wrote:
> > On Thu, Jan 06, 2011 at 03:14:18PM +0100, Gerd Hoffmann wrote:
> > > Hi,
> > >
> > > >Could you split the tested and untested parts to separate patches,
> > > >noting the status in the commit message?
> > >
> > > I think this is overkill given how simple the change is.
> >
> > Yes but I don't know whether the untested devices this
> > patch touches are intended to be non hotpluggable.
> > I guess, I'll just ack the pci.c part and let Anthony deal
> > with this.
>
> Michael,
>
> PCI hotplug is only supported on x86 via ACPI, and there the piix
> devices are not hotpluggable.
Aurelien, could you ack the piix4 bit please?
--
MST
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Qemu-devel] [PATCH 3/3] vga: tag as not hotplugable.
2010-11-30 13:26 [Qemu-devel] [PATCH 0/3] add hotplug opt-out option for pci devices Gerd Hoffmann
2010-11-30 13:26 ` [Qemu-devel] [PATCH 1/3] pci: allow devices being tagged as not hotpluggable Gerd Hoffmann
2010-11-30 13:26 ` [Qemu-devel] [PATCH 2/3] piix: tag " Gerd Hoffmann
@ 2010-11-30 13:26 ` Gerd Hoffmann
2011-01-05 15:57 ` [Qemu-devel] Re: [PATCH 0/3] add hotplug opt-out option for pci devices Michael S. Tsirkin
3 siblings, 0 replies; 15+ messages in thread
From: Gerd Hoffmann @ 2010-11-30 13:26 UTC (permalink / raw)
To: qemu-devel; +Cc: Gerd Hoffmann
This patch tags all vga cards as not hotpluggable. The qemu
standard vga will never ever be hotpluggable. For cirrus + vmware
it might be possible to get that work some day. Todays we can't
handle that for a number of reasons though.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
hw/cirrus_vga.c | 1 +
hw/vga-pci.c | 1 +
hw/vmware_vga.c | 1 +
3 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/hw/cirrus_vga.c b/hw/cirrus_vga.c
index aadc56f..1936730 100644
--- a/hw/cirrus_vga.c
+++ b/hw/cirrus_vga.c
@@ -3223,6 +3223,7 @@ static PCIDeviceInfo cirrus_vga_info = {
.qdev.desc = "Cirrus CLGD 54xx VGA",
.qdev.size = sizeof(PCICirrusVGAState),
.qdev.vmsd = &vmstate_pci_cirrus_vga,
+ .no_hotplug = 1,
.init = pci_cirrus_vga_initfn,
.romfile = VGABIOS_CIRRUS_FILENAME,
.config_write = pci_cirrus_write_config,
diff --git a/hw/vga-pci.c b/hw/vga-pci.c
index 791ca22..ce9ec45 100644
--- a/hw/vga-pci.c
+++ b/hw/vga-pci.c
@@ -110,6 +110,7 @@ static PCIDeviceInfo vga_info = {
.qdev.name = "VGA",
.qdev.size = sizeof(PCIVGAState),
.qdev.vmsd = &vmstate_vga_pci,
+ .no_hotplug = 1,
.init = pci_vga_initfn,
.config_write = pci_vga_write_config,
.romfile = "vgabios-stdvga.bin",
diff --git a/hw/vmware_vga.c b/hw/vmware_vga.c
index d0f4e1b..bcd02d2 100644
--- a/hw/vmware_vga.c
+++ b/hw/vmware_vga.c
@@ -1318,6 +1318,7 @@ static PCIDeviceInfo vmsvga_info = {
.qdev.name = "vmware-svga",
.qdev.size = sizeof(struct pci_vmsvga_state_s),
.qdev.vmsd = &vmstate_vmware_vga,
+ .no_hotplug = 1,
.init = pci_vmsvga_initfn,
.romfile = "vgabios-vmware.bin",
};
--
1.7.1
^ permalink raw reply related [flat|nested] 15+ messages in thread
* [Qemu-devel] Re: [PATCH 0/3] add hotplug opt-out option for pci devices.
2010-11-30 13:26 [Qemu-devel] [PATCH 0/3] add hotplug opt-out option for pci devices Gerd Hoffmann
` (2 preceding siblings ...)
2010-11-30 13:26 ` [Qemu-devel] [PATCH 3/3] vga: tag as not hotplugable Gerd Hoffmann
@ 2011-01-05 15:57 ` Michael S. Tsirkin
2011-01-06 15:17 ` Michael S. Tsirkin
3 siblings, 1 reply; 15+ messages in thread
From: Michael S. Tsirkin @ 2011-01-05 15:57 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel
On Tue, Nov 30, 2010 at 02:26:01PM +0100, Gerd Hoffmann wrote:
> Hi,
>
> This patch series adds a flag which allows pci devices being tagged
> as not hotpluggable. It also sets this flag for a number of devices.
>
> cheers,
> Gerd
>
> Gerd Hoffmann (3):
> pci: allow devices being tagged as not hotpluggable.
> piix: tag as not hotpluggable.
> vga: tag as not hotplugable.
Applied, thanks.
> hw/acpi_piix4.c | 2 ++
> hw/cirrus_vga.c | 1 +
> hw/ide/piix.c | 2 ++
> hw/pci.c | 10 ++++++++++
> hw/pci.h | 3 +++
> hw/piix4.c | 1 +
> hw/piix_pci.c | 2 ++
> hw/vga-pci.c | 1 +
> hw/vmware_vga.c | 1 +
> qerror.c | 4 ++++
> qerror.h | 3 +++
> 11 files changed, 30 insertions(+), 0 deletions(-)
>
^ permalink raw reply [flat|nested] 15+ messages in thread
* [Qemu-devel] Re: [PATCH 0/3] add hotplug opt-out option for pci devices.
2011-01-05 15:57 ` [Qemu-devel] Re: [PATCH 0/3] add hotplug opt-out option for pci devices Michael S. Tsirkin
@ 2011-01-06 15:17 ` Michael S. Tsirkin
0 siblings, 0 replies; 15+ messages in thread
From: Michael S. Tsirkin @ 2011-01-06 15:17 UTC (permalink / raw)
To: Gerd Hoffmann; +Cc: qemu-devel
On Wed, Jan 05, 2011 at 05:57:24PM +0200, Michael S. Tsirkin wrote:
> On Tue, Nov 30, 2010 at 02:26:01PM +0100, Gerd Hoffmann wrote:
> > Hi,
> >
> > This patch series adds a flag which allows pci devices being tagged
> > as not hotpluggable. It also sets this flag for a number of devices.
> >
> > cheers,
> > Gerd
> >
> > Gerd Hoffmann (3):
> > pci: allow devices being tagged as not hotpluggable.
> > piix: tag as not hotpluggable.
> > vga: tag as not hotplugable.
>
> Applied, thanks.
Dropped this from my tree for now, whoever
applies the rest of the patches can put in the first one
with my ack.
> > hw/acpi_piix4.c | 2 ++
> > hw/cirrus_vga.c | 1 +
> > hw/ide/piix.c | 2 ++
> > hw/pci.c | 10 ++++++++++
> > hw/pci.h | 3 +++
> > hw/piix4.c | 1 +
> > hw/piix_pci.c | 2 ++
> > hw/vga-pci.c | 1 +
> > hw/vmware_vga.c | 1 +
> > qerror.c | 4 ++++
> > qerror.h | 3 +++
> > 11 files changed, 30 insertions(+), 0 deletions(-)
> >
^ permalink raw reply [flat|nested] 15+ messages in thread