- 12 10月, 2010 16 次提交
-
-
由 Anthony Liguori 提交于
This reverts commit 79368c81. Conflicts: block.c I haven't been able to come up with a solution yet for the corruption caused by unaligned requests from the IDE disk so revert until a solution can be written. Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 8b33d9ee)
-
由 Avi Kivity 提交于
QEMUFileBuffered stops writing when the underlying QEMUFile is not ready, and tells its producer so. However, when the underlying QEMUFile becomes ready, it neglects to pass that information along, resulting in stoppage of all data until the next tick (a tenths of a second). Usually this doesn't matter, because most QEMUFiles used with QEMUFileBuffered are almost always ready, but in the case of exec: migration this is not true, due to the small pipe buffers used to connect to the target process. The result is very slow migration. Fix by detecting the readiness notification and propagating it. The detection is a little ugly since QEMUFile overloads put_buffer() to send it, but that's the suject for a different patch. Signed-off-by: NAvi Kivity <avi@redhat.com> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 5e77aaa0)
-
由 Artyom Tarasenko 提交于
According to scc_escc_um.pdf: - Reset Highest IUS must update irq status to allow processing of the next priority interrupt. - rx interrupt has always higher priority than tx on same channel The documentation only explicitly says that Reset Highest IUS command (0x38) clears IUS bits, not that it clears the corresponding interrupt too, so don't clear interrupts on this command. The patch allows SunOS 4.1.4 to use the serial ports Signed-off-by: NArtyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com> (cherry picked from commit 9fc391f8)
-
由 Artyom Tarasenko 提交于
The timer #0 is the system timer, so the timer #num_cpu is the timer of the last CPU, and it must be initialized in slavio_timer_reset. Don't mark non-existing timers as running. Signed-off-by: NArtyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com> (cherry picked from commit 5933e8a9)
-
由 Anthony Liguori 提交于
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Anthony Liguori 提交于
-
由 Anthony Liguori 提交于
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Avi Kivity 提交于
stat() fields can be more or less anything depending on configuration, cast explicitly to uint64_t to avoid printf() format mismatches. Signed-off-by: NAvi Kivity <avi@redhat.com> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com> (cherry picked from commit ad0a4ac1)
-
由 Jes Sorensen 提交于
There is no need to check for dest < 0 or vector >= 0 as both are uint16_t. This should fix problems with broken build with aggressive compiler flags. Reported by Xudong Hao <xudong.hao@intel.com> Signed-off-by: NJes Sorensen <Jes.Sorensen@redhat.com> Acked-by: NCam Macdonell <cam@cs.ualberta.ca> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com> (cherry picked from commit 1b27d7a1)
-
由 Cam Macdonell 提交于
Signed-off-by: NCam Macdonell <cam@cs.ualberta.ca> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com> (cherry picked from commit 3dcbf8f9)
-
由 Cam Macdonell 提交于
Signed-off-by: NCam Macdonell <cam@cs.ualberta.ca> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com> (cherry picked from commit 1fd74012)
-
由 Cam Macdonell 提交于
resend for bug fix related to removal of irqfd Support an inter-vm shared memory device that maps a shared-memory object as a PCI device in the guest. This patch also supports interrupts between guest by communicating over a unix domain socket. This patch applies to the qemu-kvm repository. -device ivshmem,size=<size in format accepted by -m>[,shm=<shm name>] Interrupts are supported between multiple VMs by using a shared memory server by using a chardev socket. -device ivshmem,size=<size in format accepted by -m>[,shm=<shm name>] [,chardev=<id>][,msi=on][,ioeventfd=on][,vectors=n][,role=peer|master] -chardev socket,path=<path>,id=<id> The shared memory server, sample programs and init scripts are in a git repo here: www.gitorious.org/nahanni Signed-off-by: NCam Macdonell <cam@cs.ualberta.ca> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 6cbf4c8c)
-
由 Cam Macdonell 提交于
A non-migratable device should be removed before migration and re-added after. Signed-off-by: NCam Macdonell <cam@cs.ualberta.ca> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 24312968)
-
由 Cam Macdonell 提交于
Signed-off-by: NCam Macdonell <cam@cs.ualberta.ca> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 44f1a3d8)
-
由 Cam Macdonell 提交于
Signed-off-by: NCam Macdonell <cam@cs.ualberta.ca> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> (cherry picked from commit b6828931)
-
由 Cam Macdonell 提交于
Provide a function to add an allocated region of memory to the qemu RAM. This patch is copied from Marcelo's qemu_ram_map() in qemu-kvm and given the clearer name qemu_ram_alloc_from_ptr(). Signed-off-by: NCam Macdonell <cam@cs.ualberta.ca> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com> (cherry picked from commit 84b89d78)
-
- 13 9月, 2010 13 次提交
-
-
由 Kevin Wolf 提交于
The qcow file used for write support in vvfat is a temporary file, so we can use cache=unsafe there. Without this, write support is just too slow to be of any use. Signed-off-by: NKevin Wolf <mail@kevin-wolf.de> (cherry picked from commit 35ccd8aed64727dbefa1b274a8000b46318bfea1)
-
由 Kevin Wolf 提交于
Allocation and deallocation of bs->opaque is not in the control of a block driver. Therefore it should not set bs->opaque to a data structure used by another bs, or closing the image will lead to a double free. Signed-off-by: NKevin Wolf <mail@kevin-wolf.de> (cherry picked from commit 0af1e52e93bf5da63b15f1f9596dd4c076da07dc)
-
由 Kevin Wolf 提交于
vvfat tries to set the readonly flag in its open function, but nowadays this is overwritted with the readonly=... command line option. Check in bdrv_write if the vvfat was opened read-only and return an error in this case. Without this check, vvfat tries to access the qcow bs, which is NULL without enabled write support. Signed-off-by: NKevin Wolf <mail@kevin-wolf.de> (cherry picked from commit bfd0049440f53745d31eb93c208f0f3ab6308027)
-
由 Kevin Wolf 提交于
When a new cluster was allocated, we only need a flush after the write to the L2 table if it was a COW and we need to decrease the refcounts of the old clusters. Signed-off-by: NKevin Wolf <kwolf@redhat.com> (cherry picked from commit 7ec5e6a4)
-
由 Kevin Wolf 提交于
BDRV_O_CACHE_MASK should have been extended when cache=unsafe introduced a new flag BDRV_O_NO_FLUSH. There are currently no users that would change their behaviour because of this, but let's clean it up before things break. Signed-off-by: NKevin Wolf <kwolf@redhat.com> (cherry picked from commit ceb25e5c)
-
由 Kevin Wolf 提交于
If qemu-img crashes during the conversion, the user will throw away the broken output file anyway and start over. So no need to be too cautious. Signed-off-by: NKevin Wolf <kwolf@redhat.com> (cherry picked from commit 1bd8e175)
-
由 Kevin Wolf 提交于
On Linux, we have code to detect CD-ROMs using an ioctl. We shouldn't lose anything but false positives by removing the check for a /dev/cd* path. Signed-off-by: NKevin Wolf <kwolf@redhat.com> (cherry picked from commit 897804d6)
-
由 Bernhard Kohl 提交于
The DBD bit does not work as expected. SCSI-Spec: http://ldkelley.com/SCSI2/SCSI2/SCSI2-08.html#8.2.10 "A disable block descriptors (DBD) bit of zero indicates that the target may return zero or more block descriptors in the returned MODE SENSE data (see 8.3.3), at the target's discretion. A DBD bit of one specifies that the target shall not return any block descriptors in the returned MODE SENSE data." Signed-off-by: NBernhard Kohl <bernhard.kohl@nsn.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com> (cherry picked from commit 333d50fe)
-
由 Bernhard Kohl 提交于
SCSI-Spec: http://ldkelley.com/SCSI2/SCSI2/SCSI2-08.html#8.2.10 "An initiator may request any one or all of the supported mode pages from a target. If an initiator issues a MODE SENSE command with a page code value not implemented by the target, the target shall return CHECK CONDITION status and shall set the sense key to ILLEGAL REQUEST and the additional sense code to INVALID FIELD IN CDB." Signed-off-by: NBernhard Kohl <bernhard.kohl@nsn.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com> (cherry picked from commit a9c17b2b)
-
由 Bernhard Kohl 提交于
The block descriptor contains the number of blocks, not the highest LBA. Real hard disks return 0 if the number of blocks exceed the maximum 0xFFFFFF. SCSI-Spec: http://ldkelley.com/SCSI2/SCSI2/SCSI2-08.html#8.3.3 "The number of blocks field specifies the number of logical blocks on the medium to which the density code and block length fields apply. A value of zero indicates that all of the remaining logical blocks of the logical unit shall have the medium characteristics specified." Signed-off-by: NBernhard Kohl <bernhard.kohl@nsn.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com> (cherry picked from commit 2488b740)
-
由 Bernhard Kohl 提交于
The page control (PC) field defines the type of mode parameter values to be returned in the mode pages: PC=0 : Current values PC=1 : Changeable values PC=2 : Default values PC=3 : Saved values The current implementation always returns the same type of parameters. This is OK for Current and Default values as we don't support changes to be done by the MODE SELECT command. For Saved values the following applies (implemented by this patch): "A PC field value of 3h requests that the target return the saved values of the mode parameters. Implementation of saved page parameters is optional. Mode parameters not supported by the target shall be set to zero. If saved values are not implemented, the command shall be terminated with CHECK CONDITION status, the sense key set to ILLEGAL REQUEST and the additional sense code set to SAVING PARAMETERS NOT SUPPORTED." For Changeable values the following applies (implemented by this patch): "A PC field value of 1h requests that the target return a mask denoting those mode parameters that are changeable. In the mask, the fields of the mode parameters that are changeable shall be set to all one bits and the fields of the mode parameters that are non-changeable (i.e. defined by the target) shall be set to all zero bits." In newer versions of the SCSI-2 spec the following clause was added. "If the logical unit does not implement changeable parameters mode pages and the device server receives a MODE SENSE command with 01b in the PC field, then the command shall be terminated with CHECK CONDITION status, with the sense key set to ILLEGAL REQUEST, and the additional sense code set to INVALID FIELD IN CDB." This was not yet included in the SCSI-2 Working Drafts from 1986-1993. I assume that the variant to return CHECK CONDITION for PC=1 is not widely implemented by real devices. I have a legacy OS which fails, if MODE_SENSE returns non GOOD for PC=1. So for highest compatibility I implemented the former variant with this patch. The last Working Draft X3T9.2 Rev. 10L 7-SEP-93 can be found here: http://ldkelley.com/SCSI2/SCSI2/SCSI2-08.html#8.2.10 In mode_sense_page() this patch also avoids multiple hard coded definitions of the same mode page length. Instead I use the varable p[1]. In fact the returned length of the mode pages 4 and 5 were wrong (2 bytes less). Signed-off-by: NBernhard Kohl <bernhard.kohl@nsn.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com> (cherry picked from commit 282ab04e)
-
由 Bernhard Kohl 提交于
The header for the MODE SENSE(10) command is 8 bytes long. Signed-off-by: NBernhard Kohl <bernhard.kohl@nsn.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com> (cherry picked from commit ce512ee1)
-
由 Bernhard Kohl 提交于
The MODE DATA LENGTH field indicates the length in bytes of the following data that is available to be transferred. The mode data length does not include the number of bytes in the MODE DATA LENGTH field. Signed-off-by: NBernhard Kohl <bernhard.kohl@nsn.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com> (cherry picked from commit 78e70c30)
-
- 31 8月, 2010 7 次提交
-
-
由 Anthony Liguori 提交于
Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Andrew de Quincey 提交于
Set the async_context_id field when queuing an async ioctl call Signed-off-by: NAndrew de Quincey <adq@lidskialf.net> Signed-off-by: NKevin Wolf <kwolf@redhat.com> (cherry picked from commit 34cf0081)
-
由 Loïc Minier 提交于
Signed-off-by: NLoïc Minier <loic.minier@linaro.org> Signed-off-by: NKevin Wolf <kwolf@redhat.com> (cherry picked from commit 2aa326be)
-
由 Kevin Wolf 提交于
We never write to a backing file, so opening rw is useless. It just means that you can't rebase on top of a file for which you don't have write permissions. Signed-off-by: NKevin Wolf <kwolf@redhat.com> (cherry picked from commit cdbae851)
-
由 Kevin Wolf 提交于
Arguably we should re-open the backing file with the backing file format and not with the format of the snapshot image. Signed-off-by: NKevin Wolf <kwolf@redhat.com> (cherry picked from commit ee181196) Conflicts: block.c Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Kevin Wolf 提交于
in_sg[].iovec and out_sg[].ioved are pointer to (source) host memory and therefore invalid after migration. When loading the device state we must create a new mapping on the destination host. Signed-off-by: NKevin Wolf <kwolf@redhat.com> (cherry picked from commit b6a4805b)
-
由 Kevin Wolf 提交于
Separate the mapping of requests to host memory from the descriptor iteration. The next patch will make use of it in a different context. Signed-off-by: NKevin Wolf <kwolf@redhat.com> (cherry picked from commit 42fb2e07)
-
- 03 8月, 2010 3 次提交
-
-
由 Andrea Arcangeli 提交于
The reason for not actually canceling the I/O is because with virtualization and lots of VM running, a guest fs may mistake a overload of the host, as an IDE timeout. So rather than canceling the I/O, it's safer to wait I/O completion and simulate that the I/O has completed just before the io cancellation was requested by the guest. This way if ntfs or an app writes data without checking for -EIO retval, and it thinks the write has succeeded, it's less likely to run into troubles. Similar issues for reads. Furthermore because the DMA operation is splitted into many synchronous aio_read/write if there's more than one entry in the SG table, without this patch the DMA would be cancelled in the middle, something we've no idea if it happens on real hardware too or not. Overall this seems a great risk for zero gain. This approach is sure safer than previous code given we can't pretend all guest fs code out there to check for errors and reply the DMA if it was completed partially, given a timeout would never materialize on a real harddisk unless there are defective blocks (and defective blocks are practically only an issue for reads never for writes in any recent hardware as writing to blocks is the way to fix them) or the harddisk breaks as a whole. Signed-off-by: NIzik Eidus <ieidus@redhat.com> Signed-off-by: NAndrea Arcangeli <aarcange@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com> (cherry picked from commit 953844d1)
-
由 Markus Armbruster 提交于
bdrv_eject() gets called when a device model opens or closes the tray. If the block driver implements method bdrv_eject(), that method gets called. Drivers host_cdrom implements it, and it opens and closes the physical tray, and nothing else. When a device model opens, then closes the tray, media changes only if the user actively changes the physical media while the tray is open. This is matches how physical hardware behaves. If the block driver doesn't implement method bdrv_eject(), we do something quite different: opening the tray severs the connection to the image by calling bdrv_close(), and closing the tray does nothing. When the device model opens, then closes the tray, media is gone, unless the user actively inserts another one while the tray is open, with a suitable change command in the monitor. This isn't how physical hardware behaves. Rather inconvenient when programs "helpfully" eject media to give you a chance to change it. The way bdrv_eject() behaves here turns that chance into a must, which is not what these programs or their users expect. Change the default action not to call bdrv_close(). Instead, note the tray status in new BlockDriverState member tray_open. Use it in bdrv_is_inserted(). Arguably, the device models should keep track of tray status themselves. But this is less invasive. Signed-off-by: NMarkus Armbruster <armbru@redhat.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com> (cherry picked from commit 4be9762a)
-
由 Kevin Wolf 提交于
Assuming that any image on a block device is not properly zero-initialized is actually wrong: Only raw images have this problem. Any other image format shouldn't care about it, they initialize everything properly themselves. Signed-off-by: NKevin Wolf <kwolf@redhat.com> (cherry picked from commit 336c1c12)
-
- 31 7月, 2010 1 次提交
-
-
由 Alex Williamson 提交于
Forgot to check for and free these. Found-by: NZachary Amsden <zamsden@redhat.com> Signed-off-by: NAlex Williamson <alex.williamson@redhat.com> Signed-off-by: NAurelien Jarno <aurelien@aurel32.net> (cherry picked from commit 69e58af9)
-