Re: [Qemu-devel] [PATCH 1/5] pseries: Move sPAPR RTC code into its own file

2014-12-18 Thread David Gibson
On Fri, Dec 19, 2014 at 12:36:11AM +0100, Alexander Graf wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > > On 18.12.14 06:43, David Gibson wrote: > > On Tue, Dec 16, 2014 at 10:41:16AM +0100, Alexander Graf wrote: > >> > >> > >> > >>> Am 16.12.2014 um 02:24 schrieb David Gibson

Re: [Qemu-devel] [PATCH V2 0/6] cpu: add device_add foo-x86_64-cpu support

2014-12-18 Thread Gu Zheng
ping... On 12/12/2014 03:43 PM, Gu Zheng wrote: > This series is based on the previous patchset from Chen Fan: > https://lists.nongnu.org/archive/html/qemu-devel/2014-05/msg02360.html > > We try to make cpu hotplug with device_add, and make > "-device foo-x86_64-cpu" available,also we can set ap

Re: [Qemu-devel] [PATCH 00/12] cpu: add i386 cpu hot remove support

2014-12-18 Thread Gu Zheng
ping... On 12/12/2014 04:43 PM, Gu Zheng wrote: > This series is based on chen fan's previous i386 cpu hot remove patchset: > https://lists.nongnu.org/archive/html/qemu-devel/2013-12/msg04266.html > > Via implementing ACPI standard methods _EJ0 in ACPI table, after Guest > OS remove one vCPU onli

Re: [Qemu-devel] [PATCH 0/2] ignore bus master for e1000

2014-12-18 Thread Jason Wang
On Fri, Dec 19, 2014 at 11:09 AM, Amos Kong wrote: On Thu, Dec 18, 2014 at 10:13:07AM +0008, Jason Wang wrote: On Thu, Dec 18, 2014 at 5:22 PM, Amos Kong wrote: >Win2012-64r2 guest doesn't set bus mastering correctly, >it caused guest network down, this patch ignored it for >e1000 ni

Re: [Qemu-devel] [PATCH 0/2] ignore bus master for e1000

2014-12-18 Thread Jason Wang
On Thu, Dec 18, 2014 at 7:11 PM, Denis V. Lunev wrote: On 18/12/14 14:01, Denis V. Lunev wrote: On 18/12/14 13:05, Jason Wang wrote: On Thu, Dec 18, 2014 at 5:22 PM, Amos Kong wrote: Win2012-64r2 guest doesn't set bus mastering correctly, it caused guest network down, this patch ignored

[Qemu-devel] [PATCH 1/2] tcg: Introduce tcg_arch_init() function

2014-12-18 Thread Eduardo Habkost
Many architectures have arch-specific initialization functions that are called from CPU initialization at target-*/cpu.c. Instead of requiring the CPU code to keep track of TCG initialization, let an arch-specific init function to be defined, and it will get called by tcg_exec_init(). Signed-off-

[Qemu-devel] [PATCH 0/2] tcg: Move TCG arch-specific initialization inside TCG code

2014-12-18 Thread Eduardo Habkost
Many architectures manually call arch-specific TCG initialization at CPU init time[1], instead of having tcg_init() doing all initialization steps. This series introduces a tcg_arch_init() function that may be implemented by architecture-specific code for TCG initialization. [1] You can see it by

[Qemu-devel] [PATCH 2/2] target-i386: Implement tcg_arch_init()

2014-12-18 Thread Eduardo Habkost
With tcg_arch_init(), we can finally remove the "inited" variable from x86_cpu_initfn(). Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 7 --- target-i386/translate.c | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c ind

[Qemu-devel] [PATCHv3 0/2] Fix virtio-serial migration on bi-endian targets

2014-12-18 Thread David Gibson
On a bi-endian target, with a guest in the non-default endian mode, attempting to migrate twice in a row with a virtio-serial device wil cause a qemu SEGV on the second outgoing migration. The problem is that virtio_serial_save_device() (and other places) expect VirtIOSerial->config to be in curre

[Qemu-devel] [PATCHv3 1/2] virtio_serial: Don't use vser->config.max_nr_ports internally

2014-12-18 Thread David Gibson
I number of places in the virtio_serial driver retrieve the number of ports from vser->config.max_nr_ports, which is guest-endian. But for internal users, we already have a host-endian copy of the number of ports in vser->serial.max_virtserial_ports. Using that instead of the config field removes

[Qemu-devel] [PATCHv3 2/2] virtio-serial: Don't keep a persistent copy of config space

2014-12-18 Thread David Gibson
The 'config' field in the VirtIOSerial structure keeps a copy of the virtio console's config space as visible to the guest, that is to say, in guest endianness. This is fiddly to maintain, because on some targets, such as powerpc, the "guest endianness" can change when a new guest OS boots. In fa

[Qemu-devel] [RESEND PATCH 0/2] QEMUSizedBuffer/QEMUFile fixes

2014-12-18 Thread Yang Hongyang
Rebased to the latest master. Yang Hongyang (2): QEMUSizedBuffer: only free qsb that qemu_bufopen allocated Tests: QEMUSizedBuffer/QEMUBuffer migration/qemu-file-buf.c | 10 ++ tests/test-vmstate.c | 20 2 files changed, 14 insertions(+), 16 deletions(-) --

[Qemu-devel] [RESEND PATCH 2/2] Tests: QEMUSizedBuffer/QEMUBuffer

2014-12-18 Thread Yang Hongyang
Modify some of tests/test-vmstate.c due to qemu_bufopen() change. If you create a QEMUSizedBuffer yourself, you have to explicitly free it. Signed-off-by: Yang Hongyang Cc: Dr. David Alan Gilbert Cc: Juan Quintela Cc: Amit Shah Reviewed-by: Dr. David Alan Gilbert --- tests/test-vmstate.c | 2

[Qemu-devel] [RESEND PATCH 1/2] QEMUSizedBuffer: only free qsb that qemu_bufopen allocated

2014-12-18 Thread Yang Hongyang
Only free qsb that qemu_bufopen allocated, and also allow qemu_bufopen accept qsb as input for write operation. It will make the API more logical: 1.If you create the QEMUSizedBuffer yourself, you need to free it by using qsb_free() but not depends on other API like qemu_fclose. 2.allow qemu_bu

Re: [Qemu-devel] [PATCH 0/2] ignore bus master for e1000

2014-12-18 Thread Amos Kong
On Thu, Dec 18, 2014 at 10:13:07AM +0008, Jason Wang wrote: > > > On Thu, Dec 18, 2014 at 5:22 PM, Amos Kong wrote: > >Win2012-64r2 guest doesn't set bus mastering correctly, > >it caused guest network down, this patch ignored it for > >e1000 nic for workarounding the guest issue. > > > >Patch 1

[Qemu-devel] [PATCH RESEND v2 1/3] vl: Avoid unnecessary 'if' nesting

2014-12-18 Thread Eduardo Habkost
Just a coding style change, to make other changes easier to review. Signed-off-by: Eduardo Habkost Reviewed-by: Andrew Jones --- vl.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/vl.c b/vl.c index 113e98e..3b7157d 100644 --- a/vl.c +++ b/vl.c @@ -1300,13 +1300,

[Qemu-devel] [PATCH RESEND v2 2/3] vl: fix max_cpus check

2014-12-18 Thread Eduardo Habkost
From: Andrew Jones We should confirm max_cpus, which is >= smp_cpus, is <= the machine's true max_cpus, not just smp_cpus. Signed-off-by: Andrew Jones Reviewed-by: Eduardo Habkost Signed-off-by: Eduardo Habkost --- vl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/

[Qemu-devel] [PATCH RESEND v2 3/3] vl: Don't silently change topology when all -smp options were set

2014-12-18 Thread Eduardo Habkost
QEMU tries to change the "threads" option even if it was explicitly set in the command-line, and it shouldn't do that. The right thing to do when all options (cpus, sockets, cores, threds) are explicitly set is to sanity check them and abort in case they don't make sense (i.e. when sockets*cores*t

[Qemu-devel] [PATCH RESEND v2 0/3] vl: smp_parse sanity checks

2014-12-18 Thread Eduardo Habkost
>From the original series sent by Andrew, only patch 1/3 was kept. Patch 2/3 from v1 was replaced by a safer fix. Patch 3/3 was removed because it generates a warning even on the most common use-case ("-smp " without any extra options). Andrew Jones (1): vl: fix max_cpus check Eduardo Habkost (

[Qemu-devel] [PATCH 8/8] target-i386: Move APIC ID compatibility code to pc.c

2014-12-18 Thread Eduardo Habkost
The APIC ID compatibility code is required only for PC, and now that x86_cpu_initfn() doesn't use x86_cpu_apic_id_from_index() anymore, that code can be moved to pc.c. Signed-off-by: Eduardo Habkost --- hw/i386/pc.c | 35 +++ target-i386/cpu.c | 34 --

[Qemu-devel] [PATCH 4/8] target-i386: Keep track of apic-id setting

2014-12-18 Thread Eduardo Habkost
Set a flag indicating that the apic-id property was set, so we can later ensure we won't try to realize a X86CPU object before apic-id was set. Signed-off-by: Eduardo Habkost Cc: Gu Zheng --- target-i386/cpu-qom.h | 1 + target-i386/cpu.c | 3 ++- 2 files changed, 3 insertions(+), 1 deletio

[Qemu-devel] [PATCH 7/8] target-i386: Move topology.h to hw/i386/topology.h

2014-12-18 Thread Eduardo Habkost
This will allow the PC code to use the header, and lets us eliminate the QEMU_INCLUDES hack inside tests/Makefile. Signed-off-by: Eduardo Habkost --- {target-i386 => hw/i386}/topology.h | 6 +++--- target-i386/cpu.c | 2 +- tests/Makefile | 2 -- tests/test

[Qemu-devel] [PATCH 1/8] target-i386: Rename cpu_x86_init() to cpu_x86_init_user()

2014-12-18 Thread Eduardo Habkost
The function is used only for CONFIG_USER, so make its purpose clear. Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 2 +- target-i386/cpu.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index b81ac5c..91f80ed 100644 --- a/

[Qemu-devel] [PATCH 5/8] target-i386: Set APIC ID using cpu_index on CONFIG_USER

2014-12-18 Thread Eduardo Habkost
The PC CPU initialization code already sets apic-id based on the CPU topology, and CONFIG_USER doesn't need the topology-based APIC ID calculation code. Make CONFIG_USER set apic-id before realizing the CPU (just like PC already does), so we can simplify x86_cpu_initfn later. As there is no CPU to

[Qemu-devel] [PATCH 6/8] target-i386: Don't set APIC ID on instance_init

2014-12-18 Thread Eduardo Habkost
Instead of setting APIC ID automatically when creating a X86CPU, require the property to be set before realizing the object (which all callers of cpu_x86_create() already do). Signed-off-by: Eduardo Habkost Cc: Gu Zheng --- target-i386/cpu.c | 6 +- 1 file changed, 5 insertions(+), 1 deleti

[Qemu-devel] [PATCH 3/8] target-i386: Move CPUX86State.cpuid_apic_id to X86CPU.apic_id

2014-12-18 Thread Eduardo Habkost
The field doesn't need to be inside CPUState, and it is not specific for the CPUID instruction, so move and rename it. Signed-off-by: Eduardo Habkost --- target-i386/cpu-qom.h | 1 + target-i386/cpu.c | 17 - target-i386/cpu.h | 1 - target-i386/kvm.c | 2 +- 4 fil

[Qemu-devel] [PATCH 0/8] target-i386: Simplify APIC ID initialization, move compat code to pc.c

2014-12-18 Thread Eduardo Habkost
This series removes the APIC ID initialization code from x86_cpu_initfn() (getting us one step closer to making object_new() of X86CPU have no dependency on cpu_exec_init() and other global QEMU state), and moves the APIC ID compatibility logic from target-i386/cpu.c to hw/i386/pc.c. Eduardo Habko

[Qemu-devel] [PATCH 2/8] target-i386: Eliminate cpu_init() function

2014-12-18 Thread Eduardo Habkost
Instead of putting extra logic inside cpu.h, just do everything inside cpu_x86_init_user(). Signed-off-by: Eduardo Habkost --- target-i386/cpu.c | 4 ++-- target-i386/cpu.h | 12 +++- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/target-i386/cpu.c b/target-i386/cpu.c i

[Qemu-devel] [RFC 43/47] acpi: add acpi_def_block() term

2014-12-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/acpi_gen_utils.c | 46 hw/i386/acpi-build.c | 1 - include/hw/acpi/acpi_gen_utils.h | 8 +++ 3 files changed, 54 insertions(+), 1 deletion(-) diff --git a/hw/acpi/acpi_gen_utils.c b/hw/acp

Re: [Qemu-devel] request for wiki account, please

2014-12-18 Thread Hongyang Yang
Hello, I want to create a page about COLO, can anybody help me to get a wiki account, please. 在 12/16/2014 10:03 AM, Hongyang Yang 写道: -- Thanks, Yang.

[Qemu-devel] [RFC 42/47] acpi: make tables linker-loader available to other targets

2014-12-18 Thread Igor Mammedov
keeping bios-linker-loader.c i386 specific would break build of mips target which is built with CONFIG_ACPI which would dependend on it in following patch that adds acpi_def_block() term. Also UEFI for ARM target is going to use linker as well so it makes sense to move it into generic target indepe

[Qemu-devel] [RFC 41/47] pc: acpi-build: create PCI0._CRS dynamically

2014-12-18 Thread Igor Mammedov
Replace template patching and runtime calculation in _CRS() method with static _CRS defined in SSDT. It also drops manual hole patching for reserved PCI/MEM/CPU hoptlug MMIO resources and utilizes the fact that MMIO resources are reserved by respective child /i.e. PHPR, MHPD, PRES/ containers. Si

[Qemu-devel] [RFC 34/47] pc: acpi-build: create CPU hotplug IO region dynamically

2014-12-18 Thread Igor Mammedov
it replaces a static complied in DSDT MMIO region for CPU hotplug with one created at runtime leaving only truly static CPU hotplug related ASL bits in DSDT. It also puts CPU_HOTPLUG_RESOURCE_DEVICE into PCI0 scope and reserves resources from it, preparing for dropping manual hole punching in PCI0.

Re: [Qemu-devel] [PULL 26/47] cpu-exec: reset exception_index correctly

2014-12-18 Thread Eduardo Habkost
On Mon, Dec 15, 2014 at 05:38:10PM +0100, Paolo Bonzini wrote: > From: Pavel Dovgalyuk > > Exception index is reset at every entry at every entry into cpu_exec() > function. This may cause missing the exceptions while replaying them. > This patch moves exception_index reset to the locations where

[Qemu-devel] [RFC 36/47] pc: acpi-build: drop template patching and memory hotplug objects dynamically

2014-12-18 Thread Igor Mammedov
in addition it saves us ~330LOC and makes it one binary blob less stored in QEMU source tree by removing need to keep and update hw/i386/ssdt-mem.hex.generated file there. Signed-off-by: Igor Mammedov --- hw/i386/Makefile.objs | 2 +- hw/i386/acpi-build.c | 132 +

[Qemu-devel] [RFC 27/47] acpi: add acpi_string() term

2014-12-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/acpi_gen_utils.c | 26 ++ include/hw/acpi/acpi_gen_utils.h | 1 + 2 files changed, 27 insertions(+) diff --git a/hw/acpi/acpi_gen_utils.c b/hw/acpi/acpi_gen_utils.c index 6bd7974..920d8c2 100644 --- a/hw/acpi/acpi_gen_util

[Qemu-devel] [RFC 44/47] pc: acpi-build: prepare to make ACPI tables blob opaque for table building functions

2014-12-18 Thread Igor Mammedov
it allows to hide linker and direct access to table's storage from table building function if it would use acpi_def_block() to declare table and ASL/AML API to compose it. Which following patch will do for build_ssdt() function. Signed-off-by: Igor Mammedov --- PS: this series does it only for b

[Qemu-devel] [RFC 47/47] tests: acpi: update reference DSDT/SSDT tables

2014-12-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/acpi-test-data/pc/DSDT | Bin 3592 -> 3016 bytes tests/acpi-test-data/pc/SSDT | Bin 2279 -> 2406 bytes tests/acpi-test-data/q35/DSDT | Bin 8182 -> 7654 bytes tests/acpi-test-data/q35/SSDT | Bin 560 -> 635 bytes 4 files changed, 0 insertions(+), 0 deleti

[Qemu-devel] [RFC 31/47] acpi: add acpi_processor() term

2014-12-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/acpi_gen_utils.c | 20 include/hw/acpi/acpi_gen_utils.h | 3 +++ 2 files changed, 23 insertions(+) diff --git a/hw/acpi/acpi_gen_utils.c b/hw/acpi/acpi_gen_utils.c index 2de1ea6..4606d1e 100644 --- a/hw/acpi/acpi_gen_utils.c

[Qemu-devel] [RFC 38/47] acpi: add acpi_word_bus_number(), acpi_word_io(), acpi_dword_memory(), acpi_qword_memory() terms

2014-12-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/acpi_gen_utils.c | 143 +++ include/hw/acpi/acpi_gen_utils.h | 73 2 files changed, 216 insertions(+) diff --git a/hw/acpi/acpi_gen_utils.c b/hw/acpi/acpi_gen_utils.c index a77d18c..39cbab7

[Qemu-devel] [RFC 46/47] pc: acpi: update DSTD blobs

2014-12-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/acpi-dsdt.hex.generated | 678 +++- hw/i386/q35-acpi-dsdt.hex.generated | 616 +++- 2 files changed, 95 insertions(+), 1199 deletions(-) diff --git a/hw/i386/acpi-dsdt.hex.generated b/hw/i386

[Qemu-devel] [RFC 45/47] pc: acpi-build: drop remaining ssdt_misc template and use acpi_def_block()

2014-12-18 Thread Igor Mammedov
It completes dynamic SSDT generation and makes it independed of IASL binary blobs. It also hides from user all pointer arithmetic when building SSDT which makes resulting code a bit cleaner and concentrating only on composing ASL construct /i.e. a task build_ssdt() should be doing/. Also it makes

[Qemu-devel] [RFC 33/47] pc: acpi-build: drop template patching and CPU hotplug objects dynamically

2014-12-18 Thread Igor Mammedov
in addition it saves us ~400LOC and makes it one binary blob less stored in QEMU source tree by removing need to keep and update hw/i386/ssdt-proc.hex.generated file there. Signed-off-by: Igor Mammedov --- hw/i386/Makefile.objs | 2 +- hw/i386/acpi-build.c| 94 ++

[Qemu-devel] [RFC 40/47] pc: acpi-build: reserve PCIHP MMIO resources

2014-12-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 25 + 1 file changed, 25 insertions(+) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index ec0aac6..af61b88 100644 --- a/hw/i386/acpi-build.c +++ b/hw/i386/acpi-build.c @@ -102,6 +102,8 @@ typedef struct A

[Qemu-devel] [RFC 39/47] pc: pcihp: expose MMIO base and len as properties

2014-12-18 Thread Igor Mammedov
it will be used later to dynamically reserve MMIO region instead of manually punching holes in PCI0._CRS Signed-off-by: Igor Mammedov --- hw/acpi/pcihp.c | 18 -- hw/acpi/piix4.c | 2 +- include/hw/acpi/pcihp.h | 7 ++- 3 files changed, 19 insertions(+), 8 d

[Qemu-devel] [RFC 32/47] acpi: add acpi_eisaid() term

2014-12-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/acpi_gen_utils.c | 31 +++ include/hw/acpi/acpi_gen_utils.h | 1 + 2 files changed, 32 insertions(+) diff --git a/hw/acpi/acpi_gen_utils.c b/hw/acpi/acpi_gen_utils.c index 4606d1e..68d1855 100644 --- a/hw/acpi/acpi_gen

[Qemu-devel] [RFC 30/47] acpi: add acpi_equal() term

2014-12-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/acpi_gen_utils.c | 11 +++ include/hw/acpi/acpi_gen_utils.h | 1 + 2 files changed, 12 insertions(+) diff --git a/hw/acpi/acpi_gen_utils.c b/hw/acpi/acpi_gen_utils.c index 985ee33..2de1ea6 100644 --- a/hw/acpi/acpi_gen_utils.c +++ b/hw/ac

[Qemu-devel] [RFC 37/47] pc: acpi-build: create memory hotplug IO region dynamically

2014-12-18 Thread Igor Mammedov
it replaces a static complied in DSDT MMIO region for memory hotplug with one created at runtime leaving only truly static memory hotplug related ASL bits in DSDT. And replaces template patching of MEMORY_SLOTS_NUMBER value with ASL API created named value. Later it also would make easier to reuse

[Qemu-devel] [RFC 26/47] acpi: add acpi_local0() term

2014-12-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/acpi_gen_utils.c | 8 include/hw/acpi/acpi_gen_utils.h | 1 + 2 files changed, 9 insertions(+) diff --git a/hw/acpi/acpi_gen_utils.c b/hw/acpi/acpi_gen_utils.c index acb40fb..6bd7974 100644 --- a/hw/acpi/acpi_gen_utils.c +++ b/hw/acpi/acp

[Qemu-devel] [RFC 20/47] acpi: add acpi_buffer() term

2014-12-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/acpi_gen_utils.c | 7 +++ include/hw/acpi/acpi_gen_utils.h | 1 + 2 files changed, 8 insertions(+) diff --git a/hw/acpi/acpi_gen_utils.c b/hw/acpi/acpi_gen_utils.c index ae23b4a..d5acbcb 100644 --- a/hw/acpi/acpi_gen_utils.c +++ b/hw/acpi/acpi

[Qemu-devel] [RFC 23/47] acpi: include PkgLength size only when requested

2014-12-18 Thread Igor Mammedov
Named/Reserved{Field} definition uses PkgLength [1] encoding to specify field length, however it doesn't include size of PkgLength field itself, while other block objects that have explicit length of its body account for PkgLength size while encoding it [2]. This special casing isn't mentioned in A

[Qemu-devel] [RFC 35/47] acpi: add acpi_reserved_field() term

2014-12-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/acpi_gen_utils.c | 10 ++ include/hw/acpi/acpi_gen_utils.h | 6 ++ 2 files changed, 16 insertions(+) diff --git a/hw/acpi/acpi_gen_utils.c b/hw/acpi/acpi_gen_utils.c index 68d1855..a77d18c 100644 --- a/hw/acpi/acpi_gen_utils.c +++ b/h

[Qemu-devel] [RFC 17/47] acpi: add acpi_package() term

2014-12-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/acpi_gen_utils.c | 8 include/hw/acpi/acpi_gen_utils.h | 1 + 2 files changed, 9 insertions(+) diff --git a/hw/acpi/acpi_gen_utils.c b/hw/acpi/acpi_gen_utils.c index 33478ef..ae23b4a 100644 --- a/hw/acpi/acpi_gen_utils.c +++ b/hw/acpi/acp

[Qemu-devel] [RFC 19/47] pc: acpi-build: generate _S[345] packages dynamically

2014-12-18 Thread Igor Mammedov
Replaces template patching with packages composed using ASL API. Note on behavior change: If S3 or S4 is disabled, respective packages won't be created and put into SSDT. Which saves us some space in SSDT and doesn't confuse guest OS with mangled package names as it was done originally. Signed-of

[Qemu-devel] [RFC 29/47] acpi: add acpi_varpackage() term

2014-12-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/acpi_gen_utils.c | 8 include/hw/acpi/acpi_gen_utils.h | 1 + 2 files changed, 9 insertions(+) diff --git a/hw/acpi/acpi_gen_utils.c b/hw/acpi/acpi_gen_utils.c index 920d8c2..985ee33 100644 --- a/hw/acpi/acpi_gen_utils.c +++ b/hw/acpi/acp

[Qemu-devel] [RFC 28/47] pc: acpi-build: generate pvpanic device description dynamically

2014-12-18 Thread Igor Mammedov
Drops AML template patching and allows to save some space in SSDT if pvpanic device doesn't exist by not including disabled device description into SSDT. It also makes device description smaller by replacing _STA method with named value and dropping _INI method. Signed-off-by: Igor Mammedov ---

[Qemu-devel] [RFC 09/47] acpi: add acpi_int() term

2014-12-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/acpi_gen_utils.c | 11 +++ include/hw/acpi/acpi_gen_utils.h | 1 + 2 files changed, 12 insertions(+) diff --git a/hw/acpi/acpi_gen_utils.c b/hw/acpi/acpi_gen_utils.c index 606efcd..8a37bac 100644 --- a/hw/acpi/acpi_gen_utils.c +++ b/hw/ac

[Qemu-devel] [RFC 15/47] acpi: add acpi_call1(), acpi_call2(), acpi_call3(), acpi_call4() helpers

2014-12-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/acpi_gen_utils.c | 43 include/hw/acpi/acpi_gen_utils.h | 6 ++ 2 files changed, 49 insertions(+) diff --git a/hw/acpi/acpi_gen_utils.c b/hw/acpi/acpi_gen_utils.c index d6bdc16..33478ef 100644 --- a/hw

[Qemu-devel] [RFC 25/47] acpi: add acpi_field() & acpi_named_field() terms

2014-12-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/acpi_gen_utils.c | 27 +++ include/hw/acpi/acpi_gen_utils.h | 6 ++ 2 files changed, 33 insertions(+) diff --git a/hw/acpi/acpi_gen_utils.c b/hw/acpi/acpi_gen_utils.c index c69c708..acb40fb 100644 --- a/hw/acpi/acpi_ge

[Qemu-devel] [RFC 22/47] acpi: add acpi_io() helper

2014-12-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/acpi_gen_utils.c | 19 +++ include/hw/acpi/acpi_gen_utils.h | 7 +++ 2 files changed, 26 insertions(+) diff --git a/hw/acpi/acpi_gen_utils.c b/hw/acpi/acpi_gen_utils.c index 01d5c77..e9b2606 100644 --- a/hw/acpi/acpi_gen_utils

[Qemu-devel] [RFC 13/47] acpi: add acpi_and() term

2014-12-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/acpi_gen_utils.c | 11 +++ include/hw/acpi/acpi_gen_utils.h | 1 + 2 files changed, 12 insertions(+) diff --git a/hw/acpi/acpi_gen_utils.c b/hw/acpi/acpi_gen_utils.c index a28485c..15a65c2 100644 --- a/hw/acpi/acpi_gen_utils.c +++ b/hw/ac

[Qemu-devel] [RFC 14/47] acpi: add acpi_notify() term

2014-12-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/acpi_gen_utils.c | 10 ++ include/hw/acpi/acpi_gen_utils.h | 1 + 2 files changed, 11 insertions(+) diff --git a/hw/acpi/acpi_gen_utils.c b/hw/acpi/acpi_gen_utils.c index 15a65c2..d6bdc16 100644 --- a/hw/acpi/acpi_gen_utils.c +++ b/hw/acp

[Qemu-devel] [RFC 24/47] acpi: add acpi_operation_region() term

2014-12-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/acpi_gen_utils.c | 14 ++ include/hw/acpi/acpi_gen_utils.h | 7 +++ 2 files changed, 21 insertions(+) diff --git a/hw/acpi/acpi_gen_utils.c b/hw/acpi/acpi_gen_utils.c index 37d59d0..c69c708 100644 --- a/hw/acpi/acpi_gen_utils.c ++

[Qemu-devel] [RFC 21/47] acpi: add acpi_resource_template() helper

2014-12-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/acpi_gen_utils.c | 8 include/hw/acpi/acpi_gen_utils.h | 1 + 2 files changed, 9 insertions(+) diff --git a/hw/acpi/acpi_gen_utils.c b/hw/acpi/acpi_gen_utils.c index d5acbcb..01d5c77 100644 --- a/hw/acpi/acpi_gen_utils.c +++ b/hw/acpi/acp

[Qemu-devel] [RFC 12/47] acpi: add acpi_store() term

2014-12-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/acpi_gen_utils.c | 10 ++ include/hw/acpi/acpi_gen_utils.h | 1 + 2 files changed, 11 insertions(+) diff --git a/hw/acpi/acpi_gen_utils.c b/hw/acpi/acpi_gen_utils.c index 48c0599..a28485c 100644 --- a/hw/acpi/acpi_gen_utils.c +++ b/hw/acp

[Qemu-devel] [RFC 10/47] acpi: add acpi_return() term

2014-12-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/acpi_gen_utils.c | 9 + include/hw/acpi/acpi_gen_utils.h | 1 + 2 files changed, 10 insertions(+) diff --git a/hw/acpi/acpi_gen_utils.c b/hw/acpi/acpi_gen_utils.c index 8a37bac..57614ea 100644 --- a/hw/acpi/acpi_gen_utils.c +++ b/hw/acpi/a

[Qemu-devel] [RFC 16/47] pc: acpi-build: drop template patching and create PCI bus tree dinamically

2014-12-18 Thread Igor Mammedov
Replace AML template patching with direct composing of PCI device entries in C. It allows to simplify PCI tree generation further and saves us about 400LOC scattered through different files, confining tree generation to one C function which is much easier to deal with. Signed-off-by: Igor Mammedov

[Qemu-devel] [RFC 18/47] pc: acpi-build: drop unsupported PM1b_CNT.SLP_TYP

2014-12-18 Thread Igor Mammedov
QEMU doesn't implement/advertize PM1b_CNT_BLK register block so do not set/patch its \_Sx values to avoid confusion. Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 3 +-- hw/i386/ssdt-misc.dsl | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/i386/acpi-build.c

[Qemu-devel] [RFC 11/47] acpi: add acpi_arg0(), acpi_arg1(), acpi_arg2(), acpi_arg3() terms

2014-12-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/acpi_gen_utils.c | 32 include/hw/acpi/acpi_gen_utils.h | 5 + 2 files changed, 37 insertions(+) diff --git a/hw/acpi/acpi_gen_utils.c b/hw/acpi/acpi_gen_utils.c index 57614ea..48c0599 100644 --- a/hw/acpi/acp

[Qemu-devel] [RFC 05/47] acpi: add acpi_if() term

2014-12-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/acpi_gen_utils.c | 8 include/hw/acpi/acpi_gen_utils.h | 1 + 2 files changed, 9 insertions(+) diff --git a/hw/acpi/acpi_gen_utils.c b/hw/acpi/acpi_gen_utils.c index a481adb..7bb41ce 100644 --- a/hw/acpi/acpi_gen_utils.c +++ b/hw/acpi/acp

[Qemu-devel] [RFC 08/47] acpi: extend build_append_{value|int}() to support 64-bit values

2014-12-18 Thread Igor Mammedov
it will be used for generating 64bit _CRS entries Signed-off-by: Igor Mammedov --- hw/acpi/acpi_gen_utils.c | 9 ++--- include/hw/acpi/acpi_gen_utils.h | 4 ++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/hw/acpi/acpi_gen_utils.c b/hw/acpi/acpi_gen_utils.c index 3

[Qemu-devel] [RFC 03/47] acpi: add acpi_device() term

2014-12-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/acpi_gen_utils.c | 11 +++ include/hw/acpi/acpi_gen_utils.h | 1 + 2 files changed, 12 insertions(+) diff --git a/hw/acpi/acpi_gen_utils.c b/hw/acpi/acpi_gen_utils.c index 56b69dd..80fa6ac 100644 --- a/hw/acpi/acpi_gen_utils.c +++ b/hw/ac

[Qemu-devel] [RFC 06/47] acpi: add acpi_name() & acpi_name_decl() term

2014-12-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/acpi_gen_utils.c | 24 include/hw/acpi/acpi_gen_utils.h | 3 +++ 2 files changed, 27 insertions(+) diff --git a/hw/acpi/acpi_gen_utils.c b/hw/acpi/acpi_gen_utils.c index 7bb41ce..cfccb42 100644 --- a/hw/acpi/acpi_gen_util

[Qemu-devel] [RFC 00/47] ACPI refactoring: replace template patching with C ASL API

2014-12-18 Thread Igor Mammedov
This series refactors SSDT runtime composing and gets rid of: * patching AML templates, with related pointer arithmetic magic * manual AML composition, i.e. creating AML terms practically byte by byte * using AML templates for SSDT creation, reducing dependency on IASL. as r

[Qemu-devel] [RFC 02/47] acpi: add acpi_scope() term

2014-12-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/acpi_gen_utils.c | 18 ++ include/hw/acpi/acpi_gen_utils.h | 4 2 files changed, 22 insertions(+) diff --git a/hw/acpi/acpi_gen_utils.c b/hw/acpi/acpi_gen_utils.c index c9050ef..56b69dd 100644 --- a/hw/acpi/acpi_gen_utils.c +

[Qemu-devel] [RFC 04/47] acpi: add acpi_method() term

2014-12-18 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/acpi_gen_utils.c | 9 + include/hw/acpi/acpi_gen_utils.h | 1 + 2 files changed, 10 insertions(+) diff --git a/hw/acpi/acpi_gen_utils.c b/hw/acpi/acpi_gen_utils.c index 80fa6ac..a481adb 100644 --- a/hw/acpi/acpi_gen_utils.c +++ b/hw/acpi/a

[Qemu-devel] [RFC 07/47] acpi: factor out ACPI const int packing out build_append_value()

2014-12-18 Thread Igor Mammedov
it will be reused for adding a plain integer value into AML. Signed-off-by: Igor Mammedov --- hw/acpi/acpi_gen_utils.c | 19 +++ 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/hw/acpi/acpi_gen_utils.c b/hw/acpi/acpi_gen_utils.c index cfccb42..36d7a47 100644 --- a/

[Qemu-devel] [RFC 01/47] acpi: introduce AML composer aml_append()

2014-12-18 Thread Igor Mammedov
Adds for dynamic AML creation, which will be used for piecing ASL/AML primitives together and hiding from user/caller details about how nested context should be closed/packed leaving less space for mistakes and necessity to know how AML should be encoded, allowing user to concentrate on ASL represe

[Qemu-devel] Qemu support with rbd in Centos7

2014-12-18 Thread Mario Codeniera
Hi, I don't know if this is the right place to ask with my query regarding with rbd. As there is issue the virtualisation that I created, it seems related to rbd as i could not able to run an instances/virtual machines. If I issue the command qemu-img -h Supported format doesn't display rbd. S

Re: [Qemu-devel] [PATCH 2/2] atapi migration: Throw recoverable error to avoid recovery

2014-12-18 Thread John Snow
On 12/18/2014 02:39 PM, Dr. David Alan Gilbert wrote: * Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: * Paolo Bonzini (pbonz...@redhat.com) wrote: On 09/12/2014 19:15, Dr. David Alan Gilbert (git) wrote: (With the previous atapi_dma flag recovery) If migration happens between the ATA

Re: [Qemu-devel] [PATCH 1/5] pseries: Move sPAPR RTC code into its own file

2014-12-18 Thread Alexander Graf
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 18.12.14 06:43, David Gibson wrote: > On Tue, Dec 16, 2014 at 10:41:16AM +0100, Alexander Graf wrote: >> >> >> >>> Am 16.12.2014 um 02:24 schrieb David Gibson >>> : >>> On Tue, Dec 16, 2014 at 01:59:01AM +0100, Alexander Graf wrote:

Re: [Qemu-devel] [Qemu-ppc] Unable to loadvm on qemu-system-ppc -M g3beige (keyboard freeze)

2014-12-18 Thread Alexander Graf
On 18.12.14 22:36, Mark Cave-Ayland wrote: > On 18/12/14 15:13, Peter Maydell wrote: > >> On 18 December 2014 at 14:46, Alexander Graf wrote: >>> On 18.12.14 14:54, Mark Cave-Ayland wrote: So it looks like several of the device MemoryRegions aren't being added after the "loadvm". Does

Re: [Qemu-devel] [PATCH v1] [Review Request] RTC Support in e500

2014-12-18 Thread Alexander Graf
On 18.12.14 22:32, Amit Tomar wrote: > > Thank you for reviewing the patches and providing the comments. > > I'm able to follow most of the comments except below two. > >> Is this true for a real MPC8544DS as well? If not, we'll need to >> conditionalize it to only spawn >the i2c controller

Re: [Qemu-devel] [PATCH 0/9] target-ppc: Rudimentary Support for Transactional Memory

2014-12-18 Thread Alexander Graf
On 18.12.14 17:34, Tom Musta wrote: > This patch series introduces rudimentary support for the Transactional Memory > (TM) feature of Power ISA V2.07. In a nutshell, software uses the feature by > initiating a transaction via the tbegin instruction. Hardware then > accumulates > storage access

Re: [Qemu-devel] [PATCH v2 0/8] acpi: make ROMs resizeable

2014-12-18 Thread Michael S. Tsirkin
On Thu, Dec 18, 2014 at 08:16:26PM +, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: > > On Thu, Dec 18, 2014 at 06:49:09PM +, Dr. David Alan Gilbert wrote: > > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > > I'm generally happy with this set for what

Re: [Qemu-devel] [Qemu-ppc] Unable to loadvm on qemu-system-ppc -M g3beige (keyboard freeze)

2014-12-18 Thread Mark Cave-Ayland
On 18/12/14 15:13, Peter Maydell wrote: > On 18 December 2014 at 14:46, Alexander Graf wrote: >> On 18.12.14 14:54, Mark Cave-Ayland wrote: >>> So it looks like several of the device MemoryRegions aren't being added >>> after the "loadvm". Does this mean there is an object lifecycle issue >>> her

Re: [Qemu-devel] [PATCH v1] [Review Request] RTC Support in e500

2014-12-18 Thread Amit Tomar
Thank you for reviewing the patches and providing the comments. I'm able to follow most of the comments except below two. >Is this true for a real MPC8544DS as well? If not, we'll need to >conditionalize it to only spawn >the i2c controller (and rtc clock) on the >virt machine. I could not a

Re: [Qemu-devel] [PATCH v2 0/8] acpi: make ROMs resizeable

2014-12-18 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > On Thu, Dec 18, 2014 at 06:49:09PM +, Dr. David Alan Gilbert wrote: > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > I'm generally happy with this set for what you're using it for, > > except that I'd like some big hairy warnings in comments

Re: [Qemu-devel] [PATCH v2 0/8] acpi: make ROMs resizeable

2014-12-18 Thread Michael S. Tsirkin
On Thu, Dec 18, 2014 at 06:49:09PM +, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: > > This is v2 of the patchset. > > Changes since v1: > > - Any RAM can now be resizeable - there's no requirement > > that it's device RAM any longer. > > - For sim

Re: [Qemu-devel] [PATCH 2/2] atapi migration: Throw recoverable error to avoid recovery

2014-12-18 Thread Dr. David Alan Gilbert
* Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: > * Paolo Bonzini (pbonz...@redhat.com) wrote: > > > > > > On 09/12/2014 19:15, Dr. David Alan Gilbert (git) wrote: > > > (With the previous atapi_dma flag recovery) > > > If migration happens between the ATAPI command being written and the >

Re: [Qemu-devel] [PATCH v2 0/8] acpi: make ROMs resizeable

2014-12-18 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > This is v2 of the patchset. > Changes since v1: > - Any RAM can now be resizeable - there's no requirement > that it's device RAM any longer. > - For simplicity, max_size RAM is always pre-allocated > - Added memory_region_set_size,

Re: [Qemu-devel] [PATCH 5/9] target-ppc: Introduce TEXASRU Bit Fields

2014-12-18 Thread Tom Musta
On 12/18/2014 12:29 PM, Alexander Graf wrote: > > > On 18.12.14 19:10, Tom Musta wrote: >> On 12/18/2014 11:02 AM, Alexander Graf wrote: >>> >>> >>> On 18.12.14 17:34, Tom Musta wrote: Define mnemonics for the various bit fields in the Transaction EXception And Summary Register (TEXASR)

Re: [Qemu-devel] [PATCH 5/9] target-ppc: Introduce TEXASRU Bit Fields

2014-12-18 Thread Alexander Graf
On 18.12.14 19:10, Tom Musta wrote: > On 12/18/2014 11:02 AM, Alexander Graf wrote: >> >> >> On 18.12.14 17:34, Tom Musta wrote: >>> Define mnemonics for the various bit fields in the Transaction >>> EXception And Summary Register (TEXASR). >> >> This is missing an SoB line. >> >> >> Alex >> > >

Re: [Qemu-devel] [PATCH 5/9] target-ppc: Introduce TEXASRU Bit Fields

2014-12-18 Thread Tom Musta
On 12/18/2014 11:02 AM, Alexander Graf wrote: > > > On 18.12.14 17:34, Tom Musta wrote: >> Define mnemonics for the various bit fields in the Transaction >> EXception And Summary Register (TEXASR). > > This is missing an SoB line. > > > Alex > Sorry about that. I will publish a V2 but may w

Re: [Qemu-devel] [PATCH v6 2/4] qmp: Add command 'blockdev-backup'

2014-12-18 Thread John Snow
On 12/18/2014 05:37 AM, Fam Zheng wrote: Similar to drive-backup, but this command uses a device id as target instead of creating/opening an image file. Also add blocker on target bs, since the target is also a named device now. Add check and report error for bs == target which became possibl

Re: [Qemu-devel] [PATCH 5/9] target-ppc: Introduce TEXASRU Bit Fields

2014-12-18 Thread Alexander Graf
On 18.12.14 17:34, Tom Musta wrote: > Define mnemonics for the various bit fields in the Transaction > EXception And Summary Register (TEXASR). This is missing an SoB line. Alex

Re: [Qemu-devel] [RFC PATCH] target-arm: protect cpu_exclusive_*.

2014-12-18 Thread Paolo Bonzini
On 18/12/2014 16:05, Alexander Graf wrote: > Yeah, the semantics should be tied to what TM would give you. We can > always be more safe than TM in our fallback implementation, but I > wouldn't want to see semantic optimizations tied to the MMIO > implementation put in. > > This is mostly theory

Re: [Qemu-devel] [PATCH RFC v6 17/20] virtio-net: enable virtio 1.0

2014-12-18 Thread Cornelia Huck
On Tue, 16 Dec 2014 15:10:04 +0200 "Michael S. Tsirkin" wrote: > On Thu, Dec 11, 2014 at 02:25:19PM +0100, Cornelia Huck wrote: > > virtio-net (non-vhost) now should have everything in place to support > > virtio 1.0: let's enable the feature bit for it. > > > > Note that VIRTIO_F_VERSION_1 is t

Re: [Qemu-devel] [PATCH] hw/ppc/e500.c : Fix GPIO IRQ Number.

2014-12-18 Thread Alexander Graf
On 18.12.14 15:28, Amit Tomar wrote: > > Provided appropriate subject line. This time around the patch description is wrong :(. Please just post a full new patch with a good subject line and a good patch description. In the git tree, all history from email communication will be gone. People wi

[Qemu-devel] [PATCH 7/9] target-ppc: Introduce TM Noops

2014-12-18 Thread Tom Musta
Add degenerate implementations of the non-privileged Transactional Memory instructions tend., tabort*. and tsr. This implementation simply checks the MSR[TM] bit and then sets CR0 to 0b. This is a reasonable degenerate implementation since transactions are never allowed to begin and hence MSR

  1   2   >