Re: [Qemu-devel] [RFC PATCH v2 06/12] mc: introduce state machine changes for MC

2014-02-21 Thread Michael R. Hines
On 02/19/2014 09:00 AM, Li Guang wrote: Hi, mrhi...@linux.vnet.ibm.com wrote: From: "Michael R. Hines" This patch sets up the initial changes to the migration state machine and prototypes to be used by the checkpointing code to interact with the state machine so that we can later handle failur

Re: [Qemu-devel] [PATCH V7 07/11] qapi script: support pre-defined enum type as discriminator in union

2014-02-21 Thread Markus Armbruster
Wenchao Xia writes: > 于 2014/2/21 0:38, Markus Armbruster 写道: >> Wenchao Xia writes: >> >>> By default, any union will automatically generate a enum type as >>> "[UnionName]Kind" in C code, and it is duplicated when the discriminator >>> is specified as a pre-defined enum type in schema. After

[Qemu-devel] [PATCH 02/51] virtio-bus: remove vdev field

2014-02-21 Thread Michael Roth
From: Paolo Bonzini The vdev field is complicated to synchronize. Just access the BusState's list of children. Cc: qemu-sta...@nongnu.org Acked-by: Andreas Faerber Signed-off-by: Paolo Bonzini (cherry picked from commit 06d3dff0723c712a4b109ced4243edf49ef850af) Signed-off-by: Michael Roth -

[Qemu-devel] [PATCH 01/51] virtio-ccw: move virtio_ccw_stop_ioeventfd to virtio_ccw_busdev_unplug

2014-02-21 Thread Michael Roth
From: Paolo Bonzini Similar to the PCI bug that prompted these patches, virtio-ccw will segfault after the reworking of hotplug/hot-unplug. Prepare for this by moving virtio_ccw_stop_ioeventfd to before the freeing of the proxy device. A better place for this could be the device_unplugged callb

[Qemu-devel] Patch Round-up for stable 1.7.1, freeze on 2013-02-27

2014-02-21 Thread Michael Roth
Hi everyone, The following new patches are queued for QEMU stable v1.7.1: https://github.com/mdroth/qemu/commits/stable-1.7-staging The release is planned for 2014-03-03: http://wiki.qemu.org/Planning/1.7 Please respond here or CC qemu-sta...@nongnu.org on any patches you think should be inclu

[Qemu-devel] [PATCH 05/51] virtio-bus: cleanup plug/unplug interface

2014-02-21 Thread Michael Roth
From: Paolo Bonzini Right now we have these pairs: - virtio_bus_plug_device/virtio_bus_destroy_device. The first takes a VirtIODevice, the second takes a VirtioBusState - device_plugged/device_unplug callbacks in the VirtioBusClass (here it's just the naming that is inconsistent) - virtio

[Qemu-devel] [PATCH 08/51] virtio-net: switch exit callback to VirtioDeviceClass

2014-02-21 Thread Michael Roth
From: Paolo Bonzini This ensures hot-unplug is handled properly by the proxy, and avoids leaking bus_name which is freed by virtio_device_exit. Cc: qemu-sta...@nongnu.org Acked-by: Andreas Faerber Signed-off-by: Paolo Bonzini (cherry picked from commit 3786cff5eb384d058395a2729af627fa3253d056)

[Qemu-devel] [PATCH 03/51] virtio-ccw: remove vdev field

2014-02-21 Thread Michael Roth
From: Paolo Bonzini The vdev field is complicated to synchronize. Just access the BusState's list of children. Cc: qemu-sta...@nongnu.org Reviewed-by: Cornelia Huck Acked-by: Andreas Faerber Signed-off-by: Paolo Bonzini (cherry picked from commit f24a684073bcdaf4e9d3c592345744ba3356d9e3) Si

[Qemu-devel] [PATCH 07/51] virtio-serial: switch exit callback to VirtioDeviceClass

2014-02-21 Thread Michael Roth
From: Paolo Bonzini This ensures hot-unplug is handled properly by the proxy, and avoids leaking bus_name which is freed by virtio_device_exit. Cc: qemu-sta...@nongnu.org Acked-by: Andreas Faerber Signed-off-by: Paolo Bonzini (cherry picked from commit 0e86c13fe2058adb8c792ebb7c51a6a7ca9d3d55)

[Qemu-devel] [PATCH 13/51] scsi-bus: fix transfer length and direction for VERIFY command

2014-02-21 Thread Michael Roth
From: Paolo Bonzini The amount of bytes to transfer depends on the BYTCHK field. If any data is transferred, it is sent to the device. Cc: qemu-sta...@nongnu.org Tested-by: Hervé Poussineau Signed-off-by: Paolo Bonzini (cherry picked from commit d12ad44cc4cc9142179e64295608611f118b8ad8) Signe

[Qemu-devel] [PATCH 15/51] intel-hda: fix position buffer

2014-02-21 Thread Michael Roth
From: Gerd Hoffmann Fix position buffer updates to use the correct stream offset. Without this patch both IN (record) and OUT (playback) streams will update the IN buffer positions. The linux kernel notices and complains: hda-intel: Invalid position buffer, using LPIB read method instead. Th

[Qemu-devel] [PATCH 12/51] virtio-pci: add device_unplugged callback

2014-02-21 Thread Michael Roth
From: Paolo Bonzini This fixes a crash in hot-unplug of virtio-pci devices behind a PCIe switch. The crash happens because the ioeventfd is still set whent the child is destroyed (destruction happens in postorder). Then the proxy tries to unset to ioeventfd, but the virtqueue structure that hol

[Qemu-devel] [PATCH 10/51] virtio-balloon: switch exit callback to VirtioDeviceClass

2014-02-21 Thread Michael Roth
From: Paolo Bonzini This ensures hot-unplug is handled properly by the proxy, and avoids leaking bus_name which is freed by virtio_device_exit. Cc: qemu-sta...@nongnu.org Acked-by: Andreas Faerber Signed-off-by: Paolo Bonzini (cherry picked from commit baa61b9870dd7e0bb07e0ae61c6ec805db13f699)

[Qemu-devel] [PATCH 09/51] virtio-scsi: switch exit callback to VirtioDeviceClass

2014-02-21 Thread Michael Roth
From: Paolo Bonzini This ensures hot-unplug is handled properly by the proxy, and avoids leaking bus_name which is freed by virtio_device_exit. Cc: qemu-sta...@nongnu.org Acked-by: Andreas Faerber Signed-off-by: Paolo Bonzini (cherry picked from commit e3c9d76acc984218264bbc6435b0c09f959ed9b8)

[Qemu-devel] [PATCH 18/51] migration: Fix rate limit

2014-02-21 Thread Michael Roth
From: Matthew Garrett The migration thread appears to want to allow writeout to occur at full speed rather than being rate limited during completion of state saving, but sets the limit to INT_MAX when xfer_limit is INT64_MAX. This causes problems if there's more than 2GB of state left to save at

[Qemu-devel] [PATCH 19/51] vl: add missing transition debug->finish_migrate

2014-02-21 Thread Michael Roth
From: Paolo Bonzini This fixes an abort if you invoke the "migrate" command while the guest is being debugged. Cc: qemu-sta...@nongnu.org Cc: lcapitul...@redhat.com Signed-off-by: Paolo Bonzini Signed-off-by: Luiz Capitulino (cherry picked from commit eca01d3a93be4041ac5858ef7676e60352e9c2ed)

[Qemu-devel] [PATCH 21/51] qdev-monitor: Avoid device_add crashing on non-device driver name

2014-02-21 Thread Michael Roth
From: Markus Armbruster Watch this: $ upstream-qemu -nodefaults -S -display none -monitor stdio QEMU 1.7.50 monitor - type 'help' for more information (qemu) device_add rng-egd /work/armbru/qemu/qdev-monitor.c:491:qdev_device_add: Object 0x2089b00 is not an instance of type devi

[Qemu-devel] [PATCH 17/51] qom: Split out object and class caches

2014-02-21 Thread Michael Roth
From: Peter Crosthwaite The object-cast and class-cast caches cannot be shared because class caching is conditional on the target type not being an interface and object caching is unconditional. Leads to a bug when a class cast to an interface follows an object cast to the same interface type: F

[Qemu-devel] [PATCH 14/51] scsi-disk: fix VERIFY emulation

2014-02-21 Thread Michael Roth
From: Paolo Bonzini VERIFY emulation was completely botched (and remained botched through all the refactorings). The command must be emulated both in check-medium mode (BYTCHK=00, which we implement by doing nothing) and in check-bytes mode (which we do not implement yet). Unlike WRITE AND VERI

[Qemu-devel] [PATCH 27/51] piix: fix 32bit pci hole

2014-02-21 Thread Michael Roth
From: Gerd Hoffmann Make the 32bit pci hole start at end of ram, so all possible address space is covered. We used to try and make addresses aligned so they are easier to cover with MTRRs, but since they are cosmetic on KVM, this is probably not worth worrying about. Of course the firmware can u

[Qemu-devel] [PATCH 16/51] memory.c: bugfix - ref counting mismatch in memory_region_find

2014-02-21 Thread Michael Roth
From: Marcel Apfelbaum 'address_space_get_flatview' gets a reference to a FlatView. If the flatview lookup fails, the code returns without "unreferencing" the view. Cc: qemu-sta...@nongnu.org Signed-off-by: Marcel Apfelbaum Reviewed-by: Paolo Bonzini Reviewed-by: Michael S. Tsirkin Signed-of

[Qemu-devel] [PATCH 20/51] x86: only allow real mode to access 32bit without LMA

2014-02-21 Thread Michael Roth
From: Alexander Graf When we're running in non-64bit mode with qemu-system-x86_64 we can still end up with virtual addresses that are above the 32bit boundary if a segment offset is set up. GNU Hurd does exactly that. It sets the segment offset to 0x8000 and puts its EIP value to 0x8xxx

[Qemu-devel] [PATCH 23/51] exec: replace leaf with skip

2014-02-21 Thread Michael Roth
From: "Michael S. Tsirkin" In preparation for dynamic radix tree depth support, rename is_leaf field to skip, telling us how many bits to skip to next level. Set to 0 for leaf. Signed-off-by: Michael S. Tsirkin (cherry picked from commit 9736e55b78dc49b7f3a265932ab32ed360f633e4) *prereq for 53

[Qemu-devel] [PATCH 11/51] virtio-rng: switch exit callback to VirtioDeviceClass

2014-02-21 Thread Michael Roth
From: Paolo Bonzini This ensures hot-unplug is handled properly by the proxy, and avoids leaking bus_name which is freed by virtio_device_exit. Cc: qemu-sta...@nongnu.org Acked-by: Andreas Faerber Signed-off-by: Paolo Bonzini (cherry picked from commit 7bb6edb0e3dd78d74e0ac980cf6c0a07307f61bf)

[Qemu-devel] [PATCH 33/51] hpet: fix build with CONFIG_HPET off

2014-02-21 Thread Michael Roth
From: "Michael S. Tsirkin" make hpet_find inline so we don't need to build hpet.c to check if hpet is enabled. Fixes link error with CONFIG_HPET off. Cc: qemu-sta...@nongnu.org Signed-off-by: Michael S. Tsirkin (cherry picked from commit 142e0950cfaf023a81112dc3cdfa799d769886a4) Signed-off-by

[Qemu-devel] [PATCH 30/51] linux-user: create target_structs header to place ipc_perm and shmid_ds

2014-02-21 Thread Michael Roth
From: Petar Jovanovic Creating target_structs header in linux-user/$arch/ and making target_ipc_perm and target_shmid_ds its first inhabitants. The struct defintions may/should be further fine-tuned by arch maintainers. Signed-off-by: Petar Jovanovic Signed-off-by: Riku Voipio (cherry picked f

[Qemu-devel] [PATCH 24/51] exec: pass hw address to phys_page_find

2014-02-21 Thread Michael Roth
From: "Michael S. Tsirkin" callers always shift by target page bits so let's just do this internally. Signed-off-by: Michael S. Tsirkin (cherry picked from commit 97115a8d4500abeb090b968f01605e0bdafcdfd3) *prereq for 53cb28c backport Signed-off-by: Michael Roth --- exec.c |8 1

[Qemu-devel] [PATCH 29/51] linux-user: pass correct parameter to do_shmctl()

2014-02-21 Thread Michael Roth
From: Petar Jovanovic Fix shmctl issue by passing correct parameter buf to do_shmctl(). Signed-off-by: Petar Jovanovic Signed-off-by: Riku Voipio (cherry picked from commit a29267846a52b4ca294ba3a962b74b67df7ce6d2) Signed-off-by: Michael Roth --- linux-user/syscall.c |2 +- 1 file chang

[Qemu-devel] [PATCH 39/51] migration: qmp_migrate(): keep working after syntax error

2014-02-21 Thread Michael Roth
From: Luiz Capitulino If a user or QMP client enter a bad syntax for the migrate command in QMP/HMP, then the migrate command will never succeed from that point on. For example, if you enter: (qemu) migrate tcp;0: migrate: Parameter 'uri' expects a valid migration protocol Then the migrate

[Qemu-devel] [PATCH 25/51] exec: separate sections and nodes per address space

2014-02-21 Thread Michael Roth
From: Marcel Apfelbaum Every address space has its own nodes and sections, but it uses the same global arrays of nodes/section. This limits the number of devices that can be attached to the guest to 20-30 devices. It happens because: - The sections array is limited to 2^12 entries. - The main

[Qemu-devel] [PATCH 32/51] tcg/optimize: fix known-zero bits for right shift ops

2014-02-21 Thread Michael Roth
From: Aurelien Jarno 32-bit versions of sar and shr ops should not propagate known-zero bits from the unused 32 high bits. For sar it could even lead to wrong code being generated. Cc: qemu-sta...@nongnu.org Reviewed-by: Paolo Bonzini Signed-off-by: Aurelien Jarno Signed-off-by: Richard Hender

[Qemu-devel] [PATCH 38/51] mainstone: Fix duplicate array values for key 'space'

2014-02-21 Thread Michael Roth
From: Stefan Weil cgcc reported a duplicate initialisation. Mainstone includes a matrix keyboard where two different positions map to 'space'. QEMU uses the reversed mapping and does not map 'space' to two different matrix positions. Some other keys are either missing or might be mapped wrongly

[Qemu-devel] [PATCH 37/51] seccomp: exit if seccomp_init() fails

2014-02-21 Thread Michael Roth
From: Corey Bryant This fixes a bug where we weren't exiting if seccomp_init() failed. Signed-off-by: Corey Bryant Acked-by: Eduardo Otubo Acked-by: Paul Moore (cherry picked from commit 2a13f991123fa16841e6d94b02a9cc2c76d91725) Signed-off-by: Michael Roth --- qemu-seccomp.c |1 + 1 fi

[Qemu-devel] [PATCH 28/51] target-mips: fix 64-bit FPU config for user-mode emulation

2014-02-21 Thread Michael Roth
From: Petar Jovanovic FR bit should be initialized to 1 for MIPS64, under condition that this bit is writable and that CPU has an FPU unit. It should be initialized to zero for MIPS32. This fixes different MIPS32 issues with FPU instructions whose behaviour defaulted to 64-bit FPU mode. Signed-o

[Qemu-devel] [PATCH 44/51] virtio-scsi: Cleanup of I/Os that never started

2014-02-21 Thread Michael Roth
From: Eric Farman There is still a small window that occurs when a cancel I/O affects an asynchronous I/O operation that hasn't started. In other words, when the residual data length equals the expected data length. Today, the routine virtio_scsi_command_complete fails because the VirtIOSCSIReq

[Qemu-devel] [PATCH 46/51] KVM: Retry KVM_CREATE_VM on EINTR

2014-02-21 Thread Michael Roth
From: thomas knych Upstreaming this change from Android (https://android-review.googlesource.com/54211). On heavily loaded machines with many VM instances we see KVM_CREATE_VM failing with EINTR on this path: kvm_dev_ioctl_create_vm -> kvm_create_vm -> kvm_init_mmu_notifier -> mmu_notifier_re

[Qemu-devel] [PATCH 42/51] scsi: Support TEST UNIT READY in the dummy LUN0

2014-02-21 Thread Michael Roth
From: Paolo Bonzini SeaBIOS waits for LUN0 to respond to the TEST UNIT READY command in order to decide whether it should part of the boot sequence. If LUN0 does not respond to the command, boot is delayed by up to 5 seconds. This currently happens when there is no LUN0 on a target. Fix that by

[Qemu-devel] [PATCH 45/51] virtio-scsi: Prevent assertion on missed events

2014-02-21 Thread Michael Roth
From: Eric Farman In some cases, an unplug can cause events to be dropped, which leads to an assertion failure when preparing to notify the guest kernel. Signed-off-by: Eric Farman Cc: qemu-sta...@nongnu.org Signed-off-by: Paolo Bonzini (cherry picked from commit 49fb65c7f985baa56d2964e0a85c1f

[Qemu-devel] [PATCH 51/51] tcg-arm: The shift count of op_rotl_i32 is in args[2] not args[1].

2014-02-21 Thread Michael Roth
From: Huw Davies It's this that should be subtracted from 0x20 when converting to a right rotate. Cc: qemu-sta...@nongnu.org Signed-off-by: Huw Davies Signed-off-by: Richard Henderson (cherry picked from commit 7a3a00979d9dfe2aaa66ce5fc68cd161b4f900ba) Signed-off-by: Michael Roth --- tcg/ar

[Qemu-devel] [PATCH 40/51] vfio-pci: Release all MSI-X vectors when disabled

2014-02-21 Thread Michael Roth
From: Alex Williamson We were relying on msix_unset_vector_notifiers() to release all the vectors when we disable MSI-X, but this only happens when MSI-X is still enabled on the device. Perform further cleanup by releasing any remaining vectors listed as in-use after this call. This caused a le

[Qemu-devel] [PATCH 43/51] scsi: Assign cancel_io vector for scsi_disk_emulate_ops

2014-02-21 Thread Michael Roth
From: Paolo Bonzini Some emulated disk operations (MODE SELECT, UNMAP, WRITE SAME) can trigger asynchronous I/Os. Provide the cancel_io callback to ensure that AIOCBs are properly cleaned up. Signed-off-by: Eric Farman Cc: qemu-sta...@nongnu.org [Tweak commit message. - Paolo] Signed-off-by: P

Re: [Qemu-devel] [PATCH V7 10/11] qapi script: do not add "_" for every capitalized char in enum

2014-02-21 Thread Markus Armbruster
Eric Blake writes: > On 02/20/2014 09:54 AM, Markus Armbruster wrote: >>> +# When c is upper and no "_" appears before, do more checks >>> +if c.isupper() and (i > 0) and c_fun_str[i - 1] != "_": >> >> c_fun_str[i - 1]... what if i == 0? > > How? We already had '(i > 0) and' prio

[Qemu-devel] [PATCH 47/51] i386: Add missing include file for QEMU_PACKED

2014-02-21 Thread Michael Roth
From: Stefan Weil Instead of packing BiosLinkerLoaderEntry, an unused global variable called QEMU_PACKED was created (detected by smatch static code analysis). Including qemu-common.h gets the right definition and also includes some standard include files which now can be removed here. Cc: qemu

[Qemu-devel] [PATCH 50/51] memory: fix limiting of translation at a page boundary

2014-02-21 Thread Michael Roth
From: Paolo Bonzini Commit 360e607 (address_space_translate: do not cross page boundaries, 2014-01-30) broke MMIO accesses in cases where the section is shorter than the full register width. This can happen for example with the Bochs DISPI registers, which are 16 bits wide but have only a 1-byte

Re: [Qemu-devel] [PATCH] virtio-net: calculate proper msix vectors on init

2014-02-21 Thread Jason Wang
On 02/21/2014 01:00 PM, Jason Wang wrote: > Currently, the default msix vectors for virtio-net-pci is 3 which is > obvious not suitable for multiqueue guest, so we depends on the user > or management tools to pass a correct vectors parameter. In fact, we > can simplifying this by calculate the numb

Re: [Qemu-devel] [RFC PATCH] file ram alloc: fail if cannot preallocate

2014-02-21 Thread Alexander Graf
On 21.02.2014, at 05:57, Alexey Kardashevskiy wrote: > On 02/10/2014 05:32 PM, Alexey Kardashevskiy wrote: >> At the moment if the user asked for huge pages and there is no more huge >> pages, QEMU prints warning and falls back to the anonymous memory >> allocator which is quite easy not to noti

Re: [Qemu-devel] [PATCH] spapr-vlan: flush queue whenever can_receive can go from false to true

2014-02-21 Thread Alexander Graf
On 21.02.2014, at 04:46, Alexey Kardashevskiy wrote: > On 02/14/2014 12:27 PM, Alexey Kardashevskiy wrote: >> When the guests adds buffers to receive queue, the network device >> should flush its queue of pending packets. This is done with >> qemu_flush_queued_packets. >> >> This adds a call to

[Qemu-devel] [PATCH V2] virtio-net: calculate proper msix vectors on init

2014-02-21 Thread Jason Wang
Currently, the default msix vectors for virtio-net-pci is 3 which is obvious not suitable for multiqueue guest, so we depends on the user or management tools to pass a correct vectors parameter. In fact, we can simplifying this by calculate the number of vectors on init. Consider we have N queues,

[Qemu-devel] QOM vs QAPI for QMP APIs

2014-02-21 Thread Stefan Hajnoczi
I need to add a QMP API that lists dataplane threads. This is similar to "query-cpus" where the thread IDs are reported. It allows the client to bind threads to host CPUs. I'm inclined to add a "query-iothreads" QMP command: * It's easy to implement using QAPI * We've developed best practices

[Qemu-devel] [PATCH 04/51] virtio-pci: remove vdev field

2014-02-21 Thread Michael Roth
From: Paolo Bonzini The vdev field is complicated to synchronize. Just access the BusState's list of children. Cc: qemu-sta...@nongnu.org Acked-by: Andreas Faerber Signed-off-by: Paolo Bonzini (cherry picked from commit a3fc66d9fd37acbfcee013692246a8ae42bd93bb) Signed-off-by: Michael Roth -

[Qemu-devel] [PATCH 22/51] split definitions for exec.c and translate-all.c radix trees

2014-02-21 Thread Michael Roth
From: Paolo Bonzini The exec.c and translate-all.c radix trees are quite different, and the exec.c one in particular is not limited to the CPU---it can be used also by devices that do DMA, and in that case the address space is not limited to TARGET_PHYS_ADDR_SPACE_BITS bits. We want to make exec

[Qemu-devel] [PATCH 06/51] virtio-blk: switch exit callback to VirtioDeviceClass

2014-02-21 Thread Michael Roth
From: Paolo Bonzini This ensures hot-unplug is handled properly by the proxy, and avoids leaking bus_name which is freed by virtio_device_exit. Cc: qemu-sta...@nongnu.org Acked-by: Andreas Faerber Signed-off-by: Paolo Bonzini (cherry picked from commit 40dfc16f5fe0afb66f9436718781264dfadb6c61)

Re: [Qemu-devel] [PATCH] target-ppc/translate.c: Use ULL suffix for 64 bit constants

2014-02-21 Thread Alexander Graf
On 20.02.2014, at 20:47, Peter Maydell wrote: > 64 bit constants need the "ULL" suffix, not just "UL", because > on 32 bit platforms 'long' is not large enough and this will > cause a compiler warning. > > Signed-off-by: Peter Maydell Thanks, applied to ppc-next. Alex

[Qemu-devel] [PATCH 31/51] Fix QEMU build on OpenBSD on x86 archs

2014-02-21 Thread Michael Roth
From: Brad This resolves the build issue with building the ROMs on OpenBSD on x86 archs. As of OpenBSD 5.3 the compiler builds PIE binaries by default and thus the whole OS/packages and so forth. The ROMs need to have PIE disabled. Check in configure whether the compiler supports the flags for di

[Qemu-devel] Add a new hardware

2014-02-21 Thread atlas khan
I am working on project in which we have add support of a board in QEMU. We have to add some virtual devices in QEMU. The question which I want to ask that what should I do to add virtual device. And after adding that device in \hw in which file I have to make changes so that program access that ha

[Qemu-devel] [PATCH 26/51] pc: map PCI address space as catchall region for not mapped addresses

2014-02-21 Thread Michael Roth
From: "Michael S. Tsirkin" With a help of negative memory region priority PCI address space is mapped underneath RAM regions effectively catching every access to addresses not mapped by any other region. It simplifies PCI address space mapping into system address space. Signed-off-by: Michael S.

[Qemu-devel] Fwd: AArch64 register SP value always appearing as zero in "info registers" (kvm control)

2014-02-21 Thread Claudio Fontana
I realized that I mistakenly stripped qemu-devel from the discussion; forwarding to make the workaround and todo visible. Claudio -- Forwarded message -- From: Peter Maydell Date: 20 February 2014 16:18 Subject: Re: AArch64 register SP value always appearing as zero in "info regi

Re: [Qemu-devel] spapr_pci.c:spapr_pci_msi_init() creates memory region whose size is host-dependent

2014-02-21 Thread Alexander Graf
On 20.02.2014, at 20:58, Peter Maydell wrote: > spapr_pci_msi_init() does this: > >memory_region_init_io(&spapr->msiwindow, NULL, &spapr_msi_ops, spapr, > "msi", getpagesize()); > > That means this device's memory region size will depend on > the host OS CPU and co

[Qemu-devel] [PATCH] PPC: sPAPR: Only use getpagesize() when we run with kvm

2014-02-21 Thread Alexander Graf
We currently size the msi window trap page according to the host's page size so that we poke a working hole into a memory slot in case we overlap. However, this is only ever necessary with KVM active. Without KVM, we should rather try to be host platform agnostic and use a constant size: 4k. This

Re: [Qemu-devel] [RFC PATCH v2 01/12] mc: add documentation for micro-checkpointing

2014-02-21 Thread Dr. David Alan Gilbert
* Michael R. Hines (mrhi...@linux.vnet.ibm.com) wrote: > On 02/21/2014 12:32 AM, Dr. David Alan Gilbert wrote: > > > >I'm happy to use more memory to get FT, all I'm trying to do is see > >if it's possible to put a lower bound than 2x on it while still maintaining > >full FT, at the expense of perf

[Qemu-devel] [PATCH 48/51] linux-user: Fix trampoline code for CRIS

2014-02-21 Thread Michael Roth
From: Stefan Weil __put_user can write bytes, words (2 bytes) or longwords (4 bytes). Here obviously words should have been written, but bytes were written, so values like 0x9c5f were truncated to 0x5f. Fix this by changing retcode from uint8_t to to uint16_t in target_signal_frame and also in t

Re: [Qemu-devel] [PATCH V7 04/11] qapi script: check correctness of discriminator values in union

2014-02-21 Thread Markus Armbruster
Eric Blake writes: > On 02/20/2014 07:43 AM, Markus Armbruster wrote: >> Wenchao Xia writes: >> >>> It will check whether base is set, whether discriminator is found >>> in base, whether the values specified are written correctly, and >>> whether all enum values are covered, when discriminator

Re: [Qemu-devel] [PATCH] pseries: Update SLOF firmware image to 20140204

2014-02-21 Thread Alexander Graf
On 21.02.2014, at 07:09, Alexey Kardashevskiy wrote: > On 02/10/2014 05:52 PM, Alexey Kardashevskiy wrote: >> The changelog is: >>> version: update to 20140204 >>> virtio-9p: disable unused structure >>> Make "boot net:dhcp" boot from IPv4 only >>> Fix virtio device shutdown >>> Change shutdown

Re: [Qemu-devel] [PATCH] virtio-net: Do not filter VLANs without F_CTRL_VLAN

2014-02-21 Thread Amos Kong
On Wed, Feb 12, 2014 at 10:46:28PM +0100, Stefan Fritsch wrote: > If VIRTIO_NET_F_CTRL_VLAN is not negotiated, do not filter out all > VLAN-tagged packets but send them to the guest. Can we just update receive_filter() to filter out VLAN-tagged packets only when VIRTIO_NET_F_CTRL_VLAN is negotiate

[Qemu-devel] [PATCH 35/51] qemu_opts_parse(): always check return value

2014-02-21 Thread Michael Roth
From: Laszlo Ersek qemu_opts_parse() can always return NULL, even if the QemuOptsList.desc in question would be trivial to satisfy (eg. because it's empty). For example: qemu_opts_parse() opts_parse() qemu_opts_create() id_wellformed() In practice: $ .../qemu-system-x86_64 -acpit

Re: [Qemu-devel] [PATCH 29/51] linux-user: pass correct parameter to do_shmctl()

2014-02-21 Thread Laurent Vivier
> Le 21 février 2014 à 09:17, Michael Roth a écrit : > > > From: Petar Jovanovic > > Fix shmctl issue by passing correct parameter buf to do_shmctl(). > > Signed-off-by: Petar Jovanovic > Signed-off-by: Riku Voipio > (cherry picked from commit a29267846a52b4ca294ba3a962b74b67df7ce6d2) > > Sign

[Qemu-devel] [PATCH 34/51] block/iscsi: use a bh to schedule co reentrance

2014-02-21 Thread Michael Roth
From: Peter Lieven this fixes a potential segfault and performance regression. If the coroutine is reentered directly in the iscsi_co_generic_cb iscsi_process_{read,write} are interrupted and reentered any time later. One the one hand this could happen after an iscsi_close where the iscsi contex

Re: [Qemu-devel] [PATCH v2] virtio-net: add a field to indicate if vlan table is used

2014-02-21 Thread Amos Kong
On Thu, Feb 20, 2014 at 12:46:14PM -0500, Vlad Yasevich wrote: > On 02/20/2014 11:38 AM, Amos Kong wrote: > > Stefan Fritsch just fixed a virtio-net driver bug [1], virtio-net won't > > filter out VLAN-tagged packets if VIRTIO_NET_F_CTRL_VLAN isn't negotiated. > > > > This patch added a new field

[Qemu-devel] [PATCH 36/51] s390x/kvm: Fix diagnose handling.

2014-02-21 Thread Michael Roth
From: Cornelia Huck The instruction intercept handler for diagnose used only the displacement when trying to calculate the function code. This is only correct for base 0, however; we need to perform a complete base/displacement address calculation and use bits 48-63 as the function code. Reviewe

[Qemu-devel] [PATCH 41/51] block/curl: Implement the libcurl timer callback interface

2014-02-21 Thread Michael Roth
From: Peter Maydell libcurl versions 7.16.0 and later have a timer callback interface which must be implemented in order for libcurl to make forward progress (it will sometimes rely on being called back on the timeout if there are no file descriptors registered). Implement the callback, and use a

Re: [Qemu-devel] [PATCH v2] net: Disable netmap backend when not supported

2014-02-21 Thread Stefan Hajnoczi
On Thu, Feb 20, 2014 at 03:40:43PM +0100, Vincenzo Maffione wrote: > This patch fixes configure so that the netmap backend is not compiled in if > the > host doesn't support an API version >= 11. A version upper bound (15) has been > added so that the netmap API can be extended with some minor fea

Re: [Qemu-devel] [PATCH] trace: Fix build warnings for Win32 build

2014-02-21 Thread Stefan Hajnoczi
On Thu, Feb 20, 2014 at 07:44:25PM +, Peter Maydell wrote: > The Win32 build warns about trace/control-internal.h: > > warning: 'trace_event_count' declared inline after being called > > Fix this by simply reordering trace_event_id() and > trace_event_count(). > > Signed-off-by: Peter Maydel

Re: [Qemu-devel] Patch Round-up for stable 1.7.1, freeze on 2013-02-27

2014-02-21 Thread Paolo Bonzini
Il 21/02/2014 09:16, Michael Roth ha scritto: Hi everyone, The following new patches are queued for QEMU stable v1.7.1: https://github.com/mdroth/qemu/commits/stable-1.7-staging The release is planned for 2014-03-03: http://wiki.qemu.org/Planning/1.7 Please respond here or CC qemu-sta...@non

Re: [Qemu-devel] [PATCH v5 3/6] vl: allow customizing the class of /machine

2014-02-21 Thread Paolo Bonzini
Il 21/02/2014 04:04, Alexey Kardashevskiy ha scritto: On 02/21/2014 12:50 AM, Alexey Kardashevskiy wrote: > From: Paolo Bonzini > > This is a first step towards QOMifying /machine. > > Signed-off-by: Paolo Bonzini I got interesting conversation about "sob" in my team so here it is: Signed-of

[Qemu-devel] [PATCH v21 01/25] add def_value_str to QemuOptDesc

2014-02-21 Thread Chunyan Liu
Add def_value_str (default value) to QemuOptDesc, to replace function of the default value in QEMUOptionParameter. And improved related functions. Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- Changes to v20: * fix Eric's comments: - use abort_error instead of local_err -

[Qemu-devel] [PATCH v21 00/25] replace QEMUOptionParameter with QemuOpts

2014-02-21 Thread Chunyan Liu
This patch series is to replace QEMUOptionParameter with QemuOpts, so that only one Qemu Option structure is kept in QEMU code. --- Changes to v20: * fix Eric's comments * rebase to latest source Chunyan Liu (25): add def_value_str to QemuOptDesc qapi: output def_value_str when query comm

[Qemu-devel] [PATCH v21 02/25] qapi: output def_value_str when query command line options

2014-02-21 Thread Chunyan Liu
Change qapi interfaces to output the newly added def_value_str when querying command line options. Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- qapi-schema.json |8 ++-- qmp-commands.hx|2 ++ util/qemu-config.c |4 3 files changed, 12 insertions(+), 2 de

[Qemu-devel] [PATCH v21 03/25] improve some functions in qemu-option.c

2014-02-21 Thread Chunyan Liu
Improve opt_get and opt_set group of functions. For opt_get, check and handle NULL input; for opt_set, when set to an existing option, rewrite the option with new value. Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- changes to v20: * fix Eric's comments - change QemuOpt name a

[Qemu-devel] [PATCH v21 04/25] improve assertion in qemu_opt_get functions

2014-02-21 Thread Chunyan Liu
In qemu_opt_set functions, if desc doen't exist but opts_accepts_any is true, it won't report error, but can still alloc an opt for the option and save it. However, after that, when doing qemu_opt_get, this option could be found in opts but opt->desc is NULL. This is correct, should not be treated

[Qemu-devel] [PATCH v21 07/25] change block layer to support both QemuOpts and QEMUOptionParamter

2014-02-21 Thread Chunyan Liu
Change block layer to support both QemuOpts and QEMUOptionParameter. After this patch, it will change backend drivers one by one. At the end, QEMUOptionParameter will be removed and only QemuOpts is kept. Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block.c | 12

[Qemu-devel] [PATCH v21 06/25] add convert functions between QEMUOptionParameter to QemuOpts

2014-02-21 Thread Chunyan Liu
Add two temp convert functions between QEMUOptionParameter to QemuOpts, so that next patch can use it. It will simplify next patch for easier review. Signed-off-by: Chunyan Liu --- changes to v20: * fix Eric's comments: - use g_strdup instead of strdup include/qemu/option.h |2 + util

[Qemu-devel] [PATCH v21 18/25] sheepdog.c: replace QEMUOptionParameter with QemuOpts

2014-02-21 Thread Chunyan Liu
sheepdog.c: replace QEMUOptionParameter with QemuOpts Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/sheepdog.c | 108 +++-- 1 files changed, 55 insertions(+), 53 deletions(-) diff --git a/block/sheepdog.c b/block/sheepdog.c in

[Qemu-devel] [PATCH v21 10/25] iscsi.c: replace QEMUOptionParameter with QemuOpts

2014-02-21 Thread Chunyan Liu
iscsi.c: replace QEMUOptionParamter with QemuOpts Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/iscsi.c | 29 ++--- 1 files changed, 14 insertions(+), 15 deletions(-) diff --git a/block/iscsi.c b/block/iscsi.c index f8e496f..6d00ec0 100644 --- a/blo

[Qemu-devel] [PATCH v21 05/25] add some QemuOpts functions for replace work

2014-02-21 Thread Chunyan Liu
Add some qemu_opt functions to replace the same functionality of QEMUOptionParameter handling. Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- changes to v20: * fix Eric's comments: - reorganize qemu_opt_*_del code, to avoid code duplication and double qemu_opt_find incl

[Qemu-devel] [PATCH v21 13/25] qed.c: replace QEMUOptionParameter with QemuOpts

2014-02-21 Thread Chunyan Liu
qed.c: replace QEMUOptionParameter with QemuOpts Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/qed.c | 113 +++--- block/qed.h |3 +- 2 files changed, 61 insertions(+), 55 deletions(-) diff --git a/block/qed.c b/block/

[Qemu-devel] [PATCH v21 23/25] vhdx.c: replace QEMUOptionParameter with QemuOpts

2014-02-21 Thread Chunyan Liu
vhdx.c: replace QEMUOptionParameter with QemuOpts Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/vhdx.c | 99 +++-- block/vhdx.h |1 + 2 files changed, 48 insertions(+), 52 deletions(-) diff --git a/block/vhdx.c b/bloc

[Qemu-devel] [PATCH v21 12/25] qcow2.c: replace QEMUOptionParameter with QemuOpts

2014-02-21 Thread Chunyan Liu
qcow2.c: replace QEMUOptionParameter with QemuOpts. Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/qcow2.c | 325 + 1 files changed, 167 insertions(+), 158 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 6

Re: [Qemu-devel] [PATCH] PPC: sPAPR: Only use getpagesize() when we run with kvm

2014-02-21 Thread Peter Maydell
On 21 February 2014 09:41, Alexander Graf wrote: > We currently size the msi window trap page according to the host's page > size so that we poke a working hole into a memory slot in case we overlap. > > However, this is only ever necessary with KVM active. Without KVM, we should > rather try to b

[Qemu-devel] [PATCH v21 09/25] gluster.c: replace QEMUOptionParameter with QemuOpts

2014-02-21 Thread Chunyan Liu
gluster.c: replace QEMUOptionParameter with QemuOpts Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/gluster.c | 81 -- 1 files changed, 42 insertions(+), 39 deletions(-) diff --git a/block/gluster.c b/block/gluster.c index

[Qemu-devel] [PATCH v21 20/25] vdi.c: replace QEMUOptionParameter with QemuOpts

2014-02-21 Thread Chunyan Liu
vdi.c: replace QEMUOptionParameter with QemuOpts Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/vdi.c | 72 +++--- 1 files changed, 34 insertions(+), 38 deletions(-) diff --git a/block/vdi.c b/block/vdi.c index 2d7490f..62

[Qemu-devel] [PATCH v21 19/25] ssh.c: replace QEMUOptionParameter with QemuOpts

2014-02-21 Thread Chunyan Liu
ssh.c: replace QEMUOptionParameter with QemuOpts Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/ssh.c | 32 +++- 1 files changed, 15 insertions(+), 17 deletions(-) diff --git a/block/ssh.c b/block/ssh.c index aa63c9d..3a5eead 100644 --- a/block/s

[Qemu-devel] [PATCH v21 11/25] qcow.c: replace QEMUOptionParameter with QemuOpts

2014-02-21 Thread Chunyan Liu
qcow.c: replace QEMUOptionParamter with QemuOpts Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/qcow.c | 72 +- 1 files changed, 36 insertions(+), 36 deletions(-) diff --git a/block/qcow.c b/block/qcow.c index 992eed4.

[Qemu-devel] [PATCH v21 25/25] cleanup QEMUOptionParameter

2014-02-21 Thread Chunyan Liu
Now all places using QEMUOptionParameter could use QemuOpts too, remove QEMUOptionParameter related code. Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block.c | 69 ++-- block/cow.c |4 +- block/gluster.c |8 +- block/qcow.c

[Qemu-devel] [PATCH v21 08/25] cow.c: replace QEMUOptionParameter with QemuOpts

2014-02-21 Thread Chunyan Liu
cow.c: replace QEMUOptionParameter with QemuOpts Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/cow.c | 54 ++ 1 files changed, 26 insertions(+), 28 deletions(-) diff --git a/block/cow.c b/block/cow.c index 85c2971..cb48ca

[Qemu-devel] [PATCH v21 21/25] vmdk.c: replace QEMUOptionParameter with QemuOpts

2014-02-21 Thread Chunyan Liu
vmdk.c: replace QEMUOptionParameter with QemuOpts Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/vmdk.c | 123 + 1 files changed, 63 insertions(+), 60 deletions(-) diff --git a/block/vmdk.c b/block/vmdk.c index 9b6660d.

[Qemu-devel] [PATCH v21 16/25] raw_bsd.c: replace QEMUOptionParameter with QemuOpts

2014-02-21 Thread Chunyan Liu
raw_bsd.c: replace QEMUOptionParameter with QemuOpts Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/raw_bsd.c | 27 +++ 1 files changed, 15 insertions(+), 12 deletions(-) diff --git a/block/raw_bsd.c b/block/raw_bsd.c index 9ae5fc2..ee797fd 100644 --

[Qemu-devel] [PATCH v21 22/25] vpc.c: replace QEMUOptionParameter with QemuOpts

2014-02-21 Thread Chunyan Liu
vpc.c: replace QEMUOptionParameter with QemuOpts Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/vpc.c | 62 -- 1 files changed, 34 insertions(+), 28 deletions(-) diff --git a/block/vpc.c b/block/vpc.c index 1d326cb..45

[Qemu-devel] [PATCH v21 24/25] vvfat.c: replace QEMUOptionParameter with QemuOpts

2014-02-21 Thread Chunyan Liu
vvfat.c: replace QEMUOptionParameter with QemuOpts Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/vvfat.c | 10 +- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/block/vvfat.c b/block/vvfat.c index c8c8a1c..d901250 100644 --- a/block/vvfat.c +++ b/blo

[Qemu-devel] [PATCH v21 17/25] rbd.c: replace QEMUOptionParameter with QemuOpts

2014-02-21 Thread Chunyan Liu
rbd.c: replace QEMUOptionParameter with QemuOpts Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/rbd.c | 63 -- 1 files changed, 30 insertions(+), 33 deletions(-) diff --git a/block/rbd.c b/block/rbd.c index dbc79f4..f8

[Qemu-devel] [PATCH v21 15/25] raw-win32.c: replace QEMUOptionParameter with QemuOpts

2014-02-21 Thread Chunyan Liu
raw-win32.c: replace QEMUOptionParameter with QemuOpts Signed-off-by: Dong Xu Wang Signed-off-by: Chunyan Liu --- block/raw-win32.c | 34 +- 1 files changed, 17 insertions(+), 17 deletions(-) diff --git a/block/raw-win32.c b/block/raw-win32.c index ae1c8e6..d9

  1   2   3   4   >