[Qemu-devel] [PULL 03/18] migration: Add comments to channel functions

2017-09-22 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Daniel P. Berrange --- migration/channel.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/migration/channel.c b/migration/channel.c index edceebdb7b..70ec7ea3b7 100644 ---

[Qemu-devel] [PULL 13/18] migration: add has_postcopy savevm handler

2017-09-22 Thread Juan Quintela
From: Vladimir Sementsov-Ogievskiy Now postcopy-able states are recognized by not NULL save_live_complete_postcopy handler. But when we have several different postcopy-able states, it is not convenient. Ram postcopy may be disabled, while some other postcopy enabled, in

[Qemu-devel] [PULL 11/18] bitmap: introduce bitmap_count_one()

2017-09-22 Thread Juan Quintela
From: Peter Xu Count how many bits set in the bitmap. Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Peter Xu Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela ---

[Qemu-devel] [PULL 09/18] migration: Split migration_fd_process_incoming

2017-09-22 Thread Juan Quintela
We need that on later patches. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu Reviewed-by: Daniel P. Berrange --- migration/migration.c | 14 -- 1 file

[Qemu-devel] [PULL 18/18] migration: split ufd_version_check onto receive/request features part

2017-09-22 Thread Juan Quintela
From: Alexey Perevalov This modification is necessary for userfault fd features which are required to be requested from userspace. UFFD_FEATURE_THREAD_ID is a one of such "on demand" feature, which will be introduced in the next patch. QEMU have to use separate

[Qemu-devel] [PATCH v7 1/8] tpm-backend: Remove unneeded member variable from backend class

2017-09-22 Thread Amarnath Valluri
TPMDriverOps inside TPMBackend is not required, as it is supposed to be a class member. The only possible reason for keeping in TPMBackend was, to get the backend type in tpm.c where dedicated backend api, tpm_backend_get_type() is present. Signed-off-by: Amarnath Valluri

[Qemu-devel] [PATCH v7 3/8] tpm-backend: Initialize and free data members in it's own methods

2017-09-22 Thread Amarnath Valluri
Initialize and free TPMBackend data members in it's own instance_init() and instance_finalize methods. Took the opportunity to remove unneeded destroy() method from TpmDriverOps interface as TPMBackend is a Qemu Object, we can use object_unref() inplace of tpm_backend_destroy() to free the

Re: [Qemu-devel] [PATCH v2 1/3] block: add bdrv_co_drain_end callback

2017-09-22 Thread Fam Zheng
On Fri, 09/22 13:03, Kevin Wolf wrote: > Am 22.09.2017 um 04:30 hat Fam Zheng geschrieben: > > On Thu, 09/21 18:39, Manos Pitsidianakis wrote: > > > On Thu, Sep 21, 2017 at 09:29:43PM +0800, Fam Zheng wrote: > > > > On Thu, 09/21 16:17, Manos Pitsidianakis wrote: > > > It might imply to someone

Re: [Qemu-devel] [PATCH 1/3] iothread: provide helpers for internal use

2017-09-22 Thread Fam Zheng
On Fri, 09/22 11:17, Daniel P. Berrange wrote: > Sorry yes, my bad - its the iothread behind the monitor. I still think that > is a detail worth keeping private in case we want to refactor how the > monitor threading works later. I agree. I convinced Peter to reuse IOThread just because we can,

Re: [Qemu-devel] [PATCH v2] ide: fix enum comparison for gcc 4.7

2017-09-22 Thread Peter Maydell
On 21 September 2017 at 13:25, Stefan Hajnoczi wrote: > On Wed, Sep 20, 2017 at 09:38:21PM -0400, John Snow wrote: >> Apparently GCC gets bent over comparing enum values against zero. >> Replace the conditional with something less readable. >> >> Tested-by: Mark Cave-Ayland

Re: [Qemu-devel] [PATCH 3/3] iothread: delay the context release to finalize

2017-09-22 Thread Fam Zheng
On Fri, 09/22 16:56, Peter Xu wrote: > When gcontext is used with iothread, the context will be destroyed > during iothread_stop(). That's not good since sometimes we would like > to keep the resources until iothread is destroyed, but we may want to > stop the thread before that point. Would be

[Qemu-devel] [PATCH v3 3/5] fw_cfg: do DMA read operation

2017-09-22 Thread marcandre . lureau
From: Marc-André Lureau Modify fw_cfg_read_blob() to use DMA if the device supports it. Return errors, because the operation may fail. This is a proof-of-concept patch with some FIXME. It uses yield() to wait for the memory to be cleared. Help on how to improve this

Re: [Qemu-devel] [PATCH 1/2] s390x/3270: IDA support for 3270 via CcwDataStream

2017-09-22 Thread Cornelia Huck
On Thu, 21 Sep 2017 18:11:06 +0200 Halil Pasic wrote: > So, there is nothing to be addressed about about this series so far. > Does this mean good for inclusion once prerequisites are met -- unless > somebody finds something? It is in my pipeline, and I currently don't

Re: [Qemu-devel] [PATCH] ppc/pnv: fix cores per chip for multiple cpus

2017-09-22 Thread David Gibson
On Fri, Sep 22, 2017 at 12:56:40PM +0200, Cédric Le Goater wrote: > On 09/22/2017 08:00 AM, Nikunj A Dadhania wrote: > > David Gibson writes: > > > > > > As smp_thread defaults to 1 in vl.c, similarly smp_cores also has the > > default value of 1 in vl.c.

Re: [Qemu-devel] [RFC v2 25/33] migration: setup ramstate for resume

2017-09-22 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > After we updated the dirty bitmaps of ramblocks, we also need to update > the critical fields in RAMState to make sure it is ready for a resume. > > Signed-off-by: Peter Xu > --- > migration/ram.c| 37

Re: [Qemu-devel] [PATCH] ppc/pnv: fix cores per chip for multiple cpus

2017-09-22 Thread David Gibson
On Fri, Sep 22, 2017 at 01:37:39PM +0200, Cédric Le Goater wrote: > >> well, it would be good to be able to define chips with different > >> numbers of cpus. That is something will we want to do for sure. > > > > You mean multiple chips in a single system with non-uniform numbers of > > cores?

Re: [Qemu-devel] [PATCH RFC 1/6] xen: link against xentoolcore

2017-09-22 Thread Juergen Gross
On 15/09/17 20:09, Ian Jackson wrote: > Signed-off-by: Ian Jackson > --- > configure | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/configure b/configure > index fd7e3a5..c59a0c0 100755 > --- a/configure > +++ b/configure > @@ -2072,14

[Qemu-devel] [PULL 07/18] migration: Create x-multifd-page-count parameter

2017-09-22 Thread Juan Quintela
Indicates how many pages we are going to send in each batch to a multifd thread. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu -- Be consistent with defaults and documentation Use new

[Qemu-devel] [PULL 00/18] Migration PULL request (3rd try)

2017-09-22 Thread Juan Quintela
git://github.com/juanquintela/qemu.git tags/migration/20170922-1 for you to fetch changes up to 54ae0886b12c4934e84381af777d4df6147cc2ec: migration: split ufd_version_check onto receive/request features part (2017-09-22 14:11:29 +0

[Qemu-devel] [PULL 02/18] migration: Teach it about G_SOURCE_REMOVE

2017-09-22 Thread Juan Quintela
As this is defined on glib 2.32, add compatibility macros for older glibs. Signed-off-by: Juan Quintela Reviewed-by: Daniel P. Berrange Reviewed-by: Peter Xu --- include/glib-compat.h | 2 ++ migration/exec.c | 2 +-

[Qemu-devel] [PULL 06/18] migration: Create x-multifd-channels parameter

2017-09-22 Thread Juan Quintela
Indicates the number of channels that we will create. By default we create 2 channels. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Peter Xu -- Catch inconsistent defaults (eric). Improve comment

Re: [Qemu-devel] [RFC PATCH v2 07/21] ppc/xive: add MMIO handlers for the XIVE interrupt sources

2017-09-22 Thread Cédric Le Goater
On 09/22/2017 12:58 PM, David Gibson wrote: > On Wed, Sep 20, 2017 at 02:54:31PM +0200, Cédric Le Goater wrote: >> On 09/19/2017 04:57 AM, David Gibson wrote: >>> On Mon, Sep 11, 2017 at 07:12:21PM +0200, Cédric Le Goater wrote: Each interrupt source is associated with a two bit state machine

[Qemu-devel] [PULL 15/18] migration: split common postcopy out of ram postcopy

2017-09-22 Thread Juan Quintela
From: Vladimir Sementsov-Ogievskiy Split common postcopy staff from ram postcopy staff. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela

[Qemu-devel] [PATCH v7 6/8] tpm-backend: Move realloc_buffer() implementation to tpm-tis model

2017-09-22 Thread Amarnath Valluri
buffer reallocation is very unlikely to be backend specific. Hence move inside the tis. Signed-off-by: Amarnath Valluri Reviewed-by: Stefan Berger Reviewed-by: Marc-André Lureau --- backends/tpm.c

[Qemu-devel] [PATCH v7 4/8] tpm-backend: Made few interface methods optional

2017-09-22 Thread Amarnath Valluri
This allows backend implementations left optional interface methods. For mandatory methods assertion checks added. Took the opportunity to remove unused tpm_backend_get_desc() method Signed-off-by: Amarnath Valluri Reviewed-by: Marc-André Lureau

[Qemu-devel] [PATCH v7 5/8] tmp backend: Add new api to read backend TpmInfo

2017-09-22 Thread Amarnath Valluri
TPM configuration options are backend implementation details and shall not be part of base TPMBackend object, and these shall not be accessed directly outside of the class, hence added a new interface method, get_tpm_options() to TPMDriverOps., which shall be implemented by the derived classes to

Re: [Qemu-devel] [RFC PATCH v2 01/21] ppc/xive: introduce a skeleton for the sPAPR XIVE interrupt controller

2017-09-22 Thread Cédric Le Goater
On 09/22/2017 01:00 PM, David Gibson wrote: > On Tue, Sep 19, 2017 at 03:15:44PM +0200, Cédric Le Goater wrote: >> On 09/19/2017 04:27 AM, David Gibson wrote: >>> On Mon, Sep 11, 2017 at 07:12:15PM +0200, Cédric Le Goater wrote: Start with a couple of attributes for the XIVE sPAPR controller

Re: [Qemu-devel] [PATCH/RFC 2/3] s390x/ais: enable ais when migration is available

2017-09-22 Thread Christian Borntraeger
On 09/22/2017 02:13 PM, Pierre Morel wrote: > On 22/09/2017 10:38, Christian Borntraeger wrote: >> Instead of unconditionally enabling the KVM AIS capability >> in the kvm arch init function, do this in the flic realize function >> when we know if migration is available. This requires to

Re: [Qemu-devel] [PATCH 1/3] iothread: provide helpers for internal use

2017-09-22 Thread Paolo Bonzini
On 22/09/2017 14:59, Fam Zheng wrote: > On Fri, 09/22 11:17, Daniel P. Berrange wrote: >> Sorry yes, my bad - its the iothread behind the monitor. I still think that >> is a detail worth keeping private in case we want to refactor how the >> monitor threading works later. > I agree. I convinced

Re: [Qemu-devel] [RFC v2 24/33] migration: synchronize dirty bitmap for resume

2017-09-22 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > This patch implements the first part of core RAM resume logic for > postcopy. ram_resume_prepare() is provided for the work. > > When the migration is interrupted by network failure, the dirty bitmap > on the source side will be meaningless, because even

Re: [Qemu-devel] [PATCH v11 1/6] throttle: factor out duplicate code

2017-09-22 Thread Pradeep Jagadeesh
On 9/18/2017 6:20 PM, Manos Pitsidianakis wrote: On Thu, Sep 14, 2017 at 06:40:05AM -0400, Pradeep Jagadeesh wrote: This patch factors out the duplicate throttle code that was still present in block and fsdev devices. Signed-off-by: Pradeep Jagadeesh Reviewed-by:

Re: [Qemu-devel] [PULL v5 00/36] Build and test automation patches

2017-09-22 Thread Peter Maydell
On 22 September 2017 at 08:46, Fam Zheng wrote: > The following changes since commit 0a8066f0c068f1e318a1aacd7864fc00e455a37b: > > Merge remote-tracking branch > 'remotes/pmaydell/tags/pull-target-arm-20170921' into staging (2017-09-21 > 17:42:27 +0100) > > are available in

Re: [Qemu-devel] [RFC v2 26/33] migration: final handshake for the resume

2017-09-22 Thread Dr. David Alan Gilbert
* Peter Xu (pet...@redhat.com) wrote: > Finish the last step to do the final handshake for the recovery. > > First source sends one MIG_CMD_RESUME to dst, telling that source is > ready to resume. > > Then, dest replies with MIG_RP_MSG_RESUME_ACK to source, telling that > dest is ready to resume

[Qemu-devel] [PATCH v12 4/6] hmp: create a throttle initialization function for code reuse

2017-09-22 Thread Pradeep Jagadeesh
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 Reviewed-by: Alberto Garcia Reviewed-by: Greg Kurz Acked-by: Dr. David

[Qemu-devel] [PATCH v12 0/6] fsdev: qmp interface for io throttling

2017-09-22 Thread Pradeep Jagadeesh
These patches provide the qmp interface, to query the io throttle status of the all fsdev devices that are present in a vm. also, it provides an interface to set the io throttle parameters of a fsdev to a required value. Some of the patches also remove the duplicate code that was present in block

[Qemu-devel] [PATCH v12 2/6] qmp: Use ThrottleLimits structure

2017-09-22 Thread Pradeep Jagadeesh
This patch factors out code to use the ThrottleLimits structure. Signed-off-by: Pradeep Jagadeesh --- qapi/block-core.json | 75 +++- 1 file changed, 3 insertions(+), 72 deletions(-) diff --git a/qapi/block-core.json

[Qemu-devel] [PATCH v2 0/2] xen: fix gnttab handling with old dom0 kernels

2017-09-22 Thread Juergen Gross
Trying to start a domain with a qdisk backend on an old dom0 kernel (non-pvops xen kernel) will fail as xengnttab_set_max_grants() will succeed only if called directly after opening the gnttab device. These two patches address the issue by: - moving the test for availability of

[Qemu-devel] [PATCH v2 2/2] xen: dont try setting max grants multiple times

2017-09-22 Thread Juergen Gross
Trying to call xengnttab_set_max_grants() with the same file handle might fail on some kernels, as this operation is allowed only once. This is a problem for the qdisk backend as blk_connect() can be called multiple times for a domain, e.g. in case grub-xen is being used to boot it. So instead

[Qemu-devel] [PULL 08/18] migration: Create multifd migration threads

2017-09-22 Thread Juan Quintela
Creation of the threads, nothing inside yet. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert -- Use pointers instead of long array names Move to use semaphores instead of conditions as paolo suggestion Put all the state inside one

[Qemu-devel] [PULL 14/18] migration: fix ram_save_pending

2017-09-22 Thread Juan Quintela
From: Vladimir Sementsov-Ogievskiy Fill postcopy-able pending only if ram postcopy is enabled. It is necessary because of there will be other postcopy-able states and when ram postcopy is disabled, it should not spoil common postcopy related pending. Signed-off-by:

Re: [Qemu-devel] [RFC PATCH v2 09/21] ppc/xive: extend the interrupt presenter model for XIVE

2017-09-22 Thread Cédric Le Goater
On 09/22/2017 12:58 PM, David Gibson wrote: > On Tue, Sep 19, 2017 at 09:28:45PM +0200, Cédric Le Goater wrote: >> On 09/19/2017 09:36 AM, David Gibson wrote: >>> On Mon, Sep 11, 2017 at 07:12:23PM +0200, Cédric Le Goater wrote: The XIVE interrupt presenter exposes a set of Thread Interrupt

[Qemu-devel] [PULL 17/18] migration: fix hardcoded function name in error report

2017-09-22 Thread Juan Quintela
From: Alexey Perevalov Reviewed-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Alexey Perevalov Signed-off-by: Juan Quintela --- migration/postcopy-ram.c |

[Qemu-devel] [PATCH v7 7/8] tpm-passthrough: move reusable code to utils

2017-09-22 Thread Amarnath Valluri
Signed-off-by: Amarnath Valluri Reviewed-by: Stefan Berger Reviewed-by: Marc-André Lureau --- hw/tpm/tpm_passthrough.c | 64 hw/tpm/tpm_util.c| 25

Re: [Qemu-devel] [PATCH] qemu.py: Call logging.basicConfig() automatically

2017-09-22 Thread Eduardo Habkost
On Fri, Sep 22, 2017 at 10:37:44AM +0200, Lukáš Doktor wrote: > Dne 21.9.2017 v 18:22 Eduardo Habkost napsal(a): > > Not all scripts using qemu.py configure the Python logging > > module, and end up generating a "No handlers could be found for > > logger" message instead of actual log messages. >

Re: [Qemu-devel] [PATCH] docker: add installation to build tests

2017-09-22 Thread Fam Zheng
On Fri, 09/22 13:42, Paolo Bonzini wrote: > Drop ccache on Fedora, because it fails on RHEL 7.4, it is not used > by any other distro and it is not particularly useful on throwaway > containers. I wonder what exactly failed with ccache? Patchew relies on it to speed up compiling every series on

Re: [Qemu-devel] [PULL 28/36] tests: Add ubuntu.i386 image

2017-09-22 Thread Fam Zheng
On Fri, 09/22 08:10, Programmingkid wrote: > Could a Darwin test be added? Both x86 and PowerPC versions would be great. It's nice to cover macOS in our test, but to be honest I don't know how to do it. If there isn't any copyright problem, and if there are instructions available in wiki.qemu.org

Re: [Qemu-devel] [PATCH v5 0/3] watchdog.h: Drop local redefinition of actions enum

2017-09-22 Thread Michal Privoznik
On 09/07/2017 10:05 AM, Michal Privoznik wrote: > diff to v4: > - in 3/3 compare passed action string case insensitively to the qapi enum > > Michal Privoznik (3): > qapi: Rename WatchdogExpirationAction enum > watchdog.h: Drop local redefinition of actions enum > watchdog: Allow setting

Re: [Qemu-devel] [PATCH v2 1/6] qemu-io: Drop write permissions before read-only reopen

2017-09-22 Thread Fam Zheng
On Fri, 09/22 14:55, Kevin Wolf wrote: > qemu-io provides a 'reopen' command that allows switching from writable > to read-only access. We need to make sure that we don't try to keep > write permissions to a BlockBackend that becomes read-only, otherwise > things are going to fail. > > This

[Qemu-devel] [PATCH v3 2/5] fw_cfg: add DMA register

2017-09-22 Thread marcandre . lureau
From: Marc-André Lureau Add an optional kernel module (or command line) parameter using the following syntax: [qemu_fw_cfg.]ioport=@[::[:]] or [qemu_fw_cfg.]mmio=@[::[:]] and initializes the register address using given or default offset.

[Qemu-devel] [PATCH v3 5/5] RFC: fw_cfg: add DMA write operation in sysfs

2017-09-22 Thread marcandre . lureau
From: Marc-André Lureau Since qemu 2.9, DMA write operations are allowed. However, usage of this interface from kernel or user-space is strongly discouraged by the maintainers. This patch is meant for experimentations for now. Signed-off-by: Marc-André Lureau

Re: [Qemu-devel] [PATCH] tcg/tci: do not use ldst label (never implemented)

2017-09-22 Thread Richard Henderson
On 09/21/2017 04:59 AM, Thomas Huth wrote: > $ time ppc64-softmmu/qemu-system-ppc64 -nographic -vga none -prom-env > 'use-nvramrc?=true' -prom-env 'nvramrc=power-off' > [...] > real 0m13.953s > user 0m13.904s > sys 0m0.046s > > That's impressive! Richard, may I ask what's the current state of

Re: [Qemu-devel] [PATCH v2 2/4] fw_cfg: do DMA read operation

2017-09-22 Thread kbuild test robot
Hi Marc-André, [auto build test WARNING on linus/master] [also build test WARNING on v4.14-rc1 next-20170922] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/marcandre-lureau-redhat-com/fw_cfg

Re: [Qemu-devel] [PATCH/RFC 0/3] ais fixups for 2.11

2017-09-22 Thread Christian Borntraeger
On 09/22/2017 10:38 AM, Christian Borntraeger wrote: > Conny, this seem to work on KVM (needs more testing and review). > Can you check what happens with TCG? > > Patch 1 is the known base patch, > Patch 2 fixes the ais detection to be based on the flic interfaces > Patch 3 disables ais for all

Re: [Qemu-devel] [PATCH v3 0/3] Implement basic MSA functions

2017-09-22 Thread Cornelia Huck
On Wed, 20 Sep 2017 17:30:13 +0200 David Hildenbrand wrote: > Some leftover from "target/s390x: tcg improvments + MSA functions". > > Implement all basic MSA (cpacf/crypto) instructions <= z13. Only provide > the query subfunction (to query available subfunctions), no actual >

[Qemu-devel] [PATCH] docker: add installation to build tests

2017-09-22 Thread Paolo Bonzini
Basic test that "make install" works; this requires msgfmt so add gettext to the packages. Drop ccache on Fedora, because it fails on RHEL 7.4, it is not used by any other distro and it is not particularly useful on throwaway containers. Signed-off-by: Paolo Bonzini ---

[Qemu-devel] [PATCH v12 1/6] throttle: factor out duplicate code

2017-09-22 Thread Pradeep Jagadeesh
This patch factors out the duplicate throttle code that was still present in block and fsdev devices. Signed-off-by: Pradeep Jagadeesh Reviewed-by: Alberto Garcia Reviewed-by: Greg Kurz Reviewed-by: Eric Blake

Re: [Qemu-devel] [PATCH/RFC 2/3] s390x/ais: enable ais when migration is available

2017-09-22 Thread Pierre Morel
On 22/09/2017 10:38, Christian Borntraeger wrote: Instead of unconditionally enabling the KVM AIS capability in the kvm arch init function, do this in the flic realize function when we know if migration is available. This requires to initialize flic before the CPUs. I am not sure to agree.

Re: [Qemu-devel] [PATCH v11 09/13] tests: Add OpenBSD image

2017-09-22 Thread Philippe Mathieu-Daudé
Alex, Peter, JTLYK I just finished to test this one too (which was merged in the meaning time). On 09/21/2017 12:07 PM, Fam Zheng wrote: The image is prepared following instructions as in: https://wiki.qemu.org/Hosts/BSD Signed-off-by: Fam Zheng --- tests/vm/openbsd |

Re: [Qemu-devel] [RFC PATCH v2 00/21] Guest exploitation of the XIVE interrupt controller (POWER9)

2017-09-22 Thread Cédric Le Goater
On 09/22/2017 12:33 PM, David Gibson wrote: > On Thu, Sep 21, 2017 at 04:18:33PM +0200, Cédric Le Goater wrote: >> On 09/21/2017 03:25 AM, David Gibson wrote: >>> On Wed, Sep 20, 2017 at 02:33:37PM +0200, Cédric Le Goater wrote: On 09/19/2017 10:46 AM, David Gibson wrote: > On Tue, Sep

[Qemu-devel] [PATCH v7 8/8] tpm: Added support for TPM emulator

2017-09-22 Thread Amarnath Valluri
This change introduces a new TPM backend driver that can communicate with swtpm(software TPM emulator) using unix domain socket interface. QEMU talks to TPM emulator using socket based chardev backend device. Swtpm uses two Unix sockets for communications, one for plain TPM commands and

Re: [Qemu-devel] [PATCH v2 0/2] Truncate the tail of the image file in qcow2 shrinking

2017-09-22 Thread Pavel Butsykin
On 22.09.2017 12:50, Daniel P. Berrange wrote: On Fri, Sep 22, 2017 at 12:39:24PM +0300, Pavel Butsykin wrote: Now after shrinking the qcow2 image, at the end of the image file, there might be a tail that probably will never be used. Although it will not bring any tangible benefit, we can cut

Re: [Qemu-devel] [PATCH v4 4/5] 390x/css: introduce maximum data address checking

2017-09-22 Thread Pierre Morel
On 21/09/2017 20:08, Halil Pasic wrote: The architecture mandates the addresses to be accessed on the first indirection level (that is, the data addresses without IDA, and the (M)IDAW addresses with (M)IDA) to be checked against an CCW format dependent limit maximum address. If a violation is

[Qemu-devel] [PATCH v2 1/6] qemu-io: Drop write permissions before read-only reopen

2017-09-22 Thread Kevin Wolf
qemu-io provides a 'reopen' command that allows switching from writable to read-only access. We need to make sure that we don't try to keep write permissions to a BlockBackend that becomes read-only, otherwise things are going to fail. This requires a bdrv_drain() call because otherwise in-flight

[Qemu-devel] [PATCH] linux-headers: sync against v4.14-rc1

2017-09-22 Thread Alexey Perevalov
This patch contains modification of userfaultfd.h, necessary for series "calculate blocktime for postcopy live migration" it was decided to send it separatelly with another modifications. Build was tested with docker, but it's not fully tested at runtime. Based on

Re: [Qemu-devel] [PATCH 2/3] iothread: export iothread_stop()

2017-09-22 Thread Fam Zheng
On Fri, 09/22 16:56, Peter Xu wrote: > So that internal iothread users can explicitly stop one iothread without > destroying it. > > Since at it, fix iothread_stop() to allow re-entrance. Before this I don't think there is any re-entrace here. Maybe you mean s/re-entrance/calling multiple

Re: [Qemu-devel] [PATCH v1] s390x/kvm: fix and cleanup storing CPU status

2017-09-22 Thread Richard Henderson
On 09/21/2017 04:30 PM, David Hildenbrand wrote: > +struct sigp_save_area { > +uint64_tfprs[16]; /* 0x */ > +uint64_tgrs[16];/* 0x0080 */ > +PSW psw;/* 0x0100 */ > +uint8_t

Re: [Qemu-devel] [PULL 28/36] tests: Add ubuntu.i386 image

2017-09-22 Thread Daniel P. Berrange
On Fri, Sep 22, 2017 at 08:44:05PM +0800, Fam Zheng wrote: > On Fri, 09/22 08:10, Programmingkid wrote: > > Could a Darwin test be added? Both x86 and PowerPC versions would be great. > > It's nice to cover macOS in our test, but to be honest I don't know how to do > it. If there isn't any

[Qemu-devel] KVM serial8250: too much work for irq3

2017-09-22 Thread Denys Zagorui
Hello This is known issue, it was mentioned at first time about 9 years ago. https://lkml.org/lkml/2008/2/5/401 https://bugzilla.redhat.com/show_bug.cgi?id=986761 But it seems not fixed. I tested on my setup. My Host machine Debian Stretch (kernel 4.9-30), Guest vanilla kernel 4.4-76.

Re: [Qemu-devel] [PATCH] ppc/pnv: fix cores per chip for multiple cpus

2017-09-22 Thread Nikunj A Dadhania
David Gibson writes: >> >> >> >> As smp_thread defaults to 1 in vl.c, similarly smp_cores also has the >> >> default value of 1 in vl.c. In powernv, we were setting nr-cores like >> >> this: >> >> >> >> object_property_set_int(chip, smp_cores, "nr-cores",

Re: [Qemu-devel] [PATCH] ppc/pnv: fix cores per chip for multiple cpus

2017-09-22 Thread Cédric Le Goater
On 09/22/2017 08:00 AM, Nikunj A Dadhania wrote: > David Gibson writes: > > > As smp_thread defaults to 1 in vl.c, similarly smp_cores also has the > default value of 1 in vl.c. In powernv, we were setting nr-cores like > this: > >

Re: [Qemu-devel] [PATCH v11 07/13] tests: Add FreeBSD image

2017-09-22 Thread Philippe Mathieu-Daudé
On 09/21/2017 12:07 PM, Fam Zheng wrote: The image is prepared following instructions as in: https://wiki.qemu.org/Hosts/BSD Signed-off-by: Fam Zheng $ QEMU=`pwd`/x86_64-softmmu/qemu-system-x86_64 make vm-build-freebsd V=1 [...] CC tests/test-io-channel-socket.o CC

Re: [Qemu-devel] [PATCH] tests/boot-sector: Increase timeout to 600 seconds

2017-09-22 Thread Philippe Mathieu-Daudé
Hi Thomas, On 09/22/2017 12:06 AM, Thomas Huth wrote: If QEMU has been compiled with the flags --enable-tcg-interpreter and --enable-debug, the guest is running incredibly slow. The pxe boot test There already is a qtest_get_arch(), it might be convenient to have a qtest_get_accel() at some

[Qemu-devel] [PATCH 1/1] mach-virt: Set VM's SMBIOS system version to mc->name

2017-09-22 Thread Wei Huang
Instead of using "1.0" as the system version of SMBIOS, we should use mc->name for mach-virt machine type. This matches with x86 code and prevents the smbios_table.machine_type test of Avocado from failing. Signed-off-by: Wei Huang --- hw/arm/virt.c | 3 ++- 1 file changed, 2

Re: [Qemu-devel] [PATCH/RFC 2/3] s390x/ais: enable ais when migration is available

2017-09-22 Thread Pierre Morel
On 22/09/2017 14:40, Christian Borntraeger wrote: On 09/22/2017 02:13 PM, Pierre Morel wrote: On 22/09/2017 10:38, Christian Borntraeger wrote: Instead of unconditionally enabling the KVM AIS capability in the kvm arch init function, do this in the flic realize function when we know if

[Qemu-devel] [RFC 5/6] linux-user: fix 64bit versions of sparc and mips

2017-09-22 Thread Carlo Marcelo Arenas Belón
Signed-off-by: Carlo Marcelo Arenas Belón --- linux-user/mips64/sockbits.h | 1 + linux-user/socket.h | 4 ++-- linux-user/sparc64/sockbits.h | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 linux-user/mips64/sockbits.h create mode 100644

[Qemu-devel] [RFC 4/6] linux-user: refactor socket.h for sparc

2017-09-22 Thread Carlo Marcelo Arenas Belón
fixes SOL_SOCKET and SO_LINGER at least Signed-off-by: Carlo Marcelo Arenas Belón --- linux-user/socket.h | 46 ++-- linux-user/sparc/sockbits.h | 104 2 files changed, 107 insertions(+), 43 deletions(-)

Re: [Qemu-devel] [PATCH/RFC 2/3] s390x/ais: enable ais when migration is available

2017-09-22 Thread Christian Borntraeger
On 09/22/2017 04:02 PM, Pierre Morel wrote: > On 22/09/2017 14:40, Christian Borntraeger wrote: >> >> >> On 09/22/2017 02:13 PM, Pierre Morel wrote: >>> On 22/09/2017 10:38, Christian Borntraeger wrote: Instead of unconditionally enabling the KVM AIS capability in the kvm arch init

Re: [Qemu-devel] [PATCH] target/ppc: Use tcg_gen_lookup_and_goto_ptr

2017-09-22 Thread Thomas Huth
On 30.06.2017 20:37, Richard Henderson wrote: > Cc: qemu-...@nongnu.org > Signed-off-by: Richard Henderson > --- > target/ppc/translate.c | 23 --- > 1 file changed, 8 insertions(+), 15 deletions(-) > > diff --git a/target/ppc/translate.c

Re: [Qemu-devel] [PATCH 1/3] iothread: provide helpers for internal use

2017-09-22 Thread Stefan Hajnoczi
On Fri, Sep 22, 2017 at 11:28:08AM +0100, Daniel P. Berrange wrote: > On Fri, Sep 22, 2017 at 12:26:16PM +0200, Paolo Bonzini wrote: > > On 22/09/2017 12:20, Daniel P. Berrange wrote: > > > On Fri, Sep 22, 2017 at 12:18:44PM +0200, Paolo Bonzini wrote: > > >> On 22/09/2017 12:16, Stefan Hajnoczi

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

2017-09-22 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] [PATCH 15/20] target/arm: Fix calculation of secure mm_idx values

2017-09-22 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] [PATCH 05/20] target/arm: Restore SPSEL to correct CONTROL register on exception return

2017-09-22 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] [PATCH 13/20] nvic: Implement Security Attribution Unit registers

2017-09-22 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

Re: [Qemu-devel] Support for ARM CP15 registers via GDB interface of qemu

2017-09-22 Thread Peter Maydell
On 22 September 2017 at 16:11, Abhijit Ray Chaudhury wrote: > Hi Peter, > > Thanks for your prompt response. I have gone through target > description xml format for gdb > (https://sourceware.org/gdb//onlinedocs/gdb/ARM-Features.html#ARM-Features) > . I could not

[Qemu-devel] [PATCH 17/20] target/arm: Implement SG instruction

2017-09-22 Thread Peter Maydell
Implement the SG instruction, which we emulate 'by hand' in the exception handling code path. Signed-off-by: Peter Maydell --- target/arm/helper.c | 129 ++-- 1 file changed, 124 insertions(+), 5 deletions(-) diff --git

[Qemu-devel] [PULL 27/32] scsi: add multipath support to qemu-pr-helper

2017-09-22 Thread Paolo Bonzini
Proper support of persistent reservation for multipath devices requires communication with the multipath daemon, so that the reservation is registered and applied when a path comes up. The device mapper utilities provide a library to do so; this patch makes qemu-pr-helper.c detect multipath

[Qemu-devel] [PATCH v2] s390x/kvm: fix and cleanup storing CPU status

2017-09-22 Thread David Hildenbrand
env->psa is a 64bit value, while we copy 4 bytes into the save area, resulting always in 0 getting stored. Let's try to reduce such errors by using a proper structure. While at it, use correct cpu->be conversion (and get_psw_mask()), as we will be reusing this code for TCG soon. Signed-off-by:

Re: [Qemu-devel] [PATCH v2] s390x/kvm: fix and cleanup storing CPU status

2017-09-22 Thread Richard Henderson
On 09/22/2017 09:03 AM, David Hildenbrand wrote: > env->psa is a 64bit value, while we copy 4 bytes into the save area, > resulting always in 0 getting stored. > > Let's try to reduce such errors by using a proper structure. While at > it, use correct cpu->be conversion (and get_psw_mask()), as

[Qemu-devel] qEMU exposing cp15 registers over gdb

2017-09-22 Thread Abhijit Ray Chaudhury
Hi, Can qEmu expose cp15 register set over gdb interface ? Any idea what changes are required to qemu to support this ? I can see cp14 registerset is exposed via neon (vfp) xml file but not cp15. Thanks in advance, -Abhijit

[Qemu-devel] [PULL 2/2] MAINTAINERS: Add Python scripts

2017-09-22 Thread Eduardo Habkost
Cleber and I are volunteering to review and queue patches for the Python scripts and modules in scripts/. I'm setting "M: Odd fixes" because not all scripts are actively maintained. Signed-off-by: Eduardo Habkost Message-Id: <20170915230744.22942-1-ehabk...@redhat.com>

[Qemu-devel] [PULL 0/2] Python next patches

2017-09-22 Thread Eduardo Habkost
The following changes since commit 9ee660e7c138595224b65ddc1c5712549f0a278c: Merge remote-tracking branch 'remotes/yongbok/tags/mips-20170921' into staging (2017-09-21 14:40:32 +0100) are available in the git repository at: git://github.com/ehabkost/qemu.git tags/python-next-pull-request

[Qemu-devel] [PULL 1/2] qemu.py: Call logging.basicConfig() automatically

2017-09-22 Thread Eduardo Habkost
Not all scripts using qemu.py configure the Python logging module, and end up generating a "No handlers could be found for logger" message instead of actual log messages. To avoid requiring every script using qemu.py to configure logging manually, call basicConfig() when creating a QEMUMachine

[Qemu-devel] [PATCH] block/qcow2-bitmap: fix use of uninitialized pointer

2017-09-22 Thread Vladimir Sementsov-Ogievskiy
Without initialization to zero dirty_bitmap field may be not zero for a bitmap which should not be stored and qcow2_store_persistent_dirty_bitmaps will erroneously call store_bitmap for it which leads to SYGSEGV on bdrv_dirty_bitmap_name. Signed-off-by: Vladimir Sementsov-Ogievskiy

Re: [Qemu-devel] [PATCH 1/3] iothread: provide helpers for internal use

2017-09-22 Thread Daniel P. Berrange
On Fri, Sep 22, 2017 at 03:35:05PM +0100, Stefan Hajnoczi wrote: > On Fri, Sep 22, 2017 at 11:28:08AM +0100, Daniel P. Berrange wrote: > > On Fri, Sep 22, 2017 at 12:26:16PM +0200, Paolo Bonzini wrote: > > > On 22/09/2017 12:20, Daniel P. Berrange wrote: > > > > On Fri, Sep 22, 2017 at 12:18:44PM

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

2017-09-22 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 08/20] target/arm: Don't warn about exception return with PC low bit set for v8M

2017-09-22 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 --- target/arm/helper.c | 20 +---

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

2017-09-22 Thread Peter Maydell
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 return * and a couple of fixes for bugs in already-in-master changes Most of this is just

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

2017-09-22 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] [PATCH 16/20] target/arm: Factor out "get mmuidx for specified security state"

2017-09-22 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:

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

2017-09-22 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

<    1   2   3   4   5   >