Skip to content

Commit

Permalink
pci-hotplug-old: Has been dead for five major releases, bury
Browse files Browse the repository at this point in the history
Commit 79ca616 (v1.6.0) accidentally disabled legacy x86-only HMP
commands pci_add, pci_del: it defined CONFIG_PCI_HOTPLUG only as make
variable, not as preprocessor macro, killing the code conditional on
defined(CONFIG_PCI_HOTPLUG_OLD).

In all this time, nobody reported the loss.  I only noticed it when I
tried to test some error reporting change that forced me to touch this
old crap again.

Fun: git-log hw/pci/pci-hotplug-old.c shows our faith in the backward
compatibility god has been strong enough to sacrifice at its altar
about a dozen times, but not strong enough to even once verify the
legacy feature's still there, let alone works.

Remove the commands along with the code backing them.

Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
  • Loading branch information
Markus Armbruster authored and mstsirkin committed Mar 1, 2015
1 parent 6dbcb81 commit f51074c
Show file tree
Hide file tree
Showing 10 changed files with 3 additions and 400 deletions.
1 change: 0 additions & 1 deletion default-configs/i386-softmmu.mak
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ CONFIG_APPLESMC=y
CONFIG_I8259=y
CONFIG_PFLASH_CFI01=y
CONFIG_TPM_TIS=$(CONFIG_TPM)
CONFIG_PCI_HOTPLUG_OLD=y
CONFIG_MC146818RTC=y
CONFIG_PAM=y
CONFIG_PCI_PIIX=y
Expand Down
1 change: 0 additions & 1 deletion default-configs/x86_64-softmmu.mak
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ CONFIG_APPLESMC=y
CONFIG_I8259=y
CONFIG_PFLASH_CFI01=y
CONFIG_TPM_TIS=$(CONFIG_TPM)
CONFIG_PCI_HOTPLUG_OLD=y
CONFIG_MC146818RTC=y
CONFIG_PAM=y
CONFIG_PCI_PIIX=y
Expand Down
7 changes: 3 additions & 4 deletions device-hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "sysemu/sysemu.h"
#include "monitor/monitor.h"

DriveInfo *add_init_drive(const char *optstr)
static DriveInfo *add_init_drive(const char *optstr)
{
DriveInfo *dinfo;
QemuOpts *opts;
Expand Down Expand Up @@ -69,9 +69,8 @@ void hmp_drive_add(Monitor *mon, const QDict *qdict)
monitor_printf(mon, "OK\n");
break;
default:
if (pci_drive_hot_add(mon, qdict, dinfo)) {
goto err;
}
monitor_printf(mon, "Can't hot-add drive to type %d\n", dinfo->type);
goto err;
}
return;

Expand Down
32 changes: 0 additions & 32 deletions hmp-commands.hx
Original file line number Diff line number Diff line change
Expand Up @@ -1147,38 +1147,6 @@ STEXI
@item drive_add
@findex drive_add
Add drive to PCI storage controller.
ETEXI

#if defined(CONFIG_PCI_HOTPLUG_OLD)
{
.name = "pci_add",
.args_type = "pci_addr:s,type:s,opts:s?",
.params = "auto|[[<domain>:]<bus>:]<slot> nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...",
.help = "hot-add PCI device",
.mhandler.cmd = hmp_pci_add,
},
#endif

STEXI
@item pci_add
@findex pci_add
Hot-add PCI device.
ETEXI

#if defined(CONFIG_PCI_HOTPLUG_OLD)
{
.name = "pci_del",
.args_type = "pci_addr:s",
.params = "[[<domain>:]<bus>:]<slot>",
.help = "hot remove PCI device",
.mhandler.cmd = hmp_pci_del,
},
#endif

STEXI
@item pci_del
@findex pci_del
Hot remove PCI device.
ETEXI

{
Expand Down
2 changes: 0 additions & 2 deletions hw/pci/Makefile.objs
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,3 @@ common-obj-$(CONFIG_PCI) += pcie.o pcie_aer.o pcie_port.o

common-obj-$(call lnot,$(CONFIG_PCI)) += pci-stub.o
common-obj-$(CONFIG_ALL) += pci-stub.o

common-obj-$(CONFIG_PCI_HOTPLUG_OLD) += pci-hotplug-old.o
Loading

0 comments on commit f51074c

Please sign in to comment.