* [Qemu-devel] RE: [PATCH] Fix bug for vcpu hotplug
[not found] ` <4C67D844.5060306@redhat.com>
@ 2010-08-18 7:17 ` Liu, Jinsong
2010-08-18 7:33 ` [Qemu-devel] " Avi Kivity
0 siblings, 1 reply; 5+ messages in thread
From: Liu, Jinsong @ 2010-08-18 7:17 UTC (permalink / raw)
To: Avi Kivity
Cc: Yang, Sheng, qemu-devel@nongnu.org, kvm@vger.kernel.org, Li, Xin
[-- Attachment #1: Type: text/plain, Size: 933 bytes --]
Avi Kivity wrote:
> On 08/06/2010 06:36 AM, Liu, Jinsong wrote:
>> Recently seabios implement vcpu hotplug infrastructure.
>> During test, we found qemu-kvm has a bug result in guestos shutdown
>> when vcpu hotadd. This patch is to fix the bug, mark
>> bus->allow_hotplug as 1 after qdev_hotplug init done.
>
> Please copy qemu-devel on qemu patches.
>
>> @@ -117,6 +117,9 @@ DeviceState *qdev_create(BusState *bus, const
>> char *name) hw_error("Unknown device '%s' for bus '%s'\n",
>> name, bus->info->name); }
>>
>> + if (qdev_hotplug)
>> + bus->allow_hotplug = 1;
>> +
>> return qdev_create_from_info(bus, info);
>> }
>
> Doesn't seem right - this will set allow_hotplug on all busses.
>
> It needs to be set only on the system bus (hw/sysbus.c).
Thanks Avi for comments!
We update the patch to fix the bug in a simple way, your opinion?
Thanks,
Jinsong
[-- Attachment #2: fix-vcpu-hotplug.patch --]
[-- Type: application/octet-stream, Size: 1178 bytes --]
From 1e680bc92e31321795dd0b69f579df927bb9da4a Mon Sep 17 00:00:00 2001
From: Liu Jinsong <jinsong.liu@intel.com>
Date: Wed, 18 Aug 2010 14:18:56 +0800
Subject: [PATCH] Fix bug for vcpu hotplug
Recently seabios implement vcpu hotplug infrastructure.
During test, we found qemu-kvm has a bug result in guestos shutdown when vcpu hotadd.
This patch is to fix the bug, allow hotplug for sysbus qdev.
Signed-off-by: Liu, Jinsong <jinsong.liu@intel.com>
---
hw/qdev.c | 1 +
pc-bios/bios.bin | Bin 131072 -> 131072 bytes
2 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/hw/qdev.c b/hw/qdev.c
index e99c73f..66a5f82 100644
--- a/hw/qdev.c
+++ b/hw/qdev.c
@@ -108,6 +108,7 @@ DeviceState *qdev_create(BusState *bus, const char *name)
if (!bus) {
if (!main_system_bus) {
main_system_bus = qbus_create(&system_bus_info, NULL, "main-system-bus");
+ main_system_bus->allow_hotplug = 1;
}
bus = main_system_bus;
}
diff --git a/pc-bios/bios.bin b/pc-bios/bios.bin
index d0d4b6a..e98f96c 100644
Binary files a/pc-bios/bios.bin and b/pc-bios/bios.bin differ
--
1.6.5.6
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [Qemu-devel] Re: [PATCH] Fix bug for vcpu hotplug
2010-08-18 7:17 ` [Qemu-devel] RE: [PATCH] Fix bug for vcpu hotplug Liu, Jinsong
@ 2010-08-18 7:33 ` Avi Kivity
2010-08-19 15:24 ` Anthony Liguori
0 siblings, 1 reply; 5+ messages in thread
From: Avi Kivity @ 2010-08-18 7:33 UTC (permalink / raw)
To: Liu, Jinsong
Cc: Yang, Sheng, qemu-devel@nongnu.org, kvm@vger.kernel.org, Li, Xin
On 08/18/2010 10:17 AM, Liu, Jinsong wrote:
> During test, we found qemu-kvm has a bug result in guestos shutdown when vcpu hotadd.
> This patch is to fix the bug, allow hotplug for sysbus qdev.
>
> --- a/hw/qdev.c
> +++ b/hw/qdev.c
> @@ -108,6 +108,7 @@ DeviceState *qdev_create(BusState *bus, const char *name)
> if (!bus) {
> if (!main_system_bus) {
> main_system_bus = qbus_create(&system_bus_info, NULL, "main-system-bus");
> + main_system_bus->allow_hotplug = 1;
> }
> bus = main_system_bus;
> }
Looks reasonable to me.
--
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Re: [PATCH] Fix bug for vcpu hotplug
2010-08-18 7:33 ` [Qemu-devel] " Avi Kivity
@ 2010-08-19 15:24 ` Anthony Liguori
2010-08-19 15:34 ` Avi Kivity
0 siblings, 1 reply; 5+ messages in thread
From: Anthony Liguori @ 2010-08-19 15:24 UTC (permalink / raw)
To: Avi Kivity
Cc: Liu, Jinsong, Yang, Sheng, qemu-devel@nongnu.org,
kvm@vger.kernel.org, Li, Xin
On 08/18/2010 02:33 AM, Avi Kivity wrote:
> On 08/18/2010 10:17 AM, Liu, Jinsong wrote:
>> During test, we found qemu-kvm has a bug result in guestos shutdown
>> when vcpu hotadd.
>> This patch is to fix the bug, allow hotplug for sysbus qdev.
>>
>> --- a/hw/qdev.c
>> +++ b/hw/qdev.c
>> @@ -108,6 +108,7 @@ DeviceState *qdev_create(BusState *bus, const
>> char *name)
>> if (!bus) {
>> if (!main_system_bus) {
>> main_system_bus = qbus_create(&system_bus_info, NULL,
>> "main-system-bus");
>> + main_system_bus->allow_hotplug = 1;
>> }
>> bus = main_system_bus;
>> }
>
>
> Looks reasonable to me.
Not really to me.
SysBus does not support hotplugging and CPU hot plug shouldn't have
anything to do with qdev hotplug.
Can you explain a bit more why this is needed?
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Re: [PATCH] Fix bug for vcpu hotplug
2010-08-19 15:24 ` Anthony Liguori
@ 2010-08-19 15:34 ` Avi Kivity
2010-08-19 19:04 ` Anthony Liguori
0 siblings, 1 reply; 5+ messages in thread
From: Avi Kivity @ 2010-08-19 15:34 UTC (permalink / raw)
To: Anthony Liguori
Cc: Liu, Jinsong, Yang, Sheng, qemu-devel@nongnu.org,
kvm@vger.kernel.org, Li, Xin
On 08/19/2010 06:24 PM, Anthony Liguori wrote:
> On 08/18/2010 02:33 AM, Avi Kivity wrote:
>> On 08/18/2010 10:17 AM, Liu, Jinsong wrote:
>>> During test, we found qemu-kvm has a bug result in guestos shutdown
>>> when vcpu hotadd.
>>> This patch is to fix the bug, allow hotplug for sysbus qdev.
>>>
>>> --- a/hw/qdev.c
>>> +++ b/hw/qdev.c
>>> @@ -108,6 +108,7 @@ DeviceState *qdev_create(BusState *bus, const
>>> char *name)
>>> if (!bus) {
>>> if (!main_system_bus) {
>>> main_system_bus = qbus_create(&system_bus_info, NULL,
>>> "main-system-bus");
>>> + main_system_bus->allow_hotplug = 1;
>>> }
>>> bus = main_system_bus;
>>> }
>>
>>
>> Looks reasonable to me.
>
> Not really to me.
>
> SysBus does not support hotplugging and CPU hot plug shouldn't have
> anything to do with qdev hotplug.
>
> Can you explain a bit more why this is needed?
>
On cpu hotplug an apic is added, and apics live on main_system_bus.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] Re: [PATCH] Fix bug for vcpu hotplug
2010-08-19 15:34 ` Avi Kivity
@ 2010-08-19 19:04 ` Anthony Liguori
0 siblings, 0 replies; 5+ messages in thread
From: Anthony Liguori @ 2010-08-19 19:04 UTC (permalink / raw)
To: Avi Kivity
Cc: Liu, Jinsong, Yang, Sheng, qemu-devel@nongnu.org,
kvm@vger.kernel.org, Li, Xin
On 08/19/2010 10:34 AM, Avi Kivity wrote:
> On 08/19/2010 06:24 PM, Anthony Liguori wrote:
>> On 08/18/2010 02:33 AM, Avi Kivity wrote:
>>> On 08/18/2010 10:17 AM, Liu, Jinsong wrote:
>>>> During test, we found qemu-kvm has a bug result in guestos shutdown
>>>> when vcpu hotadd.
>>>> This patch is to fix the bug, allow hotplug for sysbus qdev.
>>>>
>>>> --- a/hw/qdev.c
>>>> +++ b/hw/qdev.c
>>>> @@ -108,6 +108,7 @@ DeviceState *qdev_create(BusState *bus, const
>>>> char *name)
>>>> if (!bus) {
>>>> if (!main_system_bus) {
>>>> main_system_bus = qbus_create(&system_bus_info, NULL,
>>>> "main-system-bus");
>>>> + main_system_bus->allow_hotplug = 1;
>>>> }
>>>> bus = main_system_bus;
>>>> }
>>>
>>>
>>> Looks reasonable to me.
>>
>> Not really to me.
>>
>> SysBus does not support hotplugging and CPU hot plug shouldn't have
>> anything to do with qdev hotplug.
>>
>> Can you explain a bit more why this is needed?
>>
>
> On cpu hotplug an apic is added, and apics live on main_system_bus.
That's the problem then. An APIC does not live on any bus and that's
where the problem ought to be fixed.
Regards,
Anthony Liguori
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-08-19 19:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <BC00F5384FCFC9499AF06F92E8B78A9E0B0007F9DC@shsmsx502.ccr.corp.intel.com>
[not found] ` <4C67D844.5060306@redhat.com>
2010-08-18 7:17 ` [Qemu-devel] RE: [PATCH] Fix bug for vcpu hotplug Liu, Jinsong
2010-08-18 7:33 ` [Qemu-devel] " Avi Kivity
2010-08-19 15:24 ` Anthony Liguori
2010-08-19 15:34 ` Avi Kivity
2010-08-19 19:04 ` Anthony Liguori
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).