[Qemu-devel] [PULL v2 03/34] vhost-user-blk: introduce a new vhost-user-blk host device

2018-01-16 Thread Michael S. Tsirkin
From: Changpeng Liu This commit introduces a new vhost-user device for block, it uses a chardev to connect with the backend, same with Qemu virito-blk device, Guest OS still uses the virtio-blk frontend driver. To use it, start QEMU with command line like this: qemu-system-x86_64 \ -chardev

[Qemu-devel] [PULL v2 15/34] hw/acpi-build: Make next_base easy to follow

2018-01-16 Thread Michael S. Tsirkin
From: Dou Liyang It may be hard to read the assignment statement of "next_base", so S/next_base += (1ULL << 32) - pcms->below_4g_mem_size; /next_base = mem_base + mem_len; ... for readability. No functionality change. Signed-off-by: Dou Liyang Reviewed-by: Igor Mammedov Reviewed-by: Michae

[Qemu-devel] [PULL v2 06/34] qemu: add a cleanup callback function to EventNotifier

2018-01-16 Thread Michael S. Tsirkin
From: Gal Hammer Adding a cleanup callback function to the EventNotifier struct which allows users to execute event_notifier_cleanup in a different context. Signed-off-by: Gal Hammer Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/qemu/event_notifier.h | 1 + ut

[Qemu-devel] [PULL v2 19/34] vhost-user-test: make features mask an init_virtio_dev() argument

2018-01-16 Thread Michael S. Tsirkin
From: Maxime Coquelin The goal is to generalize the use of [un]init_virtio_dev() to all tests, which does not necessarily expose the same features set. Signed-off-by: Maxime Coquelin Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marc-André Lureau --- tests/v

[Qemu-devel] [PULL v2 04/34] contrib/libvhost-user: enable virtio config space messages

2018-01-16 Thread Michael S. Tsirkin
From: Changpeng Liu Enable VHOST_USER_GET_CONFIG/VHOST_USER_SET_CONFIG messages in libvhost-user library, users can implement their own I/O target based on the library. This enable the virtio config space delivered between QEMU host device and the I/O target. Signed-off-by: Changpeng Liu Review

[Qemu-devel] [PULL v2 07/34] virtio: postpone the execution of event_notifier_cleanup function

2018-01-16 Thread Michael S. Tsirkin
From: Gal Hammer Use the EventNotifier's cleanup callback function to execute the event_notifier_cleanup function after kvm unregistered the eventfd. This change supports running the virtio_bus_set_host_notifier function inside a memory region transaction. Otherwise, a closed fd is sent to kvm,

[Qemu-devel] [PULL v2 16/34] vhost-user-test: fix features mask

2018-01-16 Thread Michael S. Tsirkin
From: Maxime Coquelin VIRTIO_NET_F_MAC is a bit position, not a bit mask. Signed-off-by: Maxime Coquelin Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marc-André Lureau --- tests/vhost-user-test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff -

[Qemu-devel] [PULL v2 24/34] x86_iommu: Move machine check to x86_iommu_realize()

2018-01-16 Thread Michael S. Tsirkin
From: Mohammed Gamal Instead of having the same error checks in vtd_realize() and amdvi_realize(), move that over to the generic x86_iommu_realize(). Reviewed-by: Peter Xu Reviewed-by: Eduardo Habkost Signed-off-by: Mohammed Gamal Reviewed-by: Thomas Huth --- hw/i386/amd_iommu.c | 13 ++--

[Qemu-devel] [PULL v2 08/34] virtio: improve virtio devices initialization time

2018-01-16 Thread Michael S. Tsirkin
From: Gal Hammer The loading time of a VM is quite significant when its virtio devices use a large amount of virt-queues (e.g. a virtio-serial device with max_ports=511). Most of the time is spend in the creation of all the required event notifiers (ioeventfd and memory regions). This patch pack

[Qemu-devel] [PULL v2 11/34] intel-iommu: Redefine macros to enable supporting 48 bit address width

2018-01-16 Thread Michael S. Tsirkin
From: Prasad Singamsetty The current implementation of Intel IOMMU code only supports 39 bits host/iova address width so number of macros use hard coded values based on that. This patch is to redefine them so they can be used with variable address widths. This patch doesn't add any new functional

[Qemu-devel] [PULL v2 28/34] tests: acpi: rename test_acpi_tables()/test_dst_table() to reflect its usage

2018-01-16 Thread Michael S. Tsirkin
From: Igor Mammedov Main purpose of test_dst_table() is loading a table from QEMU with checking that checksum in header matches actual one, rename it reflect main action it performs. Likewise test_acpi_tables() name is to broad, while the function only loads tables referenced by RSDT, rename it

[Qemu-devel] [PULL v2 05/34] contrib/vhost-user-blk: introduce a vhost-user-blk sample application

2018-01-16 Thread Michael S. Tsirkin
From: Changpeng Liu This commit introduces a vhost-user-blk backend device, it uses UNIX domain socket to communicate with QEMU. The vhost-user-blk sample application should be used with QEMU vhost-user-blk-pci device. To use it, complie with: make vhost-user-blk and start like this: vhost-user

[Qemu-devel] [PULL v2 21/34] vhost: Build temporary section list and deref after commit

2018-01-16 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" Igor spotted that there's a race, where a region that's unref'd in a _del callback might be free'd before the set_mem_table call in the _commit callback, and thus the vhost might end up using free memory. Fix this by building a complete temporary sections list, ref

[Qemu-devel] [PULL v2 14/34] ACPI/unit-test: Add a testcase for RAM allocation in numa node

2018-01-16 Thread Michael S. Tsirkin
From: Dou Liyang As QEMU supports the memory-less node, it is possible that there is no RAM in the first numa node(also be called as node0). eg: ... \ -m 128,slots=3,maxmem=1G \ -numa node -numa node,mem=128M \ But, this makes it hard for QEMU to build a known-to-work ACPI SRAT table. Only

[Qemu-devel] [PULL v2 12/34] intel-iommu: Extend address width to 48 bits

2018-01-16 Thread Michael S. Tsirkin
From: Prasad Singamsetty The current implementation of Intel IOMMU code only supports 39 bits iova address width. This patch provides a new parameter (x-aw-bits) for intel-iommu to extend its address width to 48 bits but keeping the default the same (39 bits). The reason for not changing the defa

[Qemu-devel] [PULL v2 23/34] vhost: Merge sections added to temporary list

2018-01-16 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" As sections are reported by the listener to the _nop and _add methods, add them to the temporary section list but now merge them with the previous section if the new one abuts and the backend allows. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Michael S. Ts

[Qemu-devel] [PULL v2 13/34] hw/pci-bridge: fix QEMU crash because of pcie-root-port

2018-01-16 Thread Michael S. Tsirkin
From: Marcel Apfelbaum If we try to use more pcie_root_ports then available slots and an IO hint is passed to the port, QEMU crashes because we try to init the "IO hint" capability even if the device is not created. Fix it by checking for error before adding the capability, so QEMU can fail grace

[Qemu-devel] [PULL v2 29/34] tests: acpi: add comments to fetch_rsdt_referenced_tables/data->tables usage

2018-01-16 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/bios-tables-test.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c index 1314ad8..b354aaa 100644 --- a/tests/

[Qemu-devel] [PULL v2 18/34] vhost-user-test: setup virtqueues in all tests

2018-01-16 Thread Michael S. Tsirkin
From: Maxime Coquelin Only the multiqueue test setups the virtqueues. This patch generalizes the setup of virtqueues for all tests. Signed-off-by: Maxime Coquelin Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marc-André Lureau --- tests/vhost-user-test.c | 5

[Qemu-devel] [PULL v2 17/34] vhost-user-test: extract read-guest-mem test from main loop

2018-01-16 Thread Michael S. Tsirkin
From: Maxime Coquelin This patch makes read-guest-test consistent with other tests, i.e. create the test server in the test function. Reviewed-by: Marc-André Lureau Signed-off-by: Maxime Coquelin Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/vhost-user-test.c |

[Qemu-devel] [PULL v2 30/34] vhost-user: factor out msg head and payload

2018-01-16 Thread Michael S. Tsirkin
split header and payload into separate structures, to enable easier handling of alignment issues. Signed-off-by: Michael S. Tsirkin --- hw/virtio/vhost-user.c | 198 + 1 file changed, 101 insertions(+), 97 deletions(-) diff --git a/hw/virtio/vhost

[Qemu-devel] [PULL v2 25/34] x86_iommu: check if machine has PCI bus

2018-01-16 Thread Michael S. Tsirkin
From: Mohammed Gamal Starting qemu with qemu-system-x86_64 -S -M isapc -device {amd|intel}-iommu leads to a segfault. The code assume PCI bus is present and tries to access the bus structure without checking. Since Intel VT-d and AMDVI should only work with PCI, add a check for PCI bus and retur

[Qemu-devel] [PULL v2 20/34] vhost-user-test: use init_virtio_dev in multiqueue test

2018-01-16 Thread Michael S. Tsirkin
From: Maxime Coquelin Now that init_virtio_dev() has been generalized to all cases, use it in test_multiqueue() to avoid code duplication. Signed-off-by: Maxime Coquelin Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marc-André Lureau --- tests/vhost-user-tes

[Qemu-devel] [PATCH v6 5/7] vhost: Clean out old vhost_set_memory and friends

2018-01-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Remove the old update mechanism, vhost_set_memory, and the functions and flags it used. Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/vhost.c | 251 -- include/hw/virtio/vhost.h | 3 - 2 files changed, 2

[Qemu-devel] [PULL v2 26/34] tests: acpi: move tested tables array allocation outside of test_acpi_dsdt_table()

2018-01-16 Thread Michael S. Tsirkin
From: Igor Mammedov at best it's confusing that array for list of tables to be tested against reference tables is allocated within test_acpi_dsdt_table() and at worst it would just overwrite list of tables if they were added before test_acpi_dsdt_table(). Move array initialization to test_acpi_on

[Qemu-devel] [PULL v2 22/34] vhost: Simplify ring verification checks

2018-01-16 Thread Michael S. Tsirkin
From: "Dr. David Alan Gilbert" vhost_verify_ring_mappings() were used to verify that rings are still accessible and related memory hasn't been moved after flatview is updated. It was doing checks by mapping ring's GPA+len and checking that HVA hadn't changed with new memory map. To avoid maybe e

[Qemu-devel] [PULL v2 31/34] vhost-user: fix misaligned access to payload

2018-01-16 Thread Michael S. Tsirkin
We currently take a pointer to a misaligned field of a packed structure. clang reports this as a build warning. A fix is to keep payload in a separate structure, and access is it from there using a vectored write. Signed-off-by: Michael S. Tsirkin --- hw/virtio/vhost-user.c | 39

[Qemu-devel] [PATCH v6 7/7] vhost: Move log_dirty check

2018-01-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Move the log_dirty check into vhost_section. Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/trace-events | 1 + hw/virtio/vhost.c | 20 +--- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/hw/virtio/trace-events b/hw/vir

[Qemu-devel] [PULL v2 27/34] tests: acpi: init table descriptor in test_dst_table()

2018-01-16 Thread Michael S. Tsirkin
From: Igor Mammedov remove code duplication and make sure that table descriptor passed in for initialization is in expected state. Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/bios-tables-test.c | 4 +--- 1 file changed, 1 insertion

Re: [Qemu-devel] [PATCH] chardev/char-socket: add POLLHUP handler

2018-01-16 Thread Marc-André Lureau
Hi On Wed, Jan 10, 2018 at 2:18 PM, Klim Kireev wrote: > The following behavior was observed for QEMU configured by libvirt > to use guest agent as usual for the guests without virtio-serial > driver (Windows or the guest remaining in BIOS stage). > > In QEMU on first connect to listen character

[Qemu-devel] [PULL v2 34/34] vhost: used_memslots refactoring

2018-01-16 Thread Michael S. Tsirkin
From: Jay Zhou Used_memslots is shared by vhost kernel and user, it is equal to dev->mem->nregions, which is correct for vhost kernel, but not for vhost user, the latter one uses memory regions that have file descriptor. E.g. a VM has a vhost-user NIC and 8(vhost user memslot upper limit) memory

[Qemu-devel] [PULL v2 32/34] vhost: remove assertion to prevent crash

2018-01-16 Thread Michael S. Tsirkin
From: Jay Zhou QEMU will assert on vhost-user backed virtio device hotplug if QEMU is using more RAM regions than VHOST_MEMORY_MAX_NREGIONS (for example if it were started with a lot of DIMM devices). Fix it by returning error instead of asserting and let callers of vhost_set_mem_table() handle

[Qemu-devel] [PATCH v6 1/7] vhost: Build temporary section list and deref after commit

2018-01-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Igor spotted that there's a race, where a region that's unref'd in a _del callback might be free'd before the set_mem_table call in the _commit callback, and thus the vhost might end up using free memory. Fix this by building a complete temporary sections list, ref

[Qemu-devel] [PULL v2 33/34] vhost: fix memslot limit check

2018-01-16 Thread Michael S. Tsirkin
From: Jay Zhou Since used_memslots will be updated to the actual value after registering memory listener for the first time, move the memslots limit checking to the right place. Reviewed-by: Igor Mammedov Signed-off-by: Jay Zhou Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirki

Re: [Qemu-devel] [PATCH] chardev/char-socket: add POLLHUP handler

2018-01-16 Thread Daniel P. Berrange
On Tue, Jan 16, 2018 at 06:56:20PM +0100, Marc-André Lureau wrote: > Hi > > On Wed, Jan 10, 2018 at 2:18 PM, Klim Kireev > wrote: > > The following behavior was observed for QEMU configured by libvirt > > to use guest agent as usual for the guests without virtio-serial > > driver (Windows or the

[Qemu-devel] [PATCH v6 2/7] vhost: Simplify ring verification checks

2018-01-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" vhost_verify_ring_mappings() were used to verify that rings are still accessible and related memory hasn't been moved after flatview is updated. It was doing checks by mapping ring's GPA+len and checking that HVA hadn't changed with new memory map. To avoid maybe e

[Qemu-devel] [PATCH v6 0/7] Rework vhost memory region updates

2018-01-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Hi, This patch set reworks the way the vhost code handles changes in physical address space layout that came from a discussion with Igor. Its intention is to simplify a lot of the update code, and to make it easier for the postcopy+shared code to do the hugepage

Re: [Qemu-devel] [PATCH 0/4] Implements the Windows Hypervisor Platform accelerator

2018-01-16 Thread Justin Terry (VM) via Qemu-devel
Hey Stefan, Thanks for the feedback. I really apologize I forgot to run the checkpath.pl script before submission. I have fixed up all the issues and will send them in patch v2 once I fixup the other feedback. Thanks, Justin -Original Message- From: Stefan Weil [mailto:s...@weilnetz.de

[Qemu-devel] [PATCH v6 6/7] vhost: Merge and delete unused callbacks

2018-01-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Now that the olf vhost_set_memory code is gone, the _nop and _add callbacks are identical and can be merged. The _del callback is no longer needed. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Igor Mammedov --- hw/virtio/vhost.c | 33 +

[Qemu-devel] [PATCH v6 3/7] vhost: Merge sections added to temporary list

2018-01-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" As sections are reported by the listener to the _nop and _add methods, add them to the temporary section list but now merge them with the previous section if the new one abuts and the backend allows. Signed-off-by: Dr. David Alan Gilbert Reviewed-by: Igor Mammedov

[Qemu-devel] [PATCH v6 4/7] vhost: Regenerate region list from changed sections list

2018-01-16 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" Compare the sections list that's just been generated, and if it's different from the old one regenerate the region list. Signed-off-by: Dr. David Alan Gilbert --- hw/virtio/trace-events | 1 + hw/virtio/vhost.c | 39 +++

Re: [Qemu-devel] [PATCH v3 4/8] s390-ccw: interactive boot menu for eckd dasd (menu setup)

2018-01-16 Thread Thomas Huth
On 15.01.2018 17:44, Collin L. Walling wrote: > Reads boot menu flag and timeout values from the iplb and > sets the respective fields for the menu. > > Signed-off-by: Collin L. Walling > --- [...] > diff --git a/pc-bios/s390-ccw/iplb.h b/pc-bios/s390-ccw/iplb.h > index fe909d2..da29e6e 100644 >

Re: [Qemu-devel] [PATCH 0/4] Implements the Windows Hypervisor Platform accelerator

2018-01-16 Thread Justin Terry (VM) via Qemu-devel
Hey Stefan, Again thanks for the feedback. The short answer is that it will be first available on an Windows 10 Insider Preview release: https://www.microsoft.com/en-us/software-download/windowsinsiderpreviewSDK. I just don’t know which one exactly. When this is released I will for sure update

Re: [Qemu-devel] [RFC PATCH 01/10] block/qapi: Introduce BlockdevCreateOptions

2018-01-16 Thread Eric Blake
On 01/11/2018 01:52 PM, Kevin Wolf wrote: > This creates a BlockdevCreateOptions union type that will contain all of > the options for image creation. We'll start out with an empty struct > type BlockdevCreateDummy for all drivers. > > Signed-off-by: Kevin Wolf > --- > qapi/block-core.json | 64

Re: [Qemu-devel] [PULL v2 0/4] tcg queued patches

2018-01-16 Thread Peter Maydell
On 16 January 2018 at 16:45, Richard Henderson wrote: > With comments addressed from v1. > > > r~ > > > > The following changes since commit aae39d24a387a273deab3eb930dbf730aa379e22: > > Merge remote-tracking branch > 'remotes/pmaydell/tags/pull-target-

Re: [Qemu-devel] [RFC PATCH 02/10] block/qapi: Add qcow2 create options to schema

2018-01-16 Thread Eric Blake
On 01/11/2018 01:52 PM, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > qapi/block-core.json | 33 - > 1 file changed, 32 insertions(+), 1 deletion(-) > > diff --git a/qapi/block-core.json b/qapi/block-core.json > index 1749376c61..9341f6708d 100644 > --- a/

Re: [Qemu-devel] [RFC PATCH 03/10] qcow2: Let qcow2_create() handle protocol layer

2018-01-16 Thread Eric Blake
On 01/11/2018 01:52 PM, Kevin Wolf wrote: > Currently, qcow2_create() only parses the QemuOpts and then calls > qcow2_create2() for the actual image creation, which includes both the > creation of the actual file on the file system and writing a valid empty > qcow2 image into that file. > > The pl

Re: [Qemu-devel] [PATCH] hw/pci-bridge: fix QEMU crash because of pcie-root-port

2018-01-16 Thread Laszlo Ersek
On 01/15/18 17:31, Marcel Apfelbaum wrote: > On 15/01/2018 17:54, Laszlo Ersek wrote: >> On 01/10/18 20:09, Marcel Apfelbaum wrote: >>> If we try to use more pcie_root_ports then available slots >>> and an IO hint is passed to the port, QEMU crashes because >>> we try to init the "IO hint" capabili

Re: [Qemu-devel] [PATCH v6 0/3] vhost: two fixes and used_memslots refactoring

2018-01-16 Thread Michael S. Tsirkin
On Tue, Jan 16, 2018 at 08:17:54AM +, Zhoujian (jay) wrote: > > -Original Message- > > From: Michael S. Tsirkin [mailto:m...@redhat.com] > > Sent: Tuesday, January 16, 2018 12:42 PM > > To: Zhoujian (jay) > > Cc: qemu-devel@nongnu.org; imamm...@redhat.com; Huangweidong (C) > > ; wangxi

Re: [Qemu-devel] [RFC PATCH 04/10] qcow2: Pass BlockdevCreateOptions to qcow2_create2()

2018-01-16 Thread Eric Blake
On 01/11/2018 01:52 PM, Kevin Wolf wrote: > All of the simple options are now passed to qcow2_create2() in a > BlockdevCreateOptions object. Still missing: node-name and the > encryption options. > > Signed-off-by: Kevin Wolf > --- > block/qcow2.c | 186 > +++

Re: [Qemu-devel] [PULL 09/27] migration: calculate vCPU blocktime on dst side

2018-01-16 Thread Alexey Perevalov
On 01/16/2018 08:43 PM, Dr. David Alan Gilbert wrote: * Max Reitz (mre...@redhat.com) wrote: On 2018-01-15 12:52, Juan Quintela wrote: From: Alexey Perevalov This patch provides blocktime calculation per vCPU, as a summary and as a overlapped value for all vCPUs. This approach was suggested

Re: [Qemu-devel] [PATCH] xilinx_spips: Correct usage of an uninitialized local variable

2018-01-16 Thread francisco iglesias
On Tuesday, 16 January 2018, Peter Maydell wrote: > On 14 January 2018 at 22:55, Francisco Iglesias > wrote: > > Coverity found that the variable tx_rx in the function > > xilinx_spips_flush_txfifo was being used uninitialized (CID 1383841). > This > > patch corrects this by always initializing

Re: [Qemu-devel] [RFC PATCH 05/10] qcow2: Use BlockdevRef in qcow2_create2()

2018-01-16 Thread Eric Blake
On 01/11/2018 01:52 PM, Kevin Wolf wrote: > Instead of passing a separate BlockDriverState* into qcow2_create2(), > make use of the BlockdevRef that is included in BlockdevCreateOptions. > > Signed-off-by: Kevin Wolf > --- > include/block/block.h | 1 + > block.c | 39

Re: [Qemu-devel] [PATCH] LEON3 IRQMP: Fix IRQ software ack

2018-01-16 Thread Mark Cave-Ayland
On 16/01/18 10:21, Fabien Chouteau wrote: On 15/01/2018 19:16, Mark Cave-Ayland wrote: On 11/01/18 11:48, Fabien Chouteau wrote: On 10/01/2018 21:43, Jean-Christophe Dubois wrote: With the LEON3 IRQ controller IRQs can be acknoledged 2 ways: * Explicitely by software writing to the CLEAR_OFF

Re: [Qemu-devel] [RFC PATCH 06/10] qcow2: Use QCryptoBlockCreateOptions in qcow2_create2()

2018-01-16 Thread Eric Blake
On 01/11/2018 01:52 PM, Kevin Wolf wrote: > Instead of passing the encryption format name and the QemuOpts down, use > the QCryptoBlockCreateOptions contained in BlockdevCreateOptions. > > Signed-off-by: Kevin Wolf > --- > block/qcow2.c | 62 > +++

Re: [Qemu-devel] [qemu-s390x] [PATCH v3 4/8] s390-ccw: interactive boot menu for eckd dasd (menu setup)

2018-01-16 Thread Collin L. Walling
On 01/16/2018 01:23 PM, Thomas Huth wrote: On 15.01.2018 17:44, Collin L. Walling wrote: Reads boot menu flag and timeout values from the iplb and sets the respective fields for the menu. Signed-off-by: Collin L. Walling --- [...] diff --git a/pc-bios/s390-ccw/iplb.h b/pc-bios/s390-ccw/iplb.

Re: [Qemu-devel] [RFC PATCH 07/10] qcow2: Handle full/falloc preallocation in qcow2_create2()

2018-01-16 Thread Eric Blake
On 01/11/2018 01:52 PM, Kevin Wolf wrote: > Once qcow2_create2() can be called directly on an already existing node, > we must provide the 'full' and 'falloc' preallocation modes outside of > creating the image on the protocol layer. Fortunately, we have > preallocated truncate now which can provid

Re: [Qemu-devel] [RFC PATCH 08/10] util: Add qemu_opts_to_qdict_filtered()

2018-01-16 Thread Eric Blake
On 01/11/2018 01:52 PM, Kevin Wolf wrote: > This allows, given a QemuOpts for a QemuOptsList that was merged from > multiple QemuOptsList, to only consider those options that exist in one > specific list. Block drivers need this to separate format-layer create > options from protocol-level options.

Re: [Qemu-devel] [RFC PATCH 01/10] block/qapi: Introduce BlockdevCreateOptions

2018-01-16 Thread Kevin Wolf
Am 16.01.2018 um 19:54 hat Eric Blake geschrieben: > On 01/11/2018 01:52 PM, Kevin Wolf wrote: > > This creates a BlockdevCreateOptions union type that will contain all of > > the options for image creation. We'll start out with an empty struct > > type BlockdevCreateDummy for all drivers. > > > >

Re: [Qemu-devel] [RFC PATCH 09/10] qcow2: Use visitor for options in qcow2_create()

2018-01-16 Thread Eric Blake
On 01/11/2018 01:52 PM, Kevin Wolf wrote: > Signed-off-by: Kevin Wolf > --- > block/qcow2.c | 227 > ++--- > tests/qemu-iotests/049.out | 10 +- > 2 files changed, 93 insertions(+), 144 deletions(-) > > +/* Only the keyval visitor supp

Re: [Qemu-devel] [PATCH] sun4u: implement power device

2018-01-16 Thread Mark Cave-Ayland
On 16/01/18 00:54, Philippe Mathieu-Daudé wrote: CC'ing PCI maintainers. Hi Mark, On 01/15/2018 05:58 PM, Mark Cave-Ayland wrote: This inbuilt device contains a single 4-byte register, of which bit 24 is used to power down the machine on a real Ultra 5. The power device exists at offset 0x72

Re: [Qemu-devel] [PATCH] sun4u: implement power device

2018-01-16 Thread Mark Cave-Ayland
On 16/01/18 14:23, Marcel Apfelbaum wrote: Hi Philippe, On 16/01/2018 2:54, Philippe Mathieu-Daudé wrote: CC'ing PCI maintainers. Hi Mark, On 01/15/2018 05:58 PM, Mark Cave-Ayland wrote: This inbuilt device contains a single 4-byte register, of which bit 24 is used to power down the machin

Re: [Qemu-devel] [RFC PATCH 10/10] block: x-blockdev-create QMP command

2018-01-16 Thread Eric Blake
On 01/11/2018 01:52 PM, Kevin Wolf wrote: > This adds a synchronous x-blockdev-create QMP command that can create > qcow2 images on a given node name. > > We don't want to block while creating an image, so this is not the final > interface in all aspects, but BlockdevCreateOptionsQcow2 and > .bdrv

Re: [Qemu-devel] [PATCH v2 5/7] target/m68k: add moves

2018-01-16 Thread Richard Henderson
On 01/16/2018 09:48 AM, Laurent Vivier wrote: > Le 15/01/2018 à 19:37, Richard Henderson a écrit : >> On 01/12/2018 04:43 PM, Laurent Vivier wrote: > ... >>> -dc->user = (env->sr & SR_S) == 0; >>> +#if defined(CONFIG_SOFTMMU) >>> +dc->user = (env->sr & SR_S) == 0 ? M68K_USER_FROM_MSR : 0; >

Re: [Qemu-devel] [PATCH v2 1/4] linux-user: Move CPU type name selection to a function

2018-01-16 Thread Richard Henderson
On 01/16/2018 09:25 AM, Laurent Vivier wrote: > Instead of a sequence of "#if ... #endif" move the > selection to a function in linux-user/*/target_elf.h > > We can't add them in linux-user/*/target_cpu.h > because we will need to include "elf.h" to > use ELF flags with eflags, and including > "el

Re: [Qemu-devel] [RFC PATCH 02/10] block/qapi: Add qcow2 create options to schema

2018-01-16 Thread Kevin Wolf
Am 16.01.2018 um 19:59 hat Eric Blake geschrieben: > On 01/11/2018 01:52 PM, Kevin Wolf wrote: > > Signed-off-by: Kevin Wolf > > --- > > qapi/block-core.json | 33 - > > 1 file changed, 32 insertions(+), 1 deletion(-) > > > > diff --git a/qapi/block-core.json b/qa

Re: [Qemu-devel] [PATCH v2 2/4] linux-user: introduce functions to detect CPU type

2018-01-16 Thread Richard Henderson
On 01/16/2018 09:25 AM, Laurent Vivier wrote: > From: YunQiang Su > > Add a function to return ELF e_flags and use it > to select the CPU model. > > [lv: split the patch and some cleanup in get_elf_eflags()] > Signed-off-by: Laurent Vivier > --- > > Notes: > YunQiang Su, please add your Si

Re: [Qemu-devel] QEMU virt board: extending various limits

2018-01-16 Thread Laszlo Ersek
(adding Ard, Igor, Wei, Leif) On 01/16/18 16:07, Peter Maydell wrote: > We've had discussions before about the various limits in the virt > board imposed by its current address space layout: > * number of CPUs limited to 123 (not enough space for more redistributors) > * number of PCIe devices l

Re: [Qemu-devel] [PATCH v2 6/8] docker: add the Fedora 27 base image

2018-01-16 Thread Philippe Mathieu-Daudé
On 01/15/2018 01:38 PM, Philippe Mathieu-Daudé wrote: > On 01/15/2018 01:27 PM, Daniel P. Berrange wrote: >> On Mon, Jan 15, 2018 at 11:34:57AM -0300, Philippe Mathieu-Daudé wrote: >>> straight copy on Fedora 25 base. >>> >>> Suggested-by: Paolo Bonzini >>> Signed-off-by: Philippe Mathieu-Daudé >

Re: [Qemu-devel] [PATCH v2 3/4] linux-user, m68k: select CPU according to ELF header values

2018-01-16 Thread Richard Henderson
On 01/16/2018 09:25 AM, Laurent Vivier wrote: > M680x0 doesn't support the same set of instructions > as ColdFire, so we can't use "any" CPU type to execute > m68020 instructions. > We select CPU type ("m68020" or "any" for ColdFire) > according to the ELF header. If we can't, we > use by default t

Re: [Qemu-devel] [PATCH v2 4/4] linux-user: MIPS set cpu to r6 CPU if binary is R6

2018-01-16 Thread Richard Henderson
On 01/16/2018 09:25 AM, Laurent Vivier wrote: > From: YunQiang Su > > So here we need to detect the version of binaries and set > cpu_model for it. > > [lv: original patch modified to move code into cpu_get_model()] > Signed-off-by: Laurent Vivier > --- Reviewed-by: Richard Henderson > stat

Re: [Qemu-devel] [RFC PATCH 02/10] block/qapi: Add qcow2 create options to schema

2018-01-16 Thread Eric Blake
On 01/16/2018 02:11 PM, Kevin Wolf wrote: >>> +{ 'enum': 'BlockdevQcow2CompatLevel', >>> + 'data': [ '0_10', '1_1' ] } >> >> Enums are allowed to start with digits while struct members are not; so >> you can get away with this naming. Do we really want the names 0_10 and >> 1_1, or are there bet

Re: [Qemu-devel] QEMU virt board: extending various limits

2018-01-16 Thread Ard Biesheuvel
On 16 January 2018 at 20:18, Laszlo Ersek wrote: > (adding Ard, Igor, Wei, Leif) > > On 01/16/18 16:07, Peter Maydell wrote: >> We've had discussions before about the various limits in the virt >> board imposed by its current address space layout: >> * number of CPUs limited to 123 (not enough sp

Re: [Qemu-devel] [PATCH v2 4/4] linux-user: MIPS set cpu to r6 CPU if binary is R6

2018-01-16 Thread Philippe Mathieu-Daudé
On 01/16/2018 02:25 PM, Laurent Vivier wrote: > From: YunQiang Su > > So here we need to detect the version of binaries and set > cpu_model for it. > > [lv: original patch modified to move code into cpu_get_model()] > Signed-off-by: Laurent Vivier > --- > > Notes: > YunQiang Su, please add

Re: [Qemu-devel] [PATCH v2 1/4] linux-user: Move CPU type name selection to a function

2018-01-16 Thread Philippe Mathieu-Daudé
On 01/16/2018 02:25 PM, Laurent Vivier wrote: > Instead of a sequence of "#if ... #endif" move the > selection to a function in linux-user/*/target_elf.h > > We can't add them in linux-user/*/target_cpu.h > because we will need to include "elf.h" to > use ELF flags with eflags, and including > "el

Re: [Qemu-devel] [PATCH v2] file-posix: specify expected filetypes

2018-01-16 Thread Eric Blake
On 01/15/2018 04:50 PM, John Snow wrote: > I don't think there's a legitimate reason to open directories as if > they were files. This prevents QEMU from opening and attempting to probe > a directory inode, which can break in exciting ways. One of those ways > is lseek on ext4/xfs, which will retur

Re: [Qemu-devel] [PATCH v2 2/4] acpi: build QEMU table for PPI virtual memory device

2018-01-16 Thread Laszlo Ersek
On 01/16/18 16:51, Stefan Berger wrote: > To avoid having to hard code the base address of the PPI virtual memory > device we introduce a QEMU ACPI table that holds the base address, if a > TPM 1.2 or 2 is used. This table gives us flexibility to move the base > address later on. > > Signed-off-by

Re: [Qemu-devel] [PATCH v6 4/9] block: treat BDRV_REQ_ALLOCATE as serialising

2018-01-16 Thread Eric Blake
On 01/16/2018 07:04 AM, Anton Nefedov wrote: > The idea is that ALLOCATE requests may overlap with other requests. > Reuse the existing block layer infrastructure for serialising requests. > Use the following approach: > - mark ALLOCATE serialising, so subsequent requests to the area wait > - A

Re: [Qemu-devel] [PATCH v6 9/9] iotest 134: test cluster-misaligned encrypted write

2018-01-16 Thread Eric Blake
On 01/16/2018 07:04 AM, Anton Nefedov wrote: > COW (even empty/zero) areas require encryption too > > Signed-off-by: Anton Nefedov > --- > tests/qemu-iotests/134 | 9 + > tests/qemu-iotests/134.out | 10 ++ > 2 files changed, 19 insertions(+) Reviewed-by: Eric Blake -- E

Re: [Qemu-devel] [PATCH qemu 0/3] spapr/iommu: Enable in-kernel TCE acceleration via VFIO KVM device

2018-01-16 Thread Alex Williamson
On Mon, 15 Jan 2018 15:12:07 +1100 Alexey Kardashevskiy wrote: > On 03/01/18 04:51, Paolo Bonzini wrote: > > On 02/01/2018 06:28, Alexey Kardashevskiy wrote: > >> This is my current queue of the in-kernel TCE acceleration > >> enablement. > >> > >> Changes since > >> https://lists.gnu.org/arch

Re: [Qemu-devel] [PATCH v2 01/32] qcow2: Fix documentation of get_cluster_table()

2018-01-16 Thread Eric Blake
On 12/15/2017 06:53 AM, Alberto Garcia wrote: > This function has not been returning the offset of the L2 table since > commit 3948d1d4876065160583e79533bf604481063833 > > Signed-off-by: Alberto Garcia > --- > block/qcow2-cluster.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > Re

Re: [Qemu-devel] [PATCH v2 02/32] qcow2: Add table size field to Qcow2Cache

2018-01-16 Thread Eric Blake
On 12/15/2017 06:53 AM, Alberto Garcia wrote: > The table size in the qcow2 cache is currently equal to the cluster > size. This doesn't allow us to use the cache memory efficiently, > particularly with large cluster sizes, so we need to be able to have > smaller cache tables that are independent f

Re: [Qemu-devel] [PATCH v2 2/4] acpi: build QEMU table for PPI virtual memory device

2018-01-16 Thread Stefan Berger
On 01/16/2018 03:42 PM, Laszlo Ersek wrote: On 01/16/18 16:51, Stefan Berger wrote: To avoid having to hard code the base address of the PPI virtual memory device we introduce a QEMU ACPI table that holds the base address, if a TPM 1.2 or 2 is used. This table gives us flexibility to move the ba

Re: [Qemu-devel] [PATCH v2 03/32] qcow2: Remove BDS parameter from qcow2_cache_get_table_addr()

2018-01-16 Thread Eric Blake
On 12/15/2017 06:53 AM, Alberto Garcia wrote: > This function was only using the BlockDriverState parameter to get the > cache table size (since it was equal to the cluster size). This is no > longer necessary so this parameter can be removed. > > Signed-off-by: Alberto Garcia > --- > block/qcow

Re: [Qemu-devel] [PATCH v2 04/32] qcow2: Remove BDS parameter from qcow2_cache_get_table_idx()

2018-01-16 Thread Eric Blake
On 12/15/2017 06:53 AM, Alberto Garcia wrote: > This function was only using the BlockDriverState parameter to get the > cache table size (since it was equal to the cluster size). This is no > longer necessary so this parameter can be removed. > > Signed-off-by: Alberto Garcia > --- > block/qcow

Re: [Qemu-devel] [PATCH v2 05/32] qcow2: Remove BDS parameter from qcow2_cache_table_release()

2018-01-16 Thread Eric Blake
On 12/15/2017 06:53 AM, Alberto Garcia wrote: > This function was only using the BlockDriverState parameter to get the > cache table size (since it was equal to the cluster size). This is no > longer necessary so this parameter can be removed. > > Signed-off-by: Alberto Garcia > --- > block/qcow

Re: [Qemu-devel] [PATCH v2 06/32] qcow2: Remove BDS parameter from qcow2_cache_entry_mark_dirty()

2018-01-16 Thread Eric Blake
On 12/15/2017 06:53 AM, Alberto Garcia wrote: > This function was only using the BlockDriverState parameter to pass it > to qcow2_cache_get_table_idx(). This is no longer necessary so this > parameter can be removed. > > Signed-off-by: Alberto Garcia > --- > block/qcow2-cache.c| 3 +-- > bl

Re: [Qemu-devel] [PATCH v2 07/32] qcow2: Remove BDS parameter from qcow2_cache_put()

2018-01-16 Thread Eric Blake
On 12/15/2017 06:53 AM, Alberto Garcia wrote: > This function was only using the BlockDriverState parameter to pass it > to qcow2_cache_get_table_idx(). This is no longer necessary so this > parameter can be removed. > > Signed-off-by: Alberto Garcia > --- > block/qcow2-cache.c| 2 +- > blo

Re: [Qemu-devel] [PATCH v2 08/32] qcow2: Remove BDS parameter from qcow2_cache_destroy()

2018-01-16 Thread Eric Blake
On 12/15/2017 06:53 AM, Alberto Garcia wrote: > This function was never using the BlockDriverState parameter so it can > be safely removed. > > Signed-off-by: Alberto Garcia > --- > block/qcow2-cache.c | 2 +- > block/qcow2.c | 16 > block/qcow2.h | 2 +- > 3 files

Re: [Qemu-devel] [PATCH v2 09/32] qcow2: Remove BDS parameter from qcow2_cache_clean_unused()

2018-01-16 Thread Eric Blake
On 12/15/2017 06:53 AM, Alberto Garcia wrote: > This function was only using the BlockDriverState parameter to pass it > to qcow2_cache_table_release(). This is no longer necessary so this > parameter can be removed. > > Signed-off-by: Alberto Garcia > --- > block/qcow2-cache.c | 2 +- > block/q

Re: [Qemu-devel] [PATCH v2 10/32] qcow2: Remove BDS parameter from qcow2_cache_discard()

2018-01-16 Thread Eric Blake
On 12/15/2017 06:53 AM, Alberto Garcia wrote: > This function was only using the BlockDriverState parameter to pass it > to qcow2_cache_get_table_idx() and qcow2_cache_table_release(). This > is no longer necessary so this parameter can be removed. > > Signed-off-by: Alberto Garcia > --- > block

Re: [Qemu-devel] [PATCH v2 11/32] qcow2: Remove BDS parameter from qcow2_cache_is_table_offset()

2018-01-16 Thread Eric Blake
On 12/15/2017 06:53 AM, Alberto Garcia wrote: > This function was only using the BlockDriverState parameter to pass it > to qcow2_cache_get_table_addr(). This is no longer necessary so this > parameter can be removed. > > Signed-off-by: Alberto Garcia > --- > block/qcow2-cache.c| 3 +-- > bl

Re: [Qemu-devel] [PATCH v2 4/4] linux-user: MIPS set cpu to r6 CPU if binary is R6

2018-01-16 Thread Laurent Vivier
Le 16/01/2018 à 21:29, Philippe Mathieu-Daudé a écrit : > On 01/16/2018 02:25 PM, Laurent Vivier wrote: >> From: YunQiang Su >> >> So here we need to detect the version of binaries and set >> cpu_model for it. >> >> [lv: original patch modified to move code into cpu_get_model()] >> Signed-off-by:

Re: [Qemu-devel] [PATCH v2 4/4] linux-user: MIPS set cpu to r6 CPU if binary is R6

2018-01-16 Thread Laurent Vivier
Le 16/01/2018 à 21:26, Richard Henderson a écrit : > On 01/16/2018 09:25 AM, Laurent Vivier wrote: >> From: YunQiang Su >> >> So here we need to detect the version of binaries and set >> cpu_model for it. >> >> [lv: original patch modified to move code into cpu_get_model()] >> Signed-off-by: Laure

Re: [Qemu-devel] [PATCH v2 12/32] qcow2: Add offset_to_l1_index()

2018-01-16 Thread Eric Blake
On 12/15/2017 06:53 AM, Alberto Garcia wrote: > Similar to offset_to_l2_index(), this function returns the index in > the L1 table for a given guest offset. This is only used in a couple > of places and it's not a particularly complex calculation, but it > makes the code a bit more readable. > > A

Re: [Qemu-devel] [PATCH v2 13/32] qcow2: Add l2_slice_size field to BDRVQcow2State

2018-01-16 Thread Eric Blake
On 12/15/2017 06:53 AM, Alberto Garcia wrote: > The BDRVQcow2State structure contains an l2_size field, which stores > the number of 64-bit entries in an L2 table. > > For efficiency reasons we want to be able to load slices instead of > full L2 tables, so we need to know how many entries an L2 sl

Re: [Qemu-devel] [PATCH v2 14/32] qcow2: Add offset_to_l2_slice_index()

2018-01-16 Thread Eric Blake
On 12/15/2017 06:53 AM, Alberto Garcia wrote: > Similar to offset_to_l2_index(), this function takes a guest offset > and returns the index in the L2 slice that contains its L2 entry. > > An L2 slice has currently the same size as an L2 table (one cluster), > so both functions return the same valu

Re: [Qemu-devel] [PATCH v2 15/32] qcow2: Update l2_load() to support L2 slices

2018-01-16 Thread Eric Blake
On 12/15/2017 06:53 AM, Alberto Garcia wrote: > Each entry in the qcow2 L2 cache stores a full L2 table (which uses a > complete cluster in the qcow2 image). A cluster is usually too large > to be used efficiently as the size for a cache entry, so we want to > decouple both values by allowing small

[Qemu-devel] [PATCH v3 2/4] linux-user: introduce functions to detect CPU type

2018-01-16 Thread Laurent Vivier
From: YunQiang Su Add a function to return ELF e_flags and use it to select the CPU model. [lv: split the patch and some cleanup in get_elf_eflags()] Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson --- Notes: YunQiang Su, please add your Signed-off-by that was missing in

[Qemu-devel] [PATCH v3 1/4] linux-user: Move CPU type name selection to a function

2018-01-16 Thread Laurent Vivier
Instead of a sequence of "#if ... #endif" move the selection to a function in linux-user/*/target_elf.h We can't add them in linux-user/*/target_cpu.h because we will need to include "elf.h" to use ELF flags with eflags, and including "elf.h" in "target_cpu.h" introduces some conflicts in elfload.

<    1   2   3   4   5   >