Re: [Qemu-devel] [PULL 0/6] Usb 20180917 patches

2018-09-25 Thread Gerd Hoffmann
On Tue, Sep 25, 2018 at 11:05:29AM +0100, Peter Maydell wrote: > On 17 September 2018 at 10:56, Gerd Hoffmann wrote: > > The following changes since commit 19b599f7664b2ebfd0f405fb79c14dd241557452: > > > > Merge remote-tracking branch > > 'remotes/armbru/tags/pull-error-2018-08-27-v2' into

[Qemu-devel] [PATCH v2] virtio: Return true from virtio_queue_empty if broken

2018-09-25 Thread Fam Zheng
Both virtio-blk and virtio-scsi use virtio_queue_empty() as the loop condition in VQ handlers (virtio_blk_handle_vq, virtio_scsi_handle_cmd_vq). When a device is marked broken in virtqueue_pop, for example if a vIOMMU address translation failed, we want to break out of the loop. This fixes a

[Qemu-devel] [PULL 01/25] filter-rewriter: Add TCP state machine and fix memory leak in connection_track_table

2018-09-25 Thread Jason Wang
From: Zhang Chen We add almost full TCP state machine in filter-rewriter, except TCPS_LISTEN and some simplify in VM active close FIN states. The reason for this simplify job is because guest kernel will track the TCP status and wait 2MSL time too, if client resend the FIN packet, guest will

[Qemu-devel] [PULL 00/25] Net patches

2018-09-25 Thread Jason Wang
The following changes since commit c5e4e49258e9b89cb34c085a419dd9f862935c48: Merge remote-tracking branch 'remotes/xanclic/tags/pull-block-2018-09-25' into staging (2018-09-25 16:47:35 +0100) are available in the Git repository at: https://github.com/jasowang/qemu.git tags/net-pull-request

[Qemu-devel] [PULL 07/25] COLO: Load dirty pages into SVM's RAM cache firstly

2018-09-25 Thread Jason Wang
From: Zhang Chen We should not load PVM's state directly into SVM, because there maybe some errors happen when SVM is receving data, which will break SVM. We need to ensure receving all data before load the state into SVM. We use an extra memory to cache these data (PVM's ram). The ram cache in

[Qemu-devel] [PULL 02/25] colo-compare: implement the process of checkpoint

2018-09-25 Thread Jason Wang
From: Zhang Chen While do checkpoint, we need to flush all the unhandled packets, By using the filter notifier mechanism, we can easily to notify every compare object to do this process, which runs inside of compare threads as a coroutine. Signed-off-by: zhanghailiang Signed-off-by: Zhang Chen

[Qemu-devel] [PULL 12/25] qapi: Add new command to query colo status

2018-09-25 Thread Jason Wang
From: Zhang Chen Libvirt or other high level software can use this command query colo status. You can test this command like that: {'execute':'query-colo-status'} Signed-off-by: Zhang Chen Signed-off-by: Zhang Chen Signed-off-by: Jason Wang --- migration/colo.c| 21 +

[Qemu-devel] [PULL 03/25] colo-compare: use notifier to notify packets comparing result

2018-09-25 Thread Jason Wang
From: Zhang Chen It's a good idea to use notifier to notify COLO frame of inconsistent packets comparing. Signed-off-by: Zhang Chen Signed-off-by: Zhang Chen Signed-off-by: zhanghailiang Signed-off-by: Jason Wang --- net/colo-compare.c | 37 ++---

[Qemu-devel] [PULL 16/25] filter-rewriter: handle checkpoint and failover event

2018-09-25 Thread Jason Wang
From: Zhang Chen After one round of checkpoint, the states between PVM and SVM become consistent, so it is unnecessary to adjust the sequence of net packets for old connections, besides, while failover happens, filter-rewriter will into failover mode that needn't handle the new TCP connection.

[Qemu-devel] [PULL 06/25] COLO: Remove colo_state migration struct

2018-09-25 Thread Jason Wang
From: Zhang Chen We need to know if migration is going into COLO state for incoming side before start normal migration. Instead by using the VMStateDescription to send colo_state from source side to destination side, we use MIG_CMD_ENABLE_COLO to indicate whether COLO is enabled or not.

[Qemu-devel] [PULL 04/25] COLO: integrate colo compare with colo frame

2018-09-25 Thread Jason Wang
From: Zhang Chen For COLO FT, both the PVM and SVM run at the same time, only sync the state while it needs. So here, let SVM runs while not doing checkpoint, change DEFAULT_MIGRATE_X_CHECKPOINT_DELAY to 200*100. Besides, we forgot to release colo_checkpoint_semd and colo_delay_timer, fix them

[Qemu-devel] [PULL 08/25] ram/COLO: Record the dirty pages that SVM received

2018-09-25 Thread Jason Wang
From: Zhang Chen We record the address of the dirty pages that received, it will help flushing pages that cached into SVM. Here, it is a trick, we record dirty pages by re-using migration dirty bitmap. In the later patch, we will start the dirty log for SVM, just like migration, in this way, we

[Qemu-devel] [PULL 18/25] COLO: quick failover process by kick COLO thread

2018-09-25 Thread Jason Wang
From: zhanghailiang COLO thread may sleep at qemu_sem_wait(>colo_checkpoint_sem), while failover works begin, It's better to wakeup it to quick the process. Signed-off-by: zhanghailiang Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Jason Wang --- migration/colo.c | 8 1 file

[Qemu-devel] [PULL 13/25] savevm: split the process of different stages for loadvm/savevm

2018-09-25 Thread Jason Wang
From: Zhang Chen There are several stages during loadvm/savevm process. In different stage, migration incoming processes different types of sections. We want to control these stages more accuracy, it will benefit COLO performance, we don't have to save type of QEMU_VM_SECTION_START sections

[Qemu-devel] [PULL 05/25] COLO: Add block replication into colo process

2018-09-25 Thread Jason Wang
From: Zhang Chen Make sure master start block replication after slave's block replication started. Besides, we need to activate VM's blocks before goes into COLO state. Signed-off-by: zhanghailiang Signed-off-by: Li Zhijian Signed-off-by: Zhang Chen Signed-off-by: Zhang Chen Signed-off-by:

[Qemu-devel] [PULL 11/25] qapi/migration.json: Rename COLO unknown mode to none mode.

2018-09-25 Thread Jason Wang
From: Zhang Chen Suggested by Markus Armbruster rename COLO unknown mode to none mode. Signed-off-by: Zhang Chen Signed-off-by: Zhang Chen Reviewed-by: Eric Blake Reviewed-by: Markus Armbruster Signed-off-by: Jason Wang --- migration/colo-failover.c | 2 +- migration/colo.c | 2

[Qemu-devel] [PULL 21/25] ne2000: fix possible out of bound access in ne2000_receive

2018-09-25 Thread Jason Wang
In ne2000_receive(), we try to assign size_ to size which converts from size_t to integer. This will cause troubles when size_ is greater INT_MAX, this will lead a negative value in size and it can then pass the check of size < MIN_BUF_SIZE which may lead out of bound access of for both buf and

[Qemu-devel] [PULL 15/25] filter: Add handle_event method for NetFilterClass

2018-09-25 Thread Jason Wang
From: Zhang Chen Filter needs to process the event of checkpoint/failover or other event passed by COLO frame. Signed-off-by: zhanghailiang Signed-off-by: Zhang Chen Signed-off-by: Zhang Chen Signed-off-by: Jason Wang --- include/net/filter.h | 5 + net/filter.c | 17

[Qemu-devel] [PULL 09/25] COLO: Flush memory data from ram cache

2018-09-25 Thread Jason Wang
From: Zhang Chen During the time of VM's running, PVM may dirty some pages, we will transfer PVM's dirty pages to SVM and store them into SVM's RAM cache at next checkpoint time. So, the content of SVM's RAM cache will always be same with PVM's memory after checkpoint. Instead of flushing all

[Qemu-devel] [PULL 17/25] COLO: notify net filters about checkpoint/failover event

2018-09-25 Thread Jason Wang
From: zhanghailiang Notify all net filters about the checkpoint and failover event. Signed-off-by: zhanghailiang Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Jason Wang --- migration/colo.c | 15 +++ 1 file changed, 15 insertions(+) diff --git a/migration/colo.c

[Qemu-devel] [PULL 22/25] rtl8139: fix possible out of bound access

2018-09-25 Thread Jason Wang
In rtl8139_do_receive(), we try to assign size_ to size which converts from size_t to integer. This will cause troubles when size_ is greater INT_MAX, this will lead a negative value in size and it can then pass the check of size < MIN_BUF_SIZE which may lead out of bound access of for both buf

[Qemu-devel] [PULL 19/25] docs: Add COLO status diagram to COLO-FT.txt

2018-09-25 Thread Jason Wang
From: Zhang Chen This diagram make user better understand COLO. Suggested by Markus Armbruster. Signed-off-by: Zhang Chen Signed-off-by: Zhang Chen Signed-off-by: Jason Wang --- docs/COLO-FT.txt | 34 ++ 1 file changed, 34 insertions(+) diff --git

[Qemu-devel] [PULL 10/25] qmp event: Add COLO_EXIT event to notify users while exited COLO

2018-09-25 Thread Jason Wang
From: zhanghailiang If some errors happen during VM's COLO FT stage, it's important to notify the users of this event. Together with 'x-colo-lost-heartbeat', Users can intervene in COLO's failover work immediately. If users don't want to get involved in COLO's failover verdict, it is still

[Qemu-devel] [PULL 20/25] clean up callback when del virtqueue

2018-09-25 Thread Jason Wang
From: liujunjie Before, we did not clear callback like handle_output when delete the virtqueue which may result be segmentfault. The scene is as follows: 1. Start a vm with multiqueue vhost-net, 2. then we write VIRTIO_PCI_GUEST_FEATURES in PCI configuration to triger multiqueue disable in this

[Qemu-devel] [PULL 23/25] pcnet: fix possible buffer overflow

2018-09-25 Thread Jason Wang
In pcnet_receive(), we try to assign size_ to size which converts from size_t to integer. This will cause troubles when size_ is greater INT_MAX, this will lead a negative value in size and it can then pass the check of size < MIN_BUF_SIZE which may lead out of bound access for both buf and buf1.

[Qemu-devel] [PULL 25/25] e1000: indicate dropped packets in HW counters

2018-09-25 Thread Jason Wang
From: Martin Wilck The e1000 emulation silently discards RX packets if there's insufficient space in the ring buffer. This leads to errors on higher-level protocols in the guest, with no indication about the error cause. This patch increments the "Missed Packets Count" (MPC) and "Receive No

[Qemu-devel] [PULL 24/25] net: ignore packet size greater than INT_MAX

2018-09-25 Thread Jason Wang
There should not be a reason for passing a packet size greater than INT_MAX. It's usually a hint of bug somewhere, so ignore packet size greater than INT_MAX in qemu_deliver_packet_iov() CC: qemu-sta...@nongnu.org Reported-by: Daniel Shapira Reviewed-by: Michael S. Tsirkin Signed-off-by: Jason

[Qemu-devel] [PULL 14/25] COLO: flush host dirty ram from cache

2018-09-25 Thread Jason Wang
From: zhanghailiang Don't need to flush all VM's ram from cache, only flush the dirty pages since last checkpoint Signed-off-by: Li Zhijian Signed-off-by: Zhang Chen Signed-off-by: Zhang Chen Signed-off-by: zhanghailiang Reviewed-by: Dr. David Alan Gilbert Signed-off-by: Jason Wang ---

Re: [Qemu-devel] [PATCH] e1000: indicate dropped packets in HW counters

2018-09-25 Thread Jason Wang
On 2018年09月25日 16:56, Martin Wilck wrote: The e1000 emulation silently discards RX packets if there's insufficient space in the ring buffer. This leads to errors on higher-level protocols in the guest, with no indication about the error cause. This patch increments the "Missed Packets Count"

[Qemu-devel] [PULL 4/5] tests/vm: Use -cpu max rather than -cpu host

2018-09-25 Thread Fam Zheng
From: Peter Maydell -cpu max works with any accelerator, so we don't need to use it only conditionally if not using KVM. Just use it all the time. Signed-off-by: Peter Maydell Message-Id: <2018082014.23476-1-peter.mayd...@linaro.org> Signed-off-by: Fam Zheng --- tests/vm/basevm.py | 3

[Qemu-devel] [PULL 5/5] vmdk: align end of file to a sector boundary

2018-09-25 Thread Fam Zheng
From: yuchenlin There is a rare case which the size of last compressed cluster is larger than the cluster size, which will cause the file is not aligned at the sector boundary. There are three reasons to do it. First, if vmdk doesn't align at the sector boundary, there may be many undefined

[Qemu-devel] [PULL 2/5] aio-posix: compute timeout before polling

2018-09-25 Thread Fam Zheng
From: Paolo Bonzini This is a preparation for the next patch, and also a very small optimization. Compute the timeout only once, before invoking try_poll_mode, and adjust it in run_poll_handlers. The adjustment is the polling time when polling fails, or zero (non-blocking) if polling succeeds.

[Qemu-devel] [PULL 3/5] aio-posix: do skip system call if ctx->notifier polling succeeds

2018-09-25 Thread Fam Zheng
From: Paolo Bonzini Commit 70232b5253 ("aio-posix: Don't count ctx->notifier as progress when 2018-08-15), by not reporting progress, causes aio_poll to execute the system call when polling succeeds because of ctx->notifier. This introduces latency before the call to aio_bh_poll() and negates

[Qemu-devel] [PULL 1/5] aio-posix: fix concurrent access to poll_disable_cnt

2018-09-25 Thread Fam Zheng
From: Paolo Bonzini It is valid for an aio_set_fd_handler to happen concurrently with aio_poll. In that case, poll_disable_cnt can change under the heels of aio_poll, and the assertion on poll_disable_cnt can fail in run_poll_handlers. Therefore, this patch simply checks the counter on every

[Qemu-devel] [PULL 0/5] Block and testing patches

2018-09-25 Thread Fam Zheng
The following changes since commit c5e4e49258e9b89cb34c085a419dd9f862935c48: Merge remote-tracking branch 'remotes/xanclic/tags/pull-block-2018-09-25' into staging (2018-09-25 16:47:35 +0100) are available in the Git repository at: git://github.com/famz/qemu.git tags/staging-pull-request

Re: [Qemu-devel] [PATCH] tests/vm: Use -cpu max rather than -cpu host

2018-09-25 Thread Fam Zheng
On Tue, 09/25 15:54, Peter Maydell wrote: > Ping? Will send a pull request soon, thanks. Fam > > thanks > -- PMM > > On 20 August 2018 at 16:55, Peter Maydell wrote: > > -cpu max works with any accelerator, so we don't need > > to use it only conditionally if not using KVM. Just use > > it

Re: [Qemu-devel] [PATCH 0/4] Fix buffer overflow for packet greater than INT_MAX

2018-09-25 Thread Jason Wang
On 2018年09月25日 22:13, Michael S. Tsirkin wrote: On Tue, Sep 25, 2018 at 03:23:23PM +0800, Jason Wang wrote: Hi: This series tries to address the buffer overflow caused by converting from size_t to int in several nic model and net core. This is CVE-2018-10839. Please review. Thanks

Re: [Qemu-devel] [PATCH 4/4] net: ignore packet size greater than INT_MAX

2018-09-25 Thread Jason Wang
On 2018年09月25日 22:15, Michael S. Tsirkin wrote: On Tue, Sep 25, 2018 at 03:23:27PM +0800, Jason Wang wrote: There should not be a reason for passing a packet size greater than INT_MAX. It's usually a hint of bug somewhere, so ignore packet size greater than INT_MAX in

[Qemu-devel] [PATCH v3 5/5] block/backup: prohibit backup from using in-use bitmaps

2018-09-25 Thread John Snow
If the bitmap is locked, we shouldn't touch it. Signed-off-by: John Snow --- blockdev.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/blockdev.c b/blockdev.c index 751e153557..c998336a43 100644 --- a/blockdev.c +++ b/blockdev.c @@ -3512,10 +3512,10 @@ static

[Qemu-devel] [PATCH v3 4/5] block/dirty-bitmaps: prohibit enable/disable on locked/frozen bitmaps

2018-09-25 Thread John Snow
We're not being consistent about this. If it's in use by an operation, the user should not be able to change the behavior of that bitmap. Signed-off-by: John Snow --- blockdev.c | 26 -- 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/blockdev.c

[Qemu-devel] [PATCH v3 3/5] block/dirty-bitmaps: allow clear on disabled bitmaps

2018-09-25 Thread John Snow
Similarly to merge, it's OK to allow clear operations on disabled bitmaps, as this condition only means that they are not recording new writes. We are free to clear it if the user requests it. Signed-off-by: John Snow --- block/dirty-bitmap.c | 1 - blockdev.c | 8 2 files

[Qemu-devel] [PATCH v3 2/5] block/dirty-bitmaps: fix merge permissions

2018-09-25 Thread John Snow
We wish to prohibit merging to read-only bitmaps and frozen bitmaps, but "disabled" bitmaps only preclude their recording of live, new information. It does not prohibit them from manual writes at the behest of the user, as is the case for merge operations. Allow the merge to "disabled" bitmaps,

[Qemu-devel] [PATCH v3 0/5] dirty-bitmaps: fix QMP command permissions

2018-09-25 Thread John Snow
based on: jsnow/bitmaps staging branch This series builds on a previous standalone patch and adjusts the permission for all (or most) of the QMP bitmap commands. John Snow (5): block/dirty-bitmaps: add user_modifiable status checker block/dirty-bitmaps: fix merge permissions

[Qemu-devel] [PATCH v3 1/5] block/dirty-bitmaps: add user_modifiable status checker

2018-09-25 Thread John Snow
Instead of both frozen and qmp_locked checks, wrap it into one check. frozen implies the bitmap is split in two (for backup), and shouldn't be modified. qmp_locked implies it's being used by another operation, like being exported over NBD. In both cases it means we shouldn't allow the user to

Re: [Qemu-devel] [PATCH v5 6/8] target/mips: Define the R5900 CPU

2018-09-25 Thread Jürgen Urban
Hello Maciej, > Gesendet: Freitag, 21. September 2018 um 01:51 Uhr > Von: "Maciej W. Rozycki" > An: "Philippe Mathieu-Daudé" > Cc: "Fredrik Noring" , "Richard Henderson" > , "Aleksandar Markovic" > , "Aurelien Jarno" , "Petar > Jovanovic" , "Peter Maydell" > , "Jürgen Urban" , >

[Qemu-devel] [Bug 1793791] Re: Crash with nbd_reply_chunk_iter_receive: Assertion `chunk->flags & NBD_REPLY_FLAG_DONE' failed

2018-09-25 Thread Matthew Schumacher
Okay, this is probably a race condition bug. If remove: 1 and iothread='1' from the disk which causes the command to change from: -device virtio-blk- pci,iothread=iothread1,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio- disk0,id=virtio-disk0,bootindex=2,write-cache=on to -device

Re: [Qemu-devel] [PATCH 2/2] hw/pci-host/x86: extend the 64-bit PCI hole relative to the fw-assigned base

2018-09-25 Thread Laszlo Ersek
On 09/25/18 22:36, Alex Williamson wrote: > On Tue, 25 Sep 2018 00:13:46 +0200 > Laszlo Ersek wrote: > >> In commit 9fa99d2519cb ("hw/pci-host: Fix x86 Host Bridges 64bit PCI >> hole", 2017-11-16), we meant to expose such a 64-bit PCI MMIO aperture in >> the ACPI DSDT that would be at least as

Re: [Qemu-devel] [PATCH 2/2] hw/pci-host/x86: extend the 64-bit PCI hole relative to the fw-assigned base

2018-09-25 Thread Michael S. Tsirkin
On Tue, Sep 25, 2018 at 09:07:45PM +0300, Marcel Apfelbaum wrote: > Hi Laszlo, > > On 9/25/18 1:13 AM, Laszlo Ersek wrote: > > In commit 9fa99d2519cb ("hw/pci-host: Fix x86 Host Bridges 64bit PCI > > hole", 2017-11-16), we meant to expose such a 64-bit PCI MMIO aperture in > > the ACPI DSDT that

[Qemu-devel] [PULL v2 4/5] linux-user: write(fd, NULL, 0) parity with linux's treatment of same

2018-09-25 Thread Laurent Vivier
From: Tony Garnock-Jones Bring linux-user write(2) handling into line with linux for the case of a 0-byte write with a NULL buffer. Based on a patch originally written by Zhuowei Zhang. Addresses https://bugs.launchpad.net/qemu/+bug/1716292. >From Zhuowei Zhang's patch

[Qemu-devel] [PULL v2 1/5] linux-user: move TargetFdTrans functions to their own file

2018-09-25 Thread Laurent Vivier
This will ease to move out syscall functions from syscall.c Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson Message-Id: <2018082315.13781-1-laur...@vivier.eu> --- linux-user/Makefile.objs |2 +- linux-user/fd-trans.c| 1409 +

[Qemu-devel] [PULL v2 2/5] linux-user: add SO_LINGER to {g, s}etsockopt

2018-09-25 Thread Laurent Vivier
From: Carlo Marcelo Arenas Belón Original implementation for setsockopt by Chen Gang[1]; all bugs mine, including removing assignment for optname which hopefully makes the logic easier to follow and moving some variables to make the code more selfcontained. [1]

[Qemu-devel] [PULL v2 5/5] linux-user: do setrlimit selectively

2018-09-25 Thread Laurent Vivier
From: Max Filippov setrlimit guest calls that affect memory resources (RLIMIT_{AS,DATA,STACK}) may interfere with QEMU internal memory management. They may result in QEMU lockup because mprotect call in page_unprotect would fail with ENOMEM error code, causing infinite loop of SIGSEGV. E.g. it

[Qemu-devel] [PULL v2 3/5] linux-user: elf: mmap all the target-pages of hostpage for data segment

2018-09-25 Thread Laurent Vivier
From: Shivaprasad G Bhat If the hostpage size is greater than the TARGET_PAGESIZE, the target-pages of size TARGET_PAGESIZE are marked valid only till the length requested during the elfload. The glibc attempts to consume unused space in the last page of data segment(__libc_memalign() in

[Qemu-devel] [PULL v2 0/5] Linux user for 3.1 patches

2018-09-25 Thread Laurent Vivier
The following changes since commit 19b599f7664b2ebfd0f405fb79c14dd241557452: Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2018-08-27-v2' into staging (2018-08-27 16:44:20 +0100) are available in the Git repository at: git://github.com/vivier/qemu.git

Re: [Qemu-devel] [PATCH 2/2] hw/pci-host/x86: extend the 64-bit PCI hole relative to the fw-assigned base

2018-09-25 Thread Alex Williamson
On Tue, 25 Sep 2018 00:13:46 +0200 Laszlo Ersek wrote: > In commit 9fa99d2519cb ("hw/pci-host: Fix x86 Host Bridges 64bit PCI > hole", 2017-11-16), we meant to expose such a 64-bit PCI MMIO aperture in > the ACPI DSDT that would be at least as large as the new "pci-hole64-size" > property (2GB

Re: [Qemu-devel] [PATCH] cpus: fix TCG timer leak

2018-09-25 Thread Alex Bennée
Marc-André Lureau writes: > Spotted by ASAN: > > QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 tests/bios-tables-test > -p /x86_64/acpi/piix4/cpuhp > /x86_64/acpi/piix4/cpuhp: Could not access KVM kernel module: No such file or > directory > qemu-system-x86_64: failed to initialize

Re: [Qemu-devel] Fuzzing

2018-09-25 Thread Alex Bennée
Catena cyber writes: > Hi qemu people, > > My name is Philippe Antoine. > I am writing here after Stefan has asked me to. > > I have been integrating some projects with oss-fuzz. > And The latest is unicorn-engine, which is based on some version of the code > from qemu. > > You can take a

Re: [Qemu-devel] [PATCH v3 16/22] memory-device: add optional function get_device_id()

2018-09-25 Thread David Hildenbrand
On 24/09/2018 16:40, Igor Mammedov wrote: > On Thu, 20 Sep 2018 12:32:37 +0200 > David Hildenbrand wrote: > >> When reporting the id of virtio-based memory devices, we always have to >> take the one of the proxy device (parent), not the one of the memory >> device directly. >> >> Let's

Re: [Qemu-devel] [PATCH v3 13/22] memory-device: complete factoring out unplug handling

2018-09-25 Thread David Hildenbrand
On 24/09/2018 16:18, Igor Mammedov wrote: > On Thu, 20 Sep 2018 12:32:34 +0200 > David Hildenbrand wrote: > >> With the new memory device functions in place, we can factor out >> unplugging of memory devices completely. >> >> Signed-off-by: David Hildenbrand >> --- >> hw/mem/memory-device.c

Re: [Qemu-devel] [PATCH v3 14/22] memory-device: trace when pre_assigning/assigning/unassigning addresses

2018-09-25 Thread David Hildenbrand
On 24/09/2018 15:54, Igor Mammedov wrote: > On Thu, 20 Sep 2018 12:32:35 +0200 > David Hildenbrand wrote: > >> Let's trace the address when pre_pluggin/plugging/unplugging a memory device. >> >> Trace it when pre_plugging as well as when plugging, so we really know >> when a specific address is

Re: [Qemu-devel] [PATCH v3 15/22] hw/acpi-build: only indicate nvdimm and pc-dimm

2018-09-25 Thread David Hildenbrand
On 24/09/2018 16:22, Igor Mammedov wrote: > On Thu, 20 Sep 2018 12:32:36 +0200 > David Hildenbrand wrote: > >> Once we have other memory devices that are not ACPI devices (e.g. >> virtio based), we cannot indicate them via ACPI. So let's skip these >> devices. >> >> Signed-off-by: David

Re: [Qemu-devel] [PATCH 1/2] object: recommend a few type check macros

2018-09-25 Thread Eduardo Habkost
On Fri, Sep 21, 2018 at 03:13:31PM +0400, Marc-André Lureau wrote: > I sometime regret that we have to resort to long > object{_class}_dynamic_cast() calls instead of having a shorter and > more readable macros available, similar to the one recommended by > GObject

Re: [Qemu-devel] [PATCH 28/35] exec: access cpu->interrupt_request with atomics

2018-09-25 Thread Emilio G. Cota
On Wed, Sep 19, 2018 at 11:18:48 -0700, Richard Henderson wrote: > On 9/19/18 10:02 AM, Paolo Bonzini wrote: > > On 18/09/2018 23:07, Richard Henderson wrote: > >> On 9/17/18 9:30 AM, Emilio G. Cota wrote: > >>> From: Paolo Bonzini > >>> > >>> Cc: Peter Crosthwaite > >>> Cc: Richard Henderson >

[Qemu-devel] Fuzzing

2018-09-25 Thread Catena cyber
Hi qemu people, My name is Philippe Antoine. I am writing here after Stefan has asked me to. I have been integrating some projects with oss-fuzz. And The latest is unicorn-engine, which is based on some version of the code from qemu. You can take a look at

Re: [Qemu-devel] [PATCH 1/2] MAINTAINERS: Replace myself with John Snow for block jobs

2018-09-25 Thread John Snow
On 09/25/2018 12:12 AM, Jeff Cody wrote: > On Tue, Sep 25, 2018 at 12:09:15AM -0400, Jeff Cody wrote: >> I'll not be involved with day-to-day qemu development, and John >> Snow is a block jobs wizard. Have him take over block job >> maintainership duties. >> >> Signed-off-by: Jeff Cody >> ---

Re: [Qemu-devel] [PATCH 2/2] hw/pci-host/x86: extend the 64-bit PCI hole relative to the fw-assigned base

2018-09-25 Thread Marcel Apfelbaum
Hi Laszlo, On 9/25/18 1:13 AM, Laszlo Ersek wrote: In commit 9fa99d2519cb ("hw/pci-host: Fix x86 Host Bridges 64bit PCI hole", 2017-11-16), we meant to expose such a 64-bit PCI MMIO aperture in the ACPI DSDT that would be at least as large as the new "pci-hole64-size" property (2GB on i440fx,

Re: [Qemu-devel] [PATCH] cpus: fix TCG timer leak

2018-09-25 Thread Philippe Mathieu-Daudé
On 9/25/18 7:23 PM, Marc-André Lureau wrote: > Spotted by ASAN: > > QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 tests/bios-tables-test > -p /x86_64/acpi/piix4/cpuhp > /x86_64/acpi/piix4/cpuhp: Could not access KVM kernel module: No such file or > directory > qemu-system-x86_64: failed

Re: [Qemu-devel] [PATCH 1/2] hw/pci-host/x86: extract get_pci_hole64_start_value() helpers

2018-09-25 Thread Marcel Apfelbaum
On 9/25/18 1:13 AM, Laszlo Ersek wrote: Expose the calculated "hole64 start" GPAs as plain uint64_t values, extracting the internals of the current property getters. This patch doesn't change behavior. Cc: "Michael S. Tsirkin" Cc: Alex Williamson Cc: Marcel Apfelbaum Signed-off-by:

[Qemu-devel] [Bug 1778350] Re: Android-x86 4.4-r5 won't boot on QEMU since v2.11.0-rc2

2018-09-25 Thread Laszlo Ersek (Red Hat)
@navicrej -- can you please apply the series [Qemu-devel] [PATCH 0/2] hw/pci-host/x86: extend the 64-bit PCI hole relative to the fw-assigned base https://patchew.org/QEMU/20180924221346.16733-1-ler...@redhat.com/ on your end, and see if it makes a difference? (I don't expect it to, for the

Re: [Qemu-devel] [PATCH v3] qemu-img.c: add help for each command

2018-09-25 Thread Programmingkid
> On Sep 25, 2018, at 12:46 PM, Murilo Opsfelder Araujo > wrote: > > Hi, John. > > On Tue, Sep 25, 2018 at 11:39:49AM -0400, John Arbuckle wrote: >> Add the ability for the user to display help for a certain command. >> Example: qemu-img create --help >> >> What is printed is all the

Re: [Qemu-devel] [PATCH 0/2] hw/pci-host/x86: extend the 64-bit PCI hole relative to the fw-assigned base

2018-09-25 Thread Laszlo Ersek
On 09/25/18 17:04, Michael S. Tsirkin wrote: > On Tue, Sep 25, 2018 at 12:13:44AM +0200, Laszlo Ersek wrote: >> This is based on the discussion in the "[Qemu-devel] 64-bit MMIO >> aperture expansion" thread, which starts at >>

[Qemu-devel] [PATCH] cpus: fix TCG timer leak

2018-09-25 Thread Marc-André Lureau
Spotted by ASAN: QTEST_QEMU_BINARY=x86_64-softmmu/qemu-system-x86_64 tests/bios-tables-test -p /x86_64/acpi/piix4/cpuhp /x86_64/acpi/piix4/cpuhp: Could not access KVM kernel module: No such file or directory qemu-system-x86_64: failed to initialize KVM: No such file or directory

Re: [Qemu-devel] [PULL 00/42] Block patches

2018-09-25 Thread Peter Maydell
On 25 September 2018 at 16:14, Max Reitz wrote: > The following changes since commit 506e4a00de01e0b29fa83db5cbbc3d154253b4ea: > > Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-3.1-20180925' > into staging (2018-09-25 13:30:45 +0100) > > are available in

Re: [Qemu-devel] [PATCH 2/3] hw/s390x/css: Remove QEMU_PACKED from struct SenseId

2018-09-25 Thread Thomas Huth
On 2018-09-25 18:52, David Hildenbrand wrote: > On 25/09/2018 17:20, Thomas Huth wrote: >> The uint16_t member cu_type of struct SenseId is not naturally aligned, >> and since the struct is marked with QEMU_PACKED, this can lead to >> unaligned memory accesses - which does not work on

Re: [Qemu-devel] [PATCH 1/1] qmp, hmp: add PCI subsystem id and vendor id to PCI info

2018-09-25 Thread Markus Armbruster
This is now commit 5383a705207. Sorry for being late with my comments. "Denis V. Lunev" writes: > This is a long story. RedHat has relicensed Windows KVM device drivers > in 2018 and there was an agreement that to avoid WHQL driver conflict > software manufacturers should set proper PCI

Re: [Qemu-devel] [PATCH 2/3] hw/s390x/css: Remove QEMU_PACKED from struct SenseId

2018-09-25 Thread David Hildenbrand
On 25/09/2018 17:20, Thomas Huth wrote: > The uint16_t member cu_type of struct SenseId is not naturally aligned, > and since the struct is marked with QEMU_PACKED, this can lead to > unaligned memory accesses - which does not work on architectures like > Sparc. Thus remove the QEMU_PACKED here

Re: [Qemu-devel] [PATCH 2/3] hw/s390x/css: Remove QEMU_PACKED from struct SenseId

2018-09-25 Thread Cornelia Huck
On Tue, 25 Sep 2018 18:43:22 +0200 Thomas Huth wrote: > On 2018-09-25 18:14, Cornelia Huck wrote: > > On Tue, 25 Sep 2018 17:20:08 +0200 > > Thomas Huth wrote: > > > >> The uint16_t member cu_type of struct SenseId is not naturally aligned, > >> and since the struct is marked with

Re: [Qemu-devel] [PATCH v3] qemu-img.c: add help for each command

2018-09-25 Thread Murilo Opsfelder Araujo
Hi, John. On Tue, Sep 25, 2018 at 11:39:49AM -0400, John Arbuckle wrote: > Add the ability for the user to display help for a certain command. > Example: qemu-img create --help > > What is printed is all the options available to this command and an example. > > Signed-off-by: John Arbuckle

Re: [Qemu-devel] [PATCH 2/3] hw/s390x/css: Remove QEMU_PACKED from struct SenseId

2018-09-25 Thread Thomas Huth
On 2018-09-25 18:14, Cornelia Huck wrote: > On Tue, 25 Sep 2018 17:20:08 +0200 > Thomas Huth wrote: > >> The uint16_t member cu_type of struct SenseId is not naturally aligned, >> and since the struct is marked with QEMU_PACKED, this can lead to >> unaligned memory accesses - which does not work

Re: [Qemu-devel] [PATCH 1/3] hw/s390x/ipl: Fix alignment problems of S390IPLState members

2018-09-25 Thread Thomas Huth
On 2018-09-25 17:37, David Hildenbrand wrote: > On 25/09/2018 17:20, Thomas Huth wrote: >> The IplParameterBlock and QemuIplParameters structures are declared >> with QEMU_PACKED, so the compiler assumes that the structures do not >> need to be aligned in memory. Since the are listed after a

Re: [Qemu-devel] [PATCH] migration/ram.c: Avoid taking address of fields in packed MultiFDInit_t struct

2018-09-25 Thread Marc-André Lureau
On Tue, Sep 25, 2018 at 8:24 PM Peter Maydell wrote: > > Taking the address of a field in a packed struct is a bad idea, because > it might not be actually aligned enough for that pointer type (and > thus cause a crash on dereference on some host architectures). Newer > versions of clang warn

[Qemu-devel] [Bug 1791947] Re: isochronous usb device forwarding with windows 10 and xhci freezes

2018-09-25 Thread Florian Kaiser
Oh sorry... I am not subscribed to Qemu-devel yet. I'm redirecting the usb devices via virt-manager. Is there anything I can do? I attached the pcap file! Thank you very much! ** Attachment added: "wireshark usb isochron"

Re: [Qemu-devel] [PATCH 2/3] hw/s390x/css: Remove QEMU_PACKED from struct SenseId

2018-09-25 Thread Peter Maydell
On 25 September 2018 at 17:14, Cornelia Huck wrote: > On Tue, 25 Sep 2018 17:20:08 +0200 > Thomas Huth wrote: > >> The uint16_t member cu_type of struct SenseId is not naturally aligned, >> and since the struct is marked with QEMU_PACKED, this can lead to >> unaligned memory accesses - which

[Qemu-devel] [PATCH] migration/ram.c: Avoid taking address of fields in packed MultiFDInit_t struct

2018-09-25 Thread Peter Maydell
Taking the address of a field in a packed struct is a bad idea, because it might not be actually aligned enough for that pointer type (and thus cause a crash on dereference on some host architectures). Newer versions of clang warn about this: migration/ram.c:651:19: warning: taking address of

[Qemu-devel] [PULL 10/13] tests/migration: Speed up the test on ppc64

2018-09-25 Thread Thomas Huth
The SLOF boot process is always quite slow ... but we can speed it up a little bit by specifying "-nodefaults" and by using the "nvramrc" variable instead of "boot-command" (since "nvramrc" is evaluated earlier in the SLOF boot process than "boot-command"). Reviewed-by: Dr. David Alan Gilbert

[Qemu-devel] [PULL 11/13] Revert "check: Move wdt_ib700 test to common"

2018-09-25 Thread Thomas Huth
This reverts commit ee1f6c812b3240420dff07a3860060b7d4abfe09. The patch did not work as expected: The wdt_ib700 test is currently not run at all anymore. Signed-off-by: Thomas Huth --- tests/Makefile.include | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [PULL 09/13] hw/qdev-core: Fix description of instance_init

2018-09-25 Thread Thomas Huth
The part of the documentation of DeviceClass that talks about instance_init is partly wrong: instance_init() functions must not abort or exit, since the function is also called during introspection of the device already. So if a device calls exit() during its instance_init() function, QEMU

[Qemu-devel] [PULL 05/13] memfd: fix possible usage of the uninitialized file descriptor

2018-09-25 Thread Thomas Huth
From: Dima Stepanov The qemu_memfd_alloc_check() routine allocates the fd variable on stack. This variable is initialized inside the qemu_memfd_alloc() function. There are several cases when *fd will be left unintialized which can lead to the unexpected close() in the qemu_memfd_free() call.

[Qemu-devel] [PULL 02/13] net: Deprecate the "name" parameter of -net

2018-09-25 Thread Thomas Huth
In early times, network backends were specified by a "vlan" and "name" tuple. With the introduction of netdevs, the "name" was replaced by an "id" (which is supposed to be unique), but the "name" parameter stayed as an alias which could be used instead of "id". Unfortunately, we miss the

[Qemu-devel] [PULL 13/13] Revert "check: Move VMXNET3 test to common"

2018-09-25 Thread Thomas Huth
This reverts commit 7a066770f53c198014add869696427f81d67e9c2. The patch did not work as expected: The vmxnet3 test is currently not run at all anymore. Signed-off-by: Thomas Huth --- tests/Makefile.include | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[Qemu-devel] [PULL 01/13] Makefile: Add missing dependency for qemu-deprecated.texi

2018-09-25 Thread Thomas Huth
Make sure that the docs get correctly regenerated when the file qemu-deprecated.texi has been changed. Fixes: 44c67847e32c91a6071fb0440c357b9489f08bc6 Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Markus Armbruster Signed-off-by: Thomas Huth (cherry picked from commit

[Qemu-devel] [PULL 07/13] docs: Fix some typos (most found by codespell)

2018-09-25 Thread Thomas Huth
From: Stefan Weil Signed-off-by: Stefan Weil Reviewed-by: Peter Maydell Signed-off-by: Thomas Huth --- docs/COLO-FT.txt| 2 +- docs/interop/vhost-user.txt | 4 ++-- docs/replay.txt | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/COLO-FT.txt

[Qemu-devel] [PULL 06/13] trivial: Make bios files and source files non-executable

2018-09-25 Thread Thomas Huth
These files can not be executed on the host, so they should not be marked as executable. Reviewed-by: David Hildenbrand Signed-off-by: Thomas Huth --- block/blkreplay.c | 0 pc-bios/hppa-firmware.img | Bin pc-bios/palcode-clipper| Bin

Re: [Qemu-devel] [PATCH 2/3] hw/s390x/css: Remove QEMU_PACKED from struct SenseId

2018-09-25 Thread Cornelia Huck
On Tue, 25 Sep 2018 17:20:08 +0200 Thomas Huth wrote: > The uint16_t member cu_type of struct SenseId is not naturally aligned, > and since the struct is marked with QEMU_PACKED, this can lead to > unaligned memory accesses - which does not work on architectures like > Sparc. Thus remove the

[Qemu-devel] [PULL 00/13] Deprecation, qtests and some trivial doc updates

2018-09-25 Thread Thomas Huth
Hi Peter, the following changes since commit 71fbecea0f725bc16aec32cf89cbf3aa78058826: Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20180925-1' into staging (2018-09-25 15:24:04 +0100) are available in the git repository at: https://gitlab.com/huth/qemu.git tags

[Qemu-devel] [PULL 03/13] net/slirp: Deprecate the [hub_id name] parameter tuple

2018-09-25 Thread Thomas Huth
The "name" in the [hub_id name] parameter tuple is the same as a "netdev_id" (which should be unique), so specifying the hub_id here is just redundant (it was likely just necessary in the past when the network subsystem was still using "vlans" only and when it did not use unique "id"s yet).

[Qemu-devel] [PATCH v2 2/2] docs: Document vCPU hotplug procedure

2018-09-25 Thread Kashyap Chamarthy
Signed-off-by: Kashyap Chamarthy --- docs/cpu-hotplug.rst | 140 +++ 1 file changed, 140 insertions(+) create mode 100644 docs/cpu-hotplug.rst diff --git a/docs/cpu-hotplug.rst b/docs/cpu-hotplug.rst new file mode 100644 index 00..8f9e63a9f7 ---

[Qemu-devel] [PULL 12/13] Revert "check: Move endianess test to common"

2018-09-25 Thread Thomas Huth
This reverts commit 669cc7100065c690cb7b4f3da5cfc471d1ed4740. The patch did not work as expected: The endianess test is currently not run at all anymore. Signed-off-by: Thomas Huth --- tests/Makefile.include | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git

[Qemu-devel] [PULL 04/13] hw/core/machine: Officially deprecate the enforce-config-section parameter

2018-09-25 Thread Thomas Huth
Commit 16f7244842b5135543ef068a1adafd94c6965953 added this parameter to the documentation, including a note that it is deprecated. But it has never been added to the "Deprecated features" appendix, which is our official way to deprecate legacy parameters. So let's do this now. Reviewed-by: Peter

Re: [Qemu-devel] [PATCH 1/3] hw/s390x/ipl: Fix alignment problems of S390IPLState members

2018-09-25 Thread David Hildenbrand
On 25/09/2018 17:20, Thomas Huth wrote: > The IplParameterBlock and QemuIplParameters structures are declared > with QEMU_PACKED, so the compiler assumes that the structures do not > need to be aligned in memory. Since the are listed after a "bool" > within the S390IPLState, the IplParameterBlock

  1   2   3   4   >