[Qemu-devel] [PATCH] qemu-doc, help: update options/keys for GTK/SDL

2013-06-03 Thread Peter Wu
to commit 5104a1f65088285ddf870aa641b9061064e8757d, this is now mentioned explicitly. Another related change is that only Ctrl-Alt-G can be used for (un)grbabing. Window scaling seems also to be a SDL-specific feature and has been marked as such. Signed-off-by: Peter Wu lekenst...@gmail.com --- qemu

[Qemu-devel] QEMU aborts since kvm: support using KVM_MEM_READONLY flag for regions

2013-06-03 Thread Peter Wu
Hi, With the current git source (f10acc8b38d65a66ffa0588a036489d7fa6a593e), `qemu-system-x86_64 -enable-kvm` fails to run with the following error: kvm_set_phys_mem: error unregistering overlapping slot: Invalid argument After this message, qemu aborts. Reverting the following commit on top

Re: [Qemu-devel] QEMU aborts since kvm: support using KVM_MEM_READONLY flag for regions

2013-06-03 Thread Peter Wu
On Monday 03 June 2013 10:35:28 Jordan Justen wrote: This should be fixed by Xiao's fix double free the memslot in kvm_set_phys_mem patch. Confirmed, with this one-liner patch the bug is gone. On Mon, Jun 3, 2013 at 10:23 AM, Peter Wu lekenst...@gmail.com wrote: Hi, With the current git

Re: [Qemu-devel] [PATCH] qemu-doc, help: update options/keys for GTK/SDL

2013-06-04 Thread Peter Wu
Thanks for your feedback, replies are inlined below. On Tuesday 04 June 2013 07:57:38 Michael Tokarev wrote: 03.06.2013 14:54, Peter Wu wrote: The GTK display type has been introduced in 1.5, replacing SDL as default. Some options only work with SDL and not GTK. This patch tries to address

[Qemu-devel] [PATCH] chardev: add baud parameter for serial host device

2013-06-08 Thread Peter Wu
to implement it, do not forget to update the documentation on COM devices which is also of backend serial. Signed-off-by: Peter Wu lekenst...@gmail.com --- qapi-schema.json | 18 -- qemu-char.c | 14 -- qemu-options.hx | 14 +- 3 files changed, 33 insertions

[Qemu-devel] [PATCH] gtk: implement -full-screen and -no-frame

2013-06-09 Thread Peter Wu
after showing the windows to make the cursor and menu hidden. Signed-off-by: Peter Wu lekenst...@gmail.com --- include/ui/console.h | 2 +- ui/gtk.c | 10 +- vl.c | 2 +- 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/include/ui/console.h b

Re: [Qemu-devel] [PATCH] gtk: implement -full-screen and -no-frame

2013-06-09 Thread Peter Wu
On Sunday 09 June 2013 13:33:14 Anthony Liguori wrote: On Sun, Jun 9, 2013 at 5:30 AM, Peter Wu lekenst...@gmail.com wrote: Aiming for GTK as replacement for SDL, features like -full-screen and -no-frame should also be implemented. Bringing the window into full-screen mode is done

Re: [Qemu-devel] [PATCH] chardev: add baud parameter for serial host device

2013-06-10 Thread Peter Wu
On Monday 10 June 2013 07:56:01 Gerd Hoffmann wrote: On 06/08/13 23:49, Peter Wu wrote: When QEMU starts, it always changes the serial port parameters including baud rate. This confused my guest which thought it was outputting at 9600 baud while it was in fact changed to 115200

Re: [Qemu-devel] [PATCH] gtk: implement -full-screen and -no-frame

2013-06-10 Thread Peter Wu
On Monday 10 June 2013 14:33:28 Kevin Wolf wrote: Am 09.06.2013 um 12:30 hat Peter Wu geschrieben: Aiming for GTK as replacement for SDL, features like -full-screen and -no-frame should also be implemented. Bringing the window into full-screen mode is done by faking activating

Re: [Qemu-devel] [PATCH] chardev: add baud parameter for serial host device

2013-06-10 Thread Peter Wu
On Monday 10 June 2013 14:58:07 Gerd Hoffmann wrote: On 06/10/13 10:42, Peter Wu wrote: On Monday 10 June 2013 07:56:01 Gerd Hoffmann wrote: On 06/08/13 23:49, Peter Wu wrote: When QEMU starts, it always changes the serial port parameters including baud rate. This confused my guest which

Re: [Qemu-devel] [PATCH] chardev: add baud parameter for serial host device

2013-06-10 Thread Peter Wu
On Monday 10 June 2013 15:28:32 Peter Wu wrote: On Monday 10 June 2013 14:58:07 Gerd Hoffmann wrote: On 06/10/13 10:42, Peter Wu wrote: On Monday 10 June 2013 07:56:01 Gerd Hoffmann wrote: On 06/08/13 23:49, Peter Wu wrote: When QEMU starts, it always changes the serial port parameters

[Qemu-devel] [PATCH v2] gtk: implement -full-screen

2013-06-10 Thread Peter Wu
, use booleans instead of ints and ensure consistency between ui state and menu. Signed-off-by: Peter Wu lekenst...@gmail.com --- include/ui/console.h | 2 +- ui/gtk.c | 6 +- vl.c | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/include/ui

[Qemu-devel] [PATCH] Unbreak -no-quit for GTK when SDL is disabled

2013-06-10 Thread Peter Wu
When QEMU is built without SDL support, -no-quit would print an error message that SDL is disabled. Since GTK also supports -no-quit, enable the option when GTK or SDL is enabled at compile time. While at it, do not create the no_quit variable when it is not used. Signed-off-by: Peter Wu lekenst

Re: [Qemu-devel] [PATCH] Unbreak -no-quit for GTK when SDL is disabled

2013-06-11 Thread Peter Wu
On Monday 10 June 2013 16:53:06 Anthony Liguori wrote: Peter Wu lekenst...@gmail.com writes: When QEMU is built without SDL support, -no-quit would print an error message that SDL is disabled. Since GTK also supports -no-quit, enable the option when GTK or SDL is enabled at compile time

[Qemu-devel] [PATCH] Unbreak -no-quit for GTK, validate SDL options

2013-06-11 Thread Peter Wu
supported when compiling without SDL. Signed-off-by: Peter Wu lekenst...@gmail.com --- vl.c | 15 ++- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/vl.c b/vl.c index cfd2d3e..29ab85c 100644 --- a/vl.c +++ b/vl.c @@ -3523,7 +3523,6 @@ int main(int argc, char **argv, char

Re: [Qemu-devel] [PATCH trivial] vl: always define no_frame

2013-06-15 Thread Peter Wu
only the legacy interface working, not the new suboption interface, so a few more changes are needed. Reviewed-by: Peter Wu lekenst...@gmail.com -no-frame was deemed to be a SDL feature that was unnecessary for GTK, hence dropped. At run-time, it is checked whether -no-frame makes sense

Re: [Qemu-devel] [PATCH] chardev: add baud parameter for serial host device

2013-06-15 Thread Peter Wu
On Saturday 15 June 2013 16:14:23 Eric Blake wrote: On 06/08/2013 10:49 PM, Peter Wu wrote: When QEMU starts, it always changes the serial port parameters including baud rate. This confused my guest which thought it was outputting at 9600 baud while it was in fact changed to 115200

Re: [Qemu-devel] [PULL v2 2/2] usb: mtp filesharing

2014-04-24 Thread Peter Wu
Hi, For this review, I grabbed the MTP 1.1 spec from USB.org. There are some issues which are noted below. On Wednesday 23 April 2014 10:31:01 Gerd Hoffmann wrote: Implementation of a USB Media Transfer Device device for easy filesharing. Read-only. No access control inside qemu, it will

Re: [Qemu-devel] [PULL v2 2/2] usb: mtp filesharing

2014-04-25 Thread Peter Wu
On Thursday 24 April 2014 17:01:47 Gerd Hoffmann wrote: PS: Funny thing that the reviews start coming in when I send pull requests. The patches have been on the list a few weeks back already (during 2.0 freeze, thats why the long delay between [patch] and [pull]). No comments.

Re: [Qemu-devel] [PATCH 6/9] usb: mtp: fix possible buffer overflow

2014-04-25 Thread Peter Wu
On Friday 25 April 2014 12:48:11 Gerd Hoffmann wrote: Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/usb/dev-mtp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index 45f9562..82d5b64 100644 --- a/hw/usb/dev-mtp.c +++ b/hw/usb/dev-mtp.c

Re: [Qemu-devel] [PATCH 9/9] usb: mtp: reply INCOMPLETE_TRANSFER on read errors

2014-04-25 Thread Peter Wu
On Friday 25 April 2014 12:48:14 Gerd Hoffmann wrote: Signed-off-by: Gerd Hoffmann kra...@redhat.com --- hw/usb/dev-mtp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index 6bd6a82..8e1a1b7 100644 --- a/hw/usb/dev-mtp.c +++

Re: [Qemu-devel] [PATCH 0/9] usb: mtp: a bunch of fixes

2014-04-25 Thread Peter Wu
INCOMPLETE_TRANSFER on read errors hw/usb/dev-mtp.c | 29 + trace-events | 3 +++ 2 files changed, 20 insertions(+), 12 deletions(-) For patches 1-5 and 7-8: Reviewed-by: Peter Wu pe...@lekensteyn.nl Patch 6 and 9 have some comments. Kind regards, Peter

Re: [Qemu-devel] [PATCH 1/2] usb: mtp: fix possible buffer overflow

2014-04-29 Thread Peter Wu
On Tuesday 29 April 2014 10:43:51 Gerd Hoffmann wrote: Signed-off-by: Gerd Hoffmann kra...@redhat.com Reviewed-by: Peter Wu pe...@lekensteyn.nl --- hw/usb/dev-mtp.c | 8 1 file changed, 8 insertions(+) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index b6eaeae..62428d8

Re: [Qemu-devel] [PATCH 2/2] usb: mtp: reply INCOMPLETE_TRANSFER on read errors

2014-04-29 Thread Peter Wu
On Tuesday 29 April 2014 10:43:52 Gerd Hoffmann wrote: Signed-off-by: Gerd Hoffmann kra...@redhat.com Reviewed-by: Peter Wu pe...@lekensteyn.nl --- hw/usb/dev-mtp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c index 62428d8

Re: [Qemu-devel] [PATCH] qemu-iotests: Fix 028 reference output for qed

2014-08-19 Thread Peter Wu
On Tuesday 19 August 2014 19:33:55 Kevin Wolf wrote: We need to filter out driver-specific options in the Formatting... string printed by qemu when creating the backup image. Reported-by: Peter Wu pe...@lekensteyn.nl Signed-off-by: Kevin Wolf kw...@redhat.com Tested-by: Peter Wu pe

[Qemu-devel] qemu-iotests failures for qcow and vpc

2014-08-19 Thread Peter Wu
Hi, I just ran the qemu-iotests suite and found five failures in the vpc and qcow block types. The following command was executed with sources and objects in tmpfs: for i in qcow2 qed qcow generic vmdk raw vpc vhdx vdi \ cow parallels cloop bochs; do ./check -c

[Qemu-devel] [PATCH] qemu-iotests: stop using /tmp directly

2014-08-22 Thread Peter Wu
not touched is the situation that /tmp/check.log and /tmp/check.sts are hard-coded (and thus unusable in concurrent tests). Signed-off-by: Peter Wu pe...@lekensteyn.nl --- Hi, This patch introduces a dependency on mktemp of coreutils. I could still not get concurrent tests to work fully reliably (test 030

Re: [Qemu-devel] [PATCH] qemu-iotests: stop using /tmp directly

2014-08-24 Thread Peter Wu
On Friday 22 August 2014 20:58:34 Benoît Canet wrote: The Friday 22 Aug 2014 à 13:25:43 (+0200), Peter Wu wrote : Before this patch you could not run multiple tests concurrently as they might clobber each other test files. This patch solves that by using random temporary directory instead

[Qemu-devel] [Bug 1376938] [NEW] detect-zeroes=unmap fails to discard in some cases

2014-10-02 Thread Peter Wu
Public bug reported: Under certain circumstances, QEMU 2.1.2 fails to discard the underlaying block. The command to start QEMU is: qemu-system-x86_64 -machine pc,accel=kvm -m 2G -smp 2 -vga std -usb -usbdevice tablet -drive if=none,id=ff,aio=native,discard=unmap,detect-

[Qemu-devel] [Bug 1376938] Re: detect-zeroes=unmap fails to discard in some cases

2014-10-02 Thread Peter Wu
Note that `cat /dev/zero` followed by `blkdiscard` has no issues. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1376938 Title: detect-zeroes=unmap fails to discard in some cases Status in QEMU:

[Qemu-devel] [Bug 1376798] Re: Qemu does not hotplug (usb) devices

2014-10-02 Thread Peter Wu
Not a bug, Linux increases the Device ID each time a new device gets hotplugged. If you need to use this option, pair it with already connected drivers by parsing the output of lsusb for instance. You can still use combinations of hostbus, vendorid, productid, etc. ** Changed in: qemu

[Qemu-devel] [Bug 1377163] Re: Does not add usb-host devices as they are hotplugged

2014-10-03 Thread Peter Wu
With some devices, I get a speed mismatch with ehci-usb: qemu-system-x86_64: Warning: speed mismatch trying to attach usb device USB Keyboard (( speed) to bus ehci.0, port 1 (high speed) nec-usb-xhci fixes the keyboard+usb-storage case, but it breaks a webcam: qemu-system-x86_64: Warning: speed

[Qemu-devel] [Bug 988125] Re: Generated smb.conf needs to declare state directory

2014-11-02 Thread Peter Wu
** Changed in: qemu Status: New = Fix Released -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/988125 Title: Generated smb.conf needs to declare state directory Status in QEMU: Fix

[Qemu-devel] [PATCH] slirp/smbd: disable printer in smb config

2014-11-03 Thread Peter Wu
with Samba 3.4.0, but previously state directory was already added which exists in Samba 3.4.0. As unknown parameters are ignored (while printing a warning), it should be safe to add another option. Signed-off-by: Peter Wu pe...@lekensteyn.nl --- Hi, While trying to share a folder with a guest, I

Re: [Qemu-devel] slirp-smb broken with Samba 4.1

2014-11-03 Thread Peter Wu
Hi, On Friday 24 October 2014 18:55:07 Jan Kiszka wrote: writing to you as you provided a fix for the last related issue: I just noticed that the samba-based share is broken again with smbd version 4.1.11. Tried to look briefly at it, realized that it is a permission thing (different error

Re: [Qemu-devel] [Qemu-trivial] [PATCH] slirp/smbd: disable printer in smb config

2014-11-03 Thread Peter Wu
On Monday 03 November 2014 17:15:24 Michael Tokarev wrote: BTW, I'm not sure `socket address' paraameter is relevant in this context at all, -- smbd should not use it in inetd mode. It'd be interesting to know why this option is here to start with, and whenever we really need the new

[Qemu-devel] Improved shared folders support (was: Re: slirp-smb broken with Samba 4.1)

2014-11-03 Thread Peter Wu
On Monday 03 November 2014 15:58:35 Michael Tokarev wrote: 03.11.2014 15:22, Peter Wu wrote: [] As an aside, would it be possible to override the samba binary at runtime, without compiling? Either an envvar (SMBD) or an option (-net user,smb=...,smbd=...). The whole thing needs

Re: [Qemu-devel] Improved shared folders support

2014-11-05 Thread Peter Wu
On Tuesday 04 November 2014 09:13:31 Michael Tokarev wrote: The whole thing needs to be rewritten to use a shell script to create smb.conf and to call smbd. It's something I wanted to do for very long time, the only question is where to put this script so a user can easily customize it.

[Qemu-devel] [PATCH] block/iscsi: fix uninitialized variable

2014-12-23 Thread Peter Wu
'ret' was never initialized in the success path. Signed-off-by: Peter Wu pe...@lekensteyn.nl --- Hi, Found this warning when compiling with --enable-debug. This issue was previously fixed as part of Peter Lieven's patch series[1] but it never seemed to get merged. Kinds regards, Peter [1

[Qemu-devel] [PATCH 05/10] block/dmg: validate chunk size to avoid overflow

2014-12-27 Thread Peter Wu
Previously the chunk size was not checked, allowing for a large memory allocation. This patch checks whether the chunks size is within the resource fork length. Signed-off-by: Peter Wu pe...@lekensteyn.nl --- block/dmg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block

[Qemu-devel] [PATCH 00/10] block/dmg: (compatibility) fixes and bzip2 support

2014-12-27 Thread Peter Wu
/pub/videolan/vlc/2.1.5/macosx/ [5]: https://bugzilla.redhat.com/show_bug.cgi?id=1058132 [6]: http://download.info.apple.com/Mac_OS_X/693-4445.20030912.gnr39/NetBoot9.dmg -- Peter Wu (10): block/dmg: properly detect the UDIF trailer block/dmg: extract mish block decoding functionality block

[Qemu-devel] [PATCH 04/10] block/dmg: process a buffer instead of reading ints

2014-12-27 Thread Peter Wu
As the decoded plist XML is not a pointer in the file, dmg_read_mish_block must be able to process a buffer instead of a file pointer. Since the full buffer must be processed, let's change the return value again to just a success flag. Signed-off-by: Peter Wu pe...@lekensteyn.nl --- block/dmg.c

[Qemu-devel] [PATCH 08/10] block/dmg: fix sector data offset calculation

2014-12-27 Thread Peter Wu
block because older files would start the input offset of a new block at zero. Newer files (including vlc-2.1.5.dmg, tuxpaint-0.9.15-macosx.dmg and OS X Yosemite [MAS].dmg) failed in reads because these files have a continuous input offset. Signed-off-by: Peter Wu pe...@lekensteyn.nl

[Qemu-devel] [PATCH 01/10] block/dmg: properly detect the UDIF trailer

2014-12-27 Thread Peter Wu
) has its offset adjusted as the initial value of offset does not mean end of file anymore, but begin of UDIF trailer. Signed-off-by: Peter Wu pe...@lekensteyn.nl --- block/dmg.c | 40 1 file changed, 36 insertions(+), 4 deletions(-) diff --git a/block

[Qemu-devel] [PATCH 03/10] block/dmg: extract processing of resource forks

2014-12-27 Thread Peter Wu
Besides the offset, also read the resource length. This length is now used in the extracted function to verify the end of the resource fork against count from the resource fork. Signed-off-by: Peter Wu pe...@lekensteyn.nl --- block/dmg.c | 90

[Qemu-devel] [PATCH 07/10] block/dmg: set virtual size to a non-zero value

2014-12-27 Thread Peter Wu
dmg -O raw foo.dmg foo.raw`. The tests showed that the file contents are exactly the same, except that QEMU creates a slightly larger file (it matches the total sectors count). Signed-off-by: Peter Wu pe...@lekensteyn.nl --- block/dmg.c | 8 1 file changed, 8 insertions(+) diff --git

[Qemu-devel] [PATCH 02/10] block/dmg: extract mish block decoding functionality

2014-12-27 Thread Peter Wu
-off-by: Peter Wu pe...@lekensteyn.nl --- block/dmg.c | 216 +++- 1 file changed, 125 insertions(+), 91 deletions(-) diff --git a/block/dmg.c b/block/dmg.c index df274f9..6dc6dbb 100644 --- a/block/dmg.c +++ b/block/dmg.c @@ -164,19 +164,137

[Qemu-devel] [PATCH 06/10] block/dmg: process XML plists

2014-12-27 Thread Peter Wu
The format is simple enough to avoid using a full-blown XML parser. The offsets are based on the description at http://newosxbook.com/DMG.html Signed-off-by: Peter Wu pe...@lekensteyn.nl --- block/dmg.c | 69 + 1 file changed, 69

[Qemu-devel] [PATCH 09/10] block/dmg: support bzip2 block entry types

2014-12-27 Thread Peter Wu
as the decompression takes most of the time and as blocks are typically about/over 1 MiB in size, only one allocation is done every 2000 sectors. Signed-off-by: Peter Wu pe...@lekensteyn.nl --- block/dmg.c | 56 +--- configure | 31

[Qemu-devel] [PATCH 10/10] block/dmg: improve zeroes handling

2014-12-27 Thread Peter Wu
uncompressed size is 1054371 bytes, probably for a bzip2-compressed block.) Signed-off-by: Peter Wu pe...@lekensteyn.nl --- block/dmg.c | 18 +- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/block/dmg.c b/block/dmg.c index 67d4e2b..b84ba7e 100644 --- a/block/dmg.c +++ b/block

Re: [Qemu-devel] [PATCH 00/10] block/dmg: (compatibility) fixes and bzip2 support

2015-01-02 Thread Peter Wu
. Kind regards, Peter https://lekensteyn.nl (pardon my brevity, top-posting and formatting, sent from my phone) On January 2, 2015 5:31:33 PM CET, John Snow js...@redhat.com wrote: On 01/02/2015 09:14 AM, Stefan Hajnoczi wrote: On Sat, Dec 27, 2014 at 04:01:34PM +0100, Peter Wu wrote

Re: [Qemu-devel] [PATCH 00/10] block/dmg: (compatibility) fixes and bzip2 support

2015-01-02 Thread Peter Wu
On Friday 02 January 2015 13:58:33 John Snow wrote: On 01/02/2015 01:46 PM, Peter Wu wrote: FYI, I plan to make some more changes: - do not require offset ≠ 0 for resource fork and XML offsets. Technically it is allowed, do you agree on this change? If you have seen this in the wild

Re: [Qemu-devel] [PATCH 02/10] block/dmg: extract mish block decoding functionality

2015-01-03 Thread Peter Wu
On Friday 02 January 2015 18:59:38 John Snow wrote: On 12/27/2014 10:01 AM, Peter Wu wrote: Extract the mish block decoder such that this can be used for other formats in the future. A new DmgHeaderState struct is introduced to share state while decoding. The code is kept unchanged

Re: [Qemu-devel] [PATCH 08/10] block/dmg: fix sector data offset calculation

2015-01-03 Thread Peter Wu
On Friday 02 January 2015 19:05:29 John Snow wrote: On 12/27/2014 10:01 AM, Peter Wu wrote: This patch addresses two issues: - The data fork offset was not taken into account, resulting in failure to read an InstallESD.dmg file (5164763151 bytes) which had a non-zero

Re: [Qemu-devel] [PATCH 06/10] block/dmg: process XML plists

2015-01-03 Thread Peter Wu
On Friday 02 January 2015 19:04:32 John Snow wrote: On 12/27/2014 10:01 AM, Peter Wu wrote: The format is simple enough to avoid using a full-blown XML parser. The offsets are based on the description at http://newosxbook.com/DMG.html Signed-off-by: Peter Wu pe...@lekensteyn.nl

Re: [Qemu-devel] [PATCH 03/10] block/dmg: extract processing of resource forks

2015-01-03 Thread Peter Wu
On Friday 02 January 2015 19:01:06 John Snow wrote: On 12/27/2014 10:01 AM, Peter Wu wrote: Besides the offset, also read the resource length. This length is now used in the extracted function to verify the end of the resource fork against count from the resource fork. Signed-off

Re: [Qemu-devel] [PATCH 01/10] block/dmg: properly detect the UDIF trailer

2015-01-03 Thread Peter Wu
On Friday 02 January 2015 18:58:00 John Snow wrote: On 12/27/2014 10:01 AM, Peter Wu wrote: DMG files have a variable length with a UDIF trailer at the end of a file. This UDIF trailer is essential as it describes the contents of the image. At the moment however, the start of this trailer

Re: [Qemu-devel] [PULL 00/16] Block patches

2015-01-17 Thread Peter Wu
the following patch? It still passes 4 dmg tests for me (https://lekensteyn.nl/files/dmg-tests/). -- Kind regards, Peter https://lekensteyn.nl -- From 462454e820d2fa5f8eefe7b039d6ea32e4a88d41 Mon Sep 17 00:00:00 2001 From: Peter Wu pe...@lekensteyn.nl Date: Sat, 17 Jan 2015 11:34:32 +0100 Subject: [PATCH

Re: [Qemu-devel] [PATCH 10/10] block/dmg: improve zeroes handling

2015-01-05 Thread Peter Wu
On Monday 05 January 2015 14:48:03 John Snow wrote: On 12/27/2014 10:01 AM, Peter Wu wrote: Disk images may contain large all-zeroes gaps (1.66k sectors or 812 MiB is seen in the real world). These blocks (type 2) do not need to be extracted into a temporary buffer, there is no need

Re: [Qemu-devel] [PATCH v2 01/12] block/dmg: properly detect the UDIF trailer

2015-01-07 Thread Peter Wu
On Wednesday 07 January 2015 13:19:34 Stefan Hajnoczi wrote: On Tue, Jan 06, 2015 at 06:48:04PM +0100, Peter Wu wrote: DMG files have a variable length with a UDIF trailer at the end of a file. This UDIF trailer is essential as it describes the contents of the image. At the moment however

[Qemu-devel] [PATCH v2 11/12] block/dmg: support bzip2 block entry types

2015-01-06 Thread Peter Wu
as the decompression takes most of the time and as blocks are typically about/over 1 MiB in size, only one allocation is done every 2000 sectors. Signed-off-by: Peter Wu pe...@lekensteyn.nl --- v2: split block type check into a different patch ([PATCH v2 10/12] block/dmg: factor out block

[Qemu-devel] [PATCH v2 09/12] block/dmg: use SectorNumber from BLKX header

2015-01-06 Thread Peter Wu
) either so it should be safe to drop this dependency on the previous state. (It makes somehow makes sense, a terminator should halt further processing of a block and is perhaps used to preallocate some space.) Signed-off-by: Peter Wu pe...@lekensteyn.nl --- v2: initial patch after suggestions from

[Qemu-devel] [PATCH v2 06/12] block/dmg: process XML plists

2015-01-06 Thread Peter Wu
Signed-off-by: Peter Wu pe...@lekensteyn.nl --- v2: added offset check, allow resource fork to be located at beginning of file (removed `rsrc_fork_offset != 0` condition) It got a `Reviewed-by: John Snow js...@redhat.com` for v1. I have not copied the R-b as I wanted to be sure that John agrees

[Qemu-devel] [PATCH v2 07/12] block/dmg: set virtual size to a non-zero value

2015-01-06 Thread Peter Wu
-f dmg -O raw foo.dmg foo.raw`. The tests showed that the file contents are exactly the same, except that QEMU creates a slightly larger file (it matches the total sectors count). Signed-off-by: Peter Wu pe...@lekensteyn.nl --- v2: fixed typo in commit message (s/mish/koly/) --- block/dmg.c | 8

[Qemu-devel] [PATCH v2 08/12] block/dmg: fix sector data offset calculation

2015-01-06 Thread Peter Wu
-by: Peter Wu pe...@lekensteyn.nl --- v2: use sector and data offset as provided by the BLKX header. This allows us to drop last_in_offset. The previous heuristics to detect relative offsets is not needed anymore. Squashed the data fork offset length check into this patch. --- block

[Qemu-devel] [PATCH v2 03/12] block/dmg: extract processing of resource forks

2015-01-06 Thread Peter Wu
format is documented at https://developer.apple.com/legacy/library/documentation/mac/pdf/MoreMacintoshToolbox.pdf#page=151 Signed-off-by: Peter Wu pe...@lekensteyn.nl --- v2: expanded commit message (incl. documentation link). Do not require a fixed resource data offset of 0x100, improve boundary

[Qemu-devel] [PATCH v2 10/12] block/dmg: factor out block type check

2015-01-06 Thread Peter Wu
change. Signed-off-by: Peter Wu pe...@lekensteyn.nl --- v2: new patch, split off bzip2 patch. Besides the dmg_is_known_block_type function, the offsets are now also made relative. --- block/dmg.c | 36 +++- 1 file changed, 23 insertions(+), 13 deletions

[Qemu-devel] [PATCH v2 01/12] block/dmg: properly detect the UDIF trailer

2015-01-06 Thread Peter Wu
) has its offset adjusted as the initial value of offset does not mean end of file anymore, but begin of UDIF trailer. Signed-off-by: Peter Wu pe...@lekensteyn.nl Reviewed-by: John Snow js...@redhat.com --- v2: added R-b, set errp as suggested by Stefan Hajnoczi --- block/dmg.c | 49

[Qemu-devel] [PATCH v2 00/12] block/dmg: (compatibility) fixes and bzip2 support

2015-01-06 Thread Peter Wu
at https://lekensteyn.nl/files/dmg-tests/dmg-images/. Kind regards, Peter [1]: https://lists.nongnu.org/archive/html/qemu-devel/2014-12/msg03606.html [2]: https://github.com/Lekensteyn/dmg2img/commit/a1d4861b4b0f2ac5090938233a1156bb130cb3ef Peter Wu (12): block/dmg: properly detect the UDIF

[Qemu-devel] [PATCH v2 05/12] block/dmg: validate chunk size to avoid overflow

2015-01-06 Thread Peter Wu
Previously the chunk size was not checked, allowing for a large memory allocation. This patch checks whether the chunks size is within the resource fork length, and whether the resource fork is below the trailer of the dmg file. Signed-off-by: Peter Wu pe...@lekensteyn.nl --- v2: added resource

[Qemu-devel] [PATCH v2 04/12] block/dmg: process a buffer instead of reading ints

2015-01-06 Thread Peter Wu
As the decoded plist XML is not a pointer in the file, dmg_read_mish_block must be able to process a buffer instead of a file pointer. Since the full buffer must be processed, let's change the return value again to just a success flag. Signed-off-by: Peter Wu pe...@lekensteyn.nl Reviewed-by: John

[Qemu-devel] [PATCH v2 12/12] block/dmg: improve zeroes handling

2015-01-06 Thread Peter Wu
uncompressed size is 1054371 bytes, probably for a bzip2-compressed block.) Signed-off-by: Peter Wu pe...@lekensteyn.nl --- v2: no changes (did not receive comments last time) --- block/dmg.c | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/block/dmg.c b/block/dmg.c

[Qemu-devel] [PATCH v2 02/12] block/dmg: extract mish block decoding functionality

2015-01-06 Thread Peter Wu
block (the offsets would be increased by the fields). In this patch, the resource length is used instead to avoid the need to rely on the previous offsets. Signed-off-by: Peter Wu pe...@lekensteyn.nl Reviewed-by: John Snow js...@redhat.com Reviewed-by: Stefan Hajnoczi stefa...@redhat.com --- v2

Re: [Qemu-devel] [PATCH 09/10] block/dmg: support bzip2 block entry types

2015-01-07 Thread Peter Wu
On Wednesday 07 January 2015 11:29:20 Paolo Bonzini wrote: On 05/01/2015 20:32, John Snow wrote: fi ## +# bzip2 check + +if test $bzip2 != no ; then +cat $TMPC EOF +#include bzlib.h +int main(void) { BZ2_bzlibVersion();

Re: [Qemu-devel] [PATCH] block/dmg: make it modular if using additional library

2015-03-10 Thread Peter Wu
...@tls.msk.ru Tested-by: Peter Wu pe...@lekensteyn.nl Reviewed-by: Peter Wu pe...@lekensteyn.nl -- This might be questionable, to make the thing to be either module or built-in depending on build environment, so a better idea may be to make it modular unconditionally. This block device

[Qemu-devel] [PATCH v2] gdbstub: avoid busy loop while waiting for gdb

2016-06-05 Thread Peter Wu
at https://lists.nongnu.org/archive/html/qemu-devel/2013-02/msg02277.html. While at it, close the gdb client fd on EOF or error while reading. Signed-off-by: Peter Wu <pe...@lekensteyn.nl> Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> --- v2: resent with fixed commit messag

[Qemu-devel] [PATCH] gdbstub: avoid busy loop while waiting for gdb

2016-05-03 Thread Peter Wu
://lists.nongnu.org/archive/html/qemu-devel/2013-02/msg02277.html. While at it, close the gdb client fd on EOF or error while reading. Signed-off-by: Peter Wu <pe...@lekensteyn.nl> --- gdbstub.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/gdbstub.c b/gdb

[Qemu-devel] [PATCH] gdbstub: set listen backlog to 1

2016-05-04 Thread Peter Wu
kernels would use 8 as minimum value, but that is no longer the case. Signed-off-by: Peter Wu <pe...@lekensteyn.nl> --- Hi, This was also reported at Linux, but the author of that patch argued that it is intended behavior[1]. Kind regards, Peter [1]: https://lkml.kernel.org/r/1462321

Re: [Qemu-devel] [PATCH] gdbstub: avoid busy loop while waiting for gdb

2016-05-05 Thread Peter Wu
On Thu, May 05, 2016 at 04:37:40PM +0100, Peter Maydell wrote: > On 3 May 2016 at 23:58, Peter Wu <pe...@lekensteyn.nl> wrote: > > While waiting for a gdb response, or while sending an acknowledgement > > there is not much to do, so just mark the socket as non-blocking to

Re: [Qemu-devel] DMG chunk size independence

2017-04-25 Thread Peter Wu
against a raw file generated from the 2.9.0 > qemu-img tool should be reasonably good evidence that you have not > altered the behavior of the tool. > > > Now, the real thing I wanted to ask was, if someone is aware of a DMG > > file which has a chunk size above 64 MiB so that I ca

[Qemu-devel] [PATCH 2/2] gtk: disable the F10 menubar key

2018-05-10 Thread Peter Wu
The F10 key is used in various applications, disable it unconditionally (do not limit it to grab mode). Note that this property is deprecated and might be removed in the future (GTK+ commit b082fb598d). Fixes: https://bugs.launchpad.net/qemu/+bug/1726910 Signed-off-by: Peter Wu <

[Qemu-devel] [PATCH 1/2] gtk: make it possible to hide the menu bar

2018-05-10 Thread Peter Wu
Saves some space and disables the F10 button as side-effect. Fixes: https://bugs.launchpad.net/qemu/+bug/1726910 Signed-off-by: Peter Wu <pe...@lekensteyn.nl> --- ui/gtk.c | 46 +- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/ui

[Qemu-devel] [Bug 1726910] Re: UI request: add a function key toolbar (f1-f12)

2018-05-10 Thread Peter Wu
Current QEMU code (at least, v2.12.0-329-ge5cd695266) does not grab the F10 key ("menubar activate"), accelerators (Ctrl-Alt-1) or menu bar "mnemonic"s (such as Alt-V for _V_iew). This comment nicely summarizes what kind of grabs is needed: https://bugzilla.redhat.com/show_bug.cgi?id=499362#c1

Re: [Qemu-devel] [PATCH 2/2] gtk: disable the F10 menubar key

2018-05-15 Thread Peter Wu
On Tue, May 15, 2018 at 10:46:54AM +0200, Gerd Hoffmann wrote: > On Tue, May 15, 2018 at 09:39:12AM +0100, Daniel P. Berrangé wrote: > > On Tue, May 15, 2018 at 10:30:09AM +0200, Gerd Hoffmann wrote: > > > On Fri, May 11, 2018 at 01:07:39AM +0200, Peter Wu wrote: > >

[Qemu-devel] [PATCH] vnc: fix memleak of the "vnc-worker-output" name

2018-08-07 Thread Peter Wu
in vnc_async_encoding_start ui/vnc-jobs.c:177 #7 0x56085ca6b815 in vnc_worker_thread_loop ui/vnc-jobs.c:240 Fixes: 543b95801f98 ("vnc: attach names to buffers") Cc: Gerd Hoffmann CC: qemu-sta...@nongnu.org Signed-off-by: Peter Wu --- ui/vnc-jobs.c | 3 ++- 1 file changed, 2 insert

[Qemu-devel] [PATCH] qxl: support mono cursors with inverted colors

2018-09-03 Thread Peter Wu
Signed-off-by: Peter Wu --- hw/display/qxl-render.c | 16 ui/cursor.c | 42 +++-- 2 files changed, 56 insertions(+), 2 deletions(-) diff --git a/hw/display/qxl-render.c b/hw/display/qxl-render.c index c62b9a5e75..b82501ea9a 10064

[PATCH] hw/i386/pc: fix regression in parsing vga cmdline parameter

2019-12-21 Thread Peter Wu
to the '-vga std' parameter or the '-append' one. Fix the parsing regression and clarify the error. Fixes: 133ef074bd ("hw/i386/pc: replace use of strtol with qemu_strtoui in x86_load_linux()") Cc: Sergio Lopez Signed-off-by: Peter Wu --- Hi, This fixes a regression in QEMU 4.2.