Re: [PATCH v3] pc: Implement -no-hpet as sugar for -machine hpet=on

2020-10-22 Thread Michael S. Tsirkin
On Wed, Oct 21, 2020 at 05:28:24PM +0200, Paolo Bonzini wrote: > On 21/10/20 16:47, Eduardo Habkost wrote: > > Get rid of yet another global variable. > > > > The default will be hpet=on only if CONFIG_HPET=y. > > > > Signed-off-by: Eduardo Habkost > > --- > > Changes v2 -> v3: > > * Revert v2

[PATCH v27 15/17] vfio: Add ioctl to get dirty pages bitmap during dma unmap

2020-10-22 Thread Kirti Wankhede
With vIOMMU, IO virtual address range can get unmapped while in pre-copy phase of migration. In that case, unmap ioctl should return pages pinned in that range and QEMU should find its correcponding guest physical addresses and report those dirty. Suggested-by: Alex Williamson Signed-off-by:

[PATCH] pci: Refuse to hotplug PCI Devices when the Guest OS is not ready

2020-10-22 Thread Marcel Apfelbaum
From: Marcel Apfelbaum During PCIe Root Port's transition from Power-Off to Power-ON (or vice-versa) the "Slot Control Register" has the "Power Indicator Control" set to "Blinking" expressing a "power transition" mode. Any hotplug operation during the "power transition" mode is not permitted or

[PATCH v27 13/17] vfio: Add vfio_listener_log_sync to mark dirty pages

2020-10-22 Thread Kirti Wankhede
vfio_listener_log_sync gets list of dirty pages from container using VFIO_IOMMU_GET_DIRTY_BITMAP ioctl and mark those pages dirty when all devices are stopped and saving state. Return early for the RAM block section of mapped MMIO region. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia ---

[PULL v2 28/28] iotests: add commit top->base cases to 274

2020-10-22 Thread Stefan Hajnoczi
From: Vladimir Sementsov-Ogievskiy These cases are fixed by previous patches around block_status and is_allocated. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Eric Blake Reviewed-by: Alberto Garcia Message-id: 20200924194003.22080-6-vsement...@virtuozzo.com Signed-off-by: Stefan

[PATCH] tests/acceptance: Enable AVOCADO_ALLOW_UNTRUSTED_CODE in the gitlab-CI

2020-10-22 Thread Thomas Huth
The tests are running in containers here, so it should be OK to run with AVOCADO_ALLOW_UNTRUSTED_CODE enabled in this case. We also have to set CONTINUOUS_INTEGRATION in this case to avoid that some tests from ppc_prep_40p.py are failing in the CI. Signed-off-by: Thomas Huth --- .gitlab-ci.yml

[PATCH v27 10/17] memory: Set DIRTY_MEMORY_MIGRATION when IOMMU is enabled

2020-10-22 Thread Kirti Wankhede
mr->ram_block is NULL when mr->is_iommu is true, then fr.dirty_log_mask wasn't set correctly due to which memory listener's log_sync doesn't get called. This patch returns log_mask with DIRTY_MEMORY_MIGRATION set when IOMMU is enabled. Signed-off-by: Kirti Wankhede --- softmmu/memory.c | 2 +-

[PULL v2 25/28] block/io: bdrv_common_block_status_above: support include_base

2020-10-22 Thread Stefan Hajnoczi
From: Vladimir Sementsov-Ogievskiy In order to reuse bdrv_common_block_status_above in bdrv_is_allocated_above, let's support include_base parameter. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Alberto Garcia Reviewed-by: Eric Blake Message-id:

[PATCH v27 07/17] vfio: Register SaveVMHandlers for VFIO device

2020-10-22 Thread Kirti Wankhede
Define flags to be used as delimiter in migration stream for VFIO devices. Added .save_setup and .save_cleanup functions. Map & unmap migration region from these functions at source during saving or pre-copy phase. Set VFIO device state depending on VM's state. During live migration, VM is

[PULL v2 26/28] block/io: bdrv_common_block_status_above: support bs == base

2020-10-22 Thread Stefan Hajnoczi
From: Vladimir Sementsov-Ogievskiy We are going to reuse bdrv_common_block_status_above in bdrv_is_allocated_above. bdrv_is_allocated_above may be called with include_base == false and still bs == base (for ex. from img_rebase()). So, support this corner case. Signed-off-by: Vladimir

[PATCH v27 16/17] vfio: Make vfio-pci device migration capable

2020-10-22 Thread Kirti Wankhede
If the device is not a failover primary device, call vfio_migration_probe() and vfio_migration_finalize() to enable migration support for those devices that support it respectively to tear it down again. Removed migration blocker from VFIO PCI device specific structure and use migration blocker

[PATCH v27 12/17] vfio: Add function to start and stop dirty pages tracking

2020-10-22 Thread Kirti Wankhede
Call VFIO_IOMMU_DIRTY_PAGES ioctl to start and stop dirty pages tracking for VFIO devices. Signed-off-by: Kirti Wankhede Reviewed-by: Dr. David Alan Gilbert --- hw/vfio/migration.c | 36 1 file changed, 36 insertions(+) diff --git a/hw/vfio/migration.c

[PATCH v27 11/17] vfio: Get migration capability flags for container

2020-10-22 Thread Kirti Wankhede
Added helper functions to get IOMMU info capability chain. Added function to get migration capability information from that capability chain for IOMMU container. Similar change was proposed earlier: https://lists.gnu.org/archive/html/qemu-devel/2018-05/msg03759.html Disable migration for devices

[PATCH v27 03/17] vfio: Add save and load functions for VFIO PCI devices

2020-10-22 Thread Kirti Wankhede
Added functions to save and restore PCI device specific data, specifically config space of PCI device. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia --- hw/vfio/pci.c | 48 +++ include/hw/vfio/vfio-common.h | 2 ++ 2 files changed,

[PULL v2 22/28] block/export: add iothread and fixed-iothread options

2020-10-22 Thread Stefan Hajnoczi
Make it possible to specify the iothread where the export will run. By default the block node can be moved to other AioContexts later and the export will follow. The fixed-iothread option forces strict behavior that prevents changing AioContext while the export is active. See the QAPI docs for

[PATCH v27 09/17] vfio: Add load state functions to SaveVMHandlers

2020-10-22 Thread Kirti Wankhede
Sequence during _RESUMING device state: While data for this device is available, repeat below steps: a. read data_offset from where user application should write data. b. write data of data_size to migration region from data_offset. c. write data_size which indicates vendor driver that data is

[PATCH v27 04/17] vfio: Add migration region initialization and finalize function

2020-10-22 Thread Kirti Wankhede
Whether the VFIO device supports migration or not is decided based of migration region query. If migration region query is successful and migration region initialization is successful then migration is supported else migration is blocked. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia

[PATCH v27 00/17] Add migration support for VFIO devices

2020-10-22 Thread Kirti Wankhede
Hi, This Patch set adds migration support for VFIO devices in QEMU. This Patch set include patches as below: Patch 1-2: - Few code refactor Patch 3: - Added save and restore functions for PCI configuration space. Used pci_device_save() and pci_device_load() so that config space cache is saved

[PATCH v27 08/17] vfio: Add save state functions to SaveVMHandlers

2020-10-22 Thread Kirti Wankhede
Added .save_live_pending, .save_live_iterate and .save_live_complete_precopy functions. These functions handles pre-copy and stop-and-copy phase. In _SAVING|_RUNNING device state or pre-copy phase: - read pending_bytes. If pending_bytes > 0, go through below steps. - read data_offset - indicates

[PULL v2 21/28] block: move block exports to libblockdev

2020-10-22 Thread Stefan Hajnoczi
Block exports are used by softmmu, qemu-storage-daemon, and qemu-nbd. They are not used by other programs and are not otherwise needed in libblock. Undo the recent move of blockdev-nbd.c from blockdev_ss into block_ss. Since bdrv_close_all() (libblock) calls blk_exp_close_all() (libblockdev) a

[PATCH v27 02/17] vfio: Add vfio_get_object callback to VFIODeviceOps

2020-10-22 Thread Kirti Wankhede
Hook vfio_get_object callback for PCI devices. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia Suggested-by: Cornelia Huck Reviewed-by: Cornelia Huck --- hw/vfio/pci.c | 8 include/hw/vfio/vfio-common.h | 1 + 2 files changed, 9 insertions(+) diff --git

[PULL v2 17/28] block/export: convert vhost-user-blk server to block export API

2020-10-22 Thread Stefan Hajnoczi
Use the new QAPI block exports API instead of defining our own QOM objects. This is a large change because the lifecycle of VuBlockDev needs to follow BlockExportDriver. QOM properties are replaced by QAPI options objects. VuBlockDev is renamed VuBlkExport and contains a BlockExport field.

[PULL v2 23/28] block/export: add vhost-user-blk multi-queue support

2020-10-22 Thread Stefan Hajnoczi
Allow the number of queues to be configured using --export vhost-user-blk,num-queues=N. This setting should match the QEMU --device vhost-user-blk-pci,num-queues=N setting but QEMU vhost-user-blk.c lowers its own value if the vhost-user-blk backend offers fewer queues than QEMU. The

[PATCH v27 06/17] vfio: Add migration state change notifier

2020-10-22 Thread Kirti Wankhede
Added migration state change notifier to get notification on migration state change. These states are translated to VFIO device state and conveyed to vendor driver. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia Reviewed-by: Dr. David Alan Gilbert --- hw/vfio/migration.c | 37

[PATCH v27 01/17] vfio: Add function to unmap VFIO region

2020-10-22 Thread Kirti Wankhede
This function will be used for migration region. Migration region is mmaped when migration starts and will be unmapped when migration is complete. Signed-off-by: Kirti Wankhede Reviewed-by: Neo Jia Reviewed-by: Cornelia Huck --- hw/vfio/common.c | 32

[PULL v2 20/28] qemu-storage-daemon: avoid compiling blockdev_ss twice

2020-10-22 Thread Stefan Hajnoczi
Introduce libblkdev.fa to avoid recompiling blockdev_ss twice. Suggested-by: Paolo Bonzini Reviewed-by: Paolo Bonzini Signed-off-by: Stefan Hajnoczi Message-id: 20200929125516.186715-3-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- meson.build| 12 ++--

[PULL v2 14/28] util/vhost-user-server: check EOF when reading payload

2020-10-22 Thread Stefan Hajnoczi
Unexpected EOF is an error that must be reported. Signed-off-by: Stefan Hajnoczi Message-id: 20200924151549.913737-9-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- util/vhost-user-server.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[PULL v2 19/28] util/vhost-user-server: use static library in meson.build

2020-10-22 Thread Stefan Hajnoczi
Don't compile contrib/libvhost-user/libvhost-user.c again. Instead build the static library once and then reuse it throughout QEMU. Also switch from CONFIG_LINUX to CONFIG_VHOST_USER, which is what the vhost-user tools (vhost-user-gpu, etc) do. Signed-off-by: Stefan Hajnoczi Message-id:

[PULL v2 12/28] util/vhost-user-server: drop unused DevicePanicNotifier

2020-10-22 Thread Stefan Hajnoczi
The device panic notifier callback is not used. Drop it. Signed-off-by: Stefan Hajnoczi Message-id: 20200924151549.913737-7-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- util/vhost-user-server.h | 3 --- block/export/vhost-user-blk-server.c | 3 +--

[PULL v2 18/28] util/vhost-user-server: move header to include/

2020-10-22 Thread Stefan Hajnoczi
Headers used by other subsystems are located in include/. Also add the vhost-user-server and vhost-user-blk-server headers to MAINTAINERS. Signed-off-by: Stefan Hajnoczi Message-id: 20200924151549.913737-13-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- MAINTAINERS

Re: [PULL 00/13] SD/MMC patches for 2020-10-21

2020-10-22 Thread Peter Maydell
On Wed, 21 Oct 2020 at 18:37, Philippe Mathieu-Daudé wrote: > > The following changes since commit ac793156f650ae2d77834932d72224175ee69086: > > Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-2020102= > 0-1' into staging (2020-10-20 21:11:35 +0100) > > are available in the

[PULL v2 27/28] block/io: fix bdrv_is_allocated_above

2020-10-22 Thread Stefan Hajnoczi
From: Vladimir Sementsov-Ogievskiy bdrv_is_allocated_above wrongly handles short backing files: it reports after-EOF space as UNALLOCATED which is wrong, as on read the data is generated on the level of short backing file (if all overlays have unallocated areas at that place). Reusing

[PULL v2 09/28] util/vhost-user-server: drop unnecessary QOM cast

2020-10-22 Thread Stefan Hajnoczi
We already have access to the value with the correct type (ioc and sioc are the same QIOChannel). Signed-off-by: Stefan Hajnoczi Message-id: 20200924151549.913737-4-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- util/vhost-user-server.c | 2 +- 1 file changed, 1 insertion(+), 1

[PULL v2 16/28] block/export: report flush errors

2020-10-22 Thread Stefan Hajnoczi
Propagate the flush return value since errors are possible. Signed-off-by: Stefan Hajnoczi Message-id: 20200924151549.913737-11-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- block/export/vhost-user-blk-server.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff

[PULL v2 24/28] block/io: fix bdrv_co_block_status_above

2020-10-22 Thread Stefan Hajnoczi
From: Vladimir Sementsov-Ogievskiy bdrv_co_block_status_above has several design problems with handling short backing files: 1. With want_zeros=true, it may return ret with BDRV_BLOCK_ZERO but without BDRV_BLOCK_ALLOCATED flag, when actually short backing file which produces these after-EOF

[PULL v2 08/28] util/vhost-user-server: s/fileds/fields/ typo fix

2020-10-22 Thread Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi Message-id: 20200924151549.913737-3-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- util/vhost-user-server.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/util/vhost-user-server.c b/util/vhost-user-server.c index b189944856..9bd33e0fdb

[PULL v2 13/28] util/vhost-user-server: fix memory leak in vu_message_read()

2020-10-22 Thread Stefan Hajnoczi
fds[] is leaked when qio_channel_readv_full() fails. Use vmsg->fds[] instead of keeping a local fds[] array. Then we can reuse goto fail to clean up fds. vmsg->fd_num must be zeroed before the loop to make this safe. Signed-off-by: Stefan Hajnoczi Message-id:

[PULL v2 15/28] util/vhost-user-server: rework vu_client_trip() coroutine lifecycle

2020-10-22 Thread Stefan Hajnoczi
The vu_client_trip() coroutine is leaked during AioContext switching. It is also unsafe to destroy the vu_dev in panic_cb() since its callers still access it in some cases. Rework the lifecycle to solve these safety issues. Signed-off-by: Stefan Hajnoczi Message-id:

[PULL v2 07/28] MAINTAINERS: Add vhost-user block device backend server maintainer

2020-10-22 Thread Stefan Hajnoczi
From: Coiby Xu Suggested-by: Stefano Garzarella Signed-off-by: Coiby Xu Reviewed-by: Stefan Hajnoczi Reviewed-by: Marc-André Lureau Message-id: 20200918080912.321299-8-coiby...@gmail.com [Removed reference to vhost-user-blk-test.c, it will be sent in a separate pull request. --Stefan]

[PULL v2 06/28] block/export: vhost-user block device backend server

2020-10-22 Thread Stefan Hajnoczi
From: Coiby Xu By making use of libvhost-user, block device drive can be shared to the connected vhost-user client. Only one client can connect to the server one time. Since vhost-user-server needs a block drive to be created first, delay the creation of this object. Suggested-by: Kevin Wolf

[PULL v2 10/28] util/vhost-user-server: drop unnecessary watch deletion

2020-10-22 Thread Stefan Hajnoczi
Explicitly deleting watches is not necessary since libvhost-user calls remove_watch() during vu_deinit(). Add an assertion to check this though. Signed-off-by: Stefan Hajnoczi Message-id: 20200924151549.913737-5-stefa...@redhat.com Signed-off-by: Stefan Hajnoczi --- util/vhost-user-server.c |

[PULL v2 11/28] block/export: consolidate request structs into VuBlockReq

2020-10-22 Thread Stefan Hajnoczi
Only one struct is needed per request. Drop req_data and the separate VuBlockReq instance. Instead let vu_queue_pop() allocate everything at once. This fixes the req_data memory leak in vu_block_virtio_process_req(). Signed-off-by: Stefan Hajnoczi Message-id:

[PULL v2 03/28] libvhost-user: remove watch for kick_fd when de-initialize vu-dev

2020-10-22 Thread Stefan Hajnoczi
From: Coiby Xu When the client is running in gdb and quit command is run in gdb, QEMU will still dispatch the event which will cause segment fault in the callback function. Signed-off-by: Coiby Xu Reviewed-by: Stefan Hajnoczi Reviewed-by: Marc-André Lureau Message-id:

[PULL v2 04/28] util/vhost-user-server: generic vhost user server

2020-10-22 Thread Stefan Hajnoczi
From: Coiby Xu Sharing QEMU devices via vhost-user protocol. Only one vhost-user client can connect to the server one time. Suggested-by: Kevin Wolf Signed-off-by: Stefan Hajnoczi Signed-off-by: Coiby Xu Reviewed-by: Stefan Hajnoczi Reviewed-by: Marc-André Lureau Message-id:

[PULL v2 01/28] block/nvme: Add driver statistics for access alignment and hw errors

2020-10-22 Thread Stefan Hajnoczi
From: Philippe Mathieu-Daudé Keep statistics of some hardware errors, and number of aligned/unaligned I/O accesses. QMP example booting a full RHEL 8.3 aarch64 guest: { "execute": "query-blockstats" } { "return": [ { "device": "", "node-name": "drive0",

[PULL v2 02/28] libvhost-user: Allow vu_message_read to be replaced

2020-10-22 Thread Stefan Hajnoczi
From: Coiby Xu Allow vu_message_read to be replaced by one which will make use of the QIOChannel functions. Thus reading vhost-user message won't stall the guest. For slave channel, we still use the default vu_message_read. Reviewed-by: Marc-André Lureau Signed-off-by: Coiby Xu Reviewed-by:

[PULL v2 05/28] block: move logical block size check function to a common utility function

2020-10-22 Thread Stefan Hajnoczi
From: Coiby Xu Move the constants from hw/core/qdev-properties.c to util/block-helpers.h so that knowledge of the min/max values is Signed-off-by: Stefan Hajnoczi Signed-off-by: Coiby Xu Reviewed-by: Stefan Hajnoczi Reviewed-by: Marc-André Lureau Acked-by: Eduardo Habkost Message-id:

[PULL v2 00/28] Block patches

2020-10-22 Thread Stefan Hajnoczi
The following changes since commit ac793156f650ae2d77834932d72224175ee69086: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20201020-1' into staging (2020-10-20 21:11:35 +0100) are available in the Git repository at: https://gitlab.com/stefanha/qemu.git

[PATCH] physmem: improve ram size error messages

2020-10-22 Thread Pankaj Gupta
Ram size mismatch condition logs below message. "Length mismatch: pc.ram: 0x8000 in != 0x18000: Invalid argument" This patch improves the readability of error messages. Removed the superflous "in" and changed "Length" to "Size". Signed-off-by: Pankaj Gupta Reported-by: Li Zhang

Re: [PATCH v1 4/6] gitlab: skip checkpatch.pl checks if no commit delta on branch

2020-10-22 Thread Philippe Mathieu-Daudé
On 10/21/20 6:31 PM, Alex Bennée wrote: From: Daniel P. Berrangé If the current branch is synced to the current upstream git master, there are no commits that need checking. This causes checkpatch.pl to print an error that it found no commits. We need to avoid calling checkpatch.pl in this

Re: [PATCH v1 6/6] tests/acceptance: pick a random gdb port for reverse debugging

2020-10-22 Thread Philippe Mathieu-Daudé
On 10/22/20 7:20 AM, Thomas Huth wrote: On 21/10/2020 18.31, Alex Bennée wrote: Currently the test randomly fails if you are using a shared machine due to contention on the well known port 1234. We can ameliorate this a bit by picking a random non-ephemeral port although it doesn't totally

Re: [PATCH v2 2/2] s390x: pv: Fix diag318 PV fencing

2020-10-22 Thread Christian Borntraeger
On 22.10.20 12:31, Janosch Frank wrote: > Diag318 fencing needs to be determined on the current VM PV state and > not on the state that the VM has when we create the CPU model. > > Signed-off-by: Janosch Frank > Reported-by: Marc Hartmayer > Fixes: fabdada935 ("s390: guest support for

Re: [PATCH v3 1/2] hw/block/nvme: add dulbe support

2020-10-22 Thread Philippe Mathieu-Daudé
On 10/22/20 4:21 AM, Keith Busch wrote: On Thu, Oct 22, 2020 at 12:17:35AM +0200, Klaus Jensen wrote: +for (int i = 1; i <= n->num_namespaces; i++) { You can call me old-school, but I don't think C should have allowed mixed declarations with code. Since commit 7be41675f7c

Re: [PATCH v2 2/2] s390x: pv: Fix diag318 PV fencing

2020-10-22 Thread David Hildenbrand
On 22.10.20 12:31, Janosch Frank wrote: > Diag318 fencing needs to be determined on the current VM PV state and > not on the state that the VM has when we create the CPU model. > > Signed-off-by: Janosch Frank > Reported-by: Marc Hartmayer > Fixes: fabdada935 ("s390: guest support for diagnose

Re: [PATCH v2 3/8] tests/9pfs: add local Tlcreate test

2020-10-22 Thread Christian Schoenebeck
On Donnerstag, 22. Oktober 2020 10:51:46 CEST Greg Kurz wrote: > On Wed, 21 Oct 2020 14:25:33 +0200 > > Christian Schoenebeck wrote: > > This test case uses a Tlcreate 9p request to create a regular file inside > > host's test directory. > > > > Signed-off-by: Christian Schoenebeck > > --- >

[PATCH v2 2/2] s390x: pv: Fix diag318 PV fencing

2020-10-22 Thread Janosch Frank
Diag318 fencing needs to be determined on the current VM PV state and not on the state that the VM has when we create the CPU model. Signed-off-by: Janosch Frank Reported-by: Marc Hartmayer Fixes: fabdada935 ("s390: guest support for diagnose 0x318") --- target/s390x/cpu_features.c | 5 +

[PATCH v2 1/2] s390x: pv: Remove sclp boundary checks

2020-10-22 Thread Janosch Frank
The SCLP boundary cross check is done by the Ultravisor for a protected guest, hence we don't need to do it. As QEMU doesn't get a valid SCCB address in protected mode this is even problematic and can lead to QEMU reporting a false boundary cross error. Signed-off-by: Janosch Frank Reported-by:

[PATCH v2 0/2] s390x: pv: Diag318 fixes

2020-10-22 Thread Janosch Frank
Here are two fixes for the diag318 support that fix crashes when booting PV guests. We're working on extending our testing to catch problems like these earlier. Branch: https://gitlab.com/frankja/qemu/-/commits/bb/frankja/diag318_fixes CI: https://gitlab.com/frankja/qemu/-/pipelines/206174979

Re: [PATCH 0/8] Add support for pvpanic mmio device

2020-10-22 Thread Peter Maydell
On Thu, 22 Oct 2020 at 09:25, Mihai Carabas wrote: > The patchset was assembled from chuncks from some old patches from 2018 [1] > which were left unmerged and some additions from me. Surprisingly their Linux > kernel counterpart were merged (so the pvpanic driver from the kernel supports >

[PATCH] target/i386: seg_helper: Correct segement selector nullification in the RET/IRET helper

2020-10-22 Thread Bin Meng
From: Bin Meng Per the SDM, when returning to outer privilege level, for segment registers (ES, FS, GS, and DS) if the check fails, the segment selector becomes null, but QEMU clears the base/limit/flags as well as nullifying the segment selector, which should be a spec violation. Real hardware

Re: [PULL 00/17] Microvm 20201021 patches

2020-10-22 Thread Peter Maydell
On Wed, 21 Oct 2020 at 15:52, Gerd Hoffmann wrote: > > The following changes since commit 4c41341af76cfc85b5a6c0f87de4838672ab9f89: > > Merge remote-tracking branch 'remotes/aperard/tags/pull-xen-20201020' into > staging (2020-10-20 11:20:36 +0100) > > are available in the Git repository at: >

Re: [PATCH] s390x: pv: Fix diag318 PV fencing

2020-10-22 Thread David Hildenbrand
On 22.10.20 11:54, Halil Pasic wrote: > On Thu, 22 Oct 2020 04:23:12 -0400 > Janosch Frank wrote: > >> Diag318 fencing needs to be determined on the current VM PV state and >> not on the state that the VM has when we create the CPU model. >> >> Signed-off-by: Janosch Frank >> Reported-by: Marc

Re: [PATCH] s390x: pv: Fix diag318 PV fencing

2020-10-22 Thread Halil Pasic
On Thu, 22 Oct 2020 04:23:12 -0400 Janosch Frank wrote: > Diag318 fencing needs to be determined on the current VM PV state and > not on the state that the VM has when we create the CPU model. > > Signed-off-by: Janosch Frank > Reported-by: Marc Hartmayer > Reviewed-by: Christian Borntraeger

Re: [PATCH v6 16/16] scripts/oss-fuzz: remove the generic-fuzz target

2020-10-22 Thread Darren Kenny
Hi Alex, On Wednesday, 2020-10-21 at 17:09:22 -04, Alexander Bulekov wrote: > generic-fuzz is not a standalone fuzzer - it requires some env variables > to be set. On oss-fuzz, we set these with some predefined > generic-fuzz-{...} targets, that are thin wrappers around generic-fuzz. > Remove

Re: [PATCH v4 1/2] qcow2: Report BDRV_BLOCK_ZERO more accurately in bdrv_co_block_status()

2020-10-22 Thread Vladimir Sementsov-Ogievskiy
21.09.2020 17:30, Alberto Garcia wrote: If a BlockDriverState supports backing files but has none then any unallocated area reads back as zeroes. bdrv_co_block_status() is only reporting this is if want_zero is true, but this is an inexpensive test and there is no reason not to do it in all

Re: [PATCH v6 15/16] fuzz: register predefined generic-fuzz configs

2020-10-22 Thread Darren Kenny
On Wednesday, 2020-10-21 at 17:09:21 -04, Alexander Bulekov wrote: > We call get_generic_fuzz_configs, which fills an array with > predefined {name, args, objects} triples. For each of these, we add a > new FuzzTarget, that uses a small wrapper to set > QEMU_FUZZ_{ARGS,OBJECTS} to the

Re: [PATCH v6 14/16] fuzz: add generic-fuzz configs for oss-fuzz

2020-10-22 Thread Darren Kenny
On Wednesday, 2020-10-21 at 17:09:20 -04, Alexander Bulekov wrote: > Predefine some generic-fuzz configs. For each of these, we will create a > separate FuzzTarget that can be selected through argv0 and, therefore, > fuzzed on oss-fuzz. > > Signed-off-by: Alexander Bulekov Reviewed-by: Darren

Re: [PATCH v6 13/16] fuzz: add an "opaque" to the FuzzTarget struct

2020-10-22 Thread Darren Kenny
On Wednesday, 2020-10-21 at 17:09:19 -04, Alexander Bulekov wrote: > It can be useful to register FuzzTargets that have nearly-identical > initialization handlers (e.g. for using the same fuzzing code, with > different configuration options). Add an opaque pointer to the > FuzzTarget struct, so

Re: [PATCH v6 02/16] fuzz: Add generic virtual-device fuzzer

2020-10-22 Thread Darren Kenny
Hi Alex, On Wednesday, 2020-10-21 at 17:09:08 -04, Alexander Bulekov wrote: > This is a generic fuzzer designed to fuzz a virtual device's > MemoryRegions, as long as they exist within the Memory or Port IO (if it > exists) AddressSpaces. The fuzzer's input is interpreted into a sequence > of

Re: [PATCH v2 8/8] tests/9pfs: add local Tunlinkat hard link test

2020-10-22 Thread Greg Kurz
On Wed, 21 Oct 2020 14:55:46 +0200 Christian Schoenebeck wrote: > This test case uses a Tunlinkat request to remove a previously hard > linked file by using the 9pfs 'local' fs driver. > > Signed-off-by: Christian Schoenebeck > --- Reviewed-by: Greg Kurz > tests/qtest/virtio-9p-test.c | 30

Re: [PATCH v4 0/2] Skip copy-on-write when allocating a zero cluster

2020-10-22 Thread Alberto Garcia
ping On Mon 21 Sep 2020 04:30:48 PM CEST, Alberto Garcia wrote: > I had to rebase the series due to conflicting changes on master. There > are no other differences. > > Berto > > v4: > - Fix rebase conflicts after cb8503159a > > v3:

Re: [PATCH v2 7/8] tests/9pfs: add local Tlink test

2020-10-22 Thread Greg Kurz
On Wed, 21 Oct 2020 20:20:08 +0200 Christian Schoenebeck wrote: > On Mittwoch, 21. Oktober 2020 14:51:09 CEST Christian Schoenebeck wrote: > > This test case uses a Tlink request to create a hard link to a regular > > file using the 9pfs 'local' fs driver. > > > > Signed-off-by: Christian

Re: [PATCH v2 7/8] tests/9pfs: add local Tlink test

2020-10-22 Thread Greg Kurz
On Wed, 21 Oct 2020 14:51:09 +0200 Christian Schoenebeck wrote: > This test case uses a Tlink request to create a hard link to a regular > file using the 9pfs 'local' fs driver. > > Signed-off-by: Christian Schoenebeck > --- Reviewed-by: Greg Kurz > tests/qtest/virtio-9p-test.c | 71

Re: [PATCH] MAINTAINERS: Update nvme entries

2020-10-22 Thread Klaus Jensen
On Oct 22 11:00, Klaus Jensen wrote: > From: Klaus Jensen > > Make sure that maintainers of both the nvme block driver and the > emulated nvme device is notified about changes to the shared nvme.h. > > Signed-off-by: Klaus Jensen > --- > MAINTAINERS | 2 ++ > 1 file changed, 2 insertions(+) >

[PATCH] MAINTAINERS: Update nvme entries

2020-10-22 Thread Klaus Jensen
From: Klaus Jensen Make sure that maintainers of both the nvme block driver and the emulated nvme device is notified about changes to the shared nvme.h. Signed-off-by: Klaus Jensen --- MAINTAINERS | 2 ++ 1 file changed, 2 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index

Re: [PATCH v2 6/8] tests/9pfs: add local Tunlinkat symlink test

2020-10-22 Thread Greg Kurz
On Wed, 21 Oct 2020 14:36:23 +0200 Christian Schoenebeck wrote: > This test case uses a Tunlinkat request to remove a symlink using > the 9pfs 'local' fs driver. > > Signed-off-by: Christian Schoenebeck > --- Reviewed-by: Greg Kurz > tests/qtest/virtio-9p-test.c | 28

Re: [PATCH v2 5/8] tests/9pfs: add local Tsymlink test

2020-10-22 Thread Greg Kurz
On Wed, 21 Oct 2020 14:33:34 +0200 Christian Schoenebeck wrote: > This test case uses a Tsymlink 9p request to create a symbolic link using > the 9pfs 'local' fs driver. > > Signed-off-by: Christian Schoenebeck > --- Reviewed-by: Greg Kurz > tests/qtest/virtio-9p-test.c | 77

Re: [PATCH v11 09/13] copy-on-read: skip non-guest reads if no copy needed

2020-10-22 Thread Vladimir Sementsov-Ogievskiy
22.10.2020 10:50, Andrey Shinkevich wrote: On 21.10.2020 23:43, Andrey Shinkevich wrote: On 14.10.2020 18:22, Vladimir Sementsov-Ogievskiy wrote: 14.10.2020 15:51, Max Reitz wrote: On 12.10.20 19:43, Andrey Shinkevich wrote: If the flag BDRV_REQ_PREFETCH was set, pass it further to the

Re: [PATCH v2 4/8] tests/9pfs: add local Tunlinkat file test

2020-10-22 Thread Greg Kurz
On Wed, 21 Oct 2020 14:28:37 +0200 Christian Schoenebeck wrote: > This test case uses a Tunlinkat request to remove a regular file using > the 9pfs 'local' fs driver. > > Signed-off-by: Christian Schoenebeck > --- Reviewed-by: Greg Kurz > tests/qtest/virtio-9p-test.c | 24

Re: [PATCH v2 3/8] tests/9pfs: add local Tlcreate test

2020-10-22 Thread Greg Kurz
On Wed, 21 Oct 2020 14:25:33 +0200 Christian Schoenebeck wrote: > This test case uses a Tlcreate 9p request to create a regular file inside > host's test directory. > > Signed-off-by: Christian Schoenebeck > --- Just one remark, see below. Reviewed-by: Greg Kurz >

Re: [PATCH] s390x: pv: Fix diag318 PV fencing

2020-10-22 Thread David Hildenbrand
On 22.10.20 10:39, Janosch Frank wrote: > On 10/22/20 10:32 AM, David Hildenbrand wrote: >> On 22.10.20 10:23, Janosch Frank wrote: >>> Diag318 fencing needs to be determined on the current VM PV state and >>> not on the state that the VM has when we create the CPU model. >>> >>> Signed-off-by:

Re: [PATCH] migration/block-dirty-bitmap: fix larger granularity bitmaps

2020-10-22 Thread Vladimir Sementsov-Ogievskiy
22.10.2020 10:46, Stefan Reiter wrote: On 10/21/20 5:17 PM, Vladimir Sementsov-Ogievskiy wrote: 21.10.2020 17:44, Stefan Reiter wrote: sectors_per_chunk is a 64 bit integer, but the calculation is done in 32 bits, leading to an overflow for coarse bitmap granularities. If that results in the

Re: [PATCH] s390x: pv: Fix diag318 PV fencing

2020-10-22 Thread Janosch Frank
On 10/22/20 10:32 AM, David Hildenbrand wrote: > On 22.10.20 10:23, Janosch Frank wrote: >> Diag318 fencing needs to be determined on the current VM PV state and >> not on the state that the VM has when we create the CPU model. >> >> Signed-off-by: Janosch Frank >> Reported-by: Marc Hartmayer >>

Re: [PATCH v2 2/8] tests/9pfs: add local Tunlinkat directory test

2020-10-22 Thread Greg Kurz
On Wed, 21 Oct 2020 14:17:01 +0200 Christian Schoenebeck wrote: > This test case uses a Tunlinkat 9p request with flag AT_REMOVEDIR > (see 'man 2 unlink') to remove a directory from host's test directory. > > Signed-off-by: Christian Schoenebeck > --- Reviewed-by: Greg Kurz >

Re: [PATCH] s390x: pv: Fix diag318 PV fencing

2020-10-22 Thread David Hildenbrand
On 22.10.20 10:23, Janosch Frank wrote: > Diag318 fencing needs to be determined on the current VM PV state and > not on the state that the VM has when we create the CPU model. > > Signed-off-by: Janosch Frank > Reported-by: Marc Hartmayer > Reviewed-by: Christian Borntraeger > Fixes:

Re: [PATCH 1/2] s390x: pv: Remove sclp boundary checks

2020-10-22 Thread Thomas Huth
On 21/10/2020 15.43, Janosch Frank wrote: > The SCLP boundary cross check is done by the Ultravisor for a > protected guest, hence we don't need to do it. As QEMU doesn't get a > valid SCCB address in protected mode this is even problematic and can > lead to QEMU reporting a false boundary cross

[PATCH 7/8] pvpanic : update pvpanic document

2020-10-22 Thread Mihai Carabas
From: Peng Hao Add mmio support info in docs/specs/pvpanic.txt. Reviewed-by: Andrew Jones Signed-off-by: Peng Hao Signed-off-by: Mihai Carabas --- docs/specs/pvpanic.txt | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/docs/specs/pvpanic.txt

[PATCH 5/8] hw/arm/virt: add pvpanic device in virt acpi table

2020-10-22 Thread Mihai Carabas
From: Peng Hao Add pvpanic device in virt acpi table, so when kernel command line uses acpi=force, kernel can get info from acpi table. Reviewed-by: Andrew Jones Signed-off-by: Peng Hao Signed-off-by: Mihai Carabas --- hw/arm/virt-acpi-build.c | 17 + 1 file changed, 17

[PATCH 4/8] hw/arm/virt: Use the pvpanic device

2020-10-22 Thread Mihai Carabas
From: Peng Hao Add pvpanic device in arm virt machine. Signed-off-by: Peng Hao Reviewed-by: Andrew Jones Signed-off-by: Mihai Carabas --- hw/arm/virt.c | 25 + include/hw/arm/virt.h | 2 ++ 2 files changed, 27 insertions(+) diff --git a/hw/arm/virt.c

[PATCH 6/8] hw/arm/virt: add configure interface for pvpanic-mmio

2020-10-22 Thread Mihai Carabas
From: Peng Hao Add the option to turn on/off the pvpanic-mmio device in virt machine. Signed-off-by: Peng Hao Reviewed-by: Andrew Jones Signed-off-by: Mihai Carabas --- hw/arm/virt.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/hw/arm/virt.c b/hw/arm/virt.c

[PATCH 3/8] hw/misc/pvpanic: Add the MMIO interface

2020-10-22 Thread Mihai Carabas
From: Peng Hao Add new pvpanic type: "TYPE_PVPANIC_MMIO". Reviewed-by: Peter Maydell Signed-off-by: Peng Hao Signed-off-by: Mihai Carabas --- hw/misc/pvpanic.c | 51 +++ include/hw/misc/pvpanic.h | 3 ++- 2 files changed, 49

[PATCH 8/8] pvpanic: break dependency on ISA_BUS

2020-10-22 Thread Mihai Carabas
pvpanic is supported on ARM VIRT MACHINE as an MMIO device, no need for an ISA bus. Signed-off-by: Mihai Carabas --- hw/arm/Kconfig| 1 + hw/misc/Kconfig | 2 +- hw/misc/pvpanic.c | 4 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/arm/Kconfig b/hw/arm/Kconfig index

[PATCH 0/8] Add support for pvpanic mmio device

2020-10-22 Thread Mihai Carabas
The patchset was assembled from chuncks from some old patches from 2018 [1] which were left unmerged and some additions from me. Surprisingly their Linux kernel counterpart were merged (so the pvpanic driver from the kernel supports mmio). I have seen the discussions about moving the pvpanic to

[PATCH 1/8] hw/misc/pvpanic: Build the pvpanic device for any machine

2020-10-22 Thread Mihai Carabas
From: Philippe Mathieu-Daudé The 'pvpanic' ISA device can be use by any machine with an ISA bus. Reviewed-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Peng Hao Signed-off-by: Mihai Carabas --- hw/misc/meson.build | 2 +- 1 file changed, 1 insertion(+), 1

Re: [PATCH v2 1/8] tests/9pfs: simplify do_mkdir()

2020-10-22 Thread Greg Kurz
On Wed, 21 Oct 2020 14:06:53 +0200 Christian Schoenebeck wrote: > Split out walking a directory path to a separate new utility function > do_walk() and use that function in do_mkdir(). > > The code difference saved this way is not much, but we'll use that new > do_walk() function in the

[PATCH 2/8] hw/misc/pvpanic: Cosmetic renaming

2020-10-22 Thread Mihai Carabas
From: Philippe Mathieu-Daudé To ease the MMIO device addition in the next patch, rename: - ISA_PVPANIC_DEVICE -> PVPANIC_ISA_DEVICE. - PVPanicState -> PVPanicISAState. - TYPE_PVPANIC -> TYPE_PVPANIC_ISA. - MemoryRegion io -> mr. Reviewed-by: Peter Maydell Signed-off-by: Philippe Mathieu-Daudé

[PATCH] s390x: pv: Fix diag318 PV fencing

2020-10-22 Thread Janosch Frank
Diag318 fencing needs to be determined on the current VM PV state and not on the state that the VM has when we create the CPU model. Signed-off-by: Janosch Frank Reported-by: Marc Hartmayer Reviewed-by: Christian Borntraeger Fixes: fabdada935 ("s390: guest support for diagnose 0x318") --- If

Re: [PATCH v3 0/6] virtio-mem: block size and address-assignment optimizations

2020-10-22 Thread David Hildenbrand
On 08.10.20 10:30, David Hildenbrand wrote: > > > Let's try to detect the actual THP size and use it as default block size > (unless the page size of the backend indicates that THP don't apply). > Always allow to set a block size of 1 MiB, but warn if the configured block > size is smaller than

Re: [PATCH v6 01/16] memory: Add FlatView foreach function

2020-10-22 Thread Darren Kenny
Hi Alex, On Wednesday, 2020-10-21 at 17:09:07 -04, Alexander Bulekov wrote: > Acked-by: Paolo Bonzini > Signed-off-by: Alexander Bulekov > --- > include/exec/memory.h | 5 + > softmmu/memory.c | 9 + > 2 files changed, 14 insertions(+) > > diff --git a/include/exec/memory.h

[PATCH v6 6/6] [RISCV_PM] Allow experimental J-ext to be turned on

2020-10-22 Thread Alexey Baturo
Signed-off-by: Alexey Baturo --- target/riscv/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/riscv/cpu.c b/target/riscv/cpu.c index 1c00d9ea26..56633c14eb 100644 --- a/target/riscv/cpu.c +++ b/target/riscv/cpu.c @@ -465,6 +465,7 @@ static void riscv_cpu_realize(DeviceState

<    1   2   3   4   >