[PATCH v3 1/3] qcow2: introduce Qcow2Metadata structure

2020-01-14 Thread Andrey Shinkevich
The preliminary patch to provide an extendable structure for dumping QCOW2 metadata allocations in image. The command line optional key is introduced in the patch that follows. Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Andrey Shinkevich --- qapi/block-core.json | 209 +++

[PATCH v3 0/3] Dump QCOW2 metadata

2020-01-14 Thread Andrey Shinkevich
The information about QCOW2 metadata allocations in an image ELF-file is helpful for finding issues with the image data integrity. v3: Descriptions of the new key option were added. The names of identifiers were amended. The QEMU-IMG key options were put in the sorted order in the code. Al

[PATCH v3 2/3] qemu-img: sort key options alphabetically

2020-01-14 Thread Andrey Shinkevich
Put qemu-img key options in the alphabetical order in the code for a faster finding. Suggested-by: Eric Blake Signed-off-by: Andrey Shinkevich --- qemu-img.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/qemu-img.c b/qemu-img.c index 6233b8c..c86f7

[PATCH v3 3/3] qcow2: dump QCOW2 metadata

2020-01-14 Thread Andrey Shinkevich
Let QEMU-IMG CHECK command show QCOW2 structure to inform a user about metadata allocations on disk. Introduce '-M'('--dump-meta') key option. Suggested-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Andrey Shinkevich --- block/qcow2-bitmap.c | 54 +--- block/qcow

Re: [PATCH 1/4] linux-user: Use `qemu_log' for non-strace logging

2020-01-14 Thread Laurent Vivier
Le 14/01/2020 à 04:01, Josh Kunz a écrit : > This change introduces a new logging mask "LOG_USER", which is used for > masking general user-mode logging. This change also switches all non-strace > uses of `gemu_log' in linux-user/ to use `qemu_log_mask(LOG_USER, ...)' > instead. This allows the use

Re: [PATCH 066/104] virtiofsd: passthrough_ll: add renameat2 support

2020-01-14 Thread Daniel P . Berrangé
On Mon, Jan 13, 2020 at 08:06:24PM +, Dr. David Alan Gilbert wrote: > * Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > On Thu, Dec 12, 2019 at 04:38:26PM +, Dr. David Alan Gilbert (git) > > > wrote: > > > > From: Miklos Szere

Re: [PATCH 1/4] linux-user: Use `qemu_log' for non-strace logging

2020-01-14 Thread Laurent Vivier
Le 14/01/2020 à 04:01, Josh Kunz a écrit : > This change introduces a new logging mask "LOG_USER", which is used for > masking general user-mode logging. This change also switches all non-strace > uses of `gemu_log' in linux-user/ to use `qemu_log_mask(LOG_USER, ...)' > instead. This allows the use

Re: [PATCH v12 04/13] virtio-iommu: Add the iommu regions

2020-01-14 Thread Auger Eric
Hi Peter, On 1/13/20 8:53 PM, Peter Xu wrote: > On Thu, Jan 09, 2020 at 03:43:10PM +0100, Eric Auger wrote: >> Implement a callback called on PCI bus enumeration that >> initializes for a given device on the bus hierarchy >> an IOMMU memory region. The PCI bus hierarchy is stored >> locally in IOM

Re: [PATCH v12 04/13] virtio-iommu: Add the iommu regions

2020-01-14 Thread Auger Eric
Hi Peter, On 1/13/20 9:06 PM, Peter Xu wrote: > On Thu, Jan 09, 2020 at 03:43:10PM +0100, Eric Auger wrote: >> +/** >> + * The bus number is used for lookup when SID based operations occur. >> + * In that case we lazily populate the IOMMUPciBus array from the bus hash >> + * table. At the time the

Re: [PATCH v12 05/13] virtio-iommu: Endpoint and domains structs and helpers

2020-01-14 Thread Auger Eric
Hi Peter, On 1/13/20 9:23 PM, Peter Xu wrote: > On Thu, Jan 09, 2020 at 03:43:11PM +0100, Eric Auger wrote: > > [...] > >> +VirtIOIOMMUEndpoint *virtio_iommu_get_endpoint(VirtIOIOMMU *s, uint32_t >> ep_id); >> +VirtIOIOMMUEndpoint *virtio_iommu_get_endpoint(VirtIOIOMMU *s, uint32_t >> ep_id) >

Re: Priority of -accel

2020-01-14 Thread Markus Armbruster
Paolo Bonzini writes: > On 13/01/20 17:17, Markus Armbruster wrote: >> Perfect opportunity to change the default to something more useful. > > I am not sure acutally if it's that more useful, now that we have > sanctioned qemu-kvm as the fast alternative. If there is a fast alternative, why ship

Re: [RFC PATCH qemu] spapr: Kill SLOF

2020-01-14 Thread Michal Suchánek
On Tue, Jan 07, 2020 at 12:23:13PM +0100, Thomas Huth wrote: > On 07/01/2020 10.39, Andrea Bolognani wrote: > > On Tue, 2020-01-07 at 12:55 +1100, Alexey Kardashevskiy wrote: > >> On 07/01/2020 01:15, Daniel Henrique Barboza wrote: > >>> Question: does Petitboot already replaces SLOF in every possi

Re: [PATCH v7] migration: Support QLIST migration

2020-01-14 Thread Juan Quintela
Eric Auger wrote: > Support QLIST migration using the same principle as QTAILQ: > 94869d5c52 ("migration: migrate QTAILQ"). > > The VMSTATE_QLIST_V macro has the same proto as VMSTATE_QTAILQ_V. > The change mainly resides in QLIST RAW macros: QLIST_RAW_INSERT_HEAD > and QLIST_RAW_REVERSE. > > Test

Re: [PATCH 2/4] linux-user: Use `qemu_log' for strace

2020-01-14 Thread Laurent Vivier
Le 14/01/2020 à 04:01, Josh Kunz a écrit : > This change switches linux-user strace logging to use the newer `qemu_log` > logging subsystem rather than the older `gemu_log` (notice the "g") > logger. `qemu_log` has several advantages, namely that it allows logging > to a file, and provides a more u

[PATCH v2] scsi-disk: define props in scsi_block_disk to avoid memleaks

2020-01-14 Thread pannengyuan
From: Pan Nengyuan scsi_block_realize() use scsi_realize() to init some props, but these props is not defined in scsi_block_disk_properties, so they will not be freed. This patch defines these prop in scsi_block_disk_properties and aslo calls scsi_unrealize to avoid memleaks, the leak stack as f

Re: [PATCH] vhost-vsock: delete vqs in vhost_vsock_unrealize to avoid memleaks

2020-01-14 Thread Stefano Garzarella
On Tue, Jan 14, 2020 at 03:52:29PM +0800, pannengy...@huawei.com wrote: > From: Pan Nengyuan > > Receive/transmit/event vqs forgot to cleanup in vhost_vsock_unrealize. This > patch save receive/transmit vq pointer in realize() and cleanup vqs > through those vq pointers in unrealize(). The leak s

Re: [PATCH] target/riscv: Set mstatus.DS & FS correctly

2020-01-14 Thread ShihPo Hung
On Tue, Jan 14, 2020 at 10:32 AM Richard Henderson < richard.hender...@linaro.org> wrote: > On 1/9/20 11:05 PM, shihpo.h...@sifive.com wrote: > > Because ctx->mstatus_fs changes dynamically during runtime, we should > > remove the mstatus_fs check at the translation stage. > > This change is incor

[PULL 00/29] Migration pull patches (second try)

2020-01-14 Thread Juan Quintela
The following changes since commit 3c8a6575985b1652b45bfa670b5e1907d642cfa0: Merge remote-tracking branch 'remotes/kraxel/tags/usb-20200113-pull-request' into staging (2020-01-13 14:19:57 +) are available in the Git repository at: https://github.com/juanquintela/qemu.git tags/migration-

[PULL 02/29] migration-test: Add migration multifd test

2020-01-14 Thread Juan Quintela
We set multifd-channels. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Thomas Huth Tested-by: Wei Yang --- tests/qtest/migration-test.c | 56 1 file changed, 56 insertions(+) diff --git a/tests/qtest/migration-test.c b/test

[PULL 04/29] migration-test: introduce functions to handle string parameters

2020-01-14 Thread Juan Quintela
Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- tests/qtest/migration-test.c | 37 1 file changed, 37 insertions(+) diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c index fb70214f44..b0580dd541 100644 --- a/tests/

[PULL 06/29] runstate: ignore finishmigrate -> prelaunch transition

2020-01-14 Thread Juan Quintela
From: Laurent Vivier Commit 1bd71dce4bf2 tries to prevent a finishmigrate -> prelaunch transition by exiting at the beginning of the main_loop_should_exit() function if the state is already finishmigrate. As the finishmigrate state is set in the migration thread it can happen concurrently to the

[PULL 01/29] multifd: Initialize local variable

2020-01-14 Thread Juan Quintela
Fill everything with zero, so the padding fields are also initialized. --- migration/ram.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/ram.c b/migration/ram.c index 96feb4062c..b9147bcca3 100644 --- a/migration/ram.c +++ b/migration/ram.c @@ -703,7 +703,7 @@ typed

[PULL 08/29] migration: Rate limit inside host pages

2020-01-14 Thread Juan Quintela
From: "Dr. David Alan Gilbert" When using hugepages, rate limiting is necessary within each huge page, since a 1G huge page can take a significant time to send, so you end up with bursty behaviour. Fixes: 4c011c37ecb3 ("postcopy: Send whole huge pages") Reported-by: Lin Ma Signed-off-by: Dr. Da

[PULL 03/29] migration: Make sure that we don't call write() in case of error

2020-01-14 Thread Juan Quintela
If we are exiting due to an error/finish/ Just don't try to even touch the channel with one IO operation. Signed-off-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert --- migration/ram.c | 25 + 1 file changed, 25 insertions(+) diff --git a/migration/ram.c b/mig

[PULL 13/29] migration: savevm_state_handler_insert: constant-time element insertion

2020-01-14 Thread Juan Quintela
From: Scott Cheloha savevm_state's SaveStateEntry TAILQ is a priority queue. Priority sorting is maintained by searching from head to tail for a suitable insertion spot. Insertion is thus an O(n) operation. If we instead keep track of the head of each priority's subqueue within that larger que

[PULL 09/29] migration: Fix incorrect integer->float conversion caught by clang

2020-01-14 Thread Juan Quintela
From: Fangrui Song Clang does not like qmp_migrate_set_downtime()'s code to clamp double @value to 0..INT64_MAX: qemu/migration/migration.c:2038:24: error: implicit conversion from 'long' to 'double' changes value from 9223372036854775807 to 9223372036854775808 [-Werror,-Wimplicit-int-floa

[PULL 05/29] migration-test: ppc64: fix FORTH test program

2020-01-14 Thread Juan Quintela
From: Laurent Vivier Commit e51e711b1bef has moved the initialization of start_address and end_address after the definition of the command line argument, where the nvramrc is initialized, and thus the loop is between 0 and 0 rather than 1 MiB and 100 MiB. It doesn't affect the result of the test

[PULL 25/29] Bug #1829242 correction.

2020-01-14 Thread Juan Quintela
From: Alexey Romko Added type conversions to ram_addr_t before all left shifts of page indexes to TARGET_PAGE_BITS, to correct overflows when the page address was 4Gb and more. Signed-off-by: Alexey Romko Reviewed-by: Juan Quintela Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Juan Quint

[PULL 07/29] ram.c: remove unneeded labels

2020-01-14 Thread Juan Quintela
From: Daniel Henrique Barboza ram_save_queue_pages() has an 'err' label that can be replaced by 'return -1' instead. Same thing with ram_discard_range(), and in this case we can also get rid of the 'ret' variable and return either '-1' on error or the result of ram_block_discard_range(). CC: Ju

[PULL 10/29] migration: Fix the re-run check of the migrate-incoming command

2020-01-14 Thread Juan Quintela
From: Yury Kotov The current check sets an error but doesn't fail the command. This may cause a problem if new connection attempt by the same URI affects the first connection. Signed-off-by: Yury Kotov Reviewed-by: Juan Quintela Reviewed-by: Darren Kenny Signed-off-by: Juan Quintela --- mig

[PULL 14/29] migration/ram: Yield periodically to the main loop

2020-01-14 Thread Juan Quintela
From: Yury Kotov Usually, incoming migration coroutine yields to the main loop while its IO-channel is waiting for data to receive. But there is a case when RAM migration and data receive have the same speed: VM with huge zeroed RAM. In this case, IO-channel won't read and thus the main loop is s

[PULL 28/29] apic: Use 32bit APIC ID for migration instance ID

2020-01-14 Thread Juan Quintela
From: Peter Xu Migration is silently broken now with x2apic config like this: -smp 200,maxcpus=288,sockets=2,cores=72,threads=2 \ -device intel-iommu,intremap=on,eim=on After migration, the guest kernel could hang at anything, due to x2apic bit not migrated correctly in IA32_APIC_BASE

[PULL 11/29] misc: use QEMU_IS_ALIGNED

2020-01-14 Thread Juan Quintela
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Reviewed-by: Juan Quintela Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Stefan Berger Reviewed-by: Paolo Bonzini Signed-off-by: Juan Quintela --- exec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exec

[PULL 12/29] migration: add savevm_state_handler_remove()

2020-01-14 Thread Juan Quintela
From: Scott Cheloha Create a function to abstract common logic needed when removing a SaveStateEntry element from the savevm_state.handlers queue. For now we just remove the element. Soon it will involve additional cleanup. Signed-off-by: Scott Cheloha Reviewed-by: Dr. David Alan Gilbert Rev

[PULL 17/29] migration/postcopy: count target page number to decide the place_needed

2020-01-14 Thread Juan Quintela
From: Wei Yang In postcopy, it requires to place whole host page instead of target page. Currently, it relies on the page offset to decide whether this is the last target page. We also can count the target page number during the iteration. When the number of target page equals (host page size /

[PULL 1/1] linux-aio: increasing MAX_EVENTS to a larger hardcoded value

2020-01-14 Thread Stefan Hajnoczi
From: Wangyong Since commit 6040aedddb5f474a9c2304b6a432a652d82b3d3c "virtio-blk: make queue size configurable",if the user set the queue size to more than 128 ,it will not take effect. That's because linux aio's maximum outstanding requests at a time is always less than or equal to 128. This pa

[PULL 16/29] migration/postcopy: wait for decompress thread in precopy

2020-01-14 Thread Juan Quintela
From: Wei Yang Compress is not supported with postcopy, it is safe to wait for decompress thread just in precopy. This is a preparation for later patch. Signed-off-by: Wei Yang Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/ram.c |

[PULL 18/29] migration/postcopy: set all_zero to true on the first target page

2020-01-14 Thread Juan Quintela
From: Wei Yang For the first target page, all_zero is set to true for this round check. After target_pages introduced, we could leverage this variable instead of checking the address offset. Signed-off-by: Wei Yang Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Signed-off-by:

Re: [PULL 0/3] capstone update

2020-01-14 Thread Peter Maydell
On Mon, 13 Jan 2020 at 19:53, Richard Henderson wrote: > > On 1/10/20 6:07 AM, Peter Maydell wrote: > > On Wed, 8 Jan 2020 at 04:23, Richard Henderson > > wrote: > >> > >> The following changes since commit > >> 035eed4c0d257c905a556fa0f4865a0c077b4e7f: > >> > >> Merge remote-tracking branch

RE: [for-5.0 PATCH 03/11] migration: introduce icount field for snapshots

2020-01-14 Thread Pavel Dovgalyuk
> From: Alex Bennée [mailto:alex.ben...@linaro.org] > Kevin Wolf writes: > > > Am 23.12.2019 um 10:47 hat Pavel Dovgalyuk geschrieben: > >> From: Pavel Dovgalyuk > >> > >> Saving icount as a parameters of the snapshot allows navigation between > >> them in the execution replay scenario. > >> Thi

[PULL 15/29] migration/postcopy: reduce memset when it is zero page and matches_target_page_size

2020-01-14 Thread Juan Quintela
From: Wei Yang In this case, page_buffer content would not be used. Skip this to save some time. Signed-off-by: Wei Yang Reviewed-by: Dr. David Alan Gilbert Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/ram.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion

[PULL 22/29] migration/multifd: not use multifd during postcopy

2020-01-14 Thread Juan Quintela
From: Wei Yang We don't support multifd during postcopy, but user still could enable both multifd and postcopy. This leads to migration failure. Skip multifd during postcopy. Signed-off-by: Wei Yang Reviewed-by: Juan Quintela Signed-off-by: Juan Quintela --- migration/ram.c | 9 ++--- 1

[PULL 20/29] migration/postcopy: enable compress during postcopy

2020-01-14 Thread Juan Quintela
From: Wei Yang postcopy requires to place a whole host page, while migration thread migrate memory in target page size. This makes postcopy need to collect all target pages in one host page before placing via userfaultfd. To enable compress during postcopy, there are two problems to solve:

Re: [PATCH] qemu-nbd: Convert invocation documentation to rST

2020-01-14 Thread Peter Maydell
On Mon, 13 Jan 2020 at 19:58, Eric Blake wrote: > > On 1/13/20 12:08 PM, Peter Maydell wrote: > > The qemu-nbd documentation is currently in qemu-nbd.texi in Texinfo > > format, which we present to the user as: > > * a qemu-nbd manpage > > * a section of the main qemu-doc HTML documentation >

[PULL 19/29] migration/postcopy: enable random order target page arrival

2020-01-14 Thread Juan Quintela
From: Wei Yang After using number of target page received to track one host page, we could have the capability to handle random order target page arrival in one host page. This is a preparation for enabling compress during postcopy. Signed-off-by: Wei Yang Reviewed-by: Dr. David Alan Gilbert

[PULL 27/29] migration: Change SaveStateEntry.instance_id into uint32_t

2020-01-14 Thread Juan Quintela
From: Peter Xu It was always used as 32bit, so define it as used to be clear. Instead of using -1 as the auto-gen magic value, we switch to UINT32_MAX. We also make sure that we don't auto-gen this value to avoid overflowed instance IDs without being noticed. Suggested-by: Juan Quintela Signed

[PULL 23/29] migration/multifd: fix nullptr access in terminating multifd threads

2020-01-14 Thread Juan Quintela
From: Jiahui Cen One multifd channel will shutdown all the other multifd's IOChannel when it fails to receive an IOChannel. In this senario, if some multifds had not received its IOChannel yet, it would try to shutdown its IOChannel which could cause nullptr access at qio_channel_shutdown. Here

[PULL 24/29] migration/multifd: fix destroyed mutex access in terminating multifd threads

2020-01-14 Thread Juan Quintela
From: Jiahui Cen One multifd will lock all the other multifds' IOChannel mutex to inform them to quit by setting p->quit or shutting down p->c. In this senario, if some multifds had already been terminated and multifd_load_cleanup/multifd_save_cleanup had destroyed their mutex, it could cause de

[PULL 21/29] migration/multifd: clean pages after filling packet

2020-01-14 Thread Juan Quintela
From: Wei Yang This is a preparation for the next patch: not use multifd during postcopy. Without enabling postcopy, everything looks good. While after enabling postcopy, migration may fail even not use multifd during postcopy. The reason is the pages is not properly cleared and *old* targe

[PULL 29/29] migration: Support QLIST migration

2020-01-14 Thread Juan Quintela
From: Eric Auger Support QLIST migration using the same principle as QTAILQ: 94869d5c52 ("migration: migrate QTAILQ"). The VMSTATE_QLIST_V macro has the same proto as VMSTATE_QTAILQ_V. The change mainly resides in QLIST RAW macros: QLIST_RAW_INSERT_HEAD and QLIST_RAW_REVERSE. Tests also are pro

[PULL 1/1] trace: update qemu-trace-stap to Python 3

2020-01-14 Thread Stefan Hajnoczi
qemu-trace-stap does not support Python 3 yet: $ scripts/qemu-trace-stap list path/to/qemu-system-x86_64 Traceback (most recent call last): File "scripts/qemu-trace-stap", line 175, in main() File "scripts/qemu-trace-stap", line 171, in main args.func(args) File "scrip

[PULL 0/1] Tracing patches

2020-01-14 Thread Stefan Hajnoczi
The following changes since commit dc65a5bdc9fa543690a775b50d4ffbeb22c56d6d: Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-5.0-20200108' into staging (2020-01-10 16:15:04 +) are available in the Git repository at: https://github.com/stefanha/qemu.git tags/tracing-pull-reque

[PULL 26/29] migration: Define VMSTATE_INSTANCE_ID_ANY

2020-01-14 Thread Juan Quintela
From: Peter Xu Define the new macro VMSTATE_INSTANCE_ID_ANY for callers who wants to auto-generate the vmstate instance ID. Previously it was hard coded as -1 instead of this macro. It helps to change this default value in the follow up patches. No functional change. Signed-off-by: Peter Xu

[PULL 0/1] Block patches

2020-01-14 Thread Stefan Hajnoczi
The following changes since commit dc65a5bdc9fa543690a775b50d4ffbeb22c56d6d: Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-5.0-20200108' into staging (2020-01-10 16:15:04 +) are available in the Git repository at: https://github.com/stefanha/qemu.git tags/block-pull-request

Re: Semihosting, arm, riscv, ppc and common code

2020-01-14 Thread Alex Bennée
Benjamin Herrenschmidt writes: > On Tue, 2020-01-14 at 09:32 +0200, Liviu Ionescu wrote: >> > On 14 Jan 2020, at 08:25, Benjamin Herrenschmidt < >> > b...@kernel.crashing.org> wrote: >> > >> > I noticed that the bulk of arm-semi.c (or riscv-semi.c) is >> > trivially >> > made completely generi

[PATCH] migration: Maybe VM is paused when migration is cancelled

2020-01-14 Thread Zhimin Feng
If the migration is cancelled when it is in the completion phase, the migration state is set to MIGRATION_STATUS_CANCELLING. The VM maybe wait for the 'pause_sem' semaphore in migration_maybe_pause function, so that VM always is paused. Reported-by: Euler Robot Signed-off-by: Zhimin Feng --- mi

[PULL 1/2] ui: Print available display backends with '-display help'

2020-01-14 Thread Gerd Hoffmann
From: Thomas Huth We already print availabled devices with "-device help", or available backends with "-netdev help" or "-chardev help". Let's provide a way for the users to query the available display backends, too. Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé Signed-

Re: Semihosting, arm, riscv, ppc and common code

2020-01-14 Thread Peter Maydell
On Tue, 14 Jan 2020 at 06:29, Benjamin Herrenschmidt wrote: > > Hi Folks ! > > So I started "porting" over (read: copying) the arm semihosting code to > ppc to mimmic what Keith did for risv (mostly for picolibc support). > > I noticed that the bulk of arm-semi.c (or riscv-semi.c) is trivially > m

Re: [PATCH v3 1/2] migration: Fix incorrect integer->float conversion caught by clang

2020-01-14 Thread Markus Armbruster
Markus Armbruster writes: > Juan Quintela writes: > >> Markus Armbruster wrote: >>> From: Fangrui Song >>> >>> Clang does not like qmp_migrate_set_downtime()'s code to clamp double >>> @value to 0..INT64_MAX: >>> >>> qemu/migration/migration.c:2038:24: error: implicit conversion from >>>

Call for sponsors for Outreachy 2020 May-August

2020-01-14 Thread Stefan Hajnoczi
QEMU has participated in the Outreachy open source internship program for the past years thanks to the generous sponsorship of companies supporting our community. This year QEMU will apply as an Outreachy organization again so we can provide internships to anyone who faces under-representation, sy

[PULL 0/2] Ui 20200114 patches

2020-01-14 Thread Gerd Hoffmann
The following changes since commit 3c8a6575985b1652b45bfa670b5e1907d642cfa0: Merge remote-tracking branch 'remotes/kraxel/tags/usb-20200113-pull-request' into staging (2020-01-13 14:19:57 +) are available in the Git repository at: git://git.kraxel.org/qemu tags/ui-20200114-pu

Re: [Xen-devel] [PATCH 6/6] xen-pt: Round pci regions sizes to XEN_PAGE_SIZE

2020-01-14 Thread Roger Pau Monné
On Mon, Jan 13, 2020 at 02:01:47PM -0500, Jason Andryuk wrote: > On Fri, Mar 22, 2019 at 3:43 PM Jason Andryuk wrote: > > > > On Thu, Mar 21, 2019 at 11:09 PM Roger Pau Monné > > wrote: > > > > > > On Wed, Mar 20, 2019 at 01:28:47PM -0400, Jason Andryuk wrote: > > > > On Fri, Mar 15, 2019 at 12:

[PULL 2/2] display/gtk: get proper refreshrate

2020-01-14 Thread Gerd Hoffmann
From: Nikola Pavlica Because some VMs in QEMU can get GPU virtualization (using technologies such as iGVT-g, as mentioned previously), they could produce a video output that had a higher display refresh rate than of what the GTK display was displaying. (fxp. Playing a video game inside of a Windo

Re: [PATCH 066/104] virtiofsd: passthrough_ll: add renameat2 support

2020-01-14 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Mon, Jan 13, 2020 at 08:06:24PM +, Dr. David Alan Gilbert wrote: > > * Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: > > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > > On Thu, Dec 12, 2019 at 04:38:26PM +, Dr. David A

Re: [PATCH] qemu-deprecated: Remove text about Python 2

2020-01-14 Thread Thomas Huth
On 13/01/2020 23.36, John Snow wrote: > > > On 1/9/20 4:51 AM, Thomas Huth wrote: >> Python 2 support has been removed, so we should now also remove >> the announcement text for the deprecation. >> >> Signed-off-by: Thomas Huth > > Reviewed-by: John Snow > >> --- >> qemu-deprecated.texi | 8

Re: [PATCH] virtio-9p-device: fix memleak in virtio_9p_device_unrealize

2020-01-14 Thread Christian Schoenebeck
On Dienstag, 14. Januar 2020 08:40:20 CET pannengy...@huawei.com wrote: > From: Pan Nengyuan > > v->vq forgot to cleanup in virtio_9p_device_unrealize, the memory leak > stack is as follow: > > Direct leak of 14336 byte(s) in 2 object(s) allocated from: > #0 0x7f819ae43970 (/lib64/libasan.so.5

Re: [PATCH 066/104] virtiofsd: passthrough_ll: add renameat2 support

2020-01-14 Thread Daniel P . Berrangé
On Tue, Jan 14, 2020 at 10:07:03AM +, Dr. David Alan Gilbert wrote: > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > On Mon, Jan 13, 2020 at 08:06:24PM +, Dr. David Alan Gilbert wrote: > > > * Dr. David Alan Gilbert (dgilb...@redhat.com) wrote: > > > > * Daniel P. Berrangé (berra...@

[PATCH v2 1/3] target/riscv: Fix tb->flags FS status

2020-01-14 Thread shihpo . hung
It was found that running libquantum on riscv-linux qemu produced an incorrect result. After investigation, FP registers are not saved during context switch due to incorrect mstatus.FS. In current implementation tb->flags merges all non-disabled state to dirty. This means the code in mark_fs_dirty

[PATCH v2 2/3] target/riscv: fsd/fsw doesn't dirty FP state

2020-01-14 Thread shihpo . hung
Signed-off-by: ShihPo Hung --- target/riscv/insn_trans/trans_rvd.inc.c | 1 - target/riscv/insn_trans/trans_rvf.inc.c | 1 - 2 files changed, 2 deletions(-) diff --git a/target/riscv/insn_trans/trans_rvd.inc.c b/target/riscv/insn_trans/trans_rvd.inc.c index 393fa02..ea1044f 100644 --- a/target/

[PATCH v2 3/3] target/riscv: update mstatus.SD when FS is set dirty

2020-01-14 Thread shihpo . hung
remove the check becuase SD bit should summarize FS and XS fields unconditionally. Signed-off-by: ShihPo Hung --- target/riscv/csr.c | 3 +-- target/riscv/translate.c | 1 + 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/target/riscv/csr.c b/target/riscv/csr.c index da02f9f

[PULL 1/6] qapi: Tweak "command returns a nice type" check for clarity

2020-01-14 Thread Markus Armbruster
Signed-off-by: Markus Armbruster Message-Id: <20191120182551.23795-2-arm...@redhat.com> Reviewed-by: Eric Blake --- scripts/qapi/schema.py | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/scripts/qapi/schema.py b/scripts/qapi/schema.py index cf0045f34e..cfb574c85d 100

Re: [PATCH/RFC 0/1] Vhost User Cross Cable: Intro

2020-01-14 Thread Stefan Hajnoczi
On Fri, Jan 10, 2020 at 10:34 AM Marc-André Lureau wrote: > On Wed, Jan 8, 2020 at 5:57 AM V. wrote: Hi V., I think I remember you from Etherboot/gPXE days :). > > 3. > > Now if Cross Cable is actually a new and (after a code-rewrite of 10) a > > viable way to connect 2 QEMU's together, could

Re: [PATCH] qemu-deprecated: Remove text about Python 2

2020-01-14 Thread Daniel P . Berrangé
On Tue, Jan 14, 2020 at 11:08:16AM +0100, Thomas Huth wrote: > On 13/01/2020 23.36, John Snow wrote: > > > > > > On 1/9/20 4:51 AM, Thomas Huth wrote: > >> Python 2 support has been removed, so we should now also remove > >> the announcement text for the deprecation. > >> > >> Signed-off-by: Thom

[PULL 0/6] QAPI patches for 2020-01-14

2020-01-14 Thread Markus Armbruster
My previous pull request failed tests with Python 2, which is now gone. Try again. The following changes since commit dc65a5bdc9fa543690a775b50d4ffbeb22c56d6d: Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-5.0-20200108' into staging (2020-01-10 16:15:04 +) are available in t

[PULL 6/6] qapi: Simplify QAPISchemaModularCVisitor

2020-01-14 Thread Markus Armbruster
Since the previous commit, QAPISchemaVisitor.visit_module() is called just once. Simplify QAPISchemaModularCVisitor accordingly. Signed-off-by: Markus Armbruster Message-Id: <20191120182551.23795-7-arm...@redhat.com> Reviewed-by: Eric Blake --- scripts/qapi/commands.py | 2 +- scripts/qapi/ev

[PULL 2/6] tests/Makefile.include: Fix missing test-qapi-emit-events.[ch]

2020-01-14 Thread Markus Armbruster
Commit 5d75648b56 "qapi: Generate QAPIEvent stuff into separate files" added tests/test-qapi-emit-events.[ch] to the set of generated files, but neglected to update tests/.gitignore and tests/Makefile.include. Commit a0af8cee3c "tests/.gitignore: ignore test-qapi-emit-events.[ch] for in-tree builds

[PULL 5/6] qapi: Fix code generation for empty modules

2020-01-14 Thread Markus Armbruster
When a sub-module doesn't contain any definitions, we don't generate code for it, but we do generate the #include. We generate code only for modules that get visited. QAPISchema.visit() visits only modules that have definitions. It can visit modules multiple times. Clean this up as follows. Col

Re: [PATCH v2 03/10] target/ppc: Correct handling of real mode accesses with vhyp on hash MMU

2020-01-14 Thread Cédric Le Goater
On 1/7/20 5:48 AM, David Gibson wrote: > On ppc we have the concept of virtual hypervisor ("vhyp") mode, where we > only model the non-hypervisor-privileged parts of the cpu. Essentially we > model the hypervisor's behaviour from the point of view of a guest OS, but > we don't model the hypervisor

[PULL 3/6] qapi: Generate command registration stuff into separate files

2020-01-14 Thread Markus Armbruster
Having to include qapi-commands.h just for qmp_init_marshal() is suboptimal. Generate it into separate files. This lets monitor/misc.c, qga/main.c, and the generated qapi-commands-FOO.h include less. Signed-off-by: Markus Armbruster Message-Id: <20191120182551.23795-4-arm...@redhat.com> [Typos

[PULL 4/6] qapi: Proper intermediate representation for modules

2020-01-14 Thread Markus Armbruster
Modules are represented only by their names so far. Introduce class QAPISchemaModule. So far, it merely wraps the name. The next patch will put it to more interesting use. Once again, arrays spice up the patch a bit. For any other type, @info points to the definition, which lets us map from @i

[PATCH v3 0/5] aspeed: extensions and fixes

2020-01-14 Thread Cédric Le Goater
Hi, Here is a short series adding : - a new eMMC controller model for the AST2600 SoC (Andrew) - accessors to control the led state of the pca9552 device (Joel) - a 'execute-in-place' property to boot directly from CE0 Thanks, C. Changes since v2: - wrote a better commit log for the ftgm

[PATCH v3 1/5] hw/sd: Configure number of slots exposed by the ASPEED SDHCI model

2020-01-14 Thread Cédric Le Goater
From: Andrew Jeffery The AST2600 includes a second cut-down version of the SD/MMC controller found in the AST2500, named the eMMC controller. It's cut down in the sense that it only supports one slot rather than two, but it brings the total number of slots supported by the AST2600 to three. The

[PATCH v3 2/5] hw/arm: ast2600: Wire up the eMMC controller

2020-01-14 Thread Cédric Le Goater
From: Andrew Jeffery Initialise another SDHCI model instance for the AST2600's eMMC controller and use the SDHCI's num_slots value introduced previously to determine whether we should create an SD card instance for the new slot. Signed-off-by: Andrew Jeffery Reviewed-by: Cédric Le Goater Revie

[PATCH v3 4/5] hw/arm/aspeed: add a 'execute-in-place' property to boot directly from CE0

2020-01-14 Thread Cédric Le Goater
The overhead for the OpenBMC firmware images using the a custom U-Boot is around 2 seconds, which is fine, but with a U-Boot from mainline, it takes an extra 50 seconds or so to reach Linux. A quick survey on the number of reads performed on the flash memory region gives the following figures :

Re: [PATCH v3 08/15] block/file-posix.c: extend to use io_uring

2020-01-14 Thread Stefan Hajnoczi
On Mon, Jan 13, 2020 at 12:49:27PM +0100, Stefano Garzarella wrote: > On Wed, Dec 18, 2019 at 04:32:21PM +, Stefan Hajnoczi wrote: > > @@ -503,9 +504,11 @@ static int raw_open_common(BlockDriverState *bs, QDict > > *options, > > goto fail; > > } > > > > -aio_default = (bdrv

[PATCH v3 3/5] ftgmac100: check RX and TX buffer alignment

2020-01-14 Thread Cédric Le Goater
These buffers should be aligned on 16 bytes. Ignore invalid RX and TX buffer addresses and log an error. All incoming and outgoing traffic will be dropped because no valid RX or TX descriptors will be available. Signed-off-by: Cédric Le Goater --- hw/net/ftgmac100.c | 13 + 1 file c

[PATCH v3 5/5] misc/pca9552: Add qom set and get

2020-01-14 Thread Cédric Le Goater
From: Joel Stanley Following the pattern of the work recently done with the ASPEED GPIO model, this adds support for inspecting and modifying the PCA9552 LEDs from the monitor. (qemu) qom-set /machine/unattached/device[17] led0 on (qemu) qom-set /machine/unattached/device[17] led0 off (qemu

Re: [PATCH v3 04/15] block/io_uring: implements interfaces for io_uring

2020-01-14 Thread Stefan Hajnoczi
On Mon, Jan 13, 2020 at 12:24:07PM +0100, Stefano Garzarella wrote: > On Wed, Dec 18, 2019 at 04:32:17PM +, Stefan Hajnoczi wrote: > > From: Aarushi Mehta > > > > Aborts when sqe fails to be set as sqes cannot be returned to the > > ring. Adds slow path for short reads for older kernels > >

Re: [PATCH 1/4] linux-user: Use `qemu_log' for non-strace logging

2020-01-14 Thread Alex Bennée
Josh Kunz writes: > This change introduces a new logging mask "LOG_USER", which is used for > masking general user-mode logging. This change also switches all non-strace > uses of `gemu_log' in linux-user/ to use `qemu_log_mask(LOG_USER, ...)' > instead. This allows the user to easily log to a

Re: Priority of -accel

2020-01-14 Thread Paolo Bonzini
On 14/01/20 09:59, Markus Armbruster wrote: > Paolo Bonzini writes: > >> On 13/01/20 17:17, Markus Armbruster wrote: >>> Perfect opportunity to change the default to something more useful. >> >> I am not sure acutally if it's that more useful, now that we have >> sanctioned qemu-kvm as the fast a

Re: [PATCH v2] hw/usb: Introduce Kconfig switches for the CCID card devices

2020-01-14 Thread Thomas Huth
On 13/01/2020 10.44, Gerd Hoffmann wrote: > On Tue, Jan 07, 2020 at 08:36:07AM +0100, Gerd Hoffmann wrote: >> On Wed, Dec 11, 2019 at 11:20:29AM +0100, Thomas Huth wrote: >>> In our downstream distribution of QEMU, we need more fine-grained >>> control on the set of CCID card devices that we want t

Re: [PATCH 2/4] linux-user: Use `qemu_log' for strace

2020-01-14 Thread Alex Bennée
Josh Kunz writes: > This change switches linux-user strace logging to use the newer `qemu_log` > logging subsystem rather than the older `gemu_log` (notice the "g") > logger. `qemu_log` has several advantages, namely that it allows logging > to a file, and provides a more unified interface for

Re: [PATCH 3/4] linux-user: remove gemu_log from the linux-user tree

2020-01-14 Thread Alex Bennée
Josh Kunz writes: > Now that all uses have been migrated to `qemu_log' it is no longer > needed. > > Signed-off-by: Josh Kunz Reviewed-by: Alex Bennée > --- > linux-user/main.c | 9 - > linux-user/qemu.h | 1 - > 2 files changed, 10 deletions(-) > > diff --git a/linux-user/main.c b

[PATCH v4 02/15] qapi/block-core: add option for io_uring

2020-01-14 Thread Stefan Hajnoczi
From: Aarushi Mehta Since io_uring is the actual name of the Linux API, we use it as enum value even though the QAPI schema conventions would prefer io-uring. Signed-off-by: Aarushi Mehta Acked-by: Markus Armbruster Acked-by: Stefano Garzarella Signed-off-by: Stefan Hajnoczi --- v12: * Rewo

[PATCH v4 00/15] io_uring: add Linux io_uring AIO engine

2020-01-14 Thread Stefan Hajnoczi
v13: * Drop unnecessary changes in Patch 8 [Stefano] v12: * Reword BlockdevAioOptions QAPI schema commit description [Markus] * Increase QAPI "Since: 4.2" to "Since: 5.0" * Explain rationale for io_uring stubs in commit description [Kevin] * Tried to use file.aio=io_uring instead of BDRV_O_IO

[PATCH v4 01/15] configure: permit use of io_uring

2020-01-14 Thread Stefan Hajnoczi
From: Aarushi Mehta Signed-off-by: Aarushi Mehta Reviewed-by: Maxim Levitsky Acked-by: Stefano Garzarella Signed-off-by: Stefan Hajnoczi --- configure | 27 +++ 1 file changed, 27 insertions(+) diff --git a/configure b/configure index 08c3a1c1f0..ca0af11db0 100755 --

[PATCH v4 03/15] block/block: add BDRV flag for io_uring

2020-01-14 Thread Stefan Hajnoczi
From: Aarushi Mehta Signed-off-by: Aarushi Mehta Reviewed-by: Maxim Levitsky Acked-by: Stefano Garzarella Signed-off-by: Stefan Hajnoczi --- include/block/block.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/block/block.h b/include/block/block.h index e9dcfef7fa..ea155da45a 10

[PATCH v4 04/15] block/io_uring: implements interfaces for io_uring

2020-01-14 Thread Stefan Hajnoczi
From: Aarushi Mehta Aborts when sqe fails to be set as sqes cannot be returned to the ring. Adds slow path for short reads for older kernels Signed-off-by: Aarushi Mehta Acked-by: Stefano Garzarella Signed-off-by: Stefan Hajnoczi --- v11: * Fix git bisect compilation breakage: move trace_lur

[PATCH v4 05/15] stubs: add stubs for io_uring interface

2020-01-14 Thread Stefan Hajnoczi
From: Aarushi Mehta Follow linux-aio.o and stub out the block/io_uring.o APIs that will be missing when a binary is linked with obj-util-y but without block-util-y (e.g. vhost-user-gpu). For example, the stubs are necessary so that a binary using util/async.o from obj-util-y for qemu_bh_new() li

[PATCH] target/arm: add PMU feature to cortex-r5 and cortex-r5f

2020-01-14 Thread Clement Deschamps
Signed-off-by: Clement Deschamps --- See cortex-r5 TRM - 1.3 Features PMU is not optional on cortex-r5 and cortex-r5f --- target/arm/cpu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/arm/cpu.c b/target/arm/cpu.c index d62fd5fdc6..64cd0a7d73 100644 --- a/target/arm/cpu.c +++ b/targ

  1   2   3   4   5   >