Re: [Qemu-devel] [PATCH V2] virtio: validate the existence of handle_output before calling it

2015-03-12 Thread Don Koch
3) then notify queue 10 > > Fixing this by validating the existence of handle_output before. > > Cc: qemu-sta...@nongnu.org > Cc: Michael S. Tsirkin > Signed-off-by: Jason Wang > --- Reviewed-by: Don Koch > Changes from V1: > - check the existence of both vring.desc a

Re: [Qemu-devel] [PATCH] virtio: validate the existence of handle_output before calling it

2015-02-13 Thread Don Koch
On Thu, 12 Feb 2015 11:05:17 +0800 Jason Wang wrote: > We don't validate the existence of handle_output which may let a buggy > guest to trigger a SIGSEV easily. Fix this by validate its existence > before. > > Cc: qemu-sta...@nongnu.org > Cc: Anthony Liguori > Cc: Michael S. Tsirkin > Signed-

Re: [Qemu-devel] [PATCH] Add trace messages to input.c.

2015-01-22 Thread Don Koch
On Thu, 22 Jan 2015 11:01:14 +0100 Gerd Hoffmann wrote: > Hi, > > > I believe this was used for debugging vmware mouse support we've been > > working on. > > Wouldn't it be more useful to trace qemu_input_handler_* calls for that, > especially qemu_input_handler_activate? So you also see cha

Re: [Qemu-devel] [PATCH] Add trace messages to input.c.

2015-01-19 Thread Don Koch
On Mon, 19 Jan 2015 08:34:22 +0100 Gerd Hoffmann wrote: > On Fr, 2015-01-16 at 14:08 -0500, Don Koch wrote: > > Signed-off-by: Don Koch > > > +trace_do_mouse_set(mon, index); > > First, I think we should have a better name for that one, maybe > "input_mou

Re: [Qemu-devel] [PATCH 0/3] Trace calls for xenfb, ps2 and pcnet

2015-01-16 Thread Don Koch
Obviously, subject should have read: [PATCH 0/4] ... On Fri, 16 Jan 2015 14:21:35 -0500 Don Koch wrote: > Add trace calls for debugging xenfb, ps2 and pcnet. > > Don Koch (4): > Add tracing to xenfb. > Add trace to ps2.c. > Add/convert trace calls in pcnet-pci.c

[Qemu-devel] [PATCH 1/4] Add tracing to xenfb.

2015-01-16 Thread Don Koch
Signed-off-by: Don Koch --- hw/display/xenfb.c | 5 + trace-events | 4 2 files changed, 9 insertions(+) diff --git a/hw/display/xenfb.c b/hw/display/xenfb.c index 8a61e95..5e324ef 100644 --- a/hw/display/xenfb.c +++ b/hw/display/xenfb.c @@ -45,6 +45,8 @@ #include #include

[Qemu-devel] [PATCH 4/4] Convert some debugging printfs to trace calls in pcnet.c.

2015-01-16 Thread Don Koch
Signed-off-by: Don Koch --- hw/net/pcnet.c | 28 trace-events | 8 2 files changed, 16 insertions(+), 20 deletions(-) diff --git a/hw/net/pcnet.c b/hw/net/pcnet.c index f409b92..d549342 100644 --- a/hw/net/pcnet.c +++ b/hw/net/pcnet.c @@ -40,6 +40,7

[Qemu-devel] [PATCH 3/4] Add/convert trace calls in pcnet-pci.c.

2015-01-16 Thread Don Koch
Add trace calls. Convert some #ifdef DEBUG printfs to trace. Signed-off-by: Don Koch --- hw/net/pcnet-pci.c | 49 +++-- trace-events | 12 2 files changed, 31 insertions(+), 30 deletions(-) diff --git a/hw/net/pcnet-pci.c b/hw/net

[Qemu-devel] [PATCH] Add some trace calls to pci.c.

2015-01-16 Thread Don Koch
Signed-off-by: Don Koch --- hw/pci/pci.c | 9 + trace-events | 4 2 files changed, 13 insertions(+) diff --git a/hw/pci/pci.c b/hw/pci/pci.c index 371699c..d5e0e41 100644 --- a/hw/pci/pci.c +++ b/hw/pci/pci.c @@ -32,6 +32,7 @@ #include "hw/loader.h" #include &qu

[Qemu-devel] [PATCH 1/2] Add trace calls to scsi-disk.c.

2015-01-16 Thread Don Koch
Signed-off-by: Don Koch --- hw/scsi/scsi-disk.c | 4 trace-events| 5 + 2 files changed, 9 insertions(+) diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c index f65618d..98bbead 100644 --- a/hw/scsi/scsi-disk.c +++ b/hw/scsi/scsi-disk.c @@ -37,6 +37,7 @@ do { printf("

[Qemu-devel] [PATCH 0/3] Trace calls for xenfb, ps2 and pcnet

2015-01-16 Thread Don Koch
Add trace calls for debugging xenfb, ps2 and pcnet. Don Koch (4): Add tracing to xenfb. Add trace to ps2.c. Add/convert trace calls in pcnet-pci.c. Convert some debugging printfs to trace calls in pcnet.c. hw/display/xenfb.c | 5 + hw/input/ps2.c | 16 hw/net

[Qemu-devel] [PATCH 2/4] Add trace to ps2.c.

2015-01-16 Thread Don Koch
Signed-off-by: Don Koch --- hw/input/ps2.c | 16 trace-events | 17 + 2 files changed, 33 insertions(+) diff --git a/hw/input/ps2.c b/hw/input/ps2.c index a466e25..4baeea2 100644 --- a/hw/input/ps2.c +++ b/hw/input/ps2.c @@ -27,6 +27,8 @@ #include "ui/in

[Qemu-devel] [PATCH 2/2] Add trace calls to scsi-bus.c.

2015-01-16 Thread Don Koch
Signed-off-by: Don Koch --- hw/scsi/scsi-bus.c | 16 trace-events | 10 ++ 2 files changed, 26 insertions(+) diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c index 24f7b74..5604b87 100644 --- a/hw/scsi/scsi-bus.c +++ b/hw/scsi/scsi-bus.c @@ -278,6 +278,7

[Qemu-devel] [PATCH 0/2] Add scsi-bus/scsi-disk trace calls.

2015-01-16 Thread Don Koch
Adding some trace calls for scsi debug. Don Koch (2): Add trace calls to scsi-disk.c. Add trace calls to scsi-bus.c. hw/scsi/scsi-bus.c | 16 hw/scsi/scsi-disk.c | 4 trace-events| 15 +++ 3 files changed, 35 insertions(+) -- 1.8.3.1

[Qemu-devel] [PATCH] Add trace messages to input.c.

2015-01-16 Thread Don Koch
Signed-off-by: Don Koch --- trace-events | 1 + ui/input.c | 1 + 2 files changed, 2 insertions(+) diff --git a/trace-events b/trace-events index 97c7ac3..6a60f19 100644 --- a/trace-events +++ b/trace-events @@ -1136,6 +1136,7 @@ vnc_key_sync_numlock(bool on) "%d" vnc_key_sync_cap

Re: [Qemu-devel] [PATCH v4 4/6] vmdk: Check descriptor file length when reading it

2014-12-04 Thread Don Koch
Signed-off-by: Fam Zheng > --- Reviewed-by: Don Koch

Re: [Qemu-devel] [PATCH v4 2/6] vmdk: Fix comment to match code of extent lines

2014-12-04 Thread Don Koch
On Thu, 4 Dec 2014 07:28:30 +0800 Fam Zheng wrote: > commit 04d542c8b (vmdk: support vmfs files) added support of VMFS extent > type but the comment above the changed code is left out. Update the > comment so they are consistent. > > Signed-off-by: Fam Zheng > --- Rev

Re: [Qemu-devel] [PATCH v3 6/6] vmdk: Set errp on failures in vmdk_open_vmdk4

2014-12-03 Thread Don Koch
On Wed, 3 Dec 2014 18:28:41 +0800 Fam Zheng wrote: > Reported-by: Markus Armbruster > Signed-off-by: Fam Zheng > Reviewed-by: Markus Armbruster > --- Reviewed-by: Don Koch > block/vmdk.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/block/vmdk.

Re: [Qemu-devel] [PATCH v3 5/6] vmdk: Remove unnecessary initialization

2014-12-03 Thread Don Koch
On Wed, 3 Dec 2014 18:28:40 +0800 Fam Zheng wrote: > It will be assigned to the return value of vmdk_read_desc. > > Suggested-by: Markus Armbruster > Signed-off-by: Fam Zheng > Reviewed-by: Markus Armbruster > --- Reviewed-by: Don Koch > block/vmdk.c | 2 +- > 1 f

Re: [Qemu-devel] [PATCH v3 3/6] vmdk: Clean up descriptor file reading

2014-12-03 Thread Don Koch
On Wed, 3 Dec 2014 18:28:38 +0800 Fam Zheng wrote: > Zeroing a buffer that will be filled right after is not necessary, and > allocating a power of two + 1 is naughty. > > Suggested-by: Markus Armbruster > Signed-off-by: Fam Zheng > --- Reviewed-by: Don Koch > block/

Re: [Qemu-devel] [PATCH v3 1/6] vmdk: Use g_random_int to generate CID

2014-12-03 Thread Don Koch
disk > is opened". Using "seconds since epoch" is just a "lame way" to generate > it, and not completely safe because of the low precision. > > Suggested-by: Markus Armbruster > Signed-off-by: Fam Zheng > Reviewed-by: Markus Armbruster > --- Reviewe

Re: [Qemu-devel] [PATCH for-2.3 v2 3/6] vmdk: Clean up descriptor file reading

2014-12-03 Thread Don Koch
On Wed, 3 Dec 2014 17:20:27 +0800 Fam Zheng wrote: > On Wed, 12/03 09:21, Markus Armbruster wrote: > > Fam Zheng writes: > > > > > Zeroing a buffer that will be filled right after is not necessary, and > > > allocating a power of two + 1 is naughty. > > > > > > Suggested-by: Markus Armbruster

Re: [Qemu-devel] [PATCH for-2.3 3/6] vmdk: Clean up descriptor file reading

2014-12-02 Thread Don Koch
On Tue, 2 Dec 2014 15:39:14 +0800 Fam Zheng wrote: > Zeroing a buffer that will be filled right after is not necessary, and > allocating a power of two + 1 is naughty. > > Suggested-by: Markus Armbruster > Signed-off-by: Fam Zheng > --- > block/vmdk.c | 5 +++-- > 1 file changed, 3 insertions

Re: [Qemu-devel] [PATCH v3 0/5] vmware-vga: fix CVE-2014-3689

2014-10-28 Thread Don Koch
On Tue, 28 Oct 2014 10:50:37 +0100 Gerd Hoffmann wrote: > Hi, > > vmware-vga emulation lacks sanity checks in the hardware acceleration > (blit + fill) functions. This patch series plugs the holes. > > v3 changes: > * throw badcmd errors in case the rectangles fail the sanity checks. > v2 c

Re: [Qemu-devel] [PATCH v3 4/5] vmware-vga: use vmsvga_verify_rect in vmsvga_copy_rect

2014-10-28 Thread Don Koch
On Tue, 28 Oct 2014 10:50:41 +0100 Gerd Hoffmann wrote: > Add verification to vmsvga_copy_rect, re-enable HW_RECT_ACCEL. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Gerd Hoffmann > --- Reviewed-by: Don Koch > hw/display/vmware_vga.c | 20 ++-- >

Re: [Qemu-devel] [PATCH v3 5/5] vmware-vga: use vmsvga_verify_rect in vmsvga_fill_rect

2014-10-28 Thread Don Koch
On Tue, 28 Oct 2014 10:50:42 +0100 Gerd Hoffmann wrote: > Add verification to vmsvga_fill_rect, re-enable HW_FILL_ACCEL. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Gerd Hoffmann > --- Reviewed-by: Don Koch > hw/display/vmware_vga.c | 17 ++--- >

Re: [Qemu-devel] [PATCH v2 5/5] vmware-vga: use vmsvga_verify_rect in vmsvga_fill_rect

2014-10-16 Thread Don Koch
On Wed, 15 Oct 2014 12:10:39 +0200 Gerd Hoffmann wrote: > Add verification to vmsvga_fill_rect, re-enable HW_FILL_ACCEL. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Gerd Hoffmann > --- > hw/display/vmware_vga.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a

Re: [Qemu-devel] [PATCH v2 2/5] vmware-vga: add vmsvga_verify_rect

2014-10-16 Thread Don Koch
On Wed, 15 Oct 2014 12:10:36 +0200 Gerd Hoffmann wrote: > Add verification function for rectangles, returning > true if verification passes and false otherwise. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Gerd Hoffmann Reviewed-by: Don Koch > --- > hw/disp

Re: [Qemu-devel] [PATCH v2 4/5] vmware-vga: use vmsvga_verify_rect in vmsvga_copy_rect

2014-10-16 Thread Don Koch
On Wed, 15 Oct 2014 12:10:38 +0200 Gerd Hoffmann wrote: > Add verification to vmsvga_copy_rect, re-enable HW_RECT_ACCEL. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Gerd Hoffmann > --- > hw/display/vmware_vga.c | 9 - > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git

Re: [Qemu-devel] [PATCH v2 3/5] vmware-vga: use vmsvga_verify_rect in vmsvga_update_rect

2014-10-16 Thread Don Koch
> instead. This is good since the original calculations were wrong. (I had already fixed said calculations but hadn't cleaned them up for submittal, yet.) Unfortunate that you end up using "the big hammer" to fix it (i.e., update the entire screen), but that's better than b

Re: [Qemu-devel] [PATCH v2 1/5] vmware-vga: CVE-2014-3689: turn off hw accel

2014-10-16 Thread Don Koch
so guests should deal just fine, in theory. > > Subsequent patches will add the missing checks and re-enable the > hardware acceleration emulation. > > Cc: qemu-sta...@nongnu.org > Signed-off-by: Gerd Hoffmann Reviewed-by: Don Koch > --- > hw/display/vmware_vga.

Re: [Qemu-devel] [PATCH v4 19/30] pxa2xx: avoid buffer overrun on incoming migration

2014-03-31 Thread Don Koch
er can be overrun with arbitrary data > from the wire. > > Fix this by validating rx_level against the size of s->rx_fifo. > > Cc: Don Koch > Reported-by: Michael Roth > Signed-off-by: Michael S. Tsirkin Reviewed-by: Don Koch -d

Re: [Qemu-devel] [PATCH 15/23] pxa2xx: avoid buffer overrun on incoming migration

2013-12-03 Thread Don Koch
On 12/03/2013 11:29 AM, Michael S. Tsirkin wrote: > From: Michael Roth > > CVE-2013-4533 > > s->rx_level is read from the wire and used to determine how many bytes > to subsequently read into s->rx_fifo[]. If s->rx_level exceeds the > length of s->rx_fifo[] the buffer can be overrun with arbitra

[Qemu-devel] [PATCH v2] Don't crash on keyboard input with no handler

2013-11-19 Thread Don Koch
Prevent a call to put_kbd if null. On shutdown of some OSes, the keyboard handler goes away before the system is down. If a key is typed during this window, qemu crashes. Signed-off-by: Don Koch --- v2: punt printf() ui/input.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [Qemu-devel] [PATCH] Don't crash on keyboard input with no handler

2013-11-19 Thread Don Koch
On 11/19/2013 02:17 PM, Stefan Weil wrote: > Am 19.11.2013 19:26, schrieb Don Koch: >> Prevent a call to put_kbd if null. >> >> On shutdown of some OSes, the keyboard handler goes away before the >> system is down. If a key is typed during this window, qemu crashes. &g

[Qemu-devel] [PATCH] Don't crash on keyboard input with no handler

2013-11-19 Thread Don Koch
Prevent a call to put_kbd if null. On shutdown of some OSes, the keyboard handler goes away before the system is down. If a key is typed during this window, qemu crashes. Signed-off-by: Don Koch --- I left the printf call, originally for testing, but useful as a sanity check if the user wonders

Re: [Qemu-devel] [PATCH v3] misc: Spelling and grammar fixes in comments

2013-10-11 Thread Don Koch
On 10/11/2013 04:08 PM, Stefan Weil wrote: > Am 11.10.2013 22:03, schrieb Don Koch: >> On 10/11/2013 03:34 PM, Stefan Weil wrote: >>> * it's -> its >>> * grammar fix in ui/vnc-enc-zywrle.h >>> >>> Signed-off-by: Stefan Weil >>> ---

Re: [Qemu-devel] [PATCH v3] misc: Spelling and grammar fixes in comments

2013-10-11 Thread Don Koch
On 10/11/2013 04:10 PM, Peter Maydell wrote: > On 12 October 2013 05:03, Don Koch wrote: >> On 10/11/2013 03:34 PM, Stefan Weil wrote: >>> * it's -> its >>> * grammar fix in ui/vnc-enc-zywrle.h >>> >>> Signed-off-by: Stefan Weil >>&g

Re: [Qemu-devel] [PATCH v3] misc: Spelling and grammar fixes in comments

2013-10-11 Thread Don Koch
On 10/11/2013 03:34 PM, Stefan Weil wrote: > * it's -> its > * grammar fix in ui/vnc-enc-zywrle.h > > Signed-off-by: Stefan Weil > --- > > This is v3 of http://patchwork.ozlabs.org/patch/257416/. > > v3: > Don't try to improve a strange sentence in the same context ("Of cause > [...]"). > >

Re: [Qemu-devel] [PATCH qom-next v2 4/4] pcie_port: Turn PCIEPort and PCIESlot into abstract QOM types

2013-07-25 Thread Don Koch
nclude/hw/pci/pcie_port.h | 14 ++++-- > 5 files changed, 85 insertions(+), 64 deletions(-) > Reviewed-by: Don Koch

Re: [Qemu-devel] [PATCH qom-next v2 3/4] pci-bridge/i82801b11: Rename parent field

2013-07-25 Thread Don Koch
On 07/22/2013 06:36 PM, Andreas Färber wrote: > Signed-off-by: Andreas Färber > --- > hw/pci-bridge/i82801b11.c | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > Reviewed-by: Don Koch

Re: [Qemu-devel] [PATCH qom-next v2 2/4] pci-bridge-dev: QOM parent field cleanup

2013-07-25 Thread Don Koch
On 07/22/2013 06:36 PM, Andreas Färber wrote: > Signed-off-by: Peter Crosthwaite > Signed-off-by: Andreas Färber > --- > hw/pci-bridge/pci_bridge_dev.c | 22 ++ > 1 file changed, 14 insertions(+), 8 deletions(-) > Reviewed-by: Don Koch

Re: [Qemu-devel] [PATCH qom-next v2 1/4] pci-bridge: Turn PCIBridge into abstract QOM type

2013-07-25 Thread Don Koch
| 2 +- > hw/pci/pci_bridge.c| 40 > +++--- > hw/pci/pcie.c | 2 +- > include/hw/pci/pci_bus.h | 7 ++- > 11 files changed, 77 insertions(+), 53 deletions(-) Saved me the trouble

[Qemu-devel] [Bug 1187529] Re: Devices on PCI bridge stop working when live-migrated

2013-07-15 Thread Don Koch
** Changed in: qemu Assignee: (unassigned) => Don Koch (dkoch-r) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1187529 Title: Devices on PCI bridge stop working when live-migrated Status

[Qemu-devel] [PATCH] Fix BRDIGE typo.

2013-07-09 Thread Don Koch
From: Don Koch Fix typo in PCI_CLASS_BRDIGE_PCI_INF_SUB. Signed-off-by: Don Koch --- hw/pci-bridge/i82801b11.c | 2 +- include/hw/pci/pci_ids.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/pci-bridge/i82801b11.c b/hw/pci-bridge/i82801b11.c index 5807a92..b98bfb0

Re: [Qemu-devel] [Bug 1187529] [PATCH] Update mappings after PCI bridge live migration or save-restore.

2013-07-08 Thread Don Koch
On 07/04/2013 04:57 AM, Michael S. Tsirkin wrote: > On Wed, Jul 03, 2013 at 11:04:16AM -0400, Don Koch wrote: >> From: Don Koch >> >> Update mappings for PCI bridge after live migration. >> >> Signed-off-by: Don Koch >> --- >> This fixes bug 118752

Re: [Qemu-devel] [Bug 1187529] [PATCH] Update mappings after PCI bridge live migration or save-restore.

2013-07-08 Thread Don Koch
On 07/03/2013 12:15 PM, Andreas Färber wrote: > Am 03.07.2013 17:04, schrieb Don Koch: >> From: Don Koch >> >> Update mappings for PCI bridge after live migration. >> >> Signed-off-by: Don Koch >> --- >> This fixes bug 1187529: devices on a PCI bridge

[Qemu-devel] [Bug 1187529] [PATCH] Update mappings after PCI bridge live migration or save-restore.

2013-07-03 Thread Don Koch
From: Don Koch Update mappings for PCI bridge after live migration. Signed-off-by: Don Koch --- This fixes bug 1187529: devices on a PCI bridge stop working after migration. hw/pci-bridge/pci_bridge_dev.c | 9 + hw/pci/pci_bridge.c| 2 +- include/hw/pci/pci_bridge.h

[Qemu-devel] [Bug 1187529] [NEW] Devices on PCI bridge stop working when live-migrated

2013-06-04 Thread Don Koch
Public bug reported: qemu version: 1.4.50 (0ca5aa4f4c4a8bcc73988dd52a536241d35e5223) host: x86_64, Linux 3.6.10 (Fedora 17) client: x86_64 Centos 6.3 (doesn't matter, really) If a device, e.g. an lsi53c895a, is on a pci-bridge, after migration, the device stops working (e.g., commands like "powe

Re: [Qemu-devel] [PATCH v2 3/8] dataplane: add host memory mapping code

2012-11-26 Thread Don Koch
On 11/21/2012 02:59 AM, Stefan Hajnoczi wrote: > On Tue, Nov 20, 2012 at 01:24:08PM -0500, Don Koch wrote: >> On 11/20/2012 07:31 AM, Stefan Hajnoczi wrote: >>> +void hostmem_init(Hostmem *hostmem) >>> +{ >>> +memset(hostmem, 0, sizeof(*hostmem

Re: [Qemu-devel] [PATCH v3 03/12] dataplane: add host memory mapping code

2012-11-26 Thread Don Koch
On 11/21/2012 01:32 PM, Stefan Hajnoczi wrote: > The data plane thread needs to map guest physical addresses to host > pointers. Normally this is done with cpu_physical_memory_map() but the > function assumes the global mutex is held. The data plane thread does > not touch the global mutex and th

Re: [Qemu-devel] [PATCH v2 3/8] dataplane: add host memory mapping code

2012-11-20 Thread Don Koch
On 11/20/2012 07:31 AM, Stefan Hajnoczi wrote: > The data plane thread needs to map guest physical addresses to host > pointers. Normally this is done with cpu_physical_memory_map() but the > function assumes the global mutex is held. The data plane thread does > not touch the global mutex and th