[Qemu-devel] [PATCH v1 1/6] qemu-img: add support for --object with 'dd' command

2017-01-26 Thread Daniel P. Berrange
The qemu-img dd command added --image-opts support, but missed the corresponding --object support. This prevented passing secrets (eg auth passwords) needed by certain disk images. Signed-off-by: Daniel P. Berrange --- qemu-img.c | 16 1 file changed, 16 insertions(+) diff --gi

[Qemu-devel] [PATCH v1 0/6] qemu-img: improve convert & dd commands

2017-01-26 Thread Daniel P. Berrange
This series is in response to Max pointing out that you cannot use 'convert' for an encrypted target image. The 'convert' and 'dd' commands need to first create the image and then open it. The bdrv_create() method takes a set of options for creating the image, which let us provide a key-secret for

[Qemu-devel] [PATCH v1 2/6] qemu-img: fix --image-opts usage with dd command

2017-01-26 Thread Daniel P. Berrange
The --image-opts flag can only be used to affect the parsing of the source image. The target image has to be specified in the traditional style regardless, since it needs to be passed to the brdv_create() API which does not support the new style opts. Signed-off-by: Daniel P. Berrange --- qemu-i

[Qemu-devel] [PATCH v1 3/6] qemu-img: add support for -n arg to dd command

2017-01-26 Thread Daniel P. Berrange
The -n arg to the convert command allows use of a pre-existing image, rather than creating a new image. This adds a -n arg to the dd command to get feature parity. Signed-off-by: Daniel P. Berrange --- qemu-img-cmds.hx | 4 +-- qemu-img.c | 79 -

[Qemu-devel] [PATCH v1 5/6] qemu-img: introduce --target-image-opts for 'convert' command

2017-01-26 Thread Daniel P. Berrange
The '--image-opts' flags indicates whether the source filename includes options. The target filename has to remain in the plain filename format though, since it needs to be passed to bdrv_create(). When using --skip-create though, it would be possible to use image-opts syntax. This adds --target-i

[Qemu-devel] [PATCH v1 4/6] qemu-img: add support for -o arg to dd command

2017-01-26 Thread Daniel P. Berrange
The -o arg to the convert command allows specification of format/protocol options for the newly created image. This adds a -o arg to the dd command to get feature parity. Signed-off-by: Daniel P. Berrange --- qemu-img-cmds.hx | 4 ++-- qemu-img.c | 32 +++- qem

Re: [Qemu-devel] [PATCH v2 7/7] qemu-options: remove stray space

2017-01-26 Thread Fam Zheng
On Tue, 01/24 14:33, Alex Bennée wrote: > Signed-off-by: Alex Bennée > --- > qemu-options.hx | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/qemu-options.hx b/qemu-options.hx > index 80df52651a..55c68cecbb 100644 > --- a/qemu-options.hx > +++ b/qemu-options.hx > @@ -1705

Re: [Qemu-devel] [PATCH] migrate: Migration aborts abruptly for machine "none"

2017-01-26 Thread Kashyap Chamarthy
On Thu, Jan 26, 2017 at 02:46:52PM +0530, Ashijeet Acharya wrote: > Migration of a "none" machine with no RAM crashes abruptly as > bitmap_new() fails and thus aborts. Instead, place a check for > last_ram_offset() being '0' at the start of ram_save_setup() and > error out with a meaningful error

Re: [Qemu-devel] [PATCH v2 3/7] .travis.yml: DEBUG MacOSX build

2017-01-26 Thread Fam Zheng
On Tue, 01/24 14:33, Alex Bennée wrote: > Currently the MacOSX build is failing. Dump some information to help > with figuring out what has gone wrong. > > Signed-off-by: Alex Bennée > --- > .travis.yml | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/.travis.yml b/.travis.yml > index 9

Re: [Qemu-devel] [PULL 15/18] spapr: CPU hot unplug support

2017-01-26 Thread Igor Mammedov
On Fri, 17 Jun 2016 16:36:36 +1000 David Gibson wrote: > From: Bharata B Rao > > Remove the CPU core device by removing the underlying CPU thread devices. > Hot removal of CPU for sPAPR guests is achieved by sending the hot unplug > notification to the guest. Release the vCPU object after CPU h

Re: [Qemu-devel] [PATCH 07/17] migration: Create x-multifd-group parameter

2017-01-26 Thread Dr. David Alan Gilbert
* Juan Quintela (quint...@redhat.com) wrote: > Indicates how many pages we are going to send in each bach to a multifd > thread. bach->batch > Signed-off-by: Juan Quintela > --- > hmp.c | 8 > include/migration/migration.h | 1 + > migration/migration.c

Re: [Qemu-devel] [PATCH] 9pfs: fix v9fs_lock error case

2017-01-26 Thread Greg Kurz
On Thu, 26 Jan 2017 11:07:05 +0100 Paolo Bonzini wrote: > In this case, we are marshaling an error status instead of the errno value. > Reorganize the out and out_nofid labels to look like all the other cases. > Coverity reports this because the "err = -ENOENT" and "err = -EINVAL" > assignments a

Re: [Qemu-devel] [PATCH] 9pfs: fix v9fs_lock error case

2017-01-26 Thread Paolo Bonzini
On 26/01/2017 12:54, Greg Kurz wrote: > On Thu, 26 Jan 2017 11:07:05 +0100 > Paolo Bonzini wrote: > >> In this case, we are marshaling an error status instead of the errno value. >> Reorganize the out and out_nofid labels to look like all the other cases. >> Coverity reports this because the "e

Re: [Qemu-devel] [PATCH v5 02/18] vfio: introduce vfio_get_vaddr()

2017-01-26 Thread Peter Xu
On Thu, Jan 26, 2017 at 11:55:22AM +0100, Paolo Bonzini wrote: > > > On 26/01/2017 08:12, Peter Xu wrote: > > > > /* > > * Here, we need to have the lock not only for vfio_get_vaddr(), > > * but also needs to make sure that the vaddr will be valid for > > * further operations.

Re: [Qemu-devel] [PULL 21/26] target-hppa: Implement branches

2017-01-26 Thread Paolo Bonzini
I haven't studied the code much, so I'm just reporting what Coverity says. Not sure if the code has a bug or can just be simplified. On 23/01/2017 03:17, Richard Henderson wrote: > +/* Emit a conditional branch to a direct target. If the branch itself > + is nullified, we should have already u

Re: [Qemu-devel] [PULL 02/15] migration: extend VMStateInfo

2017-01-26 Thread Cornelia Huck
On Wed, 25 Jan 2017 14:44:20 + "Dr. David Alan Gilbert" wrote: > * Cornelia Huck (cornelia.h...@de.ibm.com) wrote: > > On Wed, 25 Jan 2017 13:22:55 + > > "Dr. David Alan Gilbert" wrote: > > > > > * Cornelia Huck (cornelia.h...@de.ibm.com) wrote: > > > > On Wed, 25 Jan 2017 12:00:53 +000

Re: [Qemu-devel] [PATCH v1 2/6] qemu-img: fix --image-opts usage with dd command

2017-01-26 Thread Fam Zheng
On Thu, 01/26 11:04, Daniel P. Berrange wrote: > The --image-opts flag can only be used to affect the parsing > of the source image. The target image has to be specified in > the traditional style regardless, since it needs to be passed > to the brdv_create() API which does not support the new styl

[Qemu-devel] [PATCH v8 0/9] replay additions

2017-01-26 Thread Pavel Dovgalyuk
This set of patches includes several fixes for replay and vmstate. This patches add rrsnapshot option for icount. rrshapshot option creates start snapshot at record and loads it at replay. It allows preserving the state of disk images used by virtual machine. This vm state can also use used to rol

[Qemu-devel] [PATCH v8 1/9] replay: exception replay fix

2017-01-26 Thread Pavel Dovgalyuk
This patch fixes replaying the exception when TB cache is full. It breaks cpu loop execution through setting exception_index to process such queued work as TB flush. v8: moved setting of exeption_index to tb_gen_code Signed-off-by: Pavel Dovgalyuk --- translate-all.c |3 +++ 1 file changed,

[Qemu-devel] [PATCH v8 5/9] block: implement bdrv_snapshot_goto for blkreplay

2017-01-26 Thread Pavel Dovgalyuk
This patch enables making snapshots with blkreplay used in block devices. Signed-off-by: Pavel Dovgalyuk --- block/blkreplay.c |8 1 file changed, 8 insertions(+) diff --git a/block/blkreplay.c b/block/blkreplay.c index a741654..8a03d62 100644 --- a/block/blkreplay.c +++ b/block/bl

[Qemu-devel] [PATCH v8 7/9] replay: disable default snapshot for record/replay

2017-01-26 Thread Pavel Dovgalyuk
This patch disables setting '-snapshot' option on by default in record/replay mode. This is needed for creating vmstates in record and replay modes. Signed-off-by: Pavel Dovgalyuk --- vl.c |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vl.c b/vl.c index def0520..bd

[Qemu-devel] [PATCH v8 3/9] apic: save apic_delivered flag

2017-01-26 Thread Pavel Dovgalyuk
This patch implements saving/restoring of static apic_delivered variable. v8: saving static variable only for one of the APICs Signed-off-by: Pavel Dovgalyuk --- hw/intc/apic_common.c | 37 + include/hw/i386/apic_internal.h |2 ++ 2 files chan

[Qemu-devel] [PATCH v8 2/9] icount: exit cpu loop on expire

2017-01-26 Thread Pavel Dovgalyuk
This patch adds check to break cpu loop when icount expires without setting the TB_EXIT_ICOUNT_EXPIRED flag. It happens when there is no available translated blocks and all instructions were executed. In icount replay mode unnecessary tb_find will be called (which may cause an exception) and execut

[Qemu-devel] [PATCH v8 6/9] blkreplay: create temporary overlay for underlaying devices

2017-01-26 Thread Pavel Dovgalyuk
This patch allows using '-snapshot' behavior in record/replay mode. blkreplay layer creates temporary overlays on top of underlaying disk images. It is needed, because creating an overlay over blkreplay breaks the determinism. Signed-off-by: Pavel Dovgalyuk --- block/blkreplay.c | 76 +

Re: [Qemu-devel] [PATCH 11/17] migration: Create thread infrastructure for multifd send side

2017-01-26 Thread Paolo Bonzini
On 23/01/2017 22:32, Juan Quintela wrote: > We make the locking and the transfer of information specific, even if we > are still transmiting things through the main thread. > > Signed-off-by: Juan Quintela > --- > migration/ram.c | 53 - > 1

[Qemu-devel] [PATCH v8 8/9] audio: make audio poll timer deterministic

2017-01-26 Thread Pavel Dovgalyuk
This patch changes resetting strategy of the audio polling timer. It does not change expiration time if the timer is already set. Signed-off-by: Pavel Dovgalyuk --- audio/audio.c |6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/audio/audio.c b/audio/audio.c index c845

[Qemu-devel] [PATCH v8 4/9] integratorcp: adding vmstate for save/restore

2017-01-26 Thread Pavel Dovgalyuk
From: Pavel Dovgalyuk VMState added by this patch preserves correct loading of the integratorcp device state. Signed-off-by: Pavel Dovgalyuk --- hw/arm/integratorcp.c | 62 + 1 file changed, 62 insertions(+) diff --git a/hw/arm/integratorcp.c

Re: [Qemu-devel] [PATCH 14/17] migration: Create thread infrastructure for multifd recv side

2017-01-26 Thread Paolo Bonzini
On 23/01/2017 22:32, Juan Quintela wrote: > bool started; > +multifd_pages_t pages; > +/* proteced by multifd mutex */ > +bool done; > }; > typedef struct MultiFDRecvParams MultiFDRecvParams; > > static MultiFDRecvParams *multifd_recv; > > +QemuMutex multifd_recv_mutex; > +Q

[Qemu-devel] [PATCH v8 9/9] replay: add record/replay for audio passthrough

2017-01-26 Thread Pavel Dovgalyuk
This patch adds recording and replaying audio data. Is saves synchronization information for audio out and inputs from the microphone. Signed-off-by: Pavel Dovgalyuk --- audio/audio.c| 11 +- audio/audio.h|5 +++ audio/mixeng.c | 31 +

Re: [Qemu-devel] [PATCH v2 5/7] new debian-multiarch-cross.docker: a cross-compiling docker guest

2017-01-26 Thread Alex Bennée
Fam Zheng writes: > On Tue, 01/24 14:33, Alex Bennée wrote: >> This provides a basic Debian install with access to the emdebian cross >> compilers for armhf, arm64, mipsel and ppc64el. On its own it provides >> the basic cross build essentials for building any of those >> architectures. More com

Re: [Qemu-devel] [PATCH v1 3/6] qemu-img: add support for -n arg to dd command

2017-01-26 Thread Fam Zheng
On Thu, 01/26 11:04, Daniel P. Berrange wrote: > The -n arg to the convert command allows use of a pre-existing image, > rather than creating a new image. This adds a -n arg to the dd command > to get feature parity. I remember there was a discussion about changing qemu-img dd's default to a "conv

Re: [Qemu-devel] [PATCH v8 3/9] apic: save apic_delivered flag

2017-01-26 Thread Paolo Bonzini
On 26/01/2017 13:34, Pavel Dovgalyuk wrote: > This patch implements saving/restoring of static apic_delivered variable. > > v8: saving static variable only for one of the APICs > > Signed-off-by: Pavel Dovgalyuk > --- > hw/intc/apic_common.c | 37 ++

Re: [Qemu-devel] [PATCH v2.1] target-ppc: Add MMU model check for booke machines

2017-01-26 Thread Edgar E. Iglesias
On Thu, Jan 26, 2017 at 10:15:59AM +, Valentin Plotkin wrote: > From: Valentin Plotkin > > Machines bamboo, e500 and virtex-ml507 assume a certain MMU model, > otherwise resulting in unpredictable behavior. Add apropriate checks > into *_init functions. Thanks Valentin. Regarding the virtex

Re: [Qemu-devel] [PATCH v2 3/7] .travis.yml: DEBUG MacOSX build

2017-01-26 Thread Alex Bennée
Fam Zheng writes: > On Tue, 01/24 14:33, Alex Bennée wrote: >> Currently the MacOSX build is failing. Dump some information to help >> with figuring out what has gone wrong. >> >> Signed-off-by: Alex Bennée >> --- >> .travis.yml | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/.trav

Re: [Qemu-devel] [PATCH v8 2/9] icount: exit cpu loop on expire

2017-01-26 Thread Paolo Bonzini
On 26/01/2017 13:34, Pavel Dovgalyuk wrote: > This patch adds check to break cpu loop when icount expires without > setting the TB_EXIT_ICOUNT_EXPIRED flag. It happens when there is no > available translated blocks and all instructions were executed. > In icount replay mode unnecessary tb_find wi

Re: [Qemu-devel] [PATCH v8 3/9] apic: save apic_delivered flag

2017-01-26 Thread Pavel Dovgalyuk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 26/01/2017 13:34, Pavel Dovgalyuk wrote: > > This patch implements saving/restoring of static apic_delivered variable. > > > > v8: saving static variable only for one of the APICs > > > > Signed-off-by: Pavel Dovgalyuk > > --- > > hw/intc/ap

Re: [Qemu-devel] [PATCH v8 0/9] replay additions

2017-01-26 Thread Paolo Bonzini
On 26/01/2017 13:34, Pavel Dovgalyuk wrote: > This set of patches includes several fixes for replay and vmstate. > > This patches add rrsnapshot option for icount. rrshapshot option creates > start snapshot at record and loads it at replay. It allows preserving > the state of disk images used by

Re: [Qemu-devel] [PATCH v8 3/9] apic: save apic_delivered flag

2017-01-26 Thread Paolo Bonzini
On 26/01/2017 14:03, Pavel Dovgalyuk wrote: >> From: Paolo Bonzini [mailto:pbonz...@redhat.com] >> On 26/01/2017 13:34, Pavel Dovgalyuk wrote: >>> This patch implements saving/restoring of static apic_delivered variable. >>> >>> v8: saving static variable only for one of the APICs >>> >>> Signed-

Re: [Qemu-devel] [PATCH v8 3/9] apic: save apic_delivered flag

2017-01-26 Thread Pavel Dovgalyuk
> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > On 26/01/2017 14:03, Pavel Dovgalyuk wrote: > >> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > >> On 26/01/2017 13:34, Pavel Dovgalyuk wrote: > >>> This patch implements saving/restoring of static apic_deliv

[Qemu-devel] [RFC PATCH 1/5] checkpatch: add a check for utf-8 in commit logs

2017-01-26 Thread Thomas Huth
This patch is a port of the following commit from the Linux kernel: commit 15662b3e8644905032c2e26808401a487d4e90c1 Author: Joe Perches Date: Mon Oct 31 17:13:12 2011 -0700 checkpatch: add a --strict check for utf-8 in commit logs Some find using utf-8 in commit logs inappropriate.

[Qemu-devel] [RFC PATCH 2/5] checkpatch: check utf-8 content from a commit log when it's missing from charset

2017-01-26 Thread Thomas Huth
This is a port of the following commit from the Linux kernel: commit fa64205df9dfd7b7662cc64a7e82115c00e428e5 Author: Pasi Savanainen Date: Thu Oct 4 17:13:29 2012 -0700 checkpatch: check utf-8 content from a commit log when it's missing from charset Check that a commit log doesn't c

[Qemu-devel] [RFC PATCH 3/5] checkpatch: ignore email headers better

2017-01-26 Thread Thomas Huth
This is a port of the following commit from the Linux kernel: commit 29ee1b0c67e0dd7dea8dd718e8326076bce5b6fe Author: Joe Perches Date: Wed Aug 6 16:10:35 2014 -0700 checkpatch: ignore email headers better There are some patches created by git format-patch that when scanned by che

[Qemu-devel] [RFC PATCH 0/5] checkpatch: Test bad UTF-8 encodings and updates to MAINTAINERS

2017-01-26 Thread Thomas Huth
I recently noticed that the checkpatch.pl script from the Linux kernel nowadays issues a warning if you try to add, delete or move a file without updating the MAINTAINERS file in the same turn, too. Since we are also struggling with keeping the MAINTAINERS file of QEMU up to date, it might be usefu

Re: [Qemu-devel] [PATCH] target-openrisc: Fix exception handling status registers

2017-01-26 Thread Stafford Horne
On Wed, Jan 25, 2017 at 09:27:29AM -0800, Richard Henderson wrote: > On 01/25/2017 04:34 AM, Stafford Horne wrote: > > Hmm, I just tried your qemu branch and mine: > > > > g...@github.com:stffrdhrn/qemu.git or1k-fix-sigill > > > > Both of them were able to boot fine. > > > > The opencores,or12

[Qemu-devel] [RFC PATCH 4/5] checkpatch: emit a reminder about MAINTAINERS on file add/move/delete

2017-01-26 Thread Thomas Huth
This is a port of the following commit from the Linux kernel: commit 13f1937ef33950b1112049972249e6191b82e6c9 Author: Joe Perches Date: Wed Aug 6 16:10:59 2014 -0700 checkpatch: emit a warning on file add/move/delete Whenever files are added, moved, or deleted, the MAINTAINERS file

[Qemu-devel] [RFC PATCH 5/5] checkpatch: reduce MAINTAINERS update message frequency

2017-01-26 Thread Thomas Huth
This is a port of the following commit from the Linux kernel: commit e0d975b1b439c4fef58fbc306c542c94f48bb849 Author: Joe Perches Date: Wed Dec 10 15:51:49 2014 -0800 checkpatch: reduce MAINTAINERS update message frequency When files are being added/moved/deleted and a patch contains

Re: [Qemu-devel] [PATCH v7 wave 2 0/3] q35: add negotiable broadcast SMI

2017-01-26 Thread Paolo Bonzini
On 26/01/2017 02:44, Laszlo Ersek wrote: > Hi Paolo, > > I'm sending v7 with no functional changes; I've only picked up Igor's > R-b's from v6 so you don't have to, and while rebasing to current > master, I resolved a conflict in patch #3 against recent commit > abc62c89f319 ("pc.h: move x-mach-

Re: [Qemu-devel] [PATCH v1 3/6] qemu-img: add support for -n arg to dd command

2017-01-26 Thread Daniel P. Berrange
On Thu, Jan 26, 2017 at 08:35:30PM +0800, Fam Zheng wrote: > On Thu, 01/26 11:04, Daniel P. Berrange wrote: > > The -n arg to the convert command allows use of a pre-existing image, > > rather than creating a new image. This adds a -n arg to the dd command > > to get feature parity. > > I remember

Re: [Qemu-devel] [RFC PATCH 5/5] checkpatch: reduce MAINTAINERS update message frequency

2017-01-26 Thread Paolo Bonzini
On 26/01/2017 14:11, Thomas Huth wrote: > This is a port of the following commit from the Linux kernel: > > commit e0d975b1b439c4fef58fbc306c542c94f48bb849 > Author: Joe Perches > Date: Wed Dec 10 15:51:49 2014 -0800 > > checkpatch: reduce MAINTAINERS update message frequency > > Wh

[Qemu-devel] [PATCH] Update copyright year

2017-01-26 Thread Marc-André Lureau
It's still time to wish happy new year! The Year of the Rooster will begin on January 28, 2017! Signed-off-by: Marc-André Lureau --- include/qemu-common.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qemu-common.h b/include/qemu-common.h index 1430390eb6..d218821c

Re: [Qemu-devel] [RFC 4/4] hw/intc/arm_gicv3_its: Allow save/restore

2017-01-26 Thread Auger Eric
Hi Dave, On 26/01/2017 11:06, Dr. David Alan Gilbert wrote: > * Eric Auger (eric.au...@redhat.com) wrote: >> We change the restoration priority of both the GICv3 and ITS. The >> GICv3 must be restored before the ITS and the ITS needs to be restored >> before PCIe devices since it translates their

Re: [Qemu-devel] [PATCH 2/2] hw/arm/virt: no ITS on older machine types

2017-01-26 Thread Auger Eric
Hi Peter, On 26/01/2017 11:41, Peter Maydell wrote: > On 26 January 2017 at 07:58, Auger Eric wrote: >> On 20/01/2017 16:52, Peter Maydell wrote: >>> So this patch added a no_its flag which gets set for virt-2.7 >>> and earlier, but there's no user-facing way to say "I'd like >>> a virt-2.8 board

Re: [Qemu-devel] [PATCH v8 2/9] icount: exit cpu loop on expire

2017-01-26 Thread Pavel Dovgalyuk
> From: Paolo Bonzini [mailto:paolo.bonz...@gmail.com] On Behalf Of Paolo > Bonzini > On 26/01/2017 13:34, Pavel Dovgalyuk wrote: > > This patch adds check to break cpu loop when icount expires without > > setting the TB_EXIT_ICOUNT_EXPIRED flag. It happens when there is no > > available translate

Re: [Qemu-devel] [RFC PATCH 5/5] checkpatch: reduce MAINTAINERS update message frequency

2017-01-26 Thread Thomas Huth
On 26.01.2017 14:28, Paolo Bonzini wrote: > > > On 26/01/2017 14:11, Thomas Huth wrote: >> This is a port of the following commit from the Linux kernel: >> >> commit e0d975b1b439c4fef58fbc306c542c94f48bb849 >> Author: Joe Perches >> Date: Wed Dec 10 15:51:49 2014 -0800 >> >> checkpatch: re

Re: [Qemu-devel] [PATCH RFC] acpi: add reset register to fadt

2017-01-26 Thread Phil Dennis-Jordan
On 23 January 2017 at 12:12, Igor Mammedov wrote: >> For reference, my approach to filling out the Xdsdt/Xfacs fields in >> build_fadt() is essentially the same as for the 32-bit variants from >> rev1: >> >> unsigned xfacs_offset = (char *)&fadt->Xfacs - table_data->data; >> bios_linker_loader_add

Re: [Qemu-devel] [RFC PATCH 5/5] checkpatch: reduce MAINTAINERS update message frequency

2017-01-26 Thread Cornelia Huck
On Thu, 26 Jan 2017 14:39:35 +0100 Thomas Huth wrote: > On 26.01.2017 14:28, Paolo Bonzini wrote: > > > > > > On 26/01/2017 14:11, Thomas Huth wrote: > >> This is a port of the following commit from the Linux kernel: > >> > >> commit e0d975b1b439c4fef58fbc306c542c94f48bb849 > >> Author: Joe Per

[Qemu-devel] [PATCH] memory: don't sign-extend 32-bit writes

2017-01-26 Thread Ladi Prosek
ldl_p has a signed return type so assigning it to uint64_t implicitly sign-extends the value. This results in devices with min_access_size = 8 seeing unexpected values passed to their write handlers. Example: guest performs a 32-bit write of 0x8000 to an mmio region and the handler receives 0x

Re: [Qemu-devel] [PULL 15/18] spapr: CPU hot unplug support

2017-01-26 Thread Bharata B Rao
On Thu, Jan 26, 2017 at 12:32:58PM +0100, Igor Mammedov wrote: > On Fri, 17 Jun 2016 16:36:36 +1000 > David Gibson wrote: > > > From: Bharata B Rao > > > > Remove the CPU core device by removing the underlying CPU thread devices. > > Hot removal of CPU for sPAPR guests is achieved by sending th

Re: [Qemu-devel] [PATCH v8 2/9] icount: exit cpu loop on expire

2017-01-26 Thread Paolo Bonzini
On 26/01/2017 14:37, Pavel Dovgalyuk wrote: >> Simpler: >> >> use_icount && >> ((int32_t)cpu->icount_decr.u32 < 0 || >> cpu->icount_decr.u16.low + cpu->icount_extra == 0) > Right. > >> But I'm not sure that you need to test u32. After all you're not > Checking u32 is needed, bec

Re: [Qemu-devel] [PATCH v8 2/9] icount: exit cpu loop on expire

2017-01-26 Thread Pavel Dovgalyuk
> From: Paolo Bonzini [mailto:pbonz...@redhat.com] > On 26/01/2017 14:37, Pavel Dovgalyuk wrote: > >> Simpler: > >> > >>use_icount && > >>((int32_t)cpu->icount_decr.u32 < 0 || > >> cpu->icount_decr.u16.low + cpu->icount_extra == 0) > > Right. > > > >> But I'm not sure that you need to t

Re: [Qemu-devel] [PATCH v8 2/9] icount: exit cpu loop on expire

2017-01-26 Thread Paolo Bonzini
On 26/01/2017 15:32, Pavel Dovgalyuk wrote: >> From: Paolo Bonzini [mailto:pbonz...@redhat.com] >> On 26/01/2017 14:37, Pavel Dovgalyuk wrote: Simpler: use_icount && ((int32_t)cpu->icount_decr.u32 < 0 || cpu->icount_decr.u16.low + cpu->icount_extra == 0) >>> Rig

[Qemu-devel] [PATCH v2 3/8] hw: Default -drive to if=none instead of ide when ide cannot work

2017-01-26 Thread Markus Armbruster
Block backends defined with -drive if=ide are meant to be picked up by machine initialization code: a suitable frontend gets created and wired up automatically. if=ide drives not picked up that way can still be used with -device as if they had if=none, but that's unclean and best avoided. Unused

[Qemu-devel] [PATCH v2 4/8] hw: Default -drive to if=none instead of scsi when scsi cannot work

2017-01-26 Thread Markus Armbruster
Block backends defined with -drive if=scsi are meant to be picked up by machine initialization code: a suitable frontend gets created and wired up automatically. if=scsi drives not picked up that way can still be used with -device as if they had if=none, but that's unclean and best avoided. Unuse

[Qemu-devel] [PATCH v2 1/8] hw: Default -drive to if=ide explicitly where it works

2017-01-26 Thread Markus Armbruster
Block backends defined with -drive if=ide are meant to be picked up by machine initialization code: a suitable frontend gets created and wired up automatically. if=ide drives not picked up that way can still be used with -device as if they had if=none, but that's unclean and best avoided. Unused

[Qemu-devel] [PATCH v2 7/8] blockdev: Make orphaned -drive fatal

2017-01-26 Thread Markus Armbruster
Block backends defined with "-drive if=T" with T other than "none" are meant to be picked up by machine initialization code: a suitable frontend gets created and wired up automatically. If machine initialization code doesn't comply, the block backend remains unused. This triggers a warning since

[Qemu-devel] [PATCH v2 6/8] blockdev: Improve message for orphaned -drive

2017-01-26 Thread Markus Armbruster
We warn when a -drive isn't supported by the machine type (commit a66c9dc): $ qemu-system-x86_64 -S -display none -drive if=mtd Warning: Orphaned drive without device: id=mtd0,file=,if=mtd,bus=0,unit=0 Improve this to point to the offending bit of configuration: qemu-system-x86_64: -

[Qemu-devel] [PATCH v2 2/8] hw/arm/cubieboard hw/arm/xlnx-ep108: Fix units_per_default_bus

2017-01-26 Thread Markus Armbruster
Machine types cubieboard, xlnx-ep108, xlnx-zcu102 have an onboard AHCI controller, but neglect to set their MachineClass member units_per_default_bus = 1. This permits -drive if=ide,unit=1, which makes no sense for AHCI. It also screws up index=N for odd N, because it gets desugared to unit=1,bus

[Qemu-devel] [PATCH v2 0/8] More sensible default for -drive interface type

2017-01-26 Thread Markus Armbruster
Block backends defined with -drive if=T, T!=none are meant to be picked up by machine initialization code: a suitable frontend gets created and wired up automatically. if=T drives not picked up that way can still be used with -device as if they had if=none, but that's unclean and best avoided. Un

[Qemu-devel] [PATCH v2 5/8] hw/arm/highbank: Default -drive to if=ide instead of if=scsi

2017-01-26 Thread Markus Armbruster
These machines have no onboard SCSI HBA, and no way to plug one. -drive if=scsi therefore cannot work. They do have an onboard IDE controller (sysbus-ahci), but fail to honor if=ide. Change their default to if=ide, and add a TODO comment on what needs to be done to actually honor -drive if=ide.

[Qemu-devel] [PATCH v2 8/8] hw: Drop superfluous special checks for orphaned -drive

2017-01-26 Thread Markus Armbruster
We've traditionally rejected orphans here and there, but not systematically. For instance, the sun4m machines have an onboard SCSI HBA (bus=0), and have always rejected bus>0. Other machines with an onboard SCSI HBA don't. Commit a66c9dc made all orphans trigger a warning, and the previous commi

Re: [Qemu-devel] [PATCH v4 1/9] ACPI: Add a function for building named qword entries

2017-01-26 Thread Michael S. Tsirkin
On Thu, Jan 26, 2017 at 01:48:37AM +0100, Laszlo Ersek wrote: > On 01/25/17 19:35, Michael S. Tsirkin wrote: > > On Wed, Jan 25, 2017 at 09:36:52AM -0800, Ben Warren wrote: > >> Hi Laszlo, > >> > >> > >> On Jan 24, 2017, at 7:55 PM, Laszlo Ersek wrote: > >> > >> Hi Ben, > >> > >> sorry

Re: [Qemu-devel] [PATCH v2 3/8] hw: Default -drive to if=none instead of ide when ide cannot work

2017-01-26 Thread Laurent Vivier
Le 26/01/2017 à 16:09, Markus Armbruster a écrit : > Block backends defined with -drive if=ide are meant to be picked up by > machine initialization code: a suitable frontend gets created and > wired up automatically. > > if=ide drives not picked up that way can still be used with -device as > if

[Qemu-devel] [PATCH 1/3] hw/scsi: Concentrate -drive if=scsi auto-create in one place

2017-01-26 Thread Markus Armbruster
The logic to create frontends for -drive if=scsi is in SCSI HBAs. For all other interface types, it's in machine initialization code. A few machine types create the SCSI HBAs necessary for that. That's also not done for other interface types. I'm going to deprecate these SCSI eccentricities. I

[Qemu-devel] [PATCH 3/3] hw/i386: Deprecate -drive if=scsi with PC machine types

2017-01-26 Thread Markus Armbruster
The PC machines (pc-q35-* pc-i440fx-* pc-* isapc xenfv) automatically create lsi53c895a SCSI HBAs and SCSI devices to honor -drive if=scsi. For giggles, try -drive if=scsi,bus=25,media=cdrom --- this makes QEMU create 25 of them. lsi53c895a is thoroughly obsolete (PCI Ultra2 SCSI, ca. 2000), and c

[Qemu-devel] [PATCH 0/3] hw: Deprecate unwanted use -drive if=scsi

2017-01-26 Thread Markus Armbruster
Drives defined with if=scsi get connected to buses created with -device, unlike other interface types. Deprecate this usage. There is no good default SCSI HBA for PC machines. Deprecate if=scsi there entirely. Before this series, frontends for -drive if=scsi get created by SCSI HBAs. Frontends

[Qemu-devel] [PATCH 2/3] hw: Deprecate -drive if=scsi with non-onboard HBAs

2017-01-26 Thread Markus Armbruster
Block backends defined with "-drive if=T" with T other than "none" are meant to be picked up by machine initialization code: a suitable frontend gets created and wired up automatically. Drives defined with if=scsi are also picked up by SCSI HBAs added with -device, unlike other interface types. D

[Qemu-devel] [PATCH] aio-posix: drop QEMU_AIO_POLL_MAX_NS env var

2017-01-26 Thread Stefan Hajnoczi
This hunk should not have been merged but I forgot to remove it. Let's remove it before it slips into a QEMU release. ¯\_(ツ)_/¯ Signed-off-by: Stefan Hajnoczi --- aio-posix.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/aio-posix.c b/aio-posix.c index 9453d83..9a6348b 100644 --- a

[Qemu-devel] [PATCH v6 0/2] Qemu: gdbstub: fix vCont

2017-01-26 Thread Claudio Imbrenda
This small patchset fixes the incorrect behaviour of the vCont command in the gdb stub. The first patch, as suggested be Paolo, refactors some code. The most visible change is that it moves vm_start to cpus.c The second one fixes the incorrect behaviour of the vCont command. Previously, continu

[Qemu-devel] [PATCH v6 1/2] move vm_start to cpus.c

2017-01-26 Thread Claudio Imbrenda
This patch: * moves vm_start to cpus.c . * exports qemu_vmstop_requested, since it's needed by vm_start . * extracts vm_prepare_start from vm_start; it does what vm_start did, except restarting the cpus. vm_start now calls vm_prepare_start. * moves the call to qemu_clock_enable away from resume_

[Qemu-devel] [PATCH v6 2/2] gdbstub: Fix vCont behaviour

2017-01-26 Thread Claudio Imbrenda
When GDB issues a "vCont", QEMU was not handling it correctly when multiple VCPUs are active. For vCont, for each thread (VCPU), it can be specified whether to single step, continue or stop that thread. The default is to stop a thread. However, when (for example) "vCont;s:2" is issued, all VCPUs co

Re: [Qemu-devel] [Xen-devel] Commit 3a6c9 breaks QEMU on FreeBSD/Xen

2017-01-26 Thread Roger Pau Monné
On Wed, Jan 25, 2017 at 11:05:29AM +, Roger Pau Monné wrote: > On Tue, Jan 24, 2017 at 01:30:02PM -0800, Stefano Stabellini wrote: > > On Tue, 24 Jan 2017, Stefano Stabellini wrote: > > > On Tue, 24 Jan 2017, Roger Pau Monné wrote: > > > > Hello, > > > > > > > > The following commit: > > > >

Re: [Qemu-devel] [PATCH v2 3/8] hw: Default -drive to if=none instead of ide when ide cannot work

2017-01-26 Thread Thomas Huth
On 26.01.2017 16:09, Markus Armbruster wrote: > Block backends defined with -drive if=ide are meant to be picked up by > machine initialization code: a suitable frontend gets created and > wired up automatically. > > if=ide drives not picked up that way can still be used with -device as > if they

[Qemu-devel] [PULL v2 05/18] ARRAY_SIZE: check that argument is an array

2017-01-26 Thread Michael S. Tsirkin
It's a familiar pattern: some code uses ARRAY_SIZE, then refactoring changes the argument from an array to a pointer to a dynamically allocated buffer. Code keeps compiling but any ARRAY_SIZE calls now return the size of the pointer divided by element size. Let's add build time checks to ARRAY_SI

[Qemu-devel] [PULL v2 06/18] pci: mark ROMs read-only

2017-01-26 Thread Michael S. Tsirkin
Looks like we didn't mark PCI ROMs as RO allowing mischief such as guests writing there. Further, e.g. vhost gets confused trying to allocate enough space to log writes there. Fix it up. Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum Tested-by: Laurent Vivier --- hw/pci/pci.c

[Qemu-devel] [PULL v2 02/18] qxl: switch to constants within BUILD_BUG_ON

2017-01-26 Thread Michael S. Tsirkin
We are switching BUILD_BUG_ON to verify that it's parameter is a compile-time constant, and it turns out that some gcc versions (specifically gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609) are not smart enough to figure it out for expressions involving local variables. This is harmless but mea

[Qemu-devel] [PULL v2 08/18] hw/pcie: Introduce a base class for PCI Express Root Ports

2017-01-26 Thread Michael S. Tsirkin
From: Marcel Apfelbaum The 'base' PCI Express Root Port includes the common code to be re-used for all Root Ports implementations. Most of the code was taken from the current implementation of Intel's IOH 3420 Root Port. Signed-off-by: Marcel Apfelbaum Reviewed-by: Michael S. Tsirkin Signed-of

[Qemu-devel] [PULL v2 01/18] compiler: drop ; after BUILD_BUG_ON

2017-01-26 Thread Michael S. Tsirkin
All users include the trailing ; anyway, let's require that - it seems cleaner. Signed-off-by: Michael S. Tsirkin Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster --- include/qemu/compiler.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/qemu/compiler.h b/i

[Qemu-devel] [PULL v2 12/18] msix: Follow CODING_STYLE

2017-01-26 Thread Michael S. Tsirkin
From: Cao jin CC: Markus Armbruster CC: Marcel Apfelbaum CC: Michael S. Tsirkin Reviewed-by: Markus Armbruster Acked-by: Marcel Apfelbaum Signed-off-by: Cao jin Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/pci/msix.c | 8 ++-- 1 file changed, 6 insertions

[Qemu-devel] [PULL v2 10/18] hw/pcie: Introduce Generic PCI Express Root Port

2017-01-26 Thread Michael S. Tsirkin
From: Marcel Apfelbaum The Generic Root Port behaves almost the same as the Intel's IOH device with id 3420, without having Intel specific attributes. The device has two purposes: (1) Can be used on both X86 and ARM machines. (2) It will allow us to tweak the behaviour (e.g add vendor-spec

[Qemu-devel] [PULL v2 11/18] hw/i386: check if nvdimm is enabled before plugging

2017-01-26 Thread Michael S. Tsirkin
From: Haozhong Zhang The missing of 'nvdimm' in the machine type option '-M' means NVDIMM is disabled. QEMU should refuse to plug any NVDIMM device in this case and report the misconfiguration. The behavior of NVDIMM on unsupported platform (HW/FW) is vendor specific. For some vendors, it's unde

[Qemu-devel] [PULL v2 00/18] virtio, vhost, pci: fixes, features

2017-01-26 Thread Michael S. Tsirkin
The following changes since commit ae5045ae5b2bbd8ce1335d1b05f9ecacca83a6cf: Merge remote-tracking branch 'remotes/rth/tags/pull-nios-20170124' into staging (2017-01-25 13:30:23 +) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstre

[Qemu-devel] [PULL v2 16/18] vhost: skip ROM sections

2017-01-26 Thread Michael S. Tsirkin
vhost does not support RO protections on memory at the moment - adding ROMs would mean that e.g. a buggy guest might change them in-memory - a condition from which guest reset does not recover. Not nice. We also definitely don't want to try logging writes into ROMs - in particular guests set very

[Qemu-devel] [PULL v2 13/18] hcd-xhci: check & correct param before using it

2017-01-26 Thread Michael S. Tsirkin
From: Cao jin usb_xhci_realize() corrects invalid values of property "intrs" automatically, but the uncorrected value is passed to msi_init(), which chokes on invalid values. Delay that until after the correction. Resources allocated by usb_xhci_init() are leaked when msi_init() fails. Fix by

Re: [Qemu-devel] [PATCH] net: e1000e: fix dead code in e1000e_write_packet_to_guest

2017-01-26 Thread Dmitry Fleytman
Good catch! Reviewed-by: Dmitry Fleytman > On 26 Jan 2017, at 12:10 PM, Paolo Bonzini wrote: > > Because is_first is declared inside a loop, it is always true. The store > is dead, and so is the "else" branch of "if (is_first)". is_last is > okay though. > > Reported by Coverity. > > Signe

[Qemu-devel] [PULL v2 03/18] compiler: rework BUG_ON using a struct

2017-01-26 Thread Michael S. Tsirkin
There are theoretical concerns that some compilers might not trigger build failures on attempts to define an array of size (x ? -1 : 1) where x is a variable and make it a variable sized array instead. Let rewrite using a struct with a negative bit field size instead as there are no dynamic bit fie

[Qemu-devel] [PULL v2 15/18] virtio: make virtio_should_notify static

2017-01-26 Thread Michael S. Tsirkin
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Stefan Hajnoczi --- include/hw/virtio/virtio.h | 1 - hw/virtio/virtio.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/include/hw/vi

[Qemu-devel] [PULL v2 04/18] compiler: expression version of QEMU_BUILD_BUG_ON

2017-01-26 Thread Michael S. Tsirkin
QEMU_BUILD_BUG_ON uses a typedef in order to be safe to use outside functions, but sometimes it's useful to have a version that can be used within an expression. Following what Linux does, introduce QEMU_BUILD_BUG_ON_ZERO that return zero after checking condition at build time. Signed-off-by: Mich

[Qemu-devel] [PULL v2 14/18] pci: Convert msix_init() to Error and fix callers

2017-01-26 Thread Michael S. Tsirkin
From: Cao jin msix_init() reports errors with error_report(), which is wrong when it's used in realize(). The same issue was fixed for msi_init() in commit 1108b2f. In order to make the API change as small as possible, leave the return value check to later patch. For some devices(like e1000e, v

[Qemu-devel] [PULL v2 07/18] intel_iommu: fix and simplify size calculation in process_device_iotlb_desc()

2017-01-26 Thread Michael S. Tsirkin
From: Jason Wang We don't use 1ULL which is wrong during size calculation. Fix it, and while at it, switch to use cto64() and adds a comments to make it simpler and easier to be understood. Reported-by: Paolo Bonzini Cc: Paolo Bonzini Signed-off-by: Jason Wang Reviewed-by: Michael S. Tsirkin

[Qemu-devel] [PULL v2 09/18] hw/ioh3420: derive from PCI Express Root Port base class

2017-01-26 Thread Michael S. Tsirkin
From: Marcel Apfelbaum Preserve only Intel specific details. Signed-off-by: Marcel Apfelbaum Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/pci-bridge/ioh3420.c | 121 ++-- 1 file changed, 15 insertions(+), 106 deletions(-

  1   2   3   >