[Qemu-devel] [RFC] virtio-bus: Plug devices after features are negotiated

2016-09-09 Thread Maxime Coquelin
Currently, devices are plugged before features are negotiated. If the backend doesn't support VIRTIO_F_VERSION_1, the transport need to rewind some settings. This is the case for both PCI and CCW. For CCW, a post_plugged callback had been introduced, where max_rev field is just updated if VIRTIO_F

Re: [Qemu-devel] [PATCH v2 1/4] tests/tcg: Move arm tests to arch specific folder

2016-09-09 Thread Alex Bennée
Pranith Kumar writes: > Signed-off-by: Pranith Kumar > --- > tests/tcg/arm/Makefile| 45 > +++ > tests/tcg/{ => arm}/hello-arm.c | 0 > tests/tcg/{ => arm}/test-arm-iwmmxt.s | 0 > 3 files changed, 45 insertions(+) > create mode 100644

Re: [Qemu-devel] [PATCH v3 13/34] tcg: Add atomic helpers

2016-09-09 Thread Leon Alrae
On Sat, Sep 03, 2016 at 09:39:41PM +0100, Richard Henderson wrote: > --- a/tcg/tcg.h > +++ b/tcg/tcg.h > @@ -1175,6 +1175,59 @@ uint64_t helper_be_ldq_cmmu(CPUArchState *env, > target_ulong addr, > # define helper_ret_ldq_cmmu helper_le_ldq_cmmu > #endif > > +uint32_t helper_atomic_cmpxchgb_m

Re: [Qemu-devel] [PATCH RFC] exec: remove duplicate madvise to QEMU_MADV_DONTFORK

2016-09-09 Thread Paolo Bonzini
On 09/09/2016 12:02, Cao jin wrote: > kvm_setup_guest_memory() also just does "madivse to QEMU_MADV_DONTFORK". > > Signed-off-by: Cao jin > --- > > Though I don't understand these code well, tt seems is duplicate code to me. > But I am not sure whether I am doing the right thing, so, RFC. > >

Re: [Qemu-devel] [PATCH RFC v1 1/3] target-ppc: add TLB_NEED_LOCAL_FLUSH flag

2016-09-09 Thread Nikunj A Dadhania
Alex Bennée writes: > Nikunj A Dadhania writes: > > I think we need a little more detail here. In fact when you post the > next version of the series could you please include a cover letter to > cover what the series is trying to achieve? Sure will do that. > >> Signed-off-by: Nikunj A Dadhani

Re: [Qemu-devel] [PATCH v2 3/4] tests/tcg: Create and populate misc tests for arch independent tests

2016-09-09 Thread Alex Bennée
Pranith Kumar writes: > Signed-off-by: Pranith Kumar > --- > tests/tcg/misc/Makefile | 75 > +++ > tests/tcg/{ => misc}/linux-test.c | 3 ++ > tests/tcg/{ => misc}/sha1.c | 0 > tests/tcg/{ => misc}/test-mmap.c | 0 > tests/tcg/{ => misc

Re: [Qemu-devel] [PATCH v2] iscsi: Fix divide-by-zero regression on raw SG devices

2016-09-09 Thread Holger Schranz
Hello Eric, Kevin, Paolo, Thank you very much for the very fast help. All works fine now!!! Best regards and have nice weekend Holger Am 08.09.2016 um 19:34 schrieb Holger Schranz: Hi Eric, Am 08.09.2016 um 17:25 schrieb Eric Blake: On 09/08/2016 09:27 AM, Holger Schranz wrote: Hi Eric,

Re: [Qemu-devel] [PATCH v2 9/9] [optional] arm: smmu-v3: ACPI IORT initial support

2016-09-09 Thread Auger Eric
Hi Prem, On 22/08/2016 18:17, Prem Mallappa wrote: > Added ACPI IORT tables, was needed for internal project purpose, but > posting here for anyone looking for testing ACPI on ARM platforms. > (P.S: Linux side IORT patches are WIP) I am also interested in IORT ITS group and currently prototyping s

Re: [Qemu-devel] [PATCH v2] 9pfs: add support for IO limits to 9p-local driver

2016-09-09 Thread Greg Kurz
On Fri, 9 Sep 2016 05:10:27 -0400 Pradeep Jagadeesh wrote: > Uses throttling APIs to limit I/O bandwidth and number of operations on the > devices which use 9p-local driver. > > Signed-off-by: Pradeep Jagadeesh > --- Hi Pradeep, Please find some remarks below. I haven't dived deep enough to

Re: [Qemu-devel] [PATCH v2 1/9] log: Add new IOMMU type

2016-09-09 Thread Auger Eric
Hi Prem, Missing commit message > Signed-off-by: Prem Mallappa > --- > include/qemu/log.h | 1 + > util/log.c | 2 ++ > 2 files changed, 3 insertions(+) > > diff --git a/include/qemu/log.h b/include/qemu/log.h > index 234fa81..3dd2131 100644 > --- a/include/qemu/log.h > +++ b/include/q

Re: [Qemu-devel] [RFC] virtio-bus: Plug devices after features are negotiated

2016-09-09 Thread Michael S. Tsirkin
On Fri, Sep 09, 2016 at 04:14:59PM +0200, Maxime Coquelin wrote: > Currently, devices are plugged before features are negotiated. > If the backend doesn't support VIRTIO_F_VERSION_1, the transport > need to rewind some settings. > > This is the case for both PCI and CCW. > For CCW, a post_plugged

Re: [Qemu-devel] [PATCH v2] 9pfs: add support for IO limits to 9p-local driver

2016-09-09 Thread Alberto Garcia
On Fri 09 Sep 2016 05:29:16 PM CEST, Greg Kurz wrote: > On Fri, 9 Sep 2016 05:10:27 -0400 > Pradeep Jagadeesh wrote: > >> Uses throttling APIs to limit I/O bandwidth and number of operations on the >> devices which use 9p-local driver. >> >> Signed-off-by: Pradeep Jagadeesh >> --- > > Hi Prade

Re: [Qemu-devel] [PATCH v2] 9pfs: add support for IO limits to 9p-local driver

2016-09-09 Thread Greg Kurz
On Fri, 9 Sep 2016 17:29:16 +0200 Greg Kurz wrote: > > +bool throttle9p_get_io_limits_state(FsThrottle *fst) > > The name looks a bit strange, since this helper simply returns a boolean flag. > I guess throttle9p_enabled() is enough. > > > +{ > > + > > +return fst->io_limits_enabled; > > +

Re: [Qemu-devel] [PATCH v2 2/9] devicetree: Added new APIs to make use of more fdt functions

2016-09-09 Thread Auger Eric
Hi Prem, > SMMUv3 needs device tree entry like below To me the commit message should be more explicit and mention appendprop functionality > > interrupt-names = "gerror", "priq", "eventq", "cmdq-sync"; > > This patch introduces helper function to add entries like above > > Signed-off-by: P

Re: [Qemu-devel] [PATCH v2 3/4] tests/tcg: Create and populate misc tests for arch independent tests

2016-09-09 Thread Alex Bennée
Pranith Kumar writes: > Signed-off-by: Pranith Kumar > --- > tests/tcg/misc/Makefile | 75 > +++ > tests/tcg/{ => misc}/linux-test.c | 3 ++ > tests/tcg/{ => misc}/sha1.c | 0 > tests/tcg/{ => misc}/test-mmap.c | 0 > tests/tcg/{ => misc

Re: [Qemu-devel] [RFC] virtio-bus: Plug devices after features are negotiated

2016-09-09 Thread Maxime Coquelin
On 09/09/2016 05:39 PM, Michael S. Tsirkin wrote: On Fri, Sep 09, 2016 at 04:14:59PM +0200, Maxime Coquelin wrote: > Currently, devices are plugged before features are negotiated. > If the backend doesn't support VIRTIO_F_VERSION_1, the transport > need to rewind some settings. > > This is the

Re: [Qemu-devel] [PATCH v2] qom: Implement qom-get HMP command

2016-09-09 Thread Markus Armbruster
"Dr. David Alan Gilbert" writes: > * Daniel P. Berrange (berra...@redhat.com) wrote: >> On Tue, Sep 06, 2016 at 11:18:06AM +0100, Dr. David Alan Gilbert (git) wrote: >> > From: "Dr. David Alan Gilbert" >> > >> > This started off as Andreas Färber's implementation from >> > March 2015, but after

[Qemu-devel] [PATCH v5 01/14] ast2400: rename the Aspeed SoC files to aspeed_soc

2016-09-09 Thread Cédric Le Goater
Let's prepare for new Aspeed SoCs and rename the ast2400 file to a more generic one. There are no changes in the code apart from the header file include. Signed-off-by: Cédric Le Goater Reviewed-by: Andrew Jeffery Reviewed-by: Peter Maydell --- hw/arm/Makefile.objs | 2 +-

[Qemu-devel] [PATCH v5 00/14] arm: add ast2500 support

2016-09-09 Thread Cédric Le Goater
The AST2500 SoC being very close to the AST2400 SoC, the goal of the changes below is to modify the existing platform palmetto-bmc and the AST2400 SoC to take into account the small differences and avoid code duplication. This is mostly inspired by the realview and the rpi2 platforms. First patche

[Qemu-devel] [PATCH v5 02/14] ast2400: replace ast2400 with aspeed_soc

2016-09-09 Thread Cédric Le Goater
This is a name replacement to prepare ground for other SoCs. Let's also remove the AST2400_SMC_BASE definition from the address space mappings, as it is not used. This controller was removed from the Aspeed SoC AST2500, so this provides us a better common base for the address space mapping on both

[Qemu-devel] [PATCH v5 09/14] arm: add support for an ast2500 evaluation board

2016-09-09 Thread Cédric Le Goater
The ast2500 eval board has a hardware strapping register value of 0xF100C2E6 which we use for a definition of AST2500_EVB_HW_STRAP1 below. Signed-off-by: Cédric Le Goater Reviewed-by: Andrew Jeffery Reviewed-by: Peter Maydell --- Changes since v3: - fixed trailing comma. hw/arm/aspeed.c |

[Qemu-devel] [PATCH v5 05/14] palmetto-bmc: replace palmetto_bmc with aspeed

2016-09-09 Thread Cédric Le Goater
This is mostly a name replacement to prepare ground for other SoCs specificities. It also adds a TypeInfo struct for the palmetto-bmc board with a custom initialization for the same reason. Signed-off-by: Cédric Le Goater Reviewed-by: Andrew Jeffery Reviewed-by: Peter Maydell --- hw/arm/aspeed

[Qemu-devel] [PATCH v5 06/14] palmetto-bmc: add board specific configuration

2016-09-09 Thread Cédric Le Goater
aspeed_board_init() now uses a board identifier to customize some values specific to the board. Signed-off-by: Cédric Le Goater Reviewed-by: Andrew Jeffery Reviewed-by: Peter Maydell --- Changes since v3: - added trailing comma to enum Changes since v2: - removed silicon-rev and cpu-mod

[Qemu-devel] [PATCH v5 14/14] aspeed: allocate RAM after the memory controller has checked the size

2016-09-09 Thread Cédric Le Goater
If the RAM size is invalid, the memory controller will use a default value. Signed-off-by: Cédric Le Goater --- hw/arm/aspeed.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index 562bbb253391..6b18c7f1727c 100644 --- a/

[Qemu-devel] [PATCH v5 07/14] hw/misc: use macros to define hw-strap1 register on the AST2400 Aspeed SoC

2016-09-09 Thread Cédric Le Goater
This gives some explanation behind the magic number 0x120CE416. Signed-off-by: Cédric Le Goater Reviewed-by: Andrew Jeffery Reviewed-by: Peter Maydell --- Changes since v3: - added brackets around macro parameters Changes since v2: - more precise definitions of the hw-strap1 register -

[Qemu-devel] [PATCH v5 08/14] aspeed: add a ast2500 SoC and support to the SCU and SDMC controllers

2016-09-09 Thread Cédric Le Goater
Based on previous work done by Andrew Jeffery . Signed-off-by: Cédric Le Goater Reviewed-by: Andrew Jeffery Reviewed-by: Peter Maydell --- Changes since v3: - added brackets around macro parameters - fixed trailing comma in enum Changes since v2: - more precise definitions of the hw-st

[Qemu-devel] [PATCH v5 04/14] palmetto-bmc: rename the Aspeed board file to aspeed.c

2016-09-09 Thread Cédric Le Goater
We plan to add more Aspeed boards to this file. There are no changes in the code. Signed-off-by: Cédric Le Goater Reviewed-by: Andrew Jeffery Reviewed-by: Peter Maydell --- hw/arm/Makefile.objs| 2 +- hw/arm/{palmetto-bmc.c => aspeed.c} | 0 2 files changed, 1 insertion(+), 1 d

[Qemu-devel] [PATCH v5 11/14] aspeed: calculate the RAM size bits at realize time

2016-09-09 Thread Cédric Le Goater
There is no need to do this at each reset as the RAM size will not change. Signed-off-by: Cédric Le Goater --- hw/misc/aspeed_sdmc.c | 16 ++-- include/hw/misc/aspeed_sdmc.h | 1 + 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/hw/misc/aspeed_sdmc.c b/hw/mis

Re: [Qemu-devel] DAX can not work on virtual nvdimm device

2016-09-09 Thread Ross Zwisler
On Fri, Sep 09, 2016 at 10:03:27AM -0400, Theodore Ts'o wrote: > On Fri, Sep 09, 2016 at 11:19:25AM +0200, Jan Kara wrote: > > > > > > 1. make the guest kernel based on your tree, the top commit is > > > > > >10d7902fa0e82b (dax: unmap/truncate on device shutdown) and > > > > > >the config

[Qemu-devel] [PATCH v5 12/14] aspeed: use error_report instead of LOG_GUEST_ERROR

2016-09-09 Thread Cédric Le Goater
Also change the default value used in case of an error. The minimum size is a bit severe, so let's just use an average RAM size. Signed-off-by: Cédric Le Goater --- hw/misc/aspeed_sdmc.c | 17 + 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/hw/misc/aspeed_sdmc.c b

[Qemu-devel] [PATCH v5 10/14] palmetto-bmc: remove extra no_sdcard assignement

2016-09-09 Thread Cédric Le Goater
Signed-off-by: Cédric Le Goater Reviewed-by: Andrew Jeffery Reviewed-by: Peter Maydell --- hw/arm/aspeed.c | 1 - 1 file changed, 1 deletion(-) diff --git a/hw/arm/aspeed.c b/hw/arm/aspeed.c index 2af9fe934441..9013d35a674c 100644 --- a/hw/arm/aspeed.c +++ b/hw/arm/aspeed.c @@ -145,7 +145,6 @@

Re: [Qemu-devel] [PATCH v2 5/9] hw: arm: Add SMMUv3 to virt platform, create DTS accordingly

2016-09-09 Thread Auger Eric
Hi Prem, > Default virt platform now creates SMMU device. > Default config to build SMMU device along is in previous patches. > > Signed-off-by: Prem Mallappa > --- > hw/arm/virt.c | 62 > +++ > include/hw/arm/smmu.h | 33

Re: [Qemu-devel] [PATCH v3 13/34] tcg: Add atomic helpers

2016-09-09 Thread Richard Henderson
On 09/09/2016 07:46 AM, Leon Alrae wrote: Wouldn't it be useful if tcg.h provided also aliases for _le/_be atomic helpers (equivalent to helper_ret_X_mmu) so that in target-* code we wouldn't need to care about the endianness (specifically I'm thinking about SC in MIPS where I need to select betw

[Qemu-devel] [PATCH v5 13/14] aspeed: add a ram_size property to the memory controller

2016-09-09 Thread Cédric Le Goater
Configure the size of the RAM of the SOC using a property to propagate the value down to the memory controller from the board level. Signed-off-by: Cédric Le Goater --- hw/arm/aspeed.c | 2 ++ hw/arm/aspeed_soc.c | 2 ++ hw/misc/aspeed_sdmc.c | 23 +-

Re: [Qemu-devel] [PATCH v6 3/3] tests: add RTAS command in the protocol

2016-09-09 Thread Greg Kurz
On Thu, 8 Sep 2016 21:00:07 +0200 Laurent Vivier wrote: > Add a first test to validate the protocol: > > - rtas/get-time-of-day compares the time > from the guest with the time from the host. > > Signed-off-by: Laurent Vivier > --- > v6: > - rebase > > v5: > - use qtest_spapr_boot() instea

[Qemu-devel] [PATCH v5 03/14] aspeed-soc: provide a framework to add new SoCs

2016-09-09 Thread Cédric Le Goater
Let's define an object class for each Aspeed SoC we support. A AspeedSoCInfo struct gathers the SoC specifications which can later be used by an instance of the class or by a board using the SoC. Signed-off-by: Cédric Le Goater Reviewed-by: Andrew Jeffery --- Changes since v4: - fixed Aspeed

Re: [Qemu-devel] [PATCH v2 1/2] virtio: Add function to check whether backend supports VIRTIO_1

2016-09-09 Thread Marcel Apfelbaum
On 09/09/2016 04:10 PM, Maxime Coquelin wrote: This patch adds virtio_test_backend_virtio_1() function to check whether backend supports VIRTIO_F_VERSION_1 before the negociation takes place. Cc: Cornelia Huck Cc: Marcel Apfelbaum Cc: Michael S. Tsirkin Cc: qemu-sta...@nongnu.org Signed-off-b

Re: [Qemu-devel] [PATCH v2 2/2] virtio-pci: Disable modern interface if backend without VIRTIO_F_VERSION_1

2016-09-09 Thread Marcel Apfelbaum
On 09/09/2016 04:10 PM, Maxime Coquelin wrote: This patch makes pci devices plugging more robust, by not confusing guest with modern interface when the backend doesn't support VIRTIO_F_VERSION_1. Cc: Cornelia Huck Cc: Marcel Apfelbaum Cc: Michael S. Tsirkin Cc: qemu-sta...@nongnu.org Signed-o

Re: [Qemu-devel] [PATCH v4 0/4] Introduce error_report_{fatal|abort}

2016-09-09 Thread Markus Armbruster
Peter Xu writes: > v4 changes: > - remove two standard headers since they are included in osdep.h > already [Fam] > - make sure it passes build on all platforms (no --target-list > specified during configure) > > v3 changes: > - implement error_report_fatal using function [Markus] > - provide

Re: [Qemu-devel] [PATCH v3 03/34] exec: Avoid direct references to Int128 parts

2016-09-09 Thread Alex Bennée
Richard Henderson writes: > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée > --- > exec.c| 4 ++-- > include/qemu/int128.h | 10 ++ > 2 files changed, 12 insertions(+), 2 deletions(-) > > diff --git a/exec.c b/exec.c > index 8ffde75..373313d 100644 > ---

Re: [Qemu-devel] [PATCH v3 04/34] int128: Use __int128 if available

2016-09-09 Thread Alex Bennée
Richard Henderson writes: > Signed-off-by: Richard Henderson > --- > include/qemu/int128.h | 135 > +- > tests/test-int128.c | 22 > 2 files changed, 145 insertions(+), 12 deletions(-) > > diff --git a/include/qemu/int128.h b/include

Re: [Qemu-devel] [PATCH v4 0/4] Introduce error_report_{fatal|abort}

2016-09-09 Thread Daniel P. Berrange
On Fri, Sep 09, 2016 at 07:05:04PM +0200, Markus Armbruster wrote: > Peter Xu writes: > > > v4 changes: > > - remove two standard headers since they are included in osdep.h > > already [Fam] > > - make sure it passes build on all platforms (no --target-list > > specified during configure) > >

[Qemu-devel] [PATCH v6 6/8] arm/virt: Add ITS to the virt board

2016-09-09 Thread Eric Auger
From: Pavel Fedin If supported by the configuration, ITS will be added automatically. This patch also renames v2m_phandle to msi_phandle because it's now used by both MSI implementations. Signed-off-by: Pavel Fedin Signed-off-by: Eric Auger Reviewed-by: Peter Maydell -- v3 -> v4: - added P

[Qemu-devel] [PATCH v6 1/8] hw/intc/arm_gic(v3)_kvm: Initialize gsi routing

2016-09-09 Thread Eric Auger
From: Eric Auger Advertise gsi routing and set up irqchip routing entries for GIC SPIs. This is not mandated as long as MSI routing is not used (because the kernel sets a default irqchip routing table). However once MSI routing gets used (for VIRTIO-PCI vhost for example), the first call to KVM_

[Qemu-devel] [PATCH v6 3/8] target-arm: move gicv3_class_name from machine to kvm_arm.h

2016-09-09 Thread Eric Auger
Machine.c contains code related to migration. Let's move gicv3_class_name to kvm_arm.h instead. Signed-off-by: Eric Auger Suggested-by: Peter Maydell Reviewed-by: Peter Maydell --- v5 -> v6: - add Peter's R-b v4 -> v5: - add #include "qemu/error-report.h" - rebased on target-arm: Fix unreach

[Qemu-devel] [PATCH v6 0/8] vITS support

2016-09-09 Thread Eric Auger
This series introduces support for in-kernel GICv3 ITS emulation. On dt guest the functionality is complete and was tested on Cavium ThunderX with virtio-net-pci and vhost-net. On ACPI guest the series was tested with virtio-net-pci only. For vhost-net, using MSIX we currently miss the ACPI IORT

[Qemu-devel] [PATCH v6 4/8] kvm-all: Pass requester ID to MSI routing functions

2016-09-09 Thread Eric Auger
From: Pavel Fedin Introduce global kvm_msi_use_devid flag and pass the device ID, if needed, while building the MSI route entry. Device IDs are required by the ARM GICv3 ITS (IRQ remapping function is based on this information). Signed-off-by: Pavel Fedin Signed-off-by: Eric Auger --- v5 -> v

[Qemu-devel] [PATCH v6 8/8] ARM: Virt: ACPI: Add GIC ITS description in ACPI MADT table

2016-09-09 Thread Eric Auger
From: Shannon Zhao If GIC ITS is supported, add description in ACPI MADT table, then guest could use ITS when booting with ACPI. Signed-off-by: Shannon Zhao --- hw/arm/virt-acpi-build.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/arm/virt-acpi-build.c b/hw/arm/virt-acp

[Qemu-devel] [PATCH v6 2/8] hw/intc/arm_gicv3_its: Implement ITS base class

2016-09-09 Thread Eric Auger
From: Pavel Fedin This is the basic skeleton for both KVM and software-emulated ITS. Since we already prepare status structure, we also introduce complete VMState description. But, because we currently have no migratable implementations, we also set unmigratable flag. Signed-off-by: Pavel Fedin

Re: [Qemu-devel] [PATCH v2] qom: Implement qom-get HMP command

2016-09-09 Thread Daniel P. Berrange
On Fri, Sep 09, 2016 at 06:21:15PM +0200, Markus Armbruster wrote: > "Dr. David Alan Gilbert" writes: > > > * Daniel P. Berrange (berra...@redhat.com) wrote: > >> IIUC, you switched because string-output-visitor could not handle > >> complex types. > >> > >> I have previously written a text-outp

[Qemu-devel] [PATCH v6 7/8] ACPI: Add GIC Interrupt Translation Service Structure definition

2016-09-09 Thread Eric Auger
From: Shannon Zhao ACPI Spec 6.0 introduces GIC Interrupt Translation Service Structure. Here we add the definition of the Structure. Signed-off-by: Shannon Zhao --- include/hw/acpi/acpi-defs.h | 13 - 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/include/hw/acpi/ac

[Qemu-devel] [PATCH v6 5/8] hw/intc/arm_gicv3_its: Implement support for in-kernel ITS emulation

2016-09-09 Thread Eric Auger
From: Pavel Fedin The ITS control frame is in-kernel emulated while accesses to the GITS_TRANSLATER are mediated through the KVM_SIGNAL_MSI ioctl (MSI direct MSI injection advertised by the CAP_SIGNAL_MSI capability) the kvm_gsi_direct_mapping is explicitly set to false to emphasize the differen

[Qemu-devel] [PATCH v2 1/6] cutils: add helpers for formatting sized values

2016-09-09 Thread Daniel P. Berrange
Introduce qemu_sztostr which takes an int and turns it into a sized string. Variants are added for both signed and unsigned integers. Signed-off-by: Daniel P. Berrange --- include/qemu/cutils.h | 12 +++ tests/test-cutils.c | 96 +++ util/cut

[Qemu-devel] [PATCH v2 0/6] Stable output of blockdev format specific info

2016-09-09 Thread Daniel P. Berrange
This is an update of the bits of this previous series which were not merged https://lists.gnu.org/archive/html/qemu-devel/2016-06/msg01723.html The problem addressed in this series is that the 'qemu-img info' command does not have a stable output format for the image specific info objects. The

Re: [Qemu-devel] [PATCH v3 04/34] int128: Use __int128 if available

2016-09-09 Thread Richard Henderson
On 09/09/2016 10:19 AM, Alex Bennée wrote: Richard Henderson writes: Signed-off-by: Richard Henderson --- include/qemu/int128.h | 135 +- tests/test-int128.c | 22 2 files changed, 145 insertions(+), 12 deletions(-) diff --git a/i

[Qemu-devel] [PATCH v2 4/6] qapi: add a text output visitor for pretty printing types

2016-09-09 Thread Daniel P. Berrange
The current approach for pretty-printing QAPI types is to convert them to JSON using the QMP output visitor and then pretty-print the JSON document. This has an unfixable problem that structs get their keys printed out in random order, since JSON dicts do not contain any key ordering information.

[Qemu-devel] [PATCH v2 3/6] qapi: assert that visitor impls have required callbacks

2016-09-09 Thread Daniel P. Berrange
Not all visitor implementations supply the full set of visitor callback functions. For example, the string output visitor does not provide 'start_struct' and friends. If you don't know this and feed it an object that uses structs, you'll get a crash: Segmentation fault (core dumped) Crashing is

[Qemu-devel] [PATCH v2 6/6] block: convert to use qapi_stringify_ImageInfoSpecific

2016-09-09 Thread Daniel P. Berrange
When 'qemu-img info' prints out format specific information, it first converts the QAPI object into a JSON based QObject data structure. Unfortunately structs have to be turned into dicts, which looses all information about field ordering, so the data printed appears in a semi-random order. Conver

[Qemu-devel] [PATCH v2 2/6] qapi: convert StringOutputVisitor to use qemu_szutostr

2016-09-09 Thread Daniel P. Berrange
Instead inlining code for formatting sized integers, call out to the new qemu_szutostr function. Signed-off-by: Daniel P. Berrange --- qapi/string-output-visitor.c | 20 +--- tests/test-string-output-visitor.c | 22 ++ 2 files changed, 27 insertions(+),

Re: [Qemu-devel] [PATCH v2 2/2] virtio-pci: Disable modern interface if backend without VIRTIO_F_VERSION_1

2016-09-09 Thread Michael S. Tsirkin
On Fri, Sep 09, 2016 at 03:10:07PM +0200, Maxime Coquelin wrote: > This patch makes pci devices plugging more robust, by not confusing > guest with modern interface when the backend doesn't support > VIRTIO_F_VERSION_1. > > Cc: Cornelia Huck > Cc: Marcel Apfelbaum > Cc: Michael S. Tsirkin > Cc:

Re: [Qemu-devel] [PATCH v2 1/2] virtio: Add function to check whether backend supports VIRTIO_1

2016-09-09 Thread Michael S. Tsirkin
On Fri, Sep 09, 2016 at 08:00:31PM +0300, Marcel Apfelbaum wrote: > On 09/09/2016 04:10 PM, Maxime Coquelin wrote: > > This patch adds virtio_test_backend_virtio_1() function to > > check whether backend supports VIRTIO_F_VERSION_1 before the > > negociation takes place. > > > > Cc: Cornelia Huck

[Qemu-devel] [PATCH v2 5/6] block: convert to use the qemu_szutostr functions

2016-09-09 Thread Daniel P. Berrange
Remove the get_human_readable_size() method in favour of using the new common qemu_szutostr() method. There are two slight differences in output format - the new code will also deal with petabyte and exabyte suffixes, where as old code stopped at the terrabyte level. - if the value has a trai

Re: [Qemu-devel] [PATCH v7 1/4] vfio: Mediated device Core driver

2016-09-09 Thread Kirti Wankhede
On 9/8/2016 1:39 PM, Jike Song wrote: > On 08/25/2016 11:53 AM, Kirti Wankhede wrote: >> +---+ >> | | >> | +---+ | mdev_register_driver() +--+ >> | | | +<+ __init() | >> | | mdev | |

Re: [Qemu-devel] [PATCH v2 1/2] virtio: Add function to check whether backend supports VIRTIO_1

2016-09-09 Thread Maxime Coquelin
On 09/09/2016 07:47 PM, Michael S. Tsirkin wrote: On Fri, Sep 09, 2016 at 08:00:31PM +0300, Marcel Apfelbaum wrote: On 09/09/2016 04:10 PM, Maxime Coquelin wrote: This patch adds virtio_test_backend_virtio_1() function to check whether backend supports VIRTIO_F_VERSION_1 before the negociatio

Re: [Qemu-devel] [PATCH v2 2/2] virtio-pci: Disable modern interface if backend without VIRTIO_F_VERSION_1

2016-09-09 Thread Maxime Coquelin
On 09/09/2016 07:48 PM, Michael S. Tsirkin wrote: On Fri, Sep 09, 2016 at 03:10:07PM +0200, Maxime Coquelin wrote: This patch makes pci devices plugging more robust, by not confusing guest with modern interface when the backend doesn't support VIRTIO_F_VERSION_1. Cc: Cornelia Huck Cc: Marcel

[Qemu-devel] [PATCH] virtio-pci: minor refactoring

2016-09-09 Thread Michael S. Tsirkin
!legacy && !modern is shorter than !(legacy || modern). I also perfer this (less ()s) as a matter of taste. Cc: Greg Kurz Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio/virtio-pci.c b/hw/virtio/virtio-pc

Re: [Qemu-devel] [PATCH] virtio-gpu-pci: tag as not hotpluggable

2016-09-09 Thread Michael S. Tsirkin
On Thu, Sep 08, 2016 at 09:17:17AM +0200, Gerd Hoffmann wrote: > We can't hotplug display adapters in qemu, tag virtio-gpu-pci > accordingly (virtio-vga already has this). > > Signed-off-by: Gerd Hoffmann Acked-by: Michael S. Tsirkin I assume you merged this? > --- > hw/display/virtio-gpu-pc

Re: [Qemu-devel] [V17 0/4] AMD IOMMU

2016-09-09 Thread Michael S. Tsirkin
On Wed, Aug 31, 2016 at 07:17:39PM +0300, David Kiarie wrote: > Hi all, > > This patchset adds basic AMD IOMMU emulation support to Qemu. Jan, Igor, any comments on this one? I suspect it's time we merged this and followed-up upstream. > Changes since v16 - this is mainly supposed to come as a

Re: [Qemu-devel] [v3 0/6] AMD IOMMU

2016-09-09 Thread Michael S. Tsirkin
On Wed, Aug 31, 2016 at 07:25:11PM +0300, David Kiarie wrote: > Hello all, > > Changes since V2 > -formating fixes. > -fixed an issue where the right IOAPIC id was not being correctly set when > using kernel_irqchip=off > > The following patchset implements AMD-Vi interrupt remapping logic a

Re: [Qemu-devel] [PATCH v3 00/34] cmpxchg-based emulation of atomics

2016-09-09 Thread Alex Bennée
Richard Henderson writes: > Changes since v2: > * Fix build for 32-bit host without 64-bit atomics. > Tested with --extra-cflags='-march=-i486'. > This is patch 15, which might ought to get folded back into > patch 13 for bisection, but is ugly for review. Hmm I wonder what's brea

[Qemu-devel] [PATCH] linux-user: Fix incorrect offset of tuc_stack in ARM do_sigframe_return_v2

2016-09-09 Thread Timothy E Baldwin
struct target_ucontext_v2 is not at the begining of the signal frame, therefore do_sigaltstack was being passed bogus arguments. As the offset depends on the type of signal frame fixed by passing in the beginning of the context from do_sigreturn_v2 and do_rt_sigreturn_v2. Suggested-by: Peter Mayd

Re: [Qemu-devel] [PATCH v7 1/4] vfio: Mediated device Core driver

2016-09-09 Thread Alex Williamson
On Fri, 9 Sep 2016 23:18:45 +0530 Kirti Wankhede wrote: > On 9/8/2016 1:39 PM, Jike Song wrote: > > On 08/25/2016 11:53 AM, Kirti Wankhede wrote: > > >> +---+ > >> | | > >> | +---+ | mdev_register_driver() +--+ > >> | | | +<-

Re: [Qemu-devel] [RFC] virtio-bus: Plug devices after features are negotiated

2016-09-09 Thread Michael S. Tsirkin
On Fri, Sep 09, 2016 at 06:16:27PM +0200, Maxime Coquelin wrote: > > > On 09/09/2016 05:39 PM, Michael S. Tsirkin wrote: > > On Fri, Sep 09, 2016 at 04:14:59PM +0200, Maxime Coquelin wrote: > > > > Currently, devices are plugged before features are negotiated. > > > > If the backend doesn't suppo

Re: [Qemu-devel] [PATCH] tests/acpi: speedup acpi tests

2016-09-09 Thread Michael S. Tsirkin
On Tue, Sep 06, 2016 at 10:22:26PM +0200, Paolo Bonzini wrote: > > > On 06/09/2016 21:21, Michael S. Tsirkin wrote: > > On Tue, Sep 06, 2016 at 09:11:16PM +0200, Paolo Bonzini wrote: > >> > >> > >> On 06/09/2016 17:51, Michael S. Tsirkin wrote: > Just use "-machine accel=kvm:tcg" and let QEM

[Qemu-devel] kvm test warnings

2016-09-09 Thread Michael S. Tsirkin
I am running make test on a box without kvm, and I am seeing these warnings: GTESTER check-qtest-ppc64 "kvm" accelerator not found. "kvm" accelerator not found. GTESTER check-qtest-x86_64 Could not access KVM kernel module: No such file or directory failed to initialize KVM: No such file or direct

[Qemu-devel] [PATCH v5] migrate: Move max-bandwidth and downtime-limit to migrate_set_parameter

2016-09-09 Thread Ashijeet Acharya
Mark old-commands for speed and downtime as deprecated. Move max-bandwidth and downtime-limit into migrate-set-parameters for setting maximum migration speed and expected downtime limit parameters respectively. Change downtime units to milliseconds (only for new-command) and update the query part i

Re: [Qemu-devel] [PATCH v3 00/34] cmpxchg-based emulation of atomics

2016-09-09 Thread Richard Henderson
On 09/09/2016 11:33 AM, Alex Bennée wrote: Richard Henderson writes: Changes since v2: * Fix build for 32-bit host without 64-bit atomics. Tested with --extra-cflags='-march=-i486'. This is patch 15, which might ought to get folded back into patch 13 for bisection, but is ugly f

[Qemu-devel] [PATCH] migrate: Fix bounds check for migration parameters in migration.c

2016-09-09 Thread Ashijeet Acharya
This patch fixes the out-of-bounds check migration parameters in qmp_migrate_set_parameters() for cpu-throttle-initial and cpu-throttle-increment by adding a return statement for both. Due to the missing return statements, parmaters were getting set to out-of-bounds values despite the error. Signe

Re: [Qemu-devel] [PATCH v7] docs: add cpu-hotplug.txt

2016-09-09 Thread Eduardo Habkost
On Wed, Sep 07, 2016 at 09:52:59AM +0800, Dou Liyang wrote: [...] > > > > The option: > > -smp MODEL,+FOO,+BAR > > I guess you may mean "-cpu", not "-smp" Oops, yes. Thanks. :) > > > is internally translated to: > > -global MODEL.FOO=on > > -global MODEL.BAR=on > > in addition to setting

Re: [Qemu-devel] kvm test warnings

2016-09-09 Thread Thomas Huth
On 09.09.2016 21:03, Michael S. Tsirkin wrote: > I am running make test on a box without kvm, and I am seeing these warnings: > > GTESTER check-qtest-ppc64 > "kvm" accelerator not found. > "kvm" accelerator not found. > GTESTER check-qtest-x86_64 > Could not access KVM kernel module: No such file

Re: [Qemu-devel] [PATCH v3 00/34] cmpxchg-based emulation of atomics

2016-09-09 Thread Alex Bennée
Richard Henderson writes: > On 09/09/2016 11:33 AM, Alex Bennée wrote: >> >> Richard Henderson writes: >> >>> Changes since v2: >>> * Fix build for 32-bit host without 64-bit atomics. >>> Tested with --extra-cflags='-march=-i486'. >>> This is patch 15, which might ought to get folded

Re: [Qemu-devel] [PATCH v7 1/4] vfio: Mediated device Core driver

2016-09-09 Thread Kirti Wankhede
On 9/10/2016 12:12 AM, Alex Williamson wrote: > On Fri, 9 Sep 2016 23:18:45 +0530 > Kirti Wankhede wrote: > >> On 9/8/2016 1:39 PM, Jike Song wrote: >>> On 08/25/2016 11:53 AM, Kirti Wankhede wrote: >> +---+ | | | +---+ | mdev_register_driv

Re: [Qemu-devel] [PATCH] linux-user: Fix incorrect offset of tuc_stack in ARM do_sigframe_return_v2

2016-09-09 Thread Peter Maydell
On 9 September 2016 at 19:35, Timothy E Baldwin wrote: > struct target_ucontext_v2 is not at the begining of the signal frame, > therefore do_sigaltstack was being passed bogus arguments. > > As the offset depends on the type of signal frame fixed by passing in the > beginning of the context from

Re: [Qemu-devel] [PATCH v3 00/34] cmpxchg-based emulation of atomics

2016-09-09 Thread Richard Henderson
On 09/09/2016 12:29 PM, Alex Bennée wrote: config-temp/qemu-conf.c: In function 'main': config-temp/qemu-conf.c:12:8: error: unused variable 'is_host64' [-Werror=unused-variable] cc1: all warnings being treated as errors Ah hah. All I needed was a compiler without __atomic support. I thought

Re: [Qemu-devel] [PATCH v3 00/34] cmpxchg-based emulation of atomics

2016-09-09 Thread Richard Henderson
On 09/09/2016 12:29 PM, Alex Bennée wrote: config-temp/qemu-conf.c:12:8: error: unused variable 'is_host64' [-Werror=unused-variable] cc1: all warnings being treated as errors Try this. r~ diff --git a/configure b/configure index 519de5d..bd59cdd 100755 --- a/configure +++ b/configure @@ -

Re: [Qemu-devel] [PATCH] migrate: Fix bounds check for migration parameters in migration.c

2016-09-09 Thread Eric Blake
On 09/09/2016 02:14 PM, Ashijeet Acharya wrote: > This patch fixes the out-of-bounds check migration parameters in > qmp_migrate_set_parameters() for cpu-throttle-initial and > cpu-throttle-increment by adding a return statement for both. > Due to the missing return statements, parmaters were getti

Re: [Qemu-devel] [PATCH v3 05/34] int128: Add int128_make128

2016-09-09 Thread Richard Henderson
On 09/09/2016 06:01 AM, Leon Alrae wrote: This causes build failures for me on CentOS6.5: /user/lea/dev/qemu/include/qemu/int128.h:7: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Int128’ /user/lea/dev/qemu/include/qemu/int128.h:9: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__at

[Qemu-devel] [PULL 01/14] virtio: Tell the user what went wrong when event_notifier_init failed

2016-09-09 Thread Michael S. Tsirkin
From: Thomas Huth event_notifier_init() can fail in real life, for example when there are not enough open file handles available (EMFILE) when using a lot of devices. So instead of leaving the average user with a cryptic error number only, print out a proper error message with strerror() instead,

[Qemu-devel] [PULL 03/14] pc: Add 2.8 machine

2016-09-09 Thread Michael S. Tsirkin
From: "Longpeng(Mike)" This will used by the next patch. Signed-off-by: Longpeng(Mike) Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/i386/pc.h | 3 +++ hw/i386/pc_piix.c| 16 +--- hw/i386/pc_q35.c | 13 +++-- 3 files changed, 27

[Qemu-devel] [PULL 14/14] tests/acpi: speedup acpi tests

2016-09-09 Thread Michael S. Tsirkin
From: Marcel Apfelbaum Use kvm acceleration if available. Disable kernel-irqchip and use qemu64 cpu for both kvm and tcg cases. Using kvm acceleration saves about a second and disabling kernel-irqchip has no visible performance impact. Acked-by: Michael S. Tsirkin Signed-off-by: Marcel Apfelba

[Qemu-devel] [PULL 00/14] virtio,vhost,pc: fixes and updates

2016-09-09 Thread Michael S. Tsirkin
The following changes since commit c2a57aae9a1c3dd7de77daf5478df10379aeeebf: Merge remote-tracking branch 'remotes/famz/tags/docker-pull-request' into staging (2016-09-09 12:49:41 +0100) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upst

[Qemu-devel] [PULL 02/14] virtio-pci: use size from correct structure

2016-09-09 Thread Michael S. Tsirkin
PIO MR registration should use size from the correct notify struct. Doesn't affect any visible behaviour because the field values are the same (both are 4). Signed-off-by: Michael S. Tsirkin --- hw/virtio/virtio-pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/virtio/

[Qemu-devel] [PATCH v3] migrate: Fix bounds check for migration parameters in migration.c

2016-09-09 Thread Ashijeet Acharya
This patch fixes the out-of-bounds check of migration parameters in qmp_migrate_set_parameters() for cpu-throttle-initial and cpu-throttle-increment by adding a return statement for both as they were broken since their introduction in 2.5 via commit 1626fee. Due to the missing return statements, pa

[Qemu-devel] [PULL 05/14] virtio-pci: reduce modern_mem_bar size

2016-09-09 Thread Michael S. Tsirkin
From: Marcel Apfelbaum Currently each VQ Notification Virtio Capability is allocated on a different page. The idea is to enable split drivers within guests, however there are no known plans to do that. The allocation will result in a 8MB BAR, more than various guest firmwares pre-allocates for PC

[Qemu-devel] [PULL 04/14] target-i386: present virtual L3 cache info for vcpus

2016-09-09 Thread Michael S. Tsirkin
From: "Longpeng(Mike)" Some software algorithms are based on the hardware's cache info, for example, for x86 linux kernel, when cpu1 want to wakeup a task on cpu2, cpu1 will trigger a resched IPI and told cpu2 to do the wakeup if they don't share low level cache. Oppositely, cpu1 will access cpu2

[Qemu-devel] [PULL 11/14] vhost: don't set vring call if no vector

2016-09-09 Thread Michael S. Tsirkin
From: Jason Wang We used to set vring call fd unconditionally even if guest driver does not use MSIX for this vritqueue at all. This will cause lots of unnecessary userspace access and other checks for drivers does not use interrupt at all (e.g virtio-net pmd). So check and clean vring call fd if

[Qemu-devel] [PULL 06/14] virtio: zero vq->inuse in virtio_reset()

2016-09-09 Thread Michael S. Tsirkin
From: Stefan Hajnoczi vq->inuse must be zeroed upon device reset like most other virtqueue fields. In theory, virtio_reset() just needs assert(vq->inuse == 0) since devices must clean up in-flight requests during reset (requests cannot not be leaked!). In practice, it is difficult to achieve vq

Re: [Qemu-devel] [PATCH v2] migrate: Fix bounds check for migration parameters in migration.c

2016-09-09 Thread Ashijeet Acharya
On Sat, Sep 10, 2016 at 2:03 AM, Ashijeet Acharya wrote: > This patch fixes the out-of-bounds check of migration parameters in > qmp_migrate_set_parameters() for cpu-throttle-initial and > cpu-throttle-increment by adding a return statement for both as they > were broken since their introduction

[Qemu-devel] [PULL 07/14] virtio-balloon: discard virtqueue element on reset

2016-09-09 Thread Michael S. Tsirkin
From: Ladi Prosek The one pending element is being freed but not discarded on device reset, which causes svq->inuse to creep up, eventually hitting the "Virtqueue size exceeded" error. Properly discarding the element on device reset makes sure that its buffers are unmapped and the inuse counter

[Qemu-devel] [PATCH v2] migrate: Fix bounds check for migration parameters in migration.c

2016-09-09 Thread Ashijeet Acharya
This patch fixes the out-of-bounds check of migration parameters in qmp_migrate_set_parameters() for cpu-throttle-initial and cpu-throttle-increment by adding a return statement for both as they were broken since their introduction in 2.5 via commit 1626fee. Due to the missing return statements, p

<    1   2   3   >