Re: [Qemu-devel] [PATCH v4 00/14] block: kill sector-based blk_write/read

2016-05-02 Thread Kevin Wolf
Am 29.04.2016 um 22:08 hat Eric Blake geschrieben: > 2.7 material, depends on Kevin's block-next: > git://repo.or.cz/qemu/kevin.git block-next > > Previously posted as part of a larger NBD series [1] (at v3, explaining > why this is v4), but these are independent enough to make for easier > review

Re: [Qemu-devel] [V9 2/4] hw/i386: ACPI table for AMD IOMMU

2016-05-02 Thread David Kiarie
On Sun, May 1, 2016 at 4:45 PM, Michael S. Tsirkin wrote: > On Sat, Apr 30, 2016 at 01:42:41AM +0300, David Kiarie wrote: >> Add IVRS table for AMD IOMMU. Generate IVRS or DMAR >> depending on emulated IOMMU >> >> Signed-off-by: David Kiarie >> --- >> hw/acpi/aml-build.c | 2 +- >> hw/a

Re: [Qemu-devel] [V9 0/4] AMD IOMMU

2016-05-02 Thread David Kiarie
On Sun, May 1, 2016 at 5:00 PM, Michael S. Tsirkin wrote: > On Sun, May 01, 2016 at 04:47:44PM +0300, Michael S. Tsirkin wrote: >> On Sat, Apr 30, 2016 at 01:42:39AM +0300, David Kiarie wrote: >> > These series adds AMD IOMMU support to Qemu. It's currently in the 9th >> > version. >> > >> > In t

Re: [Qemu-devel] [V9 2/4] hw/i386: ACPI table for AMD IOMMU

2016-05-02 Thread Igor Mammedov
On Mon, 2 May 2016 11:27:35 +0300 David Kiarie wrote: > On Sun, May 1, 2016 at 4:45 PM, Michael S. Tsirkin wrote: > > On Sat, Apr 30, 2016 at 01:42:41AM +0300, David Kiarie wrote: > >> Add IVRS table for AMD IOMMU. Generate IVRS or DMAR > >> depending on emulated IOMMU > >> > >> Signed-off-by:

Re: [Qemu-devel] [PATCH v3 07/18] qapi: Add json output visitor

2016-05-02 Thread Markus Armbruster
Title: s/json/JSON/ Eric Blake writes: > We have several places that want to go from qapi to JSON; right now, > they have to create an intermediate QObject to do the work. That > also has the drawback that the JSON formatting of a QDict will > rearrange keys (according to a deterministic, but u

Re: [Qemu-devel] [PATCH v2] spapr: Don't set the TM ibm, pa-features bit in PR KVM mode

2016-05-02 Thread haris iqbal
On Sat, Apr 30, 2016 at 6:18 AM, Anton Blanchard wrote: > We don't support transactional memory in PR KVM, so don't tell > the OS that we do. > > Signed-off-by: Anton Blanchard > --- > > v2: Fix build with CONFIG_KVM disabled, noticed by Alex. > > diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c > in

Re: [Qemu-devel] [PATCH 11/18] vhost-user: add shutdown support

2016-05-02 Thread Michael S. Tsirkin
On Sun, May 01, 2016 at 02:04:42PM -0700, Yuanhan Liu wrote: > On Sun, May 01, 2016 at 02:37:19PM +0300, Michael S. Tsirkin wrote: > > On Fri, Apr 29, 2016 at 10:48:35AM -0700, Yuanhan Liu wrote: > > > > But, I > > > > would worry first about a backend that crashes that it may corrupt the > > > > V

Re: [Qemu-devel] [PULL 0/1] acpi: last minute fix for 2.6

2016-05-02 Thread Peter Maydell
On 1 May 2016 at 13:45, Michael S. Tsirkin wrote: > The following changes since commit 47dac82d8b013a5c7dd044a797ae6727b553959a: > > Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging > (2016-04-29 12:12:33 +0100) > > are available in the git repository at: > > git://

Re: [Qemu-devel] [PATCH 11/18] vhost-user: add shutdown support

2016-05-02 Thread Marc-André Lureau
Hi On Mon, May 2, 2016 at 12:45 PM, Michael S. Tsirkin wrote: > 1. Graceful disconnect > - One should be able to do vmstop, disconnect, connect then vm start > This looks like a nice intermediate step. > - Why would we always assume it's always remote initiating the disconnect? > Monitor comm

Re: [Qemu-devel] [PATCH] Allow users to specify the vmdk virtual hardware version.

2016-05-02 Thread Janne Karhunen
On Fri, Apr 29, 2016 at 12:41 AM, Fam Zheng wrote: >> Signed-off-by: Janne Karhunen > > Sorry for the late reply, I was distracted.. Like wise, was traveling.. >> if (qemu_opt_get_bool_del(opts, BLOCK_OPT_COMPAT6, false)) { >> -flags |= BLOCK_FLAG_COMPAT6; > > Please remove BLOCK

Re: [Qemu-devel] [PATCH 11/18] vhost-user: add shutdown support

2016-05-02 Thread Michael S. Tsirkin
On Mon, May 02, 2016 at 01:29:18PM +0200, Marc-André Lureau wrote: > Hi > > On Mon, May 2, 2016 at 12:45 PM, Michael S. Tsirkin wrote: > > 1. Graceful disconnect > > - One should be able to do vmstop, disconnect, connect then vm start > > This looks like a nice intermediate step. > > - Why woul

Re: [Qemu-devel] [PATCH v2] configure: Check if struct fsxattr is available from linux header

2016-05-02 Thread Peter Maydell
On 29 April 2016 at 18:15, Jan Vesely wrote: > Fixes build failure with --enable-xfsctl and > new linux headers (>=4.5) and older xfsprogs(<4.5): > In file included from /usr/include/xfs/xfs.h:38:0, > from > /var/tmp/portage/app-emulation/qemu-2.5.0-r1/work/qemu-2.5.0/block/raw-p

Re: [Qemu-devel] [Qemu-trivial] [PATCH] configure: Check if struct fsxattr is available from linux header

2016-05-02 Thread Michael Tokarev
29.04.2016 16:07, Jan Vesely пишет: > Fixes build failure with --enable-xfsctl and > new linux headers (>=4.5) and older xfsprogs(<4.5): > In file included from /usr/include/xfs/xfs.h:38:0, > from > /var/tmp/portage/app-emulation/qemu-2.5.0-r1/work/qemu-2.5.0/block/raw-posix.c:97:

Re: [Qemu-devel] [Qemu-trivial] [PATCH] configure: Check if struct fsxattr is available from linux header

2016-05-02 Thread Peter Maydell
On 2 May 2016 at 13:18, Michael Tokarev wrote: > 29.04.2016 16:07, Jan Vesely пишет: >> Fixes build failure with --enable-xfsctl and >> new linux headers (>=4.5) and older xfsprogs(<4.5): >> In file included from /usr/include/xfs/xfs.h:38:0, >> from >> /var/tmp/portage/app-emulat

Re: [Qemu-devel] [PATCH] Revert "acpi: mark PMTIMER as unlocked"

2016-05-02 Thread Gerd Hoffmann
On Fr, 2016-04-15 at 12:10 +0200, Paolo Bonzini wrote: > > On 15/04/2016 08:43, Gerd Hoffmann wrote: > > This reverts commit 7070e085d490c396f9237c8f10bf8b6e69cd0066. > > > > Commit message claims locking is not needed, but that appears > > to not be true, seabios ehci driver runs into timekeepin

[Qemu-devel] [RFC 04/42] pc: acpi: consolidate CPU hotplug AML

2016-05-02 Thread Igor Mammedov
move the former SSDT part of CPU hoplug close to DSDT part. AML is only moved but there isn't any functional change. Signed-off-by: Igor Mammedov --- hw/acpi/cpu_hotplug_acpi_table.c | 104 +++- hw/i386/acpi-build.c | 112 +-

[Qemu-devel] [RFC 12/42] pc: initialize legacy hotplug only for 2.6 and older machine types

2016-05-02 Thread Igor Mammedov
on old machine types CPU hotplug was uncondtionally enabled since it was introduced, consuming IO ports and providing AML regardles of whether it was actually in use or not. Keep it so for 2.6 and older machines. New machine types will have an option to turn CPU hotplug on if it's needed while by

[Qemu-devel] [RFC 01/42] acpi: add aml_debug()

2016-05-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/aml-build.c | 9 + include/hw/acpi/aml-build.h | 1 + 2 files changed, 10 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index ab89ca6..0ecd386 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -406,6 +406

[Qemu-devel] [RFC 16/42] pc: use AcpiDeviceIfClass.send_event to issue GPE events

2016-05-02 Thread Igor Mammedov
it reduces number of args passed in handlers by 1 and a number of used proxy wrappers saving ~20LOC. Also it allows to make cpu/mem hotplug code more universal as it would allow ARM to reuse it without rewrite by providing its own send_event callback to trigger events usiong GPIO instead of GPE as

[Qemu-devel] [RFC 05/42] pc: acpi: consolidate \GPE._E02 with the rest of CPU hotplug AML

2016-05-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/cpu_hotplug_acpi_table.c | 4 hw/i386/acpi-build.c | 4 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/acpi/cpu_hotplug_acpi_table.c b/hw/acpi/cpu_hotplug_acpi_table.c index 730f44c..c31f346 100644 --- a/hw/acpi/cpu

[Qemu-devel] [RFC 13/42] tests: bios-tables-test: update tables with CPHP turned off by default

2016-05-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/acpi-test-data/pc/DSDT | Bin 5587 -> 5090 bytes tests/acpi-test-data/pc/DSDT.bridge | Bin 7446 -> 6949 bytes tests/acpi-test-data/q35/DSDT| Bin 8357 -> 7852 bytes tests/acpi-test-data/q35/DSDT.bridge | Bin 8374 -> 7869 bytes 4 files chan

[Qemu-devel] [RFC 09/42] pc: acpi: simplify build_legacy_cpu_hotplug_aml() signature

2016-05-02 Thread Igor Mammedov
since IO block used by CPU hotplug is fixed size and initialized it the same file as build_legacy_cpu_hotplug_aml() just use ACPI_GPE_PROC_LEN directly instead of passing it around in several files. Signed-off-by: Igor Mammedov --- hw/acpi/cpu_hotplug.c | 6 +++--- hw/i386/acpi-build.c

[Qemu-devel] [RFC 03/42] pc: acpi: remove AML for empty/not used GPE handlers

2016-05-02 Thread Igor Mammedov
ACPI spec requires GPE handlers only for GPE events that hardware implements. So remove AML for not supported by QEMU device model events. Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 17 - 1 file changed, 17 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/ac

[Qemu-devel] [RFC 25/42] tests: acpi: update cphp_legacy case with new ProcessorID values

2016-05-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/acpi-test-data/pc/DSDT.cphp_legacy | Bin 5502 -> 5503 bytes 1 file changed, 0 insertions(+), 0 deletions(-) diff --git a/tests/acpi-test-data/pc/DSDT.cphp_legacy b/tests/acpi-test-data/pc/DSDT.cphp_legacy index 2744030a49d16d93c9806334b84c658c8faa5435..8

[Qemu-devel] [RFC 07/42] pc: acpi: mark current CPU hotplug functions as legacy

2016-05-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/cpu_hotplug.c| 8 hw/acpi/cpu_hotplug_acpi_table.c | 4 ++-- hw/acpi/ich9.c | 7 --- hw/acpi/piix4.c | 6 +++--- hw/i386/acpi-build.c | 3 ++- include/hw/acpi/cpu_hotplug.h| 1

[Qemu-devel] [RFC 29/42] tests: acpi: update expected files with new CPU AML description

2016-05-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/acpi-test-data/pc/DSDT | Bin 5090 -> 5147 bytes tests/acpi-test-data/pc/DSDT.bridge | Bin 6949 -> 7006 bytes tests/acpi-test-data/q35/DSDT| Bin 7852 -> 7909 bytes tests/acpi-test-data/q35/DSDT.bridge | Bin 7869 -> 7926 bytes 4 files chan

[Qemu-devel] [RFC 15/42] acpi: extend ACPI interface to provide send_event hook

2016-05-02 Thread Igor Mammedov
send_event() hook will allow to send ACPI event in a target specific way (GPE or GPIO based impl.) it will also simplify proxy wrappers in piix4pm/ich9 that access ACPI regs and SCI which are part of piix4pm/lcp_ich9 devices and call acpi_foo() API directly. Signed-off-by: Igor Mammedov --- Follo

[Qemu-devel] [RFC 17/42] docs: update ACPI CPU hotplug spec with new protocol

2016-05-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- docs/specs/acpi_cpu_hotplug.txt | 88 +++-- 1 file changed, 76 insertions(+), 12 deletions(-) diff --git a/docs/specs/acpi_cpu_hotplug.txt b/docs/specs/acpi_cpu_hotplug.txt index 340b751..c5bce6a 100644 --- a/docs/specs/acpi_cp

[Qemu-devel] [RFC 11/42] pc: add 2.7 machine

2016-05-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/pc_piix.c| 16 +--- hw/i386/pc_q35.c | 13 +++-- include/hw/compat.h | 3 +++ include/hw/i386/pc.h | 4 4 files changed, 31 insertions(+), 5 deletions(-) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 7f50116.

[Qemu-devel] [RFC 30/42] qdev: hotplug: Introduce HotplugHandler.pre_plug() callback

2016-05-02 Thread Igor Mammedov
pre_plug callback is to be called before device.realize() is executed. This would allow to check/set device's properties from HotplugHandler. Signed-off-by: Igor Mammedov Signed-off-by: Bharata B Rao --- hw/core/hotplug.c| 11 +++ hw/core/qdev.c | 9 - include/hw/hotp

[Qemu-devel] [RFC 20/42] machine: add cpu-hotplug machine option

2016-05-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/core/machine.c | 20 include/hw/boards.h | 1 + 2 files changed, 21 insertions(+) diff --git a/hw/core/machine.c b/hw/core/machine.c index 6dbbc85..498230a 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -329,6 +329,20 @@ stat

[Qemu-devel] [RFC 10/42] pc: piix4/ich9: add 'cpu-hotplug-legacy' property

2016-05-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/ich9.c | 19 +++ hw/acpi/piix4.c| 3 +++ include/hw/acpi/ich9.h | 1 + 3 files changed, 23 insertions(+) diff --git a/hw/acpi/ich9.c b/hw/acpi/ich9.c index af340d0..1cfe832 100644 --- a/hw/acpi/ich9.c +++ b/hw/acpi/ich9.c

[Qemu-devel] [RFC 31/42] pc: numa: replace node_cpu indexing by apic_id with possible_cpus index

2016-05-02 Thread Igor Mammedov
that removes dependency on apic_id_limit, reducing size of node_cpu to a number of maxcpus and allowing usage of 32bit APIC IDs without allocating a huge array. Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 2 +- hw/i386/pc.c | 28 2 files changed,

[Qemu-devel] [RFC 21/42] pc: q35: initialize new CPU hotplug hw

2016-05-02 Thread Igor Mammedov
add ICH9-LPC.cpu-hotplug property and necessary wiring to init new CPU hotplug hardware if ICH9-LPC.cpu-hotplug is "on", which is enabled if machine.cpu-hotplug is "on". Signed-off-by: Igor Mammedov --- hw/acpi/ich9.c | 60 ++ hw/i386/pc_q3

[Qemu-devel] [RFC 26/42] pc: acpi: introduce AcpiDeviceIfClass.madt_cpu hook

2016-05-02 Thread Igor Mammedov
Add madt_cpu callback to AcpiDeviceIfClass and use it for generating LAPIC MADT entries for CPUs for x86 target. Later it will be used for generating x2APIC entries in case of more than 255 CPUs and also would be reused by ARM target when ACPI CPU hotplug is introduced there. Signed-off-by: Igor M

[Qemu-devel] [RFC 08/42] pc: acpi: consolidate legacy CPU hotplug in one file

2016-05-02 Thread Igor Mammedov
Since AML part of CPU hotplug is tightly coupled with its hardware part (IO port layout/protocol), move build_legacy_cpu_hotplug_aml() to cpu_hotplug.c and remove empty cpu_hotplug_acpi_table.c Signed-off-by: Igor Mammedov --- hw/acpi/Makefile.objs| 2 +- hw/acpi/cpu_hotplug.c

[Qemu-devel] [RFC 19/42] pc: add generic CPU unplug callbacks

2016-05-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/pc.c | 47 +++ 1 file changed, 47 insertions(+) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 99437e0..1cad132 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1713,6 +1713,49 @@ static void pc_cpu_plug(Hotplug

[Qemu-devel] [RFC 34/42] acpi: cpuhp: add command and data registers

2016-05-02 Thread Igor Mammedov
CPU device has a lot of optional methods that might be needed to be added in future in QEMU, so instead of reserving/consuming IO/MMIO register for each of it introduce a generic DATA read-write register which is multiplexed by additional COMMAND write-only register. currently that registers will

[Qemu-devel] [RFC 28/42] acpi: add CPU hotplug methods to DSDT

2016-05-02 Thread Igor Mammedov
Add necessary CPU hotplug methods to handle hotplug events if it's enabled. Signed-off-by: Igor Mammedov --- hw/acpi/cpu.c | 201 +- hw/i386/acpi-build.c | 3 +- include/hw/acpi/cpu.h | 4 +- 3 files changed, 204 insertions(+), 4 delet

[Qemu-devel] [RFC 22/42] pc: piix4: initialize new CPU hotplug hw

2016-05-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/piix4.c | 51 +-- hw/i386/pc_piix.c| 2 +- hw/mips/mips_malta.c | 2 +- include/hw/i386/pc.h | 3 ++- 4 files changed, 49 insertions(+), 9 deletions(-) diff --git a/hw/acpi/piix4.c b/hw/acpi/piix

[Qemu-devel] [RFC 37/42] tests: acpi: report names of expected files in verbose mode

2016-05-02 Thread Igor Mammedov
print expected file name if it doesn't exists if verbose mode is enabled*. It helps to avoid running bios-tables-test under debugger to figure out missing file name. *) verbose mode is enabled if "V" env. variable is set Signed-off-by: Igor Mammedov --- tests/bios-tables-test.c | 24 +++

[Qemu-devel] [RFC 33/42] target-i386: add X86CPU.node property

2016-05-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- target-i386/cpu-qom.h | 1 + target-i386/cpu.c | 42 ++ 2 files changed, 43 insertions(+) diff --git a/target-i386/cpu-qom.h b/target-i386/cpu-qom.h index cb75017..7b09fa5 100644 --- a/target-i386/cpu-qom.h +++ b/targe

[Qemu-devel] [RFC 18/42] acpi: hardware side of CPU hotplug

2016-05-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/Makefile.objs | 1 + hw/acpi/cpu.c | 218 ++ include/hw/acpi/cpu.h | 53 trace-events | 9 +++ 4 files changed, 281 insertions(+) create mode 100644 hw/acpi/cpu.c create m

[Qemu-devel] [RFC 24/42] pc: acpi: cpuhp-legacy: switch ProcessorID to possible_cpus idx

2016-05-02 Thread Igor Mammedov
In legacy cpu-hotplug ProcessorID == APIC ID is used in MADT and cpu-hotplug AML. It was fine as both are 8bit and unique. Spec depricated Processor() with corresponding ProcessorID and advises to use Device() and UID instead of it. However UID is just 32bit and it can't fit ARM's arch_id(MPIDR) w

[Qemu-devel] [RFC 40/42] tests: acpi: extend CPU hotplug test with NUMA support

2016-05-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/bios-tables-test.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c index 670e6a8..1cf6a07 100644 --- a/tests/bios-tables-test.c +++ b/tests/bios-tables-test.c @@ -808,7 +808,8 @@ s

[Qemu-devel] [RFC 41/42] tests: acpi: cpuhp: add expected SRAT tables and update DSDT with _PXM support

2016-05-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/acpi-test-data/pc/DSDT.cphp | Bin 6415 -> 6614 bytes tests/acpi-test-data/pc/SRAT.cphp | Bin 0 -> 304 bytes tests/acpi-test-data/q35/DSDT.cphp | Bin 9177 -> 9376 bytes tests/acpi-test-data/q35/SRAT.cphp | Bin 0 -> 304 bytes 4 files changed, 0 insertion

[Qemu-devel] [RFC 32/42] pc: set X86CPU.node property if QEMU starts with numa enabled

2016-05-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/pc.c | 43 --- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 2dba916..2d29b5e 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1672,11 +1672,27 @@ static int pc_apic

[Qemu-devel] [RFC 27/42] acpi: add CPU devices AML to DSDT

2016-05-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/cpu.c | 38 ++ hw/i386/acpi-build.c | 2 ++ include/hw/acpi/cpu.h | 3 +++ 3 files changed, 43 insertions(+) diff --git a/hw/acpi/cpu.c b/hw/acpi/cpu.c index 2b4feb0..6dab4d6 100644 --- a/hw/acpi/cpu.c +++ b/

Re: [Qemu-devel] [PATCH v3 08/18] qjson: Simplify by using json-output-visitor

2016-05-02 Thread Markus Armbruster
Eric Blake writes: > Instead of rolling our own limited JSON outputter, we can just > wrap the more full-featured JSON output Visitor. > > This slightly changes the output (different spacing), but the > result is still equivalent JSON contents. > > Signed-off-by: Eric Blake The file comment

[Qemu-devel] [RFC 35/42] acpi: cpuhp: provide cpu._PXM method if running in numa mode

2016-05-02 Thread Igor Mammedov
Having proximity in SRAT table is not enough in case of linux guest as it discards SRAT table information after it's done with booting. So hotplugged CPUs will go to 1st node as kernel doesn't know to what node they belong to anymore. So do the same as with hotplugged memory and provide _PXM method

[Qemu-devel] [RFC 36/42] acpi: cpuhp: add cpu._OST handling

2016-05-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/cpu.c | 83 +++ hw/acpi/ich9.c| 3 ++ hw/acpi/piix4.c | 3 ++ include/hw/acpi/cpu.h | 4 +++ qapi-schema.json | 2 +- trace-events | 2 ++ 6 files changed, 96 insertio

[Qemu-devel] [RFC 42/42] DO NOT APPLY: simulate CPU unplug when executin cpu-add on a present CPU

2016-05-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/i386/pc.c | 8 include/qom/cpu.h | 2 +- qom/cpu.c | 6 +++--- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 2d29b5e..7072fb5 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1063,6 +1063

[Qemu-devel] [RFC 39/42] tests: acpi: add expected tables for CPU hotplug case

2016-05-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/acpi-test-data/pc/APIC.cphp | Bin 0 -> 160 bytes tests/acpi-test-data/pc/DSDT.cphp | Bin 0 -> 6415 bytes tests/acpi-test-data/q35/APIC.cphp | Bin 0 -> 160 bytes tests/acpi-test-data/q35/DSDT.cphp | Bin 0 -> 9177 bytes 4 files changed, 0 insertions(+),

Re: [Qemu-devel] [Qemu-discuss] iolimits for virtio-9p

2016-05-02 Thread Greg Kurz
On Thu, 28 Apr 2016 11:45:41 +0200 Pradeep Kiruvale wrote: > On 27 April 2016 at 19:12, Greg Kurz wrote: > > > On Wed, 27 Apr 2016 16:39:58 +0200 > > Pradeep Kiruvale wrote: > > > > > On 27 April 2016 at 10:38, Alberto Garcia wrote: > > > > > > > On Wed, Apr 27, 2016 at 09:29:02AM +0200, Prad

Re: [Qemu-devel] [PATCH v3 08/18] qjson: Simplify by using json-output-visitor

2016-05-02 Thread Markus Armbruster
Markus Armbruster writes: > Eric Blake writes: > >> Instead of rolling our own limited JSON outputter, we can just >> wrap the more full-featured JSON output Visitor. >> >> This slightly changes the output (different spacing), but the >> result is still equivalent JSON contents. >> >> Signed-off

Re: [Qemu-devel] [PATCH v9 03/11] block: use the block job list in qmp_query_block_jobs()

2016-05-02 Thread Alberto Garcia
On Fri 29 Apr 2016 04:32:41 PM CEST, Kevin Wolf wrote: > However, I'd like to give you a heads-up that this will technically > conflict with my series that removes BlockDriverState.blk because that > changes the bdrv_next() signature. > > Nothing dramatic, but I guess it would make sense to decide

Re: [Qemu-devel] [PATCH v3 10/18] vmstate: Use new JSON output visitor

2016-05-02 Thread Markus Armbruster
Eric Blake writes: > Rather than using a QJSON object and converting the QString result > to a char *, we can use the new JSON output visitor and get directly > to a char *. > > The conversions are a bit tricky in place (in places, we have to > copy an integer to an int64_t temporary to get the r

[Qemu-devel] [RFC 23/42] tests: pc-cpu-test: turn on cpu-hotplug explicily

2016-05-02 Thread Igor Mammedov
Machine types before 2.7 have legacy CPU hotplug enabled by defaut to not regress existing setups where it's always enabled. But since 2.7 CPU hotplug is disabled y default and requires explicit enabling using 'cpu-hotplug' parameter in '-machine' option. So turn it on for cpu-hotplug testcase to

Re: [Qemu-devel] [PATCH v9 04/11] block: use the block job list in bdrv_close()

2016-05-02 Thread Alberto Garcia
On Fri 29 Apr 2016 04:38:58 PM CEST, Kevin Wolf wrote: > This is essentially the same as I'm doing here: > http://repo.or.cz/qemu/kevin.git/commitdiff/6b545b21e3dfe2e3927cfb6bbdcc1b233c67630c Oh, I see. > I think I like having a separate block_job_cancel_sync_all() function > like I did instead o

Re: [Qemu-devel] [PATCH v3 14/18] qemu-img: Use new JSON output formatter

2016-05-02 Thread Markus Armbruster
Eric Blake writes: > Now that we can pretty-print straight to JSON from a visitor, > we can eliminate the temporary conversion into QObject inside > qemu-img. > > The changes to qemu-iotests 043 expected output demonstrates > the fact that output is now done in qapi declaration order, > rather th

Re: [Qemu-devel] [PATCH v3 12/18] qapi: Add qobject_to_json_pretty_prefix()

2016-05-02 Thread Markus Armbruster
Eric Blake writes: > The next patch will add pretty indentation to the JSON visitor. > But in order to support pretty output in the type_any() callback, > we need to prefix every line of the QObject visitor by the current > indentation in the JSON visitor. Hence, a new function > qobject_to_json

Re: [Qemu-devel] [PATCH v4 00/14] block: kill sector-based blk_write/read

2016-05-02 Thread Eric Blake
On 05/02/2016 01:27 AM, Kevin Wolf wrote: > Am 29.04.2016 um 22:08 hat Eric Blake geschrieben: >> 2.7 material, depends on Kevin's block-next: >> git://repo.or.cz/qemu/kevin.git block-next >> >> Previously posted as part of a larger NBD series [1] (at v3, explaining >> why this is v4), but these ar

[Qemu-devel] [PATCH] docs/atomics.txt: Update pointer to linux macro

2016-05-02 Thread Pranith Kumar
Add a missing end brace and update doc to point to the latest access macro. ACCESS_ONCE() is deprecated. Signed-off-by: Pranith Kumar --- docs/atomics.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/atomics.txt b/docs/atomics.txt index ef285e3..bba771e 100644 ---

Re: [Qemu-devel] [PATCH v3 10/18] vmstate: Use new JSON output visitor

2016-05-02 Thread Eric Blake
On 05/02/2016 07:26 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Rather than using a QJSON object and converting the QString result >> to a char *, we can use the new JSON output visitor and get directly >> to a char *. >> >> The conversions are a bit tricky in place (in places, we have

[Qemu-devel] [RFC 06/42] pc: acpi: cpu-hotplug: make AML CPU_foo defines local to cpu_hotplug_acpi_table.c

2016-05-02 Thread Igor Mammedov
now as those defines are used only locally inside of cpu_hotplug_acpi_table.c, move them out of header file. Signed-off-by: Igor Mammedov --- hw/acpi/cpu_hotplug_acpi_table.c | 7 +++ include/hw/acpi/cpu_hotplug.h| 7 --- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a

[Qemu-devel] [RFC 02/42] acpi: add aml_refof()

2016-05-02 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- hw/acpi/aml-build.c | 8 include/hw/acpi/aml-build.h | 1 + 2 files changed, 9 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 0ecd386..6484161 100644 --- a/hw/acpi/aml-build.c +++ b/hw/acpi/aml-build.c @@ -1416,6 +1416

Re: [Qemu-devel] [PATCH v3 07/18] qapi: Add json output visitor

2016-05-02 Thread Markus Armbruster
Eric Blake writes: > We have several places that want to go from qapi to JSON; right now, > they have to create an intermediate QObject to do the work. That > also has the drawback that the JSON formatting of a QDict will > rearrange keys (according to a deterministic, but unpredictable, > hash)

Re: [Qemu-devel] [PATCH v3 07/18] qapi: Add json output visitor

2016-05-02 Thread Eric Blake
On 05/02/2016 03:15 AM, Markus Armbruster wrote: > Title: s/json/JSON/ > > Eric Blake writes: > >> We have several places that want to go from qapi to JSON; right now, >> they have to create an intermediate QObject to do the work. That >> also has the drawback that the JSON formatting of a QDic

Re: [Qemu-devel] [PATCH v3 12/18] qapi: Add qobject_to_json_pretty_prefix()

2016-05-02 Thread Eric Blake
On 05/02/2016 07:56 AM, Markus Armbruster wrote: > Eric Blake writes: > >> The next patch will add pretty indentation to the JSON visitor. >> But in order to support pretty output in the type_any() callback, >> we need to prefix every line of the QObject visitor by the current >> indentation in t

[Qemu-devel] [RFC 14/42] tests: acpi: check legacy CPU hotplug AML is present for 2.6 machine type

2016-05-02 Thread Igor Mammedov
it should help to notice regression if legacy CPU hotplug unintentionally disappears in old machine types. Signed-off-by: Igor Mammedov --- tests/acpi-test-data/pc/DSDT.cphp_legacy | Bin 0 -> 5502 bytes tests/bios-tables-test.c | 13 + 2 files changed, 13 insertions

[Qemu-devel] [RFC 00/42] ACPI CPU hotplug refactoring to support more than 255 CPUs and PXM/OST methods

2016-05-02 Thread Igor Mammedov
Current ACPI interface for CPU hotplug supports hotadding only upto 255 CPUs and lacks means to convey additional information needed for _PXM and _OST methods support. Also being bitmap based with bit position specifying APIC ID it doesn't scale up for 32-bit APIC IDs that would with x2APIC support

Re: [Qemu-devel] [PATCH v4 06/14] sd: Switch to byte-based block access

2016-05-02 Thread Kevin Wolf
Am 29.04.2016 um 22:08 hat Eric Blake geschrieben: > Sector-based blk_write() should die; switch to byte-based > blk_pwrite() instead. Likewise for blk_read(). > > Greatly simplifies the code, now that we let the block layer > take care of alignment and read-modify-write on our behalf :) > > Sig

[Qemu-devel] [PATCH 1/4] hw/pc: extract reserved memory end computation to a standalone function

2016-05-02 Thread Marcel Apfelbaum
This code will be reused when calculating 64-bit MMIO hotplug ranges. Signed-off-by: Marcel Apfelbaum --- hw/i386/pc.c | 29 + include/hw/i386/pc.h | 1 + 2 files changed, 22 insertions(+), 8 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 2ac97c

[Qemu-devel] [PATCH 2/4] pci: reserve 64 bit MMIO range for PCI hotplug

2016-05-02 Thread Marcel Apfelbaum
Using the firmware assigned MMIO ranges for 64-bit PCI window leads to zero space for hot-plugging PCI devices over 4G. PC machines can use the whole CPU addressable range after the space reserved for memory-hotplug. Signed-off-by: Marcel Apfelbaum --- hw/pci/pci.c | 16 ++-- 1 file

Re: [Qemu-devel] [PATCH v4 04/14] onenand: Switch to byte-based block access

2016-05-02 Thread Kevin Wolf
Am 29.04.2016 um 22:08 hat Eric Blake geschrieben: > Sector-based blk_write() should die; switch to byte-based > blk_pwrite() instead. Likewise for blk_read(). > > Signed-off-by: Eric Blake > > --- > Not compile tested - I'm not sure what else I'd need in my environment > to actually test this

[Qemu-devel] [PATCH 4/4] hw/apci: handle 64-bit MMIO regions correctly

2016-05-02 Thread Marcel Apfelbaum
In build_crs(), the calculation and merging of the ranges already happens in 64-bit, but the entry boundaries are silently truncated to 32-bit in the call to aml_dword_memory(). Fix it by handling the 64-bit MMIO ranges separately. This fixes 64-bit BARs behind PXBs. Signed-off-by: Marcel Apfelba

[Qemu-devel] [PATCH 0/4] pci: better support for 64-bit MMIO allocation

2016-05-02 Thread Marcel Apfelbaum
Hi, First two patches allocate (max_reserved_ram - max_addr_cpu_addressable) range for PCI hotplug (for PC Machines) instead of the previous 64-bit PCI window that included only the ranges allocated by the firmware. The next two patches fix 64-bit CRS computations. Thank you, Marcel Marcel Apf

Re: [Qemu-devel] [PATCH] block: Fix typo in comment

2016-05-02 Thread Kevin Wolf
Am 26.04.2016 um 12:12 hat Wei Jiangang geschrieben: > s/imlement/implement/ > > Signed-off-by: Wei Jiangang Thanks, applied to block-next. Kevin

Re: [Qemu-devel] [PATCH v4 03/14] nand: Switch to byte-based block access

2016-05-02 Thread Kevin Wolf
Am 29.04.2016 um 22:08 hat Eric Blake geschrieben: > Sector-based blk_write() should die; switch to byte-based > blk_pwrite() instead. Likewise for blk_read(). > > This file is doing some complex computations to map various > flash page sizes (256, 512, and 2048) atop generic uses of > 512-byte s

Re: [Qemu-devel] [PATCH] block: Don't lose FUA flag during ZERO_WRITE fallback

2016-05-02 Thread Kevin Wolf
Am 30.04.2016 um 23:48 hat Eric Blake geschrieben: > NBD has situations where it can support FUA but not ZERO_WRITE; > when that happens, the generic block layer fallback was losing > the FUA flag. The problem of losing flags unrelated to > ZERO_WRITE has been latent in bdrv_co_do_write_zeroes() s

[Qemu-devel] [PATCH 3/4] acpi: refactor pxb crs computation

2016-05-02 Thread Marcel Apfelbaum
Instead of always passing both IO and MEM ranges when computing CRS ranges, define a new CrsRangeSet structure that include them both. This is done before introducing a third type of range, 64-bit MEM, so it will be easier to pass them all around. Signed-off-by: Marcel Apfelbaum --- hw/i386/acp

Re: [Qemu-devel] [PATCH 02/19] block: Add BDS.backing_overridden

2016-05-02 Thread Kevin Wolf
Am 26.04.2016 um 23:32 hat Max Reitz geschrieben: > If the backing file is overridden, this most probably does change the > guest-visible data of a BDS. Therefore, we will need to consider this in > bdrv_refresh_filename(). > > Adding a new field to the BDS is not nice, but it is very simple and >

Re: [Qemu-devel] [PATCH for 2.7 v2 1/1] qcow2: improve qcow2_co_write_zeroes()

2016-05-02 Thread Kevin Wolf
Am 27.04.2016 um 09:08 hat Denis V. Lunev geschrieben: > There is a possibility that qcow2_co_write_zeroes() will be called by > with the partial block. This could be synthetically triggered with > qemu-io -c "write -z 32k 4k" > and can happen in the real life in qemu-nbd. The latter happens un

Re: [Qemu-devel] [PATCH] block: Don't lose FUA flag during ZERO_WRITE fallback

2016-05-02 Thread Eric Blake
On 05/02/2016 09:35 AM, Kevin Wolf wrote: > Am 30.04.2016 um 23:48 hat Eric Blake geschrieben: >> NBD has situations where it can support FUA but not ZERO_WRITE; >> when that happens, the generic block layer fallback was losing >> the FUA flag. The problem of losing flags unrelated to >> ZERO_WRIT

Re: [Qemu-devel] [Qemu-discuss] iolimits for virtio-9p

2016-05-02 Thread Pradeep Kiruvale
On 2 May 2016 at 14:57, Greg Kurz wrote: > On Thu, 28 Apr 2016 11:45:41 +0200 > Pradeep Kiruvale wrote: > > > On 27 April 2016 at 19:12, Greg Kurz wrote: > > > > > On Wed, 27 Apr 2016 16:39:58 +0200 > > > Pradeep Kiruvale wrote: > > > > > > > On 27 April 2016 at 10:38, Alberto Garcia wrote: >

Re: [Qemu-devel] [PATCH 16/19] block/nbd: Implement bdrv_dirname()

2016-05-02 Thread Kevin Wolf
Am 26.04.2016 um 23:32 hat Max Reitz geschrieben: > The idea behind this implementation is that the export name might be > interpreted as a path (which is the only apparent interpretation of > relative filenames for NBD paths). > > The default implementation of bdrv_dirname() would handle that jus

Re: [Qemu-devel] [PATCH 03/19] block: Respect backing bs in bdrv_refresh_filename

2016-05-02 Thread Kevin Wolf
Am 26.04.2016 um 23:32 hat Max Reitz geschrieben: > Basically, bdrv_refresh_filename() should respect all children of a > BlockDriverState. However, generally those children are driver-specific, > so this function cannot handle the general case. On the other hand, > there are only few drivers which

Re: [Qemu-devel] [PATCH 06/19] block: Make bdrv_default_refresh_format_filename public

2016-05-02 Thread Kevin Wolf
Am 26.04.2016 um 23:32 hat Max Reitz geschrieben: > In order to allow block drivers to use that function, it needs to be > public. In order to be useful, it needs to take a parameter which allows > the caller to specify whether the runtime options allowed by the block > driver are actually signific

[Qemu-devel] [RFC 38/42] tests: acpi: add CPU hotplug testcase

2016-05-02 Thread Igor Mammedov
Test with "-smp 2,cores=3,sockets=2,maxcpus=6" to capture sparse APIC ID values that default AMD CPU has in above configuration. Signed-off-by: Igor Mammedov --- tests/bios-tables-test.c | 28 1 file changed, 28 insertions(+) diff --git a/tests/bios-tables-test.c b/

Re: [Qemu-devel] [PATCH v2] migration: Promote improved autoconverge commands out of experimental state

2016-05-02 Thread Jason J. Herne
On 04/21/2016 02:07 PM, Jason J. Herne wrote: The new autoconverge throttling commands have been tested for a release now. It is time to move them out of the experimental state. ping. Signed-off-by: Jason J. Herne --- hmp.c | 28 +- migration/migra

Re: [Qemu-devel] [PATCH] Revert "acpi: mark PMTIMER as unlocked"

2016-05-02 Thread Peter Maydell
On 2 May 2016 at 13:32, Gerd Hoffmann wrote: > On Fr, 2016-04-15 at 12:10 +0200, Paolo Bonzini wrote: >> >> On 15/04/2016 08:43, Gerd Hoffmann wrote: >> > This reverts commit 7070e085d490c396f9237c8f10bf8b6e69cd0066. >> > >> > Commit message claims locking is not needed, but that appears >> > to n

Re: [Qemu-devel] [BUG 2.6] Broken CONFIG_TPM?

2016-05-02 Thread Peter Maydell
On 29 April 2016 at 08:42, Markus Armbruster wrote: > Stefan Weil writes: > >> A compilation test with clang -Weverything reported this problem: >> >> config-host.h:112:20: warning: '$' in identifier >> [-Wdollar-in-identifier-extension] >> >> The line of code looks like this: >> >> #define CONFI

Re: [Qemu-devel] [Nbd] Is NBD_CMD_FLAG_FUA valid during NBD_CMD_FLUSH?

2016-05-02 Thread Eric Blake
On 03/31/2016 02:34 PM, Eric Blake wrote: > On 03/31/2016 02:17 PM, Alex Bligh wrote: >> OK so I actually went and researched what my answer was last time I >> was asked ( :-) ): >> >> Here was my conclusion last time after trawling through lkml >> on the subject: >> >> From https://sourceforge.net

Re: [Qemu-devel] [PATCH] block: Don't lose FUA flag during ZERO_WRITE fallback

2016-05-02 Thread Eric Blake
On 05/02/2016 09:42 AM, Eric Blake wrote: > On 05/02/2016 09:35 AM, Kevin Wolf wrote: >> Am 30.04.2016 um 23:48 hat Eric Blake geschrieben: >>> NBD has situations where it can support FUA but not ZERO_WRITE; >>> when that happens, the generic block layer fallback was losing >>> the FUA flag. The p

Re: [Qemu-devel] [PATCH 11/18] vhost-user: add shutdown support

2016-05-02 Thread Yuanhan Liu
On Mon, May 02, 2016 at 01:45:31PM +0300, Michael S. Tsirkin wrote: > On Sun, May 01, 2016 at 02:04:42PM -0700, Yuanhan Liu wrote: > > On Sun, May 01, 2016 at 02:37:19PM +0300, Michael S. Tsirkin wrote: > > > On Fri, Apr 29, 2016 at 10:48:35AM -0700, Yuanhan Liu wrote: > > > > > But, I > > > > > wo

[Qemu-devel] [PATCH v2] fixup! tcg/mips: Make direct jump patching thread-safe

2016-05-02 Thread Sergey Fedorov
From: Sergey Fedorov Signed-off-by: Sergey Fedorov Signed-off-by: Sergey Fedorov --- This patch is based on a commit: e601ccb62016 ("cpu-exec: Move TB chaining into tb_find_fast()") from: https://github.com/rth7680/qemu.git tcg-next tcg/mips/tcg-target.inc.c | 2 +- 1 file cha

Re: [Qemu-devel] [PATCH] fixup! tcg/mips: Make direct jump patching thread-safe

2016-05-02 Thread Sergey Fedorov
On 02/05/16 00:27, Sergey Fedorov wrote: > From: Sergey Fedorov > > Signed-off-by: Sergey Fedorov > Signed-off-by: Sergey Fedorov Please ignore this patch, the correct one is v2. Kind regards, Sergey > --- > > tcg/mips/tcg-target.inc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [Qemu-devel] [PATCH v2] fixup! tcg/mips: Make direct jump patching thread-safe

2016-05-02 Thread Richard Henderson
On 05/02/2016 07:35 AM, Sergey Fedorov wrote: From: Sergey Fedorov Signed-off-by: Sergey Fedorov Signed-off-by: Sergey Fedorov --- This patch is based on a commit: e601ccb62016 ("cpu-exec: Move TB chaining into tb_find_fast()") from: https://github.com/rth7680/qemu.git tcg-next

Re: [Qemu-devel] [PATCH 11/18] vhost-user: add shutdown support

2016-05-02 Thread Yuanhan Liu
On Mon, May 02, 2016 at 03:04:30PM +0300, Michael S. Tsirkin wrote: > On Mon, May 02, 2016 at 01:29:18PM +0200, Marc-André Lureau wrote: > > Hi > > > > On Mon, May 2, 2016 at 12:45 PM, Michael S. Tsirkin wrote: > > > 1. Graceful disconnect > > > - One should be able to do vmstop, disconnect, conn

Re: [Qemu-devel] [PATCH v3 15/18] qapi: Add new clone visitor

2016-05-02 Thread Markus Armbruster
Eric Blake writes: > We have a couple places in the code base that want to deep-clone > one QAPI object into another, and they were resorting to serializing > the struct out to QObject then reparsing it. A much more efficient > version can be done by adding a new clone visitor. > > Note that we

  1   2   >