Re: [Qemu-devel] [PATCH] qemu-common.h: Drop WORDS_ALIGNED define

2016-06-05 Thread Michael Tokarev
02.06.2016 17:05, Peter Maydell wrote: > The WORDS_ALIGNED #define is not used anywhere, and hasn't been since > 2013 when commit 612d590ebc6cef rewrote the various ld__p > functions to not use it. Remove the #define and the comment describing it. > Also remove the line in the comment about TARGET_

Re: [Qemu-devel] [Qemu-trivial] [PATCH] thunk: Rename args and fields in host-target bitmask conversion code

2016-06-05 Thread Michael Tokarev
02.06.2016 19:10, Peter Maydell wrote: > The target_to_host_bitmask() and host_to_target_bitmask() functions > and the associated struct bitmask_transtbl are completely generic, > but for historical reasons the target related fields and parameters > are named 'x86' and the host related fields are n

Re: [Qemu-devel] [PATCH] thunk: Drop unused NO_THUNK_TYPE_SIZE guards

2016-06-05 Thread Michael Tokarev
02.06.2016 18:28, Peter Maydell wrote: > The thunk_type_size_array() and thunk_type_align_array() functions > are only provided if NO_THUNK_TYPE_SIZE is not defined. However > nothing in the codebase defines that, and so in fact these functions > are always present. Drop the unnecessary #ifdefs. A

Re: [Qemu-devel] [PATCH] pc: Use fstat in get_file_size()

2016-06-05 Thread Michael Tokarev
Please direct all patches to qemu-devel@ too, don't use ONLY qemu-trivial. Thanks. 01.06.2016 17:23, Fabien Siron wrote: > As mentioned in the comment, fstat is quite simpler than playing with > ftell() and fseek(). > > Signed-off-by: Fabien Siron > --- > hw/i386/pc.c | 13 + > 1 f

Re: [Qemu-devel] [PATCH] pc: Use fstat in get_file_size()

2016-06-05 Thread Michael Tokarev
Please direct all patches to qemu-devel@ too, don't use ONLY qemu-trivial. Thanks. 01.06.2016 17:23, Fabien Siron wrote: > As mentioned in the comment, fstat is quite simpler than playing with > ftell() and fseek(). > > Signed-off-by: Fabien Siron > --- > hw/i386/pc.c | 13 + > 1 f

Re: [Qemu-devel] [PATCH 00/16] use macro DIV_ROUND_UP instead of (((n) + (d) - 1) /(d))

2016-06-05 Thread Michael Tokarev
31.05.2016 19:35, Laurent Vivier wrote: > This patch series is the result of coccinelle > script scripts/coccinelle/round.coccii, added by the first patch. > > Laurent Vivier (16): > coccinelle: use macro DIV_ROUND_UP instead of (((n) + (d) - 1) /(d)) > parallels: Use DIV_ROUND_UP > qcow/qco

[Qemu-devel] [PULL 11/52] remove useless muldiv64()

2016-06-05 Thread Michael Tokarev
From: Laurent Vivier muldiv64(a, 1, b) is like "a / b". This patch is the result of coccinelle script scripts/coccinelle/remove_muldiv64.cocci. Signed-off-by: Laurent Vivier Reviewed-by: Richard Henderson Signed-off-by: Michael Tokarev --- hw/usb/hcd-ohci.c | 2 +- 1 file changed, 1 inserti

[Qemu-devel] [PULL 09/52] scripts: add muldiv64() checking coccinelle scripts

2016-06-05 Thread Michael Tokarev
From: Laurent Vivier Signed-off-by: Laurent Vivier Signed-off-by: Michael Tokarev --- scripts/coccinelle/overflow_muldiv64.cocci | 16 scripts/coccinelle/remove_muldiv64.cocci | 6 ++ scripts/coccinelle/simplify_muldiv64.cocci | 11 +++ scripts/coccinelle/swap_m

[Qemu-devel] [PULL 06/52] target-moxie: Remove unused struct elements

2016-06-05 Thread Michael Tokarev
From: Stefan Weil Signed-off-by: Stefan Weil Signed-off-by: Michael Tokarev --- target-moxie/mmu.h | 5 - 1 file changed, 5 deletions(-) diff --git a/target-moxie/mmu.h b/target-moxie/mmu.h index abc7929..284a44d 100644 --- a/target-moxie/mmu.h +++ b/target-moxie/mmu.h @@ -6,11 +6,6 @@ t

[Qemu-devel] [PULL 10/52] The only 64bit parameter of muldiv64() is the first one.

2016-06-05 Thread Michael Tokarev
From: Laurent Vivier muldiv64() is "uint64_t muldiv64(uint64_t a, uint32_t b, uint32_t c)" Some time it is used as muldiv64(uint32_t a, uint64_t b, uint32_t c)" This patch is the result of coccinelle script scripts/coccinelle/swap_muldiv64.cocci to reorder arguments. Signed-off-by: Laurent Viv

[Qemu-devel] [PULL 08/52] gdbstub: set listen backlog to 1

2016-06-05 Thread Michael Tokarev
From: Peter Wu Avoid possible connection drops on Linux (when tcp_syncookies is disabled) or fallbacks to SYN cookies with the following kernel warning: TCP: request_sock_TCP: Possible SYN flooding on port 1234. Sending cookies. Check SNMP counters. Since Linux 4.4 (ef547f2ac16b "tcp: rem

[Qemu-devel] [PULL 19/52] monitor: Typo fix

2016-06-05 Thread Michael Tokarev
From: Eric Blake s/partinal/partial/ Signed-off-by: Eric Blake Signed-off-by: Michael Tokarev --- monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monitor.c b/monitor.c index 404d594..a27e115 100644 --- a/monitor.c +++ b/monitor.c @@ -320,7 +320,7 @@ static void m

[Qemu-devel] [PULL 20/52] qdev: Clean up around properties

2016-06-05 Thread Michael Tokarev
From: Cao jin include: 1. remove unnecessary declaration of static function 2. fix inconsistency between comment and function name, and typo OOM->QOM 2. update comments of functions, use uniform format(GTK-Doc style) Signed-off-by: Cao jin Reviewed-by: Markus Armbruster Signed-off-by: Michael

[Qemu-devel] [PULL 00/52] Trivial patches for 2016-06-05

2016-06-05 Thread Michael Tokarev
This is a big pile of patches collected in -trivial queue for quite a while. I was busy with other stuff in recent months, now am trying to catch up. This is the result, with everything all over. Please consider pulling. /mjt The following changes since commit 6b3532b20b787cbd697a68b383232f5c3

[Qemu-devel] [PULL 25/52] Fix configure test for PBKDF2 in nettle

2016-06-05 Thread Michael Tokarev
From: Steven Luo On my Debian jessie system, including nettle/pbkdf2.h does not cause NULL to be defined, which causes the test to fail to compile. Include stddef.h to bring in a definition of NULL. Cc: qemu-triv...@nongnu.org Cc: qemu-sta...@nongnu.org Signed-off-by: Steven Luo Signed-off-by:

[Qemu-devel] [PULL 31/52] all: Remove unnecessary glib.h includes

2016-06-05 Thread Michael Tokarev
From: Peter Maydell Remove glib.h includes, as it is provided by osdep.h. This commit was created with scripts/clean-includes. Signed-off-by: Peter Maydell Reviewed-by: Eric Blake Tested-by: Eric Blake Signed-off-by: Michael Tokarev --- block/dmg.c | 1 - block/vhd

[Qemu-devel] [PULL 14/52] Fix linking relocatable objects on Sparc

2016-06-05 Thread Michael Tokarev
From: James Clarke On Sparc, gcc implicitly passes --relax to the linker, but -r is incompatible with this. Therefore, if --no-relax is supported, it should be passed to the linker. Signed-off-by: James Clarke Signed-off-by: Michael Tokarev --- configure | 13 + rules.mak | 2 +-

[Qemu-devel] [PULL 07/52] po/Makefile: call rm -f directly

2016-06-05 Thread Michael Tokarev
From: Jan Vesely Default variables are undefined in rules.mak and this is what the rest of the build system uses. Fixes make clean in ./po/ Signed-off-by: Jan Vesely Signed-off-by: Michael Tokarev --- po/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/po/Makefile

[Qemu-devel] [PULL 36/52] thunk: Rename args and fields in host-target bitmask conversion code

2016-06-05 Thread Michael Tokarev
From: Peter Maydell The target_to_host_bitmask() and host_to_target_bitmask() functions and the associated struct bitmask_transtbl are completely generic, but for historical reasons the target related fields and parameters are named 'x86' and the host related fields are named 'alpha'. Rename them

[Qemu-devel] [PULL 24/52] docs: Fix a couple of typos in throttle.txt

2016-06-05 Thread Michael Tokarev
From: Alberto Garcia Signed-off-by: Alberto Garcia Reviewed-by: Eric Blake Signed-off-by: Michael Tokarev --- docs/throttle.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/throttle.txt b/docs/throttle.txt index 06ed9b3..26d4d51 100644 --- a/docs/throttle.txt +

[Qemu-devel] [PULL 29/52] tests: Remove unnecessary glib.h includes

2016-06-05 Thread Michael Tokarev
From: Peter Maydell Remove glib.h includes, as it is provided by osdep.h. This commit was created with scripts/clean-includes. Signed-off-by: Peter Maydell Reviewed-by: Eric Blake Tested-by: Eric Blake Signed-off-by: Michael Tokarev --- tests/ac97-test.c | 1 - tests/ahci-

[Qemu-devel] [PULL 50/52] pc-bios/s390-ccw: Use DIV_ROUND_UP

2016-06-05 Thread Michael Tokarev
From: Laurent Vivier Replace (((n) + (d) - 1) /(d)) by DIV_ROUND_UP(n,d). This patch is the result of coccinelle script scripts/coccinelle/round.cocci CC: Cornelia Huck Signed-off-by: Laurent Vivier Signed-off-by: Michael Tokarev --- pc-bios/s390-ccw/bootmap.c | 2 +- 1 file changed, 1 inse

[Qemu-devel] [PULL 42/52] crypto: Use DIV_ROUND_UP

2016-06-05 Thread Michael Tokarev
From: Laurent Vivier Replace (((n) + (d) - 1) /(d)) by DIV_ROUND_UP(n,d). This patch is the result of coccinelle script scripts/coccinelle/round.cocci CC: Daniel P. Berrange Signed-off-by: Laurent Vivier Reviewed-by: Daniel P. Berrange Signed-off-by: Michael Tokarev --- crypto/block-luks.c

[Qemu-devel] [PULL 52/52] hbitmap: Use DIV_ROUND_UP

2016-06-05 Thread Michael Tokarev
From: Laurent Vivier Replace (((n) + (d) - 1) /(d)) by DIV_ROUND_UP(n,d). This patch is the result of coccinelle script scripts/coccinelle/round.cocci CC: Paolo Bonzini Signed-off-by: Laurent Vivier Reviewed-by: John Snow Signed-off-by: Michael Tokarev --- tests/test-hbitmap.c | 6 +++---

[Qemu-devel] [PULL 13/52] ppc: Remove a potential overflow in muldiv64()

2016-06-05 Thread Michael Tokarev
From: Laurent Vivier The coccinelle script: scripts/coccinelle/overflow_muldiv64.cocci gives us a list of potential overflows in muldiv64() (the two first parameters are 64bit values). This patch fixes one, as the fix seems obvious: replace muldiv64(a, b, c) by muldiv64(b, a, c) as "a" and "b"

[Qemu-devel] [PULL 30/52] qga: Remove unnecessary glib.h includes

2016-06-05 Thread Michael Tokarev
From: Peter Maydell Remove glib.h includes, as it is provided by osdep.h. This commit was created with scripts/clean-includes. Signed-off-by: Peter Maydell Reviewed-by: Eric Blake Tested-by: Eric Blake Signed-off-by: Michael Tokarev --- qga/channel-posix.c | 1 - qga/channel-wi

[Qemu-devel] [PULL 23/52] hw: Clean up includes

2016-06-05 Thread Michael Tokarev
From: Peter Maydell Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by: Peter Maydell Reviewed-by: Eric Blake Signed-off-by: Michael Tokarev --- hw/intc/aspeed_vic.c

[Qemu-devel] [PULL 04/52] qga: spelling fix

2016-06-05 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- qga/commands-posix.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/qga/commands-posix.c b/qga/commands-posix.c index 2ae3725..f0057f5 100644 --- a/qga/commands-posix.c +++ b/qga/commands-posix.c @@ -1242,8 +1242,8 @@ int64_t qm

[Qemu-devel] [PULL 43/52] xen: Use DIV_ROUND_UP

2016-06-05 Thread Michael Tokarev
From: Laurent Vivier Replace (((n) + (d) - 1) /(d)) by DIV_ROUND_UP(n,d). This patch is the result of coccinelle script scripts/coccinelle/round.cocci CC: Stefano Stabellini Signed-off-by: Laurent Vivier Reviewed-by: Stefano Stabellini Signed-off-by: Michael Tokarev --- hw/display/xenfb.c

[Qemu-devel] [PULL 35/52] thunk: Drop unused NO_THUNK_TYPE_SIZE guards

2016-06-05 Thread Michael Tokarev
From: Peter Maydell The thunk_type_size_array() and thunk_type_align_array() functions are only provided if NO_THUNK_TYPE_SIZE is not defined. However nothing in the codebase defines that, and so in fact these functions are always present. Drop the unnecessary #ifdefs. (Over a decade ago thunk.h

Re: [Qemu-devel] [PATCH v2 2/3] hw/iommu: enable iommu with -device

2016-06-05 Thread Marcel Apfelbaum
On 06/03/2016 07:07 PM, Michael S. Tsirkin wrote: On Thu, Jun 02, 2016 at 11:15:54PM +0300, Marcel Apfelbaum wrote: Use the standard '-device iommu' instead of '-machine,iommu=on' to create the IOMMU device. Signed-off-by: Marcel Apfelbaum Hi Michael, Thank you for the review. Why can't

[Qemu-devel] [PULL 51/52] qemu-timer: Use DIV_ROUND_UP

2016-06-05 Thread Michael Tokarev
From: Laurent Vivier Replace (((n) + (d) - 1) /(d)) by DIV_ROUND_UP(n,d). This patch is the result of coccinelle script scripts/coccinelle/round.cocci CC: Paolo Bonzini Signed-off-by: Laurent Vivier Signed-off-by: Michael Tokarev --- qemu-timer.c | 2 +- 1 file changed, 1 insertion(+), 1 de

[Qemu-devel] [PULL 21/52] fw_cfg: follow CODING_STYLE

2016-06-05 Thread Michael Tokarev
From: Cao jin Replace tab with 4 spaces; brace the indented statement. Signed-off-by: Cao jin Acked-by: Corey Minyard Signed-off-by: Michael Tokarev --- hw/nvram/fw_cfg.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/hw/nvram/fw_cfg.c b/hw/nvram/fw_cf

[Qemu-devel] [PULL 02/52] hw/ipmi: fix spelling

2016-06-05 Thread Michael Tokarev
Signed-off-by: Michael Tokarev Acked-by: Corey Minyard --- hw/ipmi/ipmi_bmc_extern.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/ipmi/ipmi_bmc_extern.c b/hw/ipmi/ipmi_bmc_extern.c index fe12112..157879e 100644 --- a/hw/ipmi/ipmi_bmc_extern.c +++ b/hw/ipmi/ipmi_bmc_exte

[Qemu-devel] [PULL 12/52] replace muldiv64(a, b, c) by (uint64_t)a * b / c

2016-06-05 Thread Michael Tokarev
From: Laurent Vivier When "a" and "b" are 32bit values, we don't have to cast them to 128bit, 64bit is enough. This patch is the result of coccinelle script scripts/coccinelle/simplify_muldiv64.cocci Signed-off-by: Laurent Vivier For xtensa PIC: Acked-by: Max Filippov Signed-off-by: Michael T

[Qemu-devel] [PULL 41/52] block: Use DIV_ROUND_UP

2016-06-05 Thread Michael Tokarev
From: Laurent Vivier Replace (((n) + (d) - 1) /(d)) by DIV_ROUND_UP(n,d). This patch is the result of coccinelle script scripts/coccinelle/round.cocci CC: qemu-bl...@nongnu.org Signed-off-by: Laurent Vivier Reviewed-by: Eric Blake Signed-off-by: Michael Tokarev --- block/vvfat.c | 3 +-

[Qemu-devel] [PULL 16/52] configure: Use $(..) instead of deprecated `..`

2016-06-05 Thread Michael Tokarev
From: Stefan Weil This fixes these warnings from shellcheck: ^-- SC2006: Use $(..) instead of deprecated `..` Signed-off-by: Stefan Weil Signed-off-by: Michael Tokarev --- configure | 174 +++--- 1 file changed, 87 insertions(+), 87

Re: [Qemu-devel] [PATCH] target-*: dfilter support for in_asm

2016-06-05 Thread Alex Bennée
Richard Henderson writes: > The arm target was handled by 06486077, but other targets > were ignored. This handles all the rest which actually support > disassembly (that is, skipping moxie and tilegx). Sorry about that. > > Signed-off-by: Richard Henderson Reviewed-by: Alex Bennée > ---

[Qemu-devel] [PATCH] hw/i386/pc: Use fstat in get_file_size()

2016-06-05 Thread Fabien Siron
As mentioned in the comment, fstat is quite simpler than playing with ftell() and fseek() Signed-off-by: Fabien Siron --- hw/i386/pc.c | 13 +++-- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index e29ccc8..186dfe4 100644 --- a/hw/i386/pc.c +

Re: [Qemu-devel] [PATCH v2 2/3] hw/iommu: enable iommu with -device

2016-06-05 Thread Michael S. Tsirkin
On Sun, Jun 05, 2016 at 11:46:13AM +0300, Marcel Apfelbaum wrote: > On 06/03/2016 07:07 PM, Michael S. Tsirkin wrote: > >On Thu, Jun 02, 2016 at 11:15:54PM +0300, Marcel Apfelbaum wrote: > >>Use the standard '-device iommu' instead of '-machine,iommu=on' > >>to create the IOMMU device. > >> > >>Sig

[Qemu-devel] [PULL 22/52] replay: Clean up includes

2016-06-05 Thread Michael Tokarev
From: Peter Maydell Clean up includes so that osdep.h is included first and headers which it implies are not included manually. This commit was created with scripts/clean-includes. Signed-off-by: Peter Maydell Reviewed-by: Eric Blake Signed-off-by: Michael Tokarev --- replay/replay-char.c |

[Qemu-devel] [PULL 45/52] SPICE: Use DIV_ROUND_UP

2016-06-05 Thread Michael Tokarev
From: Laurent Vivier Replace (((n) + (d) - 1) /(d)) by DIV_ROUND_UP(n,d). This patch is the result of coccinelle script scripts/coccinelle/round.cocci CC: Gerd Hoffmann Signed-off-by: Laurent Vivier Signed-off-by: Michael Tokarev --- ui/spice-display.c | 2 +- 1 file changed, 1 insertion(+)

[Qemu-devel] [PULL 03/52] docs: "specify" spell fix

2016-06-05 Thread Michael Tokarev
Signed-off-by: Michael Tokarev Reviewed-by: Eric Blake --- docs/qapi-code-gen.txt | 2 +- qemu-options.hx| 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/qapi-code-gen.txt b/docs/qapi-code-gen.txt index d7d6987..eff2075 100644 --- a/docs/qapi-code-gen.txt +++

[Qemu-devel] [PULL 39/52] qcow/qcow2: Use DIV_ROUND_UP

2016-06-05 Thread Michael Tokarev
From: Laurent Vivier Replace (((n) + (d) - 1) /(d)) by DIV_ROUND_UP(n,d). This patch is the result of coccinelle script scripts/coccinelle/round.cocci CC: qemu-bl...@nongnu.org Signed-off-by: Laurent Vivier Reviewed-by: Eric Blake Signed-off-by: Michael Tokarev --- block/qcow.c |

[Qemu-devel] [PULL 33/52] host-utils: Prefer 'false' for bool type

2016-06-05 Thread Michael Tokarev
From: Eric Blake Mixing '0' and 'bool' looks stupid. Signed-off-by: Eric Blake Signed-off-by: Michael Tokarev --- include/qemu/host-utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qemu/host-utils.h b/include/qemu/host-utils.h index 1cdae0d..3de7d4e 100644 -

[Qemu-devel] [PULL 49/52] linux-user: Use DIV_ROUND_UP

2016-06-05 Thread Michael Tokarev
From: Laurent Vivier Replace (((n) + (d) - 1) /(d)) by DIV_ROUND_UP(n,d). This patch is the result of coccinelle script scripts/coccinelle/round.cocci CC: Riku Voipio Signed-off-by: Laurent Vivier Signed-off-by: Michael Tokarev --- linux-user/syscall.c | 4 ++-- 1 file changed, 2 insertions

Re: [Qemu-devel] [PATCH v2 2/3] hw/iommu: enable iommu with -device

2016-06-05 Thread Marcel Apfelbaum
On 06/05/2016 12:59 PM, Michael S. Tsirkin wrote: On Sun, Jun 05, 2016 at 11:46:13AM +0300, Marcel Apfelbaum wrote: On 06/03/2016 07:07 PM, Michael S. Tsirkin wrote: On Thu, Jun 02, 2016 at 11:15:54PM +0300, Marcel Apfelbaum wrote: Use the standard '-device iommu' instead of '-machine,iommu=on

Re: [Qemu-devel] Cocoa front-end not displaying guest anymore

2016-06-05 Thread Mark Cave-Ayland
On 04/06/16 17:54, Programmingkid wrote: > When I start qemu-system-ppc, the OpenBIOS screen is not displayed. If I > switch to the serial console and then back to the VGA console, I see this > message on the screen: "Guest has not initialized the display (yet)." > > Command-line used: > ./ppc-

[Qemu-devel] [PULL 28/52] clean-includes: Add glib.h to list of unneeded includes

2016-06-05 Thread Michael Tokarev
From: Peter Maydell osdep.h pulls in glib.h via glib-compat.h, so add it to the list of includes that we remove. (This then means we must avoid running clean-includes on glib-compat.h or it will delete the glib.h include.) Signed-off-by: Peter Maydell Reviewed-by: Eric Blake Tested-by: Eric Bl

[Qemu-devel] [PULL 40/52] qed: Use DIV_ROUND_UP

2016-06-05 Thread Michael Tokarev
From: Laurent Vivier Replace (((n) + (d) - 1) /(d)) by DIV_ROUND_UP(n,d). This patch is the result of coccinelle script scripts/coccinelle/round.cocci CC: qemu-bl...@nongnu.org Signed-off-by: Laurent Vivier Reviewed-by: Eric Blake Signed-off-by: Michael Tokarev --- block/qed-check.c | 3 +--

[Qemu-devel] [PULL 44/52] audio: Use DIV_ROUND_UP

2016-06-05 Thread Michael Tokarev
From: Laurent Vivier Replace (((n) + (d) - 1) /(d)) by DIV_ROUND_UP(n,d). This patch is the result of coccinelle script scripts/coccinelle/round.cocci CC: Gerd Hoffmann Signed-off-by: Laurent Vivier Signed-off-by: Michael Tokarev --- hw/audio/pcspk.c | 2 +- 1 file changed, 1 insertion(+),

[Qemu-devel] [PULL 47/52] usb: Use DIV_ROUND_UP

2016-06-05 Thread Michael Tokarev
From: Laurent Vivier Replace (((n) + (d) - 1) /(d)) by DIV_ROUND_UP(n,d). This patch is the result of coccinelle script scripts/coccinelle/round.cocci CC: Gerd Hoffmann Signed-off-by: Laurent Vivier Signed-off-by: Michael Tokarev --- hw/usb/redirect.c | 6 +++--- 1 file changed, 3 insertion

[Qemu-devel] [PULL 37/52] coccinelle: use macro DIV_ROUND_UP instead of (((n) + (d) - 1) /(d))

2016-06-05 Thread Michael Tokarev
From: Laurent Vivier sample from http://coccinellery.org/ Signed-off-by: Laurent Vivier Reviewed-by: Eric Blake Signed-off-by: Michael Tokarev --- scripts/coccinelle/round.cocci | 19 +++ 1 file changed, 19 insertions(+) create mode 100644 scripts/coccinelle/round.cocci dif

[Qemu-devel] [PULL 48/52] slirp: Use DIV_ROUND_UP

2016-06-05 Thread Michael Tokarev
From: Laurent Vivier Replace (((n) + (d) - 1) /(d)) by DIV_ROUND_UP(n,d). This patch is the result of coccinelle script scripts/coccinelle/round.cocci CC: Samuel Thibault Signed-off-by: Laurent Vivier Acked-by: Samuel Thibault Signed-off-by: Michael Tokarev --- slirp/dnssearch.c | 4 ++--

Re: [Qemu-devel] [PATCH 10/10] target-avr: fixing code style

2016-06-05 Thread Peter Maydell
On 4 June 2016 at 23:33, Richard Henderson wrote: > On 06/04/2016 11:34 AM, Michael Rolnik wrote: >> >> understood. but I am totally lost now. what should I do now. >> I've sent a set of patches last Friday, they should include all the fixes. > > > For the next round: > > git format-patch --cove

[Qemu-devel] [PULL 27/52] pc: cleanup unused struct PcRomPciInfo

2016-06-05 Thread Michael Tokarev
From: Igor Mammedov Signed-off-by: Igor Mammedov Reviewed-by: Eduardo Habkost Signed-off-by: Michael Tokarev --- hw/i386/pc.c | 8 1 file changed, 8 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index e29ccc8..b0a4bec 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1149,14

[Qemu-devel] [PULL 01/52] s390x/virtio-ccw: fix spelling

2016-06-05 Thread Michael Tokarev
Signed-off-by: Michael Tokarev Acked-by: Christian Borntraeger Acked-by: Cornelia Huck --- hw/s390x/virtio-ccw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index a1c1ed9..2b68e5e 100644 --- a/hw/s390x/virtio-ccw.c +++ b/hw/s

[Qemu-devel] [PULL 46/52] rocker: Use DIV_ROUND_UP

2016-06-05 Thread Michael Tokarev
From: Laurent Vivier Replace (((n) + (d) - 1) /(d)) by DIV_ROUND_UP(n,d). This patch is the result of coccinelle script scripts/coccinelle/round.cocci CC: Scott Feldman Signed-off-by: Laurent Vivier Signed-off-by: Michael Tokarev --- hw/net/rocker/rocker_of_dpa.c | 5 ++--- 1 file changed,

[Qemu-devel] [PULL 17/52] scripts: Use $(..) instead of deprecated `..`

2016-06-05 Thread Michael Tokarev
From: Stefan Weil This fixes these warnings from shellcheck: ^-- SC2006: Use $(..) instead of deprecated `..` Update also a comment using the same pattern. Signed-off-by: Stefan Weil Signed-off-by: Michael Tokarev --- scripts/clean-includes | 2 +- scripts/create_config

[Qemu-devel] [PULL 26/52] e1000: Removing unnecessary if statement

2016-06-05 Thread Michael Tokarev
From: Sameeh Jubran Since mit_delay can never be 0 this if statement is superfluous. Signed-off-by: Sameeh Jubran Reviewed-by: Stefan Weil Signed-off-by: Michael Tokarev --- hw/net/e1000.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hw/net/e1000.c b/hw/net/e10

[Qemu-devel] [PULL 34/52] qemu-common.h: Drop WORDS_ALIGNED define

2016-06-05 Thread Michael Tokarev
From: Peter Maydell The WORDS_ALIGNED #define is not used anywhere, and hasn't been since 2013 when commit 612d590ebc6cef rewrote the various ld__p functions to not use it. Remove the #define and the comment describing it. Also remove the line in the comment about TARGET_WORDS_ALIGNED, since it h

Re: [Qemu-devel] [PATCH 2/2] Explicitly print out default vnc option in use

2016-06-05 Thread Robert Hu
On Tue, 2016-05-31 at 13:17 +0200, Markus Armbruster wrote: > Robert Hu writes: > > > On Tue, 2016-05-31 at 09:51 +0200, Markus Armbruster wrote: > >> Robert Ho writes: > >> > >> > If no display option defined in QEMU command line, and SDL is not > >> > available, then it by default uses '-vnc

[Qemu-devel] [PULL 00/25] pc, pci, virtio: new features, cleanups, fixes

2016-06-05 Thread Michael S. Tsirkin
The following changes since commit 6b3532b20b787cbd697a68b383232f5c3b39bd1e: Merge remote-tracking branch 'remotes/kraxel/tags/pull-ui-20160603-1' into staging (2016-06-03 12:03:36 +0100) are available in the git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_ups

[Qemu-devel] [PULL 02/25] acpi: add aml_debug()

2016-06-05 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum --- include/hw/acpi/aml-build.h | 1 + hw/acpi/aml-build.c | 9 + 2 files changed, 10 insertions(+) diff --git a/include/hw/acpi/a

[Qemu-devel] [PULL 06/25] pc: acpi: consolidate \GPE._E02 with the rest of CPU hotplug AML

2016-06-05 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum --- hw/acpi/cpu_hotplug_acpi_table.c | 4 hw/i386/acpi-build.c | 4 2 files changed, 4 insertions(+), 4 deletions(-) diff --

[Qemu-devel] [PULL 12/25] tests: acpi: update tables with consolidated legacy cpu-hotplug AML

2016-06-05 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- tests/acpi-test-data/pc/DSDT | Bin 5587 -> 5503 bytes tests/acpi-test-data/pc/DSDT.bridge | Bin 7446 -> 7362 bytes tests/acpi-test-data/q35/DSDT| Bin 8357

[Qemu-devel] [PULL 03/25] acpi: add aml_refof()

2016-06-05 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum --- include/hw/acpi/aml-build.h | 1 + hw/acpi/aml-build.c | 8 2 files changed, 9 insertions(+) diff --git a/include/hw/acpi/aml

[Qemu-devel] [PULL 10/25] pc: acpi: simplify build_legacy_cpu_hotplug_aml() signature

2016-06-05 Thread Michael S. Tsirkin
From: Igor Mammedov since IO block used by CPU hotplug is fixed size and initialized it the same file as build_legacy_cpu_hotplug_aml() just use ACPI_GPE_PROC_LEN directly instead of passing it around in several files. Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by:

[Qemu-devel] [PULL 01/25] tests: acpi: report names of expected files in verbose mode

2016-06-05 Thread Michael S. Tsirkin
From: Igor Mammedov print expected file name if it doesn't exists if verbose mode is enabled*. It helps to avoid running bios-tables-test under debugger to figure out missing file name. *) verbose mode is enabled if "V" env. variable is set Signed-off-by: Igor Mammedov Reviewed-by: Michael S.

[Qemu-devel] [PULL 13/25] ipmi: rework the fwinfo to be fetched from the interface

2016-06-05 Thread Michael S. Tsirkin
From: Corey Minyard Instead of scanning IPMI devices from a fwinfo list, allow the fwinfo to be fetched from the IPMI interface class. Then the code looking for IPMI fwinfo can scan devices on a bus and look for ones that implement the IPMI class. This will let the ACPI scope be defined by the c

[Qemu-devel] [PULL 04/25] pc: acpi: remove AML for empty/not used GPE handlers

2016-06-05 Thread Michael S. Tsirkin
From: Igor Mammedov ACPI spec requires GPE handlers only for GPE events that hardware implements. So remove AML for not supported by QEMU device model events. Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum Reviewed

[Qemu-devel] [PULL 05/25] pc: acpi: consolidate CPU hotplug AML

2016-06-05 Thread Michael S. Tsirkin
From: Igor Mammedov move the former SSDT part of CPU hoplug close to DSDT part. AML is only moved but there isn't any functional change. Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- include/hw/acpi/cpu_hotplug.h| 3 +- hw/acpi/cpu_h

[Qemu-devel] [PULL 09/25] pc: acpi: consolidate legacy CPU hotplug in one file

2016-06-05 Thread Michael S. Tsirkin
From: Igor Mammedov Since AML part of CPU hotplug is tightly coupled with its hardware part (IO port layout/protocol), move build_legacy_cpu_hotplug_aml() to cpu_hotplug.c and remove empty cpu_hotplug_acpi_table.c Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Mich

[Qemu-devel] [PULL 14/25] pc: Postpone SMBIOS table installation to post machine init

2016-06-05 Thread Michael S. Tsirkin
From: Corey Minyard This is the same place that the ACPI SSDT table gets added, so that devices can add themselves to the SMBIOS table. Signed-off-by: Corey Minyard Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin --- hw/i386/pc.c | 5 +++-- 1 file changed, 3 insertions(+),

[Qemu-devel] [PULL 20/25] tpm: apci: cleanup TCPA table initialization

2016-06-05 Thread Michael S. Tsirkin
From: Igor Mammedov At the time build_tpm_tcpa() is called the tcpalog size is always 0, so log_area_start_address which is actually offset from the start of ACPI_BUILD_TPMLOG_FILE is always 0. Also as 'TCPA' is allocated 0 filled, there is no point in calculating always 0 log_area_start_address

[Qemu-devel] [PULL 07/25] pc: acpi: cpu-hotplug: make AML CPU_foo defines local to cpu_hotplug_acpi_table.c

2016-06-05 Thread Michael S. Tsirkin
From: Igor Mammedov now as those defines are used only locally inside of cpu_hotplug_acpi_table.c, move them out of header file. Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum --- include/hw/acpi/cpu_hotplug.h

[Qemu-devel] [PULL 11/25] pc: acpi: cpuhp-legacy: switch ProcessorID to possible_cpus idx

2016-06-05 Thread Michael S. Tsirkin
From: Igor Mammedov In legacy cpu-hotplug ProcessorID == APIC ID is used in MADT and cpu-hotplug AML. It was fine as both are 8bit and unique. Spec depricated Processor() with corresponding ProcessorID and advises to use Device() and UID instead of it. However UID is just 32bit and it can't fit

[Qemu-devel] [PULL 15/25] acpi: extend ACPI interface to provide send_event hook

2016-06-05 Thread Michael S. Tsirkin
From: Igor Mammedov send_event() hook will allow to send ACPI event in a target specific way (GPE or GPIO based impl.) it will also simplify proxy wrappers in piix4pm/ich9 that access ACPI regs and SCI which are part of piix4pm/lcp_ich9 devices and call acpi_foo() API directly. Signed-off-by: Ig

[Qemu-devel] [PULL 08/25] pc: acpi: mark current CPU hotplug functions as legacy

2016-06-05 Thread Michael S. Tsirkin
From: Igor Mammedov Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S. Tsirkin Reviewed-by: Marcel Apfelbaum --- include/hw/acpi/cpu_hotplug.h| 12 ++-- hw/acpi/cpu_hotplug.c| 8 hw/acpi/cpu_hotplug_acpi_table.c | 4 ++--

[Qemu-devel] [PULL 24/25] pc-dimm: introduce realize callback

2016-06-05 Thread Michael S. Tsirkin
From: Xiao Guangrong nvdimm needs to check if the backend memory is large enough to contain label data and init its memory region when the device is realized, so introduce realize callback which is called after common dimm has been realize Signed-off-by: Xiao Guangrong Reviewed-by: Michael S.

[Qemu-devel] [PULL 23/25] pc-dimm: get memory region from ->get_memory_region()

2016-06-05 Thread Michael S. Tsirkin
From: Xiao Guangrong Curretly, the memory region of backed memory is all directly mapped to guest's address space, however, it will be not true for nvdimm device if we introduce nvdimm label which only can be indirectly accessed by ACPI DSM method Also it improves the comments a bit to reflect t

[Qemu-devel] [PULL 19/25] acpi: cleanup bios_linker_loader_cleanup()

2016-06-05 Thread Michael S. Tsirkin
From: Igor Mammedov bios_linker_loader_cleanup() is called only from one place and returned value is immediately freed wich makes returning pointer from bios_linker_loader_cleanup() useless. Cleanup bios_linker_loader_cleanup() by freeing data there so that caller won't have to free it. Signed-

[Qemu-devel] [PULL 16/25] pc: use AcpiDeviceIfClass.send_event to issue GPE events

2016-06-05 Thread Michael S. Tsirkin
From: Igor Mammedov it reduces number of args passed in handlers by 1 and a number of used proxy wrappers saving ~20LOC. Also it allows to make cpu/mem hotplug code more universal as it would allow ARM to reuse it without rewrite by providing its own send_event callback to trigger events usiong G

[Qemu-devel] [PULL 22/25] acpi: make bios_linker_loader_add_checksum() API offset based

2016-06-05 Thread Michael S. Tsirkin
From: Igor Mammedov It should help to make clear that bios_linker works in terms of offsets within a file. Also it should prevent mistakes where user passes as arguments pointers to unrelated to file blobs. While at it, considering that it's a ACPI checksum and it's initial value must be 0, move

Re: [Qemu-devel] [PATCH 0/2] Reveal 'to' parameter of 'vnc' option to user

2016-06-05 Thread Robert Hu
On Tue, 2016-05-31 at 14:59 +0200, Paolo Bonzini wrote: > > On 31/05/2016 09:03, Robert Ho wrote: > > I find that '-vnc' option actually has a parameter 'to', implicitly; > > while actually is there and can be used but not be public. > > Don't know why but this may probably confuse user, especiall

[Qemu-devel] [PULL 17/25] acpi: convert linker from GArray to BIOSLinker structure

2016-06-05 Thread Michael S. Tsirkin
From: Igor Mammedov Patch just changes type of of linker variables to a structure, there aren't any functional changes. Converting linker to a structure will allow to extend it functionality in follow up patch adding sanity blob checks. Signed-off-by: Igor Mammedov Reviewed-by: Michael S. Tsir

[Qemu-devel] [PULL 21/25] acpi: make bios_linker_loader_add_pointer() API offset based

2016-06-05 Thread Michael S. Tsirkin
From: Igor Mammedov cleanup bios_linker_loader_add_pointer() API by switching arguments to taking offsets relative to corresponding files instead of doing pointer arithmetic on behalf of user which were confusing. Also make offset inside of source file explicit in API so that user won't have to

[Qemu-devel] [PULL 25/25] virtio: move bi-endian target support to a single location

2016-06-05 Thread Michael S. Tsirkin
From: Greg Kurz Paolo's recent cpu.h cleanups broke legacy virtio for ppc64 LE guests (and arm BE guests as well, even if I have not verified that). Especially, commit "33c11879fd42 qemu-common: push cpu.h inclusion out of qemu-common.h" has the side-effect of silently hiding the TARGET_IS_BIENDI

[Qemu-devel] [PULL 32/52] docs/multi-thread-compression: Fix wrong command string

2016-06-05 Thread Michael Tokarev
From: Wei Jiangang s/info_migrate_capabilities/info migrate_capabilities Signed-off-by: Wei Jiangang Reviewed-by: Eric Blake Reviewed-by: Liang Li Signed-off-by: Michael Tokarev --- docs/multi-thread-compression.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/mu

[Qemu-devel] [PULL 18/25] acpi: simplify bios_linker API by removing redundant 'table' argument

2016-06-05 Thread Michael S. Tsirkin
From: Igor Mammedov 'table' argument in bios_linker_add_foo() commands is a data blob of one of files also passed to the same API. So instead of passing blob in every API call, add and keep file name association with related blob at bios_linker_loader_alloc() time. And find blob by name looking

[Qemu-devel] [PULL 05/52] fsdev: spelling fix

2016-06-05 Thread Michael Tokarev
Signed-off-by: Michael Tokarev --- fsdev/virtfs-proxy-helper.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsdev/virtfs-proxy-helper.texi b/fsdev/virtfs-proxy-helper.texi index 6eb2d50..f4cbb60 100644 --- a/fsdev/virtfs-proxy-helper.texi +++ b/fsdev/virtfs-proxy-helper.

[Qemu-devel] [PULL 38/52] parallels: Use DIV_ROUND_UP

2016-06-05 Thread Michael Tokarev
From: Laurent Vivier Replace (((n) + (d) - 1) /(d)) by DIV_ROUND_UP(n,d). This patch is the result of coccinelle script scripts/coccinelle/round.cocci CC: qemu-bl...@nongnu.org Signed-off-by: Laurent Vivier Reviewed-by: Eric Blake Signed-off-by: Michael Tokarev --- block/parallels.c | 2 +-

[Qemu-devel] [PULL 15/52] qemu-options.hx: Specify the units for -machine kvm_shadow_mem

2016-06-05 Thread Michael Tokarev
From: Peter Maydell The -machine kvm_shadow_mem option takes a size in bytes; say so explicitly in its documentation. Signed-off-by: Peter Maydell Reported-by: Tobi (github.com/tobimensch) Signed-off-by: Michael Tokarev --- qemu-options.hx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[Qemu-devel] [PULL 18/52] ICH9: fix typo

2016-06-05 Thread Michael Tokarev
From: Cao jin Signed-off-by: Cao jin Signed-off-by: Michael Tokarev --- hw/isa/lpc_ich9.c | 4 ++-- include/hw/i386/ich9.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/hw/isa/lpc_ich9.c b/hw/isa/lpc_ich9.c index 4f8ca45..1d27ea3 100644 --- a/hw/isa/lpc_ich9.c +

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

2016-06-05 Thread Peter Wu
While waiting for a gdb response, or while sending an acknowledgement there is not much to do, so do not mark the socket as non-blocking to avoid a busy loop while paused at gdb. This only affects the user-mode emulation (qemu-arm -g 1234 ./a.out). Note that this issue was reported before at https

[Qemu-devel] [Bug 1589257] [NEW] Boot with OVMF extremely slow to bootloader

2016-06-05 Thread Piknik
Public bug reported: I have used Arch Linux in the past with the same version (2.5.0), the exact same OVMF code and vars, and the exact same VM settings with no issues. Now with Ubuntu, I am having the issue where boot up until Windows takes about 10x longer. Every CPU thread/core allocated gets u

Re: [Qemu-devel] [PATCH v3 1/2] target-i386: KVM: add basic Intel LMCE support

2016-06-05 Thread Haozhong Zhang
On 06/03/16 17:57, Radim Krčmář wrote: > 2016-06-03 14:09+0800, Haozhong Zhang: > > This patch adds the support to inject SRAR and SRAO as LMCE, i.e. they > > will be injected to only one VCPU rather than broadcast to all > > VCPUs. As KVM reports LMCE support on Intel platforms, this features is >

Re: [Qemu-devel] [PATCH v3 1/2] target-i386: KVM: add basic Intel LMCE support

2016-06-05 Thread Haozhong Zhang
On 06/04/16 12:15, Boris Petkov wrote: > Haozhong Zhang wrote: > > >This patch adds the support to inject SRAR and SRAO as LMCE, i.e. they > >will be injected to only one VCPU rather than broadcast to all > >VCPUs. As KVM reports LMCE support on Intel platforms, this features is > >only available

Re: [Qemu-devel] [PATCH v3 1/2] target-i386: KVM: add basic Intel LMCE support

2016-06-05 Thread Haozhong Zhang
On 06/04/16 12:34, Boris Petkov wrote: > Haozhong Zhang wrote: > > >This patch adds the support to inject SRAR and SRAO as LMCE, i.e. they > >will be injected to only one VCPU rather than broadcast to all > >VCPUs. As KVM reports LMCE support on Intel platforms, this features is > >only available

Re: [Qemu-devel] [RFC v1 07/12] cpus: introduce async_safe_run_on_cpu.

2016-06-05 Thread Sergey Fedorov
On 15/04/16 17:23, Alex Bennée wrote: > diff --git a/cpu-exec-common.c b/cpu-exec-common.c > index 3d7eaa3..c2f7c29 100644 > --- a/cpu-exec-common.c > +++ b/cpu-exec-common.c > @@ -79,3 +79,4 @@ void cpu_loop_exit_restore(CPUState *cpu, uintptr_t pc) > cpu->current_tb = NULL; > siglongjmp

  1   2   >