After OS ejecting a vcpu successful, it will call CPEJ method,
there communicate the masked vcpu bitmap to QEMU.
Signed-off-by: Chen Fan
---
src/acpi-dsdt-cpu-hotplug.dsl | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/acpi-dsdt-cpu-hotplug.dsl b/src/acpi-dsdt-cpu
After ACPI get a signal to eject a vcpu, then it will notify
the vcpu thread of needing to exit, before the vcpu exiting,
will release the vcpu related objects.
Signed-off-by: Chen Fan
---
cpus.c | 36
hw/acpi/piix4.c | 16
Rename variable 'cpu_added_notifier' to 'cpu_hotplug_notifier', for
adding vcpu-remove notifier support.
Signed-off-by: Chen Fan
---
hw/acpi/piix4.c | 10 +-
hw/i386/pc.c| 2 +-
include/sysemu/sysemu.h | 2 +-
qom/cpu.c | 10
Signed-off-by: Chen Fan
---
hw/i386/pc.c | 5 +
hw/i386/pc_piix.c| 1 +
include/hw/boards.h | 2 ++
include/hw/i386/pc.h | 1 +
qapi-schema.json | 12
qmp-commands.hx | 23 +++
qmp.c| 9 +
7 files changed, 53
When OS eject a vcpu (like: echo 1 > /sys/bus/acpi/devices/LNXCPUXX/eject),
it will call acpi EJ0 method, the firmware will write the new cpumap, QEMU
will know which vcpu need to be ejected.
Signed-off-by: Chen Fan
---
hw/acpi/piix4.c | 35 ++-
1 file chan
/gmane.comp.emulators.kvm.devel/114347
for seabios patches:
http://comments.gmane.org/gmane.comp.emulators.qemu/230460
Chen Fan (6):
piix4: implement function 'cpu_status_write' for vcpu ejection
cpus: release allocated vcpu objects and exit vcpu thread
qom cpu: rename variable 'cpu
Move struct HotplugEventType from file piix4.c to file qom/cpu.c,
and add struct CPUNotifier for supporting PLUG and UNPLUG cpu notifier.
Signed-off-by: Chen Fan
---
hw/acpi/piix4.c | 8 ++--
include/qom/cpu.h | 10 ++
qom/cpu.c | 6 +-
3 files changed, 17 insertions
Implement cpu interface 'cpu_common_unrealizefn' for emiting vcpu-remove
notifier to ACPI, then ACPI could send sci interrupt to OS for hot-remove
vcpu.
Signed-off-by: Chen Fan
---
hw/i386/pc.c | 19 ++-
qom/cpu.c| 13 +
2 files changed, 31 insert
On Thu, 2014-09-18 at 20:07 +0800, zhanghailiang wrote:
> When do memory hotplug, if there is numa node, we should add
> the memory size to the corresponding node memory size.
>
> For now, it mainly affects the result of hmp command "info numa".
>
> Signed-off-by: zhanghailiang
> ---
> v2:
> -
Signed-off-by: Chen Fan
Reviewed-by: Peter Crosthwaite
Reviewed-by: Hu Tao
---
numa.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/numa.c b/numa.c
index c78cec9..aa772aa 100644
--- a/numa.c
+++ b/numa.c
@@ -318,10 +318,11 @@ void
9)
==15046==by 0x2BCDEF: fd_chr_read (qemu-char.c:213)
Chen Fan (3):
query-memdev: fix potential memory leaks
qom/object.c: fix string_output_get_string() memory leak
hmp: fix MemdevList memory leak
hmp.c| 8 ++--
numa.c | 15 +++
qom/object.c | 12 +
the memdev_list in hmp_info_memdev() is never freed.
so we use existent method qapi_free_MemdevList() to free it.
and also we can use qapi_free_MemdevList() to replace list loops
to clean up the memdev list in error path.
Signed-off-by: Chen Fan
Reviewed-by: Peter Crosthwaite
Reviewed-by: Hu
string_output_get_string() uses g_string_free(str, false) to
transfer the 'str' pointer to callers and never free it.
Signed-off-by: Chen Fan
Reviewed-by: Peter Crosthwaite
Reviewed-by: Hu Tao
---
hmp.c| 6 --
qom/object.c | 12 ++--
2 files changed, 14 insert
When useing x86_64-softmmu --enable-kvm boot qemu, cpu-add command fails to add
a vcpu,
there show (KVM: setting VAPIC address failed).
The reason is that we use an uninitialized cpu->kvm-fd to ioctl.
so we move realizing apic to the back of qemu_init_vcpu.
Signed-off-by: Chen Fan
---
incl
of qemu_init_vcpu.
Signed-off-by: Chen Fan
---
include/qom/cpu.h | 2 ++
qom/cpu.c | 13 +
target-i386/cpu.c | 10 --
3 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/include/qom/cpu.h b/include/qom/cpu.h
index daf1835..4b16385 100644
--- a/include/qom/cp
uninitialized, kvmfd is
zero, fail to ioctl).
But in startup case system wide reset after vcpu was initialized.
->machine->init -> qdev_machine_creation_done -> qemu_system_reset ->
cpu_synchronize_all_post_reset -> cpu_synchronize_post_reset.
v1-v2: Change cpu_apic_realize t
instead of seeking the number of CPUs, using CPUMASK bitmaps to
calculate the cpu index, also would be a gread benefit to remove
cpu index.
Signed-off-by: Chen Fan
---
exec.c | 9 -
include/qom/cpu.h | 9 +
include/sysemu/sysemu.h | 7 ---
3 files
check of APIC ID after cpu object initialization
that was different from 'cpu_add' command which check 'ids'
at the beginning.
Chen Fan (3):
using CPUMASK bitmaps to calculate cpu index
cpu: introduce CpuTopoInfo structure for argument simplification
cpu: add device_add fo
Signed-off-by: Chen Fan
Reviewed-by: Eduardo Habkost
---
target-i386/topology.h | 33 +
1 file changed, 17 insertions(+), 16 deletions(-)
diff --git a/target-i386/topology.h b/target-i386/topology.h
index 07a6c5f..e9ff89c 100644
--- a/target-i386/topology.h
apic-id property to add default APIC IDs.
Signed-off-by: Chen Fan
---
include/qom/cpu.h | 2 ++
qdev-monitor.c | 11 ++
target-i386/cpu.c | 91 +-
target-i386/topology.h | 18 ++
4 files changed, 121 insertions(+), 1
)
==14553==by 0x80DBFBC: XkbGetKeyboardByName (in /usr/lib64/libX11.so.6.3.0)
==14553==by 0x40C704: gtk_display_init (gtk.c:1798)
==14553==by 0x1AEDC1: main (vl.c:4480)
Signed-off-by: Chen Fan
---
ui/gtk.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/ui/gtk.c b/ui/gtk.c
When KVM exit reason is KVM_EXIT_SHUTDOWN, there will cause
guest to reset, but we can't get any information to fix.
we knew KVM handle triple fault will set exit_reason to
KVM_EXIT_SHUTDOWN, so we also should dump the APIC information
to help to fix.
Signed-off-by: Chen Fan
---
includ
Signed-off-by: Chen Fan
---
target-i386/cpu.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/target-i386/cpu.c b/target-i386/cpu.c
index 6d008ab..217500c 100644
--- a/target-i386/cpu.c
+++ b/target-i386/cpu.c
@@ -1716,9 +1716,9 @@ static void x86_set_hv_spinlocks
Signed-off-by: Chen Fan
---
numa.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/numa.c b/numa.c
index 7bf7834..a2b4bca 100644
--- a/numa.c
+++ b/numa.c
@@ -318,10 +318,11 @@ void memory_region_allocate_system_memory(MemoryRegion
*mr, Object *owner,
static int
9)
==15046==by 0x2BCDEF: fd_chr_read (qemu-char.c:213)
Chen Fan (3):
query-memdev: fix potential memory leaks
qom/object.c: fix string_output_get_string() memory leak
hmp: fix MemdevList memory leak
hmp.c| 15 ++-
numa.c | 6 +-
qom/object.c | 11 --
string_output_get_string() always return the data the sov->string
point. and never free.
Signed-off-by: Chen Fan
---
hmp.c| 6 --
qom/object.c | 11 ---
2 files changed, 12 insertions(+), 5 deletions(-)
diff --git a/hmp.c b/hmp.c
index 4d1838e..2414cc7 100644
--- a/hm
Signed-off-by: Chen Fan
---
hmp.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/hmp.c b/hmp.c
index 2414cc7..0b1c830 100644
--- a/hmp.c
+++ b/hmp.c
@@ -1685,13 +1685,14 @@ void hmp_info_memdev(Monitor *mon, const QDict *qdict)
{
Error *err = NULL
Signed-off-by: Chen Fan
Reviewed-by: Peter Crosthwaite
---
numa.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/numa.c b/numa.c
index 7bf7834..a2b4bca 100644
--- a/numa.c
+++ b/numa.c
@@ -318,10 +318,11 @@ void memory_region_allocate_system_memory(MemoryRegion
*mr
string_output_get_string() uses g_string_free(str, false) to
transfer the 'str' pointer to callers and never free it.
Signed-off-by: Chen Fan
---
hmp.c| 6 --
qom/object.c | 12 ++--
2 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/hmp.c b/hmp.c
ind
9)
==15046==by 0x2BCDEF: fd_chr_read (qemu-char.c:213)
Chen Fan (3):
query-memdev: fix potential memory leaks
qom/object.c: fix string_output_get_string() memory leak
hmp: fix MemdevList memory leak
hmp.c| 15 ++-
numa.c | 6 +-
qom/object.c | 11 --
the memdev_list in hmp_info_memdev() is never freed.
so we use existent method qapi_free_MemdevList() to free it.
and also we can use qapi_free_MemdevList() to replace list loops
to clean up the memdev list in error path.
Signed-off-by: Chen Fan
---
hmp.c | 2 ++
numa.c | 9 ++---
2 files
Implement x86_cpu_unrealizefn() for corresponding x86_cpu_realizefn(),
which is mostly used to clean the apic related allocation and vmstates
at here.
Signed-off-by: Chen Fan
---
hw/i386/kvm/apic.c | 8
hw/intc/apic.c | 10 ++
hw/intc
This motion is preparing for refactoring vCPU apic subsequently.
Signed-off-by: Chen Fan
---
cpu-exec.c| 2 +-
cpus.c| 5 ++---
hw/i386/kvmvapic.c| 8 +++-
hw/i386/pc.c | 17 -
target-i386/cpu-qom.h | 4
Rename variable 'cpu_added_notifier' to 'cpu_hotplug_notifier' for
adding remove vcpu notifier support.
Signed-off-by: Chen Fan
---
hw/acpi/piix4.c | 10 +-
hw/i386/pc.c| 2 +-
include/sysemu/sysemu.h | 2 +-
qom/cpu.c | 10 +--
ove cpu from the last one
rather than specify vcpuid and fix migration bug.
Chen Fan (8):
x86: move apic_state field from CPUX86State to X86CPU
x86: add x86_cpu_unrealizefn() for cpu apic remove
qmp: add 'cpu-del' command support
qom cpu: rename variable 'cpu_added_notif
add cpu hot-remove interface pc_hot_del_cpu() for unrealizing vcpu device.
when using 'cpu-del' command, not need to specify vcpuid, the last one cpu
will be removed.
Signed-off-by: Chen Fan
---
hw/i386/pc.c | 19 +++
hw/i386/pc_piix.c| 3 ++-
include/h
Move struct HotplugEventType from file piix4.c to file qom/cpu.c,
and add struct CPUNotifier for supporting UNPLUG cpu notifier.
Signed-off-by: Chen Fan
---
hw/acpi/piix4.c | 8 ++--
include/qom/cpu.h | 10 ++
qom/cpu.c | 6 +-
3 files changed, 17 insertions(+), 7
After ACPI get a signal to eject a vCPU, then it will notify
the vCPU thread to exit in KVM, and the vCPU must be removed from CPU list,
before the vCPU really removed, there will release the all related vCPU objects.
Signed-off-by: Chen Fan
---
cpus.c | 39
in the further OS should reject vcpu arbitrarily.
Signed-off-by: Chen Fan
---
cpus.c| 7 ++
hw/acpi/piix4.c | 48 ++-
hw/i386/acpi-dsdt-cpu-hotplug.dsl | 6 -
include/qom/cpu.h | 10
add interface cpu_common_unrealizefn() for emiting vcpu unplug
notifier to ACPI, then ACPI could send sci interrupt
to OS for hot-remove vcpu.
Signed-off-by: Chen Fan
---
qom/cpu.c | 12
1 file changed, 12 insertions(+)
diff --git a/qom/cpu.c b/qom/cpu.c
index 728b83b..78038ab
On Mon, 2013-12-23 at 16:36 +0100, Andreas Färber wrote:
> Am 23.12.2013 10:04, schrieb Chen Fan:
> > This motion is preparing for refactoring vCPU apic subsequently.
> >
> > Signed-off-by: Chen Fan
> > ---
> > cpu-exec.c| 2 +-
> > cpus.
} else if ((interrupt_request & CPU_INTERRUPT_NMI) &&
> !(env->hflags2 & HF2_NMI_MASK)) {
> @@ -685,6 +688,9 @@ int cpu_exec(CPUArchState *env)
>(defined(TARGET_M68K) || defined(TARGET_PPC) || defined(TARGET_S390X)))
> cc = CPU_GET_CLASS(cpu);
> #endif
> +#ifdef TARGET_I386
> +x86_cpu = X86_CPU(cpu);
> +#endif
> }
> } /* for(;;) */
>
Reviewed-by: Chen Fan
Thanks.
Chen
This option provides the infrastructure for specifying apicids when
boot VM, For example:
#boot with apicid 0 and 2:
-smp 2,apics=0xA,maxcpus=4 /* 1010 */
#boot with apicid 1 and 7:
-smp 2,apics=0x41,maxcpus=8 /* 0100 0001 */
Signed-off-by: Chen Fan
---
hw/i386/pc.c| 9
arbitrary CPU hot-remove as well.
Chen Fan (3):
target-i386: moving registers of vmstate from cpu_exec_init() to
x86_cpu_realizefn()
target-i386: add -smp X,apics=0x option
target-i386: add qmp command 'query-cpus' to display apic_id
cpus.c | 1
this patch provided the apic_id display as using command 'query-cpus'.
Signed-off-by: Chen Fan
---
cpus.c | 1 +
qapi-schema.json | 4 +++-
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/cpus.c b/cpus.c
index ca4c59f..e6ed098 100644
--- a/cpus.c
+++ b/cpus.c
-by: Chen Fan
---
exec.c| 5 +
target-i386/cpu.c | 9 +
2 files changed, 14 insertions(+)
diff --git a/exec.c b/exec.c
index 7e49e8e..9be5855 100644
--- a/exec.c
+++ b/exec.c
@@ -438,7 +438,9 @@ CPUState *qemu_get_cpu(int index)
void cpu_exec_init(CPUArchState *env
On Tue, 2014-01-14 at 11:40 +0100, Igor Mammedov wrote:
> On Tue, 14 Jan 2014 17:27:20 +0800
> Chen Fan wrote:
>
> > the intend of this patch is to register cpu vmstates with apic id instead
> > of cpu
> > index, due to the property setting of apic_id is behind the
On Mon, 2014-01-20 at 13:29 +0100, Igor Mammedov wrote:
> On Fri, 17 Jan 2014 17:13:55 -0200
> Eduardo Habkost wrote:
>
> > On Wed, Jan 15, 2014 at 03:37:04PM +0100, Igor Mammedov wrote:
> > > On Wed, 15 Jan 2014 20:24:01 +0800
> > > Chen Fan wrote:
> >
On Tue, 2014-01-21 at 10:31 +0100, Igor Mammedov wrote:
> On Tue, 21 Jan 2014 15:12:45 +0800
> Chen Fan wrote:
>
> > On Mon, 2014-01-20 at 13:29 +0100, Igor Mammedov wrote:
> > > On Fri, 17 Jan 2014 17:13:55 -0200
> > > Eduardo Habkost wrote:
> > >
On Tue, 2014-01-21 at 11:10 +0100, Andreas Färber wrote:
> Am 21.01.2014 10:51, schrieb Chen Fan:
> > On Tue, 2014-01-21 at 10:31 +0100, Igor Mammedov wrote:
> >> On Tue, 21 Jan 2014 15:12:45 +0800
> >> Chen Fan wrote:
> >>> On Mon, 2014-01-20 at 13:29 +0
On Thu, 2014-02-13 at 10:44 +0100, Igor Mammedov wrote:
> On Thu, 13 Feb 2014 14:14:08 +0800
> Chen Fan wrote:
>
> > On Tue, 2014-01-21 at 11:10 +0100, Andreas Färber wrote:
> > > Am 21.01.2014 10:51, schrieb Chen Fan:
> > > > On Tue, 2014-01-21 at 10:31 +01
On Mon, 2014-02-17 at 11:37 -0700, Eric Blake wrote:
> On 01/14/2014 02:27 AM, Chen Fan wrote:
> > This option provides the infrastructure for specifying apicids when
> > boot VM, For example:
> >
> > #boot with apicid 0 and 2:
> > -smp 2,apics=0xA,maxcpus=4 /*
Signed-off-by: Chen Fan
---
include/qom/node.h | 66 +++
qom/Makefile.objs | 2 +-
qom/node.c | 156 +
3 files changed, 223 insertions(+), 1 deletion(-)
create mode 100644 include/qom/node.h
create mode 100644
Signed-off-by: Chen Fan
---
hw/i386/pc.c | 40
1 file changed, 36 insertions(+), 4 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 348b15f..4e07ef9 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -57,6 +57,7 @@
#include "hw/boa
2. add -device cpu-foo.path supported.
3. then we could introduce hot-remove cpu probably.
I don't know wether this way is right or not. pls tell me. :)
Thanks,
Chen
Chen Fan (2):
qom: introduce cpu QOM hierarchy tree
/machine/node/socket/core/thread/cpu.
cpu: link each new
On Tue, 2014-02-25 at 06:35 -0700, Eric Blake wrote:
> On 02/25/2014 02:07 AM, Chen Fan wrote:
> > Signed-off-by: Chen Fan
> > ---
> > include/qom/node.h | 66 +++
> > qom/Makefile.objs | 2 +-
&g
On Wed, 2014-02-26 at 15:52 -0300, Eduardo Habkost wrote:
> On Tue, Feb 25, 2014 at 05:07:31PM +0800, Chen Fan wrote:
> [...]
> > +Object *object_get_thread_from_index(int64_t cpu_index)
>
> Probably the code that is going to call this function already knows what
> will be
3. then we could introduce hot-remove cpu probably.
I don't know wether this way is right or not. pls tell me. :)
Chen Fan (2):
i386: introduce "struct X86TopoInfo" for saving cpu topology
information
i386: introduce cpu QOM hierarchy tree
hw/i386/pc.c
Signed-off-by: Chen Fan
---
hw/i386/pc.c | 13 +
target-i386/cpu.c | 16
target-i386/cpu.h | 4
target-i386/topology.h | 7 +++
4 files changed, 36 insertions(+), 4 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index 348b15f
add cpu-topology.h cpu-topology.c files for prebuild cpu qom tree
"/machine/node[X]/socket[Y]/core[Z]/thread[N]/cpu"
Signed-off-by: Chen Fan
---
hw/i386/pc.c | 6 +-
target-i386/Makefile.objs | 2 +-
target-i386/cpu-qom.h | 1 +
target-i386/cpu-topolo
On Thu, 2013-11-28 at 15:41 +0100, Igor Mammedov wrote:
> On Wed, 9 Oct 2013 17:43:08 +0800
> Chen Fan wrote:
>
> > Via implementing ACPI standard methods _EJ0 in bios, after Guest OS hot
> > remove
> > one vCPU, it is able to send a signal to QEMU, then QEMU could n
On Thu, 2013-11-28 at 15:48 +0100, Igor Mammedov wrote:
> On Wed, 9 Oct 2013 17:43:18 +0800
> Chen Fan wrote:
>
> > After ACPI get a signal to eject a vCPU, then it will notify
> > the vCPU thread to exit in KVM, and the vCPU must be removed from CPU list,
> > bef
On Wed, 2013-12-04 at 16:42 +0100, Igor Mammedov wrote:
> On Wed, 04 Dec 2013 10:15:16 +0800
> Chen Fan wrote:
>
> > On Thu, 2013-11-28 at 15:41 +0100, Igor Mammedov wrote:
> > > On Wed, 9 Oct 2013 17:43:08 +0800
> > > Chen Fan wrote:
> > >
> >
On Wed, 2013-12-18 at 19:03 +0100, Andreas Färber wrote:
> Am 05.11.2013 11:16, schrieb xiaoqiang zhao:
> > changes:
> > 1. use type constant for kvm_ioapic and ioapic
> > 2. convert 'init' to QOM's 'realize' for ioapic and kvm_ioapic
> > For QOM'ify, I move variable 'ioapic_no' from static to glob
On Thu, 2013-11-28 at 15:41 +0100, Igor Mammedov wrote:
> On Wed, 9 Oct 2013 17:43:08 +0800
> Chen Fan wrote:
>
> > Via implementing ACPI standard methods _EJ0 in bios, after Guest OS hot
> > remove
> > one vCPU, it is able to send a signal to QEMU, then QEMU could n
On Tue, 2013-11-05 at 15:55 +0800, xiaoqiang zhao wrote:
> changes includes:
> 1. use type constant for apic and kvm_apic
> 2. convert function 'init' to QOM's 'realize' for apic/kvm_apic
> 3. for consistency, also QOM'ify apic's parent bus 'icc_bus'
> ---
> hw/cpu/icc_bus.c| 14
On Mon, 2013-11-11 at 11:58 +0800, 赵小强 wrote:
> 于 11/05/2013 04:51 PM, 赵小强 写道:
> > 于 2013年11月05日 16:25, Chen Fan 写道:
> >> On Tue, 2013-11-05 at 15:55 +0800, xiaoqiang zhao wrote:
> >>> changes includes:
> >>> 1. use type constant for apic and kvm_apic
On Tue, 2013-11-12 at 09:54 +0800, 赵小强 wrote:
> 于 11/12/2013 09:28 AM, Chen Fan 写道:
>
> > On Mon, 2013-11-11 at 11:58 +0800, 赵小强 wrote:
> > > 于 11/05/2013 04:51 PM, 赵小强 写道:
> > > > 于 2013年11月05日 16:25, Chen Fan 写道:
> > > > > On Tue,
On Tue, 2013-11-12 at 17:41 +0100, Andreas Färber wrote:
> Am 12.11.2013 04:02, schrieb Chen Fan:
> > On Tue, 2013-11-12 at 09:54 +0800, 赵小强 wrote:
> >> He asked me to drop the parent_realize. so in v2, I just replace the
> >> 'init' with 'realize'.
&
On Mon, 2013-11-25 at 19:38 +0100, Vasilis Liaskovitis wrote:
> On Fri, Nov 22, 2013 at 09:02:27AM +0100, Vasilis Liaskovitis wrote:
> > Hi,
> >
> > On Wed, Oct 09, 2013 at 05:43:17PM +0800, Chen Fan wrote:
> > > When OS eject a vcpu (like: echo 1 >
> >
On Wed, 2013-11-27 at 07:00 -0700, Eric Blake wrote:
> On 10/09/2013 03:43 AM, Chen Fan wrote:
> > Signed-off-by: Chen Fan
> > ---
> > hw/i386/pc.c | 6 ++
> > hw/i386/pc_piix.c| 3 ++-
> > include/hw/boards.h | 2 ++
> > include/hw
Using CPU_FOREACH() marco instead of scaning the entire
local_apics array for fast searching apic.
Signed-off-by: Chen Fan
---
hw/intc/apic.c | 73 ++---
include/hw/i386/apic_internal.h | 2 --
2 files changed, 32 insertions(+), 43 deletions
Rename variable 'cpu_added_notifier' to 'cpu_hotplug_notifier', for
adding vcpu-remove notifier support.
Signed-off-by: Chen Fan
---
hw/acpi/piix4.c | 10 +-
hw/i386/pc.c| 2 +-
include/sysemu/sysemu.h | 2 +-
qom/cpu.c | 10
In struct APICCommonState, there is an id field yet, which was set earlier,
qdev_prop_set_uint8(env->apic_state, "id", env->cpuid_apic_id);
so we use the id field instead of the variable 'apic_no' to represent the
unique apic
index.
Signed-off-by: Chen Fan
---
Implement x86_cpu_unrealizefn() for corresponding x86_cpu_realizefn(),
which is mostly used to clear the apic related information at here.
and refactor apic initialization, use QOM realizefn.
Signed-off-by: Chen Fan
---
hw/i386/kvm/apic.c | 18 --
hw/intc/apic.c
This motion is preparing for refactoring vCPU apic subsequently.
Signed-off-by: Chen Fan
---
cpu-exec.c| 2 +-
cpus.c| 5 ++---
hw/i386/kvmvapic.c| 8 +++-
hw/i386/pc.c | 17 -
target-i386/cpu-qom.h | 4
Implement cpu interface pc_hot_del_cpu() for unrealizing device vCPU.
emiting vcpu-remove notifier to ACPI, then ACPI could send sci interrupt
to OS for hot-remove vcpu.
Signed-off-by: Chen Fan
---
hw/i386/pc.c | 30 --
qom/cpu.c| 12
2 files changed
ments.gmane.org/gmane.comp.emulators.qemu/230460
Chen Fan (10):
x86: move apic_state field from CPUX86State to X86CPU
apic: remove redundant variable 'apic_no' from apic_init_common()
apic: remove local_apics array and using CPU_FOREACH instead
x86: add x86_cpu_unrealizefn() for cpu apic r
When OS eject a vcpu (like: echo 1 > /sys/bus/acpi/devices/LNXCPUXX/eject),
it will call acpi EJ0 method, the firmware will write the new cpumap, QEMU
will know which vcpu need to be ejected.
Signed-off-by: Chen Fan
---
hw/acpi/piix4.c | 37 -
1 file chan
Signed-off-by: Chen Fan
---
hw/i386/pc.c | 6 ++
hw/i386/pc_piix.c| 3 ++-
include/hw/boards.h | 2 ++
include/hw/i386/pc.h | 1 +
qapi-schema.json | 12
qmp-commands.hx | 23 +++
qmp.c| 9 +
7 files changed
After ACPI get a signal to eject a vCPU, then it will notify
the vCPU thread to exit in KVM, and the vCPU must be removed from CPU list,
before the vCPU really removed, there will release the all related vCPU objects.
Signed-off-by: Chen Fan
---
cpus.c | 46
Move struct HotplugEventType from file piix4.c to file qom/cpu.c,
and add struct CPUNotifier for supporting UNPLUG cpu notifier.
Signed-off-by: Chen Fan
---
hw/acpi/piix4.c | 8 ++--
include/qom/cpu.h | 10 ++
qom/cpu.c | 6 +-
3 files changed, 17 insertions(+), 7
Signed-off-by: Chen Fan
---
cpu-exec.c| 2 +-
cpus.c| 5 ++---
hw/i386/kvmvapic.c| 8 +++-
hw/i386/pc.c | 17 -
hw/intc/apic.c| 8
target-i386/cpu-qom.h | 4
target-i386/cpu.c
Get rid of unused icc_device_realize()
Signed-off-by: Chen Fan
---
hw/cpu/icc_bus.c| 17 -
hw/i386/kvm/apic.c | 10 --
hw/intc/apic.c | 18 --
hw/intc/apic_common.c | 17 +++--
hw/xen
And dropping MAX_APICS cast macro altogether.
Signed-off-by: Chen Fan
---
hw/intc/apic.c | 82 +
include/hw/i386/apic_internal.h | 2 -
2 files changed, 33 insertions(+), 51 deletions(-)
diff --git a/hw/intc/apic.c b/hw/intc/apic.c
In order to implement 'cpu-del' in the furture.
at first, needing to refactor x86 apic codes.
this converts apic/kvm/xen 's init() callbacks to realize()
and dropping local_apics[] from file hw/intc/apic.c.
moving apic_state field from CPUX86State to X86CPU.
Chen Fan (3):
Chan
On Tue, 2014-03-04 at 16:35 -0300, Eduardo Habkost wrote:
> On Tue, Mar 04, 2014 at 06:50:24PM +0800, Chen Fan wrote:
> > Signed-off-by: Chen Fan
> > ---
> > hw/i386/pc.c | 13 +
> > target-i386/cpu.c | 16
>
On Tue, 2014-03-11 at 15:00 -0300, Eduardo Habkost wrote:
> On Tue, Mar 11, 2014 at 06:58:53PM +0800, chen.fan.fnst wrote:
> > From: "chen.fan.fnst"
> >
> > Signed-off-by: Chen Fan
> > ---
> > hw/i386/pc.c | 12
> > targ
Signed-off-by: Chen Fan
---
target-i386/topology.h | 33 +
1 file changed, 17 insertions(+), 16 deletions(-)
diff --git a/target-i386/topology.h b/target-i386/topology.h
index 07a6c5f..9b811c1 100644
--- a/target-i386/topology.h
+++ b/target-i386/topology.h
h used for specifying the QOM path.
2. add -device cpu-foo.path supported.
3. then we could introduce hot-remove cpu probably.
I don't know wether this way is right or not. pls tell me. :)
Chen Fan (3):
i386: introduce cpu QOM hierarchy tree
cpu: introduce X86CPUTopoInfo structu
Signed-off-by: Chen Fan
---
hw/i386/pc.c | 25 ++---
target-i386/cpu.c | 28 +++-
target-i386/cpu.h | 5 +
target-i386/topology.h | 18 ++
4 files changed, 60 insertions(+), 16 deletions(-)
diff --git a/hw/i386
add cpu-topology.h cpu-topology.c files for prebuilding cpu qom tree
"/machine/node[X]/socket[Y]/core[Z]->link cpu"
Signed-off-by: Chen Fan
---
hw/i386/pc.c | 3 +
target-i386/Makefile.objs | 2 +-
target-i386/cpu-top
introduce x86_cpu_topo_ids_from_index() to calculate the cpu topology
information, and the compat old mode mechanism moved into there.
remove unused funciton x86_apicid_from_cpu_idx().
Signed-off-by: Chen Fan
---
hw/i386/pc.c | 22 --
target-i386/cpu.c | 33
add cpu-topology.h cpu-topology.c files for prebuilding cpu qom tree
"/machine/node[X]/socket[Y]/core[Z]->link cpu"
Signed-off-by: Chen Fan
---
hw/i386/pc.c | 3 +
target-i386/Makefile.objs | 2 +-
target-i386/cpu-top
remove redundant x86_apicid_from_cpu_idx() tests.
add tests to check x86_topo_ids_from_apic_id() and
x86_topo_ids_from_apic_id() output.
Signed-off-by: Chen Fan
---
tests/test-x86-cpuid.c | 165 ++---
1 file changed, 129 insertions(+), 36 deletions
erty which used for specifying the QOM path.
2. add -device cpu-foo.path supported.
3. then we could introduce hot-remove cpu probably.
I don't know wether this way is right or not. pls tell me. :)
Chen Fan (4):
cpu: introduce CpuTopoInfo structure for argument simplification
i386:
Signed-off-by: Chen Fan
Reviewed-by: Eduardo Habkost
---
target-i386/topology.h | 33 +
1 file changed, 17 insertions(+), 16 deletions(-)
diff --git a/target-i386/topology.h b/target-i386/topology.h
index 07a6c5f..e9ff89c 100644
--- a/target-i386/topology.h
On Wed, 2014-03-19 at 06:00 -0600, Eric Blake wrote:
> On 03/19/2014 02:53 AM, Chen Fan wrote:
> > at present, after hotplug a discontinuous cpu id on source, then done
> > migration,
> > on target, it will fail to add the unoccupied cpu id which was skipped at
> > s
On Wed, 2014-03-19 at 16:27 -0300, Eduardo Habkost wrote:
> On Wed, Mar 19, 2014 at 04:53:41PM +0800, Chen Fan wrote:
> > introduce x86_cpu_topo_ids_from_index() to calculate the cpu topology
> > information, and the compat old mode mechanism moved into there.
> > r
Signed-off-by: Chen Fan
Reviewed-by: Eduardo Habkost
---
target-i386/topology.h | 33 +
1 file changed, 17 insertions(+), 16 deletions(-)
diff --git a/target-i386/topology.h b/target-i386/topology.h
index 07a6c5f..e9ff89c 100644
--- a/target-i386/topology.h
1 - 100 of 418 matches
Mail list logo