cpu hotplug issue

2011-07-19 Thread Vasilis Liaskovitis
Hello, I have encountered a problem trying to hotplug a CPU in my x86_64 guest setup. host os: x86_64 debian-squeeze (2.6.32-5-amd64 kernel) qemu-kvm: 0.14.1 or latest, both with the following (not-accepted) patch to allow hotplug on the main_system_bus applied: http://lists.gnu.org/archive/html/

Re: [PATCH] cpu hotplug issue

2011-07-21 Thread Vasilis Liaskovitis
Hi, On Wed, Jul 20, 2011 at 10:35 AM, Gleb Natapov wrote: > On Tue, Jul 19, 2011 at 07:40:55PM +0200, Vasilis Liaskovitis wrote: >> Hello, >> >> I have encountered a problem trying to hotplug a CPU in my x86_64 guest >> setup. >> > You do everything right

Re: [PATCH] cpu hotplug issue

2011-07-21 Thread Vasilis Liaskovitis
Hi, thanks for looking at this closer. On Thu, Jul 21, 2011 at 1:33 PM, Gleb Natapov wrote: >> Note that there is probably another bug in qemu-kvm/master regarding >> acpi-udev event delivery for >> a cpu-hotplug event (cpu_set in the qemu_monitor no longer triggers >> the event in the guest, s

Re: [PATCH] cpu hotplug issue

2011-07-21 Thread Vasilis Liaskovitis
On Thu, Jul 21, 2011 at 3:11 PM, Gleb Natapov wrote: > On Thu, Jul 21, 2011 at 03:08:37PM +0200, Vasilis Liaskovitis wrote: > I've already sent a patch to fix this problem in one of the emails in this > thread. oops sorry I missed your last mail/patch. Got it. thanks again. -

Re: [PATCH] cpu hotplug issue

2011-07-27 Thread Vasilis Liaskovitis
Hi, On Mon, Jul 25, 2011 at 3:18 PM, Jan Kiszka wrote: > > OK, hacks below plus the following three patches make CPU hotplug work > again - with some exceptions. Here are the patches: > > 1. http://thread.gmane.org/gmane.comp.emulators.kvm.devel/76484 > 2. http://thread.gmane.org/gmane.comp.emula

Re: [PATCH] cpu hotplug issue

2011-08-02 Thread Vasilis Liaskovitis
Hi, On Thu, Jul 28, 2011 at 6:52 PM, Jan Kiszka wrote: > On 2011-07-27 18:35, Vasilis Liaskovitis wrote: >> Hi, >> >> On Mon, Jul 25, 2011 at 3:18 PM, Jan Kiszka wrote: >> Applying these 3 patches + hacks/fix on master doesn't solve the >> initial "CPU

Re: [PATCH] cpu hotplug issue

2011-08-02 Thread Vasilis Liaskovitis
On Tue, Aug 2, 2011 at 12:24 PM, Jan Kiszka wrote: > FWIW, I've pushed my tree here: > > git://git.kiszka.org/qemu-kvm.git queues/cpu-hotplug > thanks. Your cpu-hotplug tree or today's git-master (commit dacdc4b10bafbb21120e1c24a9665444768ef999) works. Previously I tested the second system with

Re: [PATCH] cpu hotplug issue

2011-08-03 Thread Vasilis Liaskovitis
When rebooting after a CPU hotplug in qemu-kvm, Seabios can get stuck in smp_probe(). Normally cmos_smp_count is read from cmos and the smp_ap_boot_code is run on all cpus except bootstrap. The expected result is CountCPUs == cmos_smp_count + 1. After a cpu hotplug, more than cmos_smp_count c

Re: [PATCH] cpu hotplug issue

2011-08-03 Thread Vasilis Liaskovitis
On Wed, Aug 03, 2011 at 12:42:11PM +0200, Jan Kiszka wrote: > >> Why can't Seabios read to true number online CPUs from the PIIX4 device? > >> The information is there already, no need for addition PV here. > >> > > Where is it in PIIX4 device? > > PROC registers (or however they are called). In

[RFC PATCH v2 00/21] ACPI memory hotplug

2012-07-11 Thread Vasilis Liaskovitis
sed on uq/master for qemu-kvm, and master for seabios. Can be found also at: http://github.com/vliaskov/qemu-kvm/commits/memhp-v2 http://github.com/vliaskov/seabios/commits/memhp-v2 Vasilis Liaskovitis (14): dimm: Implement memory device abstraction acpi_piix4: Implement memory device hotpl

[RFC PATCH v2 01/21][SeaBIOS] Add ACPI_EXTRACT_DEVICE* macros

2012-07-11 Thread Vasilis Liaskovitis
This allows to extract the beginning, end and name of a Device object. Signed-off-by: Vasilis Liaskovitis --- tools/acpi_extract.py | 28 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/tools/acpi_extract.py b/tools/acpi_extract.py index 167a322

[RFC PATCH v2 03/21][SeaBIOS] acpi-dsdt: Implement functions for memory hotplug

2012-07-11 Thread Vasilis Liaskovitis
Extend the DSDT to include methods for handling memory hot-add and hot-remove notifications and memory device status requests. These functions are called from the memory device SSDT methods. Signed-off-by: Vasilis Liaskovitis --- src/acpi-dsdt.dsl | 70

[RFC PATCH v2 07/21] acpi_piix4: Implement memory device hotplug registers

2012-07-11 Thread Vasilis Liaskovitis
the future). _EJ array is reduced to a single byte. Add documentation in docs/specs/acpi_hotplug.txt Signed-off-by: Vasilis Liaskovitis --- docs/specs/acpi_hotplug.txt | 22 + hw/acpi_piix4.c | 73 -- 2 files changed, 91 insertions(+)

[RFC PATCH v2 13/21] Implement memory hotplug notification lists

2012-07-11 Thread Vasilis Liaskovitis
(not yet implemented) Signed-off-by: Vasilis Liaskovitis --- hmp-commands.hx |2 + hmp.c| 17 hmp.h|1 + hw/dimm.c| 55 ++ hw/dimm.h|6 + monitor.c|7 ++ qap

[RFC PATCH v2 14/21][SeaBIOS] acpi_dsdt: Support _OST dimm method

2012-07-11 Thread Vasilis Liaskovitis
Add support for _OST method. _OST method will write into the correct I/O byte to signal success / failure of hot-add or hot-remove to qemu. Signed-off-by: Vasilis Liaskovitis --- src/acpi-dsdt.dsl | 46 ++ src/ssdt-mem.dsl |4 2 files

[RFC PATCH v2 18/21] acpi_piix4: Update dimm bitmap state on hot-remove fail

2012-07-11 Thread Vasilis Liaskovitis
This allows failed hot operations to be retried at anytime. This only works for guests that use _OST notification. Other guests cannot retry failed hot operations on same devices until after reboot. Signed-off-by: Vasilis Liaskovitis --- hw/acpi_piix4.c | 20 +++- hw/dimm.c

[RFC PATCH v2 20/21] Implement -dimms, -dimmspop command line options

2012-07-11 Thread Vasilis Liaskovitis
starting from 0) Signed-off-by: Vasilis Liaskovitis --- hw/dimm.c |9 ++ hw/dimm.h |2 +- qemu-config.c | 45 qemu-options.hx | 10 ++ vl.c| 86 ++- 5 files changed

[RFC PATCH v2 06/21] dimm: Implement memory device abstraction

2012-07-11 Thread Vasilis Liaskovitis
from system memory. This prototype still lacks proper qdev integration: a separate hotplug side-channel is used and main system bus hotplug capability is ignored. Signed-off-by: Vasilis Liaskovitis --- hw/Makefile.objs |2 +- hw/dimm.c| 234

[RFC PATCH v2 05/21][SeaBIOS] pciinit: Fix pcimem_start value

2012-07-11 Thread Vasilis Liaskovitis
: Vasilis Liaskovitis --- src/pciinit.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/pciinit.c b/src/pciinit.c index 68f302a..0b11cbe 100644 --- a/src/pciinit.c +++ b/src/pciinit.c @@ -592,7 +592,7 @@ static void pci_region_map_entries(struct pci_bus *busses

[RFC PATCH v2 12/21] fix live-migration when "populated=on" is missing

2012-07-11 Thread Vasilis Liaskovitis
oes not yet have the corresponding ramblock in its ram_list. Activate the memslot on the destination during ram_load. Perhaps several fields of the DimmState struct should be part of a VMStateDescription to handle migration in a cleaner way. Signed-off-by: Vasilis Liaskovitis --- arch_init.c | 23 ++

[RFC PATCH v2 21/21] Implement mem_increase, mem_decrease hmp/qmp commands

2012-07-11 Thread Vasilis Liaskovitis
uot;, "mem-decrease". Signed-off-by: Vasilis Liaskovitis --- hmp-commands.hx | 31 hw/dimm.c | 104 +++ hw/dimm.h |7 monitor.c | 10 + monitor.h |2 + qm

[RFC PATCH v2 16/21] acpi_piix4: Update dimm state on VM reboot

2012-07-11 Thread Vasilis Liaskovitis
Signed-off-by: Vasilis Liaskovitis --- hw/acpi_piix4.c | 25 + 1 files changed, 25 insertions(+), 0 deletions(-) diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c index d8e2c22..ebc5de7 100644 --- a/hw/acpi_piix4.c +++ b/hw/acpi_piix4.c @@ -91,6 +91,7 @@ typedef struct PI

[RFC PATCH v2 17/21][SeaBIOS] acpi_dsdt: Revert internal dimm state on _OST failure

2012-07-11 Thread Vasilis Liaskovitis
This reverts bitmap state in the case of a failed hot operation, in order to allow retry of failed hot operations Signed-off-by: Vasilis Liaskovitis --- src/acpi-dsdt.dsl |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/src/acpi-dsdt.dsl b/src/acpi-dsdt.dsl index

[RFC PATCH v2 19/21] Implement "info memtotal" and "query-memtotal"

2012-07-11 Thread Vasilis Liaskovitis
Returns total memory of guest in bytes, including hotplugged memory. Signed-off-by: Vasilis Liaskovitis --- hmp-commands.hx |2 ++ hmp.c|7 +++ hmp.h|1 + hw/dimm.c| 15 +++ monitor.c|7 +++ qapi-schema.json | 12

[RFC PATCH v2 15/21] acpi_piix4: _OST dimm support

2012-07-11 Thread Vasilis Liaskovitis
-off-by: Vasilis Liaskovitis --- docs/specs/acpi_hotplug.txt | 24 hw/acpi_piix4.c | 15 +++ hw/dimm.c | 18 ++ hw/dimm.h |1 + 4 files changed, 58 insertions(+), 0 deletions(-) diff

[RFC PATCH v2 11/21] Implement dimm_add and dimm_del hmp/qmp commands

2012-07-11 Thread Vasilis Liaskovitis
Hot-add hmp syntax: dimm_add dimmid Hot-remove hmp syntax: dimm_del dimmid Respective qmp commands are "dimm-add", "dimm-del". Signed-off-by: Vasilis Liaskovitis --- hmp-commands.hx | 32 monitor.c | 11 +++ monitor.h

[RFC PATCH v2 10/21] Implement "-dimm" command line option

2012-07-11 Thread Vasilis Liaskovitis
. "node" is defining numa proximity for this dimm. Default is node zero. Example: "-dimm id=dimm0,size=512M,node=0,populated=off" will define a 512M memory slot belonging to numa node 0. Signed-off-by: Vasilis Liaskovitis --- qemu-config.c | 25 +

[RFC PATCH v2 09/21] pc: Add dimm paravirt SRAT info

2012-07-11 Thread Vasilis Liaskovitis
out Documentation of the new fwcfg layout is included in docs/specs/fwcfg.txt Signed-off-by: Vasilis Liaskovitis --- docs/specs/fwcfg.txt | 28 ++ hw/pc.c | 53 - vl.c |2 +- 3 files changed,

[RFC PATCH v2 08/21] pc: calculate dimm physical addresses and adjust memory map

2012-07-11 Thread Vasilis Liaskovitis
Dimm physical address offsets are calculated automatically and memory map is adjusted accordingly. If a DIMM can fit before the PCI_HOLE_START (currently 0xe000), it will be added normally, otherwise its physical address will be above 4GB. Signed-off-by: Vasilis Liaskovitis --- hw/pc.c

[RFC PATCH v2 04/21][SeaBIOS] acpi: generate hotplug memory devices

2012-07-11 Thread Vasilis Liaskovitis
255 devices) v1->v2: Seabios reads mems_sts from qemu to build e820_map SSDT size and some offsets are calculated with extraction macros. Signed-off-by: Vasilis Liaskovitis --- src/acpi.c | 158 +-- 1 files changed, 152 insertions(+)

[RFC PATCH v2 02/21][SeaBIOS] Add SSDT memory device support

2012-07-11 Thread Vasilis Liaskovitis
extraction macros are used to place the AML code in variables later used by src/acpi. The design is taken from SSDT cpu generation. Signed-off-by: Vasilis Liaskovitis --- Makefile |2 +- src/ssdt-mem.dsl | 65 ++ 2 files changed, 66

Re: [RFC PATCH v2 04/21][SeaBIOS] acpi: generate hotplug memory devices

2012-07-11 Thread Vasilis Liaskovitis
Hi, On Wed, Jul 11, 2012 at 06:48:38PM +0800, Wen Congyang wrote: > > +if (enabled) > > +add_e820(mem_base, mem_len, E820_RAM); > > add_e820() is declared in memmap.h. You should include this header file, > otherwise, seabios cannot be built. thanks. you had the same comment

Re: [RFC PATCH v2 05/21][SeaBIOS] pciinit: Fix pcimem_start value

2012-07-11 Thread Vasilis Liaskovitis
Hi, On Wed, Jul 11, 2012 at 01:56:19PM +0200, Gerd Hoffmann wrote: > On 07/11/12 12:31, Vasilis Liaskovitis wrote: > > In order to hotplug memory between RamSize and BUILD_PCIMEM_START, the pci > > window needs to start at BUILD_PCIMEM_START (0xe000). > > Otherwise, th

Re: [Qemu-devel] [RFC PATCH v2 13/21] Implement memory hotplug notification lists

2012-07-11 Thread Vasilis Liaskovitis
Hi, On Wed, Jul 11, 2012 at 08:59:03AM -0600, Eric Blake wrote: > On 07/11/2012 04:31 AM, Vasilis Liaskovitis wrote: > > Guest can respond to ACPI hotplug events e.g. with _EJ or _OST method. > > This patch implements a tail queue to store guest notifications for memory > > h

Re: [Qemu-devel] [RFC PATCH v2 19/21] Implement "info memtotal" and "query-memtotal"

2012-07-11 Thread Vasilis Liaskovitis
Hi, On Wed, Jul 11, 2012 at 09:14:29AM -0600, Eric Blake wrote: > On 07/11/2012 04:32 AM, Vasilis Liaskovitis wrote: > > Returns total memory of guest in bytes, including hotplugged memory. > > > > Signed-off-by: Vasilis Liaskovitis > > Should this instead be merge

Re: [RFC PATCH v2 20/21] Implement -dimms, -dimmspop command line options

2012-07-11 Thread Vasilis Liaskovitis
Hi, On Wed, Jul 11, 2012 at 05:55:25PM +0300, Avi Kivity wrote: > On 07/11/2012 01:32 PM, Vasilis Liaskovitis wrote: > > Implement batch dimm creation command line options. These could be useful > > for > > not bloating the command line with a large number of dimms. >

Re: [RFC PATCH v2 05/21][SeaBIOS] pciinit: Fix pcimem_start value

2012-07-12 Thread Vasilis Liaskovitis
On Thu, Jul 12, 2012 at 09:22:14AM +0200, Gerd Hoffmann wrote: > On 07/11/12 18:45, Vasilis Liaskovitis wrote: > > Hi, > > > > On Wed, Jul 11, 2012 at 01:56:19PM +0200, Gerd Hoffmann wrote: > >> On 07/11/12 12:31, Vasilis Liaskovitis wrote: > >>> In o

Re: [Qemu-devel] [RFC PATCH v2 06/21] dimm: Implement memory device abstraction

2012-07-13 Thread Vasilis Liaskovitis
Hi, On Thu, Jul 12, 2012 at 07:55:42PM +, Blue Swirl wrote: > On Wed, Jul 11, 2012 at 10:31 AM, Vasilis Liaskovitis > wrote: > > Each hotplug-able memory slot is a SysBusDevice. A hot-add operation for a > > particular dimm creates a new MemoryRegion of the given physical

Re: [Qemu-devel] [RFC PATCH v2 09/21] pc: Add dimm paravirt SRAT info

2012-07-13 Thread Vasilis Liaskovitis
On Thu, Jul 12, 2012 at 07:48:04PM +, Blue Swirl wrote: > On Wed, Jul 11, 2012 at 10:31 AM, Vasilis Liaskovitis > wrote: > > The numa_fw_cfg paravirt interface is extended to include SRAT information > > for > > all hotplug-able dimms. There are 3 words for each

Re: [Qemu-devel] [RFC PATCH v2 00/21] ACPI memory hotplug

2012-07-13 Thread Vasilis Liaskovitis
On Thu, Jul 12, 2012 at 08:04:56PM +, Blue Swirl wrote: > On Wed, Jul 11, 2012 at 10:31 AM, Vasilis Liaskovitis > wrote: > > This is v2 of the ACPI memory hotplug prototype for x86_64 target. > > I think the concept of DIMMs (what about SIMMs? SODIMMs? I liked > memslot

Re: [RFC PATCH v2 03/21][SeaBIOS] acpi-dsdt: Implement functions for memory hotplug

2012-07-20 Thread Vasilis Liaskovitis
On Tue, Jul 17, 2012 at 03:23:00PM +0800, Wen Congyang wrote: > > +Method(MESC, 0) { > > +// Local5 = active memdevice bitmap > > +Store (MES, Local5) > > +// Local2 = last read byte from bitmap > > +Store (Zero, Local2) > > +// Lo

Re: [PATCH][SeaBIOS] memory hotplug

2011-09-06 Thread Vasilis Liaskovitis
Hi Lai, On Mon, Aug 29, 2011 at 05:24:31PM +0800, Lai Jiangshan wrote: > > When I test it, the guest OS become non-available, but it does not crash. > It also cause the disk fault. > > It is hard to dig the reason. Or I missed something? thanks for testing. Can you share your full qemu-kvm comm

[PATCH] Set numa topology for max_cpus

2011-10-26 Thread Vasilis Liaskovitis
mistakenly use memory SRAT info for setting up CPU SRAT entries for the offline CPUs. Wrong SRAT memory entries are also created. This breaks NUMA in a guest. Fix by setting up SRAT info for max_cpus in qemu-kvm. Signed-off-by: Vasilis Liaskovitis --- hw/pc.c |8 vl.c|2 +- 2 files

[PATCH] KVM, CPU hotplug: Avoid wraparound in pvclock_get_nsec_offset

2011-12-12 Thread Vasilis Liaskovitis
Hotplugging a vCPU with kvmclock enabled can cause a guest stall/hang. When the stall happens, pvclock_clocksource_read() is called for the new vCPU and pvclock_get_nsec_offset calculates native_read_tsc() - shadow->tsc_timestamp. shadow->tsc_timestamp contains a value larger than native_read_tsc()

Re: [PATCH] KVM, CPU hotplug: Avoid wraparound in pvclock_get_nsec_offset

2011-12-12 Thread Vasilis Liaskovitis
On Mon, Dec 12, 2011 at 02:53:29PM +0100, Jan Kiszka wrote: > > Can't comment on the semantics, but your patch is whitespace damaged and > doesn't follow kernel coding style. But I assume it's not for > application yet, right? right. It fixes the hang for me, but I am not sure it's the best solut

[PATCH 0/3] acpi_piix4: Add CPU eject handling

2012-01-13 Thread Vasilis Liaskovitis
to handle the CPU_DEAD event in Liu Ping Fan's cpu lifecycle/destruction patchseries, see: http://patchwork.ozlabs.org/patch/127832/ This ACPI implementation can be used instead of the cpustate virtio/pci device in the original series. Vasilis Liaskovitis (2): acpi_piix4: Add CPU eje

[PATCH 1/3][Seabios] Add bitmap for cpu _EJ0 callback

2012-01-13 Thread Vasilis Liaskovitis
Signed-off-by: Vasilis Liaskovitis --- src/acpi-dsdt.dsl |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/src/acpi-dsdt.dsl b/src/acpi-dsdt.dsl index 7082b65..71d8ac4 100644 --- a/src/acpi-dsdt.dsl +++ b/src/acpi-dsdt.dsl @@ -650,8 +650,15 @@ DefinitionBlock

[PATCH 2/3] acpi_piix4: Add stub functions for CPU eject callback

2012-01-13 Thread Vasilis Liaskovitis
Signed-off-by: Vasilis Liaskovitis --- hw/acpi_piix4.c | 15 +++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c index d5743b6..8bf30dd 100644 --- a/hw/acpi_piix4.c +++ b/hw/acpi_piix4.c @@ -37,6 +37,7 @@ #define GPE_BASE 0xafe0

[PATCH 3/3] acpi_piix4: Call KVM_SETSTATE_VCPU ioctl on cpu ejection

2012-01-13 Thread Vasilis Liaskovitis
Signed-off-by: Vasilis Liaskovitis --- hw/acpi_piix4.c | 21 + 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c index 8bf30dd..12eef55 100644 --- a/hw/acpi_piix4.c +++ b/hw/acpi_piix4.c @@ -502,6 +502,27 @@ static uint32_t

Re: [PATCH 3/3] acpi_piix4: Call KVM_SETSTATE_VCPU ioctl on cpu ejection

2012-01-13 Thread Vasilis Liaskovitis
On Fri, Jan 13, 2012 at 12:58:53PM +0100, Jan Kiszka wrote: > On 2012-01-13 12:11, Vasilis Liaskovitis wrote: > > Signed-off-by: Vasilis Liaskovitis > > --- > > hw/acpi_piix4.c | 21 + > > 1 files changed, 21 insertions(+), 0 deletions(-) > >

Re: [PATCH 0/3] acpi_piix4: Add CPU eject handling

2012-01-13 Thread Vasilis Liaskovitis
On Fri, Jan 13, 2012 at 12:58:10PM +0100, Jan Kiszka wrote: > Please work against upstream (uq/master for kvm-related patches), not > qemu-kvm. It possibly makes no technical difference here, but we do not > want to let the code bases needlessly diverge again. If if does make a > difference and ups

Re: [PATCH 2/3] acpi_piix4: Add stub functions for CPU eject callback

2012-01-16 Thread Vasilis Liaskovitis
On Sun, Jan 15, 2012 at 02:38:52PM +0200, Avi Kivity wrote: > On 01/13/2012 01:11 PM, Vasilis Liaskovitis wrote: > > Signed-off-by: Vasilis Liaskovitis > > --- > > hw/acpi_piix4.c | 15 +++ > > 1 files changed, 15 insertions(+), 0 deletions(-) > > &

Re: [PATCH 1/3][Seabios] Add bitmap for cpu _EJ0 callback

2012-01-16 Thread Vasilis Liaskovitis
On Fri, Jan 13, 2012 at 07:27:01PM -0500, Kevin O'Connor wrote: > On Fri, Jan 13, 2012 at 12:11:30PM +0100, Vasilis Liaskovitis wrote: > > > > Signed-off-by: Vasilis Liaskovitis > > The SeaBIOS change is okay with me, but the qemu/kvm change ne

Re: [PATCH 1/3][Seabios] Add bitmap for cpu _EJ0 callback

2012-01-19 Thread Vasilis Liaskovitis
On Fri, Jan 13, 2012 at 07:27:01PM -0500, Kevin O'Connor wrote: > > [...] > > Method (CPEJ, 2, NotSerialized) { > > // _EJ0 method - eject callback > > +Store(ShiftLeft(1, Arg0), PRE) > > Sleep(200) > > } > I have another question here: the P

[PATCH v2 0/4] acpi_piix4: Add CPU eject infrastructure for pc-1.1

2012-01-24 Thread Vasilis Liaskovitis
eam series, specifically: http://patchwork.ozlabs.org/patch/136463/ Vasilis Liaskovitis (3): uq/master: Add machine model pc-1.1 uq/master: Add CPU eject handling for acpi_piix4 uq/master: Add acpi cpu interface documentation docs/specs/acpi_hotplug.txt |

[PATCH v2 1/4][SeaBios] Add bitmap for CPU EJ0 callback

2012-01-24 Thread Vasilis Liaskovitis
Add bitmap for CPU EJ0 callback and write to it on a cpu _EJ0 callback. Remove Sleep() call. Signed-off-by: Vasilis Liaskovitis --- src/acpi-dsdt.dsl |8 +++- 1 files changed, 7 insertions(+), 1 deletions(-) diff --git a/src/acpi-dsdt.dsl b/src/acpi-dsdt.dsl index 7082b65..5138c2a

[PATCH 2/4] uq/master: Add machine model pc-1.1

2012-01-24 Thread Vasilis Liaskovitis
Add machine model pc-1.1 Signed-off-by: Vasilis Liaskovitis --- hw/pc_piix.c |8 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 744b0dc..ac251c6 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -375,6 +375,13 @@ static void

[PATCH 4/4] uq/master: Add acpi cpu interface documentation

2012-01-24 Thread Vasilis Liaskovitis
Add CPU acpi interface documentation. Move all ACPI documentation (CPU and PCI) to one file. Signed-off-by: Vasilis Liaskovitis --- docs/specs/acpi_hotplug.txt | 49 +++ docs/specs/acpi_pci_hotplug.txt | 37 - 2 files

[PATCH v2 3/4] uq/master: Add CPU eject handling for acpi_piix4

2012-01-24 Thread Vasilis Liaskovitis
Add stub functions for CPU eject callback. Define cpu_acpi_eject property and enable eject callback only for pc-1.1 machine model. Signed-off-by: Vasilis Liaskovitis --- hw/acpi_piix4.c | 20 hw/pc_piix.c|8 2 files changed, 28 insertions(+), 0 deletions

Re: [PATCH v2 3/4] uq/master: Add CPU eject handling for acpi_piix4

2012-01-24 Thread Vasilis Liaskovitis
On Tue, Jan 24, 2012 at 11:28:41AM +0100, Jan Kiszka wrote: > On 2012-01-24 11:10, Vasilis Liaskovitis wrote: > > Add stub functions for CPU eject callback. Define cpu_acpi_eject property > > and > > enable eject callback only for pc-1.1 machine model. > > Just to get

Re: [PATCH v2 3/4] uq/master: Add CPU eject handling for acpi_piix4

2012-01-30 Thread Vasilis Liaskovitis
On Thu, Jan 26, 2012 at 12:46:18PM +0200, Avi Kivity wrote: > On 01/24/2012 04:56 PM, Vasilis Liaskovitis wrote: > > On Tue, Jan 24, 2012 at 11:28:41AM +0100, Jan Kiszka wrote: > > > On 2012-01-24 11:10, Vasilis Liaskovitis wrote: > > > > Add stub functions

live migration between amd fam15h-fam10h

2012-03-01 Thread Vasilis Liaskovitis
Hi, I am getting a frozen guest when migrating from an Opteron 6274 host (amd fam15h) to an Opteron 6174 host (amd fam10h). The live migration completes succesfully, but the guest is frozen: vcn screen is still there, but no input is possible and no kernel output is seen. Trying "c" on the qemu-m

Re: [PATCH][SeaBIOS] memory hotplug

2012-03-16 Thread Vasilis Liaskovitis
Hi, On Thu, Mar 15, 2012 at 02:01:38PM +0200, Gleb Natapov wrote: > Commenting a little bit late, but since you've said that you are working on > a new version of the patch... better late than never. > > On Thu, Aug 11, 2011 at 04:39:38PM +0200, Vasilis Liaskovitis wrote: >

live migration between qemu-kvm 1.0 and 0.15

2012-03-27 Thread Vasilis Liaskovitis
Hi, is live migration between qemu-kvm stable-0.15 and stable-1.0 trees possible? When I live migrate a VM from 1.0 to 0.15, the destination side 0.15 qemu-kvm exits with: (qemu) Unknown savevm section or instance 'i8259' 0 That's expected, since commit "i8259:convert to qdev" 747c70af78f7088f18

[RFC PATCH 0/9] ACPI memory hotplug

2012-04-19 Thread Vasilis Liaskovitis
make hotplugged memslots persistent after reboot by creating and consulting e820 map entries. A better solution is needed for hot-remove after a reboot, because e820 entries can be merged. series is based on uq/master for qemu-kvm, and master for seabios. Can be found also at: Vasilis Liaskovit

[RFC PATCH 3/9][SeaBIOS] acpi: generate hotplug memory devices.

2012-04-19 Thread Vasilis Liaskovitis
entry) is generated for each hotplug-able qemu memslot. Currently no SSDT memory device is created for initial system memory (the method can be generalized to all memory though). Signed-off-by: Vasilis Liaskovitis --- src/acpi.c | 151

[RFC PATCH 1/9][SeaBIOS] Add SSDT memory device support

2012-04-19 Thread Vasilis Liaskovitis
/ssdt-mem.dsl with directions for generating the per-memory device processor object AML code. The design is taken from SSDT cpu generation. Signed-off-by: Vasilis Liaskovitis --- src/ssdt-mem.dsl | 66 ++ 1 files changed, 66 insertions(+), 0

[RFC PATCH 4/9] Implement memslot device abstraction

2012-04-19 Thread Vasilis Liaskovitis
-remove operation detaches and frees the MemoryRegion from system memory. This is an early prototype and lacks proper qdev integration: a separate hotplug mechanism/side-channel is used and main system bus hotplug capability is ignored. Signed-off-by: Vasilis Liaskovitis --- hw/memslot.c | 195

[RFC PATCH 5/9] acpi_piix4: Implement memory device hotplug registers

2012-04-19 Thread Vasilis Liaskovitis
chine types (not yet implemented in this version). Signed-off-by: Vasilis Liaskovitis --- hw/acpi_piix4.c | 93 -- 1 files changed, 89 insertions(+), 4 deletions(-) diff --git a/hw/acpi_piix4.c b/hw/acpi_piix4.c index 797ed24..a14dd3c 100644 -

[RFC PATCH 8/9] pc: adjust e820 map on hot-add and hot-remove

2012-04-19 Thread Vasilis Liaskovitis
not a sufficient solution in general: Seabios and GuestOS merge adjacent e820 entries on machine reboot, so the sequence hot-add/ rebootVM / hot-remove will fail to remove a corresponding e820 entry at the hot-remove phase. Signed-off-by: Vasilis Liaskovitis --- hw/acpi_piix4.c |6 ++ hw

[RFC PATCH 9/9][SeaBIOS] enable memory devices if e820 entry is present

2012-04-19 Thread Vasilis Liaskovitis
On a reboot, seabios regenerates srat/ssdt objects. If a valid e820 entry is found spanning the whole address range of a hotplug memory device, the device will be enabled. This ensures persistency of hotplugged memory slots across VM reboots. Signed-off-by: Vasilis Liaskovitis --- src

[RFC PATCH 7/9] Implement memslot command-line option and memslot hmp command

2012-04-19 Thread Vasilis Liaskovitis
onging to numa node 0. Defining no node will automatically add a memslot to node 0. Also implement a new hmp monitor command for hot-add and hot-remove of memory slots Syntax: "memslot slotname action" where action is add/delete and slotname is the qdev-id of the memory slot. Sign

[RFC PATCH 6/9] pc: pass paravirt info for hotplug memory slots to BIOS

2012-04-19 Thread Vasilis Liaskovitis
SeaBIOS. This information is used by Seabios to build hotplug memory device objects at runtime. Signed-off-by: Vasilis Liaskovitis --- hw/pc.c | 59 +-- vl.c|4 +++- 2 files changed, 56 insertions(+), 7 deletions(-) diff --git a

[RFC PATCH 2/9][SeaBIOS] Implement acpi-dsdt functions for memory hotplug.

2012-04-19 Thread Vasilis Liaskovitis
recent master patch for other ACPI hotplug events. Signed-off-by: Vasilis Liaskovitis --- src/acpi-dsdt.dsl | 68 +++- 1 files changed, 66 insertions(+), 2 deletions(-) diff --git a/src/acpi-dsdt.dsl b/src/acpi-dsdt.dsl index 4bdc268..184daf0

Re: [Qemu-devel] [RFC PATCH 0/9] ACPI memory hotplug

2012-04-19 Thread Vasilis Liaskovitis
Hi, On Thu, Apr 19, 2012 at 09:49:31AM -0500, Anthony Liguori wrote: > On 04/19/2012 09:08 AM, Vasilis Liaskovitis wrote: > >This is a prototype for ACPI memory hotplug on x86_64 target. Based on some > >earlier work and comments from Gleb. > > > >Memslot devices

Re: [RFC PATCH 7/9] Implement memslot command-line option and memslot hmp command

2012-04-19 Thread Vasilis Liaskovitis
Hi, On Thu, Apr 19, 2012 at 05:22:52PM +0300, Avi Kivity wrote: > On 04/19/2012 05:08 PM, Vasilis Liaskovitis wrote: > > Implement -memslot qemu-kvm command line option to define hotplug-able > > memory > > slots. > > Syntax: "-memslot id=name,start=addr,s

Re: [Qemu-devel] [RFC PATCH 2/9][SeaBIOS] Implement acpi-dsdt functions for memory hotplug.

2012-04-20 Thread Vasilis Liaskovitis
Hi, On Fri, Apr 20, 2012 at 12:55:24PM +0200, Igor Mammedov wrote: > >+/* Memory eject notify method */ > >+OperationRegion(MEMJ, SystemIO, 0xaf40, 32) > >+Field (MEMJ, ByteAcc, NoLock, Preserve) > >+{ > >+MPE, 256 > >+} > >+ > >+Method (

Re: [RFC PATCH 0/9] ACPI memory hotplug

2012-04-20 Thread Vasilis Liaskovitis
On Thu, Apr 19, 2012 at 04:08:38PM +0200, Vasilis Liaskovitis wrote: > > series is based on uq/master for qemu-kvm, and master for seabios. Can be > found > also at: forgot to paste the repo links in the original coverletter, here they are if someone wants them: https://github.com/v

Re: [Qemu-devel] [RFC PATCH 6/9] pc: pass paravirt info for hotplug memory slots to BIOS

2012-04-20 Thread Vasilis Liaskovitis
On Fri, Apr 20, 2012 at 12:33:57PM +0200, Igor Mammedov wrote: > On 04/19/2012 04:08 PM, Vasilis Liaskovitis wrote: > >-numa_fw_cfg = g_malloc0((1 + max_cpus + nb_numa_nodes) * 8); > >+numa_fw_cfg = g_malloc0((2 + max_cpus + nb_numa_nodes + 3 * > &g

Re: [RFC PATCH 8/9] pc: adjust e820 map on hot-add and hot-remove

2012-04-23 Thread Vasilis Liaskovitis
On Sun, Apr 22, 2012 at 04:58:47PM +0300, Gleb Natapov wrote: > On Thu, Apr 19, 2012 at 04:08:46PM +0200, Vasilis Liaskovitis wrote: > > Hotplugged memory is not persistent in the e820 memory maps. After > > hotplugging > > a memslot and rebooting the VM, the hotplugged

Re: [RFC PATCH 0/9] ACPI memory hotplug

2012-04-23 Thread Vasilis Liaskovitis
Hi, On Sun, Apr 22, 2012 at 05:20:59PM +0300, Gleb Natapov wrote: > On Sun, Apr 22, 2012 at 05:13:27PM +0300, Avi Kivity wrote: > > On 04/22/2012 05:09 PM, Gleb Natapov wrote: > > > On Sun, Apr 22, 2012 at 05:06:43PM +0300, Avi Kivity wrote: > > > > On 04/22/2012 04:56 PM, Gleb Natapov wrote: > >

Re: [RFC PATCH 0/9] ACPI memory hotplug

2012-04-24 Thread Vasilis Liaskovitis
Hi, On Tue, Apr 24, 2012 at 10:52:24AM +0300, Gleb Natapov wrote: > On Mon, Apr 23, 2012 at 02:31:15PM +0200, Vasilis Liaskovitis wrote: > > The 440fx spec mentions: "The address range from the top of main DRAM to 4 > > Gbytes (top of physical memory space supported by

Re: [RFC PATCH 3/9][SeaBIOS] acpi: generate hotplug memory devices.

2012-04-24 Thread Vasilis Liaskovitis
Hi, On Mon, Apr 23, 2012 at 07:37:51PM -0400, Kevin O'Connor wrote: > On Thu, Apr 19, 2012 at 04:08:41PM +0200, Vasilis Liaskovitis wrote: > > The memory device generation is guided by qemu paravirt info. Seabios > > first uses the info to setup SRAT entries for the

[RFC PATCH v3 00/19] ACPI memory hotplug

2012-09-21 Thread Vasilis Liaskovitis
ockers are resolved)? The patchset has been revised every few months, but I will provide quicker version updates onwards. I can also bring this up on a weekly meeting agenda if needed. series is based on uq/master for qemu-kvm, and master for seabios. Can be found also at: http://github.com/vlias

[RFC PATCH v3 01/19][SeaBIOS] Add ACPI_EXTRACT_DEVICE* macros

2012-09-21 Thread Vasilis Liaskovitis
This allows to extract the beginning, end and name of a Device object. Signed-off-by: Vasilis Liaskovitis --- tools/acpi_extract.py | 28 1 files changed, 28 insertions(+), 0 deletions(-) diff --git a/tools/acpi_extract.py b/tools/acpi_extract.py index 167a322

[RFC PATCH v3 03/19][SeaBIOS] acpi-dsdt: Implement functions for memory hotplug

2012-09-21 Thread Vasilis Liaskovitis
Extend the DSDT to include methods for handling memory hot-add and hot-remove notifications and memory device status requests. These functions are called from the memory device SSDT methods. Signed-off-by: Vasilis Liaskovitis --- src/acpi-dsdt.dsl | 70

[RFC PATCH v3 04/19][SeaBIOS] acpi: generate hotplug memory devices

2012-09-21 Thread Vasilis Liaskovitis
255 devices) v1->v2: Seabios reads mems_sts from qemu to build e820_map SSDT size and some offsets are calculated with extraction macros. v2->v3: Minor name changes Signed-off-by: Vasilis Liaskovitis --- src/acpi.c | 158 +-- 1

[RFC PATCH v3 10/19] fix live-migration when "populated=on" is missing

2012-09-21 Thread Vasilis Liaskovitis
oes not yet have the corresponding ramblock in its ram_list. Activate the dimm on the destination during ram_load. Perhaps several fields of the DimmDevice should be part of a VMStateDescription to handle migration in a cleaner way. But the problem is that ramblocks are checked before qdev vmstates. Si

[RFC PATCH v3 09/19] pc: Add dimm paravirt SRAT info

2012-09-21 Thread Vasilis Liaskovitis
out Documentation of the new fwcfg layout is included in docs/specs/fwcfg.txt Signed-off-by: Vasilis Liaskovitis --- docs/specs/fwcfg.txt | 28 hw/pc.c | 14 -- 2 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 docs/sp

[RFC PATCH v3 11/19] Implement qmp and hmp commands for notification lists

2012-09-21 Thread Vasilis Liaskovitis
probably be part of migration state (not yet implemented). Signed-off-by: Vasilis Liaskovitis --- hmp-commands.hx |2 + hmp.c| 17 ++ hmp.h|1 + hw/dimm.c| 62 +- hw/dimm.h|2 +- mon

[RFC PATCH v3 17/19][SeaBIOS] Implement _PS3 method for memory device

2012-09-21 Thread Vasilis Liaskovitis
Signed-off-by: Vasilis Liaskovitis --- src/acpi-dsdt.dsl | 15 +++ src/ssdt-mem.dsl |4 2 files changed, 19 insertions(+), 0 deletions(-) diff --git a/src/acpi-dsdt.dsl b/src/acpi-dsdt.dsl index 0d37bbc..8a18770 100644 --- a/src/acpi-dsdt.dsl +++ b/src/acpi-dsdt.dsl

[RFC PATCH v3 18/19] Implement _PS3 for dimm

2012-09-21 Thread Vasilis Liaskovitis
This will allow us to update dimm state on OSPM-initiated eject operations e.g. with "echo 1 > /sys/bus/acpi/devices/PNP0C80\:00/eject" Signed-off-by: Vasilis Liaskovitis --- docs/specs/acpi_hotplug.txt |7 +++ hw/acpi_piix4.c |5 + hw/dimm.c

[RFC PATCH v3 08/19] pc: calculate dimm physical addresses and adjust memory map

2012-09-21 Thread Vasilis Liaskovitis
. Signed-off-by: Vasilis Liaskovitis --- hw/pc.c | 41 + hw/pc.h |6 ++ hw/pc_piix.c | 20 ++-- vl.c |1 + 4 files changed, 62 insertions(+), 6 deletions(-) diff --git a/hw/pc.c b/hw/pc.c index 112739a..2c9664d

[RFC PATCH v3 19/19][SeaBIOS] Calculate pcimem_start and pcimem64_start from SRAT entries

2012-09-21 Thread Vasilis Liaskovitis
new paravirt interface is introduced. Suggestions to make the code change cleaner are welcome. The alternative patch (will be sent as a reply to this patch) implements a paravirt interface to read the starting values of pcimem_start and pcimem64_start from QEMU. Signed-off-by: Vasilis

[RFC PATCH v3 16/19] Update dimm state on reset

2012-09-21 Thread Vasilis Liaskovitis
acpi_pm device. This way the dimm is still active after a VM reboot and dimm visibility has always the same behaviour, regardless of _OST support in the guest. Signed-off-by: Vasilis Liaskovitis --- hw/acpi_piix4.c |1 + hw/dimm.c | 20 hw/dimm.h |1 + 3 files

[RFC PATCH v3 15/19] Add _OST dimm support

2012-09-21 Thread Vasilis Liaskovitis
flag on hot-remove fail. This allows failed hot operations to be retried at anytime. This only works for guests that use _OST notification. Also adds new _OST registers in docs/specs/acpi_hotplug.txt Signed-off-by: Vasilis Liaskovitis --- docs/specs/acpi_hotplug.txt | 25

[RFC PATCH v3 14/19][SeaBIOS] Add _OST dimm method

2012-09-21 Thread Vasilis Liaskovitis
Add support for _OST method. _OST method will write into the correct I/O byte to signal success / failure of hot-add or hot-remove to qemu. Signed-off-by: Vasilis Liaskovitis --- src/acpi-dsdt.dsl | 50 ++ src/ssdt-mem.dsl |4 2 files

[RFC PATCH v3 13/19] balloon: update with hotplugged memory

2012-09-21 Thread Vasilis Liaskovitis
t does not online hotplugged-memory, it's easy for a balloon inflate command to OOM a guest. Signed-off-by: Vasilis Liaskovitis --- hw/virtio-balloon.c | 13 + 1 files changed, 9 insertions(+), 4 deletions(-) diff --git a/hw/virtio-balloon.c b/hw/virtio-balloon.c index dd1a650.

[RFC PATCH v3 12/19] Implement "info memory-total" and "query-memory-total"

2012-09-21 Thread Vasilis Liaskovitis
, since a guest can be using ACPI memory hotplug without using a balloon device. Signed-off-by: Vasilis Liaskovitis --- hmp-commands.hx |2 ++ hmp.c|7 +++ hmp.h|1 + hw/dimm.c| 21 + hw/dimm.h|1 + monitor.c

[RFC PATCH v3 07/19] acpi_piix4: Implement memory device hotplug registers

2012-09-21 Thread Vasilis Liaskovitis
the future). _EJ array is reduced to a single byte. Add documentation in docs/specs/acpi_hotplug.txt v2->v3: minor name changes Signed-off-by: Vasilis Liaskovitis --- docs/specs/acpi_hotplug.txt | 22 + hw/acpi_piix4.c | 73 -- 2

  1   2   >