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
Allow xen guests to plug disks of 1 TiB or more The current xen backend driver implementation uses int64_t variables to store the size of the corresponding backend disk/file. It also uses an int64_t variable to store the block size of that image. When writing the number of sectors (file_size/block_size) to xenstore, however, it passes these values as 32 bit signed integers. This will cause an overflow for any disk of 1 TiB or more. This patch changes the xen backend driver to use a 64 bit integer write xenstore function. Signed-off-by: Felipe Franciosi <[email protected]> Signed-off-by: Stefano Stabellini <[email protected]>
9246ce881128df2a69178779c1ef33c83df3c70d
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/9246ce881128df2a69178779c1ef33c83df3c70d
2013-04-05 15:47:59+00:00
xhci: fix numintrs sanity checks Make sure numintrs is a power of two, msi requires this. https://bugzilla.redhat.com/show_bug.cgi?id=918035 Signed-off-by: Gerd Hoffmann <[email protected]>
c94a7c6979cafa7a71f32b35e0ff71ed00c61a89
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/c94a7c6979cafa7a71f32b35e0ff71ed00c61a89
2013-04-03 09:55:49+02:00
trace: rebuild generated-events.o when configuration changes Make sure to rebuild generated-events.o when ./configure options change. This prevents linker errors when a stale generated-events.o gets linked with code compiled against fresh headers. For example, try building with ./configure --enable-trace-backend=stderr followed by ./configure --enable-trace-backend=dtrace. Signed-off-by: Stefan Hajnoczi <[email protected]>
a7373b1f61d106ef5c9710eb56e942f513dc512d
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/a7373b1f61d106ef5c9710eb56e942f513dc512d
2013-03-28 14:19:57+01:00
qemu-char: Call fe_claim / fe_release when not using qdev chr properties chardev-frontends need to explictly check, increase and decrement the avail_connections "property" of the chardev when they are not using a qdev-chardev-property for the chardev. This fixes things like: qemu-kvm -chardev stdio,id=foo -device isa-serial,chardev=foo \ -mon chardev=foo Working, where they should fail. Most of the changes here are due to old hardware emulation code which is using serial_hds directly rather then a qdev-chardev-property. Signed-off-by: Hans de Goede <[email protected]> Message-id: [email protected] Signed-off-by: Anthony Liguori <[email protected]>
456d60692310e7ac25cf822cc1e98192ad636ece
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/456d60692310e7ac25cf822cc1e98192ad636ece
2013-04-04 19:21:25-05:00
qcow2: Gather clusters in a looping loop Instead of just checking once in exactly this order if there are dependendies, non-COW clusters and new allocation, this starts looping around these. This way we can, for example, gather non-COW clusters after new allocations as long as the host cluster offsets stay contiguous. Once handle_dependencies() is extended so that COW areas of in-flight allocations can be overwritten, this allows to continue with gathering other clusters (we wouldn't be able to do that without this change because we would have missed a possible second dependency in one of the next clusters). This means that in the typical sequential write case, we can combine the COW overwrite of one cluster with the allocation of the next cluster as soon as something like Delayed COW gets actually implemented. It is only by avoiding splitting requests this way that Delayed COW actually starts improving performance noticably. Signed-off-by: Kevin Wolf <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
ecdd5333ab9ed3f2b848066aaaef02c027b25e36
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/ecdd5333ab9ed3f2b848066aaaef02c027b25e36
2013-03-28 11:52:44+01:00
qmp: Fix design bug and read beyond buffer in memchar-write Command memchar-write takes data and size parameter. Begs the question what happens when data doesn't match size. With format base64, qmp_memchar_write() copies the full data argument, regardless of size argument. With format utf8, qmp_memchar_write() copies size bytes from data, happily reading beyond data. Copies crap from the heap or even crashes. Drop the size parameter, and always copy the full data argument. Signed-off-by: Markus Armbruster <[email protected]> Reviewed-by: Eric Blake <[email protected]> Signed-off-by: Anthony Liguori <[email protected]>
82e59a676c01b3df3b53998d428d0a64a55f2439
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/82e59a676c01b3df3b53998d428d0a64a55f2439
2013-02-06 16:35:17-06:00
vl.c: numa_add(): Validate nodeid before using it Without this check, QEMU will corrupt memory if a too-large nodeid is provided in the command-line. e.g.: -numa node,mem=...,cpus=...,nodeid=65 This changes nodenr to unsigned long long, to avoid integer conversion issues when converting the strtoull() result to int. Signed-off-by: Eduardo Habkost <[email protected]> Reviewed-by: Eric Blake <[email protected]> Signed-off-by: Anthony Liguori <[email protected]>
e4ce85b25838694d2d7396b5e969eb4830329631
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/e4ce85b25838694d2d7396b5e969eb4830329631
2013-02-04 14:38:33-06:00
block: Adds mirroring tests for resized images This test verifies two mirroring issues are fixed with resized images: * sync='top' creates an image that is the proper size * sync='full' doesn't cause an assertion failure and crash qemu Reviewed-by: Paolo Bonzini <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
a04eca108e5efe8a09fe82f7079fcd1568ffc8d7
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/a04eca108e5efe8a09fe82f7079fcd1568ffc8d7
2013-02-01 14:58:28+01:00
vl: correct error message when fail to init kvm command: qemu-system-x86_64 -hda disk.img -smp 32 --enable-kvm error: Number of SMP cpus requested (32) exceeds max cpus supported by KVM (16) failed to initialize KVM: Invalid argument No accelerator found! well, it did find kvm, but failed to init, so message "No accelerator found!" is confusing, this commit remove the confusing error message. Signed-off-by: liguang <[email protected]> Signed-off-by: Anthony Liguori <[email protected]>
217e21be6e0f2c1caa0b644f56aa60dba7ea7893
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/217e21be6e0f2c1caa0b644f56aa60dba7ea7893
2013-02-01 15:07:44-06:00
usb-host: Initialize dev->port the obviously safe way Coverity worries the strcpy() could overrun the destination. It can't, because the source always points to usb_host_scan()'s auto port[], which has the same size. Use pstrcpy() anyway, to hush the checker. Signed-off-by: Markus Armbruster <[email protected]> Signed-off-by: Gerd Hoffmann <[email protected]>
036078475427f2562c8e505f6bb44dbf5d8cbd95
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/036078475427f2562c8e505f6bb44dbf5d8cbd95
2013-01-14 12:47:11+01:00
qemu-ga: Plug fd leak on ga_channel_listen_accept() error path Spotted by Coverity. Signed-off-by: Markus Armbruster <[email protected]> Reviewed-by: Eric Blake <[email protected]> Reviewed-by: Michael Roth <[email protected]> Reviewed-by: Luiz Capitulino <[email protected]> Signed-off-by: Michael Roth <[email protected]>
32c16620dda8ba16f6d6bcd20efefdec8975af77
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/32c16620dda8ba16f6d6bcd20efefdec8975af77
2013-01-14 12:07:54-06:00
qemu-ga: ga_open_pidfile(): use qemu_open() This ensures that O_CLOEXEC is passed to open(), this way the pid file fd is not leaked to executed processes. Signed-off-by: Luiz Capitulino <[email protected]> Reviewed-by: Eric Blake <[email protected]> Acked-by: Amos Kong <[email protected]> Tested-by: Amos Kong <[email protected]> Signed-off-by: Michael Roth <[email protected]>
6ffacc5d3ddf2e3227aae2a8cc5c15627265f727
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/6ffacc5d3ddf2e3227aae2a8cc5c15627265f727
2013-01-14 12:00:20-06:00
pseries: set no default boot order This patch removes the default boot order for pseries machine. This allows the machine to handle a NULL boot order in case no -boot option is provided. Thus it helps SLOF firmware to verify if boot order is specified in command line or not. If no boot order is provided SLOF tries to boot from the device set in the nvram. Reviewed-by: Anthony Liguori <[email protected]> Acked-by: Alexander Graf <[email protected]> Signed-off-by: Avik Sil <[email protected]> Signed-off-by: Anthony Liguori <[email protected]>
2c9ee0291f8ca7e18f8e96a34e8f4be7867219d2
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/2c9ee0291f8ca7e18f8e96a34e8f4be7867219d2
2013-01-15 18:26:18-06:00
target-i386: CPUID: return highest basic leaf if eax > cpuid_xlevel This fixes a subtle bug. A bug that probably won't cause trouble for any existing OS, but a bug anyway: Intel SDM Volume 2, CPUID Instruction states: > Two types of information are returned: basic and extended function > information. If a value entered for CPUID.EAX is higher than the maximum > input value for basic or extended function for that processor then the > data for the highest basic information leaf is returned. For example, > using the Intel Core i7 processor, the following is true: > > CPUID.EAX = 05H (* Returns MONITOR/MWAIT leaf. *) > CPUID.EAX = 0AH (* Returns Architectural Performance Monitoring leaf. *) > CPUID.EAX = 0BH (* Returns Extended Topology Enumeration leaf. *) > CPUID.EAX = 0CH (* INVALID: Returns the same information as CPUID.EAX = 0BH. *) > CPUID.EAX = 80000008H (* Returns linear/physical address size data. *) > CPUID.EAX = 8000000AH (* INVALID: Returns same information as CPUID.EAX = 0BH. *) AMD's CPUID Specification, on the other hand, is less specific: > The CPUID instruction supports two sets or ranges of functions, > standard and extended. > > • The smallest function number of the standard function range is > Fn0000_0000. The largest function num- ber of the standard function > range, for a particular implementation, is returned in CPUID > Fn0000_0000_EAX. > > • The smallest function number of the extended function range is > Fn8000_0000. The largest function num- ber of the extended function > range, for a particular implementation, is returned in CPUID > Fn8000_0000_EAX. > > Functions that are neither standard nor extended are undefined and > should not be relied upon. QEMU's behavior matched Intel's specification before, but this was changed by commit b3baa152aaef1905876670590275c2dd0bbb088c. This patch restores the behavior documented by Intel when cpuid_xlevel2 is 0. The existing behavior when cpuid_xlevel2 is set (falling back to level=cpuid_xlevel) is being kept, as I couldn't find any public documentation on the CPUID 0xC0000000 function range on Centaur CPUs. Signed-off-by: Eduardo Habkost <[email protected]> Signed-off-by: Anthony Liguori <[email protected]>
57f26ae72983095d0258e391041dfb8864f769e5
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/57f26ae72983095d0258e391041dfb8864f769e5
2012-12-23 09:11:24-06:00
iscsi: fix deadlock during login If the connection is interrupted before the first login is successfully completed qemu-kvm is waiting forever in qemu_aio_wait(). This is fixed by performing an sync login to the target. If the connection breaks after the first successful login errors are handled internally by libiscsi. Signed-off-by: Peter Lieven <[email protected]> Signed-off-by: Paolo Bonzini <[email protected]>
e829b0bb054ed3389e5b22dad61875e51674e629
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/e829b0bb054ed3389e5b22dad61875e51674e629
2012-11-28 12:50:56+01:00
usbredir: Verify we have 32 bits bulk length cap when redirecting to xhci The xhci-hcd may submit bulk transfers > 65535 bytes even when not using bulk-in pipeling, so usbredir can only be used in combination with an xhci hcd if the client has the 32 bits bulk length capability. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Gerd Hoffmann <[email protected]>
d3aea641a4002e0abe940c65d318ef38eda245df
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/d3aea641a4002e0abe940c65d318ef38eda245df
2013-01-07 12:57:24+01:00
slirp: Don't crash on packets from 0.0.0.0/8. LWIP can generate packets with a source of 0.0.0.0, which triggers an assertion failure in arp_table_add(). Instead of crashing, simply return to avoid adding an invalid ARP table entry. Signed-off-by: Nickolai Zeldovich <[email protected]> Signed-off-by: Jan Kiszka <[email protected]>
1a89b60885ccc2abf7cc50275fcee70d0347425e
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/1a89b60885ccc2abf7cc50275fcee70d0347425e
2012-11-15 10:27:14+01:00
usb-redir: Don't handle interrupt output packets async Instead report them as successfully completed directly on submission, this has 2 advantages: 1) This matches the timing of interrupt output packets on real hardware, with the previous async handling, if an ep has an interval of say 500 ms, then there would be 500+ ms between the submission and the guest seeing the completion, as we wont do the write back until the qh gets polled again. And in the mean time the guest may very well have timed out, as the guest can reasonable expect a much quicker completion. 2) This fixes interrupt output packets potentially getting send twice surrounding a migration. As we delay the writeback to guest memory until the qh gets polled again, there is a window between completion and writeback where migration can happen, in this case the destination will not know about the completion, and it will execute the packet *again* But it does also come with a disadvantage: 1) If the actual interrupt out to the real usb device fails, there is no way to report this back to the guest. This patch assumes however that interrupt outs in practice never fail, as they are only used by specialized drivers, which are unlikely to issue illegal requests (unlike general class drivers which often issue requests which some devices don't implement). And that thus the advantages outway the disadvantage. Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Gerd Hoffmann <[email protected]>
723aedd53281cfa0997457cb156a59909a75f5a8
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/723aedd53281cfa0997457cb156a59909a75f5a8
2012-11-21 14:55:54+01:00
microblaze: Update PC before simulating syscall Fixes a clone() emulation bug were the new thread starts at the point of the syscall and thus clones in a loop. Signed-off-by: Edgar E. Iglesias <[email protected]>
d7dce494769e47c9a1eec6f55578d3acdfab888b
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/d7dce494769e47c9a1eec6f55578d3acdfab888b
2012-10-19 13:24:12+02:00
i440fx: avoid destroying memory regions within a transaction Calling memory_region_destroy() within a transaction is illegal, since the memory API is allowed to continue to dispatch to a region until the transaction commits. 440fx does that however when managing PAM registers. This bug is benign, since the regions are all aliases (which the memory core tends to throw anyway), and since we don't do concurrent dispatch yet, but instead of relying on that, tighten ship ahead of the coming concurrency storm. Fix by having a predefined set of regions, of which one will be enabled at any time. Signed-off-by: Avi Kivity <[email protected]>
2725aec70114cf1bee00443aeb47a305f9b0c665
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/2725aec70114cf1bee00443aeb47a305f9b0c665
2012-10-17 17:10:04+02:00
bt: replace fragile snprintf use and unwarranted strncpy In bt_hci_name_req a failed snprintf could return len larger than sizeof(params.name), which means the following memset call would have a "length" value of (size_t)-1, -2, etc... Sounds scary. But currently, one can deduce that there is no problem: strlen(slave->lmp_name) is guaranteed to be smaller than CHANGE_LOCAL_NAME_CP_SIZE, which is the same as sizeof(params.name), so this cannot happen. Regardless, there is no justification for using snprintf+memset. Use pstrcpy instead. Also, in bt_hci_event_complete_read_local_name, use pstrcpy in place of unwarranted strncpy. Signed-off-by: Jim Meyering <[email protected]> Signed-off-by: Anthony Liguori <[email protected]>
e5fda03839e3c61b01d6c60de5625501d01c69d0
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/e5fda03839e3c61b01d6c60de5625501d01c69d0
2012-10-05 07:58:37-05:00
tcg: Sanity check goto_tb input Checking that we don't try for idx != [01] is trivial. Checking that we don't issue more than one of any index requires a tad more data and some ifdefs protecting that new variable. Signed-off-by: Richard Henderson <[email protected]> Cc: Max Filippov <[email protected]> Signed-off-by: Aurelien Jarno <[email protected]>
0a209d4bb119b92eb14b9afab55cef5bc0555554
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/0a209d4bb119b92eb14b9afab55cef5bc0555554
2012-09-26 00:31:17+02:00
nbd: do not leak nbd_trip coroutines when a connection is torn down Because nbd_client_close removes the I/O handlers for the client socket, there is no way that any suspended coroutines are restarted. This will be a problem with the QEMU embedded NBD server, because we will have a QMP command to forcibly close all connections with the clients. Instead, we can exploit the reference counting of NBDClients; shutdown the client socket, which will make it readable and writeable. Also call the close callback, which will release the user's reference. The coroutines then will fail and exit cleanly, and release all remaining references, until the last refcount finally triggers the closure of the client. Signed-off-by: Paolo Bonzini <[email protected]>
ff2b68aa70d10b7eae813b04e9a23723dbd89ebd
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/ff2b68aa70d10b7eae813b04e9a23723dbd89ebd
2012-09-19 15:26:28+02:00
qemu-char: BUGFIX, don't call FD_ISSET with negative fd tcp_chr_connect(), unlike for example udp_chr_update_read_handler() does not check if the fd it is using is valid (>= 0) before passing it to qemu_set_fd_handler2(). If using e.g. a TCP serial port, which is not initially connected, this can result in -1 being passed to FD_ISSET, which has undefined behaviour. On x86 it seems to harmlessly return 0, but on PowerPC, it causes a fortify buffer overflow error to be thrown. This patch fixes this by putting an extra test in tcp_chr_connect(), and also adds an assert qemu_set_fd_handler2() to catch other such errors on all platforms, rather than just some. Signed-off-by: David Gibson <[email protected]> Signed-off-by: Anthony Liguori <[email protected]>
bbdd2ad0814ea0911076419ea21b7957505cf1cc
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/bbdd2ad0814ea0911076419ea21b7957505cf1cc
2012-09-17 10:18:48-05:00
target-xtensa: return ENOSYS for unimplemented simcalls This prevents guest from proceeding with uninitialised garbage returned from unimplemented simcalls. Signed-off-by: Max Filippov <[email protected]> Signed-off-by: Blue Swirl <[email protected]>
e7eee62a90c671d22d50964b7de05e3f4fd96f5f
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/e7eee62a90c671d22d50964b7de05e3f4fd96f5f
2012-09-01 10:39:10+00:00
kvmvapic: Disable if there is insufficient memory We need at least 1M of RAM to map the option ROM. Otherwise, we will corrupt host memory or even crash: $ qemu-system-x86_64 -nodefaults --enable-kvm -vnc :0 -m 640k Segmentation fault (core dumped) Reported-and-tested-by: Markus Armbruster <[email protected]> Signed-off-by: Jan Kiszka <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
a9605e0317c7a6d5e68f3a3b6708c8ef1096f4bc
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/a9605e0317c7a6d5e68f3a3b6708c8ef1096f4bc
2012-08-14 19:23:17-03:00
pcie_aer: clear cmask for Advanced Error Interrupt Message Number The Advanced Error Interrupt Message Number (bits 31:27 of the Root Error Status Register) is updated when the number of msi messages assigned to a device changes. Migration of windows 7 on q35 chipset failed because the check in get_pci_config_device() fails due to cmask being set on these bits. Its valid to update these bits and we must restore this state across migration. Signed-off-by: Jason Baron <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
0e180d9c8a7429c55d23d2e7855f1e490a063aaa
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/0e180d9c8a7429c55d23d2e7855f1e490a063aaa
2012-09-07 09:02:44+03:00
sparc: fix expression with uninitialized initial value err was uninitialized, it's not OK to use |=. Spotted by Clang compiler. Fix by implementing the earlier statement which initializes the variable. Signed-off-by: Blue Swirl <[email protected]>
8954bae3ce1ae5b64218b8731da9a8d7f46db9a7
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/8954bae3ce1ae5b64218b8731da9a8d7f46db9a7
2012-08-09 18:34:57+00:00
esp: add Tekram DC-390 emulation (PC SCSI adapter) Difference with AMD PCscsi is that DC-390 contains a EEPROM, and that a romfile is available to add INT13 support. This has been successfully tested on: - MS DOS 6.22 (using DC390 ASPI driver) - MS Windows 98 SE (using DC390 driver) - MS Windows NT 3.1 (using DC390 driver) - MS Windows NT 4.0 (using DC390 driver) - hard disk and cdrom boot Signed-off-by: Hervé Poussineau <[email protected]> Signed-off-by: Blue Swirl <[email protected]>
cea936b1b5c741c0456f9ccb90be54b5e4b589e5
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/cea936b1b5c741c0456f9ccb90be54b5e4b589e5
2012-08-09 18:21:49+00:00
iscsi: do not leak initiator_name The argument of iscsi_create_context is never freed by libiscsi, which in fact calls strdup on it. Avoid a leak. Signed-off-by: Paolo Bonzini <[email protected]>
b93c94f7ec74a577a0f74c724e8d251f01eaf65a
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/b93c94f7ec74a577a0f74c724e8d251f01eaf65a
2012-08-08 14:51:59+02:00
Support 'help' as a synonym for '?' in command line options For command line options which permit '?' meaning 'please list the permitted values', add support for 'help' as a synonym, by abstracting the check out into a helper function. This change means that in some cases where we were being lazy in our string parsing, "?junk" will now be rejected as an invalid option rather than being (undocumentedly) treated the same way as "?". Update the documentation to use 'help' rather than '?', since '?' is a shell metacharacter and thus prone to fail confusingly if there is a single character filename in the current working directory and the '?' has not been escaped. It's therefore better to steer users towards 'help', though '?' is retained for backwards compatibility. We do not, however, update the output of the system emulator's -help (or any documentation autogenerated from the qemu-options.hx which is the source of the -help text) because libvirt parses our -help output and will break. At a later date when QEMU provides a better interface so libvirt can avoid having to do this, we can update the -help text too. Signed-off-by: Peter Maydell <[email protected]> Signed-off-by: Anthony Liguori <[email protected]>
c8057f951d64de93bfd01569c0a725baa9f94372
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/c8057f951d64de93bfd01569c0a725baa9f94372
2012-08-02 13:16:42-05:00
usb-host: rewrite usb_linux_update_endp_table This patch carries a complete rewrite of the usb descriptor parser. Changes / improvements: * We are using the USBDescriptor struct instead of hard-coded offsets now to access descriptor data. * (debug) printfs are all gone, tracepoints have been added instead. * We don't try (and fail) to skip over unneeded descriptors. We parse them all one by one. We keep track of which configuration, interface and altsetting we are looking at and use this information to figure which desciptors are in use and which we can ignore. * On parse errors we clear all endpoint information, which will disallow any communication with the device, except control endpoint messages. This makes sure we don't end up with a silly device state where half of the endpoints got enabled and the other half was left disabled. * Some sanity checks have been added. The new parser is more robust and also leaves complete device information in the trace log if you enable the ush_host_parse_* tracepoints. Signed-off-by: Gerd Hoffmann <[email protected]>
96dd9aac37d30f3425088f81523942e67b2d03ac
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/96dd9aac37d30f3425088f81523942e67b2d03ac
2012-04-17 10:23:28+02:00
block: fix streaming/closing race Streaming can issue I/O while qcow2_close is running. This causes the L2 caches to become very confused or, alternatively, could cause a segfault when the streaming coroutine is reentered after closing its block device. The fix is to cancel streaming jobs when closing their underlying device. The cancellation must be synchronous, on the other hand qemu_aio_wait will not restart a coroutine that is sleeping in co_sleep. So add a flag saying whether streaming has in-flight I/O. If the busy flag is false, the coroutine is quiescent and, when cancelled, will not issue any new I/O. This protects streaming against closing, but not against deleting. We have a reference count protecting us against concurrent deletion, but I still added an assertion to ensure nothing bad happens. Signed-off-by: Paolo Bonzini <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Kevin Wolf <[email protected]>
3e914655f268f627ef004a8f1ea0355311b5aca6
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/3e914655f268f627ef004a8f1ea0355311b5aca6
2012-04-05 14:54:40+02:00
PPC: KVM: Synchronize regs on CPU dump When we dump the CPU registers, there's a certain chance they haven't been synchronized with KVM yet, so we have to manually trigger that. This aligns the code with x86 and fixes a bug where the register state was bogus on invalid/unknown kvm exit reasons. Reported-by: Benjamin Herrenschmidt <[email protected]> Signed-off-by: Alexander Graf <[email protected]>
29979a8d2596d33b474c11efb376ed47ba1d44d3
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/29979a8d2596d33b474c11efb376ed47ba1d44d3
2012-03-15 13:12:12+01:00
vnc: don't mess up with iohandlers in the vnc thread The threaded VNC servers messed up with QEMU fd handlers without any kind of locking, and that can cause some nasty race conditions. Using qemu_mutex_lock_iothread() won't work because vnc_dpy_cpy(), which will wait for the current job queue to finish, can be called with the iothread lock held. Instead, we now store the data in a temporary buffer, and use a bottom half to notify the main thread that new data is available. vnc_[un]lock_ouput() is still needed to access VncState members like abort, csock or jobs_buffer. Signed-off-by: Corentin Chary <[email protected]> Signed-off-by: Anthony Liguori <[email protected]>
175b2a6e4be06422da59d3a82c28d9a0e738e282
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/175b2a6e4be06422da59d3a82c28d9a0e738e282
2012-03-14 16:22:46-05:00
tracetool: Omit useless QEMU_*_ENABLED() check SystemTap provides a "semaphore" that can optionally be tested before executing a trace event. The purpose of this mechanism is to skip expensive tracing code when the trace event is disabled. For example, some applications may have trace events that format or convert strings for trace events. This expensive processing should only be done in the case where the trace event is enabled. Since QEMU's generated trace events never have such special-purpose code, there is no reason to add the semaphore check. Reviewed-by: Masami Hiramatsu <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
bcec43324d02d586a8bc0c9093623636e870ad19
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/bcec43324d02d586a8bc0c9093623636e870ad19
2012-03-12 10:12:34+00:00
qemu-iotests: add read/write from smaller backing image test Some image formats support backing images that are smaller than the image file. This patch adds a test that verifies that reads and writes beyond the end of backing image work. Unallocated reads beyond the end of the backing file should produce zeroes. Writes beyond the end of the backing file should copy-on-write using zeroes. Signed-off-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Christoph Hellwig <[email protected]>
8268b7675c15b71023ad4ba5930c5f77d3e98271
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/8268b7675c15b71023ad4ba5930c5f77d3e98271
2012-02-22 16:17:03+01:00
usb: USBPacket: add status, rename owner -> ep Add enum to track the status of USBPackets, use that instead of the owner pointer to figure whenever a usb packet is currently in flight or not. Add some more packet status sanity checks. Also rename the USBEndpoint pointer from "owner" to "ep". Signed-off-by: Gerd Hoffmann <[email protected]>
f53c398aa603cea135ee58fd15249aeff7b9c7ea
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/f53c398aa603cea135ee58fd15249aeff7b9c7ea
2012-02-10 11:31:57+01:00
linux-user: Allow NULL value pointer in setxattr and getxattr It's valid to pass a NULL value pointer to setxattr, so don't fail this case EFAULT. Signed-off-by: Peter Maydell <[email protected]> Signed-off-by: Riku Voipio <[email protected]>
e3c33ec6b07dc4d0503cb43b2114be47fc344d36
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/e3c33ec6b07dc4d0503cb43b2114be47fc344d36
2012-02-02 17:51:20+02:00
keep the PID file locked for the lifetime of the process The lockf() call in qemu_create_pidfile() aims at ensuring mutual exclusion. We shouldn't close the pidfile on success (as introduced by commit 1bbd1592), because that drops the lock as well [1]: "File locks shall be released on first close by the locking process of any file descriptor for the file." Coverity may complain again about the leaked file descriptor; let's worry about that later. v1->v2: - add reference to 1bbd1592 - explain the intentional fd leak in the source [1] http://pubs.opengroup.org/onlinepubs/9699919799/functions/lockf.html Signed-off-by: Laszlo Ersek <[email protected]> Signed-off-by: Anthony Liguori <[email protected]>
93dd748b789202af4f5be75412c58ee1ed481b29
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/93dd748b789202af4f5be75412c58ee1ed481b29
2012-02-01 16:23:57-06:00
e1000: bounds packet size against buffer size Otherwise we can write beyond the buffer and corrupt memory. This is tracked as CVE-2012-0029. Signed-off-by: Anthony Liguori <[email protected]>
65f82df0d7a71ce1b10cd4c5ab08888d176ac840
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/65f82df0d7a71ce1b10cd4c5ab08888d176ac840
2012-01-23 07:30:43-06:00
Fix dirty logging with 32-bit qemu & 64-bit guests The kvm_get_dirty_pages_log_range() function uses two address variables to step through the monitored memory region to update the dirty log. However, these variables have type unsigned long, which can overflow if running a 64-bit guest with a 32-bit qemu binary. This patch changes these to target_phys_addr_t which will have the correct size. Signed-off-by: Benjamin Herrenschmidt <[email protected]> Signed-off-by: David Gibson <[email protected]> Signed-off-by: Alexander Graf <[email protected]>
aa90fec7ad128039617d31a5fd5ced8b0488f71b
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/aa90fec7ad128039617d31a5fd5ced8b0488f71b
2012-01-21 05:17:01+01:00
qxl: Slot sanity check in qxl_phys2virt() is off by one, fix Spotted by Coverity. Signed-off-by: Markus Armbruster <[email protected]> Signed-off-by: Gerd Hoffmann <[email protected]>
6b7332eb4013fec6ad294115ab889d77d4463624
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/6b7332eb4013fec6ad294115ab889d77d4463624
2012-01-17 16:30:57+01:00
Fix qapi code generation wrt parallel build Make's multiple output syntax x.c x.h: x.template gen < x.template actually invokes the command once for x.c and once for x.h (with differing $@ in each invocation). During a parallel build, the two commands may be invoked in parallel; this opens up a race, where the second invocation trashes a file supposedly produced during the first, and now in use by a dependent command. The various qapi code generators are susceptible to this; fix by making them generate just one file per invocation. Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Anthony Liguori <[email protected]>
8d3bc5178fbc06cdd89c064ae8f44e77c503e91e
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/8d3bc5178fbc06cdd89c064ae8f44e77c503e91e
2011-12-27 09:28:58-06:00
net/socket.c : fix memory leak Signed-off-by: Li Zhi Hui <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
c7ee8f683d93c7ea346a5eb86495da672ce7e7da
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/c7ee8f683d93c7ea346a5eb86495da672ce7e7da
2011-12-06 09:56:41+00:00
configure: Fix test for supported host CPU type The test for whether the host CPU is supported had several problems: * the attempt to fall back to TCI was done as a duplicate test, very late (so "--cpu foo" would fail early but "--cpu unicore32" would fail late, differently, and after configure had already printed a lot of output) * a number of CPUs only supported as guests were included in the list of CPUs we would accept as valid hosts, which would result in a late compile failure on those systems rather than a configure failure or fallback to TCI * bailing out for an unsupported CPU happened before the main option parsing, so "configure --help" wouldn't work Fix these by folding the setting of ARCH into the first test for supported host CPU, removing spurious guest-only CPU names from it, and moving the "fall back to TCI" code earlier. Signed-off-by: Peter Maydell <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
359bc95d3e604e22fe07be62f5099148a2bb4e6f
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/359bc95d3e604e22fe07be62f5099148a2bb4e6f
2012-01-06 15:07:14+00:00
vhost: convert to MemoryListener API Drop the use of cpu_register_phys_memory_client() in favour of the new MemoryListener API. The new API simplifies the caller, since there is no need to deal with splitting and merging slots; however this is not exploited in this patch. Signed-off-by: Avi Kivity <[email protected]>
04097f7c5957273c578f72b9bd603ba6b1d69e33
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/04097f7c5957273c578f72b9bd603ba6b1d69e33
2011-12-20 14:14:07+02:00
x86/cpuid: Plug memory leak in cpudef_setfield() To reproduce the leak, put two name options into the same [cpudef] section of target-x86_64.conf. Signed-off-by: Markus Armbruster <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
99e1dec06f343cefecae9baeec0aae2f99f552d5
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/99e1dec06f343cefecae9baeec0aae2f99f552d5
2011-11-10 12:29:50+00:00
pc: Re-order pc_init1 to initialize the ISA bus before ISA devices In particular, the i8259 was being initialized before the ISA bus, leading to a crash. Signed-off-by: Richard Henderson <[email protected]> Signed-off-by: Avi Kivity <[email protected]>
4bae1efe63a507b99cad4f8c8b8cf6fa8d203881
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/4bae1efe63a507b99cad4f8c8b8cf6fa8d203881
2011-09-25 14:58:36+03:00
pci-devfn: check that device/slot number is within range Need to check that guest slot/device number is not > 31 or walk off the devfn table when checking if a devfn is available or not in a guest. before this fix, passing in an addr=abc or addr=34, can crash qemu, sometimes fail gracefully if data past end of devfn table fails the availability test. with this fix, get clean error: Property 'pci-assign.addr' doesn't take value '34' also tested when no addr= param passed for guest (pcicfg) address, and that worked as well. Signed-off-by: Don Dutile <[email protected]> Signed-off-by: Anthony Liguori <[email protected]>
ffe3ce1173e71ca299d08f6542839cc31ea3e3cf
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/ffe3ce1173e71ca299d08f6542839cc31ea3e3cf
2011-09-23 10:55:34-05:00
virtio-9p: Fix syntax error in debug code This error was reported by cppcheck: qemu/hw/9pfs/virtio-9p-debug.c:342: error: Invalid number of character ({) when these macros are defined: 'DEBUG_DATA'. Cc: Aneesh Kumar K.V <[email protected]> Signed-off-by: Stefan Weil <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
069d89b8a8dc5a9af4733bca14763b45bbb2546f
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/069d89b8a8dc5a9af4733bca14763b45bbb2546f
2011-09-09 09:51:07+01:00
Fix include statements for qemu-common.h * qemu-common.h is not a system include file, so it should be included with "" instead of <>. Otherwise incremental builds might fail because only local include files are checked for changes. * linux-user/syscall.c included the file twice. Cc: Riku Voipio <[email protected]> Cc: Jan Kiszka <[email protected]> Acked-by: Kevin Wolf <[email protected]> Signed-off-by: Stefan Weil <[email protected]> Signed-off-by: Stefan Hajnoczi <[email protected]>
5a61cb60d6ee8d49c553d7959363df26b55f4873
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/5a61cb60d6ee8d49c553d7959363df26b55f4873
2011-09-09 09:56:12+01:00
qcow2: Fix L1 table size after bdrv_snapshot_goto When loading an internal snapshot whose L1 table is smaller than the current L1 table, the size of the current L1 would be shrunk to the snapshot's L1 size in memory, but not on disk. This lead to incorrect refcount updates and eventuelly to image corruption. Instead of writing the new L1 size to disk, this simply retains the bigger L1 size that is currently in use and makes sure that the unused part is zeroed. Signed-off-by: Kevin Wolf <[email protected]> Tested-by: Philipp Hahn <[email protected]> Signed-off-by: Anthony Liguori <[email protected]>
35d7ace74bd07e3d6983c1fd7cbfab4e11175689
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/35d7ace74bd07e3d6983c1fd7cbfab4e11175689
2011-08-05 07:15:47-05:00
vnc: Fix compilation with --enable-vnc-png Commit f26e428da505709ec03b2ed2c9eb3db82b30bd7b fixed compilation with --enable-vnc-png, but broke it with --enable-vnc-png. The breakage is caused by pngconfig.h which checks whether setjmp.h was already included and fails because qemu-common.h includes setjmp.h. The check is disabled by defining PNG_SKIP_SETJMP_CHECK. Cc: Blue Swirl <[email protected]> Signed-off-by: Stefan Weil <[email protected]> Reviewed-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Anthony Liguori <[email protected]>
2fb0c09f4ff036f68474277ed4edc036f6529de8
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/2fb0c09f4ff036f68474277ed4edc036f6529de8
2011-06-27 10:21:34-05:00
pci: Use of qemu_put_ram_ptr in pci_add_option_rom. Prevent a deadlock caused by leaving a map cache bucket locked by the preceding qemu_get_ram_ptr() call. Signed-off-By: John Baboval <[email protected]> Signed-off-by: Anthony PERARD <[email protected]> Signed-off-by: Alexander Graf <[email protected]>
8c12f1912afed98715d995cb7c72c8203aaced9d
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/8c12f1912afed98715d995cb7c72c8203aaced9d
2011-05-08 10:10:01+02:00
darwin-user: Remove unneeded null pointer check cppcheck reports this error: commpage.c:223: error: Possible null pointer dereference: value - otherwise it is redundant to check if value is null at line 214 The null pointer check in line 214 is indeed not needed. If value were null, the code would crash in line 223. See do_compare_and_swap64 were for a reference. Signed-off-by: Stefan Weil <[email protected]> Signed-off-by: Aurelien Jarno <[email protected]>
70afb8ff90e9d922ed729e6dbabaff6d67c461aa
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/70afb8ff90e9d922ed729e6dbabaff6d67c461aa
2011-04-27 16:28:09+02:00
target-arm: Don't overflow when calculating value for signed VABAL In the VABAL instruction we take the absolute difference of two values of size x and store it in a result of size 2x. This means we have to be careful to calculate the absolute difference using a wide enough type that we don't accidentally overflow. Signed-off-by: Peter Maydell <[email protected]> Signed-off-by: Aurelien Jarno <[email protected]>
4d9ad7f793605abd9806fc932b3e04e028894565
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/4d9ad7f793605abd9806fc932b3e04e028894565
2011-04-13 20:47:50+02:00
tests/cris: Fix some errors and potential crashes These errors were reported by cppcheck: tests/cris/check_openpf1.c:30: error: Mismatching allocation and deallocation: f tests/cris/check_openpf2.c:13: error: Mismatching allocation and deallocation: f tests/cris/check_stat3.c:16: error: Buffer overrun possible for long cmd-line args tests/cris/check_stat4.c:18: error: Buffer overrun possible for long cmd-line args The first two are obvious coding errors (fopen needs fclose, not close). The last two may seem less important (nobody will start test code with an argument of more than 1022 characters which raises a buffer overrun). Fixing them nevertheless helps with static code checks like those done by cppcheck. Signed-off-by: Stefan Weil <[email protected]> Signed-off-by: Edgar E. Iglesias <[email protected]>
2917dce477f91e933052f5555b4c6be961ff624e
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/2917dce477f91e933052f5555b4c6be961ff624e
2011-04-03 21:58:38+02:00
virtio-serial: don't crash on invalid input Fix crash on invalid input in virtio-serial. Discovered by code review, untested. Signed-off-by: Michael S. Tsirkin <[email protected]>
fbe0c5591077814eead05217fc96f087b254a6a8
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/fbe0c5591077814eead05217fc96f087b254a6a8
2011-03-28 18:34:23+02:00
s390: Detect invalid invocations of qemu_ram_free/remap This both detects invalid invocations of qemu_ram_free and qemu_ram_remap when mem_path is non-NULL and fixes a build error on s390 ("'area' may be used uninitialized in this function"). Signed-off-by: Jan Kiszka <[email protected]> CC: Alexander Graf <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
fd28aa132362320f9f3a30b23f634bb14dee528e
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/fd28aa132362320f9f3a30b23f634bb14dee528e
2011-03-15 14:36:25-03:00
softfloat: Fix single-to-half precision float conversions Fix various bugs in the single-to-half-precision conversion code: * input NaNs not correctly converted in IEEE mode (fixed by defining and using a commonNaNToFloat16()) * wrong values returned when converting NaN/Inf into non-IEEE half precision value * wrong values returned for conversion of values which are on the boundary between denormal and zero for the half precision format * zeroes not correctly identified * excessively large results in non-IEEE mode should generate InvalidOp, not Overflow Signed-off-by: Peter Maydell <[email protected]> Signed-off-by: Aurelien Jarno <[email protected]>
600e30d2b293bd19b0d0cdb7e8a517cecf482d12
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/600e30d2b293bd19b0d0cdb7e8a517cecf482d12
2011-02-10 18:28:21+01:00
e1000: verify we have buffers, upfront The spec says: Any descriptor with a non-zero status byte has been processed by the hardware, and is ready to be handled by the software. Thus, once we change a descriptor status to non-zero we should never move the head backwards and try to reuse this descriptor from hardware. This actually happened with a multibuffer packet that arrives when we don't have enough buffers. Fix by checking that we have enough buffers upfront so we never need to discard the packet midway through. Signed-off-by: Michael S. Tsirkin <[email protected]> Acked-by: Alex Williamson <[email protected]> Acked-by: Kevin Wolf <[email protected]> Signed-off-by: Aurelien Jarno <[email protected]>
322fd48afbed1ef7b834ac343a0c8687bcb33695
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/322fd48afbed1ef7b834ac343a0c8687bcb33695
2011-02-20 15:18:26+01:00
Implement assorted pSeries hcalls and RTAS methods This patch adds several small utility hypercalls and RTAS methods to the pSeries platform emulation. Specifically: * 'display-character' rtas call This just prints a character to the console, it's occasionally used for early debug of the OS. The support includes a hack to make this RTAS call respond on the normal token value present on real hardware, since some early debugging tools just assume this value without checking the device tree. * 'get-time-of-day' rtas call This one just takes the host real time, converts to the PAPR described format and returns it to the guest. * 'power-off' rtas call This one shuts down the emulated system. * H_DABR hypercall On pSeries, the DABR debug register is usually a hypervisor resource and virtualized through this hypercall. If the hypercall is not present, Linux will under some circumstances attempt to manipulate the DABR directly which will fail on this emulated machine. This stub implementation is enough to stop that behaviour, although it doesn't actually implement the requested DABR operations as yet. Signed-off-by: Paul Mackerras <[email protected]> Signed-off-by: David Gibson <[email protected]> Signed-off-by: Alexander Graf <[email protected]>
821303f59b63ab832f0921f070db55e95bb21858
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/821303f59b63ab832f0921f070db55e95bb21858
2011-04-01 18:34:56+02:00
linux-user: avoid gcc array overrun warning for sparc Suppress a gcc array bounds overrun warning when filling in the SPARC signal frame by adjusting our definition of the structure so that the fp and callers_pc membes are part of the ins[] array rather than separate fields; since qemu has no need to access the fields individually there is no need to follow the kernel's structure field naming exactly. Signed-off-by: Peter Maydell <[email protected]> Signed-off-by: Blue Swirl <[email protected]>
e321c34aa1d2560bea4d525af66417147467c515
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/e321c34aa1d2560bea4d525af66417147467c515
2011-02-01 17:03:02+00:00
vpc: fix a file descriptor leak Fix a file descriptor leak, reported by cppcheck: [/src/qemu/block/vpc.c:524]: (error) Resource leak: fd Signed-off-by: Blue Swirl <[email protected]>
f0ff243a16362b82e4dae7bd991d13ba25bb5b2f
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/f0ff243a16362b82e4dae7bd991d13ba25bb5b2f
2011-01-12 19:49:00+00:00
optionrom: fix bugs in signrom.sh signrom.sh has multiple bugs: - the last byte is considered when calculating the existing checksum, but not when computing the correction - apprently the 'expr' expression overflows and produces incorrect results with larger roms - if the checksum happened to be zero, we calculated the correction byte to be 256 Instead of rewriting this in half a line of python, this patch fixes the bugs. Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Anthony Liguori <[email protected]>
33bbd1de5ec9b8802d63e811908f2351ba83884c
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/33bbd1de5ec9b8802d63e811908f2351ba83884c
2010-11-21 09:16:57-06:00
Fix block migration when the device size is not a multiple of 1 MB b02bea3a85cc939f09aa674a3f1e4f36d418c007 added a check on the return value of bdrv_write and aborts migration when it fails. However, if the size of the block device to migrate is not a multiple of BLOCK_SIZE (currently 1 MB), the last bdrv_write will fail with -EIO. Fixed by calling bdrv_write with the correct size of the last block. Signed-off-by: Pierre Riteau <[email protected]> Signed-off-by: Kevin Wolf <[email protected]>
77358b59f6f3ef571fb2262f5f6216e179d07ecb
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/77358b59f6f3ef571fb2262f5f6216e179d07ecb
2011-01-24 16:41:50+01:00
eepro100: Add support for multiple individual addresses (multiple IA) I reviewed the latest sources of Linux, FreeBSD and NetBSD. They all reset the multiple IA bit (multi_ia in BSD) to zero, but I did not find code which sets this bit to one (like it is done by some routers). Running Windows guests also did not set this bit. Intel's Open Source Software Developer Manual does not give much information on the semantics related to this bit, so I had to guess how it works. The guess was good enough to make the router emulation work. Related changes in this patch: * Update naming and documentation of the internal hash register. It is not limited to multicast, but also used for multiple IA. * Dump complete configuration register when debug traces are enabled. * Debug output when multiple IA bit is set during CmdConfigure. * Debug output when frames are received because multiple IA bit is set, or when they are ignored although it is set. Cc: Michael S. Tsirkin <[email protected]> Signed-off-by: Stefan Weil <[email protected]> Signed-off-by: Michael S. Tsirkin <[email protected]>
010ec6293409f10b88631c36145944b9c3277ce1
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/010ec6293409f10b88631c36145944b9c3277ce1
2010-10-07 12:19:47+02:00
pulse-audio: fix bug on updating rpos Fix a rpos coordination bug between qpa_run_out() and qpa_thread_out(), which shows up as playback noises. qpa_run_out() qpa_thread_out loop N critical section 1 qpa_run_out() qpa_thread_out loop N doing pa_simple_write() qpa_run_out() qpa_thread_out loop N doing pa_simple_write() qpa_thread_out loop N critical section 2 qpa_thread_out loop N+1 critical section 1 qpa_run_out() qpa_thread_out loop N+1 doing pa_simple_write() In the above scheme, "qpa_thread_out loop N+1 critical section 1" will get the same rpos as the one used by "qpa_thread_out loop N critical section 1". So it will be reading dead samples from the old rpos. The rpos can only be updated back to qpa_thread_out when there is a qpa_run_out() run between two qpa_thread_out loops. normal sequence: qpa_thread_out: hw->rpos (X0) => local rpos => pa->rpos (X1) qpa_run_out: pa->rpos (X1) => hw->rpos (X1) qpa_thread_out: hw->rpos (X1) => local rpos => pa->rpos (X2) buggy sequence: qpa_thread_out: hw->rpos (X0) => local rpos => pa->rpos (X1) qpa_thread_out: hw->rpos (X0) => local rpos => pa->rpos (X1') Obviously qpa_run_out() shall be called at least once between any two qpa_thread_out loops (after pa->rpos is set), in order for the new qpa_thread_out loop to see the updated rpos. Setting pa->live to 0 does the trick. The next loop will have to wait for one qpa_run_out() invocation in order to get a non-zero pa->live and proceed. Signed-off-by: malc <[email protected]> Signed-off-by: Wu Fengguang <[email protected]>
fd5723b385557bc77b93dfe5ab591813407686c0
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/fd5723b385557bc77b93dfe5ab591813407686c0
2010-09-29 08:24:14+04:00
block-verify: fix 32-bit build Reported-by: Peter Lemenkov <[email protected]> Signed-off-by: Anthony Liguori <[email protected]>
687db4ed2ecd5fd74c94fbb420482823cca4ab7e
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/687db4ed2ecd5fd74c94fbb420482823cca4ab7e
2010-09-22 14:46:33-05:00
MCE: Relay UCR MCE to guest Port qemu-kvm's commit 4b62fff1101a7ad77553147717a8bd3bf79df7ef Author: Huang Ying <[email protected]> Date: Mon Sep 21 10:43:25 2009 +0800 MCE: Relay UCR MCE to guest UCR (uncorrected recovery) MCE is supported in recent Intel CPUs, where some hardware error such as some memory error can be reported without PCC (processor context corrupted). To recover from such MCE, the corresponding memory will be unmapped, and all processes accessing the memory will be killed via SIGBUS. For KVM, if QEMU/KVM is killed, all guest processes will be killed too. So we relay SIGBUS from host OS to guest system via a UCR MCE injection. Then guest OS can isolate corresponding memory and kill necessary guest processes only. SIGBUS sent to main thread (not VCPU threads) will be broadcast to all VCPU threads as UCR MCE. aliguori: fix build Signed-off-by: Marcelo Tosatti <[email protected]> Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Anthony Liguori <[email protected]>
c0532a76b407af4b276dc5a62d8178db59857ea6
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/c0532a76b407af4b276dc5a62d8178db59857ea6
2010-10-20 16:15:04-05:00
blkverify: Add block driver for verifying I/O The blkverify block driver makes investigating image format data corruption much easier. A raw image initialized with the same contents as the test image (e.g. qcow2 file) must be provided. The raw image mirrors read/write operations and is used to verify that data read from the test image is correct. See docs/blkverify.txt for more information. Signed-off-by: Stefan Hajnoczi <[email protected]> Signed-off-by: Kevin Wolf <[email protected]>
d9d334176c5dba23b47be07192f431b0c030928d
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/d9d334176c5dba23b47be07192f431b0c030928d
2010-09-21 17:00:53+02:00
block migration: propagate return value when bdrv_write() returns < 0 Currently block_load() doesn't check return value of bdrv_write(), and even the destination weren't prepared to execute block migration, it proceeds and guest boots on the target. This patch fix this issue. Signed-off-by: Yoshiaki Tamura <[email protected]> Signed-off-by: Kevin Wolf <[email protected]>
b02bea3a85cc939f09aa674a3f1e4f36d418c007
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/b02bea3a85cc939f09aa674a3f1e4f36d418c007
2010-07-26 13:39:39+02:00
virtio-pci: fix bus master bug setting on load The comment suggests we're checking for the driver in the ready state and bus master disabled, but the code is checking that it's not in the ready state. Signed-off-by: Alex Williamson <[email protected]> Found-by: Amit Shah <[email protected]> Signed-off-by: Anthony Liguori <[email protected]>
8a911107386b5c7a78a629f0fe29381cf0ea5f6f
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/8a911107386b5c7a78a629f0fe29381cf0ea5f6f
2010-06-22 15:15:51-05:00
vmdk: Use bdrv_(p)write_sync for metadata writes Use bdrv_(p)write_sync to ensure metadata integrity in case of a crash. Signed-off-by: Kevin Wolf <[email protected]>
b8852e87d9d113096342c3e0977266cda0fe9ee5
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/b8852e87d9d113096342c3e0977266cda0fe9ee5
2010-06-22 14:38:02+02:00
hpet: Coding style cleanups and some refactorings This moves the private HPET structures into the C module, simplifies some helper functions and fixes most coding style issues (biggest chunk was improper switch-case indention). No functional changes. Signed-off-by: Jan Kiszka <[email protected]> Reviewed-by: Juan Quintela <[email protected]> Signed-off-by: Blue Swirl <[email protected]>
27bb0b2d6f80f058bdb6fcc8fcdfa69b0c8a6d71
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/27bb0b2d6f80f058bdb6fcc8fcdfa69b0c8a6d71
2010-06-13 15:32:58+03:00
hpet: Catch out-of-bounds timer access Also prevent out-of-bounds write access to the timers but don't spam the host console if it triggers. Signed-off-by: Jan Kiszka <[email protected]> Signed-off-by: Blue Swirl <[email protected]>
6982d6647ea98544f76d5ef40ddc23115ff44a77
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/6982d6647ea98544f76d5ef40ddc23115ff44a77
2010-06-13 15:32:58+03:00
vvfat: Fix compilation with DEBUG defined gcc does not like passing a NULL where an int value is expected: block/vvfat.c: In function ‘checkpoint’: block/vvfat.c:2868: error: passing argument 2 of ‘remove_mapping’ makes integer from pointer without a cast Signed-off-by: Riccardo Magliocchetti <[email protected]> Signed-off-by: Kevin Wolf <[email protected]>
792b45b142e6b901e1de20886bc3369211582b8c
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/792b45b142e6b901e1de20886bc3369211582b8c
2010-05-21 11:49:19+02:00
qemu-img rebase: Fix output image corruption qemu-img rebase must always give clusters in the COW file priority over those in the backing file. As it failed to use number of non-allocated clusters but assumed the maximum, it was possible that allocated clusters were taken from the backing file instead, leading to a corrupted output image. Signed-off-by: Kevin Wolf <[email protected]>
cc60e327c0988a5e5288cf7bb78cd9848db800ab
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/cc60e327c0988a5e5288cf7bb78cd9848db800ab
2010-05-03 10:07:32+02:00
balloon: Fix overflow when reporting actual memory size Beginning with its introduction, the virtio balloon has had an overflow error that causes 'info balloon' to misreport the actual memory size when the balloon itself becomes larger than 4G. Use a cast when converting dev->actual from pages to kB to prevent overflows. Before: (qemu) info balloon balloon: actual=5120 (qemu) balloon 1025 (qemu) info balloon balloon: actual=1025 (qemu) balloon 1024 (qemu) info balloon balloon: actual=5120 After: (qemu) info balloon balloon: actual=5120 (qemu) balloon 1025 (qemu) info balloon balloon: actual=1025 (qemu) balloon 1024 (qemu) info balloon balloon: actual=1024 Signed-off-by: Adam Litke <[email protected]> Signed-off-by: Aurelien Jarno <[email protected]>
bd12ff9df78b0d04059a35c4a9d0a9337eb4999e
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/bd12ff9df78b0d04059a35c4a9d0a9337eb4999e
2010-03-27 13:53:34+01:00
Revert "usb-linux: remove unreachable default in switch statement" This reverts commit 3c9c706c3b66d838942aba53c0d3fdcdf06c7423. This breaks build (gcc 4.3.2): CC usb-linux.o cc1: warnings being treated as errors /src/qemu/usb-linux.c: In function 'usb_linux_update_endp_table': /src/qemu/usb-linux.c:759: error: 'type' may be used uninitialized in this function Reported-by: Blue Swirl <[email protected]> Signed-off-by: Anthony Liguori <[email protected]>
ddbda4323e2bdc7cb3925b0f4080f9eb836a09e8
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/ddbda4323e2bdc7cb3925b0f4080f9eb836a09e8
2010-03-19 15:27:27-05:00
savevm: Really verify if a drive supports snapshots Both bdrv_can_snapshot() and bdrv_has_snapshot() does not work as advertized. First issue: Their names implies different porpouses, but they do the same thing and have exactly the same code. Maybe copied and pasted and forgotten? bdrv_has_snapshot() is called in various places for actually checking if there is snapshots or not. Second issue: the way bdrv_can_snapshot() verifies if a block driver supports or not snapshots does not catch all cases. E.g.: a raw image. So when do_savevm() is called, first thing it does is to set a global BlockDriverState to save the VM memory state calling get_bs_snapshots(). static BlockDriverState *get_bs_snapshots(void) { BlockDriverState *bs; DriveInfo *dinfo; if (bs_snapshots) return bs_snapshots; QTAILQ_FOREACH(dinfo, &drives, next) { bs = dinfo->bdrv; if (bdrv_can_snapshot(bs)) goto ok; } return NULL; ok: bs_snapshots = bs; return bs; } bdrv_can_snapshot() may return a BlockDriverState that does not support snapshots and do_savevm() goes on. Later on in do_savevm(), we find: QTAILQ_FOREACH(dinfo, &drives, next) { bs1 = dinfo->bdrv; if (bdrv_has_snapshot(bs1)) { /* Write VM state size only to the image that contains the state */ sn->vm_state_size = (bs == bs1 ? vm_state_size : 0); ret = bdrv_snapshot_create(bs1, sn); if (ret < 0) { monitor_printf(mon, "Error while creating snapshot on '%s'\n", bdrv_get_device_name(bs1)); } } } bdrv_has_snapshot(bs1) is not checking if the device does support or has snapshots as explained above. Only in bdrv_snapshot_create() the device is actually checked for snapshot support. So, in cases where the first device supports snapshots, and the second does not, the snapshot on the first will happen anyways. I believe this is not a good behavior. It should be an all or nothing process. This patch addresses these issues by making bdrv_can_snapshot() actually do what it must do and enforces better tests to avoid errors in the middle of do_savevm(). bdrv_has_snapshot() is removed and replaced by bdrv_can_snapshot() where appropriate. bdrv_can_snapshot() was moved from savevm.c to block.c. It makes more sense to me. The loadvm_state() function was updated too to enforce that when loading a VM at least all writable devices must support snapshots too. Signed-off-by: Miguel Di Ciurcio Filho <[email protected]> Signed-off-by: Kevin Wolf <[email protected]>
feeee5aca765606818e00f5a19d19f141f4ae365
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/feeee5aca765606818e00f5a19d19f141f4ae365
2010-06-15 09:41:58+02:00
Fix SIGFPE for vnc display of width/height = 1 During boot, the screen gets resized to height 1 and a mouse click at this point will cause a division by zero when calculating the absolute pointer position from the pixel (x, y). Return a click in the middle of the screen instead in this case. Signed-off-by: Chris Webb <[email protected]> Signed-off-by: Anthony Liguori <[email protected]>
cc39a92cbfc80c70d2b83708a4c9b309c3126ac3
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/cc39a92cbfc80c70d2b83708a4c9b309c3126ac3
2010-03-17 10:42:11-05:00
Fix lost serial TX interrupts. Report receive overruns. o Implement receive overrun status. The FreeBSD uart driver relies on this status in it's probe routine to determine the size of the FIFO supported. o As per the 16550 spec, do not overwrite the RX FIFO on an RX overrun. o Do not allow TX or RX FIFO overruns to increment the data valid count beyond the size of the FIFO. o For reads of the IIR register, only clear the "TX holding register emtpy interrupt" if the read reports this interrupt. This is required by the specification and avoids losing TX interrupts when other, higher priority interrupts (usually RX) are reported first. Signed-off-by: Justin T. Gibbs <[email protected]> Signed-off-by: Anthony Liguori <[email protected]>
71e605f80313a632cc6714cde7bd240042dbdd95
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/71e605f80313a632cc6714cde7bd240042dbdd95
2010-02-22 16:16:16-06:00
Check rom_load_all() return value. Check rom_load_all() return value. Also don't make option rom loading failure fatal. Signed-off-by: Gerd Hoffmann <[email protected]> Signed-off-by: Anthony Liguori <[email protected]>
15ff7705444ab9663189946d6d648431e0649df1
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/15ff7705444ab9663189946d6d648431e0649df1
2009-12-18 11:26:27-06:00
qemu-img rebase This adds a rebase subcommand to qemu-img which allows to change the backing file of an image. In default mode, both the current and the new backing file need to exist, and after the rebase, the COW image is guaranteed to have the same guest visible content as before. To achieve this, old and new backing file are compared and, if necessary, data is copied from the old backing file into the COW image. With -u an unsafe mode is enabled that doesn't require the backing files to exist. It merely changes the backing file reference in the COW image. This is useful for renaming or moving the backing file. The user is responsible to make sure that the new backing file has no changes compared to the old one, or corruption may occur. Signed-off-by: Kevin Wolf <[email protected]> Signed-off-by: Anthony Liguori <[email protected]>
3e85c6fd714af70e6a26096a08ee02c98b12ad51
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/3e85c6fd714af70e6a26096a08ee02c98b12ad51
2010-01-13 17:14:15-06:00
qcow2: Add plausibility check for L1/L2 entries (Kevin Wolf) From: Kevin Wolf <[email protected]> All L1 and L2 entries must point at the start of a cluster. If there is some offset into the cluster, the entry is corrupted. Signed-off-by: Kevin Wolf <[email protected]> Signed-off-by: Anthony Liguori <[email protected]> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7217 c046a42c-6fe2-441c-8c8c-71466251a162
54c42368f57c02b0970bb32b4542f99b913908ba
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/54c42368f57c02b0970bb32b4542f99b913908ba
2009-04-21 23:12:02+00:00
ram: Remove SaveVM Version 2 support It don't work. It fails in this check if (qemu_get_be32(f) != last_ram_offset) With 512MB of ram, values were for me: v = 20c00000 last_ram_offset = 20840000 Last time that some code changed that was this one. commit 94a6b54fd6d2d3321066cb4db7abeeb417af9365 Implement dynamic guest ram allocation. (I.e. it has been broken since at least April) Going back to the previous commit, ram load correctly, but vga screen gets corrupted and ide don't load correctly. At this point I decide that removing support is the only viable thing. The last user of the ram_compress_* were RAM_SAVE_FLAG_FULL flag, but that flag was never ever been stored in an image. Mark the flag obsolete and remove the functions. Signed-off-by: Juan Quintela <[email protected]> Signed-off-by: Anthony Liguori <[email protected]>
94fb0909645de18481cc726ee0ec9b5afa861394
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/94fb0909645de18481cc726ee0ec9b5afa861394
2009-09-11 10:19:50-05:00
Add save/restore support to the LSI logic SCSI device model. This patch requires "Handle BH's queued by AIO completions in qemu_aio_flush()" to work reliably. The combination of those two patches survived 300+ migrations with heavy IO load running in the guest. Signed-off-by: Nolan Leake <nolan <at> sigbus.net> Signed-off-by: Anthony Liguori <[email protected]>
777aec7ac91b1306d77897aafc8097a87bf4a672
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/777aec7ac91b1306d77897aafc8097a87bf4a672
2009-07-22 10:58:47-05:00
Avoid name clashes with symbols that leak from system headers Signed-off-by: malc <[email protected]>
3efa9a672e4a5f7b2d35cf457ea277e997a0f8c6
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/3efa9a672e4a5f7b2d35cf457ea277e997a0f8c6
2009-07-18 13:16:51+04:00
vnc: rework VncState release workflow. Split socket closing and releasing of VncState into two steps. First close the socket and set the variable to -1 to indicate shutdown in progress. Do the actual release in a few places where we can be sure it doesn't cause trouble in form of use-after-free. Add some checks for a valid socket handle to make sure we don't try to use the closed socket. Signed-off-by: Gerd Hoffmann <[email protected]> Signed-off-by: Anthony Liguori <[email protected]>
198a0039c5fca224a77e9761e2350dd9cc102ad0
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/198a0039c5fca224a77e9761e2350dd9cc102ad0
2009-06-16 15:18:36-05:00
Eliminate --disable-gfx-check and make VNC default when SDL not available --disable-gfx-check predates VNC server support. It made sense back then because the only thing you could do without SDL was use -nographic mode or similar tricks. Since this is a very advanced mode of operation, gfx-check provided a good safety net for casual users. A casual user is very likely to use VNC to interact with a guest. In fact, it's often frustrating to install QEMU on a server and have to specify disable-gfx-check when you only want to use VNC. This patch eliminates disable-gfx-check and makes SDL behave like every other optional dependency. If SDL is not available, instead of failing ungracefully if no special options are specified, we default to -vnc localhost:0,to=99. When we do default to VNC, we also print a message to tell the user that we've done this include which port we're currently listening on. Signed-off-by: Anthony Liguori <[email protected]>
f92f8afebe038a4eae9ad90a140c9529f94919a6
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/f92f8afebe038a4eae9ad90a140c9529f94919a6
2009-05-21 08:47:48-05:00
Fix CVE-2008-0928 - insufficient block device address range checking (Anthony Liguori) Introduce a growable flag that's set by bdrv_file_open(). Block devices should never be growable, only files that are being used by block devices. I went through Fabrice's early comments about the patch that was first applied. While I disagree with that patch, I also disagree with Fabrice's suggestion. There's no good reason to do the checks in the block drivers themselves. It just increases the possibility that this bug could show up again. Since we're calling bdrv_getlength() to determine the length, we're giving the block drivers a chance to chime in and let us know what range is valid. Basically, this patch makes the BlockDriver API guarantee that all requests are within 0..bdrv_getlength() which to me seems like a Good Thing. What do others think? Signed-off-by: Anthony Liguori <[email protected]> Signed-off-by: Anthony Liguori <[email protected]> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6677 c046a42c-6fe2-441c-8c8c-71466251a162
71d0770c4cec9f1dc04f4dadcbf7fd6c335030a9
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/71d0770c4cec9f1dc04f4dadcbf7fd6c335030a9
2009-03-03 17:37:16+00:00
Change default werror semantics from "report" to "enospc" Practically speaking, "report" causes a lot of issues when encountering a host ENOSPC error. Switch to "enospc" as the default werror semantics. All host errors other than ENOSPC will be reported to the guest. ENOSPC will cause the VM to stop. Asynchronous notifications are needed to inform management tools that some action should be taken but stopping the VM is at least better than undefined behavior in the guest. Signed-off-by: Anthony Liguori <[email protected]> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6655 c046a42c-6fe2-441c-8c8c-71466251a162
cdad4bd8940c6fb1616733550663d006c611b2f4
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/cdad4bd8940c6fb1616733550663d006c611b2f4
2009-02-28 16:51:01+00:00
fix signed/unsigned overflows in SCSI disk (Rik van Riel) Sector numbers can overflow on a virtual scsi disk of over 1TB in size. Qemu's bdrv_read expects an int64_t, so fix the overflow by going to that data type. On large disks, we clip the capacity to 2TB instead of returning "capacity modulo 2TB". Turn sector_count into an unsigned to prevent a signed/unsigned overflow with SCSI transfers larger than 2TB. We're unlikely to ever hit this bug, but fixing it is just one line. Signed-off-by: Rik van Riel <[email protected]> Signed-off-by: Anthony Liguori <[email protected]> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6467 c046a42c-6fe2-441c-8c8c-71466251a162
e035b43d7c98b1509420d41b017abcdac0de0442
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/e035b43d7c98b1509420d41b017abcdac0de0442
2009-01-28 21:58:22+00:00
Change order of metadata update to prevent loosing guest data because of unexpected exit (Gleb Natapov) Currently the order is this (during cow since it's the interesting case): 1. Decrement refcount of old clusters 2. Increment refcount for newly allocated clusters 3. Copy content of old sectors that will not be rewritten 4. Update L2 table with pointers to new clusters 5. Write guest data into new clusters (asynchronously) There are several problems with this order. The first one is that if qemu crashes (or killed or host reboots) after new clusters are linked into L2 table but before user data is written there, then on the next reboot guest will find neither old data nor new one in those sectors and this is not what gust expects even when journaling file system is in use. The other problem is that if qemu is killed between steps 1 and 4 then refcount of old cluster will be incorrect and may cause snapshot corruption. The patch change the order to be like this: 1. Increment refcount for newly allocated clusters 2. Write guest data into new clusters (asynchronously) 3. Copy content of old sectors that were not rewritten 4. Update L2 table with pointers to new clusters 5. Decrement refcount of old clusters Unexpected crash may cause cluster leakage, but guest data should be safe. Signed-off-by: Gleb Natapov <[email protected]> Signed-off-by: Anthony Liguori <[email protected]> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5861 c046a42c-6fe2-441c-8c8c-71466251a162
e976c6a1e40ad74d616a186d3b48b0ad8f5eb970
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/e976c6a1e40ad74d616a186d3b48b0ad8f5eb970
2008-12-02 20:14:05+00:00
Don't try to select on an invalid VNC socket when init fails. Otherwise we get a segfault. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5840 c046a42c-6fe2-441c-8c8c-71466251a162
d0513623aee6bca7b6458a12fc652ac028f03753
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/d0513623aee6bca7b6458a12fc652ac028f03753
2008-12-01 01:48:36+00:00
SH4: SCI improvement This patch simply implement one register of SH4's SCI := Serial Communication Interface. R2D evaluation board uses SCI for SPI connection. So, Linux kernel for R2D with default configuration causes a QEMU assertion failure when it initializes SPI driver. This patch avoids it and reduces the kernel config modification work for QEMU. Completing SCI implementation task is left. Other board support is desirable to confirm this task, which uses SCI for a serial terminal. (Shin-ichiro KAWASAKI) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5939 c046a42c-6fe2-441c-8c8c-71466251a162
d1f193b0edb919ab109f88c53469ec9073f2e142
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/d1f193b0edb919ab109f88c53469ec9073f2e142
2008-12-07 22:46:49+00:00
Fix alarm_timer race with select - v3 (Jan Kiszka) Changing the default IO timeout to 5 s (#5578) made a race visible between the alarm_timer and select() in main_loop_wait(): If the timer fired before select was able to block, the full select() timeout could have been applied instead of returning immediately. Since #5578, this causes heavy problems to the Musicpal board emulation with stalls up to 5 s, but also with some older Linux guest kernels. The following patch introduces a pipe that is written to by host_alarm_handler and select()'ed in main_loop_wait(). This avoids prevents that select() blocks though a timer has fired and waits for processing. Signed-off-by: Jan Kiszka <[email protected]> Signed-off-by: Anthony Liguori <[email protected]> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5633 c046a42c-6fe2-441c-8c8c-71466251a162
c96f1a48d229a6080fecce4ea20bc64cabe79e32
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/c96f1a48d229a6080fecce4ea20bc64cabe79e32
2008-11-05 20:29:45+00:00
Make compatfd fallback more robust Be more friendly when signalfd() fails, and also add configure checks to detect that syscall(SYS_signalfd) actually works. malc pointed out that some installs do not have /usr/include/linux headers that are in sync with the glibc headers so why SYS_signalfd is defined, it's #defined to _NR_signalfd which is not defined in the /usr/include/linux header. While this is a distro bug, it doesn't hurt to do a more thorough job in detection. Signed-off-by: Anthony Liguori <[email protected]> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5334 c046a42c-6fe2-441c-8c8c-71466251a162
27463101f15bee17d2f46642c48a7373bc6c595e
qemu
devign
1
https://github.com/qemu/qemu
https://github.com/qemu/qemu/commit/27463101f15bee17d2f46642c48a7373bc6c595e
2008-09-27 20:58:43+00:00