Re: cpu hotplug

2010-09-21 Thread Gleb Natapov
On Mon, Sep 20, 2010 at 09:07:16PM -0400, Kevin O'Connor wrote: On Mon, Sep 20, 2010 at 08:50:17AM +0200, Gleb Natapov wrote: On Sun, Sep 19, 2010 at 06:03:31PM -0400, Kevin O'Connor wrote: I was wrong. The cpu_set x offline does send an event to the guest OS. SeaBIOS even forwards the

Re: cpu hotplug

2010-09-20 Thread Gleb Natapov
On Sun, Sep 19, 2010 at 05:57:25PM -0400, Kevin O'Connor wrote: On Sun, Sep 19, 2010 at 06:24:33PM +0200, Conrad Wood wrote: a script with my exact steps is below. Result is reproducible. [...] echo Ejecting CPU #4 echo cpu_set 4 offline | nc ${MONITORHOST} ${MONITORPORT} /dev/null

Re: cpu hotplug

2010-09-20 Thread Gleb Natapov
On Sun, Sep 19, 2010 at 06:03:31PM -0400, Kevin O'Connor wrote: On Sun, Sep 19, 2010 at 06:12:14PM +0200, Gleb Natapov wrote: On Sun, Sep 19, 2010 at 12:04:51PM -0400, Kevin O'Connor wrote: I'm confused. The cpu_set x offline doesn't appear to do anything for me. It does not disable the

Re: cpu hotplug

2010-09-20 Thread Kevin O'Connor
On Mon, Sep 20, 2010 at 08:50:17AM +0200, Gleb Natapov wrote: On Sun, Sep 19, 2010 at 06:03:31PM -0400, Kevin O'Connor wrote: I was wrong. The cpu_set x offline does send an event to the guest OS. SeaBIOS even forwards the event along - as far as I can tell a Notify(CPxx, 3) event is

Re: cpu hotplug

2010-09-19 Thread Gleb Natapov
On Sat, Sep 18, 2010 at 08:27:54PM +0200, Conrad Wood wrote: On Sat, 2010-09-18 at 10:32 -0400, Kevin O'Connor wrote: On Fri, Sep 17, 2010 at 11:39:36PM +0200, Conrad Wood wrote: Hi everyone, I'm currently looking into hotplugging CPUs. This exclusively with linux-guests and

Re: cpu hotplug

2010-09-19 Thread Conrad Wood
On Sun, 2010-09-19 at 08:38 +0200, Gleb Natapov wrote: On Sat, Sep 18, 2010 at 08:27:54PM +0200, Conrad Wood wrote: On Sat, 2010-09-18 at 10:32 -0400, Kevin O'Connor wrote: On Fri, Sep 17, 2010 at 11:39:36PM +0200, Conrad Wood wrote: Hi everyone, I'm currently looking into

Re: cpu hotplug

2010-09-19 Thread Gleb Natapov
On Sun, Sep 19, 2010 at 12:41:37PM +0200, Conrad Wood wrote: On Sun, 2010-09-19 at 08:38 +0200, Gleb Natapov wrote: On Sat, Sep 18, 2010 at 08:27:54PM +0200, Conrad Wood wrote: On Sat, 2010-09-18 at 10:32 -0400, Kevin O'Connor wrote: On Fri, Sep 17, 2010 at 11:39:36PM +0200, Conrad Wood

Re: cpu hotplug

2010-09-19 Thread Conrad Wood
On Sun, 2010-09-19 at 12:46 +0200, Gleb Natapov wrote: [...] But... why does the command info cpus in the monitor report all cpus apart from CPU0 as (halted) ? Because they are halted? Run multiple cpu hogs in the guest and see if cpus will still be halted as reported by monitor. Also

Re: cpu hotplug

2010-09-19 Thread Gleb Natapov
On Sun, Sep 19, 2010 at 01:09:39PM +0200, Conrad Wood wrote: On Sun, 2010-09-19 at 12:46 +0200, Gleb Natapov wrote: [...] But... why does the command info cpus in the monitor report all cpus apart from CPU0 as (halted) ? Because they are halted? Run multiple cpu hogs in the guest and

Re: cpu hotplug

2010-09-19 Thread Conrad Wood
On Sun, 2010-09-19 at 13:13 +0200, Gleb Natapov wrote: On Sun, Sep 19, 2010 at 01:09:39PM +0200, Conrad Wood wrote: On Sun, 2010-09-19 at 12:46 +0200, Gleb Natapov wrote: [...] But... why does the command info cpus in the monitor report all cpus apart from CPU0 as (halted) ?

Re: cpu hotplug

2010-09-19 Thread Gleb Natapov
On Sun, Sep 19, 2010 at 01:32:28PM +0200, Conrad Wood wrote: On Sun, 2010-09-19 at 13:13 +0200, Gleb Natapov wrote: On Sun, Sep 19, 2010 at 01:09:39PM +0200, Conrad Wood wrote: On Sun, 2010-09-19 at 12:46 +0200, Gleb Natapov wrote: [...] But... why does the command info cpus in the

Re: cpu hotplug

2010-09-19 Thread Conrad Wood
On Sun, 2010-09-19 at 13:39 +0200, Gleb Natapov wrote: On Sun, Sep 19, 2010 at 01:32:28PM +0200, Conrad Wood wrote: On Sun, 2010-09-19 at 13:13 +0200, Gleb Natapov wrote: On Sun, Sep 19, 2010 at 01:09:39PM +0200, Conrad Wood wrote: On Sun, 2010-09-19 at 12:46 +0200, Gleb Natapov wrote:

Re: cpu hotplug

2010-09-19 Thread Gleb Natapov
On Sun, Sep 19, 2010 at 01:51:29PM +0200, Conrad Wood wrote: On Sun, 2010-09-19 at 13:39 +0200, Gleb Natapov wrote: On Sun, Sep 19, 2010 at 01:32:28PM +0200, Conrad Wood wrote: On Sun, 2010-09-19 at 13:13 +0200, Gleb Natapov wrote: On Sun, Sep 19, 2010 at 01:09:39PM +0200, Conrad Wood

Re: cpu hotplug

2010-09-19 Thread Conrad Wood
On Sun, 2010-09-19 at 13:59 +0200, Gleb Natapov wrote: On Sun, Sep 19, 2010 at 01:51:29PM +0200, Conrad Wood wrote: On Sun, 2010-09-19 at 13:39 +0200, Gleb Natapov wrote: On Sun, Sep 19, 2010 at 01:32:28PM +0200, Conrad Wood wrote: On Sun, 2010-09-19 at 13:13 +0200, Gleb Natapov wrote:

Re: cpu hotplug

2010-09-19 Thread Kevin O'Connor
On Sun, Sep 19, 2010 at 08:38:12AM +0200, Gleb Natapov wrote: On Sat, Sep 18, 2010 at 08:27:54PM +0200, Conrad Wood wrote: hm... after upgrading to seabios 0.6.1 and qemu-kvm 0.13.50 (git today) I get: [...] any ideas ? Known problem in qemu. There was a patch for this, but qemu

Re: cpu hotplug

2010-09-19 Thread Conrad Wood
On Sun, 2010-09-19 at 09:26 -0400, Kevin O'Connor wrote: On Sun, Sep 19, 2010 at 08:38:12AM +0200, Gleb Natapov wrote: On Sat, Sep 18, 2010 at 08:27:54PM +0200, Conrad Wood wrote: hm... after upgrading to seabios 0.6.1 and qemu-kvm 0.13.50 (git today) I get: [...] any ideas ?

Re: cpu hotplug

2010-09-19 Thread Gleb Natapov
On Sun, Sep 19, 2010 at 03:29:35PM +0200, Conrad Wood wrote: On Sun, 2010-09-19 at 09:26 -0400, Kevin O'Connor wrote: On Sun, Sep 19, 2010 at 08:38:12AM +0200, Gleb Natapov wrote: On Sat, Sep 18, 2010 at 08:27:54PM +0200, Conrad Wood wrote: hm... after upgrading to seabios 0.6.1 and

Re: cpu hotplug

2010-09-19 Thread Conrad Wood
hm... that's the version I am using und it does not work here ;( the hotplug itself seems to work but they're reported as halted. I told you this is cosmetic. They are working. I agree, the hotplug itself seems to be working! Then it seems to be a local misconfiguration. and if so, I

Re: cpu hotplug

2010-09-19 Thread Kevin O'Connor
On Sun, Sep 19, 2010 at 03:29:35PM +0200, Conrad Wood wrote: On Sun, 2010-09-19 at 09:26 -0400, Kevin O'Connor wrote: On Sun, Sep 19, 2010 at 08:38:12AM +0200, Gleb Natapov wrote: Known problem in qemu. There was a patch for this, but qemu maintainers think it is not good enough. Old

Re: cpu hotplug

2010-09-19 Thread Conrad Wood
On Sun, 2010-09-19 at 09:38 -0400, Kevin O'Connor wrote: On Sun, Sep 19, 2010 at 03:29:35PM +0200, Conrad Wood wrote: On Sun, 2010-09-19 at 09:26 -0400, Kevin O'Connor wrote: On Sun, Sep 19, 2010 at 08:38:12AM +0200, Gleb Natapov wrote: Known problem in qemu. There was a patch for this,

Re: cpu hotplug

2010-09-19 Thread Gleb Natapov
On Sun, Sep 19, 2010 at 03:35:47PM +0200, Conrad Wood wrote: hm... that's the version I am using und it does not work here ;( the hotplug itself seems to work but they're reported as halted. I told you this is cosmetic. They are working. I agree, the hotplug itself seems to be

Re: cpu hotplug

2010-09-19 Thread Kevin O'Connor
On Sun, Sep 19, 2010 at 03:40:45PM +0200, Gleb Natapov wrote: halted state is not the way to check for whether cpu is online or offline. cpu may be online but executing hlt instruction so its state will be halted, but cpu itself is online. Actually with kvm today you are not able to check

Re: cpu hotplug

2010-09-19 Thread Gleb Natapov
On Sun, Sep 19, 2010 at 09:46:21AM -0400, Kevin O'Connor wrote: On Sun, Sep 19, 2010 at 03:40:45PM +0200, Gleb Natapov wrote: halted state is not the way to check for whether cpu is online or offline. cpu may be online but executing hlt instruction so its state will be halted, but cpu

Re: cpu hotplug

2010-09-19 Thread Conrad Wood
On Sun, 2010-09-19 at 15:50 +0200, Gleb Natapov wrote: On Sun, Sep 19, 2010 at 09:46:21AM -0400, Kevin O'Connor wrote: On Sun, Sep 19, 2010 at 03:40:45PM +0200, Gleb Natapov wrote: halted state is not the way to check for whether cpu is online or offline. cpu may be online but executing

Re: cpu hotplug

2010-09-19 Thread Kevin O'Connor
On Sun, Sep 19, 2010 at 04:07:50PM +0200, Conrad Wood wrote: 1) Thanks for clarifying online vs halted - that makes sense and is probably part of what confused me. I need to get the online/offline status of cpus, not if they are halted or not. I understand this is currently not possible with

Re: cpu hotplug

2010-09-19 Thread Gleb Natapov
On Sun, Sep 19, 2010 at 04:07:50PM +0200, Conrad Wood wrote: On Sun, 2010-09-19 at 15:50 +0200, Gleb Natapov wrote: On Sun, Sep 19, 2010 at 09:46:21AM -0400, Kevin O'Connor wrote: On Sun, Sep 19, 2010 at 03:40:45PM +0200, Gleb Natapov wrote: halted state is not the way to check for

Re: cpu hotplug

2010-09-19 Thread Conrad Wood
[..] Lets establish some terminology to understand each other better: Lets use CPU inserted/ejected to refer to cpu being available/not available to a guest. Lest use CPU online/offline to refer to cpu been used by a guest OS. CPU hot-plug works like this: cpu is inserted (plugged into

Re: cpu hotplug

2010-09-19 Thread Gleb Natapov
On Sun, Sep 19, 2010 at 05:16:24PM +0200, Conrad Wood wrote: [..] Lets establish some terminology to understand each other better: Lets use CPU inserted/ejected to refer to cpu being available/not available to a guest. Lest use CPU online/offline to refer to cpu been used by a guest OS.

Re: cpu hotplug

2010-09-19 Thread Avi Kivity
On 09/19/2010 01:59 PM, Gleb Natapov wrote: I fixed it several times in the past[0][1][3], but it keeps re-appearing :) I hope current qemu-kvm head is OK. [0] 865aa3fec2b3d83c9b6edd452050a30ef6eaf3b8 [1] 8c7d4cb7163d1c97df4439e2e0edb5918abf106b [2] d6d233543d543fcf34df6190bbce5daf38d870f5

Re: cpu hotplug

2010-09-19 Thread Gleb Natapov
On Sun, Sep 19, 2010 at 05:20:38PM +0200, Avi Kivity wrote: On 09/19/2010 01:59 PM, Gleb Natapov wrote: I fixed it several times in the past[0][1][3], but it keeps re-appearing :) I hope current qemu-kvm head is OK. [0] 865aa3fec2b3d83c9b6edd452050a30ef6eaf3b8 [1]

Re: cpu hotplug

2010-09-19 Thread Conrad Wood
I need to know if a cpu is currently inserted or ejected. The only way to do that currently is to track it in your management app. The Management App does know which one should be inserted or ejected. I see now way of enforcing it though. This is what I had in mind: (simplified) 1.

Re: cpu hotplug

2010-09-19 Thread Gleb Natapov
On Sun, Sep 19, 2010 at 05:37:18PM +0200, Conrad Wood wrote: I need to know if a cpu is currently inserted or ejected. The only way to do that currently is to track it in your management app. The Management App does know which one should be inserted or ejected. I see now way of

Re: cpu hotplug

2010-09-19 Thread Conrad Wood
However after step 7 the guest can turn the cpu online again by issuing echo 1 /sys/devices/.../cpuX/online There will be no /sys/devices/.../cpuX/online in guest after step 7. Well then at least in my version there's a bug, because it still is there and never goes away. (kvm 0.12.5) And

Re: cpu hotplug

2010-09-19 Thread Gleb Natapov
On Sun, Sep 19, 2010 at 05:44:00PM +0200, Conrad Wood wrote: However after step 7 the guest can turn the cpu online again by issuing echo 1 /sys/devices/.../cpuX/online There will be no /sys/devices/.../cpuX/online in guest after step 7. Well then at least in my version there's a

Re: cpu hotplug

2010-09-19 Thread Kevin O'Connor
On Sun, Sep 19, 2010 at 05:53:47PM +0200, Gleb Natapov wrote: On Sun, Sep 19, 2010 at 05:44:00PM +0200, Conrad Wood wrote: However after step 7 the guest can turn the cpu online again by issuing echo 1 /sys/devices/.../cpuX/online There will be no /sys/devices/.../cpuX/online in

Re: cpu hotplug

2010-09-19 Thread Gleb Natapov
On Sun, Sep 19, 2010 at 12:04:51PM -0400, Kevin O'Connor wrote: On Sun, Sep 19, 2010 at 05:53:47PM +0200, Gleb Natapov wrote: On Sun, Sep 19, 2010 at 05:44:00PM +0200, Conrad Wood wrote: However after step 7 the guest can turn the cpu online again by issuing echo 1

Re: cpu hotplug

2010-09-19 Thread Conrad Wood
On Sun, 2010-09-19 at 12:04 -0400, Kevin O'Connor wrote: On Sun, Sep 19, 2010 at 05:53:47PM +0200, Gleb Natapov wrote: On Sun, Sep 19, 2010 at 05:44:00PM +0200, Conrad Wood wrote: However after step 7 the guest can turn the cpu online again by issuing echo 1

Re: cpu hotplug

2010-09-19 Thread Kevin O'Connor
On Sun, Sep 19, 2010 at 06:24:33PM +0200, Conrad Wood wrote: a script with my exact steps is below. Result is reproducible. [...] echo Ejecting CPU #4 echo cpu_set 4 offline | nc ${MONITORHOST} ${MONITORPORT} /dev/null printInfo echo Setting all available cpus to online... ssh -lroot

Re: cpu hotplug

2010-09-19 Thread Kevin O'Connor
On Sun, Sep 19, 2010 at 06:12:14PM +0200, Gleb Natapov wrote: On Sun, Sep 19, 2010 at 12:04:51PM -0400, Kevin O'Connor wrote: I'm confused. The cpu_set x offline doesn't appear to do anything for me. It does not disable the cpu, nor does it inform the guest to disable the cpu. [...] Then

Re: cpu hotplug

2010-09-18 Thread Conrad Wood
On Sat, 2010-09-18 at 10:32 -0400, Kevin O'Connor wrote: On Fri, Sep 17, 2010 at 11:39:36PM +0200, Conrad Wood wrote: Hi everyone, I'm currently looking into hotplugging CPUs. This exclusively with linux-guests and linux-host. I have found some (conflicting) information about this on

Re: cpu hotplug

2010-09-18 Thread Conrad Wood
On Sat, 2010-09-18 at 10:32 -0400, Kevin O'Connor wrote: On Fri, Sep 17, 2010 at 11:39:36PM +0200, Conrad Wood wrote: Hi everyone, I'm currently looking into hotplugging CPUs. This exclusively with linux-guests and linux-host. I have found some (conflicting) information about this on

Re: CPU hotplug add seems broken

2010-01-11 Thread Ryota Ozaki
2010/1/10 Gleb Natapov g...@redhat.com: On Sun, Jan 10, 2010 at 05:33:02PM +0900, Ryota Ozaki wrote: [...] I see. Anyway I think we need some workaround to avoid segfault. Disabling cpu_set command for qemu-kvm-0.12 is good enough workaround. Agree. I'll send a patch. but ACPI code that

Re: CPU hotplug add seems broken

2010-01-11 Thread Gleb Natapov
On Mon, Jan 11, 2010 at 06:24:32PM +0900, Ryota Ozaki wrote: 2010/1/10 Gleb Natapov g...@redhat.com: On Sun, Jan 10, 2010 at 05:33:02PM +0900, Ryota Ozaki wrote: [...] I see. Anyway I think we need some workaround to avoid segfault. Disabling cpu_set command for qemu-kvm-0.12 is good

Re: CPU hotplug add seems broken

2010-01-11 Thread Ryota Ozaki
On Mon, Jan 11, 2010 at 6:32 PM, Gleb Natapov g...@redhat.com wrote: On Mon, Jan 11, 2010 at 06:24:32PM +0900, Ryota Ozaki wrote: 2010/1/10 Gleb Natapov g...@redhat.com: [...] May I ask what do you need it for? Oh sorry, actually I have not so strong desire on cpu hotplug but I have on

Re: CPU hotplug add seems broken

2010-01-11 Thread Avi Kivity
On 01/11/2010 11:24 AM, Ryota Ozaki wrote: The problem is that there is no standard way to hotplug CPUs in a PC. Linux implements the way UNISYS happen to do it, but no other system do it like that. Windows implements it differently and in the way that conflicts with Linux, so you can't have

Re: CPU hotplug add seems broken

2010-01-11 Thread Gleb Natapov
On Mon, Jan 11, 2010 at 12:23:05PM +0200, Avi Kivity wrote: On 01/11/2010 11:24 AM, Ryota Ozaki wrote: The problem is that there is no standard way to hotplug CPUs in a PC. Linux implements the way UNISYS happen to do it, but no other system do it like that. Windows implements it

Re: CPU hotplug add seems broken

2010-01-11 Thread Avi Kivity
On 01/11/2010 12:24 PM, Gleb Natapov wrote: IMO we should stick with the unisys-derived implementation, port it to SeaBIOS, and write a Windows driver for it. It has the advantage of having support in Linux, and of being somewhat tested. That cool, but SVVP complains. What's the

Re: CPU hotplug add seems broken

2010-01-11 Thread Ryota Ozaki
On Mon, Jan 11, 2010 at 7:23 PM, Avi Kivity a...@redhat.com wrote: On 01/11/2010 11:24 AM, Ryota Ozaki wrote: The problem is that there is no standard way to hotplug CPUs in a PC. Linux implements the way UNISYS happen to do it, but no other system do it like that. Windows implements it

Re: CPU hotplug add seems broken

2010-01-11 Thread Gleb Natapov
On Mon, Jan 11, 2010 at 12:25:52PM +0200, Avi Kivity wrote: On 01/11/2010 12:24 PM, Gleb Natapov wrote: IMO we should stick with the unisys-derived implementation, port it to SeaBIOS, and write a Windows driver for it. It has the advantage of having support in Linux, and of being somewhat

Re: CPU hotplug add seems broken

2010-01-11 Thread Avi Kivity
On 01/11/2010 12:42 PM, Gleb Natapov wrote: That cool, but SVVP complains. What's the complaint? Maybe we can fix it instead of rewriting things. https://bugzilla.redhat.com/show_bug.cgi?id=49584://bugzilla.redhat.com/show_bug.cgi?id=495844 Hope it accessible to everyone but

Re: CPU hotplug add seems broken

2010-01-11 Thread Gleb Natapov
On Mon, Jan 11, 2010 at 12:50:05PM +0200, Avi Kivity wrote: On 01/11/2010 12:42 PM, Gleb Natapov wrote: That cool, but SVVP complains. What's the complaint? Maybe we can fix it instead of rewriting things.

Re: CPU hotplug add seems broken

2010-01-11 Thread Avi Kivity
On 01/11/2010 12:53 PM, Gleb Natapov wrote: Anyway all those solution do not guaranty that we will be able to do cpu hotplug on Windows since we don't yet know what Windows expects. I'm sure we'll be able to eventually. Eventually yes, but can you say now that it will not

Re: CPU hotplug add seems broken

2010-01-11 Thread Gleb Natapov
On Mon, Jan 11, 2010 at 12:58:24PM +0200, Avi Kivity wrote: On 01/11/2010 12:53 PM, Gleb Natapov wrote: Anyway all those solution do not guaranty that we will be able to do cpu hotplug on Windows since we don't yet know what Windows expects. I'm sure we'll be able to eventually.

Re: CPU hotplug add seems broken

2010-01-11 Thread Avi Kivity
On 01/11/2010 01:03 PM, Gleb Natapov wrote: No, but I'm not really worried about that. So you want to introduce something that we know upset Windows without looking into alternatives. I don't want to drop support for existing guests unless I have to. And as far as I remember

Re: CPU hotplug add seems broken

2010-01-11 Thread Gleb Natapov
On Mon, Jan 11, 2010 at 01:06:24PM +0200, Avi Kivity wrote: On 01/11/2010 01:03 PM, Gleb Natapov wrote: No, but I'm not really worried about that. So you want to introduce something that we know upset Windows without looking into alternatives. I don't want to drop support for existing

Re: CPU hotplug add seems broken

2010-01-11 Thread Anthony Liguori
On 01/11/2010 04:50 AM, Avi Kivity wrote: On 01/11/2010 12:42 PM, Gleb Natapov wrote: That cool, but SVVP complains. What's the complaint? Maybe we can fix it instead of rewriting things. https://bugzilla.redhat.com/show_bug.cgi?id=49584://bugzilla.redhat.com/show_bug.cgi?id=495844 Hope

Re: CPU hotplug add seems broken

2010-01-11 Thread Avi Kivity
On 01/11/2010 03:57 PM, Anthony Liguori wrote: win2k8 supports CPU hotplug with VMware. I'd suggest someone fire up VMware and dump the ACPI tables to try and see how they're doing it. Otherwise, if someone has a physical machine that is known to do CPU hotplug with win2k8, an acpi dump

Re: CPU hotplug add seems broken

2010-01-10 Thread Gleb Natapov
On Sun, Jan 10, 2010 at 05:33:02PM +0900, Ryota Ozaki wrote: On Sun, Jan 10, 2010 at 3:39 PM, Gleb Natapov g...@redhat.com wrote: On Sat, Jan 09, 2010 at 04:30:11PM -0300, Daniel Bareiro wrote: On Friday, 08 January 2010 19:35:04 +0900, Ryota Ozaki wrote: Hi all, Hi, Ryota.

Re: CPU hotplug add seems broken

2010-01-09 Thread Daniel Bareiro
On Friday, 08 January 2010 19:35:04 +0900, Ryota Ozaki wrote: Hi all, Hi, Ryota. I've tried CPU hotplug with latest qemu-kvm.git code, and got segmentation fault. I'm also having this problem but with Linux 2.6.32.2 + qemu-kvm-0.12.1.1 in the host: Jan 9 16:11:11 ubuntu kernel:

Re: CPU hotplug add seems broken

2010-01-09 Thread Gleb Natapov
On Sat, Jan 09, 2010 at 04:30:11PM -0300, Daniel Bareiro wrote: On Friday, 08 January 2010 19:35:04 +0900, Ryota Ozaki wrote: Hi all, Hi, Ryota. I've tried CPU hotplug with latest qemu-kvm.git code, and got segmentation fault. I'm also having this problem but with Linux 2.6.32.2