Re: [Qemu-devel] [PATCH 02/20] target/arm: Don't switch to target stack early in v7M exception return

2017-10-06 Thread Richard Henderson
On 10/06/2017 09:22 AM, Peter Maydell wrote: > I'm going to change this part of the comment to read > * Compare the v8M ARM ARM pseudocode LookUpSP_with_security_mode(). > * Unlike that pseudocode, we require the caller to pass us in the > * SPSEL control bit value; this is because

Re: [Qemu-devel] [Qemu-arm] [PATCH 00/20] ARM v8M: exception entry, exit and security

2017-10-06 Thread Peter Maydell
On 22 September 2017 at 15:59, Peter Maydell wrote: > Another week, another set of v8M patches. > This lot adds: > * v8M and security extension changes in exception entry and exit > * the Security Attribution Unit > * SG and BLXNS instructions > * secure function

Re: [Qemu-devel] [PATCH 02/17] imx_fec: Do not calculate FEC

2017-10-06 Thread Peter Maydell
On 18 September 2017 at 20:50, Andrey Smirnov wrote: > Save some computation time and avoid calculating CRC's frame > > Cc: Peter Maydell > Cc: Jason Wang > Cc: qemu-devel@nongnu.org > Cc: qemu-...@nongnu.org > Cc:

Re: [Qemu-devel] [Qemu-block] Patch to add helpful tracing output for driver authors in NVMe emulation

2017-10-06 Thread Stefan Hajnoczi
On Fri, Oct 06, 2017 at 11:49:56AM +0200, Kevin Wolf wrote: > Am 06.10.2017 um 01:18 hat Doug Gale geschrieben: > > I added the tracing output in this patch to assist me in implementing > > an NVMe driver. It helped tremendously. > > > > From 1d19086cdef8d492929852d582cb41dcc5026f71 Mon Sep 17

Re: [Qemu-devel] [PATCH 15/17] include/qemu: Add sizes.h from Linux

2017-10-06 Thread Peter Maydell
On 18 September 2017 at 20:50, Andrey Smirnov wrote: > Add sizes.h from Linux to have a more readable way of specifying > MemoryRegion sizes. > > Cc: Peter Maydell > Cc: qemu-devel@nongnu.org > Cc: qemu-...@nongnu.org > Cc: yurov...@gmail.com >

Re: [Qemu-devel] [PATCH 09/17] imx_fec: Use correct length for packet size

2017-10-06 Thread Peter Maydell
On 18 September 2017 at 20:50, Andrey Smirnov wrote: > Use 'frame_size' instead of 'len' when calling qemu_send_packet(), > failing to do so results in malformed packets send in case when that > packed is fragmented into multiple DMA transactions. > > Cc: Peter Maydell

Re: [Qemu-devel] [PATCH v2 0/*] xen: xen-domid-restrict improvements

2017-10-06 Thread Ian Jackson
Ross Lagerwall writes ("Re: [PATCH v2 0/*] xen: xen-domid-restrict improvements"): > On 10/04/2017 05:18 PM, Ian Jackson wrote: > > However, there are changes to qemu needed. In particular > > > > * The -xen-domid-restrict option does not work properly right now. > > It only restricts a

[Qemu-devel] [PULL 15/54] dirty-bitmap: Change bdrv_[re]set_dirty_bitmap() to use bytes

2017-10-06 Thread Kevin Wolf
From: Eric Blake Some of the callers were already scaling bytes to sectors; others can be easily converted to pass byte offsets, all in our shift towards a consistent byte interface everywhere. Making the change will also make it easier to write the hold-out callers to use

[Qemu-devel] [PULL 32/54] qemu-iotests: merge "check" and "common"

2017-10-06 Thread Kevin Wolf
From: Paolo Bonzini "check" is full of qemu-iotests--specific details. Separating it from "common" does not make much sense anymore. Signed-off-by: Paolo Bonzini Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf

[Qemu-devel] [PULL 44/54] block: use 1 MB bounce buffers for crypto instead of 16KB

2017-10-06 Thread Kevin Wolf
From: "Daniel P. Berrange" Using 16KB bounce buffers creates a significant performance penalty for I/O to encrypted volumes on storage which high I/O latency (rotating rust & network drives), because it triggers lots of fairly small I/O operations. On tests with rotating

[Qemu-devel] [PULL 39/54] block: Uniform handling of 0-length bdrv_get_block_status()

2017-10-06 Thread Kevin Wolf
From: Eric Blake Handle a 0-length block status request up front, with a uniform return value claiming the area is not allocated. Most callers don't pass a length of 0 to bdrv_get_block_status() and friends; but it definitely happens with a 0-length read when copy-on-read is

[Qemu-devel] [PULL 47/54] block: convert crypto driver to bdrv_co_preadv|pwritev

2017-10-06 Thread Kevin Wolf
From: "Daniel P. Berrange" Make the crypto driver implement the bdrv_co_preadv|pwritev callbacks, and also use bdrv_co_preadv|pwritev for I/O with the protocol driver beneath. This replaces sector based I/O with byte based I/O, and allows us to stop assuming the physical

[Qemu-devel] [PULL 02/20] hw/sd: fix out-of-bounds check for multi block reads

2017-10-06 Thread Peter Maydell
From: Michael Olbrich The current code checks if the next block exceeds the size of the card. This generates an error while reading the last block of the card. Do the out-of-bounds check when starting to read a new block to fix this. This issue became visible with

[Qemu-devel] [PULL 15/20] target/arm: Add v8M support to exception entry code

2017-10-06 Thread Peter Maydell
Add support for v8M and in particular the security extension to the exception entry code. This requires changes to: * calculation of the exception-return magic LR value * push the callee-saves registers in certain cases * clear registers when taking non-secure exceptions to avoid leaking

[Qemu-devel] [PULL 35/54] qemu-iotests: Allow QMP pretty printing in common.qemu

2017-10-06 Thread Kevin Wolf
QMP responses to certain commands can become quite long, which doesn't only make reading them hard, but also means that the maximum line length in patch emails can be exceeded. Allow tests to switch to QMP pretty printing, which results in more, but shorter lines. We also need to make sure to

[Qemu-devel] [PULL 21/54] dirty-bitmap: Convert internal hbitmap size/granularity

2017-10-06 Thread Kevin Wolf
From: Eric Blake Now that all callers are using byte-based interfaces, there's no reason for our internal hbitmap to remain with sector-based granularity. It also simplifies our internal scaling, since we already know that hbitmap widens requests out to granularity

[Qemu-devel] [PULL 31/54] qemu-iotests: get rid of $iam

2017-10-06 Thread Kevin Wolf
From: Paolo Bonzini The variable is almost unused, and one of the two uses is actually uninitialized. Signed-off-by: Paolo Bonzini Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- tests/qemu-iotests/check

[Qemu-devel] [PULL 40/54] iotests: Restore stty settings on completion

2017-10-06 Thread Kevin Wolf
From: Eric Blake Executing qemu with a terminal as stdin will temporarily alter stty settings on that terminal (for example, disabling echo), because of how we run both the monitor and any multiplexing with guest input. Normally, qemu restores the original settings on exit;

[Qemu-devel] [PULL 46/54] block: fix data type casting for crypto payload offset

2017-10-06 Thread Kevin Wolf
From: "Daniel P. Berrange" The crypto APIs report the offset of the data payload as an uint64_t type, but the block driver is casting to size_t or ssize_t which will potentially truncate. Most of the block APIs use int64_t for offsets meanwhile, so even if using uint64_t in

[Qemu-devel] [PULL 08/20] target/arm: Restore SPSEL to correct CONTROL register on exception return

2017-10-06 Thread Peter Maydell
On exception return for v8M, the SPSEL bit in the EXC_RETURN magic value should be restored to the SPSEL bit in the CONTROL register banked specified by the EXC_RETURN.ES bit. Add write_v7m_control_spsel_for_secstate() which behaves like write_v7m_control_spsel() but allows the caller to specify

[Qemu-devel] [PULL 36/54] qemu-iotests: Test commit block job where top has two parents

2017-10-06 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- tests/qemu-iotests/191 | 153 + tests/qemu-iotests/191.out | 827 + tests/qemu-iotests/group | 1 + 3 files changed, 981 insertions(+) create mode 100755 tests/qemu-iotests/191 create

[Qemu-devel] [PULL 06/20] target/arm: Prepare for CONTROL.SPSEL being nonzero in Handler mode

2017-10-06 Thread Peter Maydell
In the v7M architecture, there is an invariant that if the CPU is in Handler mode then the CONTROL.SPSEL bit cannot be nonzero. This in turn means that the current stack pointer is always indicated by CONTROL.SPSEL, even though Handler mode always uses the Main stack pointer. In v8M, this

[Qemu-devel] [PULL 48/54] block: convert qcrypto_block_encrypt|decrypt to take bytes offset

2017-10-06 Thread Kevin Wolf
From: "Daniel P. Berrange" Instead of sector offset, take the bytes offset when encrypting or decrypting data. Signed-off-by: Daniel P. Berrange Message-id: 20170927125340.12360-6-berra...@redhat.com Reviewed-by: Eric Blake

[Qemu-devel] [PULL 18/20] target/arm: Fix calculation of secure mm_idx values

2017-10-06 Thread Peter Maydell
In cpu_mmu_index() we try to do this: if (env->v7m.secure) { mmu_idx += ARMMMUIdx_MSUser; } but it will give the wrong answer, because ARMMMUIdx_MSUser includes the 0x40 ARM_MMU_IDX_M field, and so does the mmu_idx we're adding to, and we'll end up with 0x8n rather than

[Qemu-devel] tcg/translate-all.c:169: tb_lock: Assertion `!have_tb_lock' failed when doing cpu_restore_state in usermode

2017-10-06 Thread Peter Maydell
Running the test program http://people.linaro.org/~peter.maydell/thumb-over-page (source at http://people.linaro.org/~peter.maydell/thumb-over-page.c) in the usermode emulator: ./build/x86/arm-linux-user/qemu-arm ~/linaro/qemu-misc-tests/thumb-over-page results in an assertion failure:

Re: [Qemu-devel] [PATCH v6 01/22] instrument: Add documentation

2017-10-06 Thread Emilio G. Cota
On Fri, Oct 06, 2017 at 18:07:16 +0300, Lluís Vilanova wrote: > Emilio G Cota writes: > > On Thu, Oct 05, 2017 at 02:28:12 +0300, Lluís Vilanova wrote: > >> The API takes care of telling you if the access could be performed > >> successfully. If you access the instruction's memory representation

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

2017-10-06 Thread Peter Maydell
On 6 October 2017 at 16:53, Kevin Wolf <kw...@redhat.com> wrote: > The following changes since commit a26a98dfb9d448d7234d931ae3720feddf6f0651: > > Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20171006' into > staging (2017-10-06 13:19:03 +0100) > >

[Qemu-devel] [PULL 50/54] block/mirror: check backing in bdrv_mirror_top_refresh_filename

2017-10-06 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy Backing may be zero after failed bdrv_attach_child in bdrv_set_backing_hd, which leads to SIGSEGV. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-id: 20170928120300.58164-1-vsement...@virtuozzo.com

[Qemu-devel] [PULL 33/54] block: Introduce BdrvChildRole.update_filename

2017-10-06 Thread Kevin Wolf
There is no good reason for bdrv_drop_intermediate() to know the active layer above the subchain it is operating on - even more so, because the assumption that there is a single active layer above it is not generally true. In order to prepare removal of the active parameter, use a BdrvChildRole

[Qemu-devel] [PULL 07/20] target/arm: Restore security state on exception return

2017-10-06 Thread Peter Maydell
Now that we can handle the CONTROL.SPSEL bit not necessarily being in sync with the current stack pointer, we can restore the correct security state on exception return. This happens before we start to read registers off the stack frame, but after we have taken possible usage faults for bad

[Qemu-devel] [PULL 05/20] target/arm: Don't switch to target stack early in v7M exception return

2017-10-06 Thread Peter Maydell
Currently our M profile exception return code switches to the target stack pointer relatively early in the process, before it tries to pop the exception frame off the stack. This is awkward for v8M for two reasons: * in v8M the process vs main stack pointer is not selected purely by the value

[Qemu-devel] [PULL 51/54] iotests: Fix 195 if IMGFMT is part of TEST_DIR

2017-10-06 Thread Kevin Wolf
From: Max Reitz do_run_qemu() in iotest 195 first applies _filter_imgfmt when printing qemu's command line and _filter_testdir only afterwards. Therefore, if the image format is part of the test directory path, _filter_testdir will no longer apply and the actual output will

[Qemu-devel] [PULL 20/20] nvic: Add missing code for writing SHCSR.HARDFAULTPENDED bit

2017-10-06 Thread Peter Maydell
When we added support for the new SHCSR bits in v8M in commit 437d59c17e9 the code to support writing to the new HARDFAULTPENDED bit was accidentally only added for non-secure writes; the secure banked version of the bit should also be writable. Signed-off-by: Peter Maydell

[Qemu-devel] [PATCH 1/8] xen: link against xentoolcore

2017-10-06 Thread Ian Jackson
From: Anthony PERARD Xen libraries 4.10 will include a new xentoolcore library, without which xendevicemodel et al will not work. Signed-off-by: Ian Jackson --- configure | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff

[Qemu-devel] [PULL 26/54] qemu-iotests: cleanup and fix search for programs

2017-10-06 Thread Kevin Wolf
From: Paolo Bonzini Instead of ./check failing when a binary is missing, we try each test case now and each one fails with tons of test case diffs. Also, all the variables were initialized by "check" prior to "common" being sourced, and then (uselessly) checked for

[Qemu-devel] [PULL 17/54] qcow2: Switch qcow2_measure() to byte-based iteration

2017-10-06 Thread Kevin Wolf
From: Eric Blake This is new code, but it is easier to read if it makes passes over the image using bytes rather than sectors (and will get easier in the future when bdrv_get_block_status is converted to byte-based). Signed-off-by: Eric Blake Reviewed-by:

[Qemu-devel] [PULL 42/54] block: Perform copy-on-read in loop

2017-10-06 Thread Kevin Wolf
From: Eric Blake Improve our braindead copy-on-read implementation. Pre-patch, we have multiple issues: - we create a bounce buffer and perform a write for the entire request, even if the active image already has 99% of the clusters occupied, and really only needs to

[Qemu-devel] [PULL 53/54] qcow2: truncate the tail of the image file after shrinking the image

2017-10-06 Thread Kevin Wolf
From: Pavel Butsykin Now after shrinking the image, at the end of the image file, there might be a tail that probably will never be used. So we can find the last used cluster and cut the tail. Signed-off-by: Pavel Butsykin Reviewed-by: John

[Qemu-devel] [PULL 38/54] qemu-io: Add -C for opening with copy-on-read

2017-10-06 Thread Kevin Wolf
From: Eric Blake Make it easier to enable copy-on-read during iotests, by exposing a new bool option to main and open. Signed-off-by: Eric Blake Reviewed-by: Jeff Cody Reviewed-by: Kevin Wolf Reviewed-by: John Snow

[Qemu-devel] [PULL 43/54] iotests: Add test 197 for covering copy-on-read

2017-10-06 Thread Kevin Wolf
From: Eric Blake Add a test for qcow2 copy-on-read behavior, including exposure for the just-fixed bugs. The copy-on-read behavior is always to a qcow2 image, but the test is careful to allow running with most image protocol/format combos as the backing file being copied from

[Qemu-devel] [PULL 09/20] target/arm: Check for xPSR mismatch usage faults earlier for v8M

2017-10-06 Thread Peter Maydell
ARM v8M specifies that the INVPC usage fault for mismatched xPSR exception field and handler mode bit should be checked before updating the PSR and SP, so that the fault is taken with the existing stack frame rather than by pushing a new one. Perform this check in the right place for v8M. Since

Re: [Qemu-devel] [PULL 00/20] target-arm queue

2017-10-06 Thread Peter Maydell
t; The following changes since commit a26a98dfb9d448d7234d931ae3720feddf6f0651: > > Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20171006' into > staging (2017-10-06 13:19:03 +0100) > > are available in the git repository at: > > git://git.linaro.org/people/pma

[Qemu-devel] [PULL 16/20] nvic: Implement Security Attribution Unit registers

2017-10-06 Thread Peter Maydell
Implement the register interface for the SAU: SAU_CTRL, SAU_TYPE, SAU_RNR, SAU_RBAR and SAU_RLAR. None of the actual behaviour is implemented here; registers just read back as written. When the CPU definition for Cortex-M33 is eventually added, its initfn will set cpu->sau_sregion, in the same

[Qemu-devel] [PULL 03/20] hw/arm/xlnx-zynqmp: Mark the "xlnx, zynqmp" device with user_creatable = false

2017-10-06 Thread Peter Maydell
From: Thomas Huth The device uses serial_hds in its realize function and thus can't be used twice. Apart from that, the comma in its name makes it quite hard to use for the user anyway, since a comma is normally used to separate the device name from its properties when using

Re: [Qemu-devel] Qemu Documentation

2017-10-06 Thread Swetheendra Tallamraju
I want to write a new virtual USB code and boot from USB by attaching at command line. This functionality exists for hard drive CDROM network devices but not for USB right. If it exists can you please tell me directory path for code ? On Oct 6, 2017 12:28 PM, "Kevin Wolf"

Re: [Qemu-devel] [PATCH] specs: Extend TPM spec with TPM emulator description

2017-10-06 Thread Marc-André Lureau
Hi On Thu, Oct 5, 2017 at 6:47 PM, Stefan Berger wrote: > Following the recent extension of QEMU with a TPM emulator device, > update the specs describing for how to interact with the device. > > The results of commands run inside a Linux VM are expected to be >

[Qemu-devel] [Bug 1691109] Re: qemu-kvm not working as nested inside ESX 6.0

2017-10-06 Thread Stefano Maffulli
** No longer affects: openstack-community -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1691109 Title: qemu-kvm not working as nested inside ESX 6.0 Status in QEMU: Confirmed Bug description:

Re: [Qemu-devel] [PATCH] qemu_opt_print: Remove shadowing opt decl

2017-10-06 Thread Dr. David Alan Gilbert
* Markus Armbruster (arm...@redhat.com) wrote: > Markus Armbruster writes: > > > "Dr. David Alan Gilbert (git)" writes: > > > >> From: "Dr. David Alan Gilbert" > >> > >> opt was declared as a separate local inside the last loop, > >>

Re: [Qemu-devel] [PATCH] qemu_opt_print: Remove shadowing opt decl

2017-10-06 Thread Markus Armbruster
Markus Armbruster writes: > "Dr. David Alan Gilbert (git)" writes: > >> From: "Dr. David Alan Gilbert" >> >> opt was declared as a separate local inside the last loop, >> shadowing the local at the top of the function. >> >>

Re: [Qemu-devel] Qemu Documentation

2017-10-06 Thread Swetheendra Tallamraju
Infact emulation of virtual USB already exists. I want to add functionality of booting from USB. Can you refer which source files to llok on and modify. On Fri, Oct 6, 2017 at 1:01 PM, Swetheendra Tallamraju < swetheendr...@gmail.com> wrote: > I want to write a new virtual USB code and boot from

[Qemu-devel] [PATCH 2/8] xen: restrict: use xentoolcore_restrict_all

2017-10-06 Thread Ian Jackson
And insist that it works. Drop individual use of xendevicemodel_restrict and xenforeignmemory_restrict. These are not actually effective in this version of qemu, because qemu has a large number of fds open onto various Xen control devices. The restriction arrangements are still not right,

[Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option

2017-10-06 Thread Ian Jackson
This allows the caller to specify a uid and gid to use, even if there is no corresponding password entry. This will be useful in certain Xen configurations. Signed-off-by: Ian Jackson --- v3: Error messages fixed. Thanks to Peter Maydell and Ross Lagerwall. v2:

[Qemu-devel] [PULL 29/54] qemu-iotests: disintegrate more parts of common.config

2017-10-06 Thread Kevin Wolf
From: Paolo Bonzini Split "check" parts from tests part. For the directory setup, the actual computation of directories goes in "check", while the sanity checks go in the tests. Signed-off-by: Paolo Bonzini Reviewed-by: Eric Blake

[Qemu-devel] [PULL 37/54] commit: Remove overlay_bs

2017-10-06 Thread Kevin Wolf
We don't need to make any assumptions about the graph layout above the top node of the commit operation any more. Remove the use of bdrv_find_overlay() and related variables from the commit job code. bdrv_drop_intermediate() doesn't use the 'active' parameter any more, so we can just drop it.

[Qemu-devel] [PULL 30/54] qemu-iotests: fix uninitialized variable

2017-10-06 Thread Kevin Wolf
From: Paolo Bonzini The variable is used in "common" but defined only after the file is sourced. Signed-off-by: Paolo Bonzini Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- tests/qemu-iotests/check | 2 --

[Qemu-devel] [PULL 13/20] target/arm: Update excret sanity checks for v8M

2017-10-06 Thread Peter Maydell
In v8M, more bits are defined in the exception-return magic values; update the code that checks these so we accept the v8M values when the CPU permits them. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id:

[Qemu-devel] [PULL 01/20] arm: Fix SMC reporting to EL2 when QEMU provides PSCI

2017-10-06 Thread Peter Maydell
From: Jan Kiszka This properly forwards SMC events to EL2 when PSCI is provided by QEMU itself and, thus, ARM_FEATURE_EL3 is off. Found and tested with the Jailhouse hypervisor. Solution based on suggestions by Peter Maydell. Signed-off-by: Jan Kiszka

[Qemu-devel] [PULL 54/54] block/mirror: check backing in bdrv_mirror_top_flush

2017-10-06 Thread Kevin Wolf
From: Vladimir Sementsov-Ogievskiy Backing may be zero after failed bdrv_append in mirror_start_job, which leads to SIGSEGV. Signed-off-by: Vladimir Sementsov-Ogievskiy Message-id: 20170929152255.5431-1-vsement...@virtuozzo.com Signed-off-by:

[Qemu-devel] [PULL 00/20] target-arm queue

2017-10-06 Thread Peter Maydell
/cohuck/tags/s390x-20171006' into staging (2017-10-06 13:19:03 +0100) are available in the git repository at: git://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20171006 for you to fetch changes up to 04829ce334bece78d4fa1d0fdbc8bc27dae9b242: nvic: Add missing code

Re: [Qemu-devel] [PATCH v5 18/22] s390x: implement query-hotpluggable-cpus

2017-10-06 Thread Markus Armbruster
Cornelia Huck writes: > On Wed, 04 Oct 2017 14:42:55 +0200 > Markus Armbruster wrote: > >> Cornelia Huck writes: >> >> > On Mon, 02 Oct 2017 09:46:41 +0200 >> > Markus Armbruster wrote: >> > >> >> David Hildenbrand

[Qemu-devel] [Bug 1691109] Re: qemu-kvm not working as nested inside ESX 6.0

2017-10-06 Thread Thomas Huth
** Project changed: qemu => qemu (Ubuntu) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1691109 Title: qemu-kvm not working as nested inside ESX 6.0 Status in qemu package in Ubuntu: Confirmed

[Qemu-devel] [PATCH 8/8] RFC configure: do_compiler: Dump some extra info under bash

2017-10-06 Thread Ian Jackson
This makes it much easier to find a particular thing in config.log. The information may be lacking in other shells, resulting in harmless empty output. (This is why we don't use the proper ${FUNCNAME[*]} array syntax - other shells will choke on that.) The extra output is only printed if

[Qemu-devel] [PATCH 5/8] xen: move xc_interface compatibility fallback further up the file

2017-10-06 Thread Ian Jackson
We are going to want to use the dummy xendevicemodel_handle type in new stub functions in the CONFIG_XEN_CTRL_INTERFACE_VERSION < 41000 section. So we need to provide that definition, or (as applicable) include the appropriate header, earlier in the file. (Ideally the newer compatibility layers

[Qemu-devel] [PULL 16/54] mirror: Switch mirror_dirty_init() to byte-based iteration

2017-10-06 Thread Kevin Wolf
From: Eric Blake Now that we have adjusted the majority of the calls this function makes to be byte-based, it is easier to read the code if it makes passes over the image using bytes rather than sectors. Signed-off-by: Eric Blake Reviewed-by: John Snow

[Qemu-devel] [PULL 34/54] commit: Support multiple roots above top node

2017-10-06 Thread Kevin Wolf
This changes the commit block job to support operation in a graph where there is more than a single active layer that references the top node. This involves inserting the commit filter node not only on the path between the given active node and the top node, but between the top node and all of

[Qemu-devel] [PULL 27/54] qemu-iotests: limit non-_PROG-suffixed variables to common.rc

2017-10-06 Thread Kevin Wolf
From: Paolo Bonzini These are never used by "check", with one exception that does not need $QEMU_OPTIONS. Keep them in common.rc, which will be soon included only by the tests. Signed-off-by: Paolo Bonzini Reviewed-by: Eric Blake

[Qemu-devel] [PULL 41/54] block: Add blkdebug hook for copy-on-read

2017-10-06 Thread Kevin Wolf
From: Eric Blake Make it possible to inject errors on writes performed during a read operation due to copy-on-read semantics. Signed-off-by: Eric Blake Reviewed-by: Jeff Cody Reviewed-by: Kevin Wolf Reviewed-by: John

[Qemu-devel] [PULL 45/54] crypto: expose encryption sector size in APIs

2017-10-06 Thread Kevin Wolf
From: "Daniel P. Berrange" While current encryption schemes all have a fixed sector size of 512 bytes, this is not guaranteed to be the case in future. Expose the sector size in the APIs so the block layer can remove assumptions about fixed 512 byte sectors. Reviewed-by:

[Qemu-devel] [PULL 11/20] target/arm: Don't warn about exception return with PC low bit set for v8M

2017-10-06 Thread Peter Maydell
In the v8M architecture, return from an exception to a PC which has bit 0 set is not UNPREDICTABLE; it is defined that bit 0 is discarded [R_HRJH]. Restrict our complaint about this to v7M. Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé

[Qemu-devel] [PULL 52/54] qcow2: fix return error code in qcow2_truncate()

2017-10-06 Thread Kevin Wolf
From: Pavel Butsykin Signed-off-by: Pavel Butsykin Reviewed-by: Eric Blake Reviewed-by: John Snow Reviewed-by: Max Reitz Message-id: 20170929121613.25997-2-pbutsy...@virtuozzo.com

[Qemu-devel] [PULL 14/20] target/arm: Add support for restoring v8M additional state context

2017-10-06 Thread Peter Maydell
For v8M, exceptions from Secure to Non-Secure state will save callee-saved registers to the exception frame as well as the caller-saved registers. Add support for unstacking these registers in exception exit when necessary. Signed-off-by: Peter Maydell Reviewed-by:

Re: [Qemu-devel] [PULL 00/33] next batch of s390x patches

2017-10-06 Thread Peter Maydell
> > are available in the git repository at: > > git://github.com/cohuck/qemu tags/s390x-20171006 > > for you to fetch changes up to b923ab3112ed5ab47c2ff35776f17ab54c60d651: > > hw/s390x: Mark the "sclpquiesce" device with

Re: [Qemu-devel] Qemu Documentation

2017-10-06 Thread Kevin Wolf
Am 05.10.2017 um 23:56 hat Swetheendra Tallamraju geschrieben: > I want yo add extra functionality of booting from virtual USB through qemu. > I need to write a new block of code in /hw/USB to emulate virtual USB. I > don't have any clue of how to procced. Code documentation of other devices >

[Qemu-devel] [PULL 19/20] target/arm: Factor out "get mmuidx for specified security state"

2017-10-06 Thread Peter Maydell
For the SG instruction and secure function return we are going to want to do memory accesses using the MMU index of the CPU in secure state, even though the CPU is currently in non-secure state. Write arm_v7m_mmu_idx_for_secstate() to do this job, and use it in cpu_mmu_index(). Signed-off-by:

Re: [Qemu-devel] [PATCH 00/22] tcg: tb_lock removal

2017-10-06 Thread Emilio G. Cota
On Fri, Oct 06, 2017 at 11:56:21 +0100, Alex Bennée wrote: > > Emilio G. Cota writes: > > > On Mon, Aug 07, 2017 at 19:52:16 -0400, Emilio G. Cota wrote: > >> This series applies on top of the "multiple TCG contexts" series, v4: > >>

[Qemu-devel] [PULL 12/20] target/arm: Add new-in-v8M SFSR and SFAR

2017-10-06 Thread Peter Maydell
Add the new M profile Secure Fault Status Register and Secure Fault Address Register. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 1506092407-26985-10-git-send-email-peter.mayd...@linaro.org --- target/arm/cpu.h

[Qemu-devel] [PULL 04/20] nvic: Clear the vector arrays and prigroup on reset

2017-10-06 Thread Peter Maydell
Reset for devices does not include an automatic clear of the device state (unlike CPU state, where most of the state structure is cleared to zero). Add some missing initialization of NVIC state that meant that the device was left in the wrong state if the guest did a warm reset. (In particular,

[Qemu-devel] [PATCH 4/8] xen: destroy_hvm_domain: Move reason into a variable

2017-10-06 Thread Ian Jackson
We are going to want to reuse this. No functional change. Signed-off-by: Ian Jackson Reviewed-by: Anthony PERARD --- hw/i386/xen/xen-hvm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/i386/xen/xen-hvm.c

[Qemu-devel] [PATCH 6/8] xen: destroy_hvm_domain: Try xendevicemodel_shutdown

2017-10-06 Thread Ian Jackson
xc_interface_open etc. is not going to work if we have dropped privilege, but xendevicemodel_shutdown will if everything is new enough. xendevicemodel_shutdown is only availabe in Xen 4.10 and later, so provide a stub for earlier versions. Signed-off-by: Ian Jackson

[Qemu-devel] [PATCH v3 0/8] xen: xen-domid-restrict improvements

2017-10-06 Thread Ian Jackson
I have been working on trying to get qemu, when running as a Xen device model, to _actually_ not have power equivalent to root. I think I have achieved this, with some limitations (which are discussed in my series against xen.git. However, there are changes to qemu needed. In particular * The

[Qemu-devel] [PATCH 3/8] xen: defer call to xen_restrict until just before os_setup_post

2017-10-06 Thread Ian Jackson
We need to restrict *all* the control fds that qemu opens. Looking in /proc/PID/fd shows there are many; their allocation seems scattered throughout Xen support code in qemu. We must postpone the restrict call until roughly the same time as qemu changes its uid, chroots (if applicable), and so

[Qemu-devel] [PULL 13/54] dirty-bitmap: Change bdrv_get_dirty_count() to report bytes

2017-10-06 Thread Kevin Wolf
From: Eric Blake Thanks to recent cleanups, all callers were scaling a return value of sectors into bytes; do the scaling internally instead. Signed-off-by: Eric Blake Reviewed-by: John Snow Reviewed-by: Kevin Wolf

[Qemu-devel] [PULL 14/54] dirty-bitmap: Change bdrv_get_dirty_locked() to take bytes

2017-10-06 Thread Kevin Wolf
From: Eric Blake Half the callers were already scaling bytes to sectors; the other half can eventually be simplified to use byte iteration. Both callers were already using the result as a bool, so make that explicit. Making the change also makes it easier for a future

[Qemu-devel] [PULL 24/54] qemu-iotests: get rid of AWK_PROG

2017-10-06 Thread Kevin Wolf
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- tests/qemu-iotests/check | 4 ++-- tests/qemu-iotests/common| 2 +-

[Qemu-devel] [PULL 10/20] target/arm: Warn about restoring to unaligned stack

2017-10-06 Thread Peter Maydell
Attempting to do an exception return with an exception frame that is not 8-aligned is UNPREDICTABLE in v8M; warn about this. (It is not UNPREDICTABLE in v7M, and our implementation can handle the merely-4-aligned case fine, so we don't need to do anything except warn.) Signed-off-by: Peter

[Qemu-devel] [PULL 49/54] block: support passthrough of BDRV_REQ_FUA in crypto driver

2017-10-06 Thread Kevin Wolf
From: "Daniel P. Berrange" The BDRV_REQ_FUA flag can trivially be allowed in the crypt driver as a passthrough to the underlying block driver. Reviewed-by: Max Reitz Reviewed-by: Eric Blake Signed-off-by: Daniel P. Berrange

[Qemu-devel] [PULL 17/20] target/arm: Implement security attribute lookups for memory accesses

2017-10-06 Thread Peter Maydell
Implement the security attribute lookups for memory accesses in the get_phys_addr() functions, causing these to generate various kinds of SecureFault for bad accesses. The major subtlety in this code relates to handling of the case when the security attributes the SAU assigns to the address don't

Re: [Qemu-devel] [PATCH 02/20] target/arm: Don't switch to target stack early in v7M exception return

2017-10-06 Thread Peter Maydell
On 5 October 2017 at 17:20, Peter Maydell wrote: > On 5 October 2017 at 17:04, Richard Henderson > wrote: >> On 09/22/2017 10:59 AM, Peter Maydell wrote: >>> +static uint32_t *get_v7m_sp_ptr(CPUARMState *env, bool secure, bool >>>

Re: [Qemu-devel] [PATCH v2 28/30] s390x/tcg: unlock NMI

2017-10-06 Thread Richard Henderson
On 09/28/2017 04:37 PM, David Hildenbrand wrote: > Nothing hindering us anymore from unlocking the restart code (used for > NMI). > > Signed-off-by: David Hildenbrand > --- > hw/s390x/s390-virtio-ccw.c | 4 +--- > target/s390x/sigp.c| 5 - > 2 files changed, 1

Re: [Qemu-devel] [PATCH] keycodemapdb: try fix makefile deps

2017-10-06 Thread Daniel P. Berrange
On Fri, Oct 06, 2017 at 01:13:42PM +0200, Gerd Hoffmann wrote: > (1) make .git-submodule-status depend on config-host.mak, > for GIT_SUBMODULES changes. > > (2) make $(KEYCODEMAP_{GEN,CSV}) depend on .git-submodule-status > so make knows what to do if they are not there. > > I still get

Re: [Qemu-devel] [PATCH v2 26/30] s390x/tcg: switch to new SIGP handling code

2017-10-06 Thread Richard Henderson
On 09/28/2017 04:37 PM, David Hildenbrand wrote: > static ExitStatus op_sigp(DisasContext *s, DisasOps *o) > { > TCGv_i32 r1 = tcg_const_i32(get_field(s->fields, r1)); > +TCGv_i32 r3 = tcg_const_i32(get_field(s->fields, r3)); > check_privileged(s); > -potential_page_fault(s); >

Re: [Qemu-devel] [PATCH 08/17] imx_fec: Add support for multiple Tx DMA rings

2017-10-06 Thread Peter Maydell
On 18 September 2017 at 20:50, Andrey Smirnov wrote: > More recent version of the IP block support more than one Tx DMA ring, > so add the code implementing that feature. > > Cc: Peter Maydell > Cc: Jason Wang > Cc:

Re: [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option

2017-10-06 Thread Ian Jackson
Ross Lagerwall writes ("Re: [PATCH 7/8] os-posix: Provide new -runasid option"): > On 10/04/2017 05:18 PM, Ian Jackson wrote: > > -if (setuid(user_pwd->pw_uid) < 0) { > > +if (setuid(user_pwd ? user_pwd->pw_uid : user_gid) < 0) { > > fprintf(stderr, "Failed to

[Qemu-devel] [PULL 03/54] hbitmap: Rename serialization_granularity to serialization_align

2017-10-06 Thread Kevin Wolf
From: Eric Blake The only client of hbitmap_serialization_granularity() is dirty-bitmap's bdrv_dirty_bitmap_serialization_align(). Keeping the two names consistent is worthwhile, and the shorter name is more representative of what the function returns (the required alignment

[Qemu-devel] [PULL 18/54] qcow2: Switch load_bitmap_data() to byte-based iteration

2017-10-06 Thread Kevin Wolf
From: Eric Blake Now that we have adjusted the majority of the calls this function makes to be byte-based, it is easier to read the code if it makes passes over the image using bytes rather than sectors. Signed-off-by: Eric Blake Reviewed-by: John Snow

[Qemu-devel] [PULL 09/54] dirty-bitmap: Change bdrv_dirty_bitmap_*serialize*() to take bytes

2017-10-06 Thread Kevin Wolf
From: Eric Blake Right now, the dirty-bitmap code exposes the fact that we use a scale of sector granularity in the underlying hbitmap to anything that wants to serialize a dirty bitmap. It's nicer to uniformly expose bytes as our dirty-bitmap interface, matching the previous

Re: [Qemu-devel] [Xen-devel] [PATCH v2 0/*] xen: xen-domid-restrict improvements

2017-10-06 Thread Paul Durrant
> -Original Message- > From: Xen-devel [mailto:xen-devel-boun...@lists.xen.org] On Behalf Of > Ross Lagerwall > Sent: 06 October 2017 13:58 > To: Ian Jackson ; qemu-devel@nongnu.org > Cc: Anthony Perard ; xen- > de...@lists.xenproject.org;

Re: [Qemu-devel] [PATCH v2 03/30] s390x/tcg: injection of emergency signals and external calls

2017-10-06 Thread Richard Henderson
On 09/28/2017 04:36 PM, David Hildenbrand wrote: > Preparation for new TCG SIGP code. Especially also prepare for > indicating that another external call is already pending. > > Take care of interrupt priority. > > Signed-off-by: David Hildenbrand > --- > target/s390x/cpu.h

Re: [Qemu-devel] [PATCH v2 05/30] s390x/tcg: take care of external interrupt subclasses

2017-10-06 Thread Richard Henderson
On 09/28/2017 04:36 PM, David Hildenbrand wrote: > We can now let go of INTERRUPT_EXT. When cr0 changes, we have to > revalidate if we now have a pending external interrupt, just like > when the PSW (or SYSTEM MASK only) changes. > > Signed-off-by: David Hildenbrand > --- >

Re: [Qemu-devel] [Qemu-block] [PATCH RFC] block: add block-insert-node QMP command

2017-10-06 Thread Manos Pitsidianakis
On Fri, Oct 06, 2017 at 02:59:55PM +0200, Max Reitz wrote: On 2017-10-04 23:04, Manos Pitsidianakis wrote: On Wed, Oct 04, 2017 at 08:09:24PM +0200, Max Reitz wrote: On 2017-10-04 19:05, Manos Pitsidianakis wrote: On Wed, Oct 04, 2017 at 02:49:27PM +0200, Max Reitz wrote: On 2017-08-15

  1   2   3   4   5   >