Skip to contentSkip to conversation

Trivial patches for 2017-10-16

GIT PULL Applied Michael Tokarev 2 participants 16 messages Oct 16, 2017 – Oct 17, 2017 Networking

lore
Share & tools
lore
#0 lore raw

Here's a set of trivial changes accumulated so far. Not including large series by Philippe Mathieu-Daudé.

The following changes since commit c5bbcaa4b7c0f8a322bebe9ec563560178a68b55:

Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2017-10-16 17:29:16 +0100)

are available in the git repository at:

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

for you to fetch changes up to 6b4f250bfc529bdf73a10ca6873a460175e666cc:

Add myself as maintainer for TPM code (2017-10-16 23:17:44 +0300)

----------------------------------------------------------------
trivial patches for 2017-10-16

----------------------------------------------------------------
Anthony PERARD (1):
ui/gtk: Fix deprecation of vte_terminal_copy_clipboard

Carlo Marcelo Arenas Belón (2):
linux-user: remove duplicate break in syscall
gitignore: ignore check-qlit test

Eduardo Otubo (1):
filter-mirror: segfault when specifying non existent device

Emilio G. Cota (1):
futex: add missing header guards

Fam Zheng (3):
MAINTAINERS: Clean up SCSI device section
MAINTAINERS: Fix Sun4v file
MAINTAINERS: Track default-configs/pci.mak

Marco A L Barbosa (1):
linux-user: Add some random ioctls

Markus Armbruster (1):
os-posix: Drop misleading comment

Michael Tokarev (1):
qemu-doc.texi: remove trailing whitespace

Peter Maydell (1):
include/hw/or-irq.h: Drop unused in_irqs field

Stefan Berger (1):
Add myself as maintainer for TPM code

Stefan Weil (1):
io: Add missing GCC_FMT_ATTR (fix -Werror=suggest-attribute=format)

 MAINTAINERS               | 13 +++++--------
 include/hw/or-irq.h       |  1 -
 include/qemu/futex.h      |  5 +++++
 io/channel-websock.c      |  7 ++++---
 linux-user/ioctls.h       |  5 +++++
 linux-user/syscall.c      |  2 +-
 linux-user/syscall_defs.h |  7 +++++++
 net/filter-mirror.c       |  6 ++++++
 os-posix.c                |  1 -
 qemu-doc.texi             |  2 +-
 tests/.gitignore          |  1 +
 ui/gtk.c                  |  5 +++++
 12 files changed, 40 insertions(+), 15 deletions(-)
#1 lore raw

[Qemu-devel] [PULL 02/14] linux-user: remove duplicate break in syscall

From: Carlo Marcelo Arenas Belón <[email protected]>

likely introduced in 3532fa7402cda16f7b95261b0339c58630051f0b

---
 linux-user/syscall.c | 1 -
 1 file changed, 1 deletion(-)
linux-user/syscall.c +0 -1
index 9b6364a266..3ef4d1c568 100644
@@ -3131,7 +3131,6 @@ set_timeout:
         case TARGET_SO_RCVLOWAT:
 		optname = SO_RCVLOWAT;
 		break;
-            break;
         default:
             goto unimplemented;
         }
Signature · 1 line
2.11.0
#2 lore raw

[Qemu-devel] [PULL 03/14] gitignore: ignore check-qlit test

In reply to Michael Tokarev

From: Carlo Marcelo Arenas Belón <[email protected]>

test introduced in 382176b4d78e070d119af8e0dcd00884c11bbec2

---
 tests/.gitignore | 1 +
 1 file changed, 1 insertion(+)
tests/.gitignore +1 -0
index cf6d99c91e..53cb2efaee 100644
@@ -6,6 +6,7 @@ check-qdict
 check-qnum
 check-qjson
 check-qlist
+check-qlit
 check-qnull
 check-qstring
 check-qom-interface
Signature · 1 line
2.11.0
#3 lore raw

[Qemu-devel] [PULL 08/14] io: Add missing GCC_FMT_ATTR (fix -Werror=suggest-attribute=format)

In reply to Michael Tokarev

From: Stefan Weil <[email protected]>

This fixes a compiler warning:

/qemu/io/channel-websock.c:163:5: error:
function might be possible candidate for ‘gnu_printf’ format attribute [-Werror=suggest-attribute=format]

---
 io/channel-websock.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
io/channel-websock.c +4 -3
index d1d471f86e..7bf1340958 100644
@@ -151,9 +151,10 @@ enum {
     QIO_CHANNEL_WEBSOCK_OPCODE_PONG = 0xA
 };
 
-static void qio_channel_websock_handshake_send_res(QIOChannelWebsock *ioc,
-                                                   const char *resmsg,
-                                                   ...)
+static void GCC_FMT_ATTR(2, 3)
+qio_channel_websock_handshake_send_res(QIOChannelWebsock *ioc,
+                                       const char *resmsg,
+                                       ...)
 {
     va_list vargs;
     char *response;
Signature · 1 line
2.11.0
#4 lore raw

[Qemu-devel] [PULL 09/14] include/hw/or-irq.h: Drop unused in_irqs field

In reply to Michael Tokarev

From: Peter Maydell <[email protected]>

The struct OrIRQState has an unused member field in_irqs. This is a legacy of earlier versions of the patch; the code that used it was dropped from the final version of the code that went into master, but we forgot to delete the no-longer-used struct field. Do so now.

---
 include/hw/or-irq.h | 1 -
 1 file changed, 1 deletion(-)
include/hw/or-irq.h +0 -1
index d400a8120b..fd900fcf19 100644
@@ -38,7 +38,6 @@ struct OrIRQState {
     DeviceState parent_obj;
 
     qemu_irq out_irq;
-    qemu_irq *in_irqs;
     bool levels[MAX_OR_LINES];
     uint16_t num_lines;
 };
Signature · 1 line
2.11.0
#5 lore raw

[Qemu-devel] [PULL 06/14] linux-user: Add some random ioctls

In reply to Michael Tokarev

From: Marco A L Barbosa <[email protected]>

---
 linux-user/ioctls.h       | 5 +++++
 linux-user/syscall.c      | 1 +
 linux-user/syscall_defs.h | 7 +++++++
 3 files changed, 13 insertions(+)
linux-user/ioctls.h +5 -0
index e6997ff230..35cad6f944 100644
@@ -173,6 +173,11 @@
   IOCTL(SIOCGSTAMP, IOC_R, MK_PTR(MK_STRUCT(STRUCT_timeval)))
   IOCTL(SIOCGSTAMPNS, IOC_R, MK_PTR(MK_STRUCT(STRUCT_timespec)))
 
+  IOCTL(RNDGETENTCNT, IOC_R, MK_PTR(TYPE_INT))
+  IOCTL(RNDADDTOENTCNT, IOC_W, MK_PTR(TYPE_INT))
+  IOCTL(RNDZAPENTCNT, 0, TYPE_NULL)
+  IOCTL(RNDCLEARPOOL, 0, TYPE_NULL)
+
   IOCTL(CDROMPAUSE, 0, TYPE_NULL)
   IOCTL(CDROMSTART, 0, TYPE_NULL)
   IOCTL(CDROMSTOP, 0, TYPE_NULL)
linux-user/syscall.c +1 -0
index 3ef4d1c568..9d4cc4cf5d 100644
@@ -59,6 +59,7 @@ int __clone2(int (*fn)(void *), void *child_stack_base,
 #include <linux/icmp.h>
 #include <linux/icmpv6.h>
 #include <linux/errqueue.h>
+#include <linux/random.h>
 #include "qemu-common.h"
 #ifdef CONFIG_TIMERFD
 #include <sys/timerfd.h>
linux-user/syscall_defs.h +7 -0
index 40c5027e93..b3d55e35ac 100644
@@ -1060,6 +1060,13 @@ struct target_pollfd {
 
 #define TARGET_SIOCGIWNAME     0x8B01          /* get name == wireless protocol */
 
+/* From <linux/random.h> */
+
+#define TARGET_RNDGETENTCNT    TARGET_IOR('R', 0x00, int)
+#define TARGET_RNDADDTOENTCNT  TARGET_IOW('R', 0x01, int)
+#define TARGET_RNDZAPENTCNT    TARGET_IO('R', 0x04)
+#define TARGET_RNDCLEARPOOL    TARGET_IO('R', 0x06)
+
 /* From <linux/fs.h> */
 
 #define TARGET_BLKROSET   TARGET_IO(0x12,93) /* set device read-only (0 = read-write) */
Signature · 1 line
2.11.0
#6 lore raw

[Qemu-devel] [PULL 07/14] os-posix: Drop misleading comment

In reply to Michael Tokarev

From: Markus Armbruster <[email protected]>

Comments explaining why we include a header tend to go bad. This one's almost comical: not only doesn't qemu-options.hx use MAP_POPULATE anymore (since commit ef36fa1, v2.0.0, 2013), even the include it applies to got moved away in commit 02d0e09 (v2.7.0).

---
 os-posix.c | 1 -
 1 file changed, 1 deletion(-)
os-posix.c +0 -1
index 92e9d85215..b9c2343b1e 100644
@@ -25,7 +25,6 @@
 
 #include "qemu/osdep.h"
 #include <sys/wait.h>
-/*needed for MAP_POPULATE before including qemu-options.h */
 #include <pwd.h>
 #include <grp.h>
 #include <libgen.h>
Signature · 1 line
2.11.0
#7 lore raw

[Qemu-devel] [PULL 10/14] MAINTAINERS: Clean up SCSI device section

In reply to Michael Tokarev

From: Fam Zheng <[email protected]>

1. Remove nonexistent file util/scsi*.
2. Drop useless section for LSI53C895A.
3. Leave include/scsi to "Block SCSI subsystem" section.

---
 MAINTAINERS | 6 ------
 1 file changed, 6 deletions(-)
MAINTAINERS +0 -6
index 9cff9737d3..86c9ec9cde 100644
@@ -980,16 +980,10 @@ SCSI
 M: Paolo Bonzini <[email protected]>
 S: Supported
 F: include/hw/scsi/*
-F: include/scsi/*
 F: hw/scsi/*
-F: util/scsi*
 F: tests/virtio-scsi-test.c
 T: git git://github.com/bonzini/qemu.git scsi-next
 
-LSI53C895A
-S: Orphan
-F: hw/scsi/lsi53c895a.c
-
 SSI
 M: Peter Crosthwaite <[email protected]>
 M: Alistair Francis <[email protected]>
Signature · 1 line
2.11.0
#8 lore raw

[Qemu-devel] [PULL 12/14] MAINTAINERS: Track default-configs/pci.mak

In reply to Michael Tokarev

From: Fam Zheng <[email protected]>

---
 MAINTAINERS | 1 +
 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
index 6ce393f50d..162e914a2d 100644
@@ -934,6 +934,7 @@ F: hw/pci/*
 F: hw/pci-bridge/*
 F: docs/pci*
 F: docs/specs/*pci*
+F: default-configs/pci.mak
 
 ACPI/SMBIOS
 M: Michael S. Tsirkin <[email protected]>
Signature · 1 line
2.11.0
#9 lore raw

[Qemu-devel] [PULL 11/14] MAINTAINERS: Fix Sun4v file

In reply to Michael Tokarev

From: Fam Zheng <[email protected]>

---
 MAINTAINERS | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
MAINTAINERS +1 -1
index 86c9ec9cde..6ce393f50d 100644
@@ -778,7 +778,7 @@ F: pc-bios/openbios-sparc64
 Sun4v
 M: Artyom Tarasenko <[email protected]>
 S: Maintained
-F: hw/sparc64/sun4v.c
+F: hw/sparc64/niagara.c
 F: hw/timer/sun4v-rtc.c
 F: include/hw/timer/sun4v-rtc.h
 
Signature · 1 line
2.11.0
#10 lore raw

[Qemu-devel] [PULL 14/14] Add myself as maintainer for TPM code

In reply to Michael Tokarev

From: Stefan Berger <[email protected]>

Also add backends/tpm.c to the list of files.

---
 MAINTAINERS | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
MAINTAINERS +3 -1
index 162e914a2d..cee32914bd 100644
@@ -1535,12 +1535,14 @@ F: docs/devel/tracing.txt
 T: git git://github.com/stefanha/qemu.git tracing
 
 TPM
-S: Orphan
+M: Stefan Berger <[email protected]>
+S: Maintained
 F: tpm.c
 F: hw/tpm/*
 F: include/hw/acpi/tpm.h
 F: include/sysemu/tpm*
 F: qapi/tpm.json
+F: backends/tpm.c
 
 Checkpatch
 S: Odd Fixes
Signature · 1 line
2.11.0
#11 lore raw

[Qemu-devel] [PULL 13/14] filter-mirror: segfault when specifying non existent device

In reply to Michael Tokarev

From: Eduardo Otubo <[email protected]>

When using filter-mirror like the example below where the interface 'ndev0' does not exist on the host, QEMU crashes into segmentation fault.

 $ qemu-system-x86_64 -S -machine pc -netdev user,id=ndev0 -object filter-mirror,id=test-object,netdev=ndev0

This happens because the function filter_mirror_setup() does not check if the device actually exists and still keep on processing calling qemu_chr_find(). This patch fixes this issue.

---
 net/filter-mirror.c | 6 ++++++
 1 file changed, 6 insertions(+)
net/filter-mirror.c +6 -0
index 90e2c92337..ce0dc23c2a 100644
@@ -213,6 +213,12 @@ static void filter_mirror_setup(NetFilterState *nf, Error **errp)
     MirrorState *s = FILTER_MIRROR(nf);
     Chardev *chr;
 
+    if (s->outdev == NULL) {
+        error_set(errp, ERROR_CLASS_DEVICE_NOT_FOUND, "filter-mirror parameter"\
+                  " 'outdev' cannot be empty");
+        return;
+    }
+
     chr = qemu_chr_find(s->outdev);
     if (chr == NULL) {
         error_set(errp, ERROR_CLASS_DEVICE_NOT_FOUND,
Signature · 1 line
2.11.0
#12 lore raw

[Qemu-devel] [PULL 01/14] qemu-doc.texi: remove trailing whitespace

In reply to Michael Tokarev

Remove trailing whitespace in qemu-doc.texi, as it causes reproducibility issues depending on the echo implementation used by the Makefile.

---
 qemu-doc.texi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
qemu-doc.texi +1 -1
index d8bb2c664f..8c10956a66 100644
@@ -105,7 +105,7 @@ QEMU full system emulation has the following features:
 QEMU uses a full software MMU for maximum portability.
 
 @item
-QEMU can optionally use an in-kernel accelerator, like kvm. The accelerators 
+QEMU can optionally use an in-kernel accelerator, like kvm. The accelerators
 execute most of the guest code natively, while
 continuing to emulate the rest of the machine.
 
Signature · 1 line
2.11.0
#13 lore raw

[Qemu-devel] [PULL 04/14] ui/gtk: Fix deprecation of vte_terminal_copy_clipboard

In reply to Michael Tokarev

From: Anthony PERARD <[email protected]>

vte_terminal_copy_clipboard() is deprecated in VTE 0.50.

---
 ui/gtk.c | 5 +++++
 1 file changed, 5 insertions(+)
ui/gtk.c +5 -0
index 5bd87c265a..342e96fbe9 100644
@@ -1702,7 +1702,12 @@ static void gd_menu_copy(GtkMenuItem *item, void *opaque)
     GtkDisplayState *s = opaque;
     VirtualConsole *vc = gd_vc_find_current(s);
 
+#if VTE_CHECK_VERSION(0, 50, 0)
+    vte_terminal_copy_clipboard_format(VTE_TERMINAL(vc->vte.terminal),
+                                       VTE_FORMAT_TEXT);
+#else
     vte_terminal_copy_clipboard(VTE_TERMINAL(vc->vte.terminal));
+#endif
 }
 
 static void gd_vc_adjustment_changed(GtkAdjustment *adjustment, void *opaque)
Signature · 1 line
2.11.0
#14 lore raw

[Qemu-devel] [PULL 05/14] futex: add missing header guards

In reply to Michael Tokarev

From: "Emilio G. Cota" <[email protected]>

The header file was introduced by fbcc3e5 ("qemu-thread: optimize QemuLockCnt with futexes on Linux", 2017-01-16) without header guards. Add them.

---
 include/qemu/futex.h | 5 +++++
 1 file changed, 5 insertions(+)
include/qemu/futex.h +5 -0
index bb7dc9e296..91ae88966e 100644
@@ -11,6 +11,9 @@
  *
  */
 
+#ifndef QEMU_FUTEX_H
+#define QEMU_FUTEX_H
+
 #include <sys/syscall.h>
 #include <linux/futex.h>
 
@@ -34,3 +37,5 @@ static inline void qemu_futex_wait(void *f, unsigned val)
         }
     }
 }
+
+#endif /* QEMU_FUTEX_H */
Signature · 1 line
2.11.0
#15 lore raw
In reply to Michael Tokarev
Quoted 9 lines · Michael Tokarev

Here's a set of trivial changes accumulated so far. Not including large series by Philippe Mathieu-Daudé.

The following changes since commit c5bbcaa4b7c0f8a322bebe9ec563560178a68b55:

Merge remote-tracking branch 'remotes/mst/tags/for_upstream' into staging (2017-10-16 17:29:16 +0100)

are available in the git repository at:

Quoted 9 lines

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

for you to fetch changes up to 6b4f250bfc529bdf73a10ca6873a460175e666cc:

Add myself as maintainer for TPM code (2017-10-16 23:17:44 +0300)

----------------------------------------------------------------
trivial patches for 2017-10-16

Applied, thanks.

-- PMM