commit_msg
stringlengths 1
24.2k
| commit_hash
stringlengths 2
84
⌀ | project
stringlengths 2
40
| source
stringclasses 4
values | labels
int64 0
1
| repo_url
stringlengths 26
70
⌀ | commit_url
stringlengths 74
118
⌀ | commit_date
stringlengths 25
25
⌀ |
---|---|---|---|---|---|---|---|
block: Detect multiplication overflow in bdrv_getlength
Bogus image may have a large total_sectors that will overflow the
multiplication. For cleanness, fix the return code so the error message
will be meaningful.
Reported-by: Richard W.M. Jones <[email protected]>
Signed-off-by: Fam Zheng <[email protected]>
Reviewed-by: Alberto Garcia <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 4a9c9ea0d318bec2f67848c5ceaf4ad5bcb91d09 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/4a9c9ea0d318bec2f67848c5ceaf4ad5bcb91d09 | 2015-05-22 17:08:01+02:00 |
ui: remove check for failure of qemu_acl_init()
The qemu_acl_init() function has long since stopped being able
to return NULL, since g_malloc will abort on OOM. As such the
checks for NULL were unreachable code.
Signed-off-by: Daniel P. Berrange <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
| 2b2c1a38eeaba5d8bfe92281e9e680361e09ee3b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2b2c1a38eeaba5d8bfe92281e9e680361e09ee3b | 2015-05-20 10:23:08+02:00 |
qapi: Turn generators' mandatory option -i into an argument
Mandatory option is silly, and the error handling is missing: the
programs crash when -i isn't supplied. Make it an argument, and check
it properly.
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
| 16d80f61814745bd3f5bb9f47ae3b00edf9e1e45 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/16d80f61814745bd3f5bb9f47ae3b00edf9e1e45 | 2015-05-14 18:41:23+02:00 |
dma-helpers: Fix race condition of continue_after_map_failure and dma_aio_cancel
If DMA's owning thread cancels the IO while the bounce buffer's owning thread
is notifying the "cpu client list", a use-after-free happens:
continue_after_map_failure dma_aio_cancel
------------------------------------------------------------------
aio_bh_new
qemu_bh_delete
qemu_bh_schedule (use after free)
Also, the old code doesn't run the bh in the right AioContext.
Fix both problems by passing a QEMUBH to cpu_register_map_client.
Signed-off-by: Fam Zheng <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-Id: <[email protected]>
[Remove unnecessary forward declaration. - Paolo]
Signed-off-by: Paolo Bonzini <[email protected]>
| e95205e1f9cd2c4262b7a7b1c992a94512c86d0e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/e95205e1f9cd2c4262b7a7b1c992a94512c86d0e | 2015-04-27 18:24:18+02:00 |
qapi: Better error messages for bad enums
The previous commit demonstrated that the generator had several
flaws with less-than-perfect enums:
- an enum that listed the same string twice (or two variant
strings that map to the same C enumerator) ended up generating
an invalid C enum
- because the generator adds a _MAX terminator to each enum,
the use of an enum member 'max' can also cause this clash
- if an enum omits 'data', the generator left a python stack
trace rather than a graceful message
- an enum that used a non-array 'data' was silently accepted by
the parser
- an enum that used non-string members in the 'data' member
was silently accepted by the parser
Add check_enum to cover these situations, and update testcases
to match. While valid .json files won't trigger any of these
cases, we might as well be nicer to developers that make a typo
while trying to add new QAPI code.
Signed-off-by: Eric Blake <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Signed-off-by: Markus Armbruster <[email protected]>
| cf3935907b5df16f667d54ad6761c7e937dcf425 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/cf3935907b5df16f667d54ad6761c7e937dcf425 | 2015-05-05 18:39:00+02:00 |
virtio-net: validate backend queue numbers against bus limitation
We don't validate the backend queue numbers against bus limitation,
this will easily crash qemu if it exceeds the limitation which will
hit the abort() in virtio_del_queue(). An example is trying to
starting a virtio-net device with 256 queues. E.g:
./qemu-system-x86_64 -netdev tap,id=hn0,queues=256 -device
virtio-net-pci,netdev=hn0
Fixing this by doing the validation and fail early.
Cc: Michael S. Tsirkin <[email protected]>
Cc: qemu-stable <[email protected]>
Signed-off-by: Jason Wang <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
| 7e0e736ecdfeac6d3517513d3a702304e4f6cf59 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/7e0e736ecdfeac6d3517513d3a702304e4f6cf59 | 2015-03-25 13:39:25+01:00 |
numa: Fix off-by-one error at MAX_CPUMASK_BITS check
Fix the CPU index check to ensure we don't go beyond the size of the
node_cpu bitmap.
CPU index is always less than MAX_CPUMASK_BITS, as documented at
sysemu.h:
> The following shall be true for all CPUs:
> cpu->cpu_index < max_cpus <= MAX_CPUMASK_BITS
Reviewed-by: Igor Mammedov <[email protected]>
Signed-off-by: Eduardo Habkost <[email protected]>
| ed26b92290768818371fbfd4317988eab6009ad5 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ed26b92290768818371fbfd4317988eab6009ad5 | 2015-03-19 16:01:22-03:00 |
util/uri: Add overflow check to rfc3986_parse_port
And while at it, replace tabs by eight spaces in this function.
Signed-off-by: Max Reitz <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 2b21233061696feed434317a70e0a8b74f956ec8 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2b21233061696feed434317a70e0a8b74f956ec8 | 2015-03-18 12:05:31+01:00 |
memory: keep the owner of the AddressSpace alive until do_address_space_destroy
This fixes a use-after-free if do_address_space_destroy is executed
too late.
Reviewed-by: Michael Roth <[email protected]>
Tested-by: Michael Roth <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| ac95190ea92f7625bb0065c2864321607b95c26b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ac95190ea92f7625bb0065c2864321607b95c26b | 2015-02-11 21:48:44+01:00 |
target-arm: A64: Avoid left shifting negative integers in disas_pc_rel_addr
Shifting a negative integer left is undefined behaviour in C.
Avoid it by assembling and shifting the offset fields as
unsigned values and then sign extending as the final action.
Signed-off-by: Peter Maydell <[email protected]>
Message-id: [email protected]
| 037e1d009e2fcb80784d37f0e12aa999787d46d4 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/037e1d009e2fcb80784d37f0e12aa999787d46d4 | 2015-02-13 05:46:09+00:00 |
hmp: Compile hmp_info_spice() only with CONFIG_SPICE
It's dead code when CONFIG_SPICE is off. If it wasn't, it would crash
dereferencing the null pointer returned by the qmp_query_spice()
dummy in qmp.c.
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Gerd Hoffmann <[email protected]>
| 206addd58f251666f5b64d43957ddcba465c0ef1 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/206addd58f251666f5b64d43957ddcba465c0ef1 | 2015-01-29 10:01:45+01:00 |
target-mips: Correct the handling of register #72 on writes
Fix an off-by-one error in `mips_cpu_gdb_write_register' for register
matching how `mips_cpu_gdb_read_register' handles it. This register
slot is a fake anyway, there's nothing in hardware that corresponds to
it.
Signed-off-by: Maciej W. Rozycki <[email protected]>
Reviewed-by: Leon Alrae <[email protected]>
Signed-off-by: Leon Alrae <[email protected]>
| 800675f11742b6080e40d17b8d5f35d3a5fc5724 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/800675f11742b6080e40d17b8d5f35d3a5fc5724 | 2014-12-16 12:45:19+00:00 |
update ipxe from 69313ed to 35c5379
Anton D. Kachalov (1):
[intel] Add 8086:1557 card (Intel 82599 10G ethernet mezz)
Christian Hesse (1):
[build] Merge util/geniso and util/genliso
Curtis Larsen (3):
[efi] Use EFI_CONSOLE_CONTROL_PROTOCOL to set text mode if available
[efi] Report errors from attempting to disconnect existing drivers
[efi] Try various possible SNP receive filters
Dale Hamel (1):
[smbios] Expose board serial number as ${board-serial}
Florian Schmaus (1):
[build] Set GITVERSION only if there is a git repository
Hannes Reinecke (3):
[ethernet] Provide eth_random_addr() to generate random Ethernet addresses
[igbvf] Assign random MAC address if none is set
[igbvf] Allow changing of MAC address
Jan Kiszka (1):
[intel] Add I217-LM PCI ID
Marin Hannache (4):
[nfs] Fix an invalid free() when loading a symlink
[nfs] Fix an invalid free() when loading a regular (non-symlink) file
[nfs] Rewrite NFS URI handling
[readline] Add CTRL-W shortcut to remove a word
Michael Brown (144):
[profile] Allow interrupts to be excluded from profiling results
[intel] Exclude time spent in hypervisor from profiling
[build] Fix version.o dependency upon git index
[tcp] Defer sending ACKs until all received packets have been processed
[lkrnprefix] Function as a bzImage kernel
[build] Avoid errors when build directory is mounted via NFS
[undi] Apply quota only to number of complete received packets
[lkrnprefix] Make real-mode setup code relocatable
[intel] Increase receive ring fill level
[syslog] Strip invalid characters from hostname
[test] Add self-tests for strdup()
[libc] Prevent strndup() from reading beyond the end of the string
[efi] Allow for optional protocols
[efi] Make EFI_DEVICE_PATH_TO_TEXT_PROTOCOL optional
[efi] Make EFI_HII_DATABASE_PROTOCOL optional
[efi] Do not try to fetch loaded image device path protocol
[ipv6] Fix definition of IN6_IS_ADDR_LINKLOCAL()
[dhcpv6] Do not set sin6_scope_id on the unspecified client socket address
[ipv6] Do not set sin6_scope_id on source address
[ipv6] Include network device when transcribing multicast addresses
[ipv6] Avoid potentially copying from a NULL pointer in ipv6_tx()
[librm] Allow for the PIC interrupt vector offset to be changed
[ifmgmt] Do not sleep CPU while configuring network devices
[scsi] Improve sense code parsing
[iscsi] Read IPv4 settings only from the relevant network device
[iscsi] Include IP address origin in iBFT
[debug] Allow debug message colours to be customised via DBGCOL=...
[build] Expose build timestamp, build name, and product names
[efi] Allow device paths to be easily included in debug messages
[efi] Provide a meaningful EFI SNP device name
[efi] Restructure EFI driver model
[build] Fix erroneous object name in version object
[build] Add yet another potential location for isolinux.bin
[efi] Allow network devices to be created on top of arbitrary SNP devices
[autoboot] Allow autoboot device to be identified by link-layer address
[efi] Identify autoboot device by MAC address when chainloading
[efi] Attempt to start only drivers claiming support for a device
[efi] Rewrite SNP NIC driver
[efi] Include SNP NIC driver within the all-drivers target
[crypto] Add support for iPAddress subject alternative names
[crypto] Fix debug message
[netdevice] Reset network device index when last device is unregistered
[efi] Update EDK2 headers
[efi] Install our own disk I/O protocol and claim exclusive use of it
[efi] Allow for interception of boot services calls by loaded image
[efi] Print well-known GUIDs by name in debug messages
[efi] Include EFI_CONSOLE_CONTROL_PROTOCOL header
[ioapi] Fail ioremap() when attempting to map a zero bus address
[intel] Check for ioremap() failures
[realtek] Check for ioremap() failures
[vmxnet3] Check for ioremap() failures
[skel] Check for ioremap() failures
[myson] Check for ioremap() failures
[natsemi] Check for ioremap() failures
[i386] Add functions to read and write model-specific registers
[x86_64] Add functions to read and write model-specific registers
[efi] Show more diagnostic information when building with DEBUG=efi_wrap
[ioapi] Centralise notion of PAGE_SIZE
[lotest] Discard packets arriving on the incorrect network device
[xen] Import selected public headers
[xen] Add basic support for PV-HVM domains
[xen] Add support for Xen netfront virtual NICs
[efi] Default to releasing network devices for use via SNP
[efi] Unload started images only on failure
[efi] Fill in loaded image's DeviceHandle if firmware fails to do so
[efi] Fix incorrect debug message level when device has no device path
[efi] Report exact failure when unable to open the device path
[netdevice] Avoid registering duplicate network devices
[efi] Ignore failures when attempting to install SNP HII protocol
[efi] Expand the range of well-known EFI GUIDs in debug messages
[efi] Provide efi_handle_name() for debugging
[efi] Add ability to dump all openers of a given protocol on a handle
[efi] Use efi_handle_name() instead of efi_handle_devpath_text()
[efi] Use efi_handle_name() instead of efi_devpath_text() where applicable
[efi] Allow compiler to perform type checks on EFI_HANDLE
[efi] Avoid unnecessarily passing pointers to EFI_HANDLEs
[efi] Dump existing openers when we are unable to open a protocol
[efi] Dump handle information around connect/disconnect attempts
[efi] Improve debugging of the debugging facilities
[efi] Add excessive sanity checks into efi_debug functions
[efi] Also try original ComponentName protocol for retrieving driver names
[efi] Print raw device path when we have no DevicePathToTextProtocol
[efi] Add ability to dump SNP device mode information
[efi] Reset multicast filter list when setting SNP receive filters
[efi] Provide centralised definitions of commonly-used GUIDs
[efi] Open device path protocol only at point of use
[efi] Move abstract device path and handle functions to efi_utils.c
[efi] Generalise snpnet_pci_info() to efi_locate_device()
[bios] Support displaying and hiding cursor
[efi] Support displaying and hiding cursor
[readline] Ensure cursor is visible when prompting for input
[xen] Accept alternative Xen platform PCI device ID 5853:0002
[xen] Use version 1 grant tables by default
[xen] Cope with unexpected initial backend states
[smc9000] Avoid using CONFIG as a preprocessor macro
[build] Allow for named configurations at build time
[intel] Display PBS value when applying ICH errata workaround
[intel] Display before and after values for both PBS and PBA
[intel] Apply PBS/PBA errata workaround only to ICH8 PCI device IDs
[efi] Add definitions of GUIDs observed during Windows boot
[efi] Dump details of any calls to our dummy block and disk I/O protocols
[romprefix] Do not preserve unused register %di
[build] Remove obsolete references to .zrom build targets
[build] Allow ISA ROMs to be built
[build] Avoid deleting config header files if build is interrupted
[prefix] Halt system without burning CPU if we cannot access the payload
[prefix] Report both %esi and %ecx when opening payload fails
[util] Use PCI length field to obtain length of individual images
[mromprefix] Use PCI length field to obtain length of individual images
[mromprefix] Allow for .mrom images larger than 128kB
[efi] Show details of intercepted LoadImage() calls
[efi] Make our virtual file system case insensitive
[efi] Wrap any images loaded by our wrapped image
[efi] Use the SNP protocol instance to match the SNP chainloading device
[efi] Avoid returning uninitialised data from PCI configuration space reads
[efi] Make EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL optional
[efi] Allow for non-PCI snpnet devices
[build] Clean up all binary directories on "make [very]clean"
[efi] Add efifatbin utility
[efi] Provide dummy device path in efi_image_probe()
[dhcp] Check for matching chaddr in received DHCP packets
[dhcp] Remove obsolete dhcp_chaddr() function
[build] Use -malign-double to build 32-bit UEFI binaries
[efi] Centralise definitions of more protocol GUIDs
[efi] Add definitions of GUIDs observed when chainloading from Intel driver
[efi] Free transmit ring entry before calling netdev_tx_complete()
[efi] Generalise snpnet_dev_info() to efi_device_info()
[efi] Update to current EDK2 headers
[efi] Add NII / UNDI driver
[efi] Check for presence of UNDI in NII protocol
[efi] Include NII driver within "snp" and "snponly" build targets
[ping] Report timed-out pings via the callback function
[ping] Allow termination after a specified number of packets
[ping] Allow "ping" command output to be inhibited
[intel] Use autoloaded MAC address instead of EEPROM MAC address
[crypto] Fix parsing of OCSP responder ID key hash
[vmxnet3] Add profiling code to exclude time spent in the hypervisor
[netdevice] Fix erroneous use of free(iobuf) instead of free_iob(iobuf)
[libc] Add ASSERTED macro to test if any assertion has triggered
[list] Add sanity checks after list-adding functions
[malloc] Tidy up debug output
[malloc] Sanity check parameters to alloc_memblock() and free_memblock()
[malloc] Check integrity of free list
[malloc] Report caller address as soon as memory corruption is detected
Peter Lemenkov (1):
[build] Check if git index actually exists
Robin Smidsrød (2):
[build] Add named configuration for VirtualBox
[build] Avoid using embedded script in VirtualBox named configuration
Sven Ulland (1):
[lacp] Set "aggregatable" flag in response LACPDU
Signed-off-by: Gerd Hoffmann <[email protected]>
| c246cee4eedb17ae3932d699e009a8b63240235f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c246cee4eedb17ae3932d699e009a8b63240235f | 2014-12-17 14:11:39+01:00 |
ide: Check validity of logical block size
Our IDE emulation can't handle logical block sizes other than 512. Check
for it.
The original assumption was that other values would silently be ignored
(which is bad enough), but it's not quite true: The physical block size
is exposed in IDENTIFY DEVICE as a multiple of the logical block size.
Setting a logical block size therefore also corrupts the physical block
size (4096/4096 doesn't silently downgrade to 4096/512, but 512/512).
Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
Reviewed-by: John Snow <[email protected]>
| d20051856cd2fa8f10fed2d2a0b2751de5f7b20d | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d20051856cd2fa8f10fed2d2a0b2751de5f7b20d | 2014-12-10 10:31:16+01:00 |
ide: Correct handling of malformed/short PRDTs
This impacts both BMDMA and AHCI HBA interfaces for IDE.
Currently, we confuse the difference between a PRDT having
"0 bytes" and a PRDT having "0 complete sectors."
When we receive an incomplete sector, inconsistent error checking
leads to an infinite loop wherein the call succeeds, but it
didn't give us enough bytes -- leading us to re-call the
DMA chain over and over again. This leads to, in the BMDMA case,
leaked memory for short PRDTs, and infinite loops and resource
usage in the AHCI case.
The .prepare_buf() callback is reworked to return the number of
bytes that it successfully prepared. 0 is a valid, non-error
answer that means the table was empty and described no bytes.
-1 indicates an error.
Our current implementation uses the io_buffer in IDEState to
ultimately describe the size of a prepared scatter-gather list.
Even though the AHCI PRDT/SGList can be as large as 256GiB, the
AHCI command header limits transactions to just 4GiB. ATA8-ACS3,
however, defines the largest transaction to be an LBA48 command
that transfers 65,536 sectors. With a 512 byte sector size, this
is just 32MiB.
Since our current state structures use the int type to describe
the size of the buffer, and this state is migrated as int32, we
are limited to describing 2GiB buffer sizes unless we change the
migration protocol.
For this reason, this patch begins to unify the assertions in the
IDE pathways that the scatter-gather list provided by either the
AHCI PRDT or the PCI BMDMA PRDs can only describe, at a maximum,
2GiB. This should be resilient enough unless we need a sector
size that exceeds 32KiB.
Further, the likelihood of any guest operating system actually
attempting to transfer this much data in a single operation is
very slim.
To this end, the IDEState variables have been updated to more
explicitly clarify our maximum supported size. Callers to the
prepare_buf callback have been reworked to understand the new
return code, and all versions of the prepare_buf callback have
been adjusted accordingly.
Lastly, the ahci_populate_sglist helper, relied upon by the
AHCI implementation of .prepare_buf() as well as the PCI
implementation of the callback have had overflow assertions
added to help make clear the reasonings behind the various
type changes.
[Added %d -> %"PRId64" fix John sent because off_pos changed from int to
int64_t.
--Stefan]
Signed-off-by: John Snow <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Message-id: [email protected]
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 3251bdcf1c67427d964517053c3d185b46e618e8 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3251bdcf1c67427d964517053c3d185b46e618e8 | 2014-11-14 09:20:35+00:00 |
acpi: accurate overflow check
Compare clock in ns, because acpi_pm_tmr_update uses rounded
to ns value instead of ticks.
Signed-off-by: Pavel Dovgalyuk <[email protected]>
[This lets Windows boot in icount mode. - Paolo]
Signed-off-by: Paolo Bonzini <[email protected]>
| 3ef0eab178e5120a0e1c079d163d5c71689d9b71 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3ef0eab178e5120a0e1c079d163d5c71689d9b71 | 2014-11-13 16:13:28+01:00 |
esp-pci: fixup deadlock with linux
A linux guest will be issuing messages:
[ 32.124042] DC390: Deadlock in DataIn_0: DMA aborted unfinished: 000000 bytes remain!!
[ 32.126348] DC390: DataIn_0: DMA State: 0
and the HBA will fail to work properly.
Reason is the emulation is not setting the 'DMA transfer done'
status correctly.
Signed-off-by: Hannes Reinecke <[email protected]>
Cc: [email protected]
Signed-off-by: Paolo Bonzini <[email protected]>
| c3543fb5fe4520f03dd4fef04fab7745eeca1c96 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/c3543fb5fe4520f03dd4fef04fab7745eeca1c96 | 2014-11-07 13:31:19+01:00 |
virtio-scsi: dataplane: fail setup gracefully
The dataplane code is currently doing a hard exit on various setup
failures. In practice, this may mean that a guest suddenly dies after
a dataplane device failed to come up (e.g., when a file descriptor
limit is hit for the nth device).
Let's just try to unwind the setup instead and return.
Signed-off-by: Cornelia Huck <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 361dcc790db8c87b2e46ab610739191ced894c44 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/361dcc790db8c87b2e46ab610739191ced894c44 | 2014-10-23 16:41:24+02:00 |
qemu-img: Print error if check failed
Currently, if bdrv_check() fails either by returning -errno or having
check_errors set, qemu-img check just exits with 1 after having told the
user that there were no errors on the image. This is bad.
Instead of printing the check result if there were internal errors which
were so bad that bdrv_check() could not even complete with 0 as a return
value, qemu-img check should inform the user about the error.
Signed-off-by: Max Reitz <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Reviewed-by: Markus Armbruster <[email protected]>
| 832390a5ed11e6c516db0986bf302d098e3ae36c | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/832390a5ed11e6c516db0986bf302d098e3ae36c | 2014-10-23 19:42:07+02:00 |
raw-posix: The SEEK_HOLE code is flawed, rewrite it
On systems where SEEK_HOLE in a trailing hole seeks to EOF (Solaris,
but not Linux), try_seek_hole() reports trailing data instead.
Additionally, unlikely lseek() failures are treated badly:
* When SEEK_HOLE fails, try_seek_hole() reports trailing data. For
-ENXIO, there's in fact a trailing hole. Can happen only when
something truncated the file since we opened it.
* When SEEK_HOLE succeeds, SEEK_DATA fails, and SEEK_END succeeds,
then try_seek_hole() reports a trailing hole. This is okay only
when SEEK_DATA failed with -ENXIO (which means the non-trailing hole
found by SEEK_HOLE has since become trailing somehow). For other
failures (unlikely), it's wrong.
* When SEEK_HOLE succeeds, SEEK_DATA fails, SEEK_END fails (unlikely),
then try_seek_hole() reports bogus data [-1,start), which its caller
raw_co_get_block_status() turns into zero sectors of data. Could
theoretically lead to infinite loops in code that attempts to scan
data vs. hole forward.
Rewrite from scratch, with very careful comments.
Signed-off-by: Markus Armbruster <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Max Reitz <[email protected]>
| d1f06fe665acdd7aa7a46a5ef88172c3d7d3028e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d1f06fe665acdd7aa7a46a5ef88172c3d7d3028e | 2014-11-18 09:45:48+01:00 |
spapr: fix possible memory leak
get_boot_devices_list() will malloc memory, spapr_finalize_fdt
doesn't free it.
Signed-off-by: Chenliang <[email protected]>
Signed-off-by: Gonglei <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
| a21a7a701252717f05defee8a1a33d72c28fabb7 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a21a7a701252717f05defee8a1a33d72c28fabb7 | 2014-09-08 12:50:47+02:00 |
linux-aio: Convert laio_aiocb_info.cancel to .cancel_async
Just call io_cancel (2), if it fails, it means the request is not
canceled, so the event loop will eventually call
qemu_laio_process_completion.
In qemu_laio_process_completion, change to call the cb unconditionally.
It is required by bdrv_aio_cancel_async.
Signed-off-by: Fam Zheng <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 771b64daf9c73be98d223d3ab101a61f02cac277 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/771b64daf9c73be98d223d3ab101a61f02cac277 | 2014-09-22 11:39:04+01:00 |
usb-ohci: Fix memory leak for ohci timer
Signed-off-by: Gonglei <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
| 80be63df5a19816629343f704345b71e83e6d960 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/80be63df5a19816629343f704345b71e83e6d960 | 2014-08-29 12:51:44+02:00 |
image-fuzzer: Public API for image-fuzzer/runner/runner.py
__init__.py provides the public API required by the test runner
Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Maria Kustova <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 071e6491947acff53196c119ea4713593e7a8b11 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/071e6491947acff53196c119ea4713593e7a8b11 | 2014-08-15 18:03:14+01:00 |
vmstate_xhci_event: fix unterminated field list
"vmstate_xhci_event" was introduced in commit 37352df3 ("xhci: add live
migration support"), and first released in v1.6.0. The field list in this
VMSD is not terminated with the VMSTATE_END_OF_LIST() macro.
During normal use (ie. migration), the issue is practically invisible,
because the "vmstate_xhci_event" object (with the unterminated field list)
is only ever referenced -- via "vmstate_xhci_intr" -- if xhci_er_full()
returns true, for the "ev_buffer" test. Since that field_exists() check
(apparently) almost always returns false, we almost never traverse
"vmstate_xhci_event" during migration, which hides the bug.
However, Amit's vmstate checker forces recursion into this VMSD as well,
and the lack of VMSTATE_END_OF_LIST() breaks the field list terminator
check (field->name != NULL) in dump_vmstate_vmsd(). The result is
undefined behavior, which in my case translates to infinite recursion
(because the loop happens to overflow into "vmstate_xhci_intr", which then
links back to "vmstate_xhci_event").
Add the missing terminator.
Signed-off-by: Laszlo Ersek <[email protected]>
Reviewed-by: Amit Shah <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Cc: [email protected]
Signed-off-by: Peter Maydell <[email protected]>
| 3afca1d6d413592c2b78cf28f52fa24a586d8f56 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3afca1d6d413592c2b78cf28f52fa24a586d8f56 | 2014-07-22 17:34:24+01:00 |
serial: change retry logic to avoid concurrency
Whenever serial_xmit fails to transmit a byte it adds a watch that would
call it again when the "line" becomes ready. This results in a retry
chain:
serial_xmit -> add_watch -> serial_xmit
Each chain is able to transmit one character, and for every character
passed to serial by the guest driver a new chain is spawned.
The problem lays with the fact that a new chain is spawned even when
there is one already waiting on the watch. So there can be several retry
chains waiting concurrently on one "line". Every chain tries to transmit
current character, so character order is not messed up. But also every
chain increases retry counter (tsr_retry). If there are enough
concurrent chains this counter will hit MAX_XMIT_RETRY value and
the character will be dropped.
To reproduce this bug you need to feed serial output to some program
consuming it slowly enough. A python script from bug #1335444
description is an example of such program.
This commit changes retry logic in the following way to avoid
concurrency: instead of spawning a new chain for each character being
transmitted spawn only one and make it transmit characters until FIFO is
empty.
The change consists of two parts:
- add a do {} while () loop in serial_xmit (diff is a bit erratic
for this part, diff -w will show actual change),
- do not call serial_xmit from serial_ioport_write if there is one
waiting on the watch already.
This should fix another issue causing bug #1335444.
Signed-off-by: Kirill Batuzov <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| f702e62a193e9ddb41cef95068717e5582b39a64 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/f702e62a193e9ddb41cef95068717e5582b39a64 | 2014-07-14 16:14:14+02:00 |
qed: Make qiov match request size until backing file EOF
If a QED image has a shorter backing file and a read request to
unallocated clusters goes across EOF of the backing file, the backing
file sees a shortened request and the rest is filled with zeros.
However, the original too long qiov was used with the shortened request.
This patch makes the qiov size match the request size, avoiding a
potential buffer overflow in raw-posix.
Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
| f06ee3d4aa547df8d7d2317b2b6db7a88c1f3744 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/f06ee3d4aa547df8d7d2317b2b6db7a88c1f3744 | 2014-07-14 12:03:20+02:00 |
virtio-pci: fix MSI memory region use after free
After memory region QOMification QEMU is stricter in detecting
wrong usage of the memory region API. Here it detected a
memory_region_destroy done before the corresponding
memory_region_del_subregion; the memory_region_destroy is
done by msix_uninit_exclusive_bar, the memory_region_del_subregion
is done by the PCI core's pci_unregister_io_regions before
pc->exit is called.
The problem was introduced by
commit 06a1307379fcd6c551185ad87679cd7ed896b9ea
virtio-pci: add device_unplugged callback
As noted in that commit log, virtio device kick callbacks need to be
stopped before generic virtio is cleaned up. This is because these are
notifications from pci proxy to the generic virtio device so they need
to be stopped in the unplug call before the virtio device is unrealized.
However interrupts are notifications from the virtio device to
the pci proxy so they need to stay around while the device
is realized.
The memory API misuse caused an assertion when hot-unplugging virtio
devices. Using the API correctly fixes the assertion.
Signed-off-by: Paolo Bonzini <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| 8b81bb3b069d4007bc44c8d5888d630b7f0b42ff | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/8b81bb3b069d4007bc44c8d5888d630b7f0b42ff | 2014-07-06 09:13:54+03:00 |
qdev: Fix crash when using non-device class name on -global
This fixes the following crash:
$ qemu-system-x86_64 -global container.xxx=y
hw/core/qdev-properties-system.c:399:qdev_add_one_global: Object 0x7f7eff234100 is not an instance of type device
Aborted (core dumped)
New behavior will be to just warn, just like when non-existing clas
names are used:
$ qemu-system-x86_64 -global container.xxx=y
qemu-system-x86_64: Warning: "-global container.xxx=y" not used
Signed-off-by: Eduardo Habkost <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Eduardo Habkost <[email protected]>
Tested-by: Don Slutz <[email protected]>
| dd98b71f4885814de9a64e7acc0e17b38ab7c38b | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/dd98b71f4885814de9a64e7acc0e17b38ab7c38b | 2014-07-06 09:13:54+03:00 |
signal/all/setup_frame remove __put_user checks
Remove "if(__put_user" checks and their related error paths
for all architecture's setup_frame, setup_rt_frame and similar.
Remove the unlock_user_struct when the only way to end up there is
from failed lock_user_struct.
Remove err variable if there are no users for it in the function
anymore.
Signed-off-by: Riku Voipio <[email protected]>
Reviewed-by: Peter Maydell <[email protected]>
| 0188fadb7fe460d8c4c743372b1f7b25773e183e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/0188fadb7fe460d8c4c743372b1f7b25773e183e | 2014-06-17 08:52:07+03:00 |
target-ppc: Introduce Decoder Macros for DFP
Add decoder macros for the various Decimal Floating Point
instruction forms. Illegal instruction masks are used to not only
guard against reserved instruction field use, but also to catch
illegal quad word forms that use odd-numbered floating point registers.
Signed-off-by: Tom Musta <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
| 275e35c6c1e2aa82eacb0ee13eb80fabeee66bbf | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/275e35c6c1e2aa82eacb0ee13eb80fabeee66bbf | 2014-06-16 13:24:29+02:00 |
target-arm: Fix errors in writes to generic timer control registers
The code for handling writes to the generic timer control registers
had several bugs:
* ISTATUS (bit 2) is read-only but we forced it to zero on any write
* the check for "was IMASK (bit 1) toggled?" incorrectly used '&' where
it should be '^'
* the handling of IMASK was inverted: we should set the IRQ if
ISTATUS is set and IMASK is clear, not if both are set
The combination of these bugs meant that when running a Linux guest
that uses the generic timers we would fairly quickly end up either
forgetting that the timer output should be asserted, or failing to
set the IRQ when the timer was unmasked. The result is that the guest
never gets any more timer interrupts.
Signed-off-by: Peter Maydell <[email protected]>
Message-id: [email protected]
Cc: [email protected]
| d3afacc7269fee45d54d1501a46b51f12ea7bb15 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d3afacc7269fee45d54d1501a46b51f12ea7bb15 | 2014-06-09 16:06:12+01:00 |
blockdev: acquire AioContext in block_set_io_throttle
The block_set_io_throttle QMP and HMP commands modify I/O throttling
limits for block devices.
Acquire the BlockDriverState's AioContext to protect against race
conditions with an IOThread that is running I/O for this device.
Signed-off-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Benoit Canet <[email protected]>
| b15446fdbf4ac2b29f6ee5080630a80715abfc20 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b15446fdbf4ac2b29f6ee5080630a80715abfc20 | 2014-06-04 09:56:12+02:00 |
block/linux-aio: fix memory and fd leak
Hot unplugging -drive aio=native,file=test.img,format=raw images leaves
the Linux AIO event notifier and struct qemu_laio_state allocated.
Luckily nothing will use the event notifier after the BlockDriverState
has been closed so the handler function is never called.
It's still worth fixing this resource leak.
Signed-off-by: Stefan Hajnoczi <[email protected]>
| abd269b7cf1f084a067731acb8f3272c193cb5f0 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/abd269b7cf1f084a067731acb8f3272c193cb5f0 | 2014-06-04 09:56:11+02:00 |
block: acquire AioContext in bdrv_*_all()
bdrv_close_all(), bdrv_commit_all(), bdrv_flush_all(),
bdrv_invalidate_cache_all(), and bdrv_clear_incoming_migration_all() are
called by main loop code and touch all BlockDriverState instances.
Some BlockDriverState instances may be running in another AioContext.
Make sure to acquire the AioContext before closing the BlockDriverState.
This will protect against race conditions once virtio-blk data-plane is
using the BlockDriverState from another AioContext event loop.
Note that this patch does not convert bdrv_drain_all() yet since that
conversion is non-trivial.
Signed-off-by: Stefan Hajnoczi <[email protected]>
| ed78cda3de92056737364ab3cb748b16f5f17dea | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ed78cda3de92056737364ab3cb748b16f5f17dea | 2014-06-04 09:56:11+02:00 |
blockdev: Plug memory leak in drive_init()
bs_opts is leaked on all paths from its qdev_new() that don't got
through blockdev_init(). Add the missing QDECREF(), and zap bs_opts
after blockdev_init(), so the new QDECREF() does nothing when we go
through blockdev_init().
Leak introduced in commit f298d07. Spotted by Coverity.
Signed-off-by: Markus Armbruster <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 3cb0e25c4b417b7336816bd92de458f0770d49ff | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/3cb0e25c4b417b7336816bd92de458f0770d49ff | 2014-05-30 14:26:54+02:00 |
aio: Fix use-after-free in cancellation path
The current flow of canceling a thread from THREAD_ACTIVE state is:
1) Caller wants to cancel a request, so it calls thread_pool_cancel.
2) thread_pool_cancel waits on the conditional variable
elem->check_cancel.
3) The worker thread changes state to THREAD_DONE once the task is
done, and notifies elem->check_cancel to allow thread_pool_cancel
to continue execution, and signals the notifier (pool->notifier) to
allow callback function to be called later. But because of the
global mutex, the notifier won't get processed until step 4) and 5)
are done.
4) thread_pool_cancel continues, leaving the notifier signaled, it
just returns to caller.
5) Caller thinks the request is already canceled successfully, so it
releases any related data, such as freeing elem->common.opaque.
6) In the next main loop iteration, the notifier handler,
event_notifier_ready, is called. It finds the canceled thread in
THREAD_DONE state, so calls elem->common.cb, with an (likely)
dangling opaque pointer. This is a use-after-free.
Fix it by calling event_notifier_ready before leaving
thread_pool_cancel.
Test case update: This change will let cancel complete earlier than
test-thread-pool.c expects, so update the code to check this case: if
it's already done, done_cb sets .aiocb to NULL, skip calling
bdrv_aio_cancel on them.
Reported-by: Ulrich Obergfell <[email protected]>
Suggested-by: Paolo Bonzini <[email protected]>
Signed-off-by: Fam Zheng <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 271c0f68b4eae72691721243a1c37f46a3232d61 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/271c0f68b4eae72691721243a1c37f46a3232d61 | 2014-05-28 14:28:46+02:00 |
microblaze: boot: Don't hack the elf entry point
There was some modulo logic to ensure that Microblaze always booted into
physical RAM regardless of the elf entry. Removed it, as QEMU should fail
gracefully when given a bad elf, rather than attempt to run it.
Signed-off-by: Peter Crosthwaite <[email protected]>
Signed-off-by: Edgar E. Iglesias <[email protected]>
| e5bfd64050e81774b6bf71ab5dd064f7bcef0c4c | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/e5bfd64050e81774b6bf71ab5dd064f7bcef0c4c | 2014-05-13 09:12:40+10:00 |
char: Use return values instead of error_is_set(errp)
Using error_is_set(errp) to check whether a function call failed is
fragile: it breaks when errp is null. Check perfectly suitable return
values instead when possible. As far as I can tell, errp can't be
null there, but this is more robust and more obviously correct
Signed-off-by: Markus Armbruster <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
| 5f758366c0710d23e43f4d0f83816b98616a13d0 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/5f758366c0710d23e43f4d0f83816b98616a13d0 | 2014-05-21 11:57:57+02:00 |
Count used RAMBlock pages for migration_dirty_pages
This is a fix for a bug* triggered by a migration after hot unplugging
a few virtio-net NICs, that caused migration never to converge, because
'migration_dirty_pages' is incorrectly initialised.
'migration_dirty_pages' is used as a tally of the number of outstanding
dirty pages, to give the migration code an idea of how much more data
will need to be transferred, and thus whether it can end the iterative
phase.
It was initialised to the total size of the RAMBlock address space,
however hotunplug can leave this space sparse, and hence
migration_dirty_pages ended up too large.
Signed-off-by: Dr. David Alan Gilbert <[email protected]>
(* https://bugzilla.redhat.com/show_bug.cgi?id=1074913 )
Signed-off-by: Juan Quintela <[email protected]>
| e30d1d8c7195848abb28a8c734a82b845b8b456a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/e30d1d8c7195848abb28a8c734a82b845b8b456a | 2014-05-05 22:15:03+02:00 |
virtio: validate config_len on load
Malformed input can have config_len in migration stream
exceed the array size allocated on destination, the
result will be heap overflow.
To fix, that config_len matches on both sides.
CVE-2014-0182
Reported-by: "Dr. David Alan Gilbert" <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
--
v2: use %ix and %zx to print config_len values
Signed-off-by: Juan Quintela <[email protected]>
| a890a2f9137ac3cf5b607649e66a6f3a5512d8dc | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a890a2f9137ac3cf5b607649e66a6f3a5512d8dc | 2014-05-05 22:15:03+02:00 |
tsc210x: fix buffer overrun on invalid state load
CVE-2013-4539
s->precision, nextprecision, function and nextfunction
come from wire and are used
as idx into resolution[] in TSC_CUT_RESOLUTION.
Validate after load to avoid buffer overrun.
Cc: Andreas Färber <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
| 5193be3be35f29a35bc465036cd64ad60d43385f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/5193be3be35f29a35bc465036cd64ad60d43385f | 2014-05-05 22:15:02+02:00 |
xbzrle.c: Avoid undefined behaviour with signed arithmetic
Use unsigned types for doing bitwise arithmetic in the xzbrle
calculations, to avoid undefined behaviour:
xbzrle.c:99:49: runtime error: left shift of 72340172838076673
by 7 places cannot be represented in type 'long'
Signed-off-by: Peter Maydell <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
| 968fc24d843c9e9b24231ca1960b47ef2fc724ea | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/968fc24d843c9e9b24231ca1960b47ef2fc724ea | 2014-04-18 10:33:36+04:00 |
trace: add workaround for SystemTap PR13296
SystemTap sdt.h sometimes results in compiled probes without sufficient
information to extract arguments. This can be solved in a slightly
hacky way by encouraging the compiler to place arguments into registers.
This patch fixes the apic_reset_irq_delivered() trace event on Fedora 20
with gcc-4.8.2-7.fc20 and systemtap-sdt-devel-2.4-2.fc20 on x86_64.
Signed-off-by: Frank Ch. Eigler <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 9bcec938aab22a1b7ced916a6895e5029d4ed04f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/9bcec938aab22a1b7ced916a6895e5029d4ed04f | 2014-04-01 20:08:25+02:00 |
parallels: Sanity check for s->tracks (CVE-2014-0142)
This avoids a possible division by zero.
Convert s->tracks to unsigned as well because it feels better than
surviving just because the results of calculations with s->tracks are
converted to unsigned anyway.
Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 9302e863aa8baa5d932fc078967050c055fa1a7f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/9302e863aa8baa5d932fc078967050c055fa1a7f | 2014-04-01 15:22:35+02:00 |
qcow2: Validate active L1 table offset and size (CVE-2014-0144)
This avoids an unbounded allocation.
Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 2d51c32c4b511db8bb9e58208f1e2c25e4c06c85 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2d51c32c4b511db8bb9e58208f1e2c25e4c06c85 | 2014-04-01 14:19:09+02:00 |
qcow2: Validate snapshot table offset/size (CVE-2014-0144)
This avoid unbounded memory allocation and fixes a potential buffer
overflow on 32 bit hosts.
Signed-off-by: Kevin Wolf <[email protected]>
Reviewed-by: Max Reitz <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| ce48f2f441ca98885267af6fd636a7cb804ee646 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/ce48f2f441ca98885267af6fd636a7cb804ee646 | 2014-04-01 14:19:09+02:00 |
qom: Make QOM link property unref optional
Some object_property_add_link() callers expect property deletion to
unref the link property object. Other callers expect to manage the
refcount themselves. The former are currently broken and therefore leak
the link property object.
This patch adds a flags argument to object_property_add_link() so the
caller can specify which refcount behavior they require. The new
OBJ_PROP_LINK_UNREF_ON_RELEASE flag causes the link pointer to be
unreferenced when the property is deleted.
This fixes refcount leaks in qdev.c, xilinx_axidma.c, xilinx_axienet.c,
s390-virtio-bus.c, virtio-pci.c, virtio-rng.c, and ui/console.c.
Rationale for refcount behavior:
* hw/core/qdev.c
- bus children are explicitly unreferenced, don't interfere
- parent_bus is essentially a read-only property that doesn't hold a
refcount, don't unref
- hotplug_handler is leaked, do unref
* hw/dma/xilinx_axidma.c
- rx stream "dma" links are set using set_link, therefore they
need unref
- tx streams are set using set_link, therefore they need unref
* hw/net/xilinx_axienet.c
- same reasoning as hw/dma/xilinx_axidma.c
* hw/pcmcia/pxa2xx.c
- pxa2xx bypasses set_link and therefore does not use refcounts
* hw/s390x/s390-virtio-bus.c
* hw/virtio/virtio-pci.c
* hw/virtio/virtio-rng.c
* ui/console.c
- set_link is used and there is no explicit unref, do unref
Cc: Peter Crosthwaite <[email protected]>
Cc: Alexander Graf <[email protected]>
Cc: Anthony Liguori <[email protected]>
Cc: "Michael S. Tsirkin" <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Signed-off-by: Andreas Färber <[email protected]>
| 9561fda8d90e176bef598ba87c42a1bd6ad03ef7 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/9561fda8d90e176bef598ba87c42a1bd6ad03ef7 | 2014-03-19 22:05:20+01:00 |
pc: Refuse CPU hotplug if the resulting APIC ID is too large
The ACPI CPU hotplug code requires APIC IDs to be smaller than
ACPI_CPU_HOTPLUG_ID_LIMIT, so enforce the limit before trying to hotplug
a new vCPU, returning an error instead of crashing.
Signed-off-by: Eduardo Habkost <[email protected]>
Reviewed-by: Laszlo Ersek <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| 5ff020b7b02dce36a66c106df986ff68f8452542 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/5ff020b7b02dce36a66c106df986ff68f8452542 | 2014-03-18 16:08:43+02:00 |
hw/intc/slavio_intctl: Avoid shifting left into sign bit
Add 'U' suffix to avoid undefined behaviour.
Signed-off-by: Peter Maydell <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
| 7d45e784015971e70239e33256fd606638107a3e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/7d45e784015971e70239e33256fd606638107a3e | 2014-03-27 19:22:49+04:00 |
s390x/sclpconsole: Fix and simplify interrupt injection
valgrind complains about a memory leak in irq setup of sclpconsole:
==42117== 8 bytes in 1 blocks are definitely lost in loss record 89 of 833
==42117== at 0x4031AFE: malloc (vg_replace_malloc.c:292)
==42117== by 0x8022F855: malloc_and_trace (vl.c:2715)
==42117== by 0x4145569: g_malloc (in /usr/lib64/libglib-2.0.so.0.3400.2)
==42117== by 0x800F696D: qemu_extend_irqs (irq.c:51)
==42117== by 0x800F6AF7: qemu_allocate_irqs (irq.c:68)
==42117== by 0x800F5685: console_init (sclpconsole.c:235)
==42117== by 0x80297C79: event_realize (event-facility.c:386)
==42117== by 0x80105071: device_set_realized (qdev.c:693)
==42117== by 0x801CDC4B: property_set_bool (object.c:1337)
==42117== by 0x801CBD7F: object_property_set (object.c:819)
[...]
Turns out that we actually dont need the indirection, so trigger the
sclp interrupt directly.
Signed-off-by: Christian Borntraeger <[email protected]>
Acked-by: Heinz Graalfs <[email protected]>
| b074e6220542107afb9fad480a184775be591d2a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b074e6220542107afb9fad480a184775be591d2a | 2014-03-17 22:01:19+01:00 |
qemu-nbd: Fix coverity issues
There are two issues in qemu-nbd: a missing return value check after
calling accept(), and file descriptor leaks in nbd_client_thread.
Reviewed-by: Markus Armbruster <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 0c544d73bbb4c8612b7754a8e1c8b0c8af1617ff | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/0c544d73bbb4c8612b7754a8e1c8b0c8af1617ff | 2014-03-17 13:21:11+01:00 |
target-m68k: Remove custom qemu_assert() function
Remove the custom qemu_assert() function defined by target-m68k/translate.c
in favour of either using glib g_assert_not_reached() (for the genuinely
can't-happen cases) or cpu_abort() (for the "this isn't implemented",
in line with other unimplemented cases in the target).
This has the benefit of silencing some clang warnings about
variables used while uninitialized (which are emitted because
clang can't figure out that qemu_assert(0, something) never
returns.
Signed-off-by: Peter Maydell <[email protected]>
Signed-off-by: Andreas Färber <[email protected]>
| 7372c2b926200db295412efbb53f93773b7f1754 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/7372c2b926200db295412efbb53f93773b7f1754 | 2014-03-13 19:20:46+01:00 |
hw/timer/arm_timer: Avoid array overrun for bad addresses
The integrator's timer read/write functions log an error for
bad addresses in guest accesses, but were falling through and
using an out of bounds array index rather than returning early.
Fix this.
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Reviewed-by: Andreas Färber <[email protected]>
Message-id: [email protected]
Cc: [email protected]
| cba933b2257ef0ad241756a0ff86bc0acda685ca | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/cba933b2257ef0ad241756a0ff86bc0acda685ca | 2014-02-26 17:19:58+00:00 |
target-ppc: Load Quadword
This patch adds the Book I (user space) Load Quadword (lq) instruction.
This instruction was introduced into Book I in Power ISA V2.07. Previous
versions of the architecture supported this as a privileged instruction.
Previous versions of the architecture also did not support Little Endian
mode.
Note that this patch also adds the PPC_64BX flag to the Power8 model,
which enables the lq instruction.
Signed-off-by: Tom Musta <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
| e0498daab50d42f3948fc5607683c971fe9416fd | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/e0498daab50d42f3948fc5607683c971fe9416fd | 2014-03-05 03:06:50+01:00 |
Fix two XBZRLE corruption issues
Push zero'd pages into the XBZRLE cache
A page that was cached by XBZRLE, zero'd and then XBZRLE'd again
was being compared against a stale cache value
Don't use 'qemu_put_buffer_async' to put pages from the XBZRLE cache
Since the cache might change before the data hits the wire
Signed-off-by: Dr. David Alan Gilbert <[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
| 6d3cb1f970ee85361618f7ff02869180394e012d | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/6d3cb1f970ee85361618f7ff02869180394e012d | 2014-02-25 14:30:28+01:00 |
virtio_rng: replace custom backend API with UserCreatable.complete() callback
in addition fix default backend leak by releasing it if its
initialization failed.
Signed-off-by: Igor Mammedov <[email protected]>
Reviewed-by: Stefan Hajnoczi <[email protected]>
Signed-off-by: Luiz Capitulino <[email protected]>
| 57d3e1b3f52d07d215ed96df946ee01f8d9f9526 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/57d3e1b3f52d07d215ed96df946ee01f8d9f9526 | 2014-01-28 12:47:11-05:00 |
qtest: Fix the bug about disable vnc causes "make check" fail
When we disable vnc from "./configure", QEMU can't use the vnc option.
So qtest can't use the "vnc -none ", otherwise "make check" fails.
If QEMU uses "-display none", "-vnc none" is excrescent, So we just need to drop it.
Signed-off-by: Kewei Yu <[email protected]>
Reviewed-by: Paolo Bonzini <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| b7fcff01790d25f48d81ef6c8c3399577096a555 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b7fcff01790d25f48d81ef6c8c3399577096a555 | 2014-01-22 12:07:16+01:00 |
block/vmdk: add basic .bdrv_check support
this adds a basic vmdk corruption check. it should detect severe
table corruptions and file truncation.
Signed-off-by: Peter Lieven <[email protected]>
Reviewed-by: Fam Zheng <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| f43aa8e18ad83508c2786403e7230a584d357c8e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/f43aa8e18ad83508c2786403e7230a584d357c8e | 2014-01-31 22:05:03+01:00 |
qom: fix leak for objects created with -object
The object must be unref-ed when its variable goes out of scope.
Signed-off-by: Paolo Bonzini <[email protected]>
Reviewed-by: Igor Mammedov <[email protected]>
Tested-by: Igor Mammedov <[email protected]>
Signed-off-by: Luiz Capitulino <[email protected]>
| 28ec2598ff7d74bd9556a1786f45fc5df2aacfe1 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/28ec2598ff7d74bd9556a1786f45fc5df2aacfe1 | 2014-01-06 13:45:47-05:00 |
virtio-scsi: Prevent assertion on missed events
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 <[email protected]>
Cc: [email protected]
Signed-off-by: Paolo Bonzini <[email protected]>
| 49fb65c7f985baa56d2964e0a85c1f098e3e2a9d | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/49fb65c7f985baa56d2964e0a85c1f098e3e2a9d | 2014-01-15 10:36:24+01:00 |
sheepdog: fix dynamic grow for running qcow2 format
When running qcow2 over sheepdog, we might meet following problem
qemu-system-x86_64: shrinking is not supported
And cause IO errors to Guest. This is because we abuse bs->total_sectors, which
is manipulated by generic block layer and race with sheepdog code.
We should directly check if offset > vdi_size to dynamically enlarge the volume
instead of 'offset > bs->total_sectors', which will cause problem when following
case happens:
vdi_size > offset > bs->total_sectors
# then trigger sd_truncate() to shrink the volume wrongly.
Cc: [email protected]
Cc: Kevin Wolf <[email protected]>
Cc: Stefan Hajnoczi <[email protected]>
Reported-by: Hadrien KOHL <[email protected]>
Signed-off-by: Liu Yuan <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| e50d7607f1800c9f9c576229c6119e4c82f456d6 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/e50d7607f1800c9f9c576229c6119e4c82f456d6 | 2013-12-20 09:11:57+01:00 |
vfio-pci: Add debug config options to disable MSI/X KVM support
It's sometimes useful to be able to verify interrupts are passing
through correctly.
Signed-off-by: Alex Williamson <[email protected]>
| b3ebc10c373ed5922d4bdb5076fd0e9fd7ff8056 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/b3ebc10c373ed5922d4bdb5076fd0e9fd7ff8056 | 2013-12-06 11:16:29-07:00 |
target-i386: Fix build by providing stub kvm_arch_get_supported_cpuid()
Fix build failures with clang when KVM is not enabled by
providing a stub version of kvm_arch_get_supported_cpuid().
We retain the compile time check that this function isn't
called when CONFIG_KVM is not set by guarding the stub with
ifndef __OPTIMIZE__ (we assume that an optimizing build will
do sufficient constant folding and dead code elimination to
remove the calls before linking).
Signed-off-by: Peter Maydell <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
| 2140cfa51d59177815f5b82e94ac48fb24909aba | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2140cfa51d59177815f5b82e94ac48fb24909aba | 2013-11-21 17:39:11+01:00 |
qtest: Use -display none by default
This avoids each test needing to add it to suppress windows popping up.
[Commit 7ceeedd016facf8d58e14a0d1417fa7225d71072 ("blockdev-test: add
test case for drive_add duplicate IDs") and commit
43cd209803d6cffb1e1a028c9ff2fd0ff4fce954 ("qdev-monitor-test: add
device_add leak test cases") added qtest tests without specifying
-display none.
As a result, "make check" now tries to use graphics (GTK or SDL). Since
graphics are not used by the test and inappropriate for headless "make
check" runs, add the missing -display none.
This fixes "make check" in the QEMU buildbot.
-- Stefan]
Signed-off-by: Andreas Färber <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 2ad645d2854746b55ddfd1d8e951f689cca5d78f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2ad645d2854746b55ddfd1d8e951f689cca5d78f | 2013-11-19 10:28:14+01:00 |
Revert "hw/pci: partially handle pci master abort"
This reverts commit a53ae8e934cd54686875b5bcfc2f434244ee55d6.
The patch being reverted introduced a low-priority memory region
covering all 64 bit pci address space. This exposed the following bugs
elsewhere in the code:
1. Some memory regions have INT64_MAX size, where the
intent was all 64 bit address space.
This results in a sub-page region, should be UINT64_MAX.
2. page table rendering in exec.c ignores physical address bits
above TARGET_PHYS_ADDR_SPACE_BITS.
Access outside this range (e.g. from device DMA, or gdb stub)
ends up with a wrong region. Registering a region outside this
range leads to page table corruption.
3. Some regions overlap PCI hole and have same priority.
This only works as long as no device uses the overlapping address.
It doesn't look like we can resolve all issues in time for 1.7.
Let's fix the bugs first and apply afterwards for 1.8.
Signed-off-by: Marcel Apfelbaum <[email protected]>
Reviewed-by: Michael S. Tsirkin <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| 0fbf50b6ec126600dca115adb1563c657cc27695 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/0fbf50b6ec126600dca115adb1563c657cc27695 | 2013-11-10 14:30:00+02:00 |
loader: drop return value for rom_add_blob_fixed
rom_add_blob never fails, and neither does rom_add_blob_fixed,
so there's no need to return value from it.
In fact, rom_add_blob_fixed was erroneously returning -1 unconditionally
which made the only system that checked the return value -M bamboo fail
to start.
Drop the return value and drop checks from ppc440_bamboo to
fix this failure.
Reported-by: Alexander Graf <[email protected]>
Signed-off-by: Michael S. Tsirkin <[email protected]>
| fe1479aa251971abd3842dee4a783d4ebace8fb8 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/fe1479aa251971abd3842dee4a783d4ebace8fb8 | 2013-11-10 12:08:38+02:00 |
ide-test: Check what happens with bus mastering disabled
The main goal is that qemu doesn't crash.
Signed-off-by: Kevin Wolf <[email protected]>
| d7b7e580096255c766f7b1e7502a9151b95091e8 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/d7b7e580096255c766f7b1e7502a9151b95091e8 | 2013-10-28 17:34:42+01:00 |
qemu-iotests: Discard preallocated zero clusters
Add a new test case for discarding preallocated zero clusters; doing
this should not result in any leaks.
Signed-off-by: Max Reitz <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 975a93c082452db9aa1397a797ca8f13ba367393 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/975a93c082452db9aa1397a797ca8f13ba367393 | 2013-10-11 16:49:59+02:00 |
vfio: Fix debug output for int128 values
Memory regions can easily be 2^64 byte long and therefore overflow
for just a bit but that is enough for int128_get64() to assert.
This takes care of debug printing of huge section sizes.
Signed-off-by: Alexey Kardashevskiy <[email protected]>
Signed-off-by: Alex Williamson <[email protected]>
| 1d5bf692e55ae22b59083741d521e27db704846d | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/1d5bf692e55ae22b59083741d521e27db704846d | 2013-10-03 09:10:09-06:00 |
rdma: clean up of qemu_rdma_cleanup()
- It can't be determined by RDMAContext::cm_id != NULL if the connection
is established or not.
- RDMAContext::cm_id is leaked and not destroyed because it is set to NULL
too early.
- RDMAContext::qp is created by rdma_create_qp() so that it should be destroyed
by rdma_destroy_qp(). not ibv_destroy_qp()
Cc: Michael R. Hines <[email protected]>
Signed-off-by: Isaku Yamahata <[email protected]>
Signed-off-by: Juan Quintela <[email protected]>
| 5a91337cdf343b94474f8bbecab85a8c00f6d2a1 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/5a91337cdf343b94474f8bbecab85a8c00f6d2a1 | 2013-09-24 13:22:50+02:00 |
qemu-iotests: Snapshotting zero clusters
This test creates an image with unallocated zero clusters, then creates
a snapshot. Afterwards, there should be neither any errors nor leaks.
Signed-off-by: Max Reitz <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 449df7063815489a0b091bcb3afa9ae80ae3acbf | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/449df7063815489a0b091bcb3afa9ae80ae3acbf | 2013-08-30 15:28:52+02:00 |
qcow2: Add corrupt bit
This adds an incompatible bit indicating corruption to qcow2. Any image
with this bit set may not be written to unless for repairing (and
subsequently clearing the bit if the repair has been successful).
Signed-off-by: Max Reitz <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
| 69c98726537627e708abb8fcb33e3a2b10e40bf1 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/69c98726537627e708abb8fcb33e3a2b10e40bf1 | 2013-08-30 15:48:43+02:00 |
block: better error message for read only format name
When user tries to use read-only whitelist format in the command line
option, failure message was "'foo' invalid format". It might be invalid
only for writable, but valid for read-only, so it is confusing. Give the
user easier to understand information.
Signed-off-by: Fam Zheng <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 7780d47211bde838c7f7e9330608e5397219066e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/7780d47211bde838c7f7e9330608e5397219066e | 2013-08-22 14:30:03+02:00 |
tests: adjust test-thread-pool to new aio_poll() semantics
aio_poll(ctx, true) will soon block when fd handlers have been set.
Previously aio_poll() would return early if all .io_flush() returned
false. This means we need to check the equivalent of the .io_flush()
condition *before* calling aio_poll(ctx, true) to avoid deadlock.
Reviewed-by: Paolo Bonzini <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 35ecde26018207fe723bec6efbd340db6e9c2d53 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/35ecde26018207fe723bec6efbd340db6e9c2d53 | 2013-08-19 15:45:35+02:00 |
xhci: fix segfault
Guest trying to reset a endpoint of a disconnected device resulted in
xhci trying to dereference uport while being NULL, thereby crashing
qemu. Fix that by adding a check. Drop unused dev variable while
touching that code bit.
Cc: [email protected]
Signed-off-by: Gerd Hoffmann <[email protected]>
| 75cc1c1fcba1987bdf3979c4289ab756c2b15742 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/75cc1c1fcba1987bdf3979c4289ab756c2b15742 | 2013-08-01 13:03:42+02:00 |
hw/openrisc: Avoid undefined shift in openrisc_pic_cpu_handler()
In C99 signed shift (1 << 31) is undefined behavior, since the result
exceeds INT_MAX. Use 1U instead and move the shift after the check.
Signed-off-by: Xi Wang <[email protected]>
Acked-by: Jia Liu <[email protected]>
| 7717f248eebdcfe6de400404d0cf65dcb3633308 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/7717f248eebdcfe6de400404d0cf65dcb3633308 | 2013-08-21 09:31:42+08:00 |
target-mips: fix branch in likely delay slot tcg assert
When a branch delay slot contains another branch instruction, the code
generated raises an exception, however since is_branch==1,
handle_delay_slot() doesn't get called immediately. This means
ctx->bstate isn't set to BS_BRANCH, and the decoder continues decoding
until a non-branch instruction is found.
If the first branch was a branch likely instruction then each
instruction after it generates code for the unlikely case, to go to the
next tb starting after the delay slot. This results in multiple goto_tb
tcg ops being generated with the same exit number. When debug is enabled
this hits:
tcg-op.h:2589: tcg_gen_goto_tb: Assertion `(tcg_ctx.goto_tb_issue_mask & (1 << idx)) == 0' failed.
This is fixed by removing is_branch entirely, and calling
handle_delay_slot() if (ctx.hflags & MIPS_HFLAG_BMASK) was set prior to
the current instruction being decoded. This still prevents
handle_delay_slot() being called immediately after a branch but allows
it to still be called after a branch within a delay slot.
Signed-off-by: James Hogan <[email protected]>
Signed-off-by: Yongbok Kim <[email protected]>
Signed-off-by: Aurelien Jarno <[email protected]>
| 240ce26a0533a6e5ee472789fbfbd9f7f939197e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/240ce26a0533a6e5ee472789fbfbd9f7f939197e | 2013-07-28 18:33:44+02:00 |
Fix iSCSI crash on SG_IO with an iovector
Don't assume that SG_IO is always invoked with a simple buffer,
check the iovec_count and if it is >= 1 then we need to pass an array
of iovectors to libiscsi instead of just a plain buffer.
Signed-off-by: Ronnie Sahlberg <[email protected]>
Cc: [email protected]
Signed-off-by: Paolo Bonzini <[email protected]>
| 0a53f010745635c39a83756a948df60a84e88fe5 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/0a53f010745635c39a83756a948df60a84e88fe5 | 2013-07-17 17:00:26+02:00 |
qemu-char: don't leak opts on error
Signed-off-by: Gerd Hoffmann <[email protected]>
Reviewed-by: Laszlo Ersek <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
| e668287d4413395be1a0f9ef292bb6d0c1006e29 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/e668287d4413395be1a0f9ef292bb6d0c1006e29 | 2013-06-28 22:10:33+04:00 |
block/nand: Formatting sweep
Make this code closer to passing checkpatch. Mostly missing braces, but
a few rogue tabs in there as well.
Cc: [email protected]
Signed-off-by: Peter Crosthwaite <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
| 1984745ea8ad309a06690a83e91d031d21d709ff | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/1984745ea8ad309a06690a83e91d031d21d709ff | 2013-06-21 22:52:50+04:00 |
configure: Add signed*signed check to [u]int128_t test
clang 3.3 with -fsanitize=undefined will fail to link code containing an
int128_t * int128_t multiply (http://llvm.org/bugs/show_bug.cgi?id=16404)
so add this to our configure test for whether [u]int128_t are usable.
Signed-off-by: Peter Maydell <[email protected]>
Reviewed-by: Richard Henderson <[email protected]>
Signed-off-by: Michael Tokarev <[email protected]>
| 464e3671f9d5c206fa9e2646c81f21ceef7cfb7d | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/464e3671f9d5c206fa9e2646c81f21ceef7cfb7d | 2013-06-21 22:54:24+04:00 |
xhci: fix address device
Zero-initialize the set-address dummy USBPacket,
also add buffer to avoid sanity checks triggering.
https://bugzilla.redhat.com/show_bug.cgi?id=929019
Signed-off-by: Gerd Hoffmann <[email protected]>
| a67188743bc30a3ad1358b8cd0a2a3cb64c10ff9 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a67188743bc30a3ad1358b8cd0a2a3cb64c10ff9 | 2013-04-16 12:04:09+02:00 |
acpi_table_add(): extract and reimplement internals
The new function acpi_table_install() installs any blob the caller passes
in. In the next patches this function will be promoted from helper role to
extern.
Reimplementing the logic should make it easier to understand. It also
removes a buffer overflow when
has_header &&
cumulative_file_size < ACPI_TABLE_HDR_SIZE - ACPI_TABLE_PFX_SIZE
(In that case the g_realloc() call in the read() loop used to shrink the
"acpi_tables" array, causing an out-of-bounds read access when copying the
header out of "acpi_tables".)
The new code isn't more daring alignment-wise than its predecessor:
"acpi_table_header" is packed, and the uint32_t fields are at offsets 6,
26, and 34.
Signed-off-by: Laszlo Ersek <[email protected]>
Reviewed-by: Anthony Liguori <[email protected]>
Message-id: [email protected]
Signed-off-by: Anthony Liguori <[email protected]>
| e980f2bf0a39cb524259bb70084e0f75b92c8f39 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/e980f2bf0a39cb524259bb70084e0f75b92c8f39 | 2013-04-04 19:23:08-05:00 |
ehci_free_packet: Discard finished packets when the queue is halted
With pipelining it is possible to encounter a finished packet when cleaning
the queue due to a halt. This happens when a non stall error happens while
talking to a real device. In this case the queue on the usb-host side will
continue processing packets, and we can have completed packets waiting in
the queue after an error condition packet causing a halt.
There are 2 reasons to discard the completed packets at this point, rather
then trying to writing them back to the guest:
1) The guest expect to be able to cancel and/or change packets after the
packet with the error without doing an unlink, so writing them back may
confuse the guest.
2) Since the queue does not advance when halted, the writing back of these
packets will fail anyways since p->qtdaddr != q->qtdaddr, so the
ehci_verify_qtd call in ehci_writeback_async_complete_packet will fail.
Note that 2) means that then only functional change this patch introduces
is the printing of a warning when this scenario happens.
Note that discarding these packets means that the guest driver and the device
will get out of sync! This is unfortunate, but should not be a problem since
with a non stall error (iow an io-error) the 2 are out of sync already anyways.
Still this patch adds a warning to signal this happening.
Note that sofar this has only been seen with a DVB-T receiver, which gives
of a MPEG-2 stream, which allows for recovering from lost packets, see:
https://bugzilla.redhat.com/show_bug.cgi?id=890320
Signed-off-by: Hans de Goede <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
| e449f26bed42b1d8c6efefcd8dc768f23f19458f | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/e449f26bed42b1d8c6efefcd8dc768f23f19458f | 2013-04-23 08:43:10+02:00 |
target-ppc: Fix add and subf carry generation in narrow mode
The set of computations used in b5a73f8d8a57e940f9bbeb399a9e47897522ee9a
are only valid if the current word size == target_long size. This failed
to take ppc64 in 32-bit (narrow) mode into account.
Add a NARROW_MODE macro to avoid conditional compilation.
Signed-off-by: Richard Henderson <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
| 79482e5ab38a05ca8869040b0d8b8f451f16ff62 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/79482e5ab38a05ca8869040b0d8b8f451f16ff62 | 2013-03-22 15:28:54+01:00 |
rtc-test: Fix test failures with recent glib
As of glib 2.35.4, glib changed its logic for ordering test cases:
https://bugzilla.gnome.org/show_bug.cgi?id=694487
This was causing failures in rtc-test. Group the reordered test
cases into their own suite, which maintains the original ordering.
CC: [email protected]
Signed-off-by: Cole Robinson <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| eeb29fb9aa733f97d85857c210d6580a92a1b532 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/eeb29fb9aa733f97d85857c210d6580a92a1b532 | 2013-03-08 10:16:54+01:00 |
net: fix unbounded NetQueue
In the current implementation of qemu, running without a network
backend will cause the queue to grow unbounded when the guest is
transmitting traffic.
This patch fixes the problem by implementing bounded size NetQueue,
used with an arbitrary limit of 10000 packets, and dropping packets
when the queue is full _and_ the sender does not pass a callback.
The second condition makes sure that we never drop packets that
contains a callback (which would be tricky, because the producer
expects the callback to be run when all previous packets have been
consumed; so we cannot run it when the packet is dropped).
If documentation is correct, producers that submit a callback should
stop sending when their packet is queued, so there is no real risk
that the queue exceeds the max size by large values.
Signed-off-by: Luigi Rizzo <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 7d91ddd25e3a4e5008a2ac16127d51a34fd56bf1 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/7d91ddd25e3a4e5008a2ac16127d51a34fd56bf1 | 2013-02-27 16:10:39+01:00 |
vpc: Fix bdrv_open() error handling
Return -errno instead of -1 on errors. While touching the
code, fix a memory leak.
Signed-off-by: Kevin Wolf <[email protected]>
Signed-off-by: Stefan Hajnoczi <[email protected]>
| 59294e465953ffb07d42dc61c827bb98cc0ca423 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/59294e465953ffb07d42dc61c827bb98cc0ca423 | 2013-02-01 14:58:28+01:00 |
iscsi: do not leak acb->buf when commands are aborted
acb->buf is freed in the WRITE(16) callback, but this may not
get called at all when commands are aborted. Add another
free in the ABORT TASK callback, which requires setting acb->buf
to NULL everywhere.
Signed-off-by: Paolo Bonzini <[email protected]>
| 4790b03d308f6c7dea7dc6941ddab9867c9530b8 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/4790b03d308f6c7dea7dc6941ddab9867c9530b8 | 2013-01-24 15:37:55+01:00 |
openpic: fix debug prints
Fix various format errors when debug prints are enabled. Also
cause error checking to happen even when debug prints are not
enabled, and consistently use 0x for hex output.
Signed-off-by: Scott Wood <[email protected]>
[agraf: adjust for more recent code base, prettify DPRINTF macro]
Signed-off-by: Alexander Graf <[email protected]>
| 4c4f0e4801ac79632d03867c88aafc90b4ce503c | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/4c4f0e4801ac79632d03867c88aafc90b4ce503c | 2013-01-07 17:37:09+01:00 |
qom: make object_delete usable for statically-allocated objects
Store in the object the freeing function that will be used at deletion
time. This makes it possible to use object_delete on statically-allocated
(embedded) objects. Dually, it makes it possible to use object_unparent
and object_unref without leaking memory, when the lifetime of object
might extend until after the call to object_delete.
Reviewed-by: Andreas Färber <[email protected]>
Signed-off-by: Paolo Bonzini <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
| fde9bf4470d4a3b6ee1da0dee2370ab028b6314a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/fde9bf4470d4a3b6ee1da0dee2370ab028b6314a | 2012-11-26 13:41:00-06:00 |
fbdev: fix pixman compile on old pixman
My QEMU compile failed with the following error:
qemu-pixman.c: In function ‘qemu_pixman_get_type’:
qemu-pixman.c:24: error: ‘PIXMAN_TYPE_BGRA’ undeclared (first use in this function)
qemu-pixman.c:24: error: (Each undeclared identifier is reported only once
qemu-pixman.c:24: error: for each function it appears in.)
Guard the PIXMAN_TYPE_BGRA branch like in the case right above the failing
case, so that compilation is fixed. Functionality on such old pixman is a
different question ;-).
Signed-off-by: Alexander Graf <[email protected]>
| 6e72719e721a40fe1224701ca10edc1caf0cd708 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/6e72719e721a40fe1224701ca10edc1caf0cd708 | 2012-11-26 19:53:26+01:00 |
usb: Add packet combining functions
Currently we only do pipelining for output endpoints, since to properly
support short-not-ok semantics we can only have one outstanding input
packet. Since the ehci and uhci controllers have a limited per td packet
size guests will split large input transfers to into multiple packets,
and since we don't pipeline these, this comes with a serious performance
penalty.
This patch adds helper functions to (re-)combine packets which belong to 1
transfer at the guest device-driver level into 1 large transger. This can be
used by (redirection) usb-devices to enable pipelining for input endpoints.
This patch will combine packets together until a transfer terminating packet
is encountered. A terminating packet is a packet which meets one or more of
the following conditions:
1) The packet size is *not* a multiple of the endpoint max packet size
2) The packet does *not* have its short-not-ok flag set
3) The packet has its interrupt-on-complete flag set
The short-not-ok flag of the combined packet is that of the terminating packet.
Multiple combined packets may be submitted to the device, if the combined
packets do not have their short-not-ok flag set, enabling true pipelining.
If a combined packet does have its short-not-ok flag set the queue will
wait with submitting further packets to the device until that packet has
completed.
Once enabled in the usb-redir and ehci code, this improves the speed (MB/s)
of a Linux guest reading from a USB mass storage device by a factor of
1.2 - 1.5.
And the main reason why I started working on this, when reading from a pl2303
USB<->serial converter, it combines the previous 4 packets submitted per
device-driver level read into 1 big read, reducing the number of packets / sec
by a factor 4, and it allows to have multiple reads outstanding. This allows
for much better latency tolerance without the pl2303's internal buffer
overflowing (which was happening at 115200 bps, without serial flow control).
Signed-off-by: Hans de Goede <[email protected]>
Signed-off-by: Gerd Hoffmann <[email protected]>
| a552a966f16b7b39c5df16fc17e12d02c4fa5954 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a552a966f16b7b39c5df16fc17e12d02c4fa5954 | 2012-11-01 15:17:58+01:00 |
migration: handle EAGAIN while reading QEMUFile
This will never happen right now (the assertion would fail). The
next patch will set the socket or pipe in non-blocking mode, thus
enabling this part of the code.
Coroutines can just stop whenever they want with qemu_coroutine_yield.
As soon as select tells the main loop that the migration stream is
readable, the coroutine is re-entered directly in qemu_get_buffer,
where it will read more data and pass it to the loading routines.
Signed-off-by: Paolo Bonzini <[email protected]>
| 595ab64169be9063d64c3b1aa1c249fbe2662221 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/595ab64169be9063d64c3b1aa1c249fbe2662221 | 2012-11-02 18:35:07+01:00 |
tcg-sparc: Dump illegal opode contents
Signed-off-by: Richard Henderson <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
| 345ce423dd58b3ddc3cfbcbb1ca2eee25546e8be | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/345ce423dd58b3ddc3cfbcbb1ca2eee25546e8be | 2012-10-13 10:39:53+00:00 |
ppc: Make kvm_arch_put_registers() put *all* the registers
At least when invoked with high enough 'level' arguments,
kvm_arch_put_registers() is supposed to copy essentially all the cpu state
as encoded in qemu's internal structures into the kvm state. Currently
the ppc version does not do this - it never calls KVM_SET_SREGS, for
example, and therefore never sets the SDR1 and various other important
though rarely changed registers.
Instead, the code paths which need to set these registers need to
explicitly make (conditional) kvm calls which transfer the changes to kvm.
This breaks the usual model of handling state updates in qemu, where code
just changes the internal model and has it flushed out to kvm automatically
at some later point.
This patch fixes this for Book S ppc CPUs by adding a suitable call to
KVM_SET_SREGS and als to KVM_SET_ONE_REG to set the HIOR (the only register
that is set with that call so far). This lets us remove the hacks to
explicitly set these registers from the kvmppc_set_papr() function.
The problem still exists for Book E CPUs (which use a different version of
the kvm_sregs structure). But fixing that has some complications of its
own so can be left to another day.
Lkewise, there is still some ugly code for setting the PVR through special
calls to SET_SREGS which is left in for now. The PVR needs to be set
especially early because it can affect what other features are available
on the CPU, so I need to do more thinking to see if it can be integrated
into the normal paths or not.
Signed-off-by: David Gibson <[email protected]>
Signed-off-by: Alexander Graf <[email protected]>
| f1af19d767073a0926ce12c19b1f06c4933bca35 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/f1af19d767073a0926ce12c19b1f06c4933bca35 | 2012-10-04 15:54:17+02:00 |
cpu_physical_memory_write_rom() needs to do TB invalidates
cpu_physical_memory_write_rom(), despite the name, can also be used to
write images into RAM - and will often be used that way if the machine
uses load_image_targphys() into RAM addresses.
However, cpu_physical_memory_write_rom(), unlike cpu_physical_memory_rw()
doesn't invalidate any cached TBs which might be affected by the region
written.
This was breaking reset (under full emu) on the pseries machine - we loaded
our firmware image into RAM, and while executing it rewrite the code at
the entry point (correctly causing a TB invalidate/refresh). When we
reset the firmware image was reloaded, but the TB from the rewrite was
still active and caused us to get an illegal instruction trap.
This patch fixes the bug by duplicating the tb invalidate code from
cpu_physical_memory_rw() in cpu_physical_memory_write_rom().
Signed-off-by: David Gibson <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
| 0b57e287138728f72d88b06e69b970c5d745c44a | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/0b57e287138728f72d88b06e69b970c5d745c44a | 2012-09-17 10:18:48-05:00 |
ehci: Schedule async-bh when IAAD bit gets set
After the "ehci: Print a warning when a queue unexpectedly contains packets
on cancel" commit. Under certain reproducable conditions I was getting the
following message: "EHCI: Warning queue not empty on queue reset".
After aprox. 8 hours of debugging I've finally found the cause. The Linux EHCI
driver has an IAAD watchdog, to work around certain EHCI hardware sometimes
not acknowledging the doorbell at all. This watchdog has a timeout of 10 ms,
which is less then the time between 2 runs through the async schedule when
async_stepdown is at its highest value.
Thus the watchdog can trigger, after which Linux clears the IAAD bit and
re-uses the QH. IOW we were not properly detecting the unlink of the qh, due
to us missing (ignoring for more then 10 ms) the IAAD command, which triggered
the warning.
Signed-off-by: Hans de Goede <[email protected]>
| a1c3e4b839f8e7ec7f1792b8a11c63ca845aa021 | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/a1c3e4b839f8e7ec7f1792b8a11c63ca845aa021 | 2012-08-31 11:58:03+02:00 |
Adding qemu-seccomp.[ch] (v8)
Signed-off-by: Eduardo Otubo <[email protected]>
Signed-off-by: Anthony Liguori <[email protected]>
---
v1:
- I added a syscall struct using priority levels as described in the
libseccomp man page. The priority numbers are based to the frequency
they appear in a sample strace from a regular qemu guest run under
libvirt.
Libseccomp generates linear BPF code to filter system calls, those rules
are read one after another. The priority system places the most common
rules first in order to reduce the overhead when processing them.
v1 -> v2:
- Fixed some style issues
- Removed code from vl.c and created qemu-seccomp.[ch]
- Now using ARRAY_SIZE macro
- Added more syscalls without priority/frequency set yet
v2 -> v3:
- Adding copyright and license information
- Replacing seccomp_whitelist_count just by ARRAY_SIZE
- Adding header protection to qemu-seccomp.h
- Moving QemuSeccompSyscall definition to qemu-seccomp.c
- Negative return from seccomp_start is fatal now.
- Adding open() and execve() to the whitelis
v3 -> v4:
- Tests revealed a bigger set of syscalls.
- seccomp_start() now has an argument to set the mode according to the
configure option trap or kill.
v4 -> v5:
- Tests on x86_64 required a new specific set of system calls.
- libseccomp release 1.0.0: part of the API have changed in this last
release, had to adapt to the new function signatures.
| 2f668be77501c0232a84aafb6a066c9915987f0e | qemu | devign | 1 | https://github.com/qemu/qemu | https://github.com/qemu/qemu/commit/2f668be77501c0232a84aafb6a066c9915987f0e | 2012-08-16 13:41:16-05:00 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.