[Qemu-devel] [Bug 1788701] Re: "Zoom to fit" doesn't work with -display gtk -vga virtio

2018-08-23 Thread Gerd Hoffmann
virtio-vga will adapt the guest display to the window size (once the guest drivers are loaded). Therefore it is not needed to auto-resize the window (to avoid display scaling). -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU.

[Qemu-devel] [PATCH] blkdebug: Add support for latency rules

2018-08-23 Thread Marc Olson via Qemu-devel
Allow rules to be created to inject latency into I/O operations. Signed-off-by: Marc Olson --- block/blkdebug.c| 101 ++-- docs/devel/blkdebug.txt | 30 ++ 2 files changed, 103 insertions(+), 28 deletions(-) diff --git

Re: [Qemu-devel] [PATCH] trivial: Make bios files and source files non-executable

2018-08-23 Thread Thomas Huth
On 2018-06-13 12:34, David Hildenbrand wrote: > On 13.06.2018 07:24, Thomas Huth wrote: >> These files can not be executed on the host, so they should not be >> marked as executable. > > Or can not be executed at all :) > > Reviewed-by: David Hildenbrand > >> >> Signed-off-by: Thomas Huth >>

Re: [Qemu-devel] [PATCH] linux-user: move TargetFdTrans functions to their own file

2018-08-23 Thread Richard Henderson
On 08/23/2018 03:22 PM, Laurent Vivier wrote: > This will ease to move out syscall functions from syscall.c > > Signed-off-by: Laurent Vivier > --- > linux-user/Makefile.objs |2 +- > linux-user/fd-trans.c| 1408 > linux-user/fd-trans.h| 97 +++

Re: [Qemu-devel] [PATCH 8/8] hw/display/bcm2835_fb: Validate bcm2835_fb_mbox_push() config

2018-08-23 Thread Richard Henderson
On 08/14/2018 07:44 AM, Peter Maydell wrote: > Refactor bcm2835_fb_mbox_push() to work by calling > bcm2835_fb_validate_config() and bcm2835_fb_reconfigure(), > so that config set this way is also validated. > > Signed-off-by: Peter Maydell > --- > hw/display/bcm2835_fb.c | 63

Re: [Qemu-devel] [PATCH 7/8] hw/display/bcm2835_fb: Validate config settings

2018-08-23 Thread Richard Henderson
On 08/14/2018 07:44 AM, Peter Maydell wrote: > Validate the config settings that the guest tries to set. > > The wiki page documentation is not really accurate here: > generally rather than failing requests to set bad parameters, > the hardware will just clip them to something sensible. > >

Re: [Qemu-devel] [PATCH 6/8] hw/display/bcm2835_fb: Fix handling of virtual framebuffer

2018-08-23 Thread Richard Henderson
On 08/14/2018 07:44 AM, Peter Maydell wrote: > The raspi framebuffir in bcm2835_fb supports the definition framebuffer. > of a virtual "viewport", which is smaller than the full > physical framebuffer size and at an adjustable offset within > it. Only the viewport area is sent to the screen.

Re: [Qemu-devel] [PATCH 5/8] hw/display/bcm2835_fb: Abstract out calculation of pitch, size

2018-08-23 Thread Richard Henderson
On 08/14/2018 07:44 AM, Peter Maydell wrote: > Abstract out the calculation of the pitch and size of the > framebuffer into functions that operate on the BCM2835FBConfig > struct -- these are about to get a little more complicated > when we add support for virtual and physical sizes differing. >

Re: [Qemu-devel] [PATCH 4/8] hw/display/bcm2835_fb: Reset resolution, etc correctly

2018-08-23 Thread Richard Henderson
On 08/14/2018 07:44 AM, Peter Maydell wrote: > The bcm2835_fb's initial resolution and other parameters are set > via QOM properties. We should reset to those initial values on > device reset, which means we need to save the QOM property > values somewhere that they are not overwritten by guest >

Re: [Qemu-devel] [PATCH 3/8] hw/display/bcm2835_fb: Drop unused size and pitch fields

2018-08-23 Thread Richard Henderson
On 08/14/2018 07:44 AM, Peter Maydell wrote: > The BCM2835FBState struct has a 'pitch' field which is a > cached copy of xres * (bpp >> 3), and a 'size' field which is > a cached copy of pitch * yres. However we don't actually do > anything with these fields; delete them. We retain the >

Re: [Qemu-devel] [PATCH 2/8] hw/misc/bcm2835_property: Track fb settings using BCM2835FBConfig

2018-08-23 Thread Richard Henderson
On 08/14/2018 07:44 AM, Peter Maydell wrote: > Refactor the fb property setting code so that rather than > using a set of pointers to local variables to track > whether a config value has been updated in the current > mbox and if so what its new value is, we just copy > all the current settings of

Re: [Qemu-devel] [PATCH 1/8] hw/misc/bcm2835_fb: Move config fields to their own struct

2018-08-23 Thread Richard Henderson
On 08/14/2018 07:44 AM, Peter Maydell wrote: > The handling of framebuffer properties in the bcm2835_property code > is a bit clumsy, because for each of the many fb related properties > we try to track the value we're about to set and whether we're going > to be setting a value, and then we hand

Re: [Qemu-devel] [PATCH] hw/arm/mps2: Fix ID register errors on AN511 and AN385

2018-08-23 Thread Richard Henderson
On 08/23/2018 10:52 AM, Peter Maydell wrote: > Fix MPS2 SCC config register values for the mps2-an511 > and mps2-an385 boards: > * the SCC_AID bits [23:20] specify the FPGA build target board revision, >and the SCC_CFG4 register specifies the actual board revision, so >these should have

Re: [Qemu-devel] [PATCH V3 2/4] target-i386:add coalesced_pio API

2018-08-23 Thread Eduardo Habkost
On Fri, Aug 24, 2018 at 12:14:47AM +0800, Peng Hao wrote: > Signed-off-by: Peng Hao > --- > accel/kvm/kvm-all.c | 58 > - > include/exec/memattrs.h | 2 +- > 2 files changed, 53 insertions(+), 7 deletions(-) > > diff --git

Re: [Qemu-devel] [PATCH v2 0/5] Fix socket chardev regression

2018-08-23 Thread Peter Xu
On Thu, Aug 23, 2018 at 04:31:20PM +0200, Marc-André Lureau wrote: > Hi, > > In commit 25679e5d58e "chardev: tcp: postpone async connection setup" > (and its follow up 99f2f54174a59), Peter moved chardev socket > connection to machine_done event. However, chardev created later will > no longer

[Qemu-devel] [PATCH v2] job: Fix nested aio_poll() hanging in job_txn_apply

2018-08-23 Thread Fam Zheng
All callers have acquired ctx already. Doing that again results in aio_poll() hang. This fixes the problem that a BDRV_POLL_WHILE() in the callback cannot make progress because ctx is recursively locked, for example, when drive-backup finishes. There are two callers of job_finalize():

Re: [Qemu-devel] [PATCH v3 2/2] hw/pci: add PCI resource reserve capability to legacy PCI bridge

2018-08-23 Thread Liu, Jing2
Hi Marcel, On 8/22/2018 2:58 PM, Marcel Apfelbaum wrote: Hi Jing, On 08/22/2018 04:53 AM, Liu, Jing2 wrote: Hi Marcel, On 8/21/2018 5:59 PM, Marcel Apfelbaum wrote: On 08/21/2018 06:18 AM, Jing Liu wrote: Add hint to firmware (e.g. SeaBIOS) to reserve addtional BUS/IO/MEM/PREF resource

[Qemu-devel] [PATCH] tests: vm: auto_install OpenBSD

2018-08-23 Thread Fam Zheng
Upgrade OpenBSD to 6.3 using auto_install. Especially, drop SDL1, include SDL2. One limitation of this patch is that we need a temporary HTTP server on host 80 port for auto_install, because slirp cannot do guest forward on "host addr". Signed-off-by: Fam Zheng --- tests/vm/basevm.py | 28

[Qemu-devel] [PATCH v25 0/2] virtio-crypto: virtio crypto device specification

2018-08-23 Thread Longpeng(Mike)
--- v25 -> v24 - fix some typos and letex grammar. v24 -> v23 - Some enhancements based on Halil's suggestion. [Halil] v23 -> v22 - rename MUX_MODE to REVISION_1 [Halil] - fixed-length paramenters' instead of 'header' and 'variable-length parameters' instead of 'extra parameters' [Halil]

[Qemu-devel] [PATCH v25 1/2] virtio-crypto: Add virtio crypto device specification

2018-08-23 Thread Longpeng(Mike)
From: "Longpeng(Mike)" The virtio crypto device is a virtual crypto device (ie. hardware crypto accelerator card). Currently, the virtio crypto device provides the following crypto services: CIPHER, MAC, HASH, and AEAD. In this patch, CIPHER, MAC, HASH, AEAD services are introduced. VIRTIO-153

[Qemu-devel] [PATCH v25 2/2] virtio-crypto: Add conformance clauses

2018-08-23 Thread Longpeng(Mike)
From: "Longpeng(Mike)" Add the conformance targets and clauses for virtio-crypto device. Signed-off-by: Gonglei Signed-off-by: Zhoujian Signed-off-by: Longpeng(Mike) --- conformance.tex | 29 + 1 file changed, 29 insertions(+) diff --git a/conformance.tex

[Qemu-devel] [PATCH v2 13/13] block/backup: qapi documentation fixup

2018-08-23 Thread John Snow
Fix documentation to match the other jobs amended for 3.1. Signed-off-by: John Snow --- qapi/block-core.json | 18 ++ 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/qapi/block-core.json b/qapi/block-core.json index f877e9e414..c0b3d33dbb 100644 ---

[Qemu-devel] [PATCH v2 04/13] block/commit: refactor commit to use job callbacks

2018-08-23 Thread John Snow
Use the component callbacks; prepare, abort, and clean. NB: prepare is only called when the job has not yet failed; and abort can be called after prepare. complete -> prepare -> abort -> clean complete -> abort -> clean Signed-off-by: John Snow --- block/commit.c | 90

[Qemu-devel] [PATCH v2 12/13] qapi/block-stream: expose new job properties

2018-08-23 Thread John Snow
Signed-off-by: John Snow --- blockdev.c | 9 + hmp.c| 5 +++-- qapi/block-core.json | 16 +++- 3 files changed, 27 insertions(+), 3 deletions(-) diff --git a/blockdev.c b/blockdev.c index 429cdf9901..0cf8febe6c 100644 --- a/blockdev.c +++

[Qemu-devel] [PATCH v2 07/13] tests/blockjob: replace Blockjob with Job

2018-08-23 Thread John Snow
These tests don't actually test blockjobs anymore, they test generic Job lifetimes. Change the types accordingly. Signed-off-by: John Snow --- tests/test-blockjob.c | 98 ++- 1 file changed, 50 insertions(+), 48 deletions(-) diff --git

[Qemu-devel] [PATCH v2 01/13] block/commit: add block job creation flags

2018-08-23 Thread John Snow
Add support for taking and passing forward job creation flags. Signed-off-by: John Snow --- block/commit.c| 5 +++-- blockdev.c| 7 --- include/block/block_int.h | 5 - 3 files changed, 11 insertions(+), 6 deletions(-) diff --git a/block/commit.c

[Qemu-devel] [PATCH v2 11/13] qapi/block-mirror: expose new job properties

2018-08-23 Thread John Snow
Signed-off-by: John Snow --- blockdev.c | 14 ++ qapi/block-core.json | 30 -- 2 files changed, 42 insertions(+), 2 deletions(-) diff --git a/blockdev.c b/blockdev.c index 98b91e75a7..429cdf9901 100644 --- a/blockdev.c +++ b/blockdev.c @@

[Qemu-devel] [PATCH v2 05/13] block/mirror: conservative mirror_exit refactor

2018-08-23 Thread John Snow
For purposes of minimum code movement, refactor the mirror_exit callback to use the post-finalization callbacks in a trivial way. Signed-off-by: John Snow --- block/mirror.c | 26 ++ 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/block/mirror.c

[Qemu-devel] [PATCH v2 08/13] tests/test-blockjob: remove exit callback

2018-08-23 Thread John Snow
We remove the exit callback and the completed boolean along with it. We can simulate it just fine by waiting for the job to defer to the main loop, and then giving it one final kick to get the main loop portion to run. Signed-off-by: John Snow --- tests/test-blockjob.c | 16 ++-- 1

[Qemu-devel] [PATCH v2 10/13] qapi/block-commit: expose new job properties

2018-08-23 Thread John Snow
Signed-off-by: John Snow --- blockdev.c | 8 qapi/block-core.json | 16 +++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/blockdev.c b/blockdev.c index ec90eb1cf9..98b91e75a7 100644 --- a/blockdev.c +++ b/blockdev.c @@ -3204,6 +3204,8 @@ void

[Qemu-devel] [PATCH v2 09/13] jobs: remove .exit callback

2018-08-23 Thread John Snow
Now that all of the jobs use the component finalization callbacks, there's no use for the heavy-hammer .exit callback anymore. job_exit becomes a glorified type shim so that we can call job_completed from aio_bh_schedule_oneshot. Move these three functions down into job.c to eliminate a forward

[Qemu-devel] [PATCH v2 00/13] jobs: jobs: Job Exit Refactoring Pt 2

2018-08-23 Thread John Snow
This is part two of a two part series that refactors the exit logic of jobs. This series forces all jobs to use the "finalize" semantics that were introduced previously, but only exposed via the backup jobs. Patches 1-3 add plumbing for the auto-dismiss and auto-finalize flags but do not expose

[Qemu-devel] [PATCH v2 06/13] block/commit: refactor stream to use job callbacks

2018-08-23 Thread John Snow
Signed-off-by: John Snow --- block/stream.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/block/stream.c b/block/stream.c index 700eb239e4..81a7ec8ece 100644 --- a/block/stream.c +++ b/block/stream.c @@ -54,16 +54,16 @@ static int coroutine_fn

[Qemu-devel] [PATCH v2 03/13] block/stream: add block job creation flags

2018-08-23 Thread John Snow
Add support for taking and passing forward job creaton flags. Signed-off-by: John Snow --- block/stream.c| 5 +++-- blockdev.c| 3 ++- include/block/block_int.h | 5 - 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/block/stream.c b/block/stream.c

[Qemu-devel] [PATCH v2 02/13] block/mirror: add block job creation flags

2018-08-23 Thread John Snow
Add support for taking and passing forward job creaton flags. Signed-off-by: John Snow --- block/mirror.c| 5 +++-- blockdev.c| 3 ++- include/block/block_int.h | 5 - 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/block/mirror.c b/block/mirror.c

[Qemu-devel] [PATCH] linux-user: move TargetFdTrans functions to their own file

2018-08-23 Thread Laurent Vivier
This will ease to move out syscall functions from syscall.c Signed-off-by: Laurent Vivier --- linux-user/Makefile.objs |2 +- linux-user/fd-trans.c| 1408 linux-user/fd-trans.h| 97 +++ linux-user/syscall.c | 1448

[Qemu-devel] [PATCH v2 3/9] jobs: add exit shim

2018-08-23 Thread John Snow
All jobs do the same thing when they leave their running loop: - Store the return code in a structure - wait to receive this structure in the main thread - signal job completion via job_completed Few jobs do anything beyond exactly this. Consolidate this exit logic for a net reduction in SLOC.

[Qemu-devel] [PATCH v2 6/9] jobs: utilize job_exit shim

2018-08-23 Thread John Snow
Utilize the job_exit shim by not calling job_defer_to_main_loop, and where applicable, converting the deferred callback into the job_exit callback. This converts backup, stream, create, and the unit tests all at once. Most of these jobs do not see any changes to the order in which they clean up

[Qemu-devel] [PATCH v2 9/9] jobs: remove job_defer_to_main_loop

2018-08-23 Thread John Snow
Now that the job infrastructure is handling the job_completed call for all implemented jobs, we can remove the interface that allowed jobs to schedule their own completion. Signed-off-by: John Snow --- include/qemu/job.h | 17 - job.c | 40

[Qemu-devel] [PATCH v2 1/9] jobs: change start callback to run callback

2018-08-23 Thread John Snow
Presently we codify the entry point for a job as the "start" callback, but a more apt name would be "run" to clarify the idea that when this function returns we consider the job to have "finished," except for any cleanup which occurs in separate callbacks later. As part of this clarification,

[Qemu-devel] [PATCH v2 7/9] block/backup: make function variables consistently named

2018-08-23 Thread John Snow
Rename opaque_job to job to be consistent with other job implementations. Rename 'job', the BackupBlockJob object, to 's' to also be consistent. Suggested-by: Eric Blake Signed-off-by: John Snow --- block/backup.c | 62 +- 1 file changed,

[Qemu-devel] [PATCH v2 0/9] jobs: Job Exit Refactoring Pt 1

2018-08-23 Thread John Snow
This is part one of a two part series that refactors the exit logic of jobs. Part one removes job_defer_to_main_loop. Part two removes the job->exit() callback introduced in part one. It's redundant to have each job manage deferring to the main loop itself. Unifying this makes sense from an API

[Qemu-devel] [PATCH v2 5/9] block/mirror: utilize job_exit shim

2018-08-23 Thread John Snow
Change the manual deferment to mirror_exit into the implicit callback to job_exit and the mirror_exit callback. This does change the order of some bdrv_unref calls and job_completed, but thanks to the new context in which we call .exit, this is safe to defer the possible flushing of any nodes to

[Qemu-devel] [PATCH v2 4/9] block/commit: utilize job_exit shim

2018-08-23 Thread John Snow
Change the manual deferment to commit_complete into the implicit callback to job_exit, renaming commit_complete to commit_exit. This conversion does change the timing of when job_completed is called to after the bdrv_replace_node and bdrv_unref calls, which could have implications for bjob->blk

[Qemu-devel] [PATCH v2 8/9] jobs: remove ret argument to job_completed; privatize it

2018-08-23 Thread John Snow
Jobs are now expected to return their retcode on the stack, from the .run callback, so we can remove that argument. job_cancel does not need to set -ECANCELED because job_completed will update the return code itself if the job was canceled. While we're here, make job_completed static to job.c

[Qemu-devel] [PATCH v2 2/9] jobs: canonize Error object

2018-08-23 Thread John Snow
Jobs presently use both an Error object in the case of the create job, and char strings in the case of generic errors elsewhere. Unify the two paths as just j->err, and remove the extra argument from job_completed. The integer error code for job_completed is kept for now, to be removed shortly in

Re: [Qemu-devel] [PATCH] Fix ARM v7m gen_intermediate_code()

2018-08-23 Thread Christopher Friedt
On Thu, Aug 23, 2018 at 4:01 PM Christopher Friedt wrote: > On Thu., Aug. 23, 2018, 3:50 p.m. Christopher Friedt, > wrote: >> On Thu., Aug. 23, 2018, 2:20 p.m. Peter Maydell, >> wrote: >>> On 23 August 2018 at 17:36, Christopher Friedt >>> wrote: >>> >>> happen to have a copy on your lake,

Re: [Qemu-devel] [resend][PATCH] qga-win: add support for qmp_guest_fsfreeze_freeze_list

2018-08-23 Thread Michael Roth
Quoting Chen Hanxiao (2018-08-09 20:13:48) > From: Chen Hanxiao > > This patch add support for freeze specified fs. > > The valid mountpoints list member are [1]: > > The path of a mounted folder, for example, Y:\MountX\ > A drive letter, for example, D:\ > A volume GUID path of the form

[Qemu-devel] [Bug 1788701] Re: "Zoom to fit" doesn't work with -display gtk -vga virtio

2018-08-23 Thread Frederick Metzengerstein
** Description changed: - qemu version: 2.12.1 + qemu version: 2.12.1, 3.0.0 When using -display gtk for all -vga options (std,qxl,vmware,cirrus) the option "Zoom To Fit" is unchecked and auto-resizing of the window works well; except for -vga virtio: here "Zoom To Fit" is checked and

[Qemu-devel] [Bug 1788701] [NEW] "Zoom to fit" doesn't work with -display gtk -vga virtio

2018-08-23 Thread Frederick Metzengerstein
Public bug reported: qemu version: 2.12.1 When using -display gtk for all -vga options (std,qxl,vmware,cirrus) the option "Zoom To Fit" is unchecked and auto-resizing of the window works well; except for -vga virtio: here "Zoom To Fit" is checked and auto- resizing doesn't work. Proposal:

[Qemu-devel] [PATCH] input-linux: customizable toggle keys v2

2018-08-23 Thread Ryan El Kochta via Qemu-devel
This patch introduces a new string option to the input-linux commandline: toggle_keys=[num]:[num]:[num] ... Separated by commas, toggle_keys allows the user to specify the key IDs of all the keys desired for switching between the guest and host. These key IDs can be found in:

[Qemu-devel] [PATCH] input-linux: customizable toggle keys

2018-08-23 Thread Ryan El Kochta via Qemu-devel
This patch introduces a new string option to the input-linux commandline: toggle_keys=[num]:[num]:[num] ... Separated by colons, toggle_keys allows the user to specify the key IDs of all the keys desired for switching between the guest and host. These key IDs can be found in:

Re: [Qemu-devel] [PATCH v3 2/3] kvm: Add support to KVM_GET_MSR_FEATURE_INDEX_LIST and KVM_GET_MSRS system ioctl

2018-08-23 Thread Paolo Bonzini
On 23/08/2018 19:36, Eduardo Habkost wrote: >> Right, but if KVM_CAP_GET_MSR_FEATURES is not available I guess you can >> assume the MSRs to be zero for everything except "-cpu host". > Yes, that would be simplest way to implement the above. Then > QEMU would refuse to run if the feature was part

Re: [Qemu-devel] [PATCH v1 1/2] block/snapshot.c: eliminate use of ID input in snapshot operations

2018-08-23 Thread Daniel Henrique Barboza
On 08/23/2018 04:27 PM, Murilo Opsfelder Araujo wrote: Hi, Daniel. On Tue, Aug 21, 2018 at 06:00:23PM -0300, Daniel Henrique Barboza wrote: At this moment, QEMU attempts to create/load/delete snapshots by using either an ID (id_str) or a name. The problem is that the code isn't consistent

Re: [Qemu-devel] [PATCH] Fix ARM v7m gen_intermediate_code()

2018-08-23 Thread Christopher Friedt
On Thu., Aug. 23, 2018, 3:50 p.m. Christopher Friedt, wrote: > > > On Thu., Aug. 23, 2018, 2:20 p.m. Peter Maydell, > wrote: > >> On 23 August 2018 at 17:36, Christopher Friedt >> wrote: >> >> happen to have a copy on your lake, but the short answer >> is that bit 1 must be set, exactly

Re: [Qemu-devel] [PATCH] Fix ARM v7m gen_intermediate_code()

2018-08-23 Thread Christopher Friedt
On Thu., Aug. 23, 2018, 2:20 p.m. Peter Maydell, wrote: > On 23 August 2018 at 17:36, Christopher Friedt > wrote: > > Hi; thanks for your patch, but I don't think it is correct. > What it does is to make QEMU ignore the T bit in the xPSR. > The architecture says that what should happen is that

Re: [Qemu-devel] [PATCH v1 1/2] block/snapshot.c: eliminate use of ID input in snapshot operations

2018-08-23 Thread Murilo Opsfelder Araujo
Hi, Daniel. On Tue, Aug 21, 2018 at 06:00:23PM -0300, Daniel Henrique Barboza wrote: > At this moment, QEMU attempts to create/load/delete snapshots > by using either an ID (id_str) or a name. The problem is that the code > isn't consistent of whether the entered argument is an ID or a name, >

Re: [Qemu-devel] [libvirt] clean/simple Q35 support in libvirt+QEMU for guest OSes that don't support virtio-1.0

2018-08-23 Thread Markus Armbruster
Eduardo Habkost writes: > On Thu, Aug 23, 2018 at 05:26:47PM +0100, Daniel P. Berrangé wrote: > [...] >> There are countless mistakes in both QEMU & libvirt, but only some of >> them are worth the cost of changing. Agreed. >> I'm not seeing a compelling

[Qemu-devel] [PULL 2/3] vfio/pci: Fix failure to close file descriptor on error

2018-08-23 Thread Alex Williamson
A new error path fails to close the device file descriptor when triggered by a ballooning incompatibility within the group. Fix it. Fixes: 238e91728503 ("vfio/ccw/pci: Allow devices to opt-in for ballooning") Reviewed-by: Peter Xu Signed-off-by: Alex Williamson --- hw/vfio/common.c |1 +

[Qemu-devel] [PULL 3/3] postcopy: Synchronize usage of the balloon inhibitor

2018-08-23 Thread Alex Williamson
While the qemu_balloon_inhibit() interface appears rather general purpose, postcopy uses it in a last-caller-wins approach with no guarantee of balanced inhibits and de-inhibits. Wrap postcopy's usage of the inhibitor to give it one vote overall, using the same last-caller-wins approach as

[Qemu-devel] [PULL 1/3] vfio/pci: Handle subsystem realpath() returning NULL

2018-08-23 Thread Alex Williamson
Fix error reported by Coverity where realpath can return NULL, resulting in a segfault in strcmp(). This should never happen given that we're working through regularly structured sysfs paths, but trivial enough to easily avoid. Fixes: 238e91728503 ("vfio/ccw/pci: Allow devices to opt-in for

[Qemu-devel] [PULL 0/3] vfio: Fix coverity, postcopy, and error path issues

2018-08-23 Thread Alex Williamson
The following changes since commit 3392fbee4e435658733bbe9aab23392660558b59: Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-3.1-pull-request' into staging (2018-08-23 12:28:17 +0100) are available in the Git repository at: git://github.com/awilliam/qemu-vfio.git

Re: [Qemu-devel] [RFC PATCH v1 0/2] HMP/snapshot changes - do not use ID anymore

2018-08-23 Thread Daniel Henrique Barboza
Hi, On 08/22/2018 07:04 PM, Murilo Opsfelder Araujo wrote: Hi, Daniel. On Tue, Aug 21, 2018 at 06:00:22PM -0300, Daniel Henrique Barboza wrote: I am marking the patch series as "RFC" because it was supposed to be a discussion but, when I was investigating, it turned out to be easier to send

Re: [Qemu-devel] [PATCH] Fix ARM v7m gen_intermediate_code()

2018-08-23 Thread Peter Maydell
On 23 August 2018 at 17:36, Christopher Friedt wrote: > I hope this message finds you well, as I'm currently on a lake in the > middle of nowhere relying on my flaky cellular connection. Roaming > sucks. In any case, I found a bug while trying to execute the "svc 0" > instruction for cortex-m3. >

Re: [Qemu-devel] [PULL 0/2] Block patches

2018-08-23 Thread Peter Maydell
On 22 August 2018 at 04:43, Jeff Cody wrote: > The following changes since commit ee135aa0428fe5af2af7be04ff16d2b596a9330a: > > Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-3.1-20180821' > into staging (2018-08-21 13:27:11 +0100) > > are available in the Git repository at: > >

Re: [Qemu-devel] [PATCH v3 2/3] scripts: add render_block_graph function for QEMUMachine

2018-08-23 Thread Eduardo Habkost
On Thu, Aug 23, 2018 at 06:46:54PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Render block nodes graph with help of graphviz. This new function is > for debugging, so there is no sense to put it into qemu.py as a method > of QEMUMachine. Let's instead put it separately. > > Signed-off-by:

[Qemu-devel] [PATCH] hw/arm/mps2: Fix ID register errors on AN511 and AN385

2018-08-23 Thread Peter Maydell
Fix MPS2 SCC config register values for the mps2-an511 and mps2-an385 boards: * the SCC_AID bits [23:20] specify the FPGA build target board revision, and the SCC_CFG4 register specifies the actual board revision, so these should have matching values. Claim to be board revision C,

[Qemu-devel] [PATCH] Fix ARM v7m gen_intermediate_code()

2018-08-23 Thread Christopher Friedt
Hi list, I hope this message finds you well, as I'm currently on a lake in the middle of nowhere relying on my flaky cellular connection. Roaming sucks. In any case, I found a bug while trying to execute the "svc 0" instruction for cortex-m3. A UsageFault (EXCP_INVSTATE) is injected at

Re: [Qemu-devel] [PATCH 21/22] hw/arm/mps2-tz: Instantiate SPI controllers

2018-08-23 Thread Richard Henderson
On 08/20/2018 07:11 AM, Peter Maydell wrote: > The SPI controllers in the MPS2 AN505 board are PL022s. > We have a model of the PL022, so create these devices. > > We don't currently model the LCD controller that sits behind > one of the PL022s; the others are intended to control devices > that

Re: [Qemu-devel] [PATCH] vl.c: make sure maxcpus matches topology to prevent migration failure

2018-08-23 Thread Eduardo Habkost
On Thu, Aug 23, 2018 at 06:32:41PM +0200, Paolo Bonzini wrote: > On 23/08/2018 16:51, Igor Mammedov wrote: > > Topology (threads*cores*sockets) must match maxcpus to be valid, > > otherwise we could start QEMU with invalid topology that throws > > a error on migration destination side, that should

Re: [Qemu-devel] [PATCH v3 2/3] kvm: Add support to KVM_GET_MSR_FEATURE_INDEX_LIST and KVM_GET_MSRS system ioctl

2018-08-23 Thread Eduardo Habkost
On Thu, Aug 23, 2018 at 07:28:25PM +0200, Paolo Bonzini wrote: > On 23/08/2018 19:11, Eduardo Habkost wrote: > >>> We don't want QEMU to refuse to run if the kernel doesn't have > >>> KVM_CAP_GET_MSR_FEATURES. We can treat missing capability as > >>> equivalent to returning an empty list of MSRs.

Re: [Qemu-devel] [PATCH 22/22] hw/arm/mps2-tz: Fix MPS2 SCC config register values

2018-08-23 Thread Peter Maydell
On 23 August 2018 at 18:42, Richard Henderson wrote: > On 08/20/2018 07:11 AM, Peter Maydell wrote: >> +mmc->scc_id = 0x4104 | (0x505 << 4); > > Is it any less clear to say 0x41045050? It makes it a bit clearer that that field is the number from the image name, I think. (Compare the

Re: [Qemu-devel] [PATCH 19/22] hw/ssi/pl022: Correct wrong value for PL022_INT_RT

2018-08-23 Thread Richard Henderson
On 08/20/2018 07:11 AM, Peter Maydell wrote: > The PL022 interrupt registers have bits allocated as: > 0: ROR (receive overrun) > 1: RT (receive timeout) > 2: RX (receive FIFO half full or less) > 3: TX (transmit FIFO half full or less) > > A cut and paste error meant we had the wrong value

Re: [Qemu-devel] [PATCH v1 1/2] block/snapshot.c: eliminate use of ID input in snapshot operations

2018-08-23 Thread Daniel Henrique Barboza
Hey, On 08/22/2018 07:06 PM, Murilo Opsfelder Araujo wrote: Hi, Daniel. On Tue, Aug 21, 2018 at 06:00:23PM -0300, Daniel Henrique Barboza wrote: At this moment, QEMU attempts to create/load/delete snapshots by using either an ID (id_str) or a name. The problem is that the code isn't

Re: [Qemu-devel] [PATCH v3 2/3] scripts: add render_block_graph function for QEMUMachine

2018-08-23 Thread Eduardo Habkost
On Thu, Aug 23, 2018 at 06:46:54PM +0300, Vladimir Sementsov-Ogievskiy wrote: > Render block nodes graph with help of graphviz. This new function is > for debugging, so there is no sense to put it into qemu.py as a method > of QEMUMachine. Let's instead put it separately. > > Signed-off-by:

Re: [Qemu-devel] [PATCH 18/22] hw/ssi/pl022: Use DeviceState::realize rather than SysBusDevice::init

2018-08-23 Thread Richard Henderson
On 08/20/2018 07:11 AM, Peter Maydell wrote: > Move from the legacy SysBusDevice::init method to using > DeviceState::realize. > > Signed-off-by: Peter Maydell > --- > hw/ssi/pl022.c | 8 +++- > 1 file changed, 3 insertions(+), 5 deletions(-) Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH 22/22] hw/arm/mps2-tz: Fix MPS2 SCC config register values

2018-08-23 Thread Richard Henderson
On 08/20/2018 07:11 AM, Peter Maydell wrote: > +mmc->scc_id = 0x4104 | (0x505 << 4); Is it any less clear to say 0x41045050? Otherwise, Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH 16/22] hw/ssi/pl022: Set up reset function in class init

2018-08-23 Thread Richard Henderson
On 08/20/2018 07:11 AM, Peter Maydell wrote: > Currently the PL022 calls pl022_reset() from its class init > function. Make it register a DeviceState reset method instead, > so that we reset the device on system reset. > > Signed-off-by: Peter Maydell > --- > hw/ssi/pl022.c | 7 +-- > 1

Re: [Qemu-devel] [PATCH 14/22] hw/arm/mps2-tz: Create PL081s and MSCs

2018-08-23 Thread Richard Henderson
On 08/20/2018 07:11 AM, Peter Maydell wrote: > The AN505 FPGA image includes four PL081 DMA controllers, each > of which is gated by a Master Security Controller that allows > the guest to prevent a non-secure DMA controller from accessing > memory that is used by secure guest code. Create and

Re: [Qemu-devel] [PATCH 17/22] hw/ssi/pl022: Don't directly call vmstate_register()

2018-08-23 Thread Richard Henderson
On 08/20/2018 07:11 AM, Peter Maydell wrote: > Use the DeviceState vmsd pointer rather than calling vmstate_register() > directly. > > Signed-off-by: Peter Maydell > --- > hw/ssi/pl022.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Richard Henderson r~

Re: [Qemu-devel] [PATCH 12/22] hw/misc/iotkit-secctl: Wire up registers for controlling MSCs

2018-08-23 Thread Peter Maydell
On 23 August 2018 at 18:21, Richard Henderson wrote: > On 08/20/2018 07:11 AM, Peter Maydell wrote: >> The IoTKit does not have any Master Security Contollers itself, >> but it does provide registers in the secure privilege control >> block which allow control of MSCs in the external system. >>

Re: [Qemu-devel] [PATCH v3 58/58] json: Update references to RFC 7159 to RFC 8259

2018-08-23 Thread Eric Blake
On 08/23/2018 11:40 AM, Markus Armbruster wrote: RFC 8259 (December 2017) obsoletes RFC 7159 (March 2014). Signed-off-by: Markus Armbruster --- include/qapi/qmp/qnum.h | 2 +- qapi/introspect.json| 2 +- qobject/json-parser.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-)

Re: [Qemu-devel] [PATCH 13/22] hw/arm/iotkit: Wire up the lines for MSCs

2018-08-23 Thread Richard Henderson
On 08/20/2018 07:11 AM, Peter Maydell wrote: > The IoTKit doesn't have any MSCs itself but it does need > some wiring to connect the external signals from MSCs > in the outer board model up to the registers and the > NVIC IRQ line. > > We also need to expose a MemoryRegion corresponding to > the

Re: [Qemu-devel] [PATCH 22/22] hw/arm/mps2-tz: Fix MPS2 SCC config register values

2018-08-23 Thread Peter Maydell
On 23 August 2018 at 18:45, Peter Maydell wrote: > On 23 August 2018 at 18:42, Richard Henderson > wrote: >> On 08/20/2018 07:11 AM, Peter Maydell wrote: >>> +mmc->scc_id = 0x4104 | (0x505 << 4); >> >> Is it any less clear to say 0x41045050? > > It makes it a bit clearer that that field

Re: [Qemu-devel] [PATCH] pc: acpi: revert back to 1 SRAT entry for hotpluggable area

2018-08-23 Thread Eduardo Habkost
On Thu, Aug 23, 2018 at 10:14:06AM +0200, Igor Mammedov wrote: > On Wed, 22 Aug 2018 15:01:12 -0300 > Eduardo Habkost wrote: [...] > > However, have you considered keeping adding separate entries for > > NVDIMM devices only (so we follow the spec), but add a single > > (numa_nodes-1,

Re: [Qemu-devel] [PATCH 15/22] hw/ssi/pl022: Allow use as embedded-struct device

2018-08-23 Thread Richard Henderson
On 08/20/2018 07:11 AM, Peter Maydell wrote: > Create a new include file for the pl022's device struct, > type macros, etc, so that it can be instantiated using > the "embedded struct" coding style. > > While we're adding the new file to MAINTAINERS, add > also the .c file, which was missing an

Re: [Qemu-devel] [PATCH 12/22] hw/misc/iotkit-secctl: Wire up registers for controlling MSCs

2018-08-23 Thread Richard Henderson
On 08/20/2018 07:11 AM, Peter Maydell wrote: > The IoTKit does not have any Master Security Contollers itself, > but it does provide registers in the secure privilege control > block which allow control of MSCs in the external system. > Add support for these registers. > > Signed-off-by: Peter

Re: [Qemu-devel] [PATCH 20/22] hw/ssi/pl022: Correct wrong DMACR and ICR handling

2018-08-23 Thread Richard Henderson
On 08/20/2018 07:11 AM, Peter Maydell wrote: > In the PL022, register offset 0x20 is the ICR, a write-only > interrupt-clear register. Register offset 0x24 is DMACR, the DMA > control register. We were incorrectly implementing (a stub version > of) DMACR at 0x20, and not implementing anything at

Re: [Qemu-devel] [PATCH 11/22] hw/misc/tz-msc: Model TrustZone Master Security Controller

2018-08-23 Thread Richard Henderson
On 08/20/2018 07:11 AM, Peter Maydell wrote: > Implement a model of the TrustZone Master Securtiy Controller, > as documented in the Arm CoreLink SIE-200 System IP for > Embedded TRM (DDI0571G): > https://developer.arm.com/products/architecture/m-profile/docs/ddi0571/g > > The MSC is intended

Re: [Qemu-devel] [PATCH v3 06/58] qmp-test: Cover syntax and lexical errors

2018-08-23 Thread Eric Blake
On 08/23/2018 11:39 AM, Markus Armbruster wrote: qmp-test neglects to cover QMP input that isn't valid JSON. libqtest doesn't let us such input. Add qtest_qmp_send_raw() for this purpose, s/us/us send/ and put it to use in qmp-test. Signed-off-by: Markus Armbruster Reviewed-by: Eric

[Qemu-devel] [Bug 1788665] [NEW] Low 2D graphics performance with Windows 10 (1803) VGA passthrough VM using "Spectre" protection

2018-08-23 Thread Heiko Sieger
Public bug reported: Windows 10 (1803) VM using VGA passthrough via qemu script. After upgrading Windows 10 Pro VM to version 1803, or possibly after applying the March/April security updates from Microsoft, the VM would show low 2D graphics performance (sluggishness in 2D applications and low

Re: [Qemu-devel] [PATCH v6 2/2] target: arm: Add support for VCPU event states

2018-08-23 Thread Peter Maydell
On 23 August 2018 at 16:45, Dongjiu Geng wrote: > This patch extends the qemu-kvm state sync logic with support for > KVM_GET/SET_VCPU_EVENTS, giving access to yet missing SError exception. > And also it can support the exception state migration. > > Signed-off-by: Dongjiu Geng Did you forget

[Qemu-devel] [PULL v4 00/69] Misc patches for 2018-08-21

2018-08-23 Thread Paolo Bonzini
The following changes since commit 659b11e7a7239529cfdb4968418268ff9aa22d88: Merge remote-tracking branch 'remotes/vivier2/tags/linux-user-for-3.1-pull-request' into staging (2018-08-21 11:36:15 +0100) are available in the Git repository at: git://github.com/bonzini/qemu.git

[Qemu-devel] [PATCH v3 40/58] json: Leave rejecting invalid interpolation to parser

2018-08-23 Thread Markus Armbruster
Both lexer and parser reject invalid interpolation specifications. The parser's check is useless. The lexer ends the token right after the first bad character. This tends to lead to suboptimal error reporting. For instance, input [ %04d ] produces the tokens JSON_LSQUARE [

[Qemu-devel] [PATCH v3 54/58] tests/drive_del-test: Fix harmless JSON interpolation bug

2018-08-23 Thread Markus Armbruster
test_after_failed_device_add() does this: response = qmp("{'execute': 'device_add'," " 'arguments': {" " 'driver': 'virtio-blk-%s'," " 'drive': 'drive0'" "}}", qvirtio_get_dev_type()); Wrong. An interpolation

[Qemu-devel] [PATCH v3 55/58] json: Keep interpolation state in JSONParserContext

2018-08-23 Thread Markus Armbruster
The recursive descent parser passes along a pointer to JSONParserContext. It additionally passes a pointer to interpolation state (a va_alist *) as needed to reach its consumer parse_interpolation(). Stuffing the latter pointer into JSONParserContext saves us the trouble of passing it along, so

Re: [Qemu-devel] [PATCH v3 2/3] kvm: Add support to KVM_GET_MSR_FEATURE_INDEX_LIST and KVM_GET_MSRS system ioctl

2018-08-23 Thread Paolo Bonzini
On 23/08/2018 19:11, Eduardo Habkost wrote: >>> We don't want QEMU to refuse to run if the kernel doesn't have >>> KVM_CAP_GET_MSR_FEATURES. We can treat missing capability as >>> equivalent to returning an empty list of MSRs. >> Yes. I'll let caller (kvm_arch_init) ignore the return value but a

[Qemu-devel] [PATCH v3 53/58] json: Clean up headers

2018-08-23 Thread Markus Armbruster
The JSON parser has three public headers, json-lexer.h, json-parser.h, json-streamer.h. They all contain stuff that is of no interest outside qobject/json-*.c. Collect the public interface in include/qapi/qmp/json-parser.h, and everything else in qobject/json-parser-int.h. Signed-off-by: Markus

[Qemu-devel] [PATCH v3 58/58] json: Update references to RFC 7159 to RFC 8259

2018-08-23 Thread Markus Armbruster
RFC 8259 (December 2017) obsoletes RFC 7159 (March 2014). Signed-off-by: Markus Armbruster --- include/qapi/qmp/qnum.h | 2 +- qapi/introspect.json| 2 +- qobject/json-parser.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/qapi/qmp/qnum.h

[Qemu-devel] [PATCH v3 47/58] qjson: Have qobject_from_json() & friends reject empty and blank

2018-08-23 Thread Markus Armbruster
The last case where qobject_from_json() & friends return null without setting an error is empty or blank input. Callers: * block.c's parse_json_protocol() reports "Could not parse the JSON options". It's marked as a work-around, because it also covered actual bugs, but they got fixed in the

  1   2   3   4   >