* [Qemu-devel] [PULL 0/2] vfio pull for QEMU 2.0
@ 2014-03-25 18:30 Alex Williamson
2014-03-25 18:30 ` [Qemu-devel] [PULL 1/2] vfio: Correction in vfio_rom_read when attempting rom loading Alex Williamson
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Alex Williamson @ 2014-03-25 18:30 UTC (permalink / raw)
To: peter.maydell, aliguori; +Cc: qemu-devel
Peter & Anthony,
The following changes since commit 839a5547574e57cce62f49bfc50fe1f04b00589a:
Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20140324' into staging (2014-03-24 19:25:09 +0000)
are available in the git repository at:
git://github.com/awilliam/qemu-vfio.git tags/vfio-pci-for-qemu-20140325.0
for you to fetch changes up to 4e505ddd9af1d5810378a4e7b851f788b1c075ba:
vfio: Cosmetic error reporting fixes (2014-03-25 12:08:52 -0600)
----------------------------------------------------------------
A couple trivial fixes for QEMU 2.0:
- Coding correction that allowed attempts to read the device
ROM after we'd already marked it failed (Bandan)
- Cosmetic error reporting fixes to remove unnecessary new lines
and fix a cut-n-paste wording error (Alex)
----------------------------------------------------------------
Alex Williamson (1):
vfio: Cosmetic error reporting fixes
Bandan Das (1):
vfio: Correction in vfio_rom_read when attempting rom loading
hw/misc/vfio.c | 33 +++++++++++++++------------------
1 file changed, 15 insertions(+), 18 deletions(-)
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [PULL 1/2] vfio: Correction in vfio_rom_read when attempting rom loading
2014-03-25 18:30 [Qemu-devel] [PULL 0/2] vfio pull for QEMU 2.0 Alex Williamson
@ 2014-03-25 18:30 ` Alex Williamson
2014-03-25 18:30 ` [Qemu-devel] [PULL 2/2] vfio: Cosmetic error reporting fixes Alex Williamson
2014-03-25 19:10 ` [Qemu-devel] [PULL 0/2] vfio pull for QEMU 2.0 Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Alex Williamson @ 2014-03-25 18:30 UTC (permalink / raw)
To: peter.maydell, aliguori; +Cc: Bandan Das, qemu-devel
From: Bandan Das <bsd@redhat.com>
commit e638073c569e801ce9de added a flag to track whether
a previous rom read had failed. Accidentally, the code
ended up adding vfio_load_option_rom twice. (Thanks to Alex
for spotting it)
Signed-off-by: Bandan Das <bsd@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---
hw/misc/vfio.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c
index c2c688c..7147430 100644
--- a/hw/misc/vfio.c
+++ b/hw/misc/vfio.c
@@ -1192,11 +1192,8 @@ static uint64_t vfio_rom_read(void *opaque, hwaddr addr, unsigned size)
uint64_t val = ((uint64_t)1 << (size * 8)) - 1;
/* Load the ROM lazily when the guest tries to read it */
- if (unlikely(!vdev->rom)) {
+ if (unlikely(!vdev->rom && !vdev->rom_read_failed)) {
vfio_pci_load_rom(vdev);
- if (unlikely(!vdev->rom && !vdev->rom_read_failed)) {
- vfio_pci_load_rom(vdev);
- }
}
memcpy(&val, vdev->rom + addr,
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PULL 2/2] vfio: Cosmetic error reporting fixes
2014-03-25 18:30 [Qemu-devel] [PULL 0/2] vfio pull for QEMU 2.0 Alex Williamson
2014-03-25 18:30 ` [Qemu-devel] [PULL 1/2] vfio: Correction in vfio_rom_read when attempting rom loading Alex Williamson
@ 2014-03-25 18:30 ` Alex Williamson
2014-03-25 19:10 ` [Qemu-devel] [PULL 0/2] vfio pull for QEMU 2.0 Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Alex Williamson @ 2014-03-25 18:30 UTC (permalink / raw)
To: peter.maydell, aliguori; +Cc: qemu-devel
* Remove terminating newlines from hw_error() and error_report() calls
* Fix cut-n-paste error in text (s/to/from/)
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
---
hw/misc/vfio.c | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
diff --git a/hw/misc/vfio.c b/hw/misc/vfio.c
index 7147430..9cf5b84 100644
--- a/hw/misc/vfio.c
+++ b/hw/misc/vfio.c
@@ -1043,7 +1043,7 @@ static void vfio_bar_write(void *opaque, hwaddr addr,
buf.dword = cpu_to_le32(data);
break;
default:
- hw_error("vfio: unsupported write size, %d bytes\n", size);
+ hw_error("vfio: unsupported write size, %d bytes", size);
break;
}
@@ -1103,7 +1103,7 @@ static uint64_t vfio_bar_read(void *opaque,
data = le32_to_cpu(buf.dword);
break;
default:
- hw_error("vfio: unsupported read size, %d bytes\n", size);
+ hw_error("vfio: unsupported read size, %d bytes", size);
break;
}
@@ -1157,7 +1157,7 @@ static void vfio_pci_load_rom(VFIODevice *vdev)
if (!vdev->rom_size) {
vdev->rom_read_failed = true;
error_report("vfio-pci: Cannot read device rom at "
- "%04x:%02x:%02x.%x\n",
+ "%04x:%02x:%02x.%x",
vdev->host.domain, vdev->host.bus, vdev->host.slot,
vdev->host.function);
error_printf("Device option ROM contents are probably invalid "
@@ -1338,7 +1338,7 @@ static void vfio_vga_write(void *opaque, hwaddr addr,
buf.dword = cpu_to_le32(data);
break;
default:
- hw_error("vfio: unsupported write size, %d bytes\n", size);
+ hw_error("vfio: unsupported write size, %d bytes", size);
break;
}
@@ -1381,7 +1381,7 @@ static uint64_t vfio_vga_read(void *opaque, hwaddr addr, unsigned size)
data = le32_to_cpu(buf.dword);
break;
default:
- hw_error("vfio: unsupported read size, %d bytes\n", size);
+ hw_error("vfio: unsupported read size, %d bytes", size);
break;
}
@@ -1426,7 +1426,7 @@ static uint64_t vfio_generic_window_quirk_read(void *opaque,
if (!vfio_range_contained(addr, size, quirk->data.data_offset,
quirk->data.data_size)) {
- hw_error("%s: window data read not fully contained: %s\n",
+ hw_error("%s: window data read not fully contained: %s",
__func__, memory_region_name(&quirk->mem));
}
@@ -1455,7 +1455,7 @@ static void vfio_generic_window_quirk_write(void *opaque, hwaddr addr,
quirk->data.address_offset, quirk->data.address_size)) {
if (addr != quirk->data.address_offset) {
- hw_error("%s: offset write into address window: %s\n",
+ hw_error("%s: offset write into address window: %s",
__func__, memory_region_name(&quirk->mem));
}
@@ -1476,7 +1476,7 @@ static void vfio_generic_window_quirk_write(void *opaque, hwaddr addr,
if (!vfio_range_contained(addr, size, quirk->data.data_offset,
quirk->data.data_size)) {
- hw_error("%s: window data write not fully contained: %s\n",
+ hw_error("%s: window data write not fully contained: %s",
__func__, memory_region_name(&quirk->mem));
}
@@ -1512,7 +1512,7 @@ static uint64_t vfio_generic_quirk_read(void *opaque,
ranges_overlap(addr, size, offset, quirk->data.address_mask + 1)) {
if (!vfio_range_contained(addr, size, offset,
quirk->data.address_mask + 1)) {
- hw_error("%s: read not fully contained: %s\n",
+ hw_error("%s: read not fully contained: %s",
__func__, memory_region_name(&quirk->mem));
}
@@ -1541,7 +1541,7 @@ static void vfio_generic_quirk_write(void *opaque, hwaddr addr,
ranges_overlap(addr, size, offset, quirk->data.address_mask + 1)) {
if (!vfio_range_contained(addr, size, offset,
quirk->data.address_mask + 1)) {
- hw_error("%s: write not fully contained: %s\n",
+ hw_error("%s: write not fully contained: %s",
__func__, memory_region_name(&quirk->mem));
}
@@ -2299,7 +2299,7 @@ static void vfio_listener_region_add(MemoryListener *listener,
container->iommu_data.type1.error = ret;
}
} else {
- hw_error("vfio: DMA mapping failed, unable to continue\n");
+ hw_error("vfio: DMA mapping failed, unable to continue");
}
}
}
@@ -2969,7 +2969,7 @@ static void vfio_pci_pre_reset(VFIODevice *vdev)
pmcsr = vfio_pci_read_config(pdev, vdev->pm_cap + PCI_PM_CTRL, 2);
state = pmcsr & PCI_PM_CTRL_STATE_MASK;
if (state) {
- error_report("vfio: Unable to power on device, stuck in D%d\n",
+ error_report("vfio: Unable to power on device, stuck in D%d",
state);
}
}
@@ -3268,7 +3268,7 @@ static void vfio_kvm_device_del_group(VFIOGroup *group)
}
if (ioctl(vfio_kvm_device_fd, KVM_SET_DEVICE_ATTR, &attr)) {
- error_report("Failed to remove group %d to KVM VFIO device: %m",
+ error_report("Failed to remove group %d from KVM VFIO device: %m",
group->groupid);
}
#endif
@@ -3336,7 +3336,7 @@ static int vfio_connect_container(VFIOGroup *group)
vfio_listener_release(container);
g_free(container);
close(fd);
- error_report("vfio: memory listener initialization failed for container\n");
+ error_report("vfio: memory listener initialization failed for container");
return ret;
}
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PULL 0/2] vfio pull for QEMU 2.0
2014-03-25 18:30 [Qemu-devel] [PULL 0/2] vfio pull for QEMU 2.0 Alex Williamson
2014-03-25 18:30 ` [Qemu-devel] [PULL 1/2] vfio: Correction in vfio_rom_read when attempting rom loading Alex Williamson
2014-03-25 18:30 ` [Qemu-devel] [PULL 2/2] vfio: Cosmetic error reporting fixes Alex Williamson
@ 2014-03-25 19:10 ` Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2014-03-25 19:10 UTC (permalink / raw)
To: Alex Williamson; +Cc: QEMU Developers, Anthony Liguori
On 25 March 2014 18:30, Alex Williamson <alex.williamson@redhat.com> wrote:
> Peter & Anthony,
>
> The following changes since commit 839a5547574e57cce62f49bfc50fe1f04b00589a:
>
> Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20140324' into staging (2014-03-24 19:25:09 +0000)
>
> are available in the git repository at:
>
>
> git://github.com/awilliam/qemu-vfio.git tags/vfio-pci-for-qemu-20140325.0
>
> for you to fetch changes up to 4e505ddd9af1d5810378a4e7b851f788b1c075ba:
>
> vfio: Cosmetic error reporting fixes (2014-03-25 12:08:52 -0600)
Applied to master, thanks.
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-03-25 19:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-25 18:30 [Qemu-devel] [PULL 0/2] vfio pull for QEMU 2.0 Alex Williamson
2014-03-25 18:30 ` [Qemu-devel] [PULL 1/2] vfio: Correction in vfio_rom_read when attempting rom loading Alex Williamson
2014-03-25 18:30 ` [Qemu-devel] [PULL 2/2] vfio: Cosmetic error reporting fixes Alex Williamson
2014-03-25 19:10 ` [Qemu-devel] [PULL 0/2] vfio pull for QEMU 2.0 Peter Maydell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).