- 25 4月, 2012 7 次提交
-
-
由 Jason Wang 提交于
According to the spec: "When set to 1b by software, it causes an Interrupt to be asserted to indicate the end of an MDI cycle." We need check the Interrupt Enable bit and raise irq only when it is set. Signed-off-by: NJason Wang <jasowang@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Jason Wang 提交于
This would be used be following patches. Signed-off-by: NJason Wang <jasowang@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Stefan Weil 提交于
Commit 7fc8d918 removed code from eepro100.c and replaced it by different code: the code in net.c returns bits 31...26, but eepro100 needs bits 7...2. This patch partially reverts 7fc8d918. To avoid future problems, I renamed the function and changed the comment. Signed-off-by: NStefan Weil <sw@weilnetz.de> Acked-by: NJason Wang <jasowang@redhat.com> Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Michael S. Tsirkin 提交于
virtio has the equivalent of: if (vq->last_avail_index != vring_avail_idx(vq)) { read descriptor head at vq->last_avail_index; } In theory, processor can reorder descriptor head read to happen speculatively before the index read. this would trigger the following race: host descriptor head read <- reads invalid head from ring guest writes valid descriptor head guest writes avail index host avail index read <- observes valid index as a result host will use an invalid head value. This was not observed in the field by me but after the experience with the previous two races I think it is prudent to address this theoretical race condition. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Michael S. Tsirkin 提交于
This fixes an issue dual to the one fixed by patch 'virtio: add missing mb() on notification' and applies on top. In this case, to enable vq kick to exit to host, qemu writes out used flag then reads the avail index. if these are reordered we get a race: host avail index read: ring is empty guest avail index write guest flag read: exit disabled host used flag write: enable exit which results in a lost exit: host will never be notified about the avail index update. Again, happens in the field but only seems to trigger on some specific hardware. Insert an smp_mb barrier operation to ensure the correct ordering. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Michael S. Tsirkin 提交于
During normal operation, virtio first writes a used index and then checks whether it should interrupt the guest by reading guest avail index/flag values. Guest does the reverse: writes the index/flag, then checks the used ring. The ordering is important: if host avail flag read bypasses the used index write, we could in effect get this timing: host avail flag read guest enable interrupts: avail flag write guest check used ring: ring is empty host used index write which results in a lost interrupt: guest will never be notified about the used ring update. This actually can happen when using kvm with an io thread, such that the guest vcpu and qemu run on different host cpus, and this has actually been observed in the field (but only seems to trigger on very specific processor types) with userspace virtio: vhost has the necessary smp_mb() in place to prevent the regordering, so the same workload stalls forever waiting for an interrupt with vhost=off but works fine with vhost=on. Insert an smp_mb barrier operation in userspace virtio to ensure the correct ordering. Applying this patch fixed the race condition we have observed. Tested on x86_64. I checked the code generated by the new macro for i386 and ppc but didn't run virtio. Note: mb could in theory be implemented by __sync_synchronize, but this would make us hit old GCC bugs. Besides old GCC not implementing __sync_synchronize at all, there were bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36793 in this functionality as recently as in 4.3. As we need asm for rmb,wmb anyway, it's just as well to use it for mb. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
由 Michael S. Tsirkin 提交于
Make it easier to reuse this function. Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
-
- 24 4月, 2012 3 次提交
-
-
由 Peter Chubb 提交于
If a guest sets very short timeouts, and asks for a timer to be reloaded on timeout, QEMU can go to 100%CPU utilisation and become unresponsive, as it is spending all its time generating timeout interrupts. On real hardware this doesn't matter, as the interrupts are just coalesced, and the effect is to have the interrupt asserted all the time. This patch is a band-aid, that prevents timeouts less than 10 microseconds from being set. 10 microseconds is a limit that was determined empirically on a variety of machines as the shortest that allowed QEMU to pick up a control-a c sequence to get at the monitor. Reported-by: NAnna Lyons <anna.lyons@nicta.com.au> Signed-off-by: NPeter Chubb <peter.chubb@nicta.com.au> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Andreas Färber 提交于
Specify the root to search from as argument. This avoids hardcoding "/machine" in some places and makes it more flexible. Signed-off-by: NAndreas Färber <afaerber@suse.de> Cc: Paolo Bonzini <pbonzini@redhat.com> Cc: Anthony Liguori <anthony@codemonkey.ws> Signed-off-by: NAnthony Liguori <aliguori@us.ibm.com>
-
由 Artyom Tarasenko 提交于
Fix BCD mask for date. The most visible effect of this patch is Solaris 2.5.1 doesn't hang at boot if the day of month is >21. Signed-off-by: NArtyom Tarasenko <atar4qemu@gmail.com> Signed-off-by: NBlue Swirl <blauwirbel@gmail.com>
-
- 20 4月, 2012 7 次提交
-
-
由 Eric Benard 提交于
- add support for the 64MB NOR CFI01 flash available at 0x34000000 on the versatilepb board http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0225d/BBAJIHEC.html - tested with barebox bootloader Signed-off-by: NEric Bénard <eric@eukrea.com> Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Peter Maydell 提交于
On reset of the mpcore timer/watchdog block we need to delete the qemu_timer in case it was running. Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Oskar Andero 提交于
Add ds1338 rtc attached on i2c. Signed-off-by: NOskar Andero <oskar.andero@gmail.com> Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Oskar Andero 提交于
The versatile i2c controller implementation was separated to its own file called versatile_i2c.c. This is done as a preparation for adding i2c support to the versatilepb board. Signed-off-by: NOskar Andero <oskar.andero@gmail.com> Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
-
由 Stefan Weil 提交于
This was reported by https://bugs.launchpad.net/qemu/+bug/984476. I also changed the case for 'error'. Signed-off-by: NStefan Weil <sw@weilnetz.de> Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
由 Eric Bénard 提交于
Signed-off-by: NEric Bénard <eric@eukrea.com> Reviewed-by: NPeter Maydell <peter.maydell@linaro.org> Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
由 Stefan Weil 提交于
val is an uint64_t, therefore %d was not correct. Signed-off-by: NStefan Weil <sw@weilnetz.de> Acked-by: NGerd Hoffmann <kraxel@redhat.com> Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
-
- 19 4月, 2012 18 次提交
-
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Ronnie Sahlberg 提交于
Signed-off-by: NRonnie Sahlberg <ronniesahlberg@gmail.com> [Actually, we should report it only if discard_granularity is nonzero. Older SBC drafts assigned 0 to thin provisioning and 1 to thick (resource-provisioned, they call it). Newer drafts assign respectively 1 and 2 - Paolo] Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Ronnie Sahlberg 提交于
This was added in SBC r26 in place of the reserved bits that were present up to that version. It is the same as WRITE_SAME_16 as far as QEMU is concerned. Signed-off-by: NRonnie Sahlberg <ronniesahlberg@gmail.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Make DBD a boolean value, and force device-specific parameter to zero. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
To force unit access on reads, flush the cache *before* doing the read. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Also DMA data from the host, to avoid that the host reports an underrun. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Stefan Hajnoczi 提交于
The IDE PIO write sector code path uses bdrv_write() and hence can make the guest unresponsive while the I/O request is in progress. This patch converts ide_sector_write() to use bdrv_aio_writev() by using the BUSY_STAT bit to tell the guest that the request is in progress. Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NZhi Yong Wu <wuzhy@linux.vnet.ibm.com> Tested-by: NRichard Davies <richard@arachsys.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Stefan Hajnoczi 提交于
The IDE PIO interface currently uses bdrv_read() to perform reads synchronously. Synchronous I/O in the vcpu thread is bad because it prevents the guest from executing code - it makes the guest unresponsive. This patch converts IDE PIO to use bdrv_aio_readv(). We simply need to use the BUSY_STAT status so the guest knows to wait while we are busy. The only external user of ide_sector_read() is restart behavior on I/O errors and it is not affected by this change. We still need to restart I/O in the same way. Migration is also unaffected if I understand the code correctly. We continue to use the same transfer function and the BUSY_STAT status should never be migrated since we flush I/O before migrating device state. Signed-off-by: NStefan Hajnoczi <stefanha@linux.vnet.ibm.com> Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com> Reviewed-by: NZhi Yong Wu <wuzhy@linux.vnet.ibm.com> Tested-by: NRichard Davies <richard@arachsys.com> Signed-off-by: NKevin Wolf <kwolf@redhat.com>
-
由 Paolo Bonzini 提交于
To force unit access, add a flush operation after the actual write. WRITE AND VERIFY commands always flush according to SBC, so do it even though we do not perform the reread. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
First scsi_flush_complete, like scsi_dma_complete, is always called with an active AIOCB. Second, always test for "ret < 0" to check for errors. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Adding multiqueue is as simple as creating more than one virtqueues, and saving the queue number for each request. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
Serializing virtio-scsi requests needs a simple way to get from a VirtQueue to the number of the queue. The virtio_queue_get_id provides this. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
In order to restore requests correctly from a multitude of virtqueues, we need to store the id of the request queue that each request came from. Do this even for single-queue, by storing a hard-coded zero, to simplify future implementation of multiqueue. Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
由 Paolo Bonzini 提交于
scsibus_get_dev_path is leaking id if it is not NULL. Fix it. Reported-by: NLaszlo Ersek <lersek@redhat.com> Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
-
- 18 4月, 2012 3 次提交
-
-
由 Alon Levy 提交于
Notify any listeners such as vnc that the displaysurface has been changed, otherwise they will segfault when first accessing the freed old displaysurface data. Signed-off-by: NAlon Levy <alevy@redhat.com> Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Alon Levy 提交于
The addition of those values caused a regression where not specifying any value for the vram bar size would result in a 4096 _byte_ surface area. This is ok for the windows driver but causes the X driver to be unusable. Also, it's a regression. This patch returns the default behavior of having a 64 megabyte vram BAR. Signed-off-by: NAlon Levy <alevy@redhat.com> Signed-off-by: NGerd Hoffmann <kraxel@redhat.com>
-
由 Stefano Stabellini 提交于
xc_hvm_inject_msi is only available on Xen >= 4.2: add a dummy compatibility function for Xen < 4.2. Also enable msi support only on Xen >= 4.2. Signed-off-by: NStefano Stabellini <stefano.stabellini@eu.citrix.com> Acked-by: NAnthony PERARD <anthony.perard@citrix.com>
-
- 17 4月, 2012 2 次提交
-
-
由 Marc-André Lureau 提交于
Combine output volume with Master and PCM registers values. Use default values in mixer_reset (). Set volume on post-load to update backend values. v4,v5: - fix some code style Signed-off-by: NMarc-Andr? Lureau <marcandre.lureau@redhat.com> Signed-off-by: Nmalc <av1474@comtv.ru>
-
由 Marc-André Lureau 提交于
It's a case by case (see Table 66. AC ?97 Baseline Audio Register Map) Signed-off-by: NMarc-Andr? Lureau <marcandre.lureau@redhat.com> Signed-off-by: Nmalc <av1474@comtv.ru>
-