All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 00/14] Trivial patches for 2017-02-28
@ 2017-02-28  6:44 Michael Tokarev
  2017-02-28  6:44 ` [Qemu-devel] [PULL 01/14] target/s390x: Fix typo Michael Tokarev
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: Michael Tokarev @ 2017-02-28  6:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: Michael Tokarev, qemu-trivial

This is yet another trivial patches pull request.
Please consider applying/pulling.

The following changes since commit 8f2d7c341184a95d05476ea3c45dbae2b9ddbe51:

  Merge remote-tracking branch 'remotes/berrange/tags/pull-qcrypto-2017-02-27-1' into staging (2017-02-27 15:33:21 +0000)

are available in the git repository at:

  git://git.corpit.ru/qemu.git tags/trivial-patches-fetch

for you to fetch changes up to f5507e0448bd34473af72509297617a783049024:

  syscall: fixed mincore(2) not failing with ENOMEM (2017-02-28 09:03:39 +0300)

----------------------------------------------------------------
trivial patches for 2017-02-28

----------------------------------------------------------------
Fam Zheng (1):
      cadence_gem: Remove unused parameter debug message

Franklin \"Snaipe\" Mathieu (1):
      syscall: fixed mincore(2) not failing with ENOMEM

Igor Pavlikevich (1):
      hw/acpi/tco.c: fix tco timer stop

John Snow (1):
      ide: remove undefined behavior in ide-test

Marc-André Lureau (1):
      Update copyright year

Peter Maydell (3):
      softfloat: Use correct type in float64_to_uint64_round_to_zero()
      CODING_STYLE: Mention preferred comment form
      lm32: milkymist-tmu2: fix a third integer overflow

Philippe Mathieu-Daudé (1):
      register: fix incorrect read mask

Stefan Weil (1):
      target/s390x: Fix typo

Thomas Huth (3):
      hw/core/or-irq: Mark the device with cannot_instantiate_with_device_add_yet
      hw/core/register: Mark the device with cannot_instantiate_with_device_add_yet
      tests/prom-env: Enable the test for the sun4u machine, too

Vincenzo Maffione (1):
      qemu-options.hx: add missing id=chr0 chardev argument in vhost-user example

 CODING_STYLE                |  7 +++++++
 fpu/softfloat.c             |  2 +-
 hw/acpi/tco.c               |  1 +
 hw/core/or-irq.c            |  3 +++
 hw/core/register.c          | 30 ++++++++++++++++++++++++------
 hw/display/milkymist-tmu2.c |  2 +-
 hw/net/cadence_gem.c        |  2 +-
 include/qemu-common.h       |  2 +-
 linux-user/syscall.c        | 11 ++++++++---
 qemu-options.hx             |  2 +-
 target/s390x/cpu_models.c   |  2 +-
 tests/Makefile.include      |  3 +--
 tests/ide-test.c            |  1 +
 tests/prom-env-test.c       |  2 +-
 14 files changed, 52 insertions(+), 18 deletions(-)

^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Qemu-devel] [PULL 01/14] target/s390x: Fix typo
  2017-02-28  6:44 [Qemu-devel] [PULL 00/14] Trivial patches for 2017-02-28 Michael Tokarev
@ 2017-02-28  6:44 ` Michael Tokarev
  2017-02-28  6:44 ` [Qemu-devel] [PULL 02/14] softfloat: Use correct type in float64_to_uint64_round_to_zero() Michael Tokarev
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Michael Tokarev @ 2017-02-28  6:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: Stefan Weil, qemu-trivial, Michael Tokarev

From: Stefan Weil <sw@weilnetz.de>

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 target/s390x/cpu_models.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c
index 5b66d33..2a894ee 100644
--- a/target/s390x/cpu_models.c
+++ b/target/s390x/cpu_models.c
@@ -671,7 +671,7 @@ static S390CPUModel *get_max_cpu_model(Error **errp)
     if (kvm_enabled()) {
         kvm_s390_get_host_cpu_model(&max_model, errp);
     } else {
-        /* TCG enulates a z900 */
+        /* TCG emulates a z900 */
         max_model.def = &s390_cpu_defs[0];
         bitmap_copy(max_model.features, max_model.def->default_feat,
                     S390_FEAT_MAX);
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Qemu-devel] [PULL 02/14] softfloat: Use correct type in float64_to_uint64_round_to_zero()
  2017-02-28  6:44 [Qemu-devel] [PULL 00/14] Trivial patches for 2017-02-28 Michael Tokarev
  2017-02-28  6:44 ` [Qemu-devel] [PULL 01/14] target/s390x: Fix typo Michael Tokarev
@ 2017-02-28  6:44 ` Michael Tokarev
  2017-02-28  6:44 ` [Qemu-devel] [PULL 03/14] hw/core/or-irq: Mark the device with cannot_instantiate_with_device_add_yet Michael Tokarev
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Michael Tokarev @ 2017-02-28  6:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, qemu-trivial, Michael Tokarev

From: Peter Maydell <peter.maydell@linaro.org>

In float64_to_uint64_round_to_zero() a typo meant that we were
taking the uint64_t return value from float64_to_uint64() and
putting it into an int64_t variable before returning it as
uint64_t again. Use uint64_t instead of pointlessly casting it
back and forth to int64_t.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 fpu/softfloat.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fpu/softfloat.c b/fpu/softfloat.c
index 485a006..7af14e2 100644
--- a/fpu/softfloat.c
+++ b/fpu/softfloat.c
@@ -7492,7 +7492,7 @@ uint64_t float64_to_uint64_round_to_zero(float64 a, float_status *status)
 {
     signed char current_rounding_mode = status->float_rounding_mode;
     set_float_rounding_mode(float_round_to_zero, status);
-    int64_t v = float64_to_uint64(a, status);
+    uint64_t v = float64_to_uint64(a, status);
     set_float_rounding_mode(current_rounding_mode, status);
     return v;
 }
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Qemu-devel] [PULL 03/14] hw/core/or-irq: Mark the device with cannot_instantiate_with_device_add_yet
  2017-02-28  6:44 [Qemu-devel] [PULL 00/14] Trivial patches for 2017-02-28 Michael Tokarev
  2017-02-28  6:44 ` [Qemu-devel] [PULL 01/14] target/s390x: Fix typo Michael Tokarev
  2017-02-28  6:44 ` [Qemu-devel] [PULL 02/14] softfloat: Use correct type in float64_to_uint64_round_to_zero() Michael Tokarev
@ 2017-02-28  6:44 ` Michael Tokarev
  2017-02-28  6:44 ` [Qemu-devel] [PULL 04/14] hw/core/register: " Michael Tokarev
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Michael Tokarev @ 2017-02-28  6:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: Thomas Huth, qemu-trivial, Michael Tokarev

From: Thomas Huth <thuth@redhat.com>

The "or-irq" device needs to be wired up in source code, there is no
way the user can make any real use of this device with the "-device"
parameter or the "device_add" monitor command yet.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 hw/core/or-irq.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/hw/core/or-irq.c b/hw/core/or-irq.c
index 1ac090d..1485d5b 100644
--- a/hw/core/or-irq.c
+++ b/hw/core/or-irq.c
@@ -89,6 +89,9 @@ static void or_irq_class_init(ObjectClass *klass, void *data)
     dc->props = or_irq_properties;
     dc->realize = or_irq_realize;
     dc->vmsd = &vmstate_or_irq;
+
+    /* Reason: Needs to be wired up to work, e.g. see stm32f205_soc.c */
+    dc->cannot_instantiate_with_device_add_yet = true;
 }
 
 static const TypeInfo or_irq_type_info = {
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Qemu-devel] [PULL 04/14] hw/core/register: Mark the device with cannot_instantiate_with_device_add_yet
  2017-02-28  6:44 [Qemu-devel] [PULL 00/14] Trivial patches for 2017-02-28 Michael Tokarev
                   ` (2 preceding siblings ...)
  2017-02-28  6:44 ` [Qemu-devel] [PULL 03/14] hw/core/or-irq: Mark the device with cannot_instantiate_with_device_add_yet Michael Tokarev
@ 2017-02-28  6:44 ` Michael Tokarev
  2017-02-28  6:44 ` [Qemu-devel] [PULL 05/14] CODING_STYLE: Mention preferred comment form Michael Tokarev
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Michael Tokarev @ 2017-02-28  6:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: Thomas Huth, qemu-trivial, Michael Tokarev

From: Thomas Huth <thuth@redhat.com>

The "qemu,register" device needs to be wired up in source code, there
is no way the user can make any real use of this device with the
"-device" parameter or the "device_add" monitor command yet.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 hw/core/register.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/hw/core/register.c b/hw/core/register.c
index 4bfbc50..be170dc 100644
--- a/hw/core/register.c
+++ b/hw/core/register.c
@@ -274,9 +274,18 @@ void register_finalize_block(RegisterInfoArray *r_array)
     g_free(r_array);
 }
 
+static void register_class_init(ObjectClass *oc, void *data)
+{
+    DeviceClass *dc = DEVICE_CLASS(oc);
+
+    /* Reason: needs to be wired up to work */
+    dc->cannot_instantiate_with_device_add_yet = true;
+}
+
 static const TypeInfo register_info = {
     .name  = TYPE_REGISTER,
     .parent = TYPE_DEVICE,
+    .class_init = register_class_init,
 };
 
 static void register_register_types(void)
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Qemu-devel] [PULL 05/14] CODING_STYLE: Mention preferred comment form
  2017-02-28  6:44 [Qemu-devel] [PULL 00/14] Trivial patches for 2017-02-28 Michael Tokarev
                   ` (3 preceding siblings ...)
  2017-02-28  6:44 ` [Qemu-devel] [PULL 04/14] hw/core/register: " Michael Tokarev
@ 2017-02-28  6:44 ` Michael Tokarev
  2017-02-28  6:44 ` [Qemu-devel] [PULL 06/14] ide: remove undefined behavior in ide-test Michael Tokarev
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Michael Tokarev @ 2017-02-28  6:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, qemu-trivial, Michael Tokarev

From: Peter Maydell <peter.maydell@linaro.org>

Our defacto coding style strongly prefers /* */ style comments
over the single-line // style, and checkpatch enforces this,
but we don't actually document this. Mention it in CODING_STYLE.

Suggested-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 CODING_STYLE | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/CODING_STYLE b/CODING_STYLE
index f53180b..2fa0c0b 100644
--- a/CODING_STYLE
+++ b/CODING_STYLE
@@ -116,3 +116,10 @@ if (a == 1) {
 Rationale: Yoda conditions (as in 'if (1 == a)') are awkward to read.
 Besides, good compilers already warn users when '==' is mis-typed as '=',
 even when the constant is on the right.
+
+7. Comment style
+
+We use traditional C-style /* */ comments and avoid // comments.
+
+Rationale: The // form is valid in C99, so this is purely a matter of
+consistency of style. The checkpatch script will warn you about this.
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Qemu-devel] [PULL 06/14] ide: remove undefined behavior in ide-test
  2017-02-28  6:44 [Qemu-devel] [PULL 00/14] Trivial patches for 2017-02-28 Michael Tokarev
                   ` (4 preceding siblings ...)
  2017-02-28  6:44 ` [Qemu-devel] [PULL 05/14] CODING_STYLE: Mention preferred comment form Michael Tokarev
@ 2017-02-28  6:44 ` Michael Tokarev
  2017-02-28  6:44 ` [Qemu-devel] [PULL 07/14] register: fix incorrect read mask Michael Tokarev
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Michael Tokarev @ 2017-02-28  6:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: John Snow, qemu-trivial, Michael Tokarev

From: John Snow <jsnow@redhat.com>

trivial: initialize the dirty buffer with a random-ish byte.
Stops valgrind from whining about uninitialized buffers.

Signed-off-by: John Snow <jsnow@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 tests/ide-test.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tests/ide-test.c b/tests/ide-test.c
index fb541f8..b57c2b1 100644
--- a/tests/ide-test.c
+++ b/tests/ide-test.c
@@ -544,6 +544,7 @@ static void make_dirty(uint8_t device)
 
     guest_buf = guest_alloc(guest_malloc, len);
     buf = g_malloc(len);
+    memset(buf, rand() % 255 + 1, len);
     g_assert(guest_buf);
     g_assert(buf);
 
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Qemu-devel] [PULL 07/14] register: fix incorrect read mask
  2017-02-28  6:44 [Qemu-devel] [PULL 00/14] Trivial patches for 2017-02-28 Michael Tokarev
                   ` (5 preceding siblings ...)
  2017-02-28  6:44 ` [Qemu-devel] [PULL 06/14] ide: remove undefined behavior in ide-test Michael Tokarev
@ 2017-02-28  6:44 ` Michael Tokarev
  2017-02-28  6:44 ` [Qemu-devel] [PULL 08/14] cadence_gem: Remove unused parameter debug message Michael Tokarev
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Michael Tokarev @ 2017-02-28  6:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: Philippe Mathieu-Daudé, qemu-trivial, Michael Tokarev

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

The register_read() and register_write() functions expect a bitmask argument.
To avoid duplicated code, a new inlined function register_enabled_mask() is
introduced.

Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 hw/core/register.c | 21 +++++++++++++++------
 1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/hw/core/register.c b/hw/core/register.c
index be170dc..dc335a7 100644
--- a/hw/core/register.c
+++ b/hw/core/register.c
@@ -59,6 +59,15 @@ static inline uint64_t register_read_val(RegisterInfo *reg)
     return 0; /* unreachable */
 }
 
+static inline uint64_t register_enabled_mask(int data_size, unsigned size)
+{
+    if (data_size < size) {
+        size = data_size;
+    }
+
+    return MAKE_64BIT_MASK(0, size * 8);
+}
+
 void register_write(RegisterInfo *reg, uint64_t val, uint64_t we,
                     const char *prefix, bool debug)
 {
@@ -192,11 +201,7 @@ void register_write_memory(void *opaque, hwaddr addr,
     }
 
     /* Generate appropriate write enable mask */
-    if (reg->data_size < size) {
-        we = MAKE_64BIT_MASK(0, reg->data_size * 8);
-    } else {
-        we = MAKE_64BIT_MASK(0, size * 8);
-    }
+    we = register_enabled_mask(reg->data_size, size);
 
     register_write(reg, value, we, reg_array->prefix,
                    reg_array->debug);
@@ -208,6 +213,7 @@ uint64_t register_read_memory(void *opaque, hwaddr addr,
     RegisterInfoArray *reg_array = opaque;
     RegisterInfo *reg = NULL;
     uint64_t read_val;
+    uint64_t re;
     int i;
 
     for (i = 0; i < reg_array->num_elements; i++) {
@@ -223,7 +229,10 @@ uint64_t register_read_memory(void *opaque, hwaddr addr,
         return 0;
     }
 
-    read_val = register_read(reg, size * 8, reg_array->prefix,
+    /* Generate appropriate read enable mask */
+    re = register_enabled_mask(reg->data_size, size);
+
+    read_val = register_read(reg, re, reg_array->prefix,
                              reg_array->debug);
 
     return extract64(read_val, 0, size * 8);
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Qemu-devel] [PULL 08/14] cadence_gem: Remove unused parameter debug message
  2017-02-28  6:44 [Qemu-devel] [PULL 00/14] Trivial patches for 2017-02-28 Michael Tokarev
                   ` (6 preceding siblings ...)
  2017-02-28  6:44 ` [Qemu-devel] [PULL 07/14] register: fix incorrect read mask Michael Tokarev
@ 2017-02-28  6:44 ` Michael Tokarev
  2017-02-28  6:44 ` [Qemu-devel] [PULL 09/14] tests/prom-env: Enable the test for the sun4u machine, too Michael Tokarev
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Michael Tokarev @ 2017-02-28  6:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: Fam Zheng, qemu-trivial, Michael Tokarev

From: Fam Zheng <famz@redhat.com>

Reported by cppcheck.

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 hw/net/cadence_gem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/net/cadence_gem.c b/hw/net/cadence_gem.c
index e99d454..d4de8ad 100644
--- a/hw/net/cadence_gem.c
+++ b/hw/net/cadence_gem.c
@@ -508,7 +508,7 @@ static void gem_update_int_status(CadenceGEMState *s)
 
     if ((s->num_priority_queues == 1) && s->regs[GEM_ISR]) {
         /* No priority queues, just trigger the interrupt */
-        DB_PRINT("asserting int.\n", i);
+        DB_PRINT("asserting int.\n");
         qemu_set_irq(s->irq[0], 1);
         return;
     }
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Qemu-devel] [PULL 09/14] tests/prom-env: Enable the test for the sun4u machine, too
  2017-02-28  6:44 [Qemu-devel] [PULL 00/14] Trivial patches for 2017-02-28 Michael Tokarev
                   ` (7 preceding siblings ...)
  2017-02-28  6:44 ` [Qemu-devel] [PULL 08/14] cadence_gem: Remove unused parameter debug message Michael Tokarev
@ 2017-02-28  6:44 ` Michael Tokarev
  2017-02-28  6:44 ` [Qemu-devel] [PULL 10/14] Update copyright year Michael Tokarev
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Michael Tokarev @ 2017-02-28  6:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: Thomas Huth, qemu-trivial, Michael Tokarev

From: Thomas Huth <thuth@redhat.com>

The 32-bit TCG bug has been fixed a while ago, so we can enable
this test for sparc64 now, too. Unfortunately, OpenBIOS does not
work with the sun4v machine anymore (it needs to catch up with the
improved emulation), so we can only enable this test for the sun4u
machine right now.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 tests/Makefile.include | 3 +--
 tests/prom-env-test.c  | 2 +-
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/tests/Makefile.include b/tests/Makefile.include
index e60bb6c..3310c17 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -308,8 +308,7 @@ check-qtest-sparc-y = tests/prom-env-test$(EXESUF)
 check-qtest-sparc64-y = tests/endianness-test$(EXESUF)
 #check-qtest-sparc64-y += tests/m48t59-test$(EXESUF)
 #gcov-files-sparc64-y += hw/timer/m48t59.c
-#Disabled for now, triggers a TCG bug on 32-bit hosts
-#check-qtest-sparc64-y += tests/prom-env-test$(EXESUF)
+check-qtest-sparc64-y += tests/prom-env-test$(EXESUF)
 
 check-qtest-arm-y = tests/tmp105-test$(EXESUF)
 check-qtest-arm-y += tests/ds1338-test$(EXESUF)
diff --git a/tests/prom-env-test.c b/tests/prom-env-test.c
index bd33bc3..eac207b 100644
--- a/tests/prom-env-test.c
+++ b/tests/prom-env-test.c
@@ -76,7 +76,7 @@ static void add_tests(const char *machines[])
 int main(int argc, char *argv[])
 {
     const char *sparc_machines[] = { "SPARCbook", "Voyager", "SS-20", NULL };
-    const char *sparc64_machines[] = { "sun4u", "sun4v", NULL };
+    const char *sparc64_machines[] = { "sun4u", NULL };
     const char *ppc_machines[] = { "mac99", "g3beige", NULL };
     const char *ppc64_machines[] = { "mac99", "g3beige", "pseries", NULL };
     const char *arch = qtest_get_arch();
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Qemu-devel] [PULL 10/14] Update copyright year
  2017-02-28  6:44 [Qemu-devel] [PULL 00/14] Trivial patches for 2017-02-28 Michael Tokarev
                   ` (8 preceding siblings ...)
  2017-02-28  6:44 ` [Qemu-devel] [PULL 09/14] tests/prom-env: Enable the test for the sun4u machine, too Michael Tokarev
@ 2017-02-28  6:44 ` Michael Tokarev
  2017-02-28  6:44 ` [Qemu-devel] [PULL 11/14] qemu-options.hx: add missing id=chr0 chardev argument in vhost-user example Michael Tokarev
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Michael Tokarev @ 2017-02-28  6:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: Marc-André Lureau, qemu-trivial, Michael Tokarev

From: Marc-André Lureau <marcandre.lureau@redhat.com>

It's still time to wish happy new year!

The Year of the Rooster will begin on January 28, 2017!

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 include/qemu-common.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/qemu-common.h b/include/qemu-common.h
index 1430390..d218821 100644
--- a/include/qemu-common.h
+++ b/include/qemu-common.h
@@ -19,7 +19,7 @@
 #include "qemu/option.h"
 
 /* Copyright string for -version arguments, About dialogs, etc */
-#define QEMU_COPYRIGHT "Copyright (c) 2003-2016 " \
+#define QEMU_COPYRIGHT "Copyright (c) 2003-2017 " \
     "Fabrice Bellard and the QEMU Project developers"
 
 /* main function, renamed */
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Qemu-devel] [PULL 11/14] qemu-options.hx: add missing id=chr0 chardev argument in vhost-user example
  2017-02-28  6:44 [Qemu-devel] [PULL 00/14] Trivial patches for 2017-02-28 Michael Tokarev
                   ` (9 preceding siblings ...)
  2017-02-28  6:44 ` [Qemu-devel] [PULL 10/14] Update copyright year Michael Tokarev
@ 2017-02-28  6:44 ` Michael Tokarev
  2017-02-28  6:44 ` [Qemu-devel] [PULL 12/14] lm32: milkymist-tmu2: fix a third integer overflow Michael Tokarev
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Michael Tokarev @ 2017-02-28  6:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: Vincenzo Maffione, qemu-trivial, Michael Tokarev

From: Vincenzo Maffione <v.maffione@gmail.com>

In the vhost-user example, a chardev with id chr0 is referenced by the
vhost-user net backend, but the id is not specified in the chardev option.

Signed-off-by: Vincenzo Maffione <v.maffione@gmail.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 qemu-options.hx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/qemu-options.hx b/qemu-options.hx
index bf458f8..faf5cf8 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -2146,7 +2146,7 @@ Example:
 @example
 qemu -m 512 -object memory-backend-file,id=mem,size=512M,mem-path=/hugetlbfs,share=on \
      -numa node,memdev=mem \
-     -chardev socket,path=/path/to/socket \
+     -chardev socket,id=chr0,path=/path/to/socket \
      -netdev type=vhost-user,id=net0,chardev=chr0 \
      -device virtio-net-pci,netdev=net0
 @end example
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Qemu-devel] [PULL 12/14] lm32: milkymist-tmu2: fix a third integer overflow
  2017-02-28  6:44 [Qemu-devel] [PULL 00/14] Trivial patches for 2017-02-28 Michael Tokarev
                   ` (10 preceding siblings ...)
  2017-02-28  6:44 ` [Qemu-devel] [PULL 11/14] qemu-options.hx: add missing id=chr0 chardev argument in vhost-user example Michael Tokarev
@ 2017-02-28  6:44 ` Michael Tokarev
  2017-02-28  6:44 ` [Qemu-devel] [PULL 13/14] hw/acpi/tco.c: fix tco timer stop Michael Tokarev
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: Michael Tokarev @ 2017-02-28  6:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: Peter Maydell, qemu-trivial, Michael Tokarev

From: Peter Maydell <peter.maydell@linaro.org>

Don't truncate the multiplication and do a 64 bit one instead
because the result is stored in a 64 bit variable.

This fixes a similar coverity warning to commits 237a8650d640 and
4382fa655498, in a similar way, and is the final third of the fix for
coverity CID 1167561 (hopefully!).

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Acked-by: Michael Walle <michael@walle.cc>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 hw/display/milkymist-tmu2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/display/milkymist-tmu2.c b/hw/display/milkymist-tmu2.c
index 7528665..59120dd 100644
--- a/hw/display/milkymist-tmu2.c
+++ b/hw/display/milkymist-tmu2.c
@@ -293,7 +293,7 @@ static void tmu2_start(MilkymistTMU2State *s)
     cpu_physical_memory_unmap(mesh, mesh_len, 0, mesh_len);
 
     /* Write back the OpenGL framebuffer to the QEMU framebuffer */
-    fb_len = 2 * s->regs[R_DSTHRES] * s->regs[R_DSTVRES];
+    fb_len = 2ULL * s->regs[R_DSTHRES] * s->regs[R_DSTVRES];
     fb = cpu_physical_memory_map(s->regs[R_DSTFBUF], &fb_len, 1);
     if (fb == NULL) {
         glDeleteTextures(1, &texture);
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Qemu-devel] [PULL 13/14] hw/acpi/tco.c: fix tco timer stop
  2017-02-28  6:44 [Qemu-devel] [PULL 00/14] Trivial patches for 2017-02-28 Michael Tokarev
                   ` (11 preceding siblings ...)
  2017-02-28  6:44 ` [Qemu-devel] [PULL 12/14] lm32: milkymist-tmu2: fix a third integer overflow Michael Tokarev
@ 2017-02-28  6:44 ` Michael Tokarev
  2017-02-28  6:44 ` [Qemu-devel] [PULL 14/14] syscall: fixed mincore(2) not failing with ENOMEM Michael Tokarev
  2017-02-28 17:31 ` [Qemu-devel] [PULL 00/14] Trivial patches for 2017-02-28 Peter Maydell
  14 siblings, 0 replies; 16+ messages in thread
From: Michael Tokarev @ 2017-02-28  6:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: Igor Pavlikevich, qemu-trivial, Michael Tokarev

From: Igor Pavlikevich <ipavlikevich@gmail.com>

TCO timer does not actually stop

Signed-off-by: Igor Pavlikevich <ipavlikevich@gmail.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 hw/acpi/tco.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/acpi/tco.c b/hw/acpi/tco.c
index 8ce7daf..b4adac8 100644
--- a/hw/acpi/tco.c
+++ b/hw/acpi/tco.c
@@ -49,6 +49,7 @@ static inline void tco_timer_reload(TCOIORegs *tr)
 static inline void tco_timer_stop(TCOIORegs *tr)
 {
     tr->expire_time = -1;
+    timer_del(tr->tco_timer);
 }
 
 static void tco_timer_expired(void *opaque)
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* [Qemu-devel] [PULL 14/14] syscall: fixed mincore(2) not failing with ENOMEM
  2017-02-28  6:44 [Qemu-devel] [PULL 00/14] Trivial patches for 2017-02-28 Michael Tokarev
                   ` (12 preceding siblings ...)
  2017-02-28  6:44 ` [Qemu-devel] [PULL 13/14] hw/acpi/tco.c: fix tco timer stop Michael Tokarev
@ 2017-02-28  6:44 ` Michael Tokarev
  2017-02-28 17:31 ` [Qemu-devel] [PULL 00/14] Trivial patches for 2017-02-28 Peter Maydell
  14 siblings, 0 replies; 16+ messages in thread
From: Michael Tokarev @ 2017-02-28  6:44 UTC (permalink / raw)
  To: qemu-devel
  Cc: Franklin \"Snaipe\" Mathieu, qemu-trivial, Riku Voipio,
	Aurelien Jarno, Michael Tokarev

From: "Franklin \\\"Snaipe\\\" Mathieu" <snaipe@diacritic.io>

The current implementation of the mincore(2) syscall sets errno to
EFAULT when the region identified by the first two parameters is
invalid.

This goes against the man page specification, where mincore(2) should
only fail with EFAULT when the third parameter is an invalid address;
and fail with ENOMEM when the checked region does not point to mapped
memory.

Signed-off-by: Franklin "Snaipe" Mathieu <snaipe@diacritic.io>
Cc: Riku Voipio <riku.voipio@linaro.org>
Cc: Aurelien Jarno <aurelien@aurel32.net>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
---
 linux-user/syscall.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index f569f82..6715ce3 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -11063,11 +11063,16 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1,
     case TARGET_NR_mincore:
         {
             void *a;
+            ret = -TARGET_ENOMEM;
+            a = lock_user(VERIFY_READ, arg1, arg2, 0);
+            if (!a) {
+                goto fail;
+            }
             ret = -TARGET_EFAULT;
-            if (!(a = lock_user(VERIFY_READ, arg1,arg2, 0)))
-                goto efault;
-            if (!(p = lock_user_string(arg3)))
+            p = lock_user_string(arg3);
+            if (!p) {
                 goto mincore_fail;
+            }
             ret = get_errno(mincore(a, arg2, p));
             unlock_user(p, arg3, ret);
             mincore_fail:
-- 
2.1.4

^ permalink raw reply related	[flat|nested] 16+ messages in thread

* Re: [Qemu-devel] [PULL 00/14] Trivial patches for 2017-02-28
  2017-02-28  6:44 [Qemu-devel] [PULL 00/14] Trivial patches for 2017-02-28 Michael Tokarev
                   ` (13 preceding siblings ...)
  2017-02-28  6:44 ` [Qemu-devel] [PULL 14/14] syscall: fixed mincore(2) not failing with ENOMEM Michael Tokarev
@ 2017-02-28 17:31 ` Peter Maydell
  14 siblings, 0 replies; 16+ messages in thread
From: Peter Maydell @ 2017-02-28 17:31 UTC (permalink / raw)
  To: Michael Tokarev; +Cc: QEMU Developers, QEMU Trivial

On 28 February 2017 at 06:44, Michael Tokarev <mjt@tls.msk.ru> wrote:
> This is yet another trivial patches pull request.
> Please consider applying/pulling.
>
> The following changes since commit 8f2d7c341184a95d05476ea3c45dbae2b9ddbe51:
>
>   Merge remote-tracking branch 'remotes/berrange/tags/pull-qcrypto-2017-02-27-1' into staging (2017-02-27 15:33:21 +0000)
>
> are available in the git repository at:
>
>   git://git.corpit.ru/qemu.git tags/trivial-patches-fetch
>
> for you to fetch changes up to f5507e0448bd34473af72509297617a783049024:
>
>   syscall: fixed mincore(2) not failing with ENOMEM (2017-02-28 09:03:39 +0300)
>
> ----------------------------------------------------------------
> trivial patches for 2017-02-28
>
> ----------------------------------------------------------------

Applied, thanks.

-- PMM

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2017-02-28 17:32 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-28  6:44 [Qemu-devel] [PULL 00/14] Trivial patches for 2017-02-28 Michael Tokarev
2017-02-28  6:44 ` [Qemu-devel] [PULL 01/14] target/s390x: Fix typo Michael Tokarev
2017-02-28  6:44 ` [Qemu-devel] [PULL 02/14] softfloat: Use correct type in float64_to_uint64_round_to_zero() Michael Tokarev
2017-02-28  6:44 ` [Qemu-devel] [PULL 03/14] hw/core/or-irq: Mark the device with cannot_instantiate_with_device_add_yet Michael Tokarev
2017-02-28  6:44 ` [Qemu-devel] [PULL 04/14] hw/core/register: " Michael Tokarev
2017-02-28  6:44 ` [Qemu-devel] [PULL 05/14] CODING_STYLE: Mention preferred comment form Michael Tokarev
2017-02-28  6:44 ` [Qemu-devel] [PULL 06/14] ide: remove undefined behavior in ide-test Michael Tokarev
2017-02-28  6:44 ` [Qemu-devel] [PULL 07/14] register: fix incorrect read mask Michael Tokarev
2017-02-28  6:44 ` [Qemu-devel] [PULL 08/14] cadence_gem: Remove unused parameter debug message Michael Tokarev
2017-02-28  6:44 ` [Qemu-devel] [PULL 09/14] tests/prom-env: Enable the test for the sun4u machine, too Michael Tokarev
2017-02-28  6:44 ` [Qemu-devel] [PULL 10/14] Update copyright year Michael Tokarev
2017-02-28  6:44 ` [Qemu-devel] [PULL 11/14] qemu-options.hx: add missing id=chr0 chardev argument in vhost-user example Michael Tokarev
2017-02-28  6:44 ` [Qemu-devel] [PULL 12/14] lm32: milkymist-tmu2: fix a third integer overflow Michael Tokarev
2017-02-28  6:44 ` [Qemu-devel] [PULL 13/14] hw/acpi/tco.c: fix tco timer stop Michael Tokarev
2017-02-28  6:44 ` [Qemu-devel] [PULL 14/14] syscall: fixed mincore(2) not failing with ENOMEM Michael Tokarev
2017-02-28 17:31 ` [Qemu-devel] [PULL 00/14] Trivial patches for 2017-02-28 Peter Maydell

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.