[Qemu-devel] [PATCH v2 14/15] block: Align block status requests

2017-07-03 Thread Eric Blake
Any device that has request_alignment greater than 512 should be unable to report status at a finer granularity; it may also be simpler for such devices to be guaranteed that the block layer has rounded things out to the granularity boundary (the way the block layer already rounds all other I/O

[Qemu-devel] [PATCH v2 02/15] block: Allow NULL file for bdrv_get_block_status()

2017-07-03 Thread Eric Blake
Not all callers care about which BDS owns the mapping for a given range of the file. This patch merely simplifies the callers by consolidating the logic in the common call point, while guaranteeing a non-NULL file to all the driver callbacks, for no semantic change. The only caller that does not

[Qemu-devel] [PATCH v2 12/15] block: Switch bdrv_co_get_block_status_above() 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. Convert another internal type (no semantic change), and rename it to match the corresponding public function rename. Signed-off-by: Eric Blake --- v2: rebase to

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

2017-07-03 Thread Eric Blake
From: Manos Pitsidianakis 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 to

[Qemu-devel] [PATCH v2 07/15] qemu-img: Switch get_block_status() 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. Continue by converting an internal function (no semantic change), and simplifying its caller accordingly. Signed-off-by: Eric Blake --- v2: no change --- qemu-img.c |

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

2017-07-03 Thread Bharata B Rao
On Tue, Jul 04, 2017 at 09:01:43AM +0530, Bharata B Rao wrote: > On Mon, Jul 03, 2017 at 02:21:31PM +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

Re: [Qemu-devel] [PATCH v4 3/3] tcg/aarch64: Enable indirect jump path using LDR (literal)

2017-07-03 Thread Richard Henderson
On 06/30/2017 07:36 AM, Pranith Kumar wrote: This patch enables the indirect jump path using an LDR (literal) instruction. It will be interesting to test and see which performs better among the two paths. CC: Alex Bennée Reviewed-by: Richard Henderson

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

2017-07-03 Thread Laurent Vivier
Le 03/07/2017 à 22:31, Richard Henderson a écrit : > On 07/03/2017 12:50 PM, Laurent Vivier wrote: >> fmove.x #0x0ABCDEF12345,%fp0 >> fgetman.x %fp0,%fp6 >> fp02.1518178707571747286191852003521627e-4938(raw >> 0x0abcdef12345) >> fp6

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

2017-07-03 Thread Alexander Bezzubikov
That is why I think we can consider a possibility of forgetting about ACPI hot plug in pcie-pci bridge and use only SHPC (with some correcting work). Especially since q35 is used only for 'modern' Windows guests and there're no big problems with SHPC on Linux guests. вт, 4 июля 2017 г. в 1:06,

Re: [Qemu-devel] [PATCH 3/4] doc: add item for "-M enforce-config-section"

2017-07-03 Thread Peter Xu
On Mon, Jul 03, 2017 at 02:07:12PM -0300, Eduardo Habkost wrote: > On Mon, Jul 03, 2017 at 10:44:07AM +0800, Peter Xu wrote: > > It's never documented, and now we have one more parameter for it (which > > means this one can be obsolete in the future). Document it properly. > > > > Although now

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

2017-07-03 Thread Philippe Mathieu-Daudé
On Mon, Jul 3, 2017 at 12:13 PM, Peter Maydell wrote: > Add documentation comments describing the public API of the > ptimer countdown timer. > > Signed-off-by: Peter Maydell Reviewed-by: Philippe Mathieu-Daudé > --- > I was

Re: [Qemu-devel] [PATCH] util/cacheinfo: Fix warning generated by clang

2017-07-03 Thread Richard Henderson
On 07/01/2017 03:44 PM, Peter Maydell wrote: On 1 July 2017 at 23:35, Richard Henderson wrote: Perhaps it ought to be telling me to use %x to force Xn in spite of the type? You always get Xn anyway, regardless of the type. For us, I think the right thing to do is make

Re: [Qemu-devel] [PATCH 0/2] target/sh4: fix fabs and optimize fneg

2017-07-03 Thread Richard Henderson
On 07/02/2017 09:32 AM, Aurelien Jarno wrote: This patchset should fix the bug #1701821 reported by Bruno Haible, which makes the gnulib testsuite to fail for single precision libm tests. Aurelien Jarno (2): target/sh4: do not check for PR bit for fabs instruction target/sh4: do not use a

Re: [Qemu-devel] [PATCH v3 1/1] s390x: vmstatify config migration for virtio-ccw

2017-07-03 Thread Cornelia Huck
Am Mon, 3 Jul 2017 23:34:14 +0200 schrieb Halil Pasic : > Let's vmstatify virtio_ccw_save_config and virtio_ccw_load_config for > flexibility (extending using subsections) and for fun. > > To achieve this we need to hack the config_vector, which is > VirtIODevice (that

[Qemu-devel] [PATCH v2 04/15] block: Make bdrv_round_to_clusters() signature more useful

2017-07-03 Thread Eric Blake
In the process of converting sector-based interfaces to bytes, I'm finding it easier to represent a byte count as a 64-bit integer at the block layer (even if we are internally capped by SIZE_MAX or even INT_MAX for individual transactions, it's still nicer to not have to worry about

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

2017-07-03 Thread Peter Xu
On Mon, Jul 03, 2017 at 11:59:03AM -0300, Eduardo Habkost wrote: > 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,

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

2017-07-03 Thread Haozhong Zhang
On 07/03/17 17:45 +0200, Paolo Bonzini wrote: > > > 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

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

2017-07-03 Thread Bharata B Rao
On Mon, Jul 03, 2017 at 02:21:31PM +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 > --- >

Re: [Qemu-devel] [PATCH 2/4] xen/mapcache: add an ability to create dummy mappings

2017-07-03 Thread Stefano Stabellini
On Mon, 3 Jul 2017, Igor Druzhinin wrote: > On 01/07/17 01:06, Stefano Stabellini wrote: > > On Fri, 30 Jun 2017, Igor Druzhinin wrote: > >> Dummys are simple anonymous mappings that are placed instead > >> of regular foreign mappings in certain situations when we need > >> to postpone the actual

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

2017-07-03 Thread Xiao Guangrong
On 07/03/2017 11:47 PM, Paolo Bonzini wrote: 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

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

2017-07-03 Thread Alexander Bezzubikov
Tried it on Win7 Enterprise SP1 - SHPC works well, _OSC patches aren't necessary (since pci-bridge has its own controller, I suppose). On Linux guests it works when adding device from CLI with -device, but OS seems to fail detecting the device when I add it with device_add from monitor. Also

[Qemu-devel] [RFC PATCH v2 16/15] block: Add .bdrv_co_block_status() callback

2017-07-03 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. Now that the block layer exposes byte-based allocation, it's time to tackle the drivers. Add a new callback that operates on as small as byte boundaries. Subsequent patches will then update individual drivers, then

[Qemu-devel] [PATCH v2 05/15] qcow2: Switch is_zero_sectors() 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. Convert another internal function (no semantic change), and rename it to is_zero() in the process. Signed-off-by: Eric Blake --- v2: rename function, rebase to

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

2017-07-03 Thread Zhong Yang
On Mon, Jul 03, 2017 at 04:28:00PM +0200, Paolo Bonzini wrote: > > > 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

Re: [Qemu-devel] [PATCH v2 0/5] target/sh4: misc FPU fixes and optimizations

2017-07-03 Thread Richard Henderson
On 07/02/2017 01:28 PM, Aurelien Jarno wrote: This patchset should fix the bug#1701821 reported by Bruno Haible, which makes the gnulib testsuite to fail for single precision libm tests or for tests relying on unordered comparisons. It also fixes an inversion of cause and flag bits in the FPSCR

[Qemu-devel] [PATCH v2 06/15] block: Switch bdrv_make_zero() 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 internal loop iteration of zeroing a device to track by bytes instead of sectors (although we are still guaranteed that we iterate by steps that are sector-aligned).

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

2017-07-03 Thread Eric Blake
On 07/03/2017 01:31 PM, Eric Blake wrote: >> The throttle driver I'm working on passes bdrv_co_get_block_status() to >> bs->file. If there is a problem with an unused default function (it's >> not static so will compile, but it might not be up to standard), you can >> just remove it and I will

[Qemu-devel] [PATCH v2 08/15] block: Convert bdrv_get_block_status() to bytes

2017-07-03 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. In the common case, allocation is unlikely to ever use values that are not naturally sector-aligned, but it is possible that byte-based values will let us be more precise about allocation at the end of an unaligned

[Qemu-devel] [PATCH v2 15/15] qemu-io: Relax 'alloc' now that block-status doesn't assert

2017-07-03 Thread Eric Blake
Previously, the alloc command required that input parameters be sector-aligned and clamped to 32 bits, because the underlying bdrv_is_allocated used a 32-bit parameter and asserted aligned inputs. But now that we have fixed block status to report a 64-bit bytes value, and to properly round

Re: [Qemu-devel] [PATCH v7 0/9] Convert to realize and cleanup

2017-07-03 Thread Mao Zhongyi
Hi, Michael On 07/04/2017 01:41 AM, Michael S. Tsirkin wrote: On Tue, Jun 27, 2017 at 02:16:46PM +0800, Mao Zhongyi wrote: This series mainly implements the conversions of pci-bridge devices i82801b11, io3130_upstream/downstream and so on to realize(). Naturally part of error messages need to

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

2017-07-03 Thread QingFeng Hao
在 2017/7/3 18:20, Christian Borntraeger 写道: On 07/03/2017 10:51 AM, QingFeng Hao wrote: This patch is based on a similar patch from Stefan Hajnoczi - commit c324fd0a39c (" virtio-pci: use ioeventfd even when KVM is disabled) Do not check kvm_eventfds_enabled() when KVM is disabled since it

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

2017-07-03 Thread QingFeng Hao
在 2017/7/3 19:48, 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

Re: [Qemu-devel] [PATCH v2 2/8] target/s390x: Implement CONVERT UNICODE insns

2017-07-03 Thread Richard Henderson
On 07/02/2017 06:18 AM, Aurelien Jarno wrote: +if (!s390_has_feat(s->insn->fac == S390_FEAT_EXTENDED_TRANSLATION_3 + ? S390_FEAT_ETF3_ENH : S390_FEAT_ETF2_ENH)) { +m3 = 0; +} This doesn't look correct to me. The well-formedness checking is part of ETF3_ENH

[Qemu-devel] [PATCH v3 1/1] s390x: vmstatify config migration for virtio-ccw

2017-07-03 Thread Halil Pasic
Let's vmstatify virtio_ccw_save_config and virtio_ccw_load_config for flexibility (extending using subsections) and for fun. To achieve this we need to hack the config_vector, which is VirtIODevice (that is common virtio) state, in the middle of the VirtioCcwDevice state representation. This is

[Qemu-devel] [PATCH v2 09/15] block: Switch bdrv_co_get_block_status() 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. Convert another internal function (no semantic change), and as with its public counterpart, rename to bdrv_co_block_status() to make the compiler enforce that we catch all uses. For now,

[Qemu-devel] [PATCH v2 13/15] block: Convert bdrv_get_block_status_above() to bytes

2017-07-03 Thread Eric Blake
We are gradually moving away from sector-based interfaces, towards byte-based. In the common case, allocation is unlikely to ever use values that are not naturally sector-aligned, but it is possible that byte-based values will let us be more precise about allocation at the end of an unaligned

Re: [Qemu-devel] [PATCH 2/3] xen-pt: bind/unbind interrupt remapping format MSI

2017-07-03 Thread Lan Tianyu
Hi Anthony: On 2017年06月30日 23:48, Anthony PERARD wrote: > On Thu, Jun 29, 2017 at 01:49:53AM -0400, Lan Tianyu wrote: >> From: Chao Gao >> >> If a vIOMMU is exposed to guest, guest will configure the msi to remapping >> format. The original code isn't suitable to the new

Re: [Qemu-devel] [PATCH 1/3] i386/msi: Correct mask of destination ID in MSI address

2017-07-03 Thread Peter Xu
On Thu, Jun 29, 2017 at 01:49:52AM -0400, Lan Tianyu wrote: > From: Chao Gao > > According to SDM 10.11.1, only [19:12] bits of MSI address are > Destination ID, change the mask to avoid ambiguity for VT-d spec > has used the bit 4 to indicate a remappable interrupt request.

[Qemu-devel] [PATCH v2 11/15] block: Switch bdrv_common_block_status_above() 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. Convert another internal function (no semantic change). Signed-off-by: Eric Blake --- v2: new patch --- block/io.c | 42 +- 1

[Qemu-devel] [PATCH v2 03/15] block: Add flag to avoid wasted work in bdrv_is_allocated()

2017-07-03 Thread Eric Blake
Not all callers care about which BDS owns the mapping for a given range of the file. In particular, bdrv_is_allocated() cares more about finding the largest run of allocated data from the guest perspective, whether or not that data is consecutive from the host perspective. Therefore, doing

[Qemu-devel] [PATCH v2 00/15] make bdrv_get_block_status 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

[Qemu-devel] [PATCH v2 10/15] block: Switch BdrvCoGetBlockStatusData 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. Convert another internal type (no semantic change), and rename it to match the corresponding public function rename. Signed-off-by: Eric Blake --- v2: rebase to

Re: [Qemu-devel] [PULL 01/21] virtio-net: enable configurable tx queue size

2017-07-03 Thread Wei Wang
On 07/04/2017 03:44 AM, Michael S. Tsirkin wrote: From: Wei Wang This patch enables the virtio-net tx queue size to be configurable between 256 (the default queue size) and 1024 by the user when the vhost-user backend is used. Currently, the maximum tx queue size for

[Qemu-devel] [PULL 20/21] virtio-net: fix tx queue size for !vhost-user

2017-07-03 Thread Michael S. Tsirkin
Current code segfaults when no nic peer is specified. Fix it up - fall back to default queue size. Fixes: 9b02e1618cf26a ("virtio-net: enable configurable tx queue size") Cc: Wei Wang Signed-off-by: Michael S. Tsirkin --- hw/net/virtio-net.c | 28

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

2017-07-03 Thread Richard Henderson
On 07/03/2017 09:34 AM, Paolo Bonzini wrote: 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

[Qemu-devel] [PULL 16/21] intel_iommu: fix migration breakage on mr switch

2017-07-03 Thread Michael S. Tsirkin
From: Peter Xu Migration is broken after the vfio integration work: qemu-kvm: AHCI: Failed to start FIS receive engine: bad FIS receive buffer address qemu-kvm: Failed to load ich9_ahci:ahci qemu-kvm: error while loading state for instance 0x0 of device

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

2017-07-03 Thread Richard Henderson
On 07/03/2017 09:34 AM, Paolo Bonzini wrote: 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 |

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

2017-07-03 Thread Richard Henderson
On 07/03/2017 09:34 AM, Paolo Bonzini wrote: 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 ---

[Qemu-devel] [PULL 18/21] vhost-user: unregister slave req handler at cleanup time

2017-07-03 Thread Michael S. Tsirkin
From: Maxime Coquelin If the backend sends a request just before closing the socket, the aio dispatcher might schedule its reading after the vhost device has been cleaned, leading to a NULL pointer dereference in slave_read(); vhost_user_cleanup() already closes the

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

2017-07-03 Thread Richard Henderson
On 07/03/2017 09:34 AM, Paolo Bonzini wrote: 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:

Re: [Qemu-devel] [PATCH 2/4] xen/mapcache: add an ability to create dummy mappings

2017-07-03 Thread Igor Druzhinin
On 01/07/17 01:06, Stefano Stabellini wrote: > On Fri, 30 Jun 2017, Igor Druzhinin wrote: >> Dummys are simple anonymous mappings that are placed instead >> of regular foreign mappings in certain situations when we need >> to postpone the actual mapping but still have to give a >> memory region to

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

2017-07-03 Thread Richard Henderson
On 07/03/2017 09:34 AM, Paolo Bonzini wrote: 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

[Qemu-devel] [PULL 21/21] i386/acpi: update expected acpi files

2017-07-03 Thread Michael S. Tsirkin
We dropped some dead code, update extected table binaries. Fixes: 4d7e7f2702912 ("hw/acpi: remove dead acpi code") Signed-off-by: Michael S. Tsirkin --- tests/acpi-test-data/q35/DSDT| Bin 7824 -> 7782 bytes tests/acpi-test-data/q35/DSDT.bridge | Bin 7841 -> 7799 bytes

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

2017-07-03 Thread Richard Henderson
On 07/03/2017 09:34 AM, Paolo Bonzini wrote: Signed-off-by: Paolo Bonzini --- accel/tcg/translate-all.c | 5 + hmp-commands-info.hx | 4 monitor.c | 2 ++ 3 files changed, 11 insertions(+) Reviewed-by: Richard Henderson

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

2017-07-03 Thread Michael S. Tsirkin
On Mon, Jul 03, 2017 at 03:50:52PM -0300, Eduardo Habkost wrote: > On Mon, Jul 03, 2017 at 09:38:52PM +0300, Michael S. Tsirkin wrote: > > 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 > > >

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

2017-07-03 Thread Richard Henderson
On 07/03/2017 09:34 AM, Paolo Bonzini wrote: Signed-off-by: Paolo Bonzini --- hw/i386/kvmvapic.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) Reviewed-by: Richard Henderson r~

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

2017-07-03 Thread Richard Henderson
On 07/03/2017 09:34 AM, Paolo Bonzini wrote: 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(-) Reviewed-by: Richard Henderson

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

2017-07-03 Thread Richard Henderson
On 07/03/2017 09:34 AM, Paolo Bonzini wrote: --- a/include/exec/helper-proto.h +++ b/include/exec/helper-proto.h @@ -28,7 +28,9 @@ dh_ctype(ret) HELPER(name) (dh_ctype(t1), dh_ctype(t2), dh_ctype(t3), \ #include "helper.h" #include "trace/generated-helpers.h" +#ifdef CONFIG_TCG

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

2017-07-03 Thread Richard Henderson
On 07/03/2017 09:34 AM, Paolo Bonzini wrote: 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 ++--

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

2017-07-03 Thread Richard Henderson
On 07/03/2017 09:34 AM, Paolo Bonzini wrote: Adding assertions fixes link errors. Signed-off-by: Paolo Bonzini --- exec.c | 3 +++ 1 file changed, 3 insertions(+) Reviewed-by: Richard Henderson r~

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

2017-07-03 Thread Richard Henderson
On 07/03/2017 09:34 AM, Paolo Bonzini wrote: @@ -1302,10 +1332,12 @@ void cpu_report_tpr_access(CPUX86State *env, TPRAccess access) env->tpr_access_type = access; cpu_interrupt(cs, CPU_INTERRUPT_TPR); -} else { +} else if (tcg_enabled()) {

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

2017-07-03 Thread Richard Henderson
On 07/03/2017 09:34 AM, Paolo Bonzini wrote: 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

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

2017-07-03 Thread Richard Henderson
On 07/03/2017 09:34 AM, Paolo Bonzini wrote: +static inline void cpu_set_mxcsr(CPUX86State *env, uint32_t mxcsr) +{ +env->mxcsr = mxcsr; +if (tcg_enabled()) { +tcg_update_mxcsr(env); I'd prefer update_mxcsr_status for this new name. +} +} + +static inline void

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

2017-07-03 Thread Richard Henderson
On 07/03/2017 09:34 AM, Paolo Bonzini wrote: 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 +

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

2017-07-03 Thread Richard Henderson
On 07/03/2017 09:34 AM, Paolo Bonzini wrote: @@ -215,10 +215,12 @@ void breakpoint_handler(CPUState *cs) if (cs->watchpoint_hit) { if (cs->watchpoint_hit->flags & BP_CPU) { cs->watchpoint_hit = NULL; -if (check_hw_breakpoints(env, false)) { -

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

2017-07-03 Thread Richard Henderson
On 07/03/2017 09:34 AM, Paolo Bonzini wrote: 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

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

2017-07-03 Thread Richard Henderson
On 07/03/2017 09:34 AM, Paolo Bonzini wrote: --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(+) Reviewed-by: Richard Henderson

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

2017-07-03 Thread Richard Henderson
On 07/03/2017 12:50 PM, Laurent Vivier wrote: fmove.x #0x0ABCDEF12345,%fp0 fgetman.x %fp0,%fp6 fp02.1518178707571747286191852003521627e-4938 (raw 0x0abcdef12345) fp61.34103012886691431049257516861 (raw

Re: [Qemu-devel] [PATCH 3/4] xen/mapcache: introduce xen_remap_cache_entry()

2017-07-03 Thread Igor Druzhinin
On 01/07/17 01:08, Stefano Stabellini wrote: > On Fri, 30 Jun 2017, Igor Druzhinin wrote: >> This new call is trying to update a requested map cache entry >> according to the changes in the physmap. The call is searching >> for the entry, unmaps it, tries to translate the address and >> maps again

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

2017-07-03 Thread Viktor Mihajlovski
On 30.06.2017 18:47, David Hildenbrand wrote: > On 30.06.2017 15:25, Viktor Mihajlovski wrote: >> The response for query-cpu-definitions didn't include the >> unavailable-features field, which is used by libvirt to figure >> out whether a certain cpu model is usable on the host. >> >> The

[Qemu-devel] Launching Standalone in QEMU-Microblaze

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

[Qemu-devel] [PATCH 0/1] virtio-scsi-ccw: fix iotest 068 on s390x

2017-07-03 Thread QingFeng Hao
This commit fixes iotest 068 for s390x as s390x uses virtio-scsi-ccw. The related commit is c324fd0a39c for other platforms by Stefan Hajnoczi. Thanks! QingFeng Hao (1): virtio-scsi-ccw: use ioeventfd even when KVM is disabled hw/s390x/virtio-ccw.c | 2 +- target/s390x/kvm.c| 3 +++ 2

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

2017-07-03 Thread Laurent Vivier
This patch allows to use "-cpu POWER9" with a POWER9 DD1 host and KVM HV. With TCG, "-cpu POWER9" selects POWER9_v2.0 (POWER9 DD2). I post this patch as a RFC because kernel boots well with "-cpu host", but hangs with "-cpu POWER9" whereas I can see it selects correctly the POWER9_v1.0 CPU in

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

2017-07-03 Thread QingFeng Hao
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. This patch makes -device virtio-scsi-ccw,iothread=iothread0 work

Re: [Qemu-devel] [Qemu-PPC] [PATCH 0/3] target/ppc: Implement radix mmu debug functions

2017-07-03 Thread David Gibson
On Mon, Jul 03, 2017 at 04:19:45PM +1000, Suraj Jitindar Singh wrote: > When the radix mmu emulation code was implemented the translation > debug functions were left as a todo. > > Implement the functions ppc_radix64_get_phys_page_debug() and > ppc_radix64_dump_level() to translate a single

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

2017-07-03 Thread Peter Xu
On Fri, Jun 30, 2017 at 06:18:30AM -0400, Alexey Perevalov wrote: > This patch adds ability to track down already received > pages, it's necessary for calculation vCPU block time in > postcopy migration feature, maybe for restore after > postcopy migration failure. > Also it's necessary to solve

[Qemu-devel] [Qemu-PPC] [PATCH 1/3] target/ppc: Refactor tcg radix mmu code

2017-07-03 Thread Suraj Jitindar Singh
The mmu-radix64.c file implements functions to enable the radix mmu emulation in tcg mode. There is a function ppc_radix64_walk_tree() which performs the radix tree walk and also implicitly checks the pte protection. Move the protection checking of the pte from the ppc_radix64_walk_tree()

[Qemu-devel] [Qemu-PPC] [PATCH 3/3] target/ppc: Add debug function to dump radix mmu translations

2017-07-03 Thread Suraj Jitindar Singh
In target/ppc/mmu-hash64.c there already exists the function dump_slb() to dump the hash translation entries (for effective to virtual translation at least). Implement the function ppc_radix64_dump() to allow all the kernel effective to real address mappings and corresponding ptes to be dumped.

[Qemu-devel] [Qemu-PPC] [PATCH 0/3] target/ppc: Implement radix mmu debug functions

2017-07-03 Thread Suraj Jitindar Singh
When the radix mmu emulation code was implemented the translation debug functions were left as a todo. Implement the functions ppc_radix64_get_phys_page_debug() and ppc_radix64_dump_level() to translate a single address and dump all the address translations respectively. This functionality is

[Qemu-devel] [Bug 1694998] Re: PPC: msgsnd instruction leads to assertion

2017-07-03 Thread Thomas Huth
Fix has now been included: http://git.qemu.org/?p=qemu.git;a=commitdiff;h=f1c29ebc51be77bd64178c8d ** Changed in: qemu Status: New => Fix Committed ** Changed in: qemu Assignee: (unassigned) => Thomas Huth (th-huth) -- You received this bug notification because you are a member of

[Qemu-devel] [Qemu-PPC] [PATCH 2/3] target/ppc: Add debug function for radix mmu translation

2017-07-03 Thread Suraj Jitindar Singh
In target/ppc/mmu-hash64.c there already exists the function ppc_hash64_get_phys_page_debug() to get the physical (real) address for a given effective address in hash mode. Implement the function ppc_radix64_get_phys_page_debug() to allow a real address to be obtained for a given effective

Re: [Qemu-devel] [Qemu-block] [PULL 11/61] virtio-pci: use ioeventfd even when KVM is disabled

2017-07-03 Thread QingFeng Hao
在 2017/6/28 18:22, Kevin Wolf 写道: Am 28.06.2017 um 12:11 hat QingFeng Hao geschrieben: 在 2017/6/24 0:21, Kevin Wolf 写道: From: Stefan Hajnoczi Old kvm.ko versions only supported a tiny number of ioeventfds so virtio-pci avoids ioeventfds when kvm_has_many_ioeventfds()

Re: [Qemu-devel] [PATCH 5/5] spapr: Use unplug_request for PCI hot unplug

2017-07-03 Thread David Gibson
On Wed, Jun 21, 2017 at 11:50:08AM +0200, Greg Kurz wrote: > On Tue, 20 Jun 2017 09:53:32 +0800 > David Gibson wrote: > > > AIUI, ->unplug_request in the HotplugHandler is used for "soft" > > unplug, where acknowledgement from the guest is required before > >

Re: [Qemu-devel] [PATCH 0/5] spapr: DRC cleanups (part V)

2017-07-03 Thread David Gibson
On Tue, Jun 20, 2017 at 09:53:27AM +0800, David Gibson wrote: > This fifth set of cleanups to the DRC code mostly deals with removing > unnecessary differences between different cases on the various hot > plug and unplug paths. With the assorted R-bs accumulated, I've merged this batch into

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

2017-07-03 Thread Viktor Mihajlovski
The response for query-cpu-definitions didn't include the unavailable-features field, which is used by libvirt to figure out whether a certain cpu model is usable on the host. The unavailable features are now computed by obtaining the host CPU model and comparing it against the known CPU models.

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

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

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

2017-07-03 Thread Christian Borntraeger
On 07/03/2017 09:38 AM, 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. > > This patch

[Qemu-devel] [RFC v2 1/1] 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

Re: [Qemu-devel] [PATCH v1] target-s390x: fix risbg handling

2017-07-03 Thread David Hildenbrand
On 01.07.2017 22:27, Richard Henderson wrote: > On 06/25/2017 03:19 PM, Aurelien Jarno wrote: >> On 2017-06-23 01:12, David Hildenbrand wrote: >>> If we have for example: r3 contains 0x >>> ec 33 3f bf 61 55 risbg %r3,%r3,63,191,97 >>> >>> We want to rotate 33 to the

Re: [Qemu-devel] Launching Standalone in QEMU-Microblaze

2017-07-03 Thread Edgar E. Iglesias
On Mon, Jul 03, 2017 at 07:23:23AM +, Ormaetxea Xabier wrote: > Hello! Hi! > > I'm trying to run QEMU-Microblaze (Little-endian) with a standalone app in > some different ways, but none of them works for me: > > > 1) I have created my own .DTB from my system design (.HDF), just a >

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

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

[Qemu-devel] [PATCH v2 03/15] tcg: tcg_handle_interrupt() function

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

[Qemu-devel] [PATCH v2 07/15] tcg: move cpu_sync_bndcs_hflags() function

2017-07-03 Thread 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 --- target/i386/helper.c | 34 +- target/i386/mpx_helper.c | 30

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

2017-07-03 Thread QingFeng Hao
在 2017/7/3 15:41, Christian Borntraeger 写道: On 07/03/2017 09:38 AM, 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

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

2017-07-03 Thread QingFeng Hao
This patch is based on a similar patch from Stefan Hajnoczi - commit c324fd0a39c (" virtio-pci: use ioeventfd even when KVM is disabled) Do not check kvm_eventfds_enabled() when KVM is disabled since it always returns 0. Since commit 8c56c1a592b5092d91da8d8943c1d6462a6f ("memory: emulate

Re: [Qemu-devel] [PATCH 0/4] migration: fix iotest 055, only-migratable break

2017-07-03 Thread Peter Xu
On Mon, Jul 03, 2017 at 03:54:38PM +0800, QingFeng Hao wrote: > I tested the 2 patches and they can make iotest 055 passed on both x86 and > s390x. Thanks for testing! -- Peter Xu

Re: [Qemu-devel] [PATCH] target/ppc: Only set PCR in kvm if actually in a compat mode

2017-07-03 Thread David Gibson
On Mon, Jul 03, 2017 at 01:18:38PM +1000, Suraj Jitindar Singh wrote: > On Fri, 2017-06-30 at 14:03 +1000, David Gibson wrote: > > On Thu, Jun 29, 2017 at 02:59:39PM +1000, Suraj Jitindar Singh wrote: > > > The Processor Compatibility Register (PCR) I used to set the > > > compatibility mode of

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

2017-07-03 Thread Peter Maydell
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 size and on a 1K address boundary (because

[Qemu-devel] [PATCH v2 05/15] tcg: move page_size_init() function

2017-07-03 Thread 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 --- accel/tcg/translate-all.c | 18 -- exec.c| 20

[Qemu-devel] [PATCH v2 01/15] configure: add the disable-tcg option

2017-07-03 Thread Yang Zhong
Add the disable-tcg option into configure and echo CONFIG_TCG=y into $config_target_mak. The default tcg is enabled for all build, only i386 and x86_64 softmmu option can be disabled. This operation do not make big change with the older build command. The new configure build command like below

  1   2   3   4   >