[Qemu-devel] [PATCH v5 07/33] util: introduce qemu_file_get_page_size()

2015-10-28 Thread Xiao Guangrong
There are three places use the some logic to get the page size on the file path or file fd This patch introduces qemu_file_get_page_size() to unify the code Signed-off-by: Xiao Guangrong --- include/qemu/osdep.h | 1 + target-ppc/kvm.c | 21 +++-- util/oslib-posix.c | 16

[Qemu-devel] [PATCH v5 23/33] nvdimm acpi: init the resource used by NVDIMM ACPI

2015-10-28 Thread Xiao Guangrong
A page staring from 0xFF0 and IO port 0x0a18 - 0xa1b in guest are reserved for NVDIMM ACPI emulation, refer to docs/specs/acpi_nvdimm.txt for detailed design A parameter, 'nvdimm-support', is introduced for PIIX4_PM and ICH9-LPC that controls if nvdimm support is enabled, it is true on default

[Qemu-devel] [PATCH v5 22/33] docs: add NVDIMM ACPI documentation

2015-10-28 Thread Xiao Guangrong
It describes the basic concepts of NVDIMM ACPI and the interface between QEMU and the ACPI BIOS Signed-off-by: Xiao Guangrong --- docs/specs/acpi_nvdimm.txt | 179 + 1 file changed, 179 insertions(+) create mode 100644 docs/specs/acpi_nvdimm.txt diff

[Qemu-devel] [PATCH v5 10/33] hostmem-file: clean up memory allocation

2015-10-28 Thread Xiao Guangrong
- hostmem-file.c is compiled only if CONFIG_LINUX is enabled so that is unnecessary to do the same check in the source file - the interface, HostMemoryBackendClass->alloc(), is not called many times, do not need to check if the memory-region is initialized Signed-off-by: Xiao Guangrong ---

[Qemu-devel] [PATCH v5 03/33] acpi: add aml_create_field

2015-10-28 Thread Xiao Guangrong
Implement CreateField term which is used by NVDIMM _DSM method in later patch Signed-off-by: Xiao Guangrong --- hw/acpi/aml-build.c | 13 + include/hw/acpi/aml-build.h | 1 + 2 files changed, 14 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index a722

[Qemu-devel] [PATCH v5 15/33] stubs: rename qmp_pc_dimm_device_list.c

2015-10-28 Thread Xiao Guangrong
Rename qmp_pc_dimm_device_list.c to qmp_dimm_device_list.c Signed-off-by: Xiao Guangrong --- stubs/Makefile.objs | 2 +- stubs/{qmp_pc_dimm_device_list.c => qmp_dimm_device_list.c} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename stubs/{qmp_pc_d

[Qemu-devel] [PATCH v5 24/33] nvdimm acpi: build ACPI NFIT table

2015-10-28 Thread Xiao Guangrong
NFIT is defined in ACPI 6.0: 5.2.25 NVDIMM Firmware Interface Table (NFIT) Currently, we only support PMEM mode. Each device has 3 structures: - SPA structure, defines the PMEM region info - MEM DEV structure, it has the @handle which is used to associate specified ACPI NVDIMM device we will i

[Qemu-devel] [PATCH v5 12/33] pc-dimm: remove DEFAULT_PC_DIMMSIZE

2015-10-28 Thread Xiao Guangrong
It's not used any more Signed-off-by: Xiao Guangrong --- include/hw/mem/pc-dimm.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/hw/mem/pc-dimm.h b/include/hw/mem/pc-dimm.h index c1ee7b0..15590f1 100644 --- a/include/hw/mem/pc-dimm.h +++ b/include/hw/mem/pc-dimm.h @@ -20,8 +20,6 @@

[Qemu-devel] [PATCH v5 27/33] nvdimm acpi: support function 0

2015-10-28 Thread Xiao Guangrong
__DSM is defined in ACPI 6.0: 9.14.1 _DSM (Device Specific Method) Function 0 is a query function. We do not support any function on root device and only 3 functions are support for NVDIMM device, Get Namespace Label Size, Get Namespace Label Data and Set Namespace Label Data, that means we curren

[Qemu-devel] [PATCH v5 04/33] acpi: add aml_concatenate

2015-10-28 Thread Xiao Guangrong
Implement Concatenate term which is used by NVDIMM _DSM method in later patch Signed-off-by: Xiao Guangrong --- hw/acpi/aml-build.c | 14 ++ include/hw/acpi/aml-build.h | 1 + 2 files changed, 15 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 9fe

[Qemu-devel] [PATCH v5 25/33] nvdimm acpi: build ACPI nvdimm devices

2015-10-28 Thread Xiao Guangrong
NVDIMM devices is defined in ACPI 6.0 9.20 NVDIMM Devices There is a root device under \_SB and specified NVDIMM devices are under the root device. Each NVDIMM device has _ADR which returns its handle used to associate MEMDEV structure in NFIT We reserve handle 0 for root device. In this patch, w

[Qemu-devel] [PATCH v5 28/33] nvdimm acpi: support Get Namespace Label Size function

2015-10-28 Thread Xiao Guangrong
Function 4 is used to get Namespace label size Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 87 +++- 1 file changed, 86 insertions(+), 1 deletion(-) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 8efa640..72203d2 100644 --- a/h

Re: [Qemu-devel] [PATCH] vnc: fix bug: vnc server can't start when 'to' is specified

2015-10-28 Thread Gerd Hoffmann
On Di, 2015-10-27 at 14:10 +0800, Yang Hongyang wrote: > commit e0d03b8ceb52 converted VNC startup to use SocketAddress, > the interface socket_listen don't have a port_offset param, so > we need to add the port offset (5900) to both 'port' and 'to' opts. > currently only 'port' is added by offset.

[Qemu-devel] [PATCH v5 20/33] dimm: introduce realize callback

2015-10-28 Thread Xiao Guangrong
nvdimm need check if the backend memory is large enough to contain label data and init its memory region when the device is realized, so introduce realize callback which is called after common dimm has been realize Signed-off-by: Xiao Guangrong --- hw/mem/dimm.c | 5 + include/hw/mem

[Qemu-devel] [PATCH v5 31/33] nvdimm: allow using whole backend memory as pmem

2015-10-28 Thread Xiao Guangrong
Introduce a parameter, named "reserve-label-data", if it is false which indicates that QEMU does not reserve any region on the backend memory to support label data. It is a 'label-less' NVDIMM device mode that linux will use whole memory on the device as a single namesapce This is useful for the u

[Qemu-devel] [PATCH v5 29/33] nvdimm acpi: support Get Namespace Label Data function

2015-10-28 Thread Xiao Guangrong
Function 5 is used to get Namespace Label Data Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 48 1 file changed, 48 insertions(+) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 72203d2..5b621ed 100644 --- a/hw/acpi/nvdimm.c +++ b/h

[Qemu-devel] [PATCH v5 33/33] nvdimm: add maintain info

2015-10-28 Thread Xiao Guangrong
Add NVDIMM maintainer Signed-off-by: Xiao Guangrong --- MAINTAINERS | 7 +++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 9bd2b8f..a3c38cc 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -868,6 +868,13 @@ M: Jiri Pirko S: Maintained F: hw/net/rocker/ +NVDI

Re: [Qemu-devel] [PATCH for-2.5 0/2] trace: decrease overhead of simpletrace and stderr backends

2015-10-28 Thread Stefan Hajnoczi
On Wed, Oct 28, 2015 at 07:06:25AM +0100, Paolo Bonzini wrote: > This patch series makes it faster for simpletrace and stderr backends > to discard disabled events. This is done in two ways: patch 1 makes > the common case of no enabled events faster; patch 2 makes the other > case less heavy on t

[Qemu-devel] [PATCH v5 32/33] nvdimm acpi: support _FIT method

2015-10-28 Thread Xiao Guangrong
FIT buffer is not completely mapped into guest address space, so a new function, Read FIT, function index 0x, is reserved by QEMU to read the piece of FIT buffer. The buffer is concatenated before _FIT return Refer to docs/specs/acpi-nvdimm.txt for detailed design Signed-off-by: Xiao Guan

[Qemu-devel] [PATCH 0/2] trace: fix Makefile dependencies

2015-10-28 Thread Stefan Hajnoczi
Issues with trace/Makefile.objs: 1. Generated code is not recreated when patches modify scripts/tracetool/*.py. Typically such patches also modify trace/*.[ch] and the result is build failures when new C code compiles against stale generated code. 2. The timestamp mechanism used to avoid un

[Qemu-devel] [PATCH 1/2] trace: fix make foo-timestamp rules

2015-10-28 Thread Stefan Hajnoczi
The Makefile uses intermediate timestamp files to avoid rebuilding if tracetool output is unchanged. Timestamps are implemented incorrectly. This was fixed for rules.mak in commit 4b25966ab976f3a7fd9008193b2defcc82f8f04d ("rules.mak: cleanup config generation rules") but never fixed in trace/Make

[Qemu-devel] [PATCH 2/2] trace: add make dependencies on tracetool source

2015-10-28 Thread Stefan Hajnoczi
Patches that change tracetool can break the build if old build output files are lying around. This happens because the Makefile does not specify dependencies on tracetool. The build will use old object files that do not match the current source code. Signed-off-by: Stefan Hajnoczi --- trace/Ma

[Qemu-devel] [PATCH 1/4] fifolock: create rfifolock_is_locked helper

2015-10-28 Thread Denis V. Lunev
This helper is necessary to ensure locking constraints. Signed-off-by: Denis V. Lunev CC: Stefan Hajnoczi CC: Paolo Bonzini --- include/qemu/rfifolock.h | 1 + util/rfifolock.c | 9 +++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/qemu/rfifolock.h b/incl

[Qemu-devel] [PATCH 2/4] aio_context: create aio_context_is_locked helper

2015-10-28 Thread Denis V. Lunev
This helper is necessary to ensure locking constraints. Signed-off-by: Denis V. Lunev CC: Stefan Hajnoczi CC: Paolo Bonzini --- async.c | 5 + include/block/aio.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/async.c b/async.c index bdc64a3..4a9250e 100644 --- a/async

[Qemu-devel] [PATCH v3 0/4] dataplane snapshot fixes

2015-10-28 Thread Denis V. Lunev
with test while /bin/true ; do virsh snapshot-create rhel7 sleep 10 virsh snapshot-delete rhel7 --current done with enabled iothreads on a running VM leads to a lot of troubles: hangs, asserts, errors. Anyway, I think that the construction like assert(aio_contex

Re: [Qemu-devel] [PULL for-2.5] Update OpenBIOS images

2015-10-28 Thread Peter Maydell
On 28 October 2015 at 00:32, Mark Cave-Ayland wrote: > The following changes since commit 7e038b94e74e1c2d1b3598e2e4b0b5c8b79a7278: > > Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into > staging (2015-10-27 10:10:46 +) > > are available in the git repository at: >

[Qemu-devel] [PATCH 3/4] io: add locking constraints check into bdrv_drain to ensure locking

2015-10-28 Thread Denis V. Lunev
as described in the comment of the function Signed-off-by: Denis V. Lunev CC: Stefan Hajnoczi CC: Paolo Bonzini --- block/io.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/block/io.c b/block/io.c index 5ac6256..2e98d45 100644 --- a/block/io.c +++ b/block/io.c @@ -247

[Qemu-devel] [PATCH 4/4] migration: add missed aio_context_acquire into HMP snapshot code

2015-10-28 Thread Denis V. Lunev
aio_context should be locked in the similar way as was done in QMP snapshot creation in the other case there are a lot of possible troubles if native AIO mode is enabled for disk. - the command can hang (HMP thread) with missed wakeup (the operation is actually complete) io_submit ioq_su

[Qemu-devel] [PATCH v5 02/33] acpi: add aml_sizeof

2015-10-28 Thread Xiao Guangrong
Implement SizeOf term which is used by NVDIMM _DSM method in later patch Reviewed-by: Igor Mammedov Signed-off-by: Xiao Guangrong --- 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-bui

Re: [Qemu-devel] [PULL v2 00/14] QMP and QObject patches

2015-10-28 Thread Peter Maydell
On 28 October 2015 at 08:15, Markus Armbruster wrote: > The following changes since commit 7e038b94e74e1c2d1b3598e2e4b0b5c8b79a7278: > > Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into > staging (2015-10-27 10:10:46 +) > > are available in the git repository at: >

[Qemu-devel] [PATCH 2/3] qga: fixed CloseHandle in qmp_guest_file_open

2015-10-28 Thread Denis V. Lunev
From: Olga Krishtal CloseHandle use HANDLE as an argument, but not *HANDLE Signed-off-by: Olga Krishtal Signed-off-by: Denis V. Lunev Reviewed-by: Stefan Weil CC: Michael Roth --- qga/commands-win32.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qga/commands-win32.c b

[Qemu-devel] [PATCH 1/3] qga: drop hand-made guest_file_toggle_flags helper

2015-10-28 Thread Denis V. Lunev
We'd better use generic qemu_set_nonblock directly. Signed-off-by: Denis V. Lunev Reviewed-by: Yuri Pudgorodskiy Reviewed-by: Eric Blake CC: Michael Roth --- qga/commands-posix.c | 27 ++- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/qga/commands-posi

[Qemu-devel] [PATCH v4 for 2.5 0/3] qga: non-blocking fd cleanups

2015-10-28 Thread Denis V. Lunev
This patchset is reincarnation of one patch discussed in the scope of QEMU 2.4 and rejected for that time. Actually we should use non-blocking descriptors in QGA on Windows in guest-file-open exactly like was done for Posix. Changes from v3: - handle_set_nonblocking now is local function in qga/co

[Qemu-devel] [PATCH 3/3] qga: set file descriptor in qmp_guest_file_open non-blocking on Win32

2015-10-28 Thread Denis V. Lunev
From: Olga Krishtal Set fd non-blocking to avoid common use cases (like reading from a named pipe) from hanging the agent. This was missed in the original code. The patch introduces qemu_set_handle_nonoblocking, the local analog of qemu_set_nonblock for HANDLES. The usage of handles in qemu_set_

Re: [Qemu-devel] [PATCH 01/11] trace: fix documentation

2015-10-28 Thread Denis V. Lunev
On 10/26/2015 11:05 PM, Christian Borntraeger wrote: Am 26.10.2015 um 18:10 schrieb Denis V. Lunev: From: Paolo Bonzini Mention the ftrace backend too. Signed-off-by: Paolo Bonzini Signed-off-by: Denis V. Lunev Reviewed-by: Christian Borntraeger Can you make that Acked-by: Christian Bornt

Re: [Qemu-devel] [PATCH 3/3] qga: set file descriptor in qmp_guest_file_open non-blocking on Win32

2015-10-28 Thread Denis V. Lunev
On 10/27/2015 10:49 PM, Michael Roth wrote: Quoting Denis V. Lunev (2015-10-27 14:13:57) On 10/27/2015 10:11 PM, Michael Roth wrote: Quoting Denis V. Lunev (2015-10-27 12:48:43) From: Olga Krishtal Set fd non-blocking to avoid common use cases (like reading from a named pipe) from hanging th

Re: [Qemu-devel] proposal: new qemu-arm mailing list

2015-10-28 Thread John Snow
On 10/28/2015 02:49 AM, Pavel Fedin wrote: > Hello! > >> Just to jump on and bead a dead horse, I am not OK with the idea of a >> mailing list where patches might get reviewed and staged for pull >> without the general population of qemu-devel being able to look first. > > Ok ok, i don't obje

Re: [Qemu-devel] [PULL v2 00/14] QMP and QObject patches

2015-10-28 Thread Eric Blake
On 10/28/2015 09:07 AM, Peter Maydell wrote: >> glib: add compatibility interface for g_hash_table_add() >> monitor: Turn monitor_qapi_event_state[] into a hash table > > CCqga/commands-posix.o > In file included from /Users/pm215/src/qemu-for-merges/qga/main.c:25: > In file in

[Qemu-devel] [PATCH v3 5/6] e1000: Fixing the packet address filtering procedure

2015-10-28 Thread Leonid Bloch
Previously, if promiscuous unicast was enabled, a packet was received straight away, even if it was a multicast or a broadcast packet. This patch fixes that behavior, while making the filtering procedure a bit more human-readable. Signed-off-by: Leonid Bloch Signed-off-by: Dmitry Fleytman --- h

[Qemu-devel] [PATCH v3 2/6] e1000: Trivial implementation of various MAC registers

2015-10-28 Thread Leonid Bloch
These registers appear in Intel's specs, but were not implemented. These registers are now implemented trivially, i.e. they are initiated with zero values, and if they are RW, they can be written or read by the driver, or read only if they are R (essentially retaining their zero values). For these

[Qemu-devel] [PATCH v4 16/21] xen_disk: Account for failed and invalid operations

2015-10-28 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- hw/block/xen_disk.c | 23 ++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c index 4869518..02eda6e 100644 --- a/hw/block/xen_disk.c +++ b/hw/block/xen_disk.c @@ -537,7 +537,11 @@ static

[Qemu-devel] [PATCH v3 3/6] e1000: Fixing the received/transmitted packets' counters

2015-10-28 Thread Leonid Bloch
According to Intel's specs, these counters (as the other Statistic registers) stick at 0x when this maximal value is reached. Previously, they would reset after the max. value. Signed-off-by: Leonid Bloch Signed-off-by: Dmitry Fleytman --- hw/net/e1000.c | 16 1 file ch

[Qemu-devel] [PATCH v4 01/21] xen_disk: Account for flush operations

2015-10-28 Thread Alberto Garcia
Currently both BLKIF_OP_WRITE and BLKIF_OP_FLUSH_DISKCACHE are being accounted as write operations. Signed-off-by: Alberto Garcia Reviewed-by: Stefan Hajnoczi --- hw/block/xen_disk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c

[Qemu-devel] [PATCH v4 03/21] block: define 'clock_type' for the accounting code

2015-10-28 Thread Alberto Garcia
Its value is still QEMU_CLOCK_REALTIME, but having it in a variable will allow us to change its value easily in the future when running in qtest mode. Signed-off-by: Alberto Garcia Reviewed-by: Stefan Hajnoczi --- block/accounting.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) d

[Qemu-devel] [PATCH v4 14/21] nvme: Account for failed and invalid operations

2015-10-28 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- hw/block/nvme.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/hw/block/nvme.c b/hw/block/nvme.c index 5da41b2..169e4fa 100644 --- a/hw/block/nvme.c +++ b/hw/block/nvme.c @@ -201,10 +201,11 @@ static void nvme_rw_cb(void *opaque,

[Qemu-devel] [PATCH v3 4/6] e1000: Fixing the received/transmitted octets' counters

2015-10-28 Thread Leonid Bloch
Previously, these 64-bit registers did not stick at their maximal values when (and if) they reached them, as they should do, according to the specs. This patch introduces a function that takes care of such registers, avoiding code duplication, making the relevant parts more compatible with the QEM

[Qemu-devel] [PATCH v4 06/21] block: Add statistics for failed and invalid I/O operations

2015-10-28 Thread Alberto Garcia
This patch adds the block_acct_failed() and block_acct_invalid() functions to allow keeping track of failed and invalid I/O operations. The number of failed and invalid operations is exposed in BlockDeviceStats. We don't keep track of the time spent on invalid operations because they are cancelle

[Qemu-devel] [PATCH v3 6/6] e1000: Implementing various counters

2015-10-28 Thread Leonid Bloch
This implements the following Statistic registers (various counters) according to Intel's specs: TSCTC GOTCL GOTCH GORCL GORCH MPRC BPRC RUCROC BPTC MPTC PTC... PRC... Signed-off-by: Leonid Bloch Signed-off-by: Dmitry Fleytman --- hw/net/e1000.c | 117 +

[Qemu-devel] [PATCH v4 21/21] block: Update copyright of the accounting code

2015-10-28 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- block/accounting.c | 1 + include/block/accounting.h | 1 + 2 files changed, 2 insertions(+) diff --git a/block/accounting.c b/block/accounting.c index 05a5c5f..185025e 100644 --- a/block/accounting.c +++ b/block/accounting.c @@ -2,6 +2,7 @@ * QEMU Sys

[Qemu-devel] [PATCH v4 00/21] Extended I/O accounting

2015-10-28 Thread Alberto Garcia
Here's v4 of the series that implements extended I/O accounting for block devices. Since part of Max's BlockBackend series has already been merged, this series can now be applied cleanly on top of the master branch without additional dependencies. Here's the summary of what this series provides:

[Qemu-devel] [PATCH v4 02/21] ide: Account for write operations correctly

2015-10-28 Thread Alberto Garcia
Signed-off-by: Alberto Garcia Reviewed-by: Stefan Hajnoczi --- hw/ide/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 317406d..b559f1b 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -895,7 +895,7 @@ static void ide_sector_write(ID

[Qemu-devel] [PATCH v3 0/6] e1000: Various fixes and registers' implementation

2015-10-28 Thread Leonid Bloch
This series fixes issues with packet/octet counting in e1000's Statistic registers, fixes a bug in the packet address filtering procedure, and implements many MAC registers that were absent before, some Statistic counters among them. Additionally, several cosmetic changes are made. Differences fro

Re: [Qemu-devel] [PATCH] vl.c: Replace fprintf(stderr) with error_report()

2015-10-28 Thread Laszlo Ersek
On 10/28/15 14:58, Andrew Jones wrote: > On Tue, Oct 27, 2015 at 08:36:07PM +0100, Laszlo Ersek wrote: >> On 10/27/15 20:25, Eduardo Habkost wrote: >>> On Tue, Oct 27, 2015 at 08:30:38AM +0100, Andrew Jones wrote: In addition to Markus' and Eric's comments, I think we should 1. make

[Qemu-devel] [PATCH v3 1/6] e1000: Cosmetic and alignment fixes

2015-10-28 Thread Leonid Bloch
This fixes some alignment and cosmetic issues. The changes are made in order that the following patches in this series will look like integral parts of the code surrounding them, while conforming to the coding style. Although some changes in unrelated areas are also made. Signed-off-by: Leonid Blo

[Qemu-devel] [PATCH v4 05/21] block: Add idle_time_ns to BlockDeviceStats

2015-10-28 Thread Alberto Garcia
This patch adds the new field 'idle_time_ns' to the BlockDeviceStats structure, indicating the time that has passed since the previous I/O operation. It also adds the block_acct_idle_time_ns() call, to ensure that all references to the clock type used for accounting are in the same place. This wil

[Qemu-devel] [PATCH v4 18/21] ide: Account for failed and invalid operations

2015-10-28 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- hw/ide/core.c | 10 -- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index b559f1b..dd7e9c5 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -574,7 +574,6 @@ static void ide_sector_read_cb(void *opaque, int r

[Qemu-devel] [PATCH v4 04/21] util: Infrastructure for computing recent averages

2015-10-28 Thread Alberto Garcia
This module computes the average of a set of values within a time window, keeping also track of the minimum and maximum values. In order to produce more accurate results it works internally by creating two time windows of the same period, offsetted by half of that period. Values are accounted on b

[Qemu-devel] [PATCH v4 09/21] block: Add average I/O queue depth to BlockDeviceTimedStats

2015-10-28 Thread Alberto Garcia
This patch adds two new fields to BlockDeviceTimedStats that track the average number of pending read and write requests for a block device. The values are calculated for the period of time defined for that interval. Signed-off-by: Alberto Garcia --- block/accounting.c | 12 ++

[Qemu-devel] [PATCH v4 08/21] block: Compute minimum, maximum and average I/O latencies

2015-10-28 Thread Alberto Garcia
This patch keeps track of the minimum, maximum and average latencies of I/O operations during a certain interval of time. The values are exposed in the BlockDeviceTimedStats structure. An option to define the intervals to collect these statistics will be added in a separate patch. Signed-off-by:

[Qemu-devel] [PATCH v4 11/21] qemu-io: Account for failed, invalid and flush operations

2015-10-28 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- qemu-io-cmds.c | 9 + 1 file changed, 9 insertions(+) diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c index 6e5d1e4..0cac623 100644 --- a/qemu-io-cmds.c +++ b/qemu-io-cmds.c @@ -1364,6 +1364,7 @@ static void aio_write_done(void *opaque, int ret) if (

[Qemu-devel] [PATCH v4 07/21] block: Allow configuring whether to account failed and invalid ops

2015-10-28 Thread Alberto Garcia
This patch adds two options, "stats-account-invalid" and "stats-account-failed", that can be used to decide whether invalid and failed I/O operations must be used when collecting statistics for latency and last access time. Signed-off-by: Alberto Garcia Reviewed-by: Stefan Hajnoczi --- block/ac

[Qemu-devel] [PATCH v4 15/21] virtio-blk: Account for failed and invalid operations

2015-10-28 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- hw/block/virtio-blk.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/block/virtio-blk.c b/hw/block/virtio-blk.c index 8beb26b..aea9728 100644 --- a/hw/block/virtio-blk.c +++ b/hw/block/virtio-blk.c @@ -76,7 +76,7 @@ static int virtio_bl

[Qemu-devel] [PATCH v4 20/21] scsi-disk: Account for failed operations

2015-10-28 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- hw/scsi/scsi-disk.c | 46 +++--- 1 file changed, 31 insertions(+), 15 deletions(-) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index bada9a7..20a31a7 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@

[Qemu-devel] [PATCH v4 13/21] iotests: Add test for the block device statistics

2015-10-28 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- tests/qemu-iotests/136 | 349 + tests/qemu-iotests/136.out | 5 + tests/qemu-iotests/group | 1 + 3 files changed, 355 insertions(+) create mode 100644 tests/qemu-iotests/136 create mode 100644 tests/qemu-io

[Qemu-devel] [PATCH v4 10/21] block: New option to define the intervals for collecting I/O statistics

2015-10-28 Thread Alberto Garcia
The BlockAcctStats structure contains a list of BlockAcctTimedStats. Each one of these collects statistics about the minimum, maximum and average latencies of all I/O operations in a certain interval of time. This patch adds a new "stats-intervals" option that allows defining these intervals. Sig

[Qemu-devel] [PATCH 1/2] dataplane: simplify indirect descriptor read

2015-10-28 Thread Michael S. Tsirkin
Use address_space_read to make sure we handle the case of an indirect descriptor crossing DIMM boundary correctly. Signed-off-by: Michael S. Tsirkin --- Warning: compile-tested only. hw/virtio/dataplane/vring.c | 28 ++-- 1 file changed, 18 insertions(+), 10 deletions(-

Re: [Qemu-devel] [PATCH 4/4] migration: add missed aio_context_acquire into HMP snapshot code

2015-10-28 Thread Juan Quintela
"Denis V. Lunev" wrote: > aio_context should be locked in the similar way as was done in QMP > snapshot creation in the other case there are a lot of possible > troubles if native AIO mode is enabled for disk. > > - the command can hang (HMP thread) with missed wakeup (the operation is > actuall

[Qemu-devel] [PATCH v4 17/21] atapi: Account for failed and invalid operations

2015-10-28 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- hw/ide/atapi.c | 31 +++ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/hw/ide/atapi.c b/hw/ide/atapi.c index 747f466..cf0b78e 100644 --- a/hw/ide/atapi.c +++ b/hw/ide/atapi.c @@ -108,27 +108,30 @@ static void cd_data_

[Qemu-devel] [PATCH v4 12/21] block: Use QEMU_CLOCK_VIRTUAL for the accounting code in qtest mode

2015-10-28 Thread Alberto Garcia
This patch switches to QEMU_CLOCK_VIRTUAL for the accounting code in qtest mode, and makes the latency of the operation constant. This way we can perform tests on the accounting code with reproducible results. Signed-off-by: Alberto Garcia --- block/accounting.c | 14 ++ 1 file chang

[Qemu-devel] [PATCH 2/2] dataplane: support non-contigious s/g

2015-10-28 Thread Michael S. Tsirkin
bring_map currently fails if one of the entries it's mapping is contigious in GPA but not HVA address space. Introduce a mapped_len parameter so it can handle this, returning the actual mapped length. This will still fail if there's no space left in the sg, but luckily max queue size in use is cu

Re: [Qemu-devel] [Consult] tilegx: About floating point instructions

2015-10-28 Thread Chen Gang
Oh, sorry, After reference another documents (about sw_64 arch floating point introduction), I know, 0x7f is fsingle exp '0' (no move), 0x3ff is fdouble exp '0' (no move). And for fdouble, we still can calculate the real value base on qemu soft fpu, so can simplify many details. So for me, the re

[Qemu-devel] [PATCH v4 19/21] macio: Account for failed operations

2015-10-28 Thread Alberto Garcia
Signed-off-by: Alberto Garcia --- hw/ide/macio.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/hw/ide/macio.c b/hw/ide/macio.c index 893c9b9..3ee962f 100644 --- a/hw/ide/macio.c +++ b/hw/ide/macio.c @@ -286,7 +286,11 @@ static void pmac_ide_atapi_transfer_cb(vo

Re: [Qemu-devel] [PULL 0/2] target-i386: Finally enable "check" mode by default

2015-10-28 Thread Peter Maydell
On 28 October 2015 at 14:15, Eduardo Habkost wrote: > We now have fixed the issues that caused unnecessary warnings in TCG mode and > on "make check", and I am applying the check-mode patch again. > > The following changes since commit 7e038b94e74e1c2d1b3598e2e4b0b5c8b79a7278: > > Merge remote-t

Re: [Qemu-devel] [PATCH 4/4] migration: add missed aio_context_acquire into HMP snapshot code

2015-10-28 Thread Denis V. Lunev
On 10/28/2015 06:33 PM, Juan Quintela wrote: "Denis V. Lunev" wrote: aio_context should be locked in the similar way as was done in QMP snapshot creation in the other case there are a lot of possible troubles if native AIO mode is enabled for disk. - the command can hang (HMP thread) with miss

Re: [Qemu-devel] [PATCH] block: Consider all child nodes in bdrv_requests_pending()

2015-10-28 Thread Stefan Hajnoczi
On Wed, Oct 28, 2015 at 11:46:51AM +0100, Kevin Wolf wrote: > The function manually recursed into bs->file and bs->backing to check > whether there were any requests pending, but it ignored other children. > > There's no need to special case file and backing here, so just replace > these two expli

Re: [Qemu-devel] [PATCH for-2.5 v1 3/4] arm: highbank: Implement PSCI and dummy monitor

2015-10-28 Thread Peter Crosthwaite
On Wed, Oct 28, 2015 at 5:10 AM, Peter Maydell wrote: > On 27 October 2015 at 20:29, Rob Herring wrote: > > Thanks for doing this. I'm not a big fan of how the machine code for > > boot code is embedded into C in qemu, but that's a separate issue. > > FWIW, I'm becoming increasingly unhappy with

Re: [Qemu-devel] [PATCH v5 27/33] nvdimm acpi: support function 0

2015-10-28 Thread Stefan Hajnoczi
On Wed, Oct 28, 2015 at 10:26:25PM +, Xiao Guangrong wrote: > __DSM is defined in ACPI 6.0: 9.14.1 _DSM (Device Specific Method) > > Function 0 is a query function. We do not support any function on root > device and only 3 functions are support for NVDIMM device, Get Namespace > Label Size, G

Re: [Qemu-devel] [PATCH v5 28/33] nvdimm acpi: support Get Namespace Label Size function

2015-10-28 Thread Stefan Hajnoczi
On Wed, Oct 28, 2015 at 10:26:26PM +, Xiao Guangrong wrote: > +struct nvdimm_func_in_get_label_data { > +uint32_t offset; /* the offset in the namespace label data area. */ > +uint32_t length; /* the size of data is to be read via the function. */ > +} QEMU_PACKED; > +typedef struct nvd

Re: [Qemu-devel] [PATCH for-2.5 v1 3/4] arm: highbank: Implement PSCI and dummy monitor

2015-10-28 Thread Peter Maydell
On 28 October 2015 at 16:35, Peter Crosthwaite wrote: > > > On Wed, Oct 28, 2015 at 5:10 AM, Peter Maydell > wrote: >> >> On 27 October 2015 at 20:29, Rob Herring wrote: >> > Thanks for doing this. I'm not a big fan of how the machine code for >> > boot code is embedded into C in qemu, but that'

Re: [Qemu-devel] Coding style for errors

2015-10-28 Thread Thomas Huth
On 23/10/15 19:02, Dr. David Alan Gilbert wrote: > * Stefan Hajnoczi (stefa...@gmail.com) wrote: >> On Thu, Oct 22, 2015 at 03:30:34PM +0200, Lluís Vilanova wrote: >>> Markus Armbruster writes: >>> Lluís Vilanova writes: >>> [...] > So, is there any agreement on what should be used? If so

Re: [Qemu-devel] [PATCH v5 29/33] nvdimm acpi: support Get Namespace Label Data function

2015-10-28 Thread Stefan Hajnoczi
On Wed, Oct 28, 2015 at 10:26:27PM +, Xiao Guangrong wrote: > +static void nvdimm_dsm_func_get_label_data(NVDIMMDevice *nvdimm, > + nvdimm_dsm_in *in, GArray *out) > +{ > +NVDIMMClass *nvc = NVDIMM_GET_CLASS(nvdimm); > +nvdimm_func_in_get_label_

Re: [Qemu-devel] [PATCH v5 30/33] nvdimm acpi: support Set Namespace Label Data function

2015-10-28 Thread Stefan Hajnoczi
On Wed, Oct 28, 2015 at 10:26:28PM +, Xiao Guangrong wrote: > +static void nvdimm_dsm_func_set_label_data(NVDIMMDevice *nvdimm, > + nvdimm_dsm_in *in, GArray *out) > +{ > +NVDIMMClass *nvc = NVDIMM_GET_CLASS(nvdimm); > +nvdimm_func_in_set_label_

[Qemu-devel] [PATCH 1/2] Revert "pc: memhp: force gaps between DIMM's GPA"

2015-10-28 Thread Michael S. Tsirkin
This reverts commit aa8580cddf011e8cedcf87f7a0fdea7549fc4704. As described in http://article.gmane.org/gmane.comp.emulators.qemu/371432 that commit causes linux guests to crash on memory hot-unplug. The original problem it's trying to solve has now been addressed within virtio. Signed-off-by: Mi

[Qemu-devel] [PATCH 2/2] Revert "memhp: extend address auto assignment to support gaps"

2015-10-28 Thread Michael S. Tsirkin
This reverts commit df0acded19ec4b826aa095cfc19d341bd66fafd3. There's no point to it now that the only user has been reverted. Signed-off-by: Michael S. Tsirkin --- include/hw/mem/pc-dimm.h | 7 +++ hw/i386/pc.c | 3 +-- hw/mem/pc-dimm.c | 15 ++- hw/ppc/sp

[Qemu-devel] [PATCH v8 03/17] qapi: Provide nicer array names in introspection

2015-10-28 Thread Eric Blake
For the sake of humans reading introspection output, it is nice to have the name of implicit array types be recognizable as arrays of the underlying type. However, while this patch allows humans to skip from a command with return type "[123]" straight to the definition of type "123" without having

[Qemu-devel] [PATCH v8 06/17] qapi-types: Consolidate gen_struct() and gen_union()

2015-10-28 Thread Eric Blake
These two methods are now close enough that we can finally merge them, relying on the fact that simple unions now provide a reasonable local_members. Change gen_struct() to gen_object() that handles all forms of QAPISchemaObjectType, and rename and shrink gen_union() to gen_variants() to handle th

[Qemu-devel] [PATCH v8 00/17] alternate layout (post-introspection cleanups, subset C)

2015-10-28 Thread Eric Blake
Pending prerequisite: Markus' qapi-next branch git://repo.or.cz/qemu/armbru.git qapi-next https://lists.gnu.org/archive/html/qemu-devel/2015-10/msg06417.html Also available as a tag at this location: git fetch git://repo.or.cz/qemu/ericb.git qapi-cleanupv8c as well as part of my branch with the r

[Qemu-devel] [PATCH v8 05/17] qapi: Track simple union tag in object.local_members

2015-10-28 Thread Eric Blake
We were previously creating all unions with an empty list for local_members. However, it will make it easier to unify struct and union generation if we include the generated tag member in local_members. That way, we can have a common code pattern: visit the base (if any), visit the local members

[Qemu-devel] [PATCH v8 01/17] qapi: Use generated TestStruct machinery in tests

2015-10-28 Thread Eric Blake
Commit d88f5fd and friends first introduced the various test-qmp-* tests in 2011, with duplicated hand-rolled TestStruct machinery, to make sure the qapi visitor interface was tested. Later, commit 4f193e3 in 2013 added a .json file for further testing use by the files, but without consolidating a

[Qemu-devel] [PATCH v8 08/17] qapi: Remove outdated tests related to QMP/branch collisions

2015-10-28 Thread Eric Blake
Now that branches are in a separate C namespace, we can remove the restrictions in the parser that claim a branch name would collide with QMP, and delete the negative tests that are no longer problematic. A separate patch can then add positive tests to qapi-schema-test to test that any corner case

[Qemu-devel] [PATCH v8 09/17] qapi: Add positive tests to qapi-schema-test

2015-10-28 Thread Eric Blake
Add positive tests to qapi-schema-test for things that were made possible by recent patches but which caused compile errors due to collisions prior to that point. This includes: Use of a member 'base' in a struct with a base class Use of a member name ending in 'Kind' or 'List' Use of a type name

[Qemu-devel] [PATCH v8 14/17] qapi: Simplify error testing in test-qmp-*

2015-10-28 Thread Eric Blake
By using &error_abort, we can avoid a local err variable in situations where we expect success. By moving err into data, we can let test teardown take care of cleaning up any collected error (and allowing for fewer lines of code between repeated tests where init runs teardown on our behalf). Sign

[Qemu-devel] [PATCH v8 13/17] qapi: Plug leaks in test-qmp-*

2015-10-28 Thread Eric Blake
Make valgrind happy with the current state of the tests, so that it is easier to see if future patches introduce new memory problems without being drowned in noise. Many of the leaks were due to calling a second init without tearing down the data from an earlier visit. But since teardown is alrea

[Qemu-devel] [PATCH v8 02/17] qapi: Strengthen test of TestStructList

2015-10-28 Thread Eric Blake
Make each list element different, to ensure that order is preserved, and use the generated free function instead of hand-rolling our own to ensure (under valgrind) that the list is properly cleaned. Suggested-by: Markus Armbruster Signed-off-by: Eric Blake --- v8: no change v7: new patch --- t

[Qemu-devel] [PATCH v8 07/17] qapi: Rework collision assertions

2015-10-28 Thread Eric Blake
Now that we have separate namespaces for QMP vs. tag values, we can simplify how the QAPISchema*.check() methods check for collisions. Each QAPISchemaObjectTypeMember check() call is given a single set of names it must not collide with; this set is either the QMP names (when this member is used by

[Qemu-devel] [PATCH v2 3/4] fw_cfg: remove offset argument from callback prototype

2015-10-28 Thread Gabriel L. Somlo
Read callbacks are now only invoked at item selection, before any data is read. As such, the value of the offset argument passed to the callback will always be 0. Also, the two callback instances currently in use both leave their offset argument unused. This patch removes the offset argument from

[Qemu-devel] [PATCH v8 16/17] qapi: More tests of input arrays

2015-10-28 Thread Eric Blake
Our testsuite had no coverage of empty arrays, nor of what happens when the input does not match the expected type. Useful to have, especially if we start changing the visitor contracts. Signed-off-by: Eric Blake --- v8: no change v7: no change v6: new patch --- tests/test-qmp-input-visitor.c |

[Qemu-devel] [PATCH v8 04/17] qapi-introspect: Guarantee particular sorting

2015-10-28 Thread Eric Blake
Sorting the values of an enum makes it easier to look up whether a particular value is present, via binary rather than linear search (probably most visible with QKeyCode, which has grown over several releases). Additionally, QMP clients need not know which C value is associated with an enum name,

[Qemu-devel] [PATCH v8 10/17] qapi: Simplify visiting of alternate types

2015-10-28 Thread Eric Blake
Previously, working with alternates required two enums, and some indirection: for type Foo, we created Foo_qtypes[] which maps each qtype to a member of FooKind_lookup[], then use FooKind_lookup[] like we do for other union types. This has a subtle bug: since the values of FooKind_lookup start at

[Qemu-devel] [PATCH v2 2/4] fw_cfg: amend callback behavior spec to once per select

2015-10-28 Thread Gabriel L. Somlo
Currently, the fw_cfg internal API specifies that if an item was set up with a read callback, the callback must be run each time a byte is read from the item. This behavior is both wasteful (most items do not have a read callback set), and impractical for bulk transfers (e.g., DMA read). At the ti

<    1   2   3   4   >