Re: [Qemu-devel] [PATCH] qxl: check release info object

2019-05-02 Thread P J P
+-- On Thu, 25 Apr 2019, P J P wrote --+ | When releasing spice resources in release_resource() routine, | if release info object 'ext.info' is null, it leads to null | pointer dereference. Add check to avoid it. | | diff --git a/hw/display/qxl.c b/hw/display/qxl.c | index c8ce5781e0..632923add2

[Qemu-devel] [PULL 4/7] usb/xhci: avoid trigger assertion if guest write wrong epid

2019-05-02 Thread Gerd Hoffmann
From: Longpeng we found the following core in our environment: 0 0x7fc6b06c2237 in raise () 1 0x7fc6b06c3928 in abort () 2 0x7fc6b06bb056 in __assert_fail_base () 3 0x7fc6b06bb102 in __assert_fail () 4 0x00702e36 in xhci_kick_ep (...) 5 0x0047897a in

[Qemu-devel] [PATCH v8 04/27] gdbstub: Implement continue (c pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 25 +++-- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index c47ef7dd9c..89f1ab6524 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1522,6 +1522,16 @@ static void handle_thread_alive(GdbCmdContext

[Qemu-devel] [PATCH v8 18/27] gdbstub: Implement generic query (q pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 327 ++ 1 file changed, 327 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index d56d0fd235..83ae8738cc 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1915,6 +1915,323 @@ static void

[Qemu-devel] [PATCH v8 12/27] gdbstub: Implement read memory (m pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 48 1 file changed, 32 insertions(+), 16 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 8dc2e1d507..daa602edc3 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1710,6 +1710,30 @@ static void

[Qemu-devel] [PULL 2/7] usb-mtp: fix alignment of access of ObjectInfo filename field

2019-05-02 Thread Gerd Hoffmann
From: Daniel P. Berrangé The ObjectInfo struct's "filename" field is following a uint8_t field in a packed struct and thus has bad alignment for a 16-bit field. Switch the field to to uint8_t and use the helper function for accessing unaligned 16-bit data. Note that although the MTP spec

[Qemu-devel] [PATCH v8 26/27] gdbstub: Add support to read a MSR for KVM target

2019-05-02 Thread Jon Doron
gdb> maint packet qqemu.kvm.Rdmsr:MsrIndex Signed-off-by: Jon Doron --- gdbstub.c | 38 +- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/gdbstub.c b/gdbstub.c index bceceeec57..d5cdda190a 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -2141,7

[Qemu-devel] [PATCH v8 11/27] gdbstub: Implement write memory (M pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 51 +-- 1 file changed, 33 insertions(+), 18 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index e9a3d0c2bc..8dc2e1d507 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1685,6 +1685,31 @@ static void

[Qemu-devel] [PATCH v8 19/27] gdbstub: Implement generic set (Q pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 213 +++--- 1 file changed, 25 insertions(+), 188 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 83ae8738cc..2fd0d66f4d 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1130,14 +1130,6 @@ static

[Qemu-devel] [PATCH v8 14/27] gdbstub: Implement read all registers (g pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 31 +++ 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index adfe39b3a3..3478ac778d 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1757,6 +1757,21 @@ static void

[Qemu-devel] [PATCH v8 08/27] gdbstub: Implement remove breakpoint (z pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 49 - 1 file changed, 32 insertions(+), 17 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 36c7353a22..b42425b24c 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1611,6 +1611,29 @@ static void

[Qemu-devel] [PATCH v8 07/27] gdbstub: Implement insert breakpoint (Z pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 33 + 1 file changed, 33 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index 21cdaf4678..36c7353a22 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1588,6 +1588,29 @@ static void handle_set_thread(GdbCmdContext *gdb_ctx,

[Qemu-devel] [PULL 7/7] hw/usb: avoid format truncation warning when formatting port name

2019-05-02 Thread Gerd Hoffmann
From: Daniel P. Berrangé hw/usb/hcd-xhci.c: In function ‘usb_xhci_realize’: hw/usb/hcd-xhci.c:3339:66: warning: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size 5 [-Wformat-trunca\ tion=] 3339 | snprintf(port->name, sizeof(port->name),

[Qemu-devel] [PATCH v8 25/27] kvm: Add API to read/write a CPU MSR value

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- accel/kvm/kvm-all.c | 39 +++ include/sysemu/kvm.h | 2 ++ 2 files changed, 41 insertions(+) diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c index 524c4ddfbd..35207d910b 100644 --- a/accel/kvm/kvm-all.c +++

[Qemu-devel] [PATCH v8 15/27] gdbstub: Implement file io (F pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 62 +++ 1 file changed, 40 insertions(+), 22 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 3478ac778d..9fe130f30d 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1772,6 +1772,39 @@ static void

[Qemu-devel] [PATCH v8 22/27] gdbstub: Implement generic query qemu.Supported

2019-05-02 Thread Jon Doron
qemu.Supported query reply back with the supported qemu query/set commands (commands are seperated with a semicolon from each other). gdb> maint packet qqemu.Supported Signed-off-by: Jon Doron --- gdbstub.c | 9 + 1 file changed, 9 insertions(+) diff --git a/gdbstub.c b/gdbstub.c

[Qemu-devel] [PATCH v8 20/27] gdbstub: Implement target halted (? pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 36 ++-- 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 2fd0d66f4d..d678191705 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -2239,13 +2239,30 @@ static void

[Qemu-devel] [PATCH v8 21/27] gdbstub: Clear unused variables in gdb_handle_packet

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 11 ++- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index d678191705..8bdfae4b29 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -2259,17 +2259,11 @@ static void handle_target_halt(GdbCmdContext *gdb_ctx, void

[Qemu-devel] [PATCH v8 16/27] gdbstub: Implement step (s pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 25 +++-- 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 9fe130f30d..9b0556f8be 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1805,6 +1805,16 @@ static void handle_file_io(GdbCmdContext

[Qemu-devel] [PATCH v8 24/27] gdbstub: Add another handler for setting qemu.sstep

2019-05-02 Thread Jon Doron
Follow GDB general query/set packet conventions, qemu.sstep can now be set with the following command as well: gdb> maint packet Qqemu.sstep:Value Signed-off-by: Jon Doron --- gdbstub.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index 6daf779af4..bceceeec57

[Qemu-devel] [PATCH v8 06/27] gdbstub: Implement set_thread (H pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 79 ++- 1 file changed, 49 insertions(+), 30 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 469aaeb875..21cdaf4678 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1547,6 +1547,47 @@ static void

[Qemu-devel] [PATCH v8 13/27] gdbstub: Implement write all registers (G pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 41 +++-- 1 file changed, 31 insertions(+), 10 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index daa602edc3..adfe39b3a3 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1734,6 +1734,29 @@ static void

[Qemu-devel] [PATCH v8 23/27] gdbstub: Implement qemu physical memory mode

2019-05-02 Thread Jon Doron
Add a new query/set which changes the memory GDB sees to physical memory only. gdb> maint packet qqemu.PhyMemMode will reply the current phy_mem_mode state (1 for enabled, 0 for disabled) gdb> maint packet Qqemu.PhyMemMode:1 Will make GDB read/write only to physical memory, set to 0 to disable

[Qemu-devel] [PATCH v8 27/27] gdbstub: Add support to write a MSR for KVM target

2019-05-02 Thread Jon Doron
gdb> maint packet Qqemu.kvm.Wrmsr:MsrIndex,Value Signed-off-by: Jon Doron --- gdbstub.c | 29 - 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/gdbstub.c b/gdbstub.c index d5cdda190a..2d9a8e6942 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -2145,7 +2145,8

[Qemu-devel] [PATCH v8 05/27] gdbstub: Implement continue with signal (C pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 30 +- 1 file changed, 25 insertions(+), 5 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 89f1ab6524..469aaeb875 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1532,6 +1532,21 @@ static void handle_continue(GdbCmdContext

[Qemu-devel] [PATCH v8 17/27] gdbstub: Implement v commands with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 170 +++--- 1 file changed, 110 insertions(+), 60 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 9b0556f8be..d56d0fd235 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1815,6 +1815,106 @@ static void

[Qemu-devel] [PATCH v8 10/27] gdbstub: Implement get register (p pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 50 ++ 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 10e3f12a68..e9a3d0c2bc 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1655,6 +1655,36 @@ static void

[Qemu-devel] [PATCH v8 02/27] gdbstub: Implement deatch (D pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 90 ++- 1 file changed, 50 insertions(+), 40 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index d5e0f3878a..621d689868 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1418,11 +1418,6 @@ static inline int

[Qemu-devel] [PATCH v8 09/27] gdbstub: Implement set register (P pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 39 ++- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index b42425b24c..10e3f12a68 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1634,6 +1634,27 @@ static void

[Qemu-devel] [PATCH v8 00/27] gdbstub: Refactor command packets handler

2019-05-02 Thread Jon Doron
This patch series refactors the old gdbstub command packets handler with a new infrastructure which should ease extending and adding new and missing gdb command packets. version 8 changes: - Add new command to display the Supported qemu generic query/sets - kvm: Add API to read/write a MSR - Add

[Qemu-devel] [PATCH v8 03/27] gdbstub: Implement thread_alive (T pkt) with new infra

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 43 --- 1 file changed, 32 insertions(+), 11 deletions(-) diff --git a/gdbstub.c b/gdbstub.c index 621d689868..c47ef7dd9c 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1498,6 +1498,30 @@ static void

[Qemu-devel] [PATCH v8 01/27] gdbstub: Add infrastructure to parse cmd packets

2019-05-02 Thread Jon Doron
Signed-off-by: Jon Doron --- gdbstub.c | 200 ++ 1 file changed, 200 insertions(+) diff --git a/gdbstub.c b/gdbstub.c index d54abd17cc..d5e0f3878a 100644 --- a/gdbstub.c +++ b/gdbstub.c @@ -1268,6 +1268,206 @@ out: return res; }

Re: [Qemu-devel] [PATCH v4 3/8] hw/acpi: Add ACPI Generic Event Device Support

2019-05-02 Thread Ard Biesheuvel
On Wed, 1 May 2019 at 13:25, Shameerali Kolothum Thodi wrote: > > Hi Ard, > > > -Original Message- > > From: Ard Biesheuvel [mailto:ard.biesheu...@linaro.org] > > Sent: 01 May 2019 12:10 > > To: Shameerali Kolothum Thodi > > Cc: QEMU Developers ; qemu-arm > > ; Auger Eric ; Igor > >

Re: [Qemu-devel] [PATCH v4 3/8] hw/acpi: Add ACPI Generic Event Device Support

2019-05-02 Thread Auger Eric
Hi Shameer, On 5/1/19 12:40 PM, Shameerali Kolothum Thodi wrote: > Hi Eric, > >> -Original Message- >> From: Auger Eric [mailto:eric.au...@redhat.com] >> Sent: 30 April 2019 16:50 >> To: Shameerali Kolothum Thodi ; >> qemu-devel@nongnu.org; qemu-...@nongnu.org; imamm...@redhat.com >> Cc:

Re: [Qemu-devel] [PATCH 2/2] configure: Use quotes around uses of $CPU_CFLAGS

2019-05-02 Thread Eric Blake
On 5/1/19 5:38 PM, Richard Henderson wrote: > About half of the values to which CPU_CFLAGS is set > have multiple space separated arguments. > > Signed-off-by: Richard Henderson > --- > configure | 16 > 1 file changed, 8 insertions(+), 8 deletions(-) > > diff --git

Re: [Qemu-devel] [PATCH v2 4/5] hw/usb: avoid format truncation warning when formatting port name

2019-05-02 Thread Gerd Hoffmann
On Fri, Apr 12, 2019 at 01:16:25PM +0100, Daniel P. Berrangé wrote: > hw/usb/hcd-xhci.c: In function ‘usb_xhci_realize’: > hw/usb/hcd-xhci.c:3339:66: warning: ‘%d’ directive output may be truncated > writing between 1 and 10 bytes into a region of size 5 [-Wformat-trunca\ > tion=] > 3339 |

Re: [Qemu-devel] [PATCH v2 for-4.1 0/2] Fix ohci_die() and move PCI code to separate file

2019-05-02 Thread Gerd Hoffmann
On Fri, Apr 19, 2019 at 09:56:23AM +0200, Thomas Huth wrote: > First patch fixes a problem with ohci_die(), second patch moves PCI code into > a separate file, so that the sysbus OHCI device can also be used without > the dependency on the PCI code. > > v2: Split the patch into two patches, one

Re: [Qemu-devel] [PATCH v2] usb/xchi: avoid trigger assertion if guest write wrong epid

2019-05-02 Thread Gerd Hoffmann
On Tue, Apr 30, 2019 at 02:21:41PM +0800, Longpeng(Mike) wrote: > From: Longpeng > > we found the following core in our environment: > 0 0x7fc6b06c2237 in raise () > 1 0x7fc6b06c3928 in abort () > 2 0x7fc6b06bb056 in __assert_fail_base () > 3 0x7fc6b06bb102 in __assert_fail

Re: [Qemu-devel] [PATCH 2/2] configure: Use quotes around uses of $CPU_CFLAGS

2019-05-02 Thread Philippe Mathieu-Daudé
On 5/2/19 12:38 AM, Richard Henderson wrote: > About half of the values to which CPU_CFLAGS is set > have multiple space separated arguments. > > Signed-off-by: Richard Henderson Reviewed-by: Philippe Mathieu-Daudé Tested-by: Philippe Mathieu-Daudé > --- > configure | 16 >

<    1   2   3   4