Re: [Qemu-devel] [PATCH v8 7/9] qemu-img: add measure subcommand

2017-06-30 Thread Max Reitz
On 2017-06-14 17:35, Stefan Hajnoczi wrote: > The measure subcommand calculates the size required by a new image file. > This can be used by users or management tools that need to allocate > space on an LVM volume, SAN LUN, etc before creating or converting an > image file. > > Suggested-by: Maor

Re: [Qemu-devel] [PATCH v6 3/3] test-qga: add test for guest-get-osinfo

2017-06-30 Thread Marc-André Lureau
Hi, It's missing test-qga-os-release :) On Thu, Jun 29, 2017 at 11:27 PM Tomáš Golembiovský wrote: > Add test for guest-get-osinfo command. > > Qemu-ga was modified to accept QGA_OS_RELEASE environment variable. If > the variable is defined it is interpreted as path to the

[Qemu-devel] [PATCH v1 1/2] target-arm: Move the regime_xxx helpers

2017-06-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Move the regime_xxx helpers in preparation for future code that will reuse them. No functional change. Signed-off-by: Edgar E. Iglesias --- target/arm/helper.c | 404

[Qemu-devel] [Bug 1701449] [NEW] high memory usage when using rbd with client caching

2017-06-30 Thread Nick
Public bug reported: Hi, we are experiencing a quite high memory usage of a single qemu (used with KVM) process when using RBD with client caching as a disk backend. We are testing with 3GB memory qemu virtual machines and 128MB RBD client cache. When running 'fio' in the virtual machine you

[Qemu-devel] [PATCH v1 2/2] target-arm: Extend PAR format determination

2017-06-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Extend PAR format determination to handle more cases. Signed-off-by: Edgar E. Iglesias --- target/arm/helper.c | 30 +- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git

[Qemu-devel] [PATCH v1 0/2] arm: Extend PAR format determination

2017-06-30 Thread Edgar E. Iglesias
From: "Edgar E. Iglesias" Hi, These are a couple of patches that implement more details of the 32 vs 64bit PAR format determination for AT operations. This is due to issues we ran into when running Xen. Best regards, Edgar Edgar E. Iglesias (2): target-arm: Move

Re: [Qemu-devel] [PATCH 3/6] throttle: move out function to reuse the code

2017-06-30 Thread Alberto Garcia
On Thu 29 Jun 2017 05:10:53 PM CEST, Pradeep Jagadeesh wrote: > This patch move out the throttle code to util/throttle.c to maximize > the reusability of the code.The same code is also used by fsdev. > > Signed-off-by: Pradeep Jagadeesh > index 659a410..ac4f221

[Qemu-devel] [PATCH v4] hmp, qmp: introduce memory-size-summary commands

2017-06-30 Thread Vadim Galitsyn
Commands above provide the following memory information in bytes: * base-memory - amount of unremovable memory specified with '-m' option at the start of the QEMU process. * hotpluggable-memory - amount of memory that was hot-plugged. If target does not have CONFIG_MEM_HOTPLUG

[Qemu-devel] [PATCH v4] hmp, qmp: introduce memory-size-summary commands

2017-06-30 Thread Vadim Galitsyn
Hi Guys, This thread is a continuation of discussion started at http://lists.nongnu.org/archive/html/qemu-devel/2017-06/msg05972.html. Vadim

Re: [Qemu-devel] [PATCH v6 2/6] qmp: Create IOThrottle structure

2017-06-30 Thread Alberto Garcia
On Thu 29 Jun 2017 05:10:52 PM CEST, Pradeep Jagadeesh wrote: > This patch enables qmp interfaces for the fsdev > devices. This provides two interfaces one > for querying info of all the fsdev devices. The second one > to set the IO limits for the required fsdev device. > > Signed-off-by: Pradeep

[Qemu-devel] [PATCH] s390: return unavailable features via query-cpu-definitions

2017-06-30 Thread Viktor Mihajlovski
The response for query-cpu-definitions didn't include the unavailable-features field, which is used by libvirt to figure out whether a certain cpu model is usable on the host. The unavailable features are now computed by obtaining the host CPU model and comparing its feature bitmap with the

Re: [Qemu-devel] BIT_WORD(start >> TARGET_PAGE_BITS)

2017-06-30 Thread Eric Blake
On 06/30/2017 08:02 AM, ali saeedi wrote: > Hello > what does the following code do? > 'unsigned long page = BIT_WORD(start >> TARGET_PAGE_BITS)' ? I've noticed you've been asking a lot of questions (each as a new thread, rather than replying to previous answers), that seem like you are not

[Qemu-devel] [PATCH] spapr: make spapr_populate_hotplug_cpu_dt() static

2017-06-30 Thread Greg Kurz
Since commit ff9006ddbfd1 ("spapr: move spapr_core_[foo]plug() callbacks close to machine code in spapr.c"), this function doesn't need to be extern anymore. Signed-off-by: Greg Kurz --- hw/ppc/spapr.c |4 ++-- include/hw/ppc/spapr.h |2 -- 2 files changed, 2

Re: [Qemu-devel] [PATCH v6 04/10] migration: let MigrationState be a qdev

2017-06-30 Thread Eric Blake
On 06/30/2017 07:33 AM, Max Reitz wrote: >> The assertion is caused by migrate_add_blocker() called before >> initialization of migration object. I'll fix it. > > Thanks! > >> But even with a fix (so I can pass 055 now), I still cannot pass some >> of the other tests. Errors I got: >> >>

[Qemu-devel] BIT_WORD(start >> TARGET_PAGE_BITS)

2017-06-30 Thread ali saeedi
Hello what does the following code do? 'unsigned long page = BIT_WORD(start >> TARGET_PAGE_BITS)' ? thanks a lot

Re: [Qemu-devel] [Qemu-block] [RFC] QMP design: Fixing query-block and friends

2017-06-30 Thread Alberto Garcia
On Tue 27 Jun 2017 06:31:45 PM CEST, Kevin Wolf wrote: > * Speaking of recursion: ImageInfo recursively includes information > about all images in the backing chain. This is what makes the output > of query-named-block-nodes so redundant. It is also inconsistent > because the runtime

[Qemu-devel] [PATCH v2] xen-platform: Cleanup network infrastructure when emulated NICs are unplugged

2017-06-30 Thread Ross Lagerwall
When the guest unplugs the emulated NICs, cleanup the peer for each NIC as it is not needed anymore. Most importantly, this allows the tap interfaces which QEMU holds open to be closed and removed. Signed-off-by: Ross Lagerwall --- In v2: Don't call nic_cleanup(),

Re: [Qemu-devel] [PATCH v6 04/10] migration: let MigrationState be a qdev

2017-06-30 Thread Max Reitz
On 2017-06-30 09:11, Peter Xu wrote: > On Fri, Jun 30, 2017 at 11:03:21AM +0800, Peter Xu wrote: >> On Fri, Jun 30, 2017 at 04:18:56AM +0200, Max Reitz wrote: >>> On 2017-06-27 06:10, Peter Xu wrote: Let the old man "MigrationState" join the object family. Direct benefit is that we can

[Qemu-devel] [PULL 2/7] target/m68k: add fmovecr

2017-06-30 Thread Laurent Vivier
fmovecr moves a floating point constant from the FPU ROM to a floating point register. Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20170628204241.32106-3-laur...@vivier.eu>

[Qemu-devel] [PULL 5/7] target/m68k: add fsglmul and fsgldiv

2017-06-30 Thread Laurent Vivier
fsglmul and fsgldiv truncate data to single precision before computing results. Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson Message-Id: <20170628204241.32106-6-laur...@vivier.eu> --- target/m68k/fpu_helper.c | 28

[Qemu-devel] [PULL 3/7] target/m68k: add explicit single and double precision operations

2017-06-30 Thread Laurent Vivier
Add fssqrt, fdsqrt, fsadd, fdadd, fssub, fdsub, fsmul, fdmul, fsdiv, fddiv. The precision is managed using set_floatx80_rounding_precision(). Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson Message-Id: <20170628204241.32106-4-laur...@vivier.eu>

[Qemu-devel] [PULL 7/7] target/m68k: add fmovem

2017-06-30 Thread Laurent Vivier
Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson Message-Id: <20170628204241.32106-8-laur...@vivier.eu> --- target/m68k/fpu_helper.c | 120 +++ target/m68k/helper.h | 6 +++

[Qemu-devel] [PULL 4/7] softfloat: define floatx80_round()

2017-06-30 Thread Laurent Vivier
Add a function to round a floatx80 to the defined precision (floatx80_rounding_precision) Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson Reviewed-by: Aurelien Jarno Message-Id: <20170628204241.32106-5-laur...@vivier.eu>

[Qemu-devel] [PULL 6/7] target/m68k: add explicit single and double precision operations (part 2)

2017-06-30 Thread Laurent Vivier
Add fsabs, fdabs, fsneg, fdneg, fsmove and fdmove. The value is converted using the new floatx80_round() function. Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson Message-Id: <20170628204241.32106-7-laur...@vivier.eu> ---

[Qemu-devel] [PULL 0/7] M68k for 2.10 patches

2017-06-30 Thread Laurent Vivier
The following changes since commit 4c8c1cc544dbd5e2564868e61c5037258e393832: Merge remote-tracking branch 'remotes/vivier/tags/m68k-for-2.10-pull-request' into staging (2017-06-22 19:01:58 +0100) are available in the git repository at: git://github.com/vivier/qemu-m68k.git

[Qemu-devel] [PULL 1/7] target/m68k: add fscc.

2017-06-30 Thread Laurent Vivier
use DisasCompare with FPU conditions in fscc and fbcc. Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson Message-Id: <20170628204241.32106-2-laur...@vivier.eu> --- target/m68k/translate.c | 210 ++-- 1

Re: [Qemu-devel] [PULL 00/21] ppc-for-2.10 queue 20170730

2017-06-30 Thread Peter Maydell
> > are available in the git repository at: > > git://github.com/dgibson/qemu.git tags/ppc-for-2.10-20170630 > > for you to fetch changes up to 0dfabd39d523fc3f6f0f8c441f41c013cc429b52: > > spapr: Clean up DRC set_isolati

Re: [Qemu-devel] [PATCH v2] vhost: Fix use-after-free in vhost_log_put()

2017-06-30 Thread Marc-André Lureau
On Fri, Jun 30, 2017 at 2:03 PM Jia-Shiun Li wrote: > In commit 9e0bc24f dev->log_size was reset to zero too early before > syncing vhost log. It causes syncing to be skipped. > > Use local variable to keep its value before resetting. > > Signed-off-by: Jia-Shiun Li

[Qemu-devel] [PATCH v2] vhost: Fix use-after-free in vhost_log_put()

2017-06-30 Thread Jia-Shiun Li
In commit 9e0bc24f dev->log_size was reset to zero too early before syncing vhost log. It causes syncing to be skipped. Use local variable to keep its value before resetting. Signed-off-by: Jia-Shiun Li --- v1 -> v2: * Use local variable to keep value of dev->log_size. ---

[Qemu-devel] Page Block word

2017-06-30 Thread ali saeedi
Hello what is the difference between word, page and block in qemu? thanks a lot

[Qemu-devel] [PULL 6/7] tests: fix virtio-net-test ISR dependence

2017-06-30 Thread Stefan Hajnoczi
Use the new used ring APIs instead of assuming ISR being set means the request has completed. Signed-off-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Reviewed-by: Fam Zheng Tested-by: Eric Blake Tested-by: Kevin

[Qemu-devel] [PULL 5/7] tests: fix virtio-blk-test ISR dependence

2017-06-30 Thread Stefan Hajnoczi
Use the new used ring APIs instead of assuming ISR being set means the request has completed. Signed-off-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Reviewed-by: Fam Zheng Tested-by: Eric Blake Tested-by: Kevin

[Qemu-devel] [PULL 7/7] virtio-pci: use ioeventfd even when KVM is disabled

2017-06-30 Thread Stefan Hajnoczi
Old kvm.ko versions only supported a tiny number of ioeventfds so virtio-pci avoids ioeventfds when kvm_has_many_ioeventfds() returns 0. Do not check kvm_has_many_ioeventfds() when KVM is disabled since it always returns 0. Since commit 8c56c1a592b5092d91da8d8943c1d6462a6f ("memory: emulate

[Qemu-devel] [PULL 4/7] tests: fix virtio-scsi-test ISR dependence

2017-06-30 Thread Stefan Hajnoczi
Use the new used ring APIs instead of assuming ISR being set means the request has completed. Signed-off-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Reviewed-by: Fam Zheng Tested-by: Eric Blake Tested-by: Kevin

[Qemu-devel] [PULL 2/7] libqos: fix typo in virtio.h QVirtQueue->used comment

2017-06-30 Thread Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi Reviewed-by: Michael S. Tsirkin Reviewed-by: Fam Zheng Tested-by: Eric Blake Tested-by: Kevin Wolf Message-id: 20170628184724.21378-2-stefa...@redhat.com Signed-off-by:

[Qemu-devel] [PULL 3/7] libqos: add virtio used ring support

2017-06-30 Thread Stefan Hajnoczi
Existing tests do not touch the virtqueue used ring. Instead they poll the virtqueue ISR register and peek into their request's device-specific status field. It turns out that the virtqueue ISR register can be set to 1 more than once for a single notification (see commit

[Qemu-devel] [PULL 1/7] virtio-blk: trace vdev so devices can be distinguished

2017-06-30 Thread Stefan Hajnoczi
It is hard to analyze trace logs with multiple virtio-blk devices because none of the trace events include the VirtIODevice *vdev. This patch adds vdev so it's clear which device a request is associated with. I considered using VirtIOBlock *s instead but VirtIODevice *vdev is more general and

[Qemu-devel] [PULL 0/7] Block patches

2017-06-30 Thread Stefan Hajnoczi
The following changes since commit 464588675455afda2899e20a0b120e4075de50c7: Merge remote-tracking branch 'remotes/sstabellini/tags/xen-20170627-tag' into staging (2017-06-29 11:45:01 +0100) are available in the git repository at: git://github.com/stefanha/qemu.git tags/block-pull-request

Re: [Qemu-devel] [RFC 00/15] Error API: Flag errors in *errp even if errors are being ignored

2017-06-30 Thread Markus Armbruster
Eduardo Habkost writes: > On Thu, Jun 29, 2017 at 08:54:29AM +0200, Markus Armbruster wrote: >> Eduardo Habkost writes: >> >> > On Wed, Jun 28, 2017 at 11:05:26AM +0200, Markus Armbruster wrote: >> >> Eduardo Habkost writes: >

Re: [Qemu-devel] DIRTY_MEMORY_BLOCK_SIZE;

2017-06-30 Thread Dr. David Alan Gilbert
* ali saeedi (ali.saeed...@gmail.com) wrote: > Hello > what does 'DIRTY_MEMORY_BLOCK_SIZE' mean? > is it the number of words in a block? or number of pages in a block? or > number of bytes in a block? > thanks a lot (cc'ing Stefan) I think that DIRTY_MEMORY_BLOCK_SIZE is the number of

[Qemu-devel] [PATCH] target-arm: v7M: ignore writes to CONTROL.SPSEL from Thread mode

2017-06-30 Thread Peter Maydell
For v7M, writes to the CONTROL register are only permitted for privileged code. However even if the code is privileged, the write must not affect the SPSEL bit in the CONTROL register if the CPU is in Thread mode (as documented in the pseudocode for the MSR instruction). Implement this, instead of

Re: [Qemu-devel] [PULL 00/21] ppc-for-2.10 queue 20170730

2017-06-30 Thread Greg Kurz
re available in the git repository at: > > git://github.com/dgibson/qemu.git tags/ppc-for-2.10-20170630 > > for you to fetch changes up to 0dfabd39d523fc3f6f0f8c441f41c013cc429b52: > > spapr: Clean up DRC s

Re: [Qemu-devel] [PATCH] vhost: Fix use-after-free in vhost_log_put()

2017-06-30 Thread jsli
On 2017-06-29 05:12, Marc-André Lureauwrote: > Hi > > On Fri, Jun 23, 2017 at 6:28 AM Jia-Shiun > Liwrote: > > In commit 9e0bc24f dev->log_size was reset to zero too early before > > syncing vhost log. It causes syncing

[Qemu-devel] [PULL 17/21] spapr: Eliminate DRC 'signalled' state variable

2017-06-30 Thread David Gibson
The 'signalled' field in the DRC appears to be entirely a torturous workaround for the fact that PCI devices were started in UNISOLATED state for unclear reasons. 1) 'signalled' is already meaningless for logical (so far, all non PCI) DRCs. It's always set to true (at least at any point it might

Re: [Qemu-devel] [PATCH v4 10/13] hmp: add hmp analogue for qmp-chardev-change

2017-06-30 Thread Dr. David Alan Gilbert
* Anton Nefedov (anton.nefe...@virtuozzo.com) wrote: > Signed-off-by: Anton Nefedov > Reviewed-by: Vladimir Sementsov-Ogievskiy > CC: Dr. David Alan Gilbert Acked-by: Dr. David Alan Gilbert > ---

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

2017-06-30 Thread Peter Maydell
On 29 June 2017 at 17:30, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > The following changes since commit 454d7dc9bc13e46084e0612076e6952c40f4afeb: > > Merge remote-tracking branch 'remotes/gkurz/tags/for-upstream' into

[Qemu-devel] DIRTY_MEMORY_BLOCK_SIZE;

2017-06-30 Thread ali saeedi
Hello what does 'DIRTY_MEMORY_BLOCK_SIZE' mean? is it the number of words in a block? or number of pages in a block? or number of bytes in a block? thanks a lot

[Qemu-devel] [PULL 12/21] target/ppc: Proper cleanup when ppc_cpu_realizefn fails

2017-06-30 Thread David Gibson
From: Bharata B Rao If ppc_cpu_realizefn() fails after cpu_exec_realizefn() has been called, we will have to undo whatever cpu_exec_realizefn() did by explicitly calling cpu_exec_unrealizeffn() which is currently missing. Failure to do this proper cleanup will result

Re: [Qemu-devel] [PATCH v3 0/2] main_loop: Make main_loop_wait() return void

2017-06-30 Thread Paolo Bonzini
On 27/06/2017 19:32, Peter Maydell wrote: > This patchset removes the useless return value from > main_loop_wait(). > > Changes v2->v3: > * add initial patch which removes the use of the return value >from the version of main_loop in test-char.c -- it didn't >really need it anyway. >

[Qemu-devel] [PULL 13/21] spapr: prevent QEMU crash when CPU realization fails

2017-06-30 Thread David Gibson
From: Bharata B Rao ICPState objects were being allocated before CPU thread realization. However commit 9ed656631d73 (xics: setup cpu at realize time) reversed it by allocating ICPState objects after CPU thread is realized. But it didn't take care to fix the error

[Qemu-devel] [PULL 21/21] spapr: Clean up DRC set_isolation_state() path

2017-06-30 Thread David Gibson
There are substantial differences in the various paths through set_isolation_state(), both for setting to ISOLATED versus UNISOLATED state and for logical versus physical DRCs. So, split the set_isolation_state() method into isolate() and unisolate() methods, and give it different implementations

[Qemu-devel] [PULL 16/21] spapr: Start hotplugged PCI devices in ISOLATED state

2017-06-30 Thread David Gibson
PCI DRCs, and only PCI DRCs, are immediately moved to UNISOLATED isolation state once the device is attached. This has been there from the initial implementation, and it's not clear why. The state diagram in PAPR 13.4 suggests PCI devices should start in ISOLATED state until the guest moves them

[Qemu-devel] [PULL 03/21] pseries: Move CPU compatibility property to machine

2017-06-30 Thread David Gibson
Server class POWER CPUs have a "compat" property, which is used to set the backwards compatibility mode for the processor. However, this only makes sense for machine types which don't give the guest access to hypervisor privilege - otherwise the compatibility level is under the guest's control.

[Qemu-devel] [PULL 14/21] hw/ppc/spapr.c: consecutive 'spapr->patb_entry = 0' statements

2017-06-30 Thread David Gibson
From: Daniel Henrique Barboza In ppc_spapr_reset(), if the guest is using HPT, the code was executing: } else { spapr->patb_entry = 0; spapr_setup_hpt_and_vrma(spapr); } And, at the end of spapr_setup_hpt_and_vrma: /* We're setting up a

[Qemu-devel] [PULL 11/21] spapr: fix migration of ICPState objects from/to older QEMU

2017-06-30 Thread David Gibson
From: Greg Kurz Commit 5bc8d26de20c ("spapr: allocate the ICPState object from under sPAPRCPUCore") moved ICPState objects from the machine to CPU cores. This is an improvement since we no longer allocate ICPState objects that will never be used. But it has the side-effect of

[Qemu-devel] [PULL 15/21] target-ppc: Enable open-pic timers to count and generate interrupts

2017-06-30 Thread David Gibson
From: Aaron Larson Previously QEMU open-pic implemented the 4 open-pic timers including all timer registers, but the timers did not "count" or generate any interrupts. The patch makes the timers both count and generate interrupts. The timer clock frequency is fixed at 25MHZ.

[Qemu-devel] [PULL 05/21] ppc: Rework CPU compatibility testing across migration

2017-06-30 Thread David Gibson
Migrating between different CPU versions is a bit complicated for ppc. A long time ago, we ensured identical CPU versions at either end by checking the PVR had the same value. However, this breaks under KVM HV, because we always have to use the host's PVR - it's not virtualized. That would mean

[Qemu-devel] [PULL 19/21] spapr: Make DRC reset force DRC into known state

2017-06-30 Thread David Gibson
The reset handler for DRCs attempts several state transitions which are subject to various checks and restrictions. But at reset time we know there is no guest, so we can ignore most of the usual sequencing rules and just set the DRC back to a known state. In fact, it's safer to do so. The

[Qemu-devel] [PULL 08/21] target/ppc/excp_helper: Take BQL before calling cpu_interrupt()

2017-06-30 Thread David Gibson
From: Thomas Huth Since the introduction of MTTCG, using the msgsnd instruction abort()s if being called without holding the BQL. So let's protect that part of the code now with qemu_mutex_lock_iothread(). Buglink: https://bugs.launchpad.net/qemu/+bug/1694998 Signed-off-by:

[Qemu-devel] [PULL 06/21] spapr: Add a "no HPT" encoding to HTAB migration stream

2017-06-30 Thread David Gibson
From: Bharata B Rao Add a "no HPT" encoding (using value -1) to the HTAB migration stream (in the place of HPT size) when the guest doesn't allocate HPT. This will help the target side to match target HPT with the source HPT and thus enable successful migration.

[Qemu-devel] [PULL 04/21] pseries: Reset CPU compatibility mode

2017-06-30 Thread David Gibson
Currently, the CPU compatibility mode is set when the cpu is initialized, then again when the guest negotiates features. This means if a guest negotiates a compatibility mode, then reboots, that compatibility mode will be retained across the reset. Usually that will get overridden when features

[Qemu-devel] [PULL 09/21] target/ppc: Fix return value in tcg radix mmu fault handler

2017-06-30 Thread David Gibson
From: Suraj Jitindar Singh The mmu fault handler should return 0 if it was able to successfully handle the fault and a positive value otherwise. Currently the tcg radix mmu fault handler will return 1 after successfully handling a fault in virtual mode. This is

[Qemu-devel] [PULL 00/21] ppc-for-2.10 queue 20170730

2017-06-30 Thread David Gibson
The following changes since commit c5eb5846d2d207bbde7f4b665d9ff90b92c8adff: Merge remote-tracking branch 'remotes/dgilbert/tags/pull-hmp-20170629' into staging (2017-06-29 17:37:11 +0100) are available in the git repository at: git://github.com/dgibson/qemu.git tags/ppc-for-2.10-20170630

[Qemu-devel] [PULL 18/21] spapr: Split DRC release from DRC detach

2017-06-30 Thread David Gibson
spapr_drc_detach() is called when qemu generic code requests a device be unplugged. It makes a number of tests, which could well delay further action until later, before actually detach the device from the DRC. This splits out the part which actually removes the device from the DRC into

[Qemu-devel] [PULL 07/21] spapr: Fix migration of Radix guests

2017-06-30 Thread David Gibson
From: Bharata B Rao Fix migration of radix guests by ensuring that we issue KVM_PPC_CONFIGURE_V3_MMU for radix case post migration. Reported-by: Nageswara R Sastry Signed-off-by: Bharata B Rao Reviewed-by:

[Qemu-devel] [PULL 01/21] hw/ppc/prep: Remove superfluous call to soundhw_init()

2017-06-30 Thread David Gibson
From: Thomas Huth When using the 40p machine, soundhw_init() is currently called twice, one time from vl.c and one time from ibm_40p_init(). The call in ibm_40p_init() was likely just a copy-and-paste from a old version of the prep machine - but there the call to audio_init()

[Qemu-devel] [PULL 02/21] qapi: add explicit null to string input and output visitors

2017-06-30 Thread David Gibson
From: Greg Kurz This may be used for deprecated object properties that are kept for backwards compatibility. Signed-off-by: Greg Kurz Reviewed-by: Markus Armbruster Tested-by: Andrea Bolognani Signed-off-by: David Gibson

[Qemu-devel] [PULL 20/21] spapr: Clean up DRC set_allocation_state path

2017-06-30 Thread David Gibson
The allocation-state indicator should only actually be implemented for "logical" DRCs, not physical ones. Factor a check for this, and also for valid indicator state values into rtas_set_allocation_state(). Because they don't exist for physical DRCs, there's no reason that we'd ever want more

[Qemu-devel] [PULL 10/21] xics: directly register ICPState objects to vmstate

2017-06-30 Thread David Gibson
From: Greg Kurz The ICPState objects are currently registered to vmstate as qdev objects. Their instance ids are hence computed automatically in the migration code, and thus depends on the order the CPU cores were plugged. If the destination had its CPU cores plugged in a

Re: [Qemu-devel] [PATCH] qom: enforce readonly nature of link's check callback

2017-06-30 Thread Paolo Bonzini
On 29/06/2017 13:14, Igor Mammedov wrote: > link's check callback is supposed to verify/permit setting it, > however currently nothing restricts it from misusing it > and modifying target object from within. > Make sure that readonly semantics are checked by compiler > to prevent callback's

Re: [Qemu-devel] [RFC v1 2/4] util/oslib-win32: Remove invalid check

2017-06-30 Thread Paolo Bonzini
On 29/06/2017 18:37, Alistair Francis wrote: >> Hmm, I think it's possible, poll_msgs is true here. > poll_msgs? > > If nhandles is 0 then we have already entered an earlier if statement > and set ready to either WAIT_FAILED or WAIT_TIMEOUT in which case we > can't enter this part of the if

Re: [Qemu-devel] [Qemu-ppc] [PATCH] target/ppc/cpu-models: set POWER9_v1.0 as POWER9 DD1

2017-06-30 Thread Michael Ellerman
Cédric Le Goater writes: According to https://patchwork.ozlabs.org/patch/776052/ POWER9 DD2's PVR is expected to be 0x004e1200 >> >> Uh.. I spoke to Michael Ellerman, and he said he expected 0x004e0200. >> Though he did mention there might be several variants. Can

Re: [Qemu-devel] [Qemu-ppc] [PATCH] spapr: refresh "platform-specific" hcalls comment

2017-06-30 Thread Thomas Huth
On 30.06.2017 12:05, Greg Kurz wrote: > We have more of these since the addition of KVMPPC_H_LOGICAL_MEMOP in 2012. Right, and we don't need one for virtio :-) > Signed-off-by: Greg Kurz > --- > include/hw/ppc/spapr.h |5 ++--- > 1 file changed, 2 insertions(+), 3

Re: [Qemu-devel] [PATCH 0/6] virtio: use ioeventfd in TCG and qtest mode

2017-06-30 Thread Stefan Hajnoczi
On Wed, Jun 28, 2017 at 07:47:18PM +0100, Stefan Hajnoczi wrote: > This patch series fixes qemu-iotests 068. Since commit > ea4f3cebc4e0224605ab9dd9724aa4e7768fe372 ("qemu-iotests: 068: test iothread > mode") the test case has attempted to use dataplane without -M accel=kvm. > Although QEMU is

[Qemu-devel] [PATCH v7 3/3] migration: add bitmap for received page

2017-06-30 Thread Alexey Perevalov
This patch adds ability to track down already received pages, it's necessary for calculation vCPU block time in postcopy migration feature, maybe for restore after postcopy migration failure. Also it's necessary to solve shared memory issue in postcopy livemigration. Information about received

[Qemu-devel] [PATCH v7 1/3] migration: postcopy_place_page factoring out

2017-06-30 Thread Alexey Perevalov
Need to mark copied pages as closer as possible to the place where it tracks down. That will be necessary in futher patch. Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: Alexey

[Qemu-devel] [PATCH v7 2/3] migration: introduce qemu_ufd_copy_ioctl helper

2017-06-30 Thread Alexey Perevalov
Just for placing auxilary operations inside helper, auxilary operations like: track received pages, notify about copying operation in futher patches. Reviewed-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu

[Qemu-devel] Running QEMU for Microblaze

2017-06-30 Thread Ormaetxea Xabier
Hello! I'm trying to run QEMU-Microblaze (Little-endian) with a standalone app in some different ways, but none of them works for me: 1) I have created my own .DTB from my system design (.HDF), just a microblaze connected to the Uartlite AXI, leds, interrupt controller, and a gpio.

Re: [Qemu-devel] [PATCH v1 2/3] util/oslib-win32: Remove invalid check

2017-06-30 Thread Peter Maydell
On 29 June 2017 at 18:16, Alistair Francis wrote: > There is no way nhandles can be zero in this section so that part of the > if statement will always be false. Let's just remove it to make the code > easier to read. > > Signed-off-by: Alistair Francis

[Qemu-devel] [PATCH] spapr: refresh "platform-specific" hcalls comment

2017-06-30 Thread Greg Kurz
We have more of these since the addition of KVMPPC_H_LOGICAL_MEMOP in 2012. Signed-off-by: Greg Kurz --- include/hw/ppc/spapr.h |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h index

Re: [Qemu-devel] [PATCH v1 2/3] util/oslib-win32: Remove invalid check

2017-06-30 Thread Paolo Bonzini
On 29/06/2017 19:16, Alistair Francis wrote: > There is no way nhandles can be zero in this section so that part of the > if statement will always be false. Let's just remove it to make the code > easier to read. > > Signed-off-by: Alistair Francis > Acked-by:

Re: [Qemu-devel] [PATCH] tests: Avoid non-portable 'echo -ARG'

2017-06-30 Thread Stefan Hajnoczi
On Wed, Jun 28, 2017 at 09:21:37AM -0500, Eric Blake wrote: > POSIX says that backslashes in the arguments to 'echo', as well as > any use of 'echo -n' and 'echo -e', are non-portable; it recommends > people should favor 'printf' instead. This is definitely true where > we do not control which

[Qemu-devel] [PATCH] spapr: fix bogus function name in comment

2017-06-30 Thread Greg Kurz
$ git grep spapr_ppc_reset hw/ppc/spapr.c: * as part of spapr_ppc_reset(). $ git grep ppc_spapr_reset hw/ppc/spapr.c:static void ppc_spapr_reset(void) hw/ppc/spapr.c:mc->reset = ppc_spapr_reset; hw/ppc/spapr_hcall.c:/* If ppc_spapr_reset() did not set up a HPT but one is necessary

Re: [Qemu-devel] [PATCH v6 5/6] fsdev: hmp interface for throttling

2017-06-30 Thread Dr. David Alan Gilbert
* Pradeep Jagadeesh (pradeepkiruv...@gmail.com) wrote: > This patch introduces hmp interfaces for the fsdev > devices. > > Signed-off-by: Pradeep Jagadeesh > --- > hmp-commands-info.hx | 18 ++ > hmp-commands.hx | 19 +++ > hmp.c

Re: [Qemu-devel] [RFC PATCH 0/8] removal of tci (tcg interpreter)

2017-06-30 Thread Peter Maydell
On 29 June 2017 at 19:09, Stefan Weil wrote: > Nevertheless QEMU is the only software which I know which not > only addresses the needs for server / PC virtualisation, but > also is useful for researchers and scientists, archivists, > learners and teachers or experimenters. > >

Re: [Qemu-devel] [PATCH v6 4/6] hmp: create a throttle initialization function

2017-06-30 Thread Dr. David Alan Gilbert
* Pradeep Jagadeesh (pradeepkiruv...@gmail.com) wrote: > This patch creates a throttle initialization function to maximize the > code reusability. The same code is also used by fsdev. > > Signed-off-by: Pradeep Jagadeesh Acked-by: Dr. David Alan Gilbert

Re: [Qemu-devel] [PATCH v5 3/5] virtio-9p: break device if buffers are misconfigured

2017-06-30 Thread Greg Kurz
On Fri, 30 Jun 2017 02:33:22 +0300 "Michael S. Tsirkin" wrote: > On Wed, Jun 28, 2017 at 10:44:30PM +0200, Greg Kurz wrote: > > The 9P protocol is transport agnostic: if the guest misconfigured the > > buffers, the best we can do is to set the broken flag on the device. > > > >

Re: [Qemu-devel] [PATCH v1 2/3] arm: fix the armv7m reset state

2017-06-30 Thread Peter Maydell
On 30 June 2017 at 09:24, KONRAD Frederic wrote: > On 06/29/2017 06:45 PM, Peter Maydell wrote: >> It's the same thing, though, right? If the user's ELF file >> says "vector table is at 0x800" then we should either >> (a) say that's a user error, or >> (b) handle

Re: [Qemu-devel] [RFC v2 2/3] qemu-error: Implement a more generic error reporting

2017-06-30 Thread Daniel P. Berrange
On Thu, Jun 29, 2017 at 12:42:38PM -0700, Alistair Francis wrote: > This patch removes the exisinting error_vreport() function and replaces it > with a more generic vreport() function that takes an enum describing the > information to be reported. > > As part of this change a report() function is

Re: [Qemu-devel] [Qemu-ppc] [PATCH] target/ppc/cpu-models: set POWER9_v1.0 as POWER9 DD1

2017-06-30 Thread Laurent Vivier
On 30/06/2017 09:12, David Gibson wrote: > On Thu, Jun 29, 2017 at 03:42:03PM +1000, Suraj Jitindar Singh wrote: >> On Thu, 2017-06-29 at 15:37 +1000, Suraj Jitindar Singh wrote: >>> On Wed, 2017-06-28 at 18:41 +0200, Greg Kurz wrote: ... >>> That makes the assumption that DD2 doesn't require any

Re: [Qemu-devel] [RFC 0/7] tcg: parallel code generation (Work in Progress)

2017-06-30 Thread Richard Henderson
On 06/29/2017 01:28 PM, Emilio G. Cota wrote: - Patches 2-3 remove *tbs[] to use a binary search tree instead. This removes the assumption in tb_find_pc that *tbs[] are ordered by tc_ptr, thereby allowing us to generate code regardless of its location on the host (as we do after patch

Re: [Qemu-devel] [PATCH v1 2/3] arm: fix the armv7m reset state

2017-06-30 Thread KONRAD Frederic
On 06/29/2017 06:45 PM, Peter Maydell wrote: On 29 June 2017 at 17:41, KONRAD Frederic wrote: On 06/29/2017 05:14 PM, Peter Maydell wrote: This is awkward, because in the "we have a ROM but it's not been copied into memory yet" case, the only thing we have is

Re: [Qemu-devel] [RFC 6/7] [XXX] tcg: make TCGContext thread-local for softmmu

2017-06-30 Thread Richard Henderson
On 06/29/2017 01:28 PM, Emilio G. Cota wrote: This will allow us to generate TCG code in parallel. User-mode is kept out of this: contention due to concurrent translation is more commonly found in full-system mode (e.g. booting a many-core guest). XXX: For now, only convert arm/a64, since

Re: [Qemu-devel] [RFC 5/7] tcg: take tb_ctx out of TCGContext

2017-06-30 Thread Richard Henderson
On 06/29/2017 01:28 PM, Emilio G. Cota wrote: Before TCGContext is made thread-local. Signed-off-by: Emilio G. Cota --- include/exec/tb-context.h | 2 ++ tcg/tcg.h | 2 -- accel/tcg/cpu-exec.c | 2 +- accel/tcg/translate-all.c | 57

Re: [Qemu-devel] [Qemu-ppc] [PATCH] target/ppc/cpu-models: set POWER9_v1.0 as POWER9 DD1

2017-06-30 Thread Cédric Le Goater
>>> According to https://patchwork.ozlabs.org/patch/776052/ >>> >>> POWER9 DD2's PVR is expected to be 0x004e1200 > > Uh.. I spoke to Michael Ellerman, and he said he expected 0x004e0200. > Though he did mention there might be several variants. Can we please > get a definitive answer on this

Re: [Qemu-devel] [RFC 4/7] translate-all: report correct avg host TB size

2017-06-30 Thread Richard Henderson
On 06/29/2017 01:28 PM, Emilio G. Cota wrote: +int *size = data; I'd really prefer you use size_t for all of these. r~

Re: [Qemu-devel] [RFC 3/7] translate-all: use a binary search tree to track TBs in TBContext

2017-06-30 Thread Richard Henderson
On 06/30/2017 12:41 AM, Richard Henderson wrote: On 06/29/2017 01:28 PM, Emilio G. Cota wrote: +/* @key is already in the tree so it's safe to use container_of on it */ +static gint tc_ptr_cmp(gconstpointer candidate, gconstpointer key) +{ +uintptr_t a = *(uintptr_t *)candidate; +const

Re: [Qemu-devel] [RFC 3/7] translate-all: use a binary search tree to track TBs in TBContext

2017-06-30 Thread Richard Henderson
On 06/29/2017 01:28 PM, Emilio G. Cota wrote: +/* @key is already in the tree so it's safe to use container_of on it */ +static gint tc_ptr_cmp(gconstpointer candidate, gconstpointer key) +{ +uintptr_t a = *(uintptr_t *)candidate; +const TranslationBlock *tb = container_of(key,

Re: [Qemu-devel] [Qemu-ppc] [PATCH] target/ppc/cpu-models: set POWER9_v1.0 as POWER9 DD1

2017-06-30 Thread David Gibson
On Thu, Jun 29, 2017 at 03:42:03PM +1000, Suraj Jitindar Singh wrote: > On Thu, 2017-06-29 at 15:37 +1000, Suraj Jitindar Singh wrote: > > On Wed, 2017-06-28 at 18:41 +0200, Greg Kurz wrote: > > > On Wed, 28 Jun 2017 18:18:06 +0200 > > > Laurent Vivier wrote: > > > > > > > On

Re: [Qemu-devel] [Qemu-ppc] [PATCH] target/ppc/cpu-models: set POWER9_v1.0 as POWER9 DD1

2017-06-30 Thread David Gibson
On Wed, Jun 28, 2017 at 06:18:06PM +0200, Laurent Vivier wrote: > On 28/06/2017 13:59, Greg Kurz wrote: > > On Wed, 28 Jun 2017 12:23:06 +0200 > > Cédric Le Goater wrote: > > > >> On 06/28/2017 11:18 AM, Laurent Vivier wrote: > >>> On 28/06/2017 11:11, Cédric Le Goater wrote: >

<    1   2   3   >