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

2017-07-03 Thread Richard Henderson
On 07/03/2017 09:34 AM, Paolo Bonzini wrote: -extern int tcg_tb_size; +extern unsigned long tcg_tb_size; size_t would be more natural. I don't think we support any hosts for which sizeof(size_t) != sizeof(unsigned long), but perhaps unsigned lomg tmp; if (qemu_strtoul(optarg

[Qemu-devel] [PULL 12/21] i386/kvm/pci-assign: Use errp directly rather than local_err

2017-07-03 Thread Michael S. Tsirkin
From: Mao Zhongyi In assigned_device_pci_cap_init(), first, error messages are filled to a local_err variable, then through error_propagate() pass to the parameter of errp. It leads to cumbersome code. In order to avoid the extra local_err and error_propagate(), drop it and use errp instead. Cc:

[Qemu-devel] [PULL 15/21] hw/acpi: remove dead acpi code

2017-07-03 Thread Michael S. Tsirkin
From: Aleksandr Bezzubikov Signed-off-by: Aleksandr Bezzubikov Reviewed-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/i386/acpi-build.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c inde

[Qemu-devel] [PULL 11/21] i386/kvm/pci-assign: Fix return type of verify_irqchip_kernel()

2017-07-03 Thread Michael S. Tsirkin
From: Mao Zhongyi When the function no success value to transmit, it usually make the function return void. It has turned out not to be a success, because it means that the extra local_err variable and error_propagate() will be needed. It leads to cumbersome code, therefore, transmit success/ fai

[Qemu-devel] [PULL 07/21] pci: Make errp the last parameter of pci_add_capability()

2017-07-03 Thread Michael S. Tsirkin
From: Mao Zhongyi Add Error argument for pci_add_capability() to leverage the errp to pass info on errors. This way is helpful for its callers to make a better error handling when moving to 'realize'. Cc: pbonz...@redhat.com Cc: r...@twiddle.net Cc: ehabk...@redhat.com Cc: m...@redhat.com Cc: ja

[Qemu-devel] [PULL 03/21] intel_iommu: relax iq tail check on VTD_GCMD_QIE enable

2017-07-03 Thread Michael S. Tsirkin
From: Ladi Prosek The VT-d spec (section 6.5.2) prescribes software to zero the Invalidation Queue Tail Register before enabling the VTD_GCMD_QIE Global Command Register bit. Windows Server 2012 R2 and possibly other older Windows versions violate the protocol and set a non-zero queue tail first,

[Qemu-devel] [PULL 09/21] pci: Convert to realize

2017-07-03 Thread Michael S. Tsirkin
From: Mao Zhongyi Convert i82801b11, io3130_upstream, io3130_downstream and pcie_root_port devices to realize. Cc: m...@redhat.com Cc: mar...@redhat.com Cc: arm...@redhat.com Signed-off-by: Mao Zhongyi Reviewed-by: Marcel Apfelbaum Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsi

[Qemu-devel] [PULL 05/21] pci: Add comment for pci_add_capability2()

2017-07-03 Thread Michael S. Tsirkin
From: Mao Zhongyi Comments for pci_add_capability2() to explain the return value. This may help to make a correct return value check for its callers. Cc: m...@redhat.com Cc: mar...@redhat.com Cc: arm...@redhat.com Signed-off-by: Mao Zhongyi Reviewed-by: Marcel Apfelbaum Reviewed-by: Michael S.

[Qemu-devel] [PULL 00/21] pc, acpi, pci, virtio: fixes, cleanups, features, tests

2017-07-03 Thread Michael S. Tsirkin
The following changes since commit fd479c60f5766f7fb247ad146b9e3c33d03d2055: Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20170603' into staging (2017-07-03 09:54:32 +0100) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstrea

[Qemu-devel] [PULL 10/21] pci: Convert shpc_init() to Error

2017-07-03 Thread Michael S. Tsirkin
From: Mao Zhongyi In order to propagate error message better, convert shpc_init() to Error also convert the pci_bridge_dev_initfn() to realize. Cc: m...@redhat.com Cc: mar...@redhat.com Cc: arm...@redhat.com Signed-off-by: Mao Zhongyi Reviewed-by: Marcel Apfelbaum Reviewed-by: Michael S. Tsirk

[Qemu-devel] [PULL 06/21] pci: Fix the wrong assertion.

2017-07-03 Thread Michael S. Tsirkin
From: Mao Zhongyi pci_add_capability returns a strictly positive value on success, correct asserts. Cc: dmi...@daynix.com Cc: jasow...@redhat.com Cc: kra...@redhat.com Cc: alex.william...@redhat.com Cc: arm...@redhat.com Cc: mar...@redhat.com Signed-off-by: Mao Zhongyi Reviewed-by: Marcel Apfel

[Qemu-devel] [PULL 04/21] pci: Clean up error checking in pci_add_capability()

2017-07-03 Thread Michael S. Tsirkin
From: Mao Zhongyi On success, pci_add_capability2() returns a positive value. On failure, it sets an error and return a negative value. pci_add_capability() laboriously checks this behavior. No other caller does. Drop the checks from pci_add_capability(). Cc: m...@redhat.com Cc: mar...@redhat.c

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

2017-07-03 Thread Michael S. Tsirkin
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 other backends is 512 due to the following limitations: - QEMU backend: the QE

[Qemu-devel] [PULL 02/21] hw/pci-bridge/dec: Classify the DEC PCI bridge as bridge device

2017-07-03 Thread Michael S. Tsirkin
From: Thomas Huth This way the bridge shows up in the correct section of the "-device help" text. Signed-off-by: Thomas Huth Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: David Gibson Reviewed-by: Marcel Apfelbaum --- hw/pci-bridge/dec.c | 2 ++ 1 file chan

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

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

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

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

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

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

[Qemu-devel] [PATCH] 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: 526e8fa8b872 ("virtio-net: enable configurable tx queue size") Cc: Wei Wang Signed-off-by: Michael S. Tsirkin --- hw/net/virtio-net.c | 28 1 file changed, 20 i

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

2017-07-03 Thread Richard Henderson
On 07/03/2017 09:23 AM, Laurent Vivier wrote: +void HELPER(fgetman)(CPUM68KState *env, FPReg *res, FPReg *val) +{ +if (floatx80_is_infinity(val->d)) { +res->d = floatx80_default_nan(NULL); +/* FIXME: set the OPERR bit int he FPSR */ +return; +} +if (floatx80_is

Re: [Qemu-devel] [PATCH v4] virtio-net: enable configurable tx queue size

2017-07-03 Thread Michael S. Tsirkin
On Wed, Jun 28, 2017 at 10:37:59AM +0800, Wei Wang wrote: > 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 other backends is 512 due >

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

2017-07-03 Thread Richard Henderson
On 07/03/2017 12:11 PM, Richard Henderson wrote: if (floatx80_to_ldouble(&d, val))) { d = sinl(d); val = ldouble_to_floatx80(d, status); } else { status->float_exception_flags |= float_flag_invalid; val = floatx80_default_nan(status); } Blah. I didn't mean default_

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

2017-07-03 Thread Richard Henderson
On 07/03/2017 09:23 AM, Laurent Vivier wrote: 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 ++

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

2017-07-03 Thread Richard Henderson
On 07/03/2017 09:23 AM, Laurent Vivier wrote: +long double floatx80_to_ldouble(floatx80 val) +{ +long double mantissa; +int32_t exp; +uint8_t sign; + +if (floatx80_is_infinity(val)) { +if (floatx80_is_neg(val)) { +return -__builtin_infl(); +} +r

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

2017-07-03 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > 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

[Qemu-devel] [Bug 1377095] Re: KVM guest VM does not reattach a throughpassed USB printer from Host after switching printer off and on

2017-07-03 Thread 123p
This is a very annoying bug, and it is still not solved after 2.7 years. Last versions tested and affected by this bug: KVM host qemu version 2.9.0 KVM host Linux version 4.9.6 x86_64 Please fix this. -- You received this bug notification because you are a member of qemu- devel-ml, which is su

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

2017-07-03 Thread Eduardo Habkost
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 > > instantiated. Instead of requiring an extra compat property, check if > > fw_cfg ha

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

2017-07-03 Thread Eric Blake
On 07/03/2017 10:56 AM, Eric Blake wrote: > On 06/29/2017 01:43 PM, Manos Pitsidianakis wrote: >> The following functions fail if bs->drv does not implement them: One other suggestion: most patches in the tree use 'topic: Capital', while yours used 'topic: lowercase'. It's probably worth posting

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

2017-07-03 Thread Michael S. Tsirkin
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

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

2017-07-03 Thread Laszlo Ersek
On 07/03/17 20:27, Eduardo Habkost wrote: > On Mon, Jul 03, 2017 at 08:06:33PM +0200, Laszlo Ersek wrote: >> On 06/29/17 15:23, 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

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:24 PM, Manos Pitsidianakis wrote: >> In fact, my rebase fallout is to completely delete >> bdrv_co_get_block_status_from_file(). Why? Because blkdebug is the only >> client, but I want to enhance blkdebug to add in-place assert()ions that >> the values passed by the block layer a

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 09:26:33PM +0300, Marcel Apfelbaum wrote: > On 03/07/2017 19:34, Michael S. Tsirkin wrote: > > 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 th

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

2017-07-03 Thread Eduardo Habkost
On Mon, Jul 03, 2017 at 08:06:33PM +0200, Laszlo Ersek wrote: > On 06/29/17 15:23, 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

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

2017-07-03 Thread Marcel Apfelbaum
On 03/07/2017 19:34, Michael S. Tsirkin wrote: 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 th

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

2017-07-03 Thread Manos Pitsidianakis
On Mon, Jul 03, 2017 at 12:51:45PM -0500, Eric Blake wrote: On 07/03/2017 11:12 AM, Eric Blake wrote: 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 b

Re: [Qemu-devel] [PATCH v3 18/20] block: Make bdrv_is_allocated() byte-based

2017-07-03 Thread Eric Blake
On 06/27/2017 02:24 PM, Eric Blake wrote: > 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 precis

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

2017-07-03 Thread Michael S. Tsirkin
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 v4] tests: Avoid non-portable 'echo -ARG'

2017-07-03 Thread Eric Blake
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 we do not control which shell is running (such as in makefile snippets or in documentation exam

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

2017-07-03 Thread Richard Henderson
On 07/03/2017 09:23 AM, Laurent Vivier wrote: 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 inf

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

2017-07-03 Thread Laszlo Ersek
On 06/29/17 15:23, 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 properly, like: > >

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

2017-07-03 Thread Richard Henderson
On 07/03/2017 09:40 AM, Peter Maydell wrote: Since these are defined by system registers, I can imagine there can only be a few pages for which this fine grained handling might apply any any one time. This would certainly be preferable to reducing the effectiveness of the entire TLB by a factor o

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

2017-07-03 Thread Michael S. Tsirkin
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 + Juan's load_cleanup series, and > Alexe

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 11:12 AM, Eric Blake wrote: > 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. Fut

Re: [Qemu-devel] [RFC 03/29] qemu_ram_block_host_offset

2017-07-03 Thread Michael S. Tsirkin
On Wed, Jun 28, 2017 at 08:00:21PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > Utility to give the offset of a host pointer within a RAMBlock > (assuming we already know it's in that RAMBlock) > > Signed-off-by: Dr. David Alan Gilbert > --- > exec.c

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

2017-07-03 Thread Michael S. Tsirkin
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 be converted to Error, then propagate > to its callers via th

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

2017-07-03 Thread Alexey
On Mon, Jul 03, 2017 at 05:49:26PM +0100, Dr. David Alan Gilbert wrote: > * 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 Gilber

Re: [Qemu-devel] [PATCH v1] virtio-net: code cleanup

2017-07-03 Thread Michael S. Tsirkin
On Wed, Jun 28, 2017 at 01:53:20PM +0800, Wei Wang wrote: > Use is_power_of_2(), and remove trailing "." from error_setg(). > > Signed-off-by: Wei Wang Reviewed-by: Michael S. Tsirkin > --- > hw/net/virtio-net.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/h

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

2017-07-03 Thread Eduardo Habkost
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 when enforce-config-section is set, it'll override the > other "-global" param

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

2017-07-03 Thread Daniel Henrique Barboza
On 07/03/2017 11:54 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 --- Changes in v2: - added rollback code --- hw/ppc/sp

Re: [Qemu-devel] [PATCH 1/4] migration: fix handling for --only-migratable

2017-07-03 Thread Eduardo Habkost
On Mon, Jul 03, 2017 at 10:44:05AM +0800, Peter Xu wrote: > MigrateState object is not ready at that time, so we'll get an > assertion. Use qemu_global_option() instead. > > Reported-by: Eduardo Habkost > Suggested-by: Eduardo Habkost > Fixes: 3df663e ("migration: move only_migratable to Migrati

[Qemu-devel] [PATCH] spapr: make default PHB optionnal

2017-07-03 Thread Greg Kurz
The sPAPR machine always create a default PHB during initialization, even if -nodefaults was passed on the command line. This forces the user to rely on -global if she wants to set properties of the default PHB, such as numa_node. This patch introduces a new machine create-default-phb property to

Re: [Qemu-devel] [PATCH 4/4] doc: update TYPE_MIGRATION documents

2017-07-03 Thread Eduardo Habkost
On Mon, Jul 03, 2017 at 10:44:08AM +0800, Peter Xu wrote: > [Peter collected Eduardo's patch comment and formatted into patch] > > Suggested-by: Eduardo Habkost > Signed-off-by: Peter Xu Reviewed-by: Eduardo Habkost -- Eduardo

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

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

[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 +--

[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

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 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.

[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

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 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

[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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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

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

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] 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

[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

[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 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

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

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] [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 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 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] 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 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] [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 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] 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

[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

[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 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 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:

<    1   2   3   4   >