* [PATCH] Fix undefined refrence of qemu_system_device_hot_add for non x86 archs
@ 2008-03-19 16:06 Jerone Young
2008-03-19 17:39 ` [kvm-ppc-devel] " Hollis Blanchard
0 siblings, 1 reply; 2+ messages in thread
From: Jerone Young @ 2008-03-19 16:06 UTC (permalink / raw)
To: kvm-devel; +Cc: kvm-ppc-devel
# HG changeset patch
# User Jerone Young <jyoung5@us.ibm.com>
# Date 1205942671 18000
# Branch merge
# Node ID 782ef2276af9ca360e25e07ec5ac0ec387428397
# Parent 972f62b6acae693c388d7b05d3a9ba7ef26ab4a0
Fix undefined refrence of qemu_system_device_hot_add for non x86 archs
This patch fixes it so that functions that depend on qemu_system_device_hot_add() are only compiled for x86 archs.
Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
diff --git a/qemu/hw/device-hotplug.c b/qemu/hw/device-hotplug.c
--- a/qemu/hw/device-hotplug.c
+++ b/qemu/hw/device-hotplug.c
@@ -140,6 +140,7 @@ static PCIDevice *qemu_system_hot_add_st
return opaque;
}
+#if defined(TARGET_I386) || defined(TARGET_X86_64)
void device_hot_add(int pcibus, const char *type, const char *opts)
{
PCIDevice *dev = NULL;
@@ -171,6 +172,7 @@ void device_hot_remove(int pcibus, int s
qemu_system_device_hot_add(pcibus, slot, 0);
}
+#endif
static void destroy_nic(int slot)
{
diff --git a/qemu/monitor.c b/qemu/monitor.c
--- a/qemu/monitor.c
+++ b/qemu/monitor.c
@@ -1359,6 +1359,7 @@ static term_cmd_t term_cmds[] = {
{ "migrate_set_speed", "s", do_migrate_set_speed,
"value", "set maximum speed (in bytes) for migrations" },
{ "cpu_set", "is", do_cpu_set_nr, "cpu [online|offline]", "change cpu state" },
+#if defined(TARGET_I386) || defined(TARGET_X86_64)
{ "drive_add", "iss", drive_hot_add, "pcibus pcidevfn [file=file][,if=type][,bus=n]\n"
"[,unit=m][,media=d][index=i]\n"
"[,cyls=c,heads=h,secs=s[,trans=t]]\n"
@@ -1366,6 +1367,7 @@ static term_cmd_t term_cmds[] = {
"add drive to PCI storage controller" },
{ "pci_add", "iss", device_hot_add, "bus nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...", "hot-add PCI device" },
{ "pci_del", "ii", device_hot_remove, "bus slot-number", "hot remove PCI device" },
+#endif
{ NULL, NULL, },
};
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [kvm-ppc-devel] [PATCH] Fix undefined refrence of qemu_system_device_hot_add for non x86 archs
2008-03-19 16:06 [PATCH] Fix undefined refrence of qemu_system_device_hot_add for non x86 archs Jerone Young
@ 2008-03-19 17:39 ` Hollis Blanchard
0 siblings, 0 replies; 2+ messages in thread
From: Hollis Blanchard @ 2008-03-19 17:39 UTC (permalink / raw)
To: Jerone Young; +Cc: kvm-devel, kvm-ppc-devel
On Wed, 2008-03-19 at 11:06 -0500, Jerone Young wrote:
> # HG changeset patch
> # User Jerone Young <jyoung5@us.ibm.com>
> # Date 1205942671 18000
> # Branch merge
> # Node ID 782ef2276af9ca360e25e07ec5ac0ec387428397
> # Parent 972f62b6acae693c388d7b05d3a9ba7ef26ab4a0
> Fix undefined refrence of qemu_system_device_hot_add for non x86 archs
>
> This patch fixes it so that functions that depend on
> qemu_system_device_hot_add() are only compiled for x86 archs.
>
> Signed-off-by: Jerone Young <jyoung5@us.ibm.com>
>
> diff --git a/qemu/hw/device-hotplug.c b/qemu/hw/device-hotplug.c
> --- a/qemu/hw/device-hotplug.c
> +++ b/qemu/hw/device-hotplug.c
> @@ -140,6 +140,7 @@ static PCIDevice *qemu_system_hot_add_st
> return opaque;
> }
>
> +#if defined(TARGET_I386) || defined(TARGET_X86_64)
> void device_hot_add(int pcibus, const char *type, const char *opts)
> {
> PCIDevice *dev = NULL;
> @@ -171,6 +172,7 @@ void device_hot_remove(int pcibus, int s
>
> qemu_system_device_hot_add(pcibus, slot, 0);
> }
> +#endif
>
> static void destroy_nic(int slot)
> {
> diff --git a/qemu/monitor.c b/qemu/monitor.c
> --- a/qemu/monitor.c
> +++ b/qemu/monitor.c
> @@ -1359,6 +1359,7 @@ static term_cmd_t term_cmds[] = {
> { "migrate_set_speed", "s", do_migrate_set_speed,
> "value", "set maximum speed (in bytes) for migrations" },
> { "cpu_set", "is", do_cpu_set_nr, "cpu [online|offline]", "change cpu state" },
> +#if defined(TARGET_I386) || defined(TARGET_X86_64)
> { "drive_add", "iss", drive_hot_add, "pcibus pcidevfn [file=file][,if=type][,bus=n]\n"
> "[,unit=m][,media=d][index=i]\n"
> "[,cyls=c,heads=h,secs=s[,trans=t]]\n"
> @@ -1366,6 +1367,7 @@ static term_cmd_t term_cmds[] = {
> "add drive to PCI storage controller" },
> { "pci_add", "iss", device_hot_add, "bus nic|storage [[vlan=n][,macaddr=addr][,model=type]] [file=file][,if=type][,bus=nr]...", "hot-add PCI device" },
> { "pci_del", "ii", device_hot_remove, "bus slot-number", "hot remove PCI device" },
> +#endif
> { NULL, NULL, },
> };
Why would we build any of this code? This whole file should be disabled
at the Makefile level (with a configure patch to ifdef in monitor.c).
--
Hollis Blanchard
IBM Linux Technology Center
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-03-19 17:39 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-19 16:06 [PATCH] Fix undefined refrence of qemu_system_device_hot_add for non x86 archs Jerone Young
2008-03-19 17:39 ` [kvm-ppc-devel] " Hollis Blanchard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox