summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2016-03-16qdev-monitor: add missing aliases for virtio device classesSascha Silbe1-0/+19
virtio-{blk,balloon,net,serial} are aliases for their actual, architecture-dependent implementations (*-ccw on s390x, *-pci on other architectures supporting virtio). This makes it a lot easier to craft qemu invocations that work on all supported architectures. Complete the set to cover all existing non-abstract virtio device classes. For virtio-balloon, only the CCW implementation was missing. Signed-off-by: Sascha Silbe <silbe@linux.vnet.ibm.com> Message-Id: <1455831854-49013-4-git-send-email-silbe@linux.vnet.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2016-03-16qdev-monitor: sort alias table by typenameSascha Silbe1-7/+8
Sort the alias table by typename so it's easier to see which aliases exist. Signed-off-by: Sascha Silbe <silbe@linux.vnet.ibm.com> Message-Id: <1455831854-49013-3-git-send-email-silbe@linux.vnet.ibm.com> Reviewed-by: Halil Pasic <pasic@linux.vnet.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2016-03-16qdev-monitor: improve error message when alias device is unavailableSascha Silbe1-1/+7
When trying to instantiate an alias that points to a device class that doesn't exist, the error message looks like qemu misunderstood the request: $ s390x-softmmu/qemu-system-s390x -device virtio-gpu qemu-system-s390x: -device virtio-gpu: 'virtio-gpu-ccw' is not a valid device model name Special-case the error message to make it explicit that alias expansion is going on: $ s390x-softmmu/qemu-system-s390x -device virtio-gpu qemu-system-s390x: -device virtio-gpu: 'virtio-gpu' (alias 'virtio-gpu-ccw') is not a valid device model name Suggested-By: Cornelia Huck <cornelia.huck@de.ibm.com> Signed-off-by: Sascha Silbe <silbe@linux.vnet.ibm.com> Message-Id: <1455831854-49013-2-git-send-email-silbe@linux.vnet.ibm.com> Reviewed-by: Cornelia Huck <cornelia.huck@de.ibm.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
2016-03-15Merge remote-tracking branch 'remotes/thibault/tags/samuel-thibault' into ↵Peter Maydell34-224/+1958
staging slirp: Adding IPv6 support to Qemu -net user mode # gpg: Signature made Tue 15 Mar 2016 16:06:03 GMT using RSA key ID FB6B2F1D # gpg: Good signature from "Samuel Thibault <samuel.thibault@gnu.org>" # gpg: aka "Samuel Thibault <sthibault@debian.org>" # gpg: aka "Samuel Thibault <samuel.thibault@inria.fr>" # gpg: aka "Samuel Thibault <samuel.thibault@labri.fr>" # gpg: aka "Samuel Thibault <samuel.thibault@ens-lyon.org>" # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 900C B024 B679 31D4 0F82 304B D017 8C76 7D06 9EE6 # Subkey fingerprint: F632 74CD C630 0873 CB3D 29D9 E3E5 1CE8 FB6B 2F1D * remotes/thibault/tags/samuel-thibault: slirp: Add IPv6 support to the TFTP code qapi-schema, qemu-options & slirp: Adding Qemu options for IPv6 addresses slirp: Adding IPv6 address for DNS relay slirp: Handle IPv6 in TCP functions slirp: Reindent after refactoring slirp: Generalizing and neutralizing various TCP functions before adding IPv6 stuff slirp: Factorizing tcpiphdr structure with an union slirp: Adding IPv6 UDP support slirp: Adding ICMPv6 error sending slirp: Fix ICMP error sending slirp: Adding IPv6, ICMPv6 Echo and NDP autoconfiguration Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-03-15Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into stagingPeter Maydell44-620/+1115
vhost, virtio, pci, pc, acpi nvdimm work sparse cpu id rework ipmi enhancements fixes all over the place pxb option to tweak chassis number Signed-off-by: Michael S. Tsirkin <mst@redhat.com> # gpg: Signature made Tue 15 Mar 2016 14:33:10 GMT using RSA key ID D28D5469 # gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" # gpg: aka "Michael S. Tsirkin <mst@redhat.com>" * remotes/mst/tags/for_upstream: (51 commits) hw/acpi: fix GSI links UID ipmi: add some local variables in ipmi_sdr_init ipmi: remove the need of an ending record in the SDR table ipmi: use a function to initialize the SDR table ipmi: add a realize function to the device class ipmi: add rsp_buffer_set_error() helper ipmi: remove IPMI_CHECK_RESERVATION() macro ipmi: replace IPMI_ADD_RSP_DATA() macro with inline helpers ipmi: remove IPMI_CHECK_CMD_LEN() macro MAINTAINERS: machine core MAINTAINERS: Add an entry for virtio header files pc: acpi: clarify why possible LAPIC entries must be present in MADT pc: acpi: drop cpu->found_cpus bitmap pc: acpi: create Processor and Notify objects only for valid lapics pc: acpi: create MADT.lapic entries only for valid lapics pc: acpi: SRAT: create only valid processor lapic entries pc: acpi: cleanup qdev_get_machine() calls machine: introduce MachineClass.possible_cpu_arch_ids() hook pc: init pcms->apic_id_limit once and use it throughout pc.c pc: acpi: remove NOP assignment ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-03-15slirp: Add IPv6 support to the TFTP codeThomas Huth4-72/+100
Add the handler code for incoming TFTP packets to udp6_input(), and make sure that the TFTP code can send packets with both, udp_output() and udp6_output() by introducing a wrapper function called tftp_udp_output(). Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
2016-03-15Merge remote-tracking branch ↵Peter Maydell1-21/+49
'remotes/berrange/tags/pull-io-next-2016-03-15-1' into staging Merge I/O fixes # gpg: Signature made Tue 15 Mar 2016 14:42:43 GMT using RSA key ID 15104FDF # gpg: Good signature from "Daniel P. Berrange <dan@berrange.com>" # gpg: aka "Daniel P. Berrange <berrange@redhat.com>" * remotes/berrange/tags/pull-io-next-2016-03-15-1: io: stronger check for support for IPv4/6 Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-03-15hw/acpi: fix GSI links UIDMarcel Apfelbaum1-12/+8
According to the ACPI spec, each UID must be unique. Use the irq number as UID for GSI links. Suggested-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Marcel Apfelbaum <marcel@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2016-03-15io: stronger check for support for IPv4/6Daniel P. Berrange1-21/+49
Instead of just checking for bind(), also check whether getaddrinfo can resolve IPv6 addresses. This catches failure when travis runs QEMU builds inside minimal docker containers Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-03-15Merge remote-tracking branch 'remotes/ehabkost/tags/x86-pull-request' into ↵Peter Maydell2-0/+5
staging X86 fixes # gpg: Signature made Mon 14 Mar 2016 20:26:25 GMT using RSA key ID 984DC5A6 # gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>" * remotes/ehabkost/tags/x86-pull-request: kvm: Remove x2apic feature from CPU model when kernel_irqchip is off hyperv: cpu hotplug fix with HyperV enabled Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-03-15Merge remote-tracking branch 'remotes/rth/tags/pull-i386-20160314' into stagingPeter Maydell1-120/+164
target-i386 fixes # gpg: Signature made Mon 14 Mar 2016 17:54:06 GMT using RSA key ID 4DD0279B # gpg: Good signature from "Richard Henderson <rth7680@gmail.com>" # gpg: aka "Richard Henderson <rth@redhat.com>" # gpg: aka "Richard Henderson <rth@twiddle.net>" * remotes/rth/tags/pull-i386-20160314: target-i386: Dump unknown opcodes with -d unimp target-i386: Fix inhibit irq mask handling target-i386: Use gen_nop_modrm for prefetch instructions target-i386: Fix addr16 prefix target-i386: Fix SMSW for 64-bit mode target-i386: Fix SMSW and LMSW from/to register target-i386: Avoid repeated calls to the bnd_jmp helper Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-03-15qapi-schema, qemu-options & slirp: Adding Qemu options for IPv6 addressesYann Bordenave6-30/+148
This patch adds parameters to manage some new options in the qemu -net command. Slirp IPv6 address, network prefix, and DNS IPv6 address can be given in argument to the qemu command. Defaults parameters are respectively fec0::2, fec0::, /64 and fec0::3. Signed-off-by: Yann Bordenave <meow@meowstars.org> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Thomas Huth <thuth@redhat.com>
2016-03-15slirp: Adding IPv6 address for DNS relayGuillaume Subiron4-1/+41
This patch adds an IPv6 address to the DNS relay. in6_equal_dns() is developed using this Slirp attribute. sotranslate_in/out/accept() are also updated to manage the IPv6 case so the guest can be able to join the host using one of the Slirp addresses. For now this only points to localhost. Further development will be needed to automatically fetch the IPv6 address from resolv.conf, and announce this via RDNSS. Signed-off-by: Guillaume Subiron <maethor@subiron.org> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Thomas Huth <thuth@redhat.com>
2016-03-15slirp: Handle IPv6 in TCP functionsGuillaume Subiron6-9/+125
This patch adds IPv6 case in TCP functions refactored by the last patches. This also adds IPv6 pseudo-header in tcpiphdr structure. Finally, tcp_input() is called by ip6_input(). Signed-off-by: Guillaume Subiron <maethor@subiron.org> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Thomas Huth <thuth@redhat.com>
2016-03-15slirp: Reindent after refactoringGuillaume Subiron3-92/+91
No code change. Signed-off-by: Guillaume Subiron <maethor@subiron.org> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Thomas Huth <thuth@redhat.com>
2016-03-15slirp: Generalizing and neutralizing various TCP functions before adding ↵Guillaume Subiron7-31/+109
IPv6 stuff Basically, this patch adds some switch in various TCP functions to prepare them for the IPv6 case. To have something to "switch" in tcp_input() and tcp_respond(), a new argument is used to give them the sa_family of the addresses they are working on. This patch does not include the entailed reindentation, to make proofread easier. Reindentation is adressed in the following no-op patch. Signed-off-by: Guillaume Subiron <maethor@subiron.org> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Thomas Huth <thuth@redhat.com>
2016-03-15slirp: Factorizing tcpiphdr structure with an unionGuillaume Subiron8-45/+106
This patch factorizes the tcpiphdr structure to put the IPv4 fields in an union, for addition of version 6 in further patch. Using some macros, retrocompatibility of the existing code is assured. This patch also fixes the SLIRP_MSIZE and margin computation in various functions, and makes them compatible with the new tcpiphdr structure, whose size will be bigger than sizeof(struct tcphdr) + sizeof(struct ip) Signed-off-by: Guillaume Subiron <maethor@subiron.org> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Thomas Huth <thuth@redhat.com>
2016-03-15slirp: Adding IPv6 UDP supportGuillaume Subiron6-9/+208
This adds the sin6 case in the fhost and lhost unions and related macros. It adds udp6_input() and udp6_output(). It adds the IPv6 case in sorecvfrom(). Finally, udp_input() is called by ip6_input(). Signed-off-by: Guillaume Subiron <maethor@subiron.org> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Thomas Huth <thuth@redhat.com>
2016-03-15slirp: Adding ICMPv6 error sendingYann Bordenave3-3/+84
Adding icmp6_send_error to send ICMPv6 Error messages. This function is simpler than the v4 version. Adding some calls in various functions to send ICMP errors, when a received packet is too big, or when its hop limit is 0. Signed-off-by: Yann Bordenave <meow@meowstars.org> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Thomas Huth <thuth@redhat.com>
2016-03-15slirp: Fix ICMP error sendingYann Bordenave7-17/+18
Disambiguation : icmp_error is renamed into icmp_send_error, since it doesn't manage errors, but only sends ICMP Error messages. Signed-off-by: Yann Bordenave <meow@meowstars.org> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Thomas Huth <thuth@redhat.com>
2016-03-15slirp: Adding IPv6, ICMPv6 Echo and NDP autoconfigurationGuillaume Subiron12-6/+1019
This patch adds the functions needed to handle IPv6 packets. ICMPv6 and NDP headers are implemented. Slirp is now able to send NDP Router or Neighbor Advertisement when it receives Router or Neighbor Solicitation. Using a 64bit-sized IPv6 prefix, the guest is now able to perform stateless autoconfiguration (SLAAC) and to compute its IPv6 address. This patch adds an ndp_table, mainly inspired by arp_table, to keep an NDP cache and manage network address resolution. Slirp regularly sends NDP Neighbor Advertisement, as recommended by the RFC, to make the guest refresh its route. This also adds ip6_cksum() to compute ICMPv6 checksums using IPv6 pseudo-header. Some #define ETH_* are moved upper in slirp.h to make them accessible to other slirp/*.h Signed-off-by: Guillaume Subiron <maethor@subiron.org> Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by: Thomas Huth <thuth@redhat.com>
2016-03-15Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into stagingPeter Maydell38-706/+1450
Block layer patches # gpg: Signature made Mon 14 Mar 2016 16:36:52 GMT using RSA key ID C88F2FD6 # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" * remotes/kevin/tags/for-upstream: (40 commits) iotests: Add test for QMP event rates monitor: Use QEMU_CLOCK_VIRTUAL for the event queue in qtest mode monitor: Separate QUORUM_REPORT_BAD events according to the node name quorum: Fix crash in quorum_aio_cb() iotests: Correct 081's reference output block: Remove unused typedef of BlockDriverDirtyHandler block: Move block dirty bitmap code to separate files typedefs: Add BdrvDirtyBitmap block: Include hbitmap.h in block.h backup: Use Bitmap to replace "s->bitmap" vpc: Use BB functions in .bdrv_create() vmdk: Use BB functions in .bdrv_create() vhdx: Use BB functions in .bdrv_create() vdi: Use BB functions in .bdrv_create() sheepdog: Use BB functions in .bdrv_create() qed: Use BB functions in .bdrv_create() qcow2: Use BB functions in .bdrv_create() qcow: Use BB functions in .bdrv_create() parallels: Use BB functions in .bdrv_create() block: Introduce blk_set_allow_write_beyond_eof() ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-03-14kvm: Remove x2apic feature from CPU model when kernel_irqchip is offLan Tianyu1-0/+4
x2apic feature is in the kvm_default_props and automatically added to all CPU models when KVM is enabled. But userspace devices don't support x2apic which can't be enabled without the in-kernel irqchip. It will trigger warning of "host doesn't support requested feature: CPUID.01H:ECX.x2apic [bit 21]" when kernel_irqchip is off. This patch is to fix it via removing x2apic feature when kernel_irqchip is off. Signed-off-by: Lan Tianyu <tianyu.lan@intel.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2016-03-14hyperv: cpu hotplug fix with HyperV enabledDenis V. Lunev1-0/+1
With Hyper-V enabled CPU hotplug stops working. The CPU appears in device manager on Windows but does not appear in peformance monitor and control panel. The root of the problem is the following. Windows checks HV_X64_CPU_DYNAMIC_PARTITIONING_AVAILABLE bit in CPUID. The presence of this bit is enough to cure the situation. The bit should be set when CPU hotplug is allowed for HyperV VM. The check that hot_add_cpu callback is defined is enough from the protocol point of view. Though this callback is defined almost always thus there is no need to export that knowledge in the other way. Signed-off-by: Denis V. Lunev <den@openvz.org> Reviewed-by: Roman Kagan <rkagan@virtuozzo.com> CC: Paolo Bonzini <pbonzini@redhat.com> CC: Richard Henderson <rth@twiddle.net> CC: Eduardo Habkost <ehabkost@redhat.com> CC: "Andreas Färber" <afaerber@suse.de> Reviewed-by: Eduardo Habkost <ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2016-03-14target-i386: Dump unknown opcodes with -d unimpRichard Henderson1-44/+83
We discriminate here between opcodes that are illegal in the current cpu mode or with illegal arguments (such as modrm.mod == 3) and encodings that are unknown (such as an unimplemented isa extension). Signed-off-by: Richard Henderson <rth@twiddle.net>
2016-03-14target-i386: Fix inhibit irq mask handlingRichard Henderson1-39/+37
The patch in 7f0b714 was too simplistic, in that we wound up setting the flag and then resetting it immediately in gen_eob. Fixes the reported boot problem with Windows XP. Reported-by: Hervé Poussineau <hpoussin@reactos.org> Tested-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
2016-03-14target-i386: Use gen_nop_modrm for prefetch instructionsRichard Henderson1-3/+2
Tested-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
2016-03-14target-i386: Fix addr16 prefixPaolo Bonzini1-7/+7
While ADDSEG will only be false in 16-bit mode for LEA, it can be false even in other cases when 16-bit addresses are obtained via the 67h prefix in 32-bit mode. In this case, gen_lea_v_seg forgets to add a nonzero FS or GS base if CS/DS/ES/SS are all zero. This case is pretty rare but happens when booting Windows 95/98, and this patch fixes it. The bug is visible since commit d6a291498, but it was introduced together with gen_lea_v_seg and it probably could be reproduced with a "addr16 gs movsb" instruction as early as in commit ca2f29f555805d07fb0b9ebfbbfc4e3656530977. Reported-by: Hervé Poussineau <hpoussin@reactos.org> Tested-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <1456931078-21635-1-git-send-email-pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
2016-03-14target-i386: Fix SMSW for 64-bit modeRichard Henderson1-6/+8
In non-64-bit modes, the instruction always stores 16 bits. But in 64-bit mode, when the destination is a register, the instruction can write 32 or 64 bits. Tested-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Richard Henderson <rth@twiddle.net>
2016-03-14target-i386: Fix SMSW and LMSW from/to registerPaolo Bonzini1-16/+22
SMSW and LMSW accept register operands, but commit 1906b2a ("target-i386: Rearrange processing of 0F 01", 2016-02-13) did not account for that. Fixes: 1906b2af7c2345037d9b2fdf484b457b5acd09d1 Reported-by: Hervé Poussineau <hpoussin@reactos.org> Tested-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <1456845134-18812-1-git-send-email-pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net>
2016-03-14target-i386: Avoid repeated calls to the bnd_jmp helperPaolo Bonzini1-5/+5
Two flags were tested the wrong way. Tested-by: Hervé Poussineau <hpoussin@reactos.org> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <1456845145-18891-1-git-send-email-pbonzini@redhat.com> Signed-off-by: Richard Henderson <rth@twiddle.net> [rth: Fixed enable test as well.]
2016-03-14Merge remote-tracking branch ↵Kevin Wolf13-413/+603
'mreitz/tags/pull-block-for-kevin-2016-03-14-v2' into queue-block Block patches for pi day, v2. # gpg: Signature made Mon Mar 14 17:35:29 2016 CET using RSA key ID E838ACAD # gpg: Good signature from "Max Reitz <mreitz@redhat.com>" * mreitz/tags/pull-block-for-kevin-2016-03-14-v2: iotests: Add test for QMP event rates monitor: Use QEMU_CLOCK_VIRTUAL for the event queue in qtest mode monitor: Separate QUORUM_REPORT_BAD events according to the node name quorum: Fix crash in quorum_aio_cb() iotests: Correct 081's reference output block: Remove unused typedef of BlockDriverDirtyHandler block: Move block dirty bitmap code to separate files typedefs: Add BdrvDirtyBitmap block: Include hbitmap.h in block.h backup: Use Bitmap to replace "s->bitmap" Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-03-14iotests: Add test for QMP event ratesAlberto Garcia3-0/+135
This test verifies that the rate-limited QMP events are emitted at a maximum rate of 1 per second as defined in monitor_qapi_event_conf in monitor.c It also checks that QUORUM_REPORT_BAD events generated from different nodes are kept in separate queues so they don't mask each other. Signed-off-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-id: 0dbd3ee88a59a6363042ad81cfb345037bfbf612.1457610443.git.berto@igalia.com [mreitz@redhat.com: Renamed test from 146 to 148] Signed-off-by: Max Reitz <mreitz@redhat.com>
2016-03-14monitor: Use QEMU_CLOCK_VIRTUAL for the event queue in qtest modeAlberto Garcia1-3/+10
This allows us to perform tests on the monitor queues to verify that the rate limits are enforced. Signed-off-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-id: dde511809e954a5c32d5b648bb184c03c89ed5d5.1457610443.git.berto@igalia.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2016-03-14monitor: Separate QUORUM_REPORT_BAD events according to the node nameAlberto Garcia1-0/+9
The QUORUM_REPORT_BAD event is emitted whenever there's an I/O error in a child of a Quorum device. This event is emitted at a maximum rate of 1 per second. This means that an error in one of the children will mask errors in the other children if they happen within the same 1 second interval. This patch modifies qapi_event_throttle_equal() so QUORUM_REPORT_BAD events are kept separately if they come from different children. Signed-off-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-id: b989c0cb3755bc4b6696e796fa8ed2ef6c56606a.1457610443.git.berto@igalia.com Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Max Reitz <mreitz@redhat.com>
2016-03-14quorum: Fix crash in quorum_aio_cb()Alberto Garcia1-5/+7
quorum_aio_cb() emits the QUORUM_REPORT_BAD event if there's an I/O error in a Quorum child. However sacb->aiocb must be correctly initialized for this to happen. read_quorum_children() and read_fifo_child() are not doing this, which results in a QEMU crash. Signed-off-by: Alberto Garcia <berto@igalia.com> Reviewed-by: Max Reitz <mreitz@redhat.com> Message-id: 8138570d071ba7e25db3736979234a1fd71dbd05.1457610443.git.berto@igalia.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2016-03-14iotests: Correct 081's reference outputMax Reitz1-1/+1
The newly added type parameter for the QUORUM_REPORT_BAD event changed the output of iotest 081, so the reference should be amended accordingly. Signed-off-by: Max Reitz <mreitz@redhat.com> Message-id: 1457705687-27122-1-git-send-email-mreitz@redhat.com Reviewed-by: Alberto Garcia <berto@igalia.com>
2016-03-14block: Remove unused typedef of BlockDriverDirtyHandlerFam Zheng1-2/+0
Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Message-id: 1457412306-18940-6-git-send-email-famz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2016-03-14block: Move block dirty bitmap code to separate filesFam Zheng5-395/+433
The only code change is making bdrv_dirty_bitmap_truncate public. It is used in block.c. Also two long lines (bdrv_get_dirty) are wrapped. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Message-id: 1457412306-18940-5-git-send-email-famz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2016-03-14typedefs: Add BdrvDirtyBitmapFam Zheng2-1/+1
Following patches to refactor and move block dirty bitmap code could use this. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Message-id: 1457412306-18940-4-git-send-email-famz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2016-03-14block: Include hbitmap.h in block.hFam Zheng1-1/+1
Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Message-id: 1457412306-18940-3-git-send-email-famz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2016-03-14backup: Use Bitmap to replace "s->bitmap"Fam Zheng1-5/+6
"s->bitmap" tracks done sectors, we only check bit states without using any iterator which HBitmap is good for. Switch to "Bitmap" which is simpler and more memory efficient. Meanwhile, rename it to done_bitmap, to reflect the intention. Signed-off-by: Fam Zheng <famz@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Message-id: 1457412306-18940-2-git-send-email-famz@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
2016-03-14Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' ↵Peter Maydell2-16/+56
into staging # gpg: Signature made Mon 14 Mar 2016 11:27:01 GMT using RSA key ID 81AB73C8 # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>" # gpg: aka "Stefan Hajnoczi <stefanha@gmail.com>" * remotes/stefanha/tags/tracing-pull-request: trace: separate MMIO tracepoints from TB-access tracepoints trace: include CPU index in trace_memory_region_*() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2016-03-14vpc: Use BB functions in .bdrv_create()Kevin Wolf1-16/+21
All users of the block layers are supposed to go through a BlockBackend. The .bdrv_create() implementation is one such user, so this patch converts it. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-03-14vmdk: Use BB functions in .bdrv_create()Kevin Wolf1-34/+43
All users of the block layers are supposed to go through a BlockBackend. The .bdrv_create() implementation is one such user, so this patch converts it. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-03-14vhdx: Use BB functions in .bdrv_create()Kevin Wolf1-13/+16
All users of the block layers are supposed to go through a BlockBackend. The .bdrv_create() implementation is one such user, so this patch converts it. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-03-14vdi: Use BB functions in .bdrv_create()Kevin Wolf1-9/+14
All users of the block layers are supposed to go through a BlockBackend. The .bdrv_create() implementation is one such user, so this patch converts it. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-03-14sheepdog: Use BB functions in .bdrv_create()Kevin Wolf1-19/+24
All users of the block layers are supposed to go through a BlockBackend. The .bdrv_create() implementation is one such user, so this patch converts it. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-03-14qed: Use BB functions in .bdrv_create()Kevin Wolf1-13/+15
All users of the block layers are supposed to go through a BlockBackend. The .bdrv_create() implementation is one such user, so this patch converts it. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-03-14qcow2: Use BB functions in .bdrv_create()Kevin Wolf1-29/+33
All users of the block layers are supposed to go through a BlockBackend. The .bdrv_create() implementation is one such user, so this patch converts it. Signed-off-by: Kevin Wolf <kwolf@redhat.com>