Re: [Qemu-devel] [sheepdog] [PATCH] sheepdog: selectable object size support

2015-01-16 Thread Teruaki Ishizaki
Hi Hitoshi, Thanks for your check. (2015/01/15 15:05), Hitoshi Mitake wrote: At Tue, 13 Jan 2015 17:41:12 +0900, Teruaki Ishizaki wrote: Previously, qemu block driver of sheepdog used hard-coded VDI object size. This patch enables users to handle block_size_shift value for calculating VDI

[Qemu-devel] [PATCH] qtest: Fix deadloop by running main loop AIO context's timers

2015-01-16 Thread Fam Zheng
qemu_clock_run_timers() only takes care of main_loop_tlg, we shouldn't forget aio timer list groups. Currently, the qemu_clock_deadline_ns_all (a few lines above) counts all the timergroups of this clock type, including aio tlg, but we don't fire them, so they are never cleared, which makes a

Re: [Qemu-devel] [RFC PATCH 2/4] pcie-aer: Fix command pcie_aer_inject_error is invalid

2015-01-16 Thread Chen Fan
On 01/12/2015 09:56 PM, Marcel Apfelbaum wrote: On 01/12/2015 05:04 AM, Chen Fan wrote: in spec PCI Express 3.0 section 6.2.6 Figure 6-3 virtual bridge part, the flowchart showing tell us SERR# enable at Bridge Control register associate with system error at Secondary Status register can send

Re: [Qemu-devel] [RFC PATCH v7 12/21] replay: recording and replaying clock ticks

2015-01-16 Thread Pavel Dovgaluk
From: Paolo Bonzini [mailto:pbonz...@redhat.com] On 13/01/2015 10:21, Pavel Dovgaluk wrote: +/*! Reads next clock event from the input. */ +int64_t replay_read_clock(unsigned int kind) +{ +if (kind = REPLAY_CLOCK_COUNT) { +fprintf(stderr, invalid clock ID %d for

Re: [Qemu-devel] global_mutex and multithread.

2015-01-16 Thread Jan Kiszka
On 2015-01-16 08:25, Mark Burton wrote: On 15 Jan 2015, at 22:41, Paolo Bonzini pbonz...@redhat.com wrote: On 15/01/2015 21:53, Mark Burton wrote: Jan said he had it working at least on ARM (MusicPal). yeah - our problem is when we enable multi-threads - which I dont believe Jan did…

Re: [Qemu-devel] [PATCH v3 3/9] rocker: add register programming guide

2015-01-16 Thread Scott Feldman
On Mon, Jan 12, 2015 at 3:40 AM, Paolo Bonzini pbonz...@redhat.com wrote: On 11/01/2015 04:57, sfel...@gmail.com wrote: +PCI Configuration Space +--- + +Each switch instance registers as a PCI device with PCI configuration space: + + offset width description

Re: [Qemu-devel] [PATCH v7] block/raw-posix.c: Fixes raw_getlength() on Mac OS X so that it reports the correct length of a real CD

2015-01-16 Thread Markus Armbruster
Programmingkid programmingk...@gmail.com writes: This patch allows Mac OS X to use a real CDROM disc in QEMU. Testing this patch will require using QEMU v2.2.0 because the current git version has a bug in it that prevents /dev/cdrom from being used. make check did pass and my Debian boot

Re: [Qemu-devel] global_mutex and multithread.

2015-01-16 Thread Frederic Konrad
On 16/01/2015 09:07, Jan Kiszka wrote: On 2015-01-16 08:25, Mark Burton wrote: On 15 Jan 2015, at 22:41, Paolo Bonzini pbonz...@redhat.com wrote: On 15/01/2015 21:53, Mark Burton wrote: Jan said he had it working at least on ARM (MusicPal). yeah - our problem is when we enable

[Qemu-devel] [PATCH v5 1/5] qemu-io: Account IO by aio_read and aio_write

2015-01-16 Thread Fam Zheng
This will enable accounting of aio requests issued from qemu-io aio read/write commands. Signed-off-by: Fam Zheng f...@redhat.com --- qemu-io-cmds.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/qemu-io-cmds.c b/qemu-io-cmds.c index e708552..29377cd 100644 --- a/qemu-io-cmds.c

[Qemu-devel] [PATCH v5 0/5] block: Add a qemu-iotests case for IO throttling

2015-01-16 Thread Fam Zheng
v5: Rebase and improve the test. Please review again. Patch dependencies: This test depends on the qtest timer fix to run correctly. http://lists.gnu.org/archive/html/qemu-devel/2015-01/msg01865.html Also depends on the os check fix to run at all:

[Qemu-devel] [PATCH v5 2/5] qtest: Add scripts/qtest.py

2015-01-16 Thread Fam Zheng
This adds scripts/qtest.py as a python library for qtest protocol. This is a skeleton with a basic cmd method to execute a command, reading and parsing of qtest output could be added later on demand. Signed-off-by: Fam Zheng f...@redhat.com --- scripts/qtest.py | 71

[Qemu-devel] [PATCH v5 4/5] qemu-iotests: Allow caller to disable underscore convertion for qmp

2015-01-16 Thread Fam Zheng
QMP command block_set_io_throttle expects underscores in parameters instead of dashes: {iops,bps}_{rd,wr,max}. Add optional argument conv_keys (defaults to True, backward compatible), it will be used in IO throttling test case. Reviewed-by: Benoit Canet ben...@irqsave.net Signed-off-by: Fam

[Qemu-devel] [PATCH v5 5/5] qemu-iotests: Add 093 for IO throttling

2015-01-16 Thread Fam Zheng
This case utilizes qemu-io command aio_{read,write} -q to verify the effectiveness of IO throttling options. It's implemented by driving the vm timer from qtest protocol, so the throttling timers are signaled with determinied time duration. Then we verify the completed IO requests are within 10%

[Qemu-devel] [PATCH v5 3/5] qemu-iotests: Add VM method qtest() to iotests.py

2015-01-16 Thread Fam Zheng
This will allow test case to run command in qtest protocol. It's write-only for now. Signed-off-by: Fam Zheng f...@redhat.com --- tests/qemu-iotests/iotests.py | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/iotests.py

[Qemu-devel] [PATCH v4 02/10] virtio-net: use qemu_mac_strdup_printf

2015-01-16 Thread sfeldma
From: Scott Feldman sfel...@gmail.com Signed-off-by: Scott Feldman sfel...@gmail.com --- hw/net/virtio-net.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c index 45da34a..698156f 100644 --- a/hw/net/virtio-net.c +++

[Qemu-devel] [PATCH v4 00/10] rocker: add new rocker ethernet switch device

2015-01-16 Thread sfeldma
From: Scott Feldman sfel...@gmail.com v4: - Per Paolo Bonzini review: - move reg_guide.txt to docs/specs/rocker.txt - fix some spelling/grammer mistakes in the rocker.txt doc - fix some misleading/wrong statements in rocker.txt - add double 4-byte access for 64-bit registers

[Qemu-devel] [PATCH v4 08/10] rocker: add tests

2015-01-16 Thread sfeldma
From: Scott Feldman sfel...@gmail.com Add some basic test for rocker to test L2/L3/L4 functionality. Requires an external test environment, simp, located here: https://github.com/scottfeldman/simp To run tests, simp environment must be installed and a suitable VM image built and installed with

[Qemu-devel] [PATCH v4 07/10] qmp: add rocker device support

2015-01-16 Thread sfeldma
From: Scott Feldman sfel...@gmail.com Add QMP/HMP support for rocker devices. This is mostly for debugging purposes to see inside the device's tables and port configurations. Some examples: (qemu) info rocker sw1 name: sw1 id: 0x013512005452 ports: 4 (qemu) info rocker-ports sw1

[Qemu-devel] [PATCH v4 04/10] pci: add rocker device ID

2015-01-16 Thread sfeldma
From: Scott Feldman sfel...@gmail.com Signed-off-by: Scott Feldman sfel...@gmail.com Signed-off-by: Jiri Pirko j...@resnulli.us --- docs/specs/pci-ids.txt |1 + include/hw/pci/pci.h |1 + 2 files changed, 2 insertions(+) diff --git a/docs/specs/pci-ids.txt b/docs/specs/pci-ids.txt

[Qemu-devel] [PATCH v4 01/10] net: add MAC address string printer

2015-01-16 Thread sfeldma
From: Scott Feldman sfel...@gmail.com We can use this in virtio-net code as well as new Rocker driver code, so up-level this. Signed-off-by: Scott Feldman sfel...@gmail.com --- include/net/net.h |1 + net/net.c |7 +++ 2 files changed, 8 insertions(+) diff --git

[Qemu-devel] [PATCH v4 05/10] pci: add network device class 'other' for network switches

2015-01-16 Thread sfeldma
From: Scott Feldman sfel...@gmail.com Rocker is an ethernet switch device, so add 'other' network device class as defined by PCI to cover these types of devices. Signed-off-by: Scott Feldman sfel...@gmail.com Signed-off-by: Jiri Pirko j...@resnulli.us --- include/hw/pci/pci_ids.h |1 + 1

[Qemu-devel] [PATCH v4 03/10] rocker: add register programming guide

2015-01-16 Thread sfeldma
From: Scott Feldman sfel...@gmail.com This is the register programming guide for the Rocker device. It's intended for driver writers and device writers. It covers the device's PCI space, the register set, DMA interface, and interrupts. Signed-off-by: Scott Feldman sfel...@gmail.com

[Qemu-devel] [PATCH v4 09/10] MAINTAINERS: add rocker

2015-01-16 Thread sfeldma
From: Scott Feldman sfel...@gmail.com Signed-off-by: Scott Feldman sfel...@gmail.com Signed-off-by: Jiri Pirko j...@resnulli.us --- MAINTAINERS |6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 430688d..8b6f8d4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS

[Qemu-devel] [PATCH v4 10/10] rocker: timestamp on the debug logs helps correlate with events in the VM

2015-01-16 Thread sfeldma
From: David Ahern dsah...@gmail.com Signed-off-by: David Ahern dsah...@gmail.com Signed-off-by: Scott Feldman sfel...@gmail.com --- hw/net/rocker/rocker.h | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/hw/net/rocker/rocker.h b/hw/net/rocker/rocker.h index

Re: [Qemu-devel] global_mutex and multithread.

2015-01-16 Thread Mark Burton
On 16 Jan 2015, at 09:07, Jan Kiszka jan.kis...@siemens.com wrote: On 2015-01-16 08:25, Mark Burton wrote: On 15 Jan 2015, at 22:41, Paolo Bonzini pbonz...@redhat.com wrote: On 15/01/2015 21:53, Mark Burton wrote: Jan said he had it working at least on ARM (MusicPal). yeah - our

Re: [Qemu-devel] [PATCH 1/4] configure: opengl overhaul

2015-01-16 Thread Gerd Hoffmann
Hi, +# opengl probe, used by milkymist-tmu2 Maybe remove this part of the comment about milkymist? Will do. +if test $opengl != no ; then + opengl_pkgs=gl + if $pkg_config $opengl_pkgs; then +opengl_libs=$($pkg_config --libs $opengl_pkgs) -lX11 +opengl=yes

Re: [Qemu-devel] [virtio] virtqueue allocation and thread-safety

2015-01-16 Thread Vasile Catalin-B50542
Does the guest memory allocation include the descriptor tables allocation? Which part of the structures is the descriptor tables? On 15.01.2015 03:41, Fam Zheng wrote: On Wed, 01/14 14:01, Vasile Catalin-B50542 wrote: Hi, I'm trying to make a new virtio device. I got it running (I made a

Re: [Qemu-devel] [PATCH v3 6/9] rocker: add new rocker switch device

2015-01-16 Thread Jason Wang
On 01/11/2015 11:57 AM, sfel...@gmail.com wrote: From: Scott Feldman sfel...@gmail.com Rocker is a simulated ethernet switch device. The device supports up to 62 front-panel ports and supports L2 switching and L3 routing functions, as well as L2/L3/L4 ACLs. The device presents a single PCI

Re: [Qemu-devel] [PATCH] s390x/pci: fix 2 bugs found by coverity

2015-01-16 Thread Cornelia Huck
On Wed, 14 Jan 2015 16:20:47 +0100 Frank Blaschka blasc...@linux.vnet.ibm.com wrote: Signed-off-by: Frank Blaschka blasc...@linux.vnet.ibm.com --- hw/s390x/s390-pci-bus.c | 1 + hw/s390x/s390-pci-inst.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) Applied with a slightly

Re: [Qemu-devel] [PATCH 2/4] console: add opengl rendering helper functions

2015-01-16 Thread Gerd Hoffmann
Hi, +bool console_gl_check_format(DisplayChangeListener *dcl, + pixman_format_code_t format) +{ +switch (format) { +case PIXMAN_x8r8g8b8: +case PIXMAN_a8r8g8b8: +case PIXMAN_r5g6b5: +return true; +default: +

Re: [Qemu-devel] [PATCH v3 7/9] qmp: add rocker device support

2015-01-16 Thread Jason Wang
On 01/11/2015 11:57 AM, sfel...@gmail.com wrote: From: Scott Feldman sfel...@gmail.com Add QMP/HMP support for rocker devices. This is mostly for debugging purposes to see inside the device's tables and port configurations. Some examples: (qemu) info rocker sw1 name: sw1 id:

Re: [Qemu-devel] [PATCH v3 6/9] rocker: add new rocker switch device

2015-01-16 Thread Scott Feldman
On Fri, Jan 16, 2015 at 1:15 AM, Jason Wang jasow...@redhat.com wrote: On 01/11/2015 11:57 AM, sfel...@gmail.com wrote: Each port is a netdev and can be paired with using -netdev id=port name. Signed-off-by: Scott Feldman sfel...@gmail.com Signed-off-by: Jiri Pirko j...@resnulli.us ---

Re: [Qemu-devel] [PATCH v3 7/9] qmp: add rocker device support

2015-01-16 Thread Scott Feldman
On Fri, Jan 16, 2015 at 1:26 AM, Jason Wang jasow...@redhat.com wrote: On 01/11/2015 11:57 AM, sfel...@gmail.com wrote: From: Scott Feldman sfel...@gmail.com Add QMP/HMP support for rocker devices. This is mostly for debugging purposes to see inside the device's tables and port

Re: [Qemu-devel] kvmclock, Migration, and NTP clock jitter

2015-01-16 Thread Mohammed Gamal
On Thu, Jan 15, 2015 at 06:27:54PM +0100, Paolo Bonzini wrote: On 15/01/2015 17:39, Mohammed Gamal wrote: The increase in the jitter and offset values is well within the 500 ppm frequency tolerance limit, and therefore are easily corrected by subsequent NTP clock sync events, but some

Re: [Qemu-devel] [PATCH 3/8] rcu: add rcutorture

2015-01-16 Thread Paolo Bonzini
On 16/01/2015 03:04, Fam Zheng wrote: On Tue, 01/13 18:52, Paolo Bonzini wrote: +int main(int argc, char *argv[]) +{ +int nreaders = 1; +int duration = 1; + +if (argc = 2 argv[1][0] == '-') { +g_test_init(argc, argv, NULL); +

Re: [Qemu-devel] [PULL] migration patches

2015-01-16 Thread Peter Maydell
On 16 January 2015 at 07:47, Amit Shah amit.s...@redhat.com wrote: The following changes since commit df58887b20fab8fe8a6dcca4db30cd4e4077d53a: Merge remote-tracking branch 'remotes/mjt/tags/pull-trivial-patches-2015-01-15' into staging (2015-01-15 10:08:46 +) are available in the

[Qemu-devel] [PULL 1/2] target-arm: crypto: fix BE host support

2015-01-16 Thread Peter Maydell
From: Ard Biesheuvel ard.biesheu...@linaro.org The crypto emulation code in target-arm/crypto_helper.c never worked correctly on big endian hosts, due to the fact that it uses a union of array types to convert between the native VFP register size (64 bits) and the types used in the algorithms

[Qemu-devel] [PULL 0/2] target-arm queue

2015-01-16 Thread Peter Maydell
repository at: git://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20150116 for you to fetch changes up to 36b62ae6a58f9a588fd33be9386e18a2b90103f5: fw_cfg: fix endianness in fw_cfg_data_mem_read() / _write() (2015-01-16 11:54:30 +

[Qemu-devel] [PULL 2/2] fw_cfg: fix endianness in fw_cfg_data_mem_read() / _write()

2015-01-16 Thread Peter Maydell
From: Laszlo Ersek ler...@redhat.com (1) Let's contemplate what device endianness means, for a memory mapped device register (independently of QEMU -- that is, on physical hardware). It determines the byte order that the device will put on the data bus when the device is producing a *numerical

Re: [Qemu-devel] Multi GPU passthrough via VFIO

2015-01-16 Thread Maik Broemme
Hi Alex, Maik Broemme mbroe...@parallels.com wrote: Hi Alex, Maik Broemme mbroe...@parallels.com wrote: Hi Alex, Alex Williamson alex.william...@redhat.com wrote: On Fri, 2014-02-14 at 01:01 +0100, Maik Broemme wrote: Hi Alex, Maik Broemme mbroe...@parallels.com wrote:

Re: [Qemu-devel] [PULL 0/2] target-arm queue

2015-01-16 Thread Peter Maydell
-2.3-1' into staging (2015-01-16 10:16:14 +) are available in the git repository at: git://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20150116 for you to fetch changes up to 36b62ae6a58f9a588fd33be9386e18a2b90103f5: fw_cfg: fix endianness

Re: [Qemu-devel] [PATCH 7/9] block-migration: remove not needed iothread lock

2015-01-16 Thread Vladimir Sementsov-Ogievskiy
On 09.01.2015 00:24, John Snow wrote: On 12/11/2014 09:17 AM, Vladimir Sementsov-Ogievskiy wrote: Instead of locking iothread, we can just swap these calls. So, if some write to our range occures before resetting the bitmap, then it will get into subsequent aio read, becouse it occures, in

Re: [Qemu-devel] [PATCH 7/9] block-migration: remove not needed iothread lock

2015-01-16 Thread Vladimir Sementsov-Ogievskiy
Best regards, Vladimir On 09.01.2015 01:28, Paolo Bonzini wrote: On 11/12/2014 15:17, Vladimir Sementsov-Ogievskiy wrote: -qemu_mutex_lock_iothread(); +bdrv_reset_dirty_bitmap(bs, bmds-dirty_bitmap, cur_sector, nr_sectors); + blk-aiocb = bdrv_aio_readv(bs, cur_sector, blk-qiov,

Re: [Qemu-devel] [PATCH 0/8] RCUification of the memory API, part 1

2015-01-16 Thread Christian Borntraeger
Am 13.01.2015 um 18:52 schrieb Paolo Bonzini: These are the minimal changes to adopt RCU and use it in memory_region_find (and hence in virtio-blk-dataplane). Looks big, but two thirds of it is documentation and tests. Please review! :) Really Nice. This gives me a boost from 1000MB/sec

Re: [Qemu-devel] [PATCH v2] qemu-iotests: Fix supported_oses check

2015-01-16 Thread Stefan Hajnoczi
On Fri, Jan 16, 2015 at 09:38:42AM +0800, Fam Zheng wrote: There is a bug in the recently added sys.platform test, and we no longer run python tests, because linux2 is the value to compare here. So do a prefix match. According to python doc [1], the way to use sys.platform is unless you want

Re: [Qemu-devel] [PATCH v3 0/2] buildsys: Fix and enable module build

2015-01-16 Thread Stefan Hajnoczi
On Fri, Jan 16, 2015 at 09:54:05AM +0800, Fam Zheng wrote: v3: Fix commit message, error message and function name. (Stefan) Fam Zheng (2): configure: Default to enable module build .travis.yml: Add --disable-modules .travis.yml | 3 ++ configure | 95

Re: [Qemu-devel] [PATCH] qtest: Fix deadloop by running main loop AIO context's timers

2015-01-16 Thread Stefan Hajnoczi
On Fri, Jan 16, 2015 at 04:01:17PM +0800, Fam Zheng wrote: qemu_clock_run_timers() only takes care of main_loop_tlg, we shouldn't forget aio timer list groups. Currently, the qemu_clock_deadline_ns_all (a few lines above) counts all the timergroups of this clock type, including aio tlg, but

Re: [Qemu-devel] [PATCH] Add 'setup' phase to docs for query-migrate QMP command

2015-01-16 Thread Eric Blake
On 12/12/2014 07:14 AM, Alex Bligh wrote: The QMP command 'query-migrate' returns the state 'setup' during the setup phase. This patch documents it. Signed-off-by: Alex Bligh a...@alex.org.uk --- qmp-commands.hx | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-)

Re: [Qemu-devel] [PATCH 1/2] tcg-aarch64: user doesn't need R/W access to exec

2015-01-16 Thread Peter Maydell
On 13 January 2015 at 15:48, Andrew Jones drjo...@redhat.com wrote: Table D4-32 shows that execute access from EL0 doesn't depend on AP[1]. This commit message is a bit sparse, which confused me for a bit. It would be worth beefing it up a bit: target-arm: 64-bit EL0 code can execute from

Re: [Qemu-devel] [PATCH 2/4] console: add opengl rendering helper functions

2015-01-16 Thread Max Reitz
On 2015-01-16 at 04:21, Gerd Hoffmann wrote: Hi, +bool console_gl_check_format(DisplayChangeListener *dcl, + pixman_format_code_t format) +{ +switch (format) { +case PIXMAN_x8r8g8b8: +case PIXMAN_a8r8g8b8: +case PIXMAN_r5g6b5: +return

Re: [Qemu-devel] [PATCH v11 03/13] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2015-01-16 Thread Max Reitz
On 2015-01-12 at 11:30, John Snow wrote: From: Fam Zheng f...@redhat.com The new command pair is added to manage user created dirty bitmap. The dirty bitmap's name is mandatory and must be unique for the same device, but different devices can have bitmaps with the same names. The granularity

[Qemu-devel] [PULL 09/16] block/dmg: fix sector data offset calculation

2015-01-16 Thread Stefan Hajnoczi
From: Peter Wu pe...@lekensteyn.nl This patch addresses two issues: - The data fork offset was not taken into account, resulting in failure to read an InstallESD.dmg file (5164763151 bytes) which had a non-zero DataForkOffset field. - The offset of the previous block (partition) was

Re: [Qemu-devel] [v3 4/5] Qemu-Xen-vTPM: Qemu vTPM xenstubdoms backen.

2015-01-16 Thread Xu, Quan
-Original Message- From: Stefan Berger [mailto:stef...@linux.vnet.ibm.com] Sent: Thursday, January 15, 2015 11:49 PM To: Xu, Quan; qemu-devel@nongnu.org Cc: stefano.stabell...@eu.citrix.com; xen-de...@lists.xen.org Subject: Re: [Qemu-devel] [v3 4/5] Qemu-Xen-vTPM: Qemu vTPM

[Qemu-devel] [PULL 00/16] Block patches

2015-01-16 Thread Stefan Hajnoczi
The following changes since commit df58887b20fab8fe8a6dcca4db30cd4e4077d53a: Merge remote-tracking branch 'remotes/mjt/tags/pull-trivial-patches-2015-01-15' into staging (2015-01-15 10:08:46 +) are available in the git repository at: git://github.com/stefanha/qemu.git

[Qemu-devel] [PULL 02/16] block/dmg: properly detect the UDIF trailer

2015-01-16 Thread Stefan Hajnoczi
From: Peter Wu pe...@lekensteyn.nl DMG files have a variable length with a UDIF trailer at the end of a file. This UDIF trailer is essential as it describes the contents of the image. At the moment however, the start of this trailer is almost always incorrect as bdrv_getlength() returns a

[Qemu-devel] [PULL 01/16] block: add event when disk usage exceeds threshold

2015-01-16 Thread Stefan Hajnoczi
From: Francesco Romani from...@redhat.com Managing applications, like oVirt (http://www.ovirt.org), make extensive use of thin-provisioned disk images. To let the guest run smoothly and be not unnecessarily paused, oVirt sets a disk usage threshold (so called 'high water mark') based on the

[Qemu-devel] [PULL 03/16] block/dmg: extract mish block decoding functionality

2015-01-16 Thread Stefan Hajnoczi
From: Peter Wu pe...@lekensteyn.nl Extract the mish block decoder such that this can be used for other formats in the future. A new DmgHeaderState struct is introduced to share state while decoding. The code is kept unchanged as much as possible, a fail label is added for example where a simple

[Qemu-devel] [PULL 14/16] qed: check for header size overflow

2015-01-16 Thread Stefan Hajnoczi
Header size is denoted in clusters. The maximum cluster size is 64 MB but there is no limit on header size. Check for uint32_t overflow in case the header size field has a whacky value. Signed-off-by: Stefan Hajnoczi stefa...@redhat.com Message-id:

[Qemu-devel] [PULL 06/16] block/dmg: validate chunk size to avoid overflow

2015-01-16 Thread Stefan Hajnoczi
From: Peter Wu pe...@lekensteyn.nl Previously the chunk size was not checked, allowing for a large memory allocation. This patch checks whether the chunks size is within the resource fork length, and whether the resource fork is below the trailer of the dmg file. Signed-off-by: Peter Wu

[Qemu-devel] [PULL 04/16] block/dmg: extract processing of resource forks

2015-01-16 Thread Stefan Hajnoczi
From: Peter Wu pe...@lekensteyn.nl Besides the offset, also read the resource length. This length is now used in the extracted function to verify the end of the resource fork against count from the resource fork. Instead of relying on the value of offset to conclude whether the resource fork is

[Qemu-devel] [PULL 12/16] block/dmg: support bzip2 block entry types

2015-01-16 Thread Stefan Hajnoczi
From: Peter Wu pe...@lekensteyn.nl This patch adds support for bzip2-compressed block entries as introduced with OS X 10.4 (source: https://en.wikipedia.org/wiki/Apple_Disk_Image). It was tested against a 5.2G OS X Yosemite installation image which stores the BLXX block in the XML property list

[Qemu-devel] [PULL 07/16] block/dmg: process XML plists

2015-01-16 Thread Stefan Hajnoczi
From: Peter Wu pe...@lekensteyn.nl The format is simple enough to avoid using a full-blown XML parser. It assumes that all BLKX items begin with the mish magic word, therefore it is not a problem if other values get matched which are not a BLKX block. The offsets are based on the description at

[Qemu-devel] [PULL 08/16] block/dmg: set virtual size to a non-zero value

2015-01-16 Thread Stefan Hajnoczi
From: Peter Wu pe...@lekensteyn.nl Right now the virtual size is always reported as zero which makes it impossible to convert between formats. After this patch, the number of sectors will be read from the trailer (koly block). To verify the behavior, the output of `dmg2img foo.dmg foo.img` was

[Qemu-devel] [PULL 11/16] block/dmg: factor out block type check

2015-01-16 Thread Stefan Hajnoczi
From: Peter Wu pe...@lekensteyn.nl In preparation for adding bzip2 support, split the type check into a separate function. Make all offsets relative to the begin of a chunk such that it is easier to recognize the position without having to add up all offsets. Some comments are added to describe

[Qemu-devel] [PULL 05/16] block/dmg: process a buffer instead of reading ints

2015-01-16 Thread Stefan Hajnoczi
From: Peter Wu pe...@lekensteyn.nl As the decoded plist XML is not a pointer in the file, dmg_read_mish_block must be able to process a buffer instead of a file pointer. Since the full buffer must be processed, let's change the return value again to just a success flag. Signed-off-by: Peter Wu

[Qemu-devel] [PULL 16/16] qemu-iotests: Fix supported_oses check

2015-01-16 Thread Stefan Hajnoczi
From: Fam Zheng f...@redhat.com There is a bug in the recently added sys.platform test, and we no longer run python tests, because linux2 is the value to compare here. So do a prefix match. According to python doc [1], the way to use sys.platform is unless you want to test for a specific system

[Qemu-devel] [PULL 10/16] block/dmg: use SectorNumber from BLKX header

2015-01-16 Thread Stefan Hajnoczi
From: Peter Wu pe...@lekensteyn.nl Previously the sector table parsing relied on the previous offset of the DMG file. Now it uses the sector number from the BLKX header (see http://newosxbook.com/DMG.html). The implementation of dmg2img (from vu1tur) does not base the output sector on the

Re: [Qemu-devel] [PATCH v11 04/13] block: Introduce bdrv_dirty_bitmap_granularity()

2015-01-16 Thread Max Reitz
On 2015-01-12 at 11:30, John Snow wrote: From: Fam Zheng f...@redhat.com This returns the granularity (in bytes) of dirty bitmap, which matches the QMP interface and the existing query interface. Signed-off-by: Fam Zheng f...@redhat.com Signed-off-by: John Snow js...@redhat.com --- block.c

[Qemu-devel] [PULL 15/16] qemu-iotests: add 116 invalid QED input file tests

2015-01-16 Thread Stefan Hajnoczi
These tests exercise error code paths in the QED image format. The tests are very simple, they just prove that the error path exits cleanly. Signed-off-by: Stefan Hajnoczi stefa...@redhat.com Message-id: 1421065893-18875-3-git-send-email-stefa...@redhat.com Reviewed-by: Kevin Wolf

[Qemu-devel] [PULL 13/16] block/dmg: improve zeroes handling

2015-01-16 Thread Stefan Hajnoczi
From: Peter Wu pe...@lekensteyn.nl Disk images may contain large all-zeroes gaps (1.66k sectors or 812 MiB is seen in the real world). These blocks (type 2) do not need to be extracted into a temporary buffer, there is no need to allocate memory for these blocks nor to check its length. (For the

Re: [Qemu-devel] [PATCH v11 05/13] block: Add bdrv_clear_dirty_bitmap

2015-01-16 Thread Max Reitz
On 2015-01-12 at 11:30, John Snow wrote: Signed-off-by: Fam Zheng f...@redhat.com Signed-off-by: John Snow js...@redhat.com --- block.c | 24 include/block/block.h | 1 + 2 files changed, 21 insertions(+), 4 deletions(-) Reviewed-by: Max Reitz

Re: [Qemu-devel] [PATCH v11 06/13] hbitmap: add hbitmap_merge

2015-01-16 Thread Max Reitz
On 2015-01-12 at 11:30, John Snow wrote: We add a bitmap merge operation to assist in error cases where we wish to combine two bitmaps together. This is algorithmically O(bits) provided HBITMAP_LEVELS remains constant. For a full bitmap on a 64bit machine: sum(bits/64^k, k, 0, HBITMAP_LEVELS)

Re: [Qemu-devel] [PATCH 2/2] tcg-arm: more instruction execution control

2015-01-16 Thread Peter Maydell
On 13 January 2015 at 15:48, Andrew Jones drjo...@redhat.com wrote: Cleanup XN/PXN handling in get_phys_addr_lpae, and implement all but EL2 support of the following ARMv8 sections D4.5.1 Memory access control: Access permissions for instruction execution G4.7.2 Execute-never

Re: [Qemu-devel] [PATCH v11 07/13] qmp: Add block-dirty-bitmap-enable and block-dirty-bitmap-disable

2015-01-16 Thread Max Reitz
On 2015-01-12 at 11:30, John Snow wrote: From: Fam Zheng f...@redhat.com This allows to put the dirty bitmap into a disabled state where no more writes will be tracked. It will be used before backup or writing to persistent file. Signed-off-by: Fam Zheng f...@redhat.com Signed-off-by: John

Re: [Qemu-devel] Press Inquiry: Qemu Advent Calendar (German Linux Magazin)

2015-01-16 Thread Matthew Hungerford
Sounds awesome, will have to order some copies for our office. Sorry about the earlier email not being reply-all, was on mobile email and sent it incorrectly. Matthew Hungerford Pebble Firmware Engineer On Thu, Jan 15, 2015 at 1:18 PM, Tim Schürmann i...@tim-schuermann.de wrote: Hi Stefan,

Re: [Qemu-devel] [PULL 00/16] Block patches

2015-01-16 Thread Peter Maydell
On 16 January 2015 at 15:36, Stefan Hajnoczi stefa...@redhat.com wrote: The following changes since commit df58887b20fab8fe8a6dcca4db30cd4e4077d53a: Merge remote-tracking branch 'remotes/mjt/tags/pull-trivial-patches-2015-01-15' into staging (2015-01-15 10:08:46 +) are available in

Re: [Qemu-devel] [PATCH v11 03/13] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2015-01-16 Thread John Snow
On 01/16/2015 10:36 AM, Max Reitz wrote: On 2015-01-12 at 11:30, John Snow wrote: From: Fam Zheng f...@redhat.com The new command pair is added to manage user created dirty bitmap. The dirty bitmap's name is mandatory and must be unique for the same device, but different devices can have

Re: [Qemu-devel] [PATCH v11 03/13] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2015-01-16 Thread Max Reitz
On 2015-01-16 at 11:48, John Snow wrote: On 01/16/2015 10:36 AM, Max Reitz wrote: On 2015-01-12 at 11:30, John Snow wrote: From: Fam Zheng f...@redhat.com The new command pair is added to manage user created dirty bitmap. The dirty bitmap's name is mandatory and must be unique for the same

Re: [Qemu-devel] [PATCH v11 03/13] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2015-01-16 Thread John Snow
On 01/16/2015 11:51 AM, Max Reitz wrote: On 2015-01-16 at 11:48, John Snow wrote: On 01/16/2015 10:36 AM, Max Reitz wrote: On 2015-01-12 at 11:30, John Snow wrote: From: Fam Zheng f...@redhat.com The new command pair is added to manage user created dirty bitmap. The dirty bitmap's name

Re: [Qemu-devel] [PATCH v11 07/13] qmp: Add block-dirty-bitmap-enable and block-dirty-bitmap-disable

2015-01-16 Thread John Snow
On 01/16/2015 11:28 AM, Max Reitz wrote: On 2015-01-12 at 11:30, John Snow wrote: From: Fam Zheng f...@redhat.com This allows to put the dirty bitmap into a disabled state where no more writes will be tracked. It will be used before backup or writing to persistent file. Signed-off-by: Fam

[Qemu-devel] [RFC 03/10] replace spinlock by QemuMutex.

2015-01-16 Thread fred . konrad
From: KONRAD Frederic fred.kon...@greensocs.com spinlock is only used in two cases: * cpu-exec.c: to protect TranslationBlock * mem_helper.c: for lock helper in target-i386 (which seems broken). It's a pthread_mutex_t in user-mode so better using QemuMutex directly in this case. It allows as

[Qemu-devel] [RFC 01/10] target-arm: protect cpu_exclusive_*.

2015-01-16 Thread fred . konrad
From: KONRAD Frederic fred.kon...@greensocs.com This adds a lock to avoid multiple exclusive access at the same time in case of TCG multithread. Signed-off-by: KONRAD Frederic fred.kon...@greensocs.com V1 - V2: Removed qemu_mutex_destroy(). --- target-arm/cpu.c | 14 ++

[Qemu-devel] [RFC 08/10] Drop global lock during TCG code execution

2015-01-16 Thread fred . konrad
From: Jan Kiszka jan.kis...@siemens.com This finally allows TCG to benefit from the iothread introduction: Drop the global mutex while running pure TCG CPU code. Reacquire the lock when entering MMIO or PIO emulation, or when leaving the TCG loop. We have to revert a few optimization for the

[Qemu-devel] [RFC 04/10] remove unused spinlock.

2015-01-16 Thread fred . konrad
From: KONRAD Frederic fred.kon...@greensocs.com This just removes spinlock as it is not used anymore. Signed-off-by: KONRAD Frederic fred.kon...@greensocs.com --- include/exec/spinlock.h | 49 - scripts/checkpatch.pl | 9 ++--- 2 files

[Qemu-devel] [RFC 07/10] tcg: remove tcg_halt_cond global variable.

2015-01-16 Thread fred . konrad
From: KONRAD Frederic fred.kon...@greensocs.com This removes tcg_halt_cond global variable. We need one QemuCond per virtual cpu for multithread TCG. Signed-off-by: KONRAD Frederic fred.kon...@greensocs.com --- cpus.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-)

[Qemu-devel] [RFC 05/10] extract TBContext from TCGContext.

2015-01-16 Thread fred . konrad
From: KONRAD Frederic fred.kon...@greensocs.com In order to have one TCGContext per thread and a single TBContext we have to extract TBContext from TCGContext. Signed-off-by: KONRAD Frederic fred.kon...@greensocs.com --- cpu-exec.c| 18 ++--- linux-user/main.c | 6 ++---

[Qemu-devel] [RFC 09/10] cpu: remove exit_request global.

2015-01-16 Thread fred . konrad
From: KONRAD Frederic fred.kon...@greensocs.com This removes exit_request global and adds a variable in CPUState for this. Only the flag for the first cpu is used for the moment as we are still with one TCG thread. Signed-off-by: KONRAD Frederic fred.kon...@greensocs.com --- cpu-exec.c|

[Qemu-devel] [RFC 02/10] use a different translation block list for each cpu.

2015-01-16 Thread fred . konrad
From: KONRAD Frederic fred.kon...@greensocs.com We need a different TranslationBlock list for each core in case of multithread TCG. Signed-off-by: KONRAD Frederic fred.kon...@greensocs.com --- translate-all.c | 40 ++-- 1 file changed, 22 insertions(+), 18

[Qemu-devel] [RFC 10/10] tcg: switch on multithread.

2015-01-16 Thread fred . konrad
From: KONRAD Frederic fred.kon...@greensocs.com This switches on multithread. Signed-off-by: KONRAD Frederic fred.kon...@greensocs.com --- cpus.c | 85 +++--- 1 file changed, 30 insertions(+), 55 deletions(-) diff --git a/cpus.c

[Qemu-devel] [RFC 00/10] MultiThread TCG.

2015-01-16 Thread fred . konrad
From: KONRAD Frederic fred.kon...@greensocs.com Hi everybody, This is the start of our work on TCG multithread. We send it for comment to be sure we are taking the right direction. We already discussed the first patch but we keep it for simplicity. We choice to keep a common tbs array for all

[Qemu-devel] [RFC 06/10] protect TBContext with tb_lock.

2015-01-16 Thread fred . konrad
From: KONRAD Frederic fred.kon...@greensocs.com This protects TBContext with tb_lock to make tb_* thread safe. We can still have issue with tb_flush in case of multithread TCG: An other CPU can be executing code during a flush. This can be fixed later by making all other TCG thread exiting

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

2015-01-16 Thread John Snow
On 12/09/2014 01:15 PM, Dr. David Alan Gilbert (git) wrote: From: Dr. David Alan Gilbert dgilb...@redhat.com (With the previous atapi_dma flag recovery) If migration happens between the ATAPI command being written and the bmdma being started, the DMA is dropped. Eventually the guest times

Re: [Qemu-devel] [PATCH v11 09/13] qmp: Add support of dirty-bitmap sync mode for drive-backup

2015-01-16 Thread Max Reitz
On 2015-01-12 at 11:31, John Snow wrote: For dirty-bitmap sync mode, the block job will iterate through the given dirty bitmap to decide if a sector needs backup (backup all the dirty clusters and skip clean ones), just as allocation conditions of top sync mode. Signed-off-by: Fam Zheng

Re: [Qemu-devel] [PATCH v11 09/13] qmp: Add support of dirty-bitmap sync mode for drive-backup

2015-01-16 Thread John Snow
On 01/16/2015 12:52 PM, Max Reitz wrote: On 2015-01-12 at 11:31, John Snow wrote: For dirty-bitmap sync mode, the block job will iterate through the given dirty bitmap to decide if a sector needs backup (backup all the dirty clusters and skip clean ones), just as allocation conditions of top

[Qemu-devel] [PATCH] cpu_ldst.h: Don't define helpers if MMU_MODE*_SUFFIX not defined

2015-01-16 Thread Peter Maydell
Not all targets define a full set of suffix strings for the NB_MMU_MODES that they have. In this situation, don't define any helper functions for that mode, rather than defining helper functions with no suffix at all. The MMU mode is still functional; it is merely not directly accessible via

Re: [Qemu-devel] [PATCH v11 08/13] block: Add bitmap successors

2015-01-16 Thread John Snow
On 01/13/2015 04:24 AM, Fam Zheng wrote: On Mon, 01/12 11:31, John Snow wrote: A bitmap successor is an anonymous BdrvDirtyBitmap that is intended to be created just prior to a sensitive operation (e.g. Incremental Backup) that can either succeed or fail, but during the course of which we

Re: [Qemu-devel] [PATCH v7 05/32] target-arm: make arm_current_el() return EL3

2015-01-16 Thread Peter Maydell
On 21 October 2014 at 17:55, Greg Bellows greg.bell...@linaro.org wrote: From: Fabian Aggeler aggel...@ethz.ch Make arm_current_el() return EL3 for secure PL1 and monitor mode. Increase MMU modes since mmu_index is directly inferred from arm_ current_el(). Change assertion in arm_el_is_aa64()

Re: [Qemu-devel] [PATCH] cpu_ldst.h: Don't define helpers if MMU_MODE*_SUFFIX not defined

2015-01-16 Thread Richard Henderson
On 01/16/2015 10:13 AM, Peter Maydell wrote: Not all targets define a full set of suffix strings for the NB_MMU_MODES that they have. In this situation, don't define any helper functions for that mode, rather than defining helper functions with no suffix at all. The MMU mode is still

Re: [Qemu-devel] [PATCH 00/15] Clean up cpu-ldst ld/st memory accessors

2015-01-16 Thread Richard Henderson
On 01/15/2015 07:01 AM, Peter Maydell wrote: I was looking at our confusing mess of memory accessor functions, and I realised that partly it was confusing because we have a bunch of unnecessary junk lurking in there :-) This series attempts to clean things up by removing things we weren't

Re: [Qemu-devel] [PATCH v2] qemu-iotests: Fix supported_oses check

2015-01-16 Thread John Snow
On 01/16/2015 08:23 AM, Stefan Hajnoczi wrote: On Fri, Jan 16, 2015 at 09:38:42AM +0800, Fam Zheng wrote: There is a bug in the recently added sys.platform test, and we no longer run python tests, because linux2 is the value to compare here. So do a prefix match. According to python doc [1],

  1   2   >