[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 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 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 11/54] dirty-bitmap: Set iterator start by offset, not sector

2017-10-06 Thread Kevin Wolf
From: Eric Blake All callers to bdrv_dirty_iter_new() passed 0 for their initial starting point, drop that parameter. Most callers to bdrv_set_dirty_iter() were scaling a byte offset to a sector number; the exception qcow2-bitmap will be converted later to use byte rather

[Qemu-devel] [PULL 25/54] qemu-iotests: move "check" code out of common.rc

2017-10-06 Thread Kevin Wolf
From: Paolo Bonzini Some functions in common.rc are never used by the tests. Move them out of that file and into common, which is already included only by "check". Code that actually *is* common to "check" and tests can be placed in common.config. Signed-off-by: Paolo

[Qemu-devel] [PULL 28/54] qemu-iotests: do not include common.rc in "check"

2017-10-06 Thread Kevin Wolf
From: Paolo Bonzini It only provides functions used by the test programs. Signed-off-by: Paolo Bonzini Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- tests/qemu-iotests/check | 6 --

[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

[Qemu-devel] [PULL 23/54] qemu-iotests: remove dead code

2017-10-06 Thread Kevin Wolf
From: Paolo Bonzini This includes shell function, shell variables and command line options (randomize.awk does not exist). Signed-off-by: Paolo Bonzini Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf ---

[Qemu-devel] [PULL 20/54] dirty-bitmap: Switch bdrv_set_dirty() to bytes

2017-10-06 Thread Kevin Wolf
From: Eric Blake Both callers already had bytes available, but were scaling to sectors. Move the scaling to internal code. In the case of bdrv_aligned_pwritev(), we are now passing the exact offset rather than a rounded sector-aligned value, but that's okay as long as dirty

[Qemu-devel] [PULL 10/54] qcow2: Switch sectors_covered_by_bitmap_cluster() to byte-based

2017-10-06 Thread Kevin Wolf
From: Eric Blake We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Change the qcow2 bitmap helper function sectors_covered_by_bitmap_cluster(), renaming it to bytes_covered_by_bitmap_cluster() in the process.

[Qemu-devel] [PULL 08/54] dirty-bitmap: Track bitmap size by bytes

2017-10-06 Thread Kevin Wolf
From: Eric Blake We are still using an internal hbitmap that tracks a size in sectors, with the granularity scaled down accordingly, because it lets us use a shortcut for our iterators which are currently sector-based. But there's no reason we can't track the dirty bitmap size

[Qemu-devel] [PULL 06/54] dirty-bitmap: Avoid size query failure during truncate

2017-10-06 Thread Kevin Wolf
From: Eric Blake We've previously fixed several places where we failed to account for possible errors from bdrv_nb_sectors(). Fix another one by making bdrv_dirty_bitmap_truncate() take the new size from the caller instead of querying itself; then adjust the sole caller

[Qemu-devel] [PULL 22/54] hw/block/onenand: Remove dead code block

2017-10-06 Thread Kevin Wolf
From: Thomas Huth The condition of the for-loop makes sure that b is always smaller than s->blocks, so the "if (b >= s->blocks)" statement is completely superfluous here. Buglink: https://bugs.launchpad.net/qemu/+bug/1715007 Signed-off-by: Thomas Huth

[Qemu-devel] [PULL 12/54] dirty-bitmap: Change bdrv_dirty_iter_next() to report byte offset

2017-10-06 Thread Kevin Wolf
From: Eric Blake Thanks to recent cleanups, most callers were scaling a return value of sectors into bytes (the exception, in qcow2-bitmap, will be converted to byte-based iteration later). Update the interface to do the scaling internally instead. In qcow2-bitmap, the code

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

2017-10-06 Thread Kevin Wolf
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://repo.or.cz/qemu/kevin.git tags/for-upstream for you

[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 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 07/54] dirty-bitmap: Change bdrv_dirty_bitmap_size() to report bytes

2017-10-06 Thread Kevin Wolf
From: Eric Blake We're already reporting bytes for bdrv_dirty_bitmap_granularity(); mixing bytes and sectors in our return values is a recipe for confusion. A later cleanup will convert dirty bitmap internals to be entirely byte-based, but in the meantime, we should report

[Qemu-devel] [PULL 01/54] block: Typo fix in copy_on_readv()

2017-10-06 Thread Kevin Wolf
From: Eric Blake Signed-off-by: Eric Blake Signed-off-by: Kevin Wolf --- block/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block/io.c b/block/io.c index 4378ae4c7d..d633b0f851 100644 --- a/block/io.c +++

[Qemu-devel] [PULL 02/54] block: Make bdrv_img_create() size selection easier to read

2017-10-06 Thread Kevin Wolf
From: Eric Blake All callers of bdrv_img_create() pass in a size, or -1 to read the size from the backing file. We then set that size as the QemuOpt default, which means we will reuse that default rather than the final parameter to qemu_opt_get_size() several lines later.

[Qemu-devel] [PULL 19/54] qcow2: Switch store_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. iotests 165 was rather weak - on a default 64k-cluster image, where

[Qemu-devel] [PULL 05/54] dirty-bitmap: Drop unused functions

2017-10-06 Thread Kevin Wolf
From: Eric Blake We had several functions that no one is currently using, and which use sector-based interfaces. I'm trying to convert towards byte-based interfaces, so it's easier to just drop the unused functions: bdrv_dirty_bitmap_get_meta

[Qemu-devel] [PULL 04/54] qcow2: Ensure bitmap serialization is aligned

2017-10-06 Thread Kevin Wolf
From: Eric Blake When subdividing a bitmap serialization, the code in hbitmap.c enforces that start/count parameters are aligned (except that count can end early at end-of-bitmap). We exposed this required alignment through bdrv_dirty_bitmap_serialization_align(), but forgot

Re: [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05

2017-10-06 Thread Peter Maydell
On 6 October 2017 at 16:27, Eduardo Habkost wrote: > On Fri, Oct 06, 2017 at 01:17:42PM +0100, Peter Maydell wrote: >> This fails tests, I'm afraid: > [...] >> acpi-test: Warning! DSDT mismatch. Actual [asl:/tmp/asl-6QYK7Y.dsl, >> aml:/tmp/aml-E8YK7Y], Expected

Re: [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05

2017-10-06 Thread Eduardo Habkost
On Fri, Oct 06, 2017 at 01:17:42PM +0100, Peter Maydell wrote: > On 5 October 2017 at 21:36, Eduardo Habkost wrote: > > The following changes since commit d8f932cc696250cb740240d668b39df5fbb2d5a0: > > > > Merge remote-tracking branch

Re: [Qemu-devel] [PATCH v2 0/6] aspeed: add a witherspoon-bmc machine

2017-10-06 Thread Peter Maydell
On 20 September 2017 at 08:01, Cédric Le Goater wrote: > Hello, > > This series adds a new Aspeed machine to emulate the BMC of a > Witherspoon system. It also extends the other Aspeed machines with I2C > devices and adds a simple model for the pca9552 LED blinker present on > the

Re: [Qemu-devel] [PATCH v2 5/6] misc: add pca9552 LED blinker model

2017-10-06 Thread Peter Maydell
On 20 September 2017 at 08:01, Cédric Le Goater wrote: > Specs are available here : > > https://www.nxp.com/docs/en/data-sheet/PCA9552.pdf > > This is a simple model supporting the basic registers for led and GPIO > mode. The device also supports two blinking rates but not the

Re: [Qemu-devel] [PATCH v2 1/6] aspeed: add support for the witherspoon-bmc board

2017-10-06 Thread Peter Maydell
On 20 September 2017 at 08:01, Cédric Le Goater wrote: > The Witherspoon boards are OpenPOWER system hosting POWER9 Processors. > Let's add support for their BMC including a couple of I2C devices as > found on real HW. > > Signed-off-by: Cédric Le Goater > --- >

[Qemu-devel] [PATCH] spapr_pci: fail gracefully with non-pseries machine types

2017-10-06 Thread Greg Kurz
QEMU currently crashes when the user tries to add a spapr-pci-host-bridge on a non-pseries machine: $ qemu-system-ppc64 -M ppce500 -device spapr-pci-host-bridge,index=1 hw/ppc/spapr_pci.c:1535:spapr_phb_realize: Object 0x1003dacae60 is not an instance of type spapr-machine Aborted (core dumped)

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

2017-10-06 Thread Lluís Vilanova
Emilio G Cota writes: > On Thu, Oct 05, 2017 at 02:28:12 +0300, Lluís Vilanova wrote: >> Emilio G Cota writes: >> > I see some potential problems with this: >> > 1. Instrumenters' accesses could generate exceptions. I presume we'd want >> > to avoid >> >this, or leave it as a debug-only kind

Re: [Qemu-devel] [PATCH 00/17] Initial i.MX7 support

2017-10-06 Thread Peter Maydell
On 18 September 2017 at 20:50, Andrey Smirnov wrote: > Hi everyone, > > This patch series contains the work that I've done in order to enable > support for i.MX7 emulation in QEMU. Majority of the set are just odd > fixes and small features implementation that I had to

Re: [Qemu-devel] [PATCH 17/17] Implement support for i.MX7 Sabre board

2017-10-06 Thread Peter Maydell
On 18 September 2017 at 20:51, Andrey Smirnov wrote: > Cc: Peter Maydell > Cc: qemu-devel@nongnu.org > Cc: qemu-...@nongnu.org > Cc: yurov...@gmail.com > Signed-off-by: Andrey Smirnov > --- > hw/arm/Makefile.objs |

[Qemu-devel] [Bug 1721788] Re: Failed to get shared "write" lock with 'qemu-img info'

2017-10-06 Thread Daniel Berrange
I've just noticed, however, that '--force-share' appears totally undocumented in both CLI help output and the man page. So that's certainly something that should be fixed -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

[Qemu-devel] [Bug 1721788] Re: Failed to get shared "write" lock with 'qemu-img info'

2017-10-06 Thread Daniel Berrange
The QEMU process that has the disk image open may be doing I/O that causes qcow2 metadata to be changed. Such changes could confuse the 'qemu-img' process it is was reading the metadata at the same time it was being changed, causing bad data to be printed or worse. So requiring a write lock is the

Re: [Qemu-devel] [PATCH 16/17] i.MX: Add i.MX7 SOC implementation.

2017-10-06 Thread Peter Maydell
On 18 September 2017 at 20:50, Andrey Smirnov wrote: > For now we only support the following devices: > * up to 2 Cortex A9 cores (SMP works with PSCI) > * A7 MPCORE (identical to A15 MPCORE) > * 7 i.MX UARTs > * 1 CCM device > * 2 Ethernet

Re: [Qemu-devel] [Bug 1721788] [NEW] Failed to get shared "write" lock with 'qemu-img info'

2017-10-06 Thread Eric Blake
On 10/06/2017 09:09 AM, Jan Heidbrink wrote: > Public bug reported: > > When running 'qemu-img info test.qcow2' while test.qcow2 is currently > used by a Qemu process, I get the error > > qemu-img: Could not open 'test.qcow2': Failed to get shared "write" > lock. > > > Why does displaying

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

Re: [Qemu-devel] [virtio-dev] Re: [virtio-dev] Re: [RFC 0/8] virtio-crypto: add multiplexing mode support

2017-10-06 Thread Halil Pasic
On 09/18/2017 03:17 AM, Longpeng (Mike) wrote: > > > On 2017/9/16 1:33, Halil Pasic wrote: > >> >> >> On 09/14/2017 02:58 AM, Longpeng (Mike) wrote: >>> >>> >>> On 2017/9/14 2:14, Halil Pasic wrote: >>> On 09/11/2017 03:10 AM, Longpeng(Mike) wrote: > *NOTE* > The code

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

2017-10-06 Thread Ian Jackson
Peter Maydell writes ("Re: [Qemu-devel] [PATCH 7/8] os-posix: Provide new -runasid option"): > On 4 October 2017 at 17:18, Ian Jackson wrote: > > static void change_process_uid(void) > > { > > -if (user_pwd) { > > -if (setgid(user_pwd->pw_gid) < 0) { > >

Re: [Qemu-devel] [PATCH 13/17] i.MX: Add code to emulate i.MX2 watchdog IP block

2017-10-06 Thread Peter Maydell
On 18 September 2017 at 20:50, Andrey Smirnov wrote: > Add enough code to emulate i.MX2 watchdog IP block so it would be > possible to reboot the machine running Linux Guest. > > Cc: Peter Maydell > Cc: qemu-devel@nongnu.org > Cc:

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] [Bug 1721788] [NEW] Failed to get shared "write" lock with 'qemu-img info'

2017-10-06 Thread Jan Heidbrink
Public bug reported: When running 'qemu-img info test.qcow2' while test.qcow2 is currently used by a Qemu process, I get the error qemu-img: Could not open 'test.qcow2': Failed to get shared "write" lock. Why does displaying information about a disk image need a write lock for the file?

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 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 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 v2 17/30] MAINTAINERS: use s390 KVM maintainers for target/s390x/sigp.c

2017-10-06 Thread Cornelia Huck
On Fri, 6 Oct 2017 09:40:49 -0400 Richard Henderson wrote: > On 09/28/2017 04:36 PM, David Hildenbrand wrote: > > All code in target/s390x/sigp.c was factored out from > > target/s390x/kvm.c, so let's also copy the entry in the MAINTAINERS > > file. > > > >

Re: [Qemu-devel] [PATCH v2 29/30] s390x/tcg: refactor stfl(e) to use s390_get_feat_block()

2017-10-06 Thread Richard Henderson
On 09/28/2017 04:37 PM, David Hildenbrand wrote: > Refactor it to use s390_get_feat_block(). Directly write into the mapped > lowcore with stfl and make sure it is really only compiled if needed. > > While at it, add an alignment check for STFLE and avoid > potential_page_fault() by properly

Re: [Qemu-devel] [PATCH v2 30/30] target/s390x: special handling when starting a CPU with WAIT PSW

2017-10-06 Thread Richard Henderson
On 09/28/2017 04:37 PM, David Hildenbrand wrote: > When we try to start a CPU with a WAIT PSW, we have to take care that > TCG will actually try to continue executing instructions. > > We must therefore really only unhalt the CPU if we don't have a WAIT > PSW. Also document the special order for

Re: [Qemu-devel] [PATCH v2 25/30] s390x/tcg: flush the tlb on SIGP SET PREFIX

2017-10-06 Thread Richard Henderson
On 09/28/2017 04:37 PM, David Hildenbrand wrote: > Thanks to Aurelien Jarno for doing this in his prototype. > > We can flush the whole TLB as this should happen really rarely. > > Signed-off-by: David Hildenbrand > --- > target/s390x/sigp.c | 1 + > 1 file changed, 1

Re: [Qemu-devel] [PATCH 07/17] imx_fec: Emulate SHIFT16 in ENETx_RACC

2017-10-06 Thread Peter Maydell
On 18 September 2017 at 20:50, Andrey Smirnov wrote: > Needed to support latest Linux kernel driver which relies on that > functionality. > > Cc: Peter Maydell > Cc: Jason Wang > Cc: qemu-devel@nongnu.org > Cc:

Re: [Qemu-devel] [PATCH 05/17] imx_fec: Use ENET_FTRL to determine truncation length

2017-10-06 Thread Peter Maydell
On 18 September 2017 at 20:50, Andrey Smirnov wrote: > Frame truncation length, TRUNC_FL, is determined by the contents of > ENET_FTRL register, so convert the code to use it instead of a > hardcoded constant. > > Cc: Peter Maydell > Cc: Jason

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 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 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 v2 27/30] s390x/cpumodel: allow to enable SENSE RUNNING STATUS for qemu

2017-10-06 Thread Richard Henderson
On 09/28/2017 04:37 PM, David Hildenbrand wrote: > As we properly implement it, allow to enable it. > > Signed-off-by: David Hildenbrand > --- > target/s390x/cpu_models.c | 1 + > 1 file changed, 1 insertion(+) Reviewed-by: Richard Henderson

Re: [Qemu-devel] [PATCH 05/17] imx_fec: Use ENET_FTRL to determine truncation length

2017-10-06 Thread Peter Maydell
On 30 September 2017 at 01:17, Philippe Mathieu-Daudé wrote: > Hi Andrey, > > On 09/18/2017 04:50 PM, Andrey Smirnov wrote: >> >> Frame truncation length, TRUNC_FL, is determined by the contents of >> ENET_FTRL register, so convert the code to use it instead of a >> hardcoded

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

2017-10-06 Thread Daniel P. Berrange
On Fri, Oct 06, 2017 at 09:58:33AM -0400, Doug Gale wrote: > I tried to get tracing to work before and I have never gotten it > working. I'll give it another try and redo the patch with tracing > infrastructure if necessary. The printf are nice because the dev can > just look at the terminal where

Re: [Qemu-devel] [PATCH 04/17] imx_fec: Change queue flushing heuristics

2017-10-06 Thread Peter Maydell
On 18 September 2017 at 20:50, Andrey Smirnov wrote: > In current implementation, packet queue flushing logic seem to suffer > from a deadlock like scenario if a packet is received by the interface > before before Rx ring is initialized by Guest's driver. Consider the >

Re: [Qemu-devel] [PATCH] option: Drop unused get_param_value(), get_next_param_value()

2017-10-06 Thread Eric Blake
On 10/06/2017 08:16 AM, Markus Armbruster wrote: > Their last user went away in commit f51074cdc6, "pci-hotplug-old: Has > been dead for five major releases, bury", v2.3.0. Remove them, as new > code should use QemuOpts or maybe keyval_parse() instead. > > Signed-off-by: Markus Armbruster

Re: [Qemu-devel] [PATCH v2 24/30] s390x/tcg: implement STOP and RESET interrupts for TCG

2017-10-06 Thread Richard Henderson
On 09/28/2017 04:37 PM, David Hildenbrand wrote: > Implement them like KVM implements/handles them. Both can only be > triggered via SIGP instructions. RESET has (almos)the lowest priority if > the CPU is running, and the highest if the CPU is STOPPED. This is handled > in SIGP code already. On

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

2017-10-06 Thread Doug Gale
I tried to get tracing to work before and I have never gotten it working. I'll give it another try and redo the patch with tracing infrastructure if necessary. The printf are nice because the dev can just look at the terminal where qemu is running. Can you view the trace output in realtime? When

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

2017-10-06 Thread Daniel P. Berrange
On Fri, Oct 06, 2017 at 08:50:31AM -0500, Eric Blake wrote: > On 10/05/2017 06:18 PM, Doug Gale wrote: > > I added the tracing output in this patch to assist me in implementing > > an NVMe driver. It helped tremendously. > > > >>From 1d19086cdef8d492929852d582cb41dcc5026f71 Mon Sep 17 00:00:00

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

[Qemu-devel] [Bug 1721744] [NEW] Help content missing for newly added machine properties

2017-10-06 Thread Satheesh Rajendran
Public bug reported: Help content missing for newly added machine properties, it would be needed by libvirt and other management layers to query to add support, Thanks. max-cpu-compat,vsmt,modern-hotplug-events,resize-hpt Steps: 1. Compile qemu @below commit 2.

Re: [Qemu-devel] [PATCH v2 22/30] s390x/tcg: implement SIGP EMERGENCY SIGNAL

2017-10-06 Thread Richard Henderson
On 09/28/2017 04:37 PM, David Hildenbrand wrote: > As preparation for TCG. > > Signed-off-by: David Hildenbrand > --- > target/s390x/sigp.c | 15 +++ > 1 file changed, 15 insertions(+) Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH 01/17] imx_fec: Do not link to netdev

2017-10-06 Thread Peter Maydell
On 18 September 2017 at 20:50, Andrey Smirnov wrote: > Binding to a particular netdev doesn't seem to belong to this layer > and should probably be done as a part of board or SoC specific code. > > Convert all of the users of this IP block to use >

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

2017-10-06 Thread Eric Blake
On 10/05/2017 06:18 PM, Doug Gale wrote: > I added the tracing output in this patch to assist me in implementing > an NVMe driver. It helped tremendously. > >>From 1d19086cdef8d492929852d582cb41dcc5026f71 Mon Sep 17 00:00:00 2001 > From: Doug Gale > Date: Thu, 5 Oct 2017

Re: [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05

2017-10-06 Thread Thomas Huth
On 06.10.2017 14:17, Peter Maydell wrote: [...] > > As an aside, these acpi tests are a bit noisy with > V=1, especially the extra blank lines. > FWIW, I suggested a patch here to fix that: https://lists.gnu.org/archive/html/qemu-devel/2017-08/msg05404.html ... but apparently Igor did not

Re: [Qemu-devel] [PATCH v2 23/30] s390x/tcg: implement SIGP CONDITIONAL EMERGENCY SIGNAL

2017-10-06 Thread Richard Henderson
On 09/28/2017 04:37 PM, David Hildenbrand wrote: > Mostly analogous to the kernel/KVM version (so I assume the checks are > correct :) ). As a preparation for TCG. > > Signed-off-by: David Hildenbrand > --- > target/s390x/cpu.h | 1 + > target/s390x/sigp.c | 37

Re: [Qemu-devel] [PATCH 03/17] imx_fec: Refactor imx_eth_enable_rx()

2017-10-06 Thread Peter Maydell
On 18 September 2017 at 20:50, Andrey Smirnov wrote: > Refactor imx_eth_enable_rx() to have more meaningfull variable name > than 'tmp' and to reduce number of logical negations done. > > Cc: Peter Maydell > Cc: Jason Wang

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] [PATCH v2 20/30] s390x/tcg: implement SIGP SENSE

2017-10-06 Thread Richard Henderson
On 09/28/2017 04:36 PM, David Hildenbrand wrote: > Add it as preparation for TCG. Sensing coul later be done completely > lockless. > > Signed-off-by: David Hildenbrand > --- > target/s390x/sigp.c | 29 + > 1 file changed, 29 insertions(+)

Re: [Qemu-devel] [PATCH v2 21/30] s390x/tcg: implement SIGP EXTERNAL CALL

2017-10-06 Thread Richard Henderson
On 09/28/2017 04:36 PM, David Hildenbrand wrote: > As preparation for TCG. > > Signed-off-by: David Hildenbrand > --- > target/s390x/sigp.c | 25 +++-- > 1 file changed, 23 insertions(+), 2 deletions(-) Reviewed-by: Richard Henderson

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

Re: [Qemu-devel] [Qemu-block] [PATCH 8/8] nbd: Minimal structured read for client

2017-10-06 Thread Eric Blake
On 10/06/2017 02:34 AM, Vladimir Sementsov-Ogievskiy wrote: >> - if the chunk is NBD_REPLY_TYPE_NONE, there is no payload, and this >> should be the final chunk, so the return to the caller can be the same >> as for old-style (return 1 if we had no earlier error packets, or the >> saved negative

Re: [Qemu-devel] [PATCH v2 19/30] s390x/tcg: implement SIGP SENSE RUNNING STATUS

2017-10-06 Thread Richard Henderson
On 09/28/2017 04:36 PM, David Hildenbrand wrote: > Preparation for TCG, for KVM is this is completely handled in the > kernel. > > Signed-off-by: David Hildenbrand > --- > target/s390x/cpu.h | 2 ++ > target/s390x/sigp.c | 25 + > 2 files changed, 27

Re: [Qemu-devel] [PATCH v2 18/30] s390x/kvm: factor out actual handling of STOP interrupts

2017-10-06 Thread Richard Henderson
On 09/28/2017 04:36 PM, David Hildenbrand wrote: > For KVM, the KVM module decides when a STOP can be performed (when the > STOP interrupt can be processed). Factor it out so we can use it > later for TCG. > > Signed-off-by: David Hildenbrand > --- > target/s390x/internal.h |

Re: [Qemu-devel] [PATCH v2 17/30] MAINTAINERS: use s390 KVM maintainers for target/s390x/sigp.c

2017-10-06 Thread Richard Henderson
On 09/28/2017 04:36 PM, David Hildenbrand wrote: > All code in target/s390x/sigp.c was factored out from > target/s390x/kvm.c, so let's also copy the entry in the MAINTAINERS > file. > > Signed-off-by: David Hildenbrand > --- > MAINTAINERS | 1 + > 1 file changed, 1

Re: [Qemu-devel] [RFC PATCH 02/32] texi2pod: Support @verbatim environment

2017-10-06 Thread Eric Blake
On 10/06/2017 12:24 AM, Markus Armbruster wrote: > Eric Blake writes: > >> On 10/02/2017 10:25 AM, Markus Armbruster wrote: >>> Signed-off-by: Markus Armbruster >>> --- >>> scripts/texi2pod.pl | 11 +-- >>> 1 file changed, 9 insertions(+), 2

Re: [Qemu-devel] [PATCH v2 13/30] s390x/kvm: factor out storing of CPU status

2017-10-06 Thread Richard Henderson
On 09/28/2017 04:36 PM, David Hildenbrand wrote: > Factor it out into s390_store_status(), to be used also by TCG later on. > > Signed-off-by: David Hildenbrand > --- > target/s390x/helper.c | 60 ++ > target/s390x/internal.h | 2 ++ >

Re: [Qemu-devel] [PATCH v2 10/30] target/s390x: interpret PSW_MASK_WAIT only for TCG

2017-10-06 Thread Richard Henderson
On 09/28/2017 04:36 PM, David Hildenbrand wrote: > KVM handles the wait PSW itself and triggers a WAIT ICPT in case it > really want to sleep (disabled wait). > > This will later allow us to change the order of loading a restart > interrupt and setting a CPU to OPERATING on SIGP RESTART without >

Re: [Qemu-devel] [PATCH v2 09/30] s390x/tcg: handle WAIT PSWs during interrupt injection

2017-10-06 Thread Richard Henderson
On 09/28/2017 04:36 PM, David Hildenbrand wrote: > If we encounter a WAIT PSW, we have to halt immediately. Using > cpu_loop_exit() at this point feels wrong. Simply leaving > cs->exception_index set doesn't result in an immediate stop. > > This is also necessary to properly handle SIGP STOP

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] [PATCH v2 04/30] s390x/tcg: rework checking for deliverable interrupts

2017-10-06 Thread Richard Henderson
On 09/28/2017 04:36 PM, David Hildenbrand wrote: > Currently, enabling/disabling of interrupts is not really supported. > > Let's improve interrupt handling code by explicitly checking for > deliverable interrupts only. This is the first step. Checking for > external interrupt subclasses will be

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

[Qemu-devel] [PATCH] isapc: Remove unnecessary migration compatibility code

2017-10-06 Thread Eduardo Habkost
We don't touch isapc when we change guest ABI and add new entries to PC_COMPAT_* or new PCMachineClass compat flags. This means isapc never guaranteed guest ABI and cross-QEMU-version live migration compatibility. There's no point in keeping code for kvm-pv-eoi and APIC ID compatibility in

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] [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] [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 02/30] s390x/tcg: cleanup service interrupt injection

2017-10-06 Thread Richard Henderson
On 09/28/2017 04:36 PM, David Hildenbrand wrote: > There are still some leftovers from old virtio interrupts in there. > Most importantly, we don't have to queue service interrupts anymore. > Just like KVM, we can simply multiplex the SCLP service interrupts and > avoid the queue. > > Also, now

[Qemu-devel] [PATCH] option: Drop unused get_param_value(), get_next_param_value()

2017-10-06 Thread Markus Armbruster
Their last user went away in commit f51074cdc6, "pci-hotplug-old: Has been dead for five major releases, bury", v2.3.0. Remove them, as new code should use QemuOpts or maybe keyval_parse() instead. Signed-off-by: Markus Armbruster --- include/qemu/option.h | 5 -

Re: [Qemu-devel] [PATCH v2 1/2] exec: add page_mask for flatview_do_translate

2017-10-06 Thread Maxime Coquelin
On 10/06/2017 02:48 PM, Paolo Bonzini wrote: On 06/10/2017 14:46, Maxime Coquelin wrote:   addr = ((iotlb.translated_addr & ~iotlb.addr_mask)   | (addr & iotlb.addr_mask)); -    *plen = MIN(*plen, (addr | iotlb.addr_mask) - addr + 1); +    page_mask =

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

2017-10-06 Thread Max Reitz
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 09:45, Manos Pitsidianakis wrote: >

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

2017-10-06 Thread Ross Lagerwall
On 10/04/2017 05:18 PM, Ian Jackson wrote: (Resending this because 1. I got the CC for xen-devel wrong; 2. I got the subject wrong: there are actually 8 patches; 3. I mangled Anthony's name in theheaders. Sorry for the noise.) I have been working on trying to get qemu, when running as a Xen

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

2017-10-06 Thread Peter Maydell
On 4 October 2017 at 17:18, Ian Jackson wrote: > 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

Re: [Qemu-devel] [RFC PATCH qemu] virtio-pci: Replace modern_as with direct access to modern_bar

2017-10-06 Thread Paolo Bonzini
On 03/10/2017 04:11, Alexey Kardashevskiy wrote: >>> What is best to do if MR is not found (and is it possible in practice)? >>> assert or redirect to unassigned memory? >> Do nothing at all, I think. > Repost without asserts? Yes, I guess so. >> I haven't thought much about the endian switches,

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

2017-10-06 Thread Ross Lagerwall
On 10/04/2017 05:18 PM, Ian Jackson wrote: 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 snip @@ -166,17 +187,19 @@ void

Re: [Qemu-devel] [PATCH v2 1/2] exec: add page_mask for flatview_do_translate

2017-10-06 Thread Paolo Bonzini
On 06/10/2017 14:46, Maxime Coquelin wrote: >>>   addr = ((iotlb.translated_addr & ~iotlb.addr_mask) >>>   | (addr & iotlb.addr_mask)); >>> -    *plen = MIN(*plen, (addr | iotlb.addr_mask) - addr + 1); >>> +    page_mask = iotlb.addr_mask; >> >> Should this be

Re: [Qemu-devel] [PATCH v2 1/2] exec: add page_mask for flatview_do_translate

2017-10-06 Thread Maxime Coquelin
On 10/06/2017 02:31 PM, Paolo Bonzini wrote: On 06/10/2017 13:46, Maxime Coquelin wrote: +hwaddr page_mask = ~TARGET_PAGE_MASK; +hwaddr plen = (hwaddr)(-1); + +if (plen_out) { +plen = *plen_out; +} for (;;) { section =

<    1   2   3   4   5   >