Re: [Qemu-devel] [PATCH v3 3/5] block: qobject_is_equal() in bdrv_reopen_prepare()

2017-07-03 Thread Max Reitz
On 2017-07-03 14:51, Eric Blake wrote: > On 07/03/2017 07:25 AM, Max Reitz wrote: >> Currently, bdrv_reopen_prepare() assumes that all BDS options are >> strings. However, this is not the case if the BDS has been created >> through the json: pseudo-protocol or blockdev-add. >> >> Note that the user

Re: [Qemu-devel] [Qemu-ppc] [PATCH] spapr: fix memory hotplug error path

2017-07-03 Thread Daniel Henrique Barboza
On 07/03/2017 09:21 AM, Greg Kurz wrote: QEMU shouldn't abort if spapr_add_lmbs()->spapr_drc_attach() fails. Let's propagate the error instead, like it is done everywhere else where spapr_drc_attach() is called. Signed-off-by: Greg Kurz --- hw/ppc/spapr.c | 10 -- 1 file changed,

[Qemu-devel] [RFC v3 1/2] target/ppc/cpu-models: set POWER9_v1.0 as POWER9 DD1

2017-07-03 Thread Laurent Vivier
CPU_POWERPC_POWER9_DD1 is 0x004E0100, so this is the POWER9 v1.0. When we run qemu on a POWER9 DD1 host, we must use either "-cpu host" or "-cpu POWER9", but in the latter case it fails with Unable to find sPAPR CPU Core definition because POWER9 DD1 doesn't appear in the list of known CPUs.

[Qemu-devel] [RFC v3 2/2] target/ppc: move POWER9 DD1 workaround to ppc_cpu_initfn

2017-07-03 Thread Laurent Vivier
Commit 5f3066d ("target/ppc: Allow workarounds for POWER9 DD1") disables compatibility mode for POWER9 DD1 to allow to boot on POWER9 DD1 host with KVM. As the workaround has been added in kvmppc_host_cpu_class_init(), it applies only on CPU created with "-cpu host". As we want to be able to use a

[Qemu-devel] [RFC v3 0/2] target/ppc/cpu-models: set POWER9_v1.0 as POWER9 DD1

2017-07-03 Thread Laurent Vivier
This patch series allows to use "-cpu POWER9" with a POWER9 DD1 host and KVM HV. With TCG, "-cpu POWER9" selects POWER9_v2.0 (POWER9 DD2). v3: add the patch to move POWER9 DD1 workaround to the generic part (not only for "-cpu host"). v2: add POWER9_v2.0 sent as RFC as "-cpu POWER9" break

[Qemu-devel] [PATCH 1/2 v2] xenfb: Use qemu_input_handler_* calls directly

2017-07-03 Thread Owen Smith
The xenvkbd input device uses functions from input-legacy.c Use the appropriate qemu_input_handler_* functions instead of calling functions in input-legacy.c that in turn call the correct functions. The bulk of this patch removes the extra layer of calls by moving the required structure members int

[Qemu-devel] [PATCH 2/2 v2] xenfb: Allow vkbd to connect without a DisplayState

2017-07-03 Thread Owen Smith
If the vkbd device model is registered and the vfb device model is not registered, the backend will not transition to connected. If there is no DisplayState, then the absolute coordinates cannot be scaled, and will remain in the range [0, 0x7fff]. Backend writes "feature-raw-pointer" to indicate th

[Qemu-devel] [PATCH 0/2 v2] xenfb: Fix protocol for HVM guests

2017-07-03 Thread Owen Smith
This series is intended to alow HVM guests to use the vkbd device with a PV frontend driver. Initial version at: http://xenbits.xen.org/gitweb/?p=pvdrivers/win/xenvkbd.git;a=tree Since the vkbd device is initialised for HVM guests, using the vkbd device can allow the disabling of the USB controlle

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

2017-07-03 Thread Markus Armbruster
Eduardo Habkost writes: > On Fri, Jun 30, 2017 at 01:40:58PM +0200, Markus Armbruster wrote: > [...] >> >> I doubt the macros make the bug fixing materially easier, and I doubt >> they can reduce future bugs of this kind. What they can do is letting >> us get rid of error_propagate() boilerplat

Re: [Qemu-devel] [PATCH v7 2/3] test-qga: pass environemnt to qemu-ga

2017-07-03 Thread Marc-André Lureau
On Mon, Jul 3, 2017 at 1:40 PM Tomáš Golembiovský wrote: > Modify fixture_setup() to pass environemnt variables to spawned qemu-ga > instance. > > Signed-off-by: Tomáš Golembiovský > Reviewed-by: Marc-André Lureau --- > tests/test-qga.c | 8 > 1 file changed, 4 insertions(+), 4 del

Re: [Qemu-devel] [PATCH] spapr: fix memory hotplug error path

2017-07-03 Thread Igor Mammedov
On Mon, 03 Jul 2017 14:21:31 +0200 Greg Kurz wrote: > QEMU shouldn't abort if spapr_add_lmbs()->spapr_drc_attach() fails. > Let's propagate the error instead, like it is done everywhere else > where spapr_drc_attach() is called. > > Signed-off-by: Greg Kurz > --- > hw/ppc/spapr.c | 10 ++

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

2017-07-03 Thread Eduardo Habkost
On Mon, Jul 03, 2017 at 03:21:56PM +0200, Markus Armbruster wrote: > Eduardo Habkost writes: > > > On Fri, Jun 30, 2017 at 01:40:58PM +0200, Markus Armbruster wrote: > > [...] > >> > >> I doubt the macros make the bug fixing materially easier, and I doubt > >> they can reduce future bugs of this

Re: [Qemu-devel] [RFC PATCH 1/3] vmstate: error hint for failed equal checks

2017-07-03 Thread Markus Armbruster
Halil Pasic writes: > On 06/30/2017 04:54 PM, Eric Blake wrote: >> On 06/30/2017 09:41 AM, Halil Pasic wrote: > 'This' basically boils down to the question and > 'Why aren't hints reported in QMP context?' QMP is supposed to be machine-parseable. Hints are supposed to be h

Re: [Qemu-devel] [PATCH RFC 0/6] q35: add acpi pci hotplug support

2017-07-03 Thread Alexander Bezzubikov
Hmm, I've failed to make SHPC (from current master) work on any modern Linux guests. 2017-07-03 15:27 GMT+03:00 Igor Mammedov : > On Fri, 30 Jun 2017 10:25:05 +0300 > Marcel Apfelbaum wrote: > > [...] > > > > So for the modern systems not supporting PCI ACPI hotplug > > we don't need pci-bridges

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

2017-07-03 Thread Pradeep Jagadeesh
On 6/30/2017 11:33 AM, Dr. David Alan Gilbert wrote: * Pradeep Jagadeesh (pradeepkiruv...@gmail.com) wrote: This patch introduces hmp interfaces for the fsdev devices. Signed-off-by: Pradeep Jagadeesh --- hmp-commands-info.hx | 18 ++ hmp-commands.hx | 19 +++ hmp

Re: [Qemu-devel] [RFC 00/29] postcopy+vhost-user/shared ram

2017-07-03 Thread Alexey
Hello, David! Thank for you patch set. On Wed, Jun 28, 2017 at 08:00:18PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Hi, > This is a RFC/WIP series that enables postcopy migration > with shared memory to a vhost-user process. > It's based off current-head

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

2017-07-03 Thread Markus Armbruster
"Daniel P. Berrange" writes: > On Thu, Jun 29, 2017 at 12:42:38PM -0700, Alistair Francis wrote: >> This patch removes the exisinting error_vreport() function and replaces it >> with a more generic vreport() function that takes an enum describing the >> information to be reported. Why remove err

Re: [Qemu-devel] [PATCH v3 5/5] tests: Add check-qobject for equality tests

2017-07-03 Thread Eric Blake
On 07/03/2017 07:25 AM, Max Reitz wrote: > Add a new test file (check-qobject.c) for unit tests that concern > QObjects as a whole. > > Its only purpose for now is to test the qobject_is_equal() function. > > Signed-off-by: Max Reitz > --- > tests/Makefile.include | 4 +- > tests/check-qobjec

Re: [Qemu-devel] [PATCH v2 1/1] virtio-scsi-ccw: use ioeventfd even when KVM is disabled

2017-07-03 Thread Cornelia Huck
On Mon, 3 Jul 2017 12:20:03 +0200 Christian Borntraeger wrote: > On 07/03/2017 10:51 AM, QingFeng Hao wrote: > > > diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c > > index a3d00196f4..c37f9c3b9e 100644 > > --- a/target/s390x/kvm.c > > +++ b/target/s390x/kvm.c > > @@ -2220,6 +2220,9 @@ int k

Re: [Qemu-devel] [PATCH 1/1] virtio-scsi-ccw: use ioeventfd even when KVM is disabled

2017-07-03 Thread Cornelia Huck
On Mon, 3 Jul 2017 09:38:36 +0200 QingFeng Hao wrote: > Do not check kvm_eventfds_enabled() when KVM is disabled since it > always returns 0. Since commit > 8c56c1a592b5092d91da8d8943c1d6462a6f ("memory: emulate > ioeventfd") it has been possible to use ioeventfds in qtest or TCG > mode. >

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

2017-07-03 Thread Daniel P. Berrange
On Mon, Jul 03, 2017 at 04:07:21PM +0200, Markus Armbruster wrote: > "Daniel P. Berrange" writes: > > > On Thu, Jun 29, 2017 at 12:42:38PM -0700, Alistair Francis wrote: > >> This patch removes the exisinting error_vreport() function and replaces it > >> with a more generic vreport() function tha

Re: [Qemu-devel] postcopy migration hangs while loading virtio state

2017-07-03 Thread Christian Borntraeger
On 06/30/2017 06:31 PM, Dr. David Alan Gilbert wrote: > * Christian Borntraeger (borntrae...@de.ibm.com) wrote: >> On 04/26/2017 01:45 PM, Christian Borntraeger wrote: >> Hmm, I have a theory, if the flags field has bit 1 set, i.e. RAM_SAVE_FLAG_COMPRESS then try changing ram_handle

Re: [Qemu-devel] [PATCH v2 06/15] kvmvapic: remove tcg related code

2017-07-03 Thread Paolo Bonzini
On 03/07/2017 12:12, Yang Zhong wrote: > Since Paolo's below patch has fixed A20 issue > commit bbfa326fc8028e275eddf8c9965c2a1b59405b2e > target/i386: enable A20 automatically in system management mod How is this patch related to kvmvapic? It fixes a bug with vapic disabled, but it's not a rea

Re: [Qemu-devel] [PATCH v3 3/5] block: qobject_is_equal() in bdrv_reopen_prepare()

2017-07-03 Thread Eric Blake
On 07/03/2017 08:01 AM, Max Reitz wrote: > On 2017-07-03 14:51, Eric Blake wrote: >> On 07/03/2017 07:25 AM, Max Reitz wrote: >>> Currently, bdrv_reopen_prepare() assumes that all BDS options are >>> strings. However, this is not the case if the BDS has been created >>> through the json: pseudo-pro

Re: [Qemu-devel] [PATCH v7 1/3] qemu-ga: add guest-get-osinfo command

2017-07-03 Thread Marc-André Lureau
On Mon, Jul 3, 2017 at 1:40 PM Tomáš Golembiovský wrote: > Add a new 'guest-get-osinfo' command for reporting basic information of > the guest operating system. This includes machine architecture, > version and release of the kernel and several fields from os-release > file if it is present (as d

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

2017-07-03 Thread Marc-André Lureau
Hi On Mon, Jul 3, 2017 at 1:40 PM Tomáš Golembiovský wrote: > Add test for guest-get-osinfo command. > > Qemu-ga was modified to accept QGA_OS_RELEASE environment variable. If > the variable is defined it is interpreted as path to the os-release file > and it is parsed instead of the default pat

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

2017-07-03 Thread Eric Blake
On 07/03/2017 07:57 AM, Max Reitz wrote: > On 2017-07-03 14:31, Eric Blake wrote: >> POSIX says that backslashes in the arguments to 'echo', as well as >> any use of 'echo -n' and 'echo -e', are non-portable; it recommends >> people should favor 'printf' instead. This is definitely true where >> w

Re: [Qemu-devel] [PATCH v4 2/3] Add memfd based hostmem

2017-07-03 Thread Eduardo Habkost
On Thu, Jun 29, 2017 at 01:34:22PM +, Marc-André Lureau wrote: > Hi > > On Wed, Jun 28, 2017 at 8:29 PM Eduardo Habkost wrote: > > > On Tue, Jun 27, 2017 at 08:23:03AM +, Marc-André Lureau wrote: > > > Hi Eduardo > > > > > > On Fri, Jun 23, 2017 at 11:09 PM Eduardo Habkost > > > wrote:

Re: [Qemu-devel] [PATCH] spapr: fix memory hotplug error path

2017-07-03 Thread Greg Kurz
On Mon, 3 Jul 2017 15:43:26 +0200 Igor Mammedov wrote: > On Mon, 03 Jul 2017 14:21:31 +0200 > Greg Kurz wrote: > > > QEMU shouldn't abort if spapr_add_lmbs()->spapr_drc_attach() fails. > > Let's propagate the error instead, like it is done everywhere else > > where spapr_drc_attach() is called.

Re: [Qemu-devel] [PATCH v2 0/7] KVM: MMU: fast write protect

2017-07-03 Thread Xiao Guangrong
On 06/20/2017 05:15 PM, guangrong.x...@gmail.com wrote: From: Xiao Guangrong Changelog in v2: thanks to Paolo's review, this version disables write-protect-all if PML is supported Hi Paolo, Do you have time to have a look at this new version? ;) Or I should wait until the patchset of dirty

Re: [Qemu-devel] [PATCH RFC 0/6] q35: add acpi pci hotplug support

2017-07-03 Thread Alexander Bezzubikov
Do we have any surely working scenario of pci-bridge's SHPC usage? Because first of all I've tried to use SHPC to avoi involving any ACPI code, but it didn't look functioning even for ordinary pci-bridge, that's why after talking to Marcel I left SHPC idea. 2017-07-03 16:58 GMT+03:00 Alexander Bez

Re: [Qemu-devel] [PATCH v7 1/3] qemu-ga: add guest-get-osinfo command

2017-07-03 Thread Tomáš Golembiovský
Hi, thanks for the review. Couple notes below. On Mon, 03 Jul 2017 14:30:22 + Marc-André Lureau wrote: > On Mon, Jul 3, 2017 at 1:40 PM Tomáš Golembiovský > wrote: > > > Add a new 'guest-get-osinfo' command for reporting basic information of > > the guest operating system. This includes

Re: [Qemu-devel] [PATCH 1/7] vmgenid: replace x-write-pointer-available hack

2017-07-03 Thread Eduardo Habkost
On Thu, Jun 29, 2017 at 03:23:04PM +0200, Marc-André Lureau wrote: > This compat property sole function is to prevent the device from being > instantiated. Instead of requiring an extra compat property, check if > fw_cfg has DMA enabled. > > This has the additional benefit of handling other cases

[Qemu-devel] [PATCH v2] spapr: fix memory hotplug error path

2017-07-03 Thread Greg Kurz
QEMU shouldn't abort if spapr_add_lmbs()->spapr_drc_attach() fails. Let's propagate the error instead, like it is done everywhere else where spapr_drc_attach() is called. Signed-off-by: Greg Kurz --- Changes in v2: - added rollback code --- hw/ppc/spapr.c | 26 ++ 1 fil

Re: [Qemu-devel] [PATCH 2/4] vl: move global property, migrate init earlier

2017-07-03 Thread Eduardo Habkost
On Mon, Jul 03, 2017 at 10:44:06AM +0800, Peter Xu wrote: > Currently drive_init_func() may call migrate_get_current() while the > migrate object is still not ready yet at that time. Move the migration > object init earlier, along with the global properties, right after > acceleration init. > > Th

[Qemu-devel] [PATCH v4 04/17] dirty-bitmap: Drop unused functions

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

[Qemu-devel] [PATCH v4 00/17] make dirty-bitmap byte-based

2017-07-03 Thread Eric Blake
There are patches floating around to add NBD_CMD_BLOCK_STATUS, but NBD wants to report status on byte granularity (even if the reporting will probably be naturally aligned to sectors or even much higher levels). I've therefore started the task of converting our block status code to report at a byt

[Qemu-devel] [PATCH v4 01/17] dirty-bitmap: Report BlockDirtyInfo.count in bytes, as documented

2017-07-03 Thread Eric Blake
We've been documenting the value in bytes since its introduction in commit b9a9b3a4 (v1.3), where it was actually reported in bytes. Commit e4654d2 (v2.0) then removed things from block/qapi.c, in preparation for a rewrite to a list of dirty sectors in the next commit 21b5683 in block.c, but the n

[Qemu-devel] [PATCH v4 03/17] qcow2: Ensure bitmap serialization is aligned

2017-07-03 Thread Eric Blake
When subdividing a bitmap serialization, the code in hbitmap.c enforces that start/count parameters are aligned (except that count can end early at end-of-bitmap). We exposed this required alignment through bdrv_dirty_bitmap_serialization_align(), but forgot to actually check that we comply with i

[Qemu-devel] [PATCH v4 07/17] qcow2: Switch sectors_covered_by_bitmap_cluster() to byte-based

2017-07-03 Thread Eric Blake
We are gradually converting to byte-based interfaces, as they are easier to reason about than sector-based. Change the qcow2 bitmap helper function sectors_covered_by_bitmap_cluster(), renaming it in the process. Signed-off-by: Eric Blake --- v4: new patch --- block/qcow2-bitmap.c | 28 +++

[Qemu-devel] [PATCH v4 06/17] dirty-bitmap: Change bdrv_dirty_bitmap_*serialize*() to take bytes

2017-07-03 Thread Eric Blake
Right now, the dirty-bitmap code exposes the fact that we use a scale of sector granularity in the underlying hbitmap to anything that wants to serialize a dirty bitmap. It's nicer to uniformly expose bytes as our dirty-bitmap interface, matching the previous change to bitmap size. The only calle

[Qemu-devel] [PATCH v4 02/17] hbitmap: Rename serialization_granularity to serialization_align

2017-07-03 Thread Eric Blake
The only client of hbitmap_serialization_granularity() is dirty-bitmap's bdrv_dirty_bitmap_serialization_align(). Keeping the two names consistent is worthwhile, and the shorter name is more representative of what the function returns (the required alignment to be used for start/count of other ser

[Qemu-devel] [PATCH v4 08/17] dirty-bitmap: Set iterator start by offset, not sector

2017-07-03 Thread Eric Blake
All callers to bdrv_dirty_iter_new() passed 0 for their initial starting point, drop that parameter. Most callers to bdrv_set_dirty_iter() were scaling a byte offset to a sector number; the exception qcow2-bitmap will be converted later to use byte rather than sector iteration. Move the scaling t

[Qemu-devel] [PATCH v4 09/17] dirty-bitmap: Change bdrv_dirty_iter_next() to report byte offset

2017-07-03 Thread Eric Blake
Thanks to recent cleanups, most callers were scaling a return value of sectors into bytes (the exception, in qcow2-bitmap, will be converted to byte-based iteration later). Update the interface to do the scaling internally instead. Signed-off-by: Eric Blake --- v4: rebase to persistent bitmap v

[Qemu-devel] [PATCH v4 11/17] dirty-bitmap: Change bdrv_get_dirty_locked() to take bytes

2017-07-03 Thread Eric Blake
Half the callers were already scaling bytes to sectors; the other half can eventually be simplified to use byte iteration. Both callers were already using the result as a bool, so make that explicit. Making the change also makes it easier for a future dirty-bitmap patch to offload scaling over to

[Qemu-devel] [PATCH v4 13/17] mirror: Switch mirror_dirty_init() to byte-based iteration

2017-07-03 Thread Eric Blake
Now that we have adjusted the majority of the calls this function makes to be byte-based, it is easier to read the code if it makes passes over the image using bytes rather than sectors. Signed-off-by: Eric Blake Reviewed-by: John Snow --- v2-v4: no change --- block/mirror.c | 35 +

[Qemu-devel] [PATCH v4 05/17] dirty-bitmap: Change bdrv_dirty_bitmap_size() to report bytes

2017-07-03 Thread Eric Blake
We are still using an internal hbitmap that tracks a size in sectors, with the granularity scaled down accordingly, because it lets us use a shortcut for our iterators which are currently sector-based. But there's no reason we can't track the dirty bitmap size in bytes, since it is (mostly) an inte

[Qemu-devel] [PATCH v4 15/17] qcow2: Switch store_bitmap_data() to byte-based iteration

2017-07-03 Thread Eric Blake
Now that we have adjusted the majority of the calls this function makes to be byte-based, it is easier to read the code if it makes passes over the image using bytes rather than sectors. Signed-off-by: Eric Blake --- v4: new patch --- block/qcow2-bitmap.c | 26 +++--- 1 file

[Qemu-devel] [PATCH v4 10/17] dirty-bitmap: Change bdrv_get_dirty_count() to report bytes

2017-07-03 Thread Eric Blake
Thanks to recent cleanups, all callers were scaling a return value of sectors into bytes; do the scaling internally instead. Signed-off-by: Eric Blake Reviewed-by: John Snow Reviewed-by: Juan Quintela --- v4: no change v3: no change, add R-b v2: no change --- block/dirty-bitmap.c | 4 ++-- b

[Qemu-devel] [PATCH v4 14/17] qcow2: Switch load_bitmap_data() to byte-based iteration

2017-07-03 Thread Eric Blake
Now that we have adjusted the majority of the calls this function makes to be byte-based, it is easier to read the code if it makes passes over the image using bytes rather than sectors. Signed-off-by: Eric Blake --- v4: new patch --- block/qcow2-bitmap.c | 22 -- 1 file cha

[Qemu-devel] [PATCH v4 12/17] dirty-bitmap: Change bdrv_[re]set_dirty_bitmap() to use bytes

2017-07-03 Thread Eric Blake
Some of the callers were already scaling bytes to sectors; others can be easily converted to pass byte offsets, all in our shift towards a consistent byte interface everywhere. Making the change will also make it easier to write the hold-out callers to use byte rather than sectors for their iterat

[Qemu-devel] [PATCH v4 17/17] dirty-bitmap: Convert internal hbitmap size/granularity

2017-07-03 Thread Eric Blake
Now that all callers are using byte-based interfaces, there's no reason for our internal hbitmap to remain with sector-based granularity. It also simplifies our internal scaling, since we already know that hbitmap widens requests out to granularity boundaries. Signed-off-by: Eric Blake --- v4:

[Qemu-devel] [PATCH v4 16/17] dirty-bitmap: Switch bdrv_set_dirty() to bytes

2017-07-03 Thread Eric Blake
Both callers already had bytes available, but were scaling to sectors. Move the scaling to internal code. In the case of bdrv_aligned_pwritev(), we are now passing the exact offset rather than a rounded sector-aligned value, but that's okay as long as dirty bitmap widens start/bytes to granularit

[Qemu-devel] [PATCH] include/hw/ptimer.h: Add documentation comments

2017-07-03 Thread Peter Maydell
Add documentation comments describing the public API of the ptimer countdown timer. Signed-off-by: Peter Maydell --- I was trying to write a timer device and discovered that the ptimer API wasn't actually documented, so I wrote some basic notes for it... include/hw/ptimer.h | 120 ++

[Qemu-devel] [PATCH] i386/kvm: mask MSR_IA32_BNDCFGS if MPX is not enabled in guest cpuid

2017-07-03 Thread Haozhong Zhang
Otherwise, QEMU on a host with MPX support will try to set guest MSR_IA32_BNDCFGS although guest MPX is not enabled, and result in abort. For example, qemu-system-x86_64 -enable-kvm -cpu qemu64,-mpx ... aborts with messages: qemu-system-x86_64: error: failed to set MSR 0xd90 to 0x0 qemu-s

Re: [Qemu-devel] [PATCH] i386/kvm: mask MSR_IA32_BNDCFGS if MPX is not enabled in guest cpuid

2017-07-03 Thread Paolo Bonzini
On 03/07/2017 17:23, Haozhong Zhang wrote: > Otherwise, QEMU on a host with MPX support will try to set guest > MSR_IA32_BNDCFGS although guest MPX is not enabled, and result in > abort. > > For example, >qemu-system-x86_64 -enable-kvm -cpu qemu64,-mpx ... > aborts with messages: >qemu-s

Re: [Qemu-devel] [PATCH v2 0/7] KVM: MMU: fast write protect

2017-07-03 Thread Paolo Bonzini
On 03/07/2017 16:39, Xiao Guangrong wrote: > > > On 06/20/2017 05:15 PM, guangrong.x...@gmail.com wrote: >> From: Xiao Guangrong >> >> Changelog in v2: >> thanks to Paolo's review, this version disables write-protect-all if >> PML is supported > > Hi Paolo, > > Do you have time to have a loo

Re: [Qemu-devel] [PATCH v2 1/3] block: pass bdrv_* methods to bs->file by default

2017-07-03 Thread Eric Blake
On 06/29/2017 01:43 PM, Manos Pitsidianakis wrote: > The following functions fail if bs->drv does not implement them: > > bdrv_probe_blocksizes > bdrv_probe_geometry > bdrv_truncate > bdrv_has_zero_init > bdrv_get_info > bdrv_media_changed > bdrv_eject > bdrv_lock_medium > bdrv_co_ioctl > > Inste

Re: [Qemu-devel] [PATCH v2 2/3] block: use defaults of bdrv_* callbacks in raw

2017-07-03 Thread Eric Blake
On 06/29/2017 01:43 PM, Manos Pitsidianakis wrote: > Now that passing the call to bs->file is the default for some bdrv_* > callbacks, remove the duplicate implementations in block/raw-format.c > > Signed-off-by: Manos Pitsidianakis > --- > block/raw-format.c | 32 +--

Re: [Qemu-devel] handling emulation fine-grained memory protection

2017-07-03 Thread Richard Henderson
On 07/03/2017 03:04 AM, Peter Maydell wrote: For the ARM v7M microcontrollers we currently treat their memory protection unit like a funny kind of MMU that only has a 1:1 address mapping. This basically works but it means that we can only support protection regions which are a multiple of 1K in s

Re: [Qemu-devel] [PATCH v1] s390x/cpumodel: allow to enable "idtes" feature for TCG

2017-07-03 Thread Richard Henderson
On 07/03/2017 04:07 AM, Thomas Huth wrote: On 30.06.2017 21:22, Richard Henderson wrote: On 06/29/2017 12:05 AM, Thomas Huth wrote: However, I'm not sure whether you can simply ignore the clearing-by-ASCE stuff in this case. For example, according to the PoP: "When the clearing-by-ASCE-option

Re: [Qemu-devel] [PATCH v2 3/3] block: add default implementations for bdrv_co_get_block_status()

2017-07-03 Thread Eric Blake
On 06/29/2017 01:43 PM, Manos Pitsidianakis wrote: > bdrv_co_get_block_status_from_file() and > bdrv_co_get_block_status_from_backing() set *file to bs->file and > bs->backing respectively, so that bdrv_co_get_block_status() can recurse > to them. Future block drivers won't have to duplicate code t

Re: [Qemu-devel] [PATCH v3 5/5] tests: Add check-qobject for equality tests

2017-07-03 Thread Max Reitz
On 2017-07-03 16:15, Eric Blake wrote: > On 07/03/2017 07:25 AM, Max Reitz wrote: >> Add a new test file (check-qobject.c) for unit tests that concern >> QObjects as a whole. >> >> Its only purpose for now is to test the qobject_is_equal() function. >> >> Signed-off-by: Max Reitz >> --- >> tests/

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

2017-07-03 Thread Max Reitz
On 2017-07-03 16:32, Eric Blake wrote: > On 07/03/2017 07:57 AM, Max Reitz wrote: >> On 2017-07-03 14:31, Eric Blake wrote: >>> POSIX says that backslashes in the arguments to 'echo', as well as >>> any use of 'echo -n' and 'echo -e', are non-portable; it recommends >>> people should favor 'printf'

Re: [Qemu-devel] [RFC PATCH 1/3] vmstate: error hint for failed equal checks

2017-07-03 Thread Halil Pasic
On 07/03/2017 03:52 PM, Markus Armbruster wrote: > Halil Pasic writes: > >> On 06/30/2017 04:54 PM, Eric Blake wrote: >>> On 06/30/2017 09:41 AM, Halil Pasic wrote: >> 'This' basically boils down to the question and >> 'Why aren't hints reported in QMP context?' > > QMP is suppo

[Qemu-devel] [PATCH 4/4] target-m68k: add fscale, fgetman and fgetexp

2017-07-03 Thread Laurent Vivier
Signed-off-by: Laurent Vivier --- target/m68k/fpu_helper.c | 106 +++ target/m68k/helper.h | 3 ++ target/m68k/translate.c | 9 3 files changed, 118 insertions(+) diff --git a/target/m68k/fpu_helper.c b/target/m68k/fpu_helper.c index 715b

[Qemu-devel] [PATCH 3/4] target/m68k: add fmod/frem

2017-07-03 Thread Laurent Vivier
Use libm functions fmodl() and remainderl(). The quotient byte of the FPSR is updated with the result of the operation. Signed-off-by: Laurent Vivier --- target/m68k/cpu.h| 1 + target/m68k/fpu_helper.c | 35 +++ target/m68k/helper.h | 2 ++ target/m

[Qemu-devel] [PATCH 1/4] softfloat: use floatx80_infinity in softfloat

2017-07-03 Thread Laurent Vivier
Since f3218a8 ("softfloat: add floatx80 constants") floatx80_infinity is defined but never used. This patch updates floatx80 functions to use this definition. This allows to define a different default Infinity value on m68k: the m68k FPU defines infinity with all bits set to zero in the mantissa.

[Qemu-devel] [PATCH 0/4] target/m68k: implement 680x0 FPU (part 3)

2017-07-03 Thread Laurent Vivier
We start by defining the floatx80 value of infinity on m68k, as it differs from the standard one (0x instead of 0x8000). This patch superseds the patch I have already sent that defines a "floatx80_default_inf" whereas we have already a "floatx80_infinity": we should use

[Qemu-devel] [PATCH 2/4] target/m68k: add FPU trigonometric instructions

2017-07-03 Thread Laurent Vivier
Add fsinh, flognp1, ftanh, fatan, fasin, fatanh, fsin, ftan, fetox, ftwotox, ftentox, flogn, flog10, facos, fcos, fsincos. As softfloat library does not provide these functions, we use the libm of the host. Signed-off-by: Laurent Vivier --- target/m68k/cpu.h| 1 + target/m68k/fpu_help

Re: [Qemu-devel] [PATCH] softfloat: define floatx80_default_inf

2017-07-03 Thread Laurent Vivier
Le 29/06/2017 à 21:15, Philippe Mathieu-Daudé a écrit : > On Thu, Jun 29, 2017 at 4:04 PM, Laurent Vivier wrote: >> Signed-off-by: Laurent Vivier > > Reviewed-by: Philippe Mathieu-Daudé > I've sent an updated version of this patch in my series "target/m68k: implement 680x0 FPU (part 3)". Tha

Re: [Qemu-devel] postcopy migration hangs while loading virtio state

2017-07-03 Thread Michael S. Tsirkin
On Fri, Jun 30, 2017 at 05:31:39PM +0100, Dr. David Alan Gilbert wrote: > * Christian Borntraeger (borntrae...@de.ibm.com) wrote: > > On 04/26/2017 01:45 PM, Christian Borntraeger wrote: > > > > >> Hmm, I have a theory, if the flags field has bit 1 set, i.e. > > >> RAM_SAVE_FLAG_COMPRESS > > >> t

Re: [Qemu-devel] [PATCH RFC 0/6] q35: add acpi pci hotplug support

2017-07-03 Thread Michael S. Tsirkin
On Mon, Jul 03, 2017 at 02:27:11PM +0200, Igor Mammedov wrote: > On Fri, 30 Jun 2017 10:25:05 +0300 > Marcel Apfelbaum wrote: > > [...] > > > > So for the modern systems not supporting PCI ACPI hotplug > > we don't need pci-bridges anyway, but for the older ones > > the ACPI code of the pci-brid

[Qemu-devel] [PATCH 02/22] configure: early test for supported targets

2017-07-03 Thread Paolo Bonzini
Check for unsupported targets in target_list, and print an error early in the configuration process. Signed-off-by: Paolo Bonzini --- configure | 65 ++- 1 file changed, 43 insertions(+), 22 deletions(-) diff --git a/configure b/config

[Qemu-devel] [PATCH 01/22] configure: factor out list of supported Xen/KVM/HAX targets

2017-07-03 Thread Paolo Bonzini
This will be useful when the functions are called, early in the configure process, to filter out targets that do not support hardware acceleration. Signed-off-by: Paolo Bonzini --- configure | 90 ++- 1 file changed, 55 insertions(+), 3

[Qemu-devel] [PATCH v3 00/22] add disable-tcg option for x86 build

2017-07-03 Thread Paolo Bonzini
Most of this series is the same as Yang Zhong's, except for: 1) less stubs usage 2) splitting patch 2 ("vl: add tcg_enabled() for tcg related code") [Thomas] 3) reworked configure [Thomas, Daniel] Please review! Paolo Paolo Bonzini (10): configure: factor out list of supported Xen/KVM/HAX t

[Qemu-devel] [PATCH 04/22] vl: convert -tb-size to qemu_strtoul

2017-07-03 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- accel/tcg/tcg-all.c| 2 +- include/sysemu/accel.h | 2 +- vl.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/accel/tcg/tcg-all.c b/accel/tcg/tcg-all.c index dba9931..e327d90 100644 --- a/accel/tcg/tcg-all.c +++ b/

[Qemu-devel] [PATCH 03/22] configure: add --disable-tcg configure option

2017-07-03 Thread Paolo Bonzini
This lets you build without TCG (hardware accelerationor qtest only). When this flag is passed to configure, it will automatically filter out the target list to only those that support KVM or Xen or HAX. Signed-off-by: Anthony Liguori Signed-off-by: Paolo Bonzini --- configure | 26 +++

[Qemu-devel] [PATCH 05/22] vl: add tcg_enabled() for tcg related code

2017-07-03 Thread Paolo Bonzini
From: Yang Zhong Need to disable the tcg related code in the vl.c if the disable-tcg option is added into ./configure command. Signed-off-by: Yang Zhong Signed-off-by: Paolo Bonzini --- vl.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vl.c b/vl.c index 611ddfe..

[Qemu-devel] [PATCH 06/22] tcg: move page_size_init() function

2017-07-03 Thread Paolo Bonzini
From: Yang Zhong translate-all.c will be disabled if tcg is disabled in the build, so page_size_init() function and related variables will be moved to exec.c file. Signed-off-by: Yang Zhong Signed-off-by: Paolo Bonzini --- accel/tcg/translate-all.c | 18 -- exec.c

[Qemu-devel] [PATCH 07/22] tcg: tcg_handle_interrupt() function

2017-07-03 Thread Paolo Bonzini
From: Yang Zhong Move tcg_handle_interrupt() from translate-common.c to accel/tcg/tcg-all.c. Signed-off-by: Yang Zhong Signed-off-by: Paolo Bonzini --- accel/tcg/Makefile.objs | 2 +- accel/tcg/tcg-all.c | 32 + accel/tcg/translate-common.c | 56

[Qemu-devel] [PATCH 09/22] monitor: disable "info jit" and "info opcount" if !TCG

2017-07-03 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- accel/tcg/translate-all.c | 5 + hmp-commands-info.hx | 4 monitor.c | 2 ++ 3 files changed, 11 insertions(+) diff --git a/accel/tcg/translate-all.c b/accel/tcg/translate-all.c index 4c1d8c9..093207a 100644 --- a/accel/tcg/translate

[Qemu-devel] [PATCH 12/22] tcg: move tb_lock out of translate-all.h

2017-07-03 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- bsd-user/main.c | 1 - include/exec/exec-all.h | 4 tcg/tcg.h | 4 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/bsd-user/main.c b/bsd-user/main.c index 04f95dd..fa9c012 100644 --- a/bsd-user/main.c +++ b/bsd-user/m

[Qemu-devel] [PATCH 08/22] tcg: make tcg_allowed global

2017-07-03 Thread Paolo Bonzini
From: Yang Zhong Change the tcg_enabled() and make sure user build still enable tcg even x86 softmmu disable tcg. Signed-off-by: Yang Zhong Signed-off-by: Paolo Bonzini --- accel/tcg/cpu-exec-common.c | 2 ++ accel/tcg/tcg-all.c | 1 - accel/tcg/translate-all.c | 6 +- include/q

[Qemu-devel] [PATCH 10/22] vapic: use tcg_enabled

2017-07-03 Thread Paolo Bonzini
Signed-off-by: Paolo Bonzini --- hw/i386/kvmvapic.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hw/i386/kvmvapic.c b/hw/i386/kvmvapic.c index 82a4955..0d9ef77 100644 --- a/hw/i386/kvmvapic.c +++ b/hw/i386/kvmvapic.c @@ -410,7 +410,8 @@ static void patch_instruction(VA

[Qemu-devel] [PATCH 15/22] tcg: add the CONFIG_TCG into Makefiles

2017-07-03 Thread Paolo Bonzini
From: Yang Zhong Add the CONFIG_TCG for frontend and backend's files in the related Makefiles. Signed-off-by: Yang Zhong Signed-off-by: Paolo Bonzini --- Makefile.target | 4 ++-- accel/Makefile.objs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile.target b/

[Qemu-devel] [PATCH 14/22] tcg: add CONFIG_TCG guards in headers

2017-07-03 Thread Paolo Bonzini
From: Yang Zhong Add the CONFIG_TCG for exec-all.h. Since function tlb_set_page_with_attrs() is defined in ./accel/tcg/cputlb.c, which will be disabled if tcg is disabled. This function need be implemented in accel/stubs/tcg-stub.c for disable-tcg. Signed-off-by: Yang Zhong Signed-off-by: Paolo

[Qemu-devel] [PATCH 17/22] target/i386: make cpu_get_fp80()/cpu_set_fp80() static

2017-07-03 Thread Paolo Bonzini
From: Yang Zhong Move cpu_get_fp80()/cpu_set_fp80() from fpu_helper.c to machine.c because fpu_helper.c will be disabled if tcg is disabled in the build. Signed-off-by: Yang Zhong Signed-off-by: Paolo Bonzini --- target/i386/cpu.h| 2 -- target/i386/fpu_helper.c | 18

[Qemu-devel] [PATCH 11/22] tcg: add the tcg-stub.c file into accel/stubs/

2017-07-03 Thread Paolo Bonzini
From: Yang Zhong If tcg is disabled, the functions in tcg-stub.c file will be called. This file is target-independent file, do not include any platform related stub functions into this file. Signed-off-by: Yang Zhong Signed-off-by: Paolo Bonzini --- accel/stubs/Makefile.objs | 1 + accel/stu

[Qemu-devel] [PATCH 20/22] target/i386: add the tcg_enabled() in target/i386/

2017-07-03 Thread Paolo Bonzini
From: Yang Zhong Add the tcg_enabled() where the x86 target needs to disable TCG-specific code. Signed-off-by: Yang Zhong Signed-off-by: Paolo Bonzini --- target/i386/bpt_helper.c | 32 +++- target/i386/cpu.c| 4 +++- target/i386/cpu.h| 8 +++-

[Qemu-devel] [PATCH 13/22] exec: elide calls to tb_lock and tb_unlock

2017-07-03 Thread Paolo Bonzini
Adding assertions fixes link errors. Signed-off-by: Paolo Bonzini --- exec.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/exec.c b/exec.c index ee61915..a083ff8 100644 --- a/exec.c +++ b/exec.c @@ -2317,6 +2317,7 @@ static void notdirty_mem_write(void *opaque, hwaddr ram_addr, {

[Qemu-devel] [PATCH 22/22] configure: warn on untested --disable-tcg

2017-07-03 Thread Paolo Bonzini
--disable-tcg will almost certainly fail to compile on non-x86 platforms, so issue a warning. Signed-off-by: Paolo Bonzini --- configure | 7 +++ 1 file changed, 7 insertions(+) diff --git a/configure b/configure index cc8f5e3..a3a21d5 100755 --- a/configure +++ b/configure @@ -1766,6 +1766

Re: [Qemu-devel] [PATCH RFC 0/6] q35: add acpi pci hotplug support

2017-07-03 Thread Michael S. Tsirkin
SHPC did work for linux. As ACPI is enabled by default, you need to expose it in _OSC and maybe jump through more hoops to avoid ACPI from trying to take over. Source is available so if it doesn't work you should be able to find out why. On Mon, Jul 03, 2017 at 05:41:12PM +0300, Alexander Bezzu

[Qemu-devel] [PATCH 21/22] target/i386: add the CONFIG_TCG into Makefiles

2017-07-03 Thread Paolo Bonzini
From: Yang Zhong Add the CONFIG_TCG for frontend and backend's files in the related Makefiles. Signed-off-by: Yang Zhong Signed-off-by: Paolo Bonzini --- target/i386/Makefile.objs | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/target/i386/Makefile.objs b/target/i38

[Qemu-devel] [PATCH 16/22] target/i386: move cpu_sync_bndcs_hflags() function

2017-07-03 Thread Paolo Bonzini
From: Yang Zhong Move cpu_sync_bndcs_hflags() function from mpx_helper.c to helper.c because mpx_helper.c need be disabled when tcg is disabled. Signed-off-by: Yang Zhong Signed-off-by: Paolo Bonzini --- target/i386/helper.c | 34 +- target/i386/mpx_helper.

Re: [Qemu-devel] [RFC 00/29] postcopy+vhost-user/shared ram

2017-07-03 Thread Dr. David Alan Gilbert
* Alexey (a.pereva...@samsung.com) wrote: > > Hello, David! > > Thank for you patch set. > > On Wed, Jun 28, 2017 at 08:00:18PM +0100, Dr. David Alan Gilbert (git) wrote: > > From: "Dr. David Alan Gilbert" > > > > Hi, > > This is a RFC/WIP series that enables postcopy migration > > with shar

[Qemu-devel] [PATCH 18/22] target/i386: split cpu_set_mxcsr() and make cpu_set_fpuc() inline

2017-07-03 Thread Paolo Bonzini
From: Yang Zhong Split the cpu_set_mxcsr() and make cpu_set_fpuc() inline with specific tcg code. Signed-off-by: Yang Zhong Signed-off-by: Paolo Bonzini --- target/i386/cpu.h| 18 -- target/i386/fpu_helper.c | 11 ++- 2 files changed, 18 insertions(+), 11 delet

[Qemu-devel] [PATCH 19/22] target/i386: move TLB refill function out of helper.c

2017-07-03 Thread Paolo Bonzini
This function calls tlb_set_page_with_attrs, which is not available when TCG is disabled. Move it to excp_helper.c. Signed-off-by: Paolo Bonzini --- target/i386/excp_helper.c | 343 + target/i386/helper.c | 344 +--

Re: [Qemu-devel] handling emulation fine-grained memory protection

2017-07-03 Thread Peter Maydell
On 3 July 2017 at 17:07, Richard Henderson wrote: > On 07/03/2017 03:04 AM, Peter Maydell wrote: >> Does anybody have any good ideas for how this ought to be done? >> We could wind down the "page size" for these CPUs (since we >> now have runtime-configurable-page-size for ARM CPUs this >> shouldn

Re: [Qemu-devel] [PATCH v2 00/13] vvfat: misc fixes for read-only mode

2017-07-03 Thread Kevin Wolf
Am 22.05.2017 um 23:11 hat Hervé Poussineau geschrieben: > Hi, > > This patchset fixes some of issues I encountered when trying to use vvfat, > and fixes > bug #1599539: https://bugs.launchpad.net/qemu/+bug/1599539 > > Patch 1 fixes a crash when using 'qemu-img convert'. > Patches 2 to 6 are cod

<    1   2   3   4   >