KVM, build, NBD, SCSI patches for 2016-06-16
Subsystems (2)
The following changes since commit dc278c58fa02e5fb796dbacf02c8dde32f697015:
Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2016-06-16 15:22:56 +0100)
are available in the git repository at:
git://github.com/bonzini/qemu.git tags/for-upstream
for you to fetch changes up to 573c0caee76fc14f4557d2146f0c9ae67be658c4:
vl: smp_parse: cleanups (2016-06-16 18:33:04 +0200)
v1->v2: rebase, rerun clean-includes, drop Greg's patch, fix PRIx16
----------------------------------------------------------------
* KVM startup speedup (Chao Peng)
* configure fixes and cleanups (David, Thomas)
* ctags fix (Sergey)
* NBD cleanups (Peter, Eric)
* "-L help" command line option (Richard)
* More esp.c bugfixes (me, Prasad)
* KVM_CAP_MAX_VCPU_ID support (Greg)
----------------------------------------------------------------
Andrew Jones (1):
vl: smp_parse: cleanups
Chao Peng (1):
target-i386: kvm: cache KVM_GET_SUPPORTED_CPUID data
Dr. David Alan Gilbert (2):
Make avx2 configure test work with -O2
avx2 configure: Use primitives in test
Eric Blake (9):
nbd: Use BDRV_REQ_FUA for better FUA where supported
nbd: More debug typo fixes, use correct formats
nbd: Quit server after any write error
nbd: Improve server handling of bogus commands
nbd: Reject unknown request flags
nbd: Group all Linux-specific ioctl code in one place
nbd: Clean up ioctl handling of qemu-nbd -c
nbd: Detect servers that send unexpected error values
nbd: Avoid magic number for NBD max name size
Greg Kurz (1):
KVM: use KVM_CAP_MAX_VCPU_ID
Paolo Bonzini (5):
os-posix: include sys/mman.h
clean-includes: run it once more
nbd: simplify the nbd_request and nbd_reply structs
scsi: esp: respect FIFO invariant after message phase
scsi: esp: clean up handle_ti/esp_do_dma if s->do_cmd
Peter Maydell (2):
nbd: Don't use *_to_cpup() functions
nbd: Don't use cpu_to_*w() functions
Prasad J Pandit (2):
scsi: esp: check buffer length before reading scsi command
scsi: esp: make cmdbuf big enough for maximum CDB size
Richard W.M. Jones (1):
vl.c: Add '-L help' which lists data dirs.
Sergey Fedorov (1):
Makefile: Fix tag file generation targets
Thomas Huth (4):
configure: Remove unused CONFIG_ZERO_MALLOC setting
configure: Enable -Werror for MinGW builds, too
configure: Remove unused CONFIG_SIGEV_THREAD_ID switch
scsi-disk: Use (unsigned long) typecasts when using "%lu" format string
Makefile | 4 +- audio/ossaudio.c | 1 - block/qcow2-cache.c | 5 - bsd-user/elfload.c | 1 - bsd-user/main.c | 1 - bsd-user/mmap.c | 1 - bsd-user/syscall.c | 1 - configure | 57 +++------- contrib/ivshmem-server/ivshmem-server.c | 1 - exec.c | 1 - hw/block/xen_disk.c | 1 - hw/char/xen_console.c | 1 - hw/display/xenfb.c | 1 - hw/i386/kvm/pci-assign.c | 1 - hw/misc/ivshmem.c | 2 - hw/misc/pc-testdev.c | 3 - hw/net/net_tx_pkt.c | 1 + hw/net/net_tx_pkt.h | 1 - hw/net/xen_nic.c | 1 - hw/scsi/esp.c | 22 ++-- hw/scsi/scsi-disk.c | 8 +- hw/usb/xen-usb.c | 1 - hw/vfio/common.c | 1 - hw/vfio/pci.c | 1 - hw/virtio/virtio-balloon.c | 4 - hw/xen/xen_backend.c | 1 - hw/xen/xen_pt_msi.c | 1 - include/block/nbd.h | 19 +++- include/hw/scsi/esp.h | 3 +- include/qemu/osdep.h | 2 - include/qemu/qdist.h | 1 - include/qemu/qht.h | 1 - include/sysemu/os-posix.h | 1 + kvm-all.c | 9 +- linux-user/elfload.c | 1 - linux-user/flatload.c | 1 - linux-user/main.c | 1 - linux-user/mmap.c | 1 - linux-user/strace.c | 1 - linux-user/syscall.c | 1 - migration/postcopy-ram.c | 1 - nbd/client.c | 98 ++++++++++------ nbd/server.c | 191 +++++++++++++++++++------------- net/netmap.c | 1 - os-posix.c | 1 - qemu-char.c | 1 - qemu-nbd.c | 4 +- qemu-options.hx | 2 + scripts/clean-includes | 3 + target-arm/kvm.c | 1 - target-arm/kvm32.c | 1 - target-arm/kvm64.c | 1 - target-i386/kvm.c | 10 +- target-mips/kvm.c | 1 - target-ppc/kvm.c | 1 - target-s390x/kvm.c | 1 - tests/e1000e-test.c | 1 - tests/i440fx-test.c | 1 - tests/ivshmem-test.c | 1 - tests/postcopy-test.c | 2 - tests/qht-bench.c | 1 - tests/test-qdist.c | 1 - tests/test-qht-par.c | 1 - tests/test-qht.c | 1 - tests/vhost-user-bridge.c | 1 - tests/vhost-user-test.c | 1 - translate-all.c | 2 - util/cutils.c | 8 +- util/memfd.c | 2 - util/mmap-alloc.c | 1 - util/osdep.c | 4 - util/oslib-posix.c | 1 - util/qdist.c | 1 + util/qht.c | 1 + vl.c | 47 ++++---- xen-hvm.c | 1 - xen-mapcache.c | 1 - 77 files changed, 273 insertions(+), 291 deletions(-)
Signature · 1 line
2.5.5
[Qemu-devel] [PULL 02/29] os-posix: include sys/mman.h
qemu/osdep.h checks whether MAP_ANONYMOUS is defined, but this check is bogus without a previous inclusion of sys/mman.h. Include it in sysemu/os-posix.h and remove it from everywhere else.
--- audio/ossaudio.c | 1 - block/qcow2-cache.c | 5 ----- bsd-user/elfload.c | 1 - bsd-user/main.c | 1 - bsd-user/mmap.c | 1 - bsd-user/syscall.c | 1 - contrib/ivshmem-server/ivshmem-server.c | 1 - exec.c | 1 - hw/block/xen_disk.c | 1 - hw/char/xen_console.c | 1 - hw/display/xenfb.c | 1 - hw/i386/kvm/pci-assign.c | 1 - hw/misc/ivshmem.c | 2 -- hw/misc/pc-testdev.c | 3 --- hw/net/xen_nic.c | 1 - hw/usb/xen-usb.c | 1 - hw/vfio/common.c | 1 - hw/vfio/pci.c | 1 - hw/virtio/virtio-balloon.c | 4 ---- hw/xen/xen_backend.c | 1 - hw/xen/xen_pt_msi.c | 1 - include/qemu/osdep.h | 2 -- include/sysemu/os-posix.h | 1 + kvm-all.c | 1 - linux-user/elfload.c | 1 - linux-user/flatload.c | 1 - linux-user/main.c | 1 - linux-user/mmap.c | 1 - linux-user/strace.c | 1 - linux-user/syscall.c | 1 - migration/postcopy-ram.c | 1 - net/netmap.c | 1 - os-posix.c | 1 - qemu-char.c | 1 - scripts/clean-includes | 3 +++ target-arm/kvm.c | 1 - target-arm/kvm32.c | 1 - target-arm/kvm64.c | 1 - target-i386/kvm.c | 1 - target-mips/kvm.c | 1 - target-ppc/kvm.c | 1 - target-s390x/kvm.c | 1 - tests/i440fx-test.c | 1 - tests/ivshmem-test.c | 1 - tests/postcopy-test.c | 1 - tests/vhost-user-bridge.c | 1 - tests/vhost-user-test.c | 1 - translate-all.c | 2 -- util/memfd.c | 2 -- util/mmap-alloc.c | 1 - util/osdep.c | 4 ---- util/oslib-posix.c | 1 - xen-hvm.c | 1 - xen-mapcache.c | 1 - 54 files changed, 4 insertions(+), 68 deletions(-)
audio/ossaudio.c +0 -1
@@ -22,7 +22,6 @@* THE SOFTWARE. */ #include "qemu/osdep.h" -#include <sys/mman.h> #include <sys/ioctl.h> #include <sys/soundcard.h> #include "qemu-common.h"
block/qcow2-cache.c +0 -5
@@ -24,11 +24,6 @@/* Needed for CONFIG_MADVISE */ #include "qemu/osdep.h" - -#if defined(CONFIG_MADVISE ) || defined(CONFIG_POSIX_MADVISE ) -#include <sys/mman.h> -#endif -#include "block/block_int.h" #include "qemu-common.h" #include "qcow2.h"
bsd-user/elfload.c +0 -1
@@ -1,7 +1,6 @@/* This is the Linux kernel elf-loading code, ported into user space */ #include "qemu/osdep.h" -#include <sys/mman.h> #include "qemu.h" #include "disas/disas.h"
bsd-user/main.c +0 -1
@@ -18,7 +18,6 @@*/ #include "qemu/osdep.h" #include <machine/trap.h> -#include <sys/mman.h> #include "qemu.h" #include "qemu/path.h"
bsd-user/mmap.c +0 -1
@@ -17,7 +17,6 @@* along with this program; if not, see <http://www.gnu.org/licenses/>. */ #include "qemu/osdep.h" -#include <sys/mman.h> #include "qemu.h" #include "qemu-common.h"
bsd-user/syscall.c +0 -1
@@ -19,7 +19,6 @@#include "qemu/osdep.h" #include "qemu/cutils.h" #include "qemu/path.h" -#include <sys/mman.h> #include <sys/syscall.h> #include <sys/param.h> #include <sys/sysctl.h>
contrib/ivshmem-server/ivshmem-server.c +0 -1
@@ -10,7 +10,6 @@#include "qemu/host-utils.h" #include "qemu/sockets.h" -#include <sys/mman.h> #include <sys/socket.h> #include <sys/un.h>
exec.c +0 -1
@@ -19,7 +19,6 @@#include "qemu/osdep.h" #include "qapi/error.h" #ifndef _WIN32 -#include <sys/mman.h> #endif #include "qemu/cutils.h"
hw/block/xen_disk.c +0 -1
@@ -21,7 +21,6 @@#include "qemu/osdep.h" #include <sys/ioctl.h> -#include <sys/mman.h> #include <sys/uio.h> #include "hw/hw.h"
hw/char/xen_console.c +0 -1
@@ -22,7 +22,6 @@#include "qemu/osdep.h" #include <sys/select.h> #include <termios.h> -#include <sys/mman.h> #include "hw/hw.h" #include "sysemu/char.h"
hw/display/xenfb.c +0 -1
@@ -25,7 +25,6 @@*/ #include "qemu/osdep.h" -#include <sys/mman.h> #include "hw/hw.h" #include "ui/console.h"
hw/i386/kvm/pci-assign.c +0 -1
@@ -22,7 +22,6 @@*/ #include "qemu/osdep.h" #include "qapi/error.h" -#include <sys/mman.h> #include "hw/hw.h" #include "hw/i386/pc.h" #include "qemu/error-report.h"
hw/misc/ivshmem.c +0 -2
@@ -36,8 +36,6 @@#include "hw/misc/ivshmem.h" -#include <sys/mman.h> -#define PCI_VENDOR_ID_IVSHMEM PCI_VENDOR_ID_REDHAT_QUMRANET#define PCI_DEVICE_ID_IVSHMEM 0x1110
hw/misc/pc-testdev.c +0 -3
@@ -36,9 +36,6 @@*/ #include "qemu/osdep.h" -#if defined(CONFIG_POSIX ) -#include <sys/mman.h> -#endif #include "hw/hw.h" #include "hw/qdev.h" #include "hw/isa/isa.h"
hw/net/xen_nic.c +0 -1
@@ -22,7 +22,6 @@#include "qemu/osdep.h" #include <sys/socket.h> #include <sys/ioctl.h> -#include <sys/mman.h> #include <sys/wait.h> #include "hw/hw.h"
hw/usb/xen-usb.c +0 -1
@@ -21,7 +21,6 @@#include "qemu/osdep.h" #include <libusb.h> -#include <sys/mman.h> #include "qemu-common.h" #include "qemu/config-file.h"
hw/vfio/common.c +0 -1
@@ -20,7 +20,6 @@#include "qemu/osdep.h" #include <sys/ioctl.h> -#include <sys/mman.h> #include <linux/vfio.h> #include "hw/vfio/vfio-common.h"
hw/vfio/pci.c +0 -1
@@ -21,7 +21,6 @@#include "qemu/osdep.h" #include <linux/vfio.h> #include <sys/ioctl.h> -#include <sys/mman.h> #include "hw/pci/msi.h" #include "hw/pci/msix.h"
hw/virtio/virtio-balloon.c +0 -4
@@ -27,10 +27,6 @@#include "qapi-event.h" #include "trace.h" -#if defined(__linux__) -#include <sys/mman.h> -#endif -#include "hw/virtio/virtio-bus.h" #include "hw/virtio/virtio-access.h"
hw/xen/xen_backend.c +0 -1
@@ -23,7 +23,6 @@*/ #include "qemu/osdep.h" -#include <sys/mman.h> #include <sys/signal.h> #include "hw/hw.h"
hw/xen/xen_pt_msi.c +0 -1
@@ -10,7 +10,6 @@*/ #include "qemu/osdep.h" -#include <sys/mman.h> #include "hw/xen/xen_backend.h" #include "xen_pt.h"
include/qemu/osdep.h +0 -2
@@ -197,8 +197,6 @@ void qemu_anon_ram_free(void *ptr, size_t size);#if defined(CONFIG_MADVISE ) -#include <sys/mman.h> -#define QEMU_MADV_WILLNEED MADV_WILLNEED#define QEMU_MADV_DONTNEED MADV_DONTNEED#ifdef MADV_DONTFORK
include/sysemu/os-posix.h +1 -0
@@ -26,6 +26,7 @@#ifndef QEMU_OS_POSIX_H #define QEMU_OS_POSIX_H +#include <sys/mman.h> #include <sys/socket.h> #include <netinet/in.h> #include <netinet/tcp.h>
kvm-all.c +0 -1
@@ -15,7 +15,6 @@#include "qemu/osdep.h" #include <sys/ioctl.h> -#include <sys/mman.h> #include <linux/kvm.h>
linux-user/elfload.c +0 -1
@@ -2,7 +2,6 @@#include "qemu/osdep.h" #include <sys/param.h> -#include <sys/mman.h> #include <sys/resource.h> #include "qemu.h"
linux-user/flatload.c +0 -1
@@ -34,7 +34,6 @@/****************************************************************************/ #include "qemu/osdep.h" -#include <sys/mman.h> #include "qemu.h" #include "flat.h"
linux-user/main.c +0 -1
@@ -18,7 +18,6 @@*/ #include "qemu/osdep.h" #include "qemu-version.h" -#include <sys/mman.h> #include <sys/syscall.h> #include <sys/resource.h>
linux-user/mmap.c +0 -1
@@ -17,7 +17,6 @@* along with this program; if not, see <http://www.gnu.org/licenses/>. */ #include "qemu/osdep.h" -#include <sys/mman.h> #include <linux/mman.h> #include <linux/unistd.h>
linux-user/strace.c +0 -1
@@ -5,7 +5,6 @@#include <sys/shm.h> #include <sys/select.h> #include <sys/mount.h> -#include <sys/mman.h> #include <sched.h> #include "qemu.h"
linux-user/syscall.c +0 -1
@@ -32,7 +32,6 @@#include <sys/personality.h> #include <sys/prctl.h> #include <sys/resource.h> -#include <sys/mman.h> #include <sys/swap.h> #include <linux/capability.h> #include <sched.h>
migration/postcopy-ram.c +0 -1
@@ -51,7 +51,6 @@ struct PostcopyDiscardState {#if defined(__linux__)#include <poll.h> -#include <sys/mman.h> #include <sys/ioctl.h> #include <sys/syscall.h> #include <asm/types.h> /* for __u64 */
net/netmap.c +0 -1
@@ -26,7 +26,6 @@#include "qemu/osdep.h" #include <sys/ioctl.h> #include <net/if.h> -#include <sys/mman.h> #define NETMAP_WITH_LIBS #include <net/netmap.h> #include <net/netmap_user.h>
os-posix.c +0 -1
@@ -26,7 +26,6 @@#include "qemu/osdep.h" #include <sys/wait.h> /*needed for MAP_POPULATE before including qemu-options.h */ -#include <sys/mman.h> #include <pwd.h> #include <grp.h> #include <libgen.h>
qemu-char.c +0 -1
@@ -47,7 +47,6 @@#include <sys/times.h> #include <sys/wait.h> #include <termios.h> -#include <sys/mman.h> #include <sys/ioctl.h> #include <sys/resource.h> #include <sys/socket.h>
scripts/clean-includes +3 -0
@@ -105,6 +105,8 @@ for f in "$@"; do *include/qemu/osdep.h | \ *include/qemu/compiler.h | \ *include/glib-compat.h | \ + *include/sysemu/os-posix.h | \ + *include/sysemu/os-win32.h | \ *include/standard-headers/ ) # Removing include lines from osdep.h itself would be counterproductive. echo "SKIPPING $f (special case header)"
@@ -145,6 +147,7 @@ for f in "$@"; do <stdlib.h> <stdio.h> <string.h> <strings.h> <inttypes.h> <limits.h> <unistd.h> <time.h> <ctype.h> <errno.h> <fcntl.h> <sys/stat.h> <sys/time.h> <assert.h> <signal.h> <glib.h> + <sys/stat.h> <sys/time.h> <assert.h> <signal.h> <glib.h> <sys/mman.h> "sysemu/os-posix.h, sysemu/os-win32.h "glib-compat.h" "qemu/typedefs.h" ))' "$f"
target-arm/kvm.c +0 -1
@@ -10,7 +10,6 @@#include "qemu/osdep.h" #include <sys/ioctl.h> -#include <sys/mman.h> #include <linux/kvm.h>
target-arm/kvm32.c +0 -1
@@ -10,7 +10,6 @@#include "qemu/osdep.h" #include <sys/ioctl.h> -#include <sys/mman.h> #include <linux/kvm.h>
target-arm/kvm64.c +0 -1
@@ -11,7 +11,6 @@#include "qemu/osdep.h" #include <sys/ioctl.h> -#include <sys/mman.h> #include <sys/ptrace.h> #include <linux/elf.h>
target-i386/kvm.c +0 -1
@@ -15,7 +15,6 @@#include "qemu/osdep.h" #include "qapi/error.h" #include <sys/ioctl.h> -#include <sys/mman.h> #include <sys/utsname.h> #include <linux/kvm.h>
target-mips/kvm.c +0 -1
@@ -11,7 +11,6 @@#include "qemu/osdep.h" #include <sys/ioctl.h> -#include <sys/mman.h> #include <linux/kvm.h>
target-ppc/kvm.c +0 -1
@@ -17,7 +17,6 @@#include "qemu/osdep.h" #include <dirent.h> #include <sys/ioctl.h> -#include <sys/mman.h> #include <sys/vfs.h> #include <linux/kvm.h>
target-s390x/kvm.c +0 -1
@@ -23,7 +23,6 @@#include "qemu/osdep.h" #include <sys/ioctl.h> -#include <sys/mman.h> #include <linux/kvm.h> #include <asm/ptrace.h>
tests/i440fx-test.c +0 -1
@@ -13,7 +13,6 @@*/ #include "qemu/osdep.h" -#include <sys/mman.h> #include "libqtest.h" #include "libqos/pci.h"
tests/ivshmem-test.c +0 -1
@@ -10,7 +10,6 @@#include "qemu/osdep.h" #include <glib/gstdio.h> -#include <sys/mman.h> #include "contrib/ivshmem-server/ivshmem-server.h" #include "libqos/pci-pc.h" #include "libqtest.h"
tests/postcopy-test.c +0 -1
@@ -26,7 +26,6 @@ const unsigned end_address = 100 * 1024 * 1024;bool got_stop;#if defined(__linux__) -#include <sys/mman.h> #include <sys/syscall.h> #include <sys/vfs.h> #endif
tests/vhost-user-bridge.c +0 -1
@@ -33,7 +33,6 @@#include <sys/socket.h> #include <sys/un.h> #include <sys/unistd.h> -#include <sys/mman.h> #include <sys/eventfd.h> #include <arpa/inet.h> #include <netdb.h>
tests/vhost-user-test.c +0 -1
@@ -17,7 +17,6 @@#include "sysemu/sysemu.h" #include <linux/vhost.h> -#include <sys/mman.h> #include <sys/vfs.h> #include <qemu/sockets.h>
translate-all.c +0 -2
@@ -18,8 +18,6 @@*/ #ifdef _WIN32#include <windows.h> -#else -#include <sys/mman.h> #endif #include "qemu/osdep.h"
util/memfd.c +0 -2
@@ -29,8 +29,6 @@#include <glib/gprintf.h> -#include <sys/mman.h> -#include "qemu/memfd.h" #ifdef CONFIG_MEMFD
util/mmap-alloc.c +0 -1
@@ -11,7 +11,6 @@*/ #include "qemu/osdep.h" #include <qemu/mmap-alloc.h> -#include <sys/mman.h> #define HUGETLBFS_MAGIC 0x958458f6
util/osdep.c +0 -4
@@ -25,10 +25,6 @@/* Needed early for CONFIG_BSD etc. */ -#if defined(CONFIG_MADVISE ) || defined(CONFIG_POSIX_MADVISE ) -#include <sys/mman.h> -#endif -#ifdef CONFIG_SOLARIS #include <sys/statvfs.h> /* See MySQL bug #7156 (http://bugs.mysql.com/bug.php?id=7156) for
util/oslib-posix.c +0 -1
@@ -36,7 +36,6 @@#include "trace.h" #include "qapi/error.h" #include "qemu/sockets.h" -#include <sys/mman.h> #include <libgen.h> #include <sys/signal.h> #include "qemu/cutils.h"
xen-hvm.c +0 -1
@@ -9,7 +9,6 @@*/ #include "qemu/osdep.h" -#include <sys/mman.h> #include "cpu.h" #include "hw/pci/pci.h"
xen-mapcache.c +0 -1
@@ -17,7 +17,6 @@#include "qemu/bitmap.h" #include <xen/hvm/params.h> -#include <sys/mman.h> #include "sysemu/xen-mapcache.h" #include "trace.h"
Signature · 1 line
2.5.5
[Qemu-devel] [PULL 03/29] clean-includes: run it once more
In reply to Paolo Bonzini--- hw/net/net_tx_pkt.c | 1 + hw/net/net_tx_pkt.h | 1 - include/qemu/qdist.h | 1 - include/qemu/qht.h | 1 - tests/e1000e-test.c | 1 - tests/postcopy-test.c | 1 - tests/qht-bench.c | 1 - tests/test-qdist.c | 1 - tests/test-qht-par.c | 1 - tests/test-qht.c | 1 - util/qdist.c | 1 + util/qht.c | 1 + 12 files changed, 3 insertions(+), 9 deletions(-)
hw/net/net_tx_pkt.c +1 -0
@@ -15,6 +15,7 @@* */ +#include "qemu/osdep.h" #include "net_tx_pkt.h" #include "net/eth.h" #include "net/checksum.h"
hw/net/net_tx_pkt.h +0 -1
@@ -18,7 +18,6 @@#ifndef NET_TX_PKT_H #define NET_TX_PKT_H -#include "qemu/osdep.h" #include "net/eth.h" #include "exec/hwaddr.h"
include/qemu/qdist.h +0 -1
@@ -7,7 +7,6 @@#ifndef QEMU_QDIST_H #define QEMU_QDIST_H -#include "qemu/osdep.h" #include "qemu-common.h" #include "qemu/bitops.h"
include/qemu/qht.h +0 -1
@@ -7,7 +7,6 @@#ifndef QEMU_QHT_H #define QEMU_QHT_H -#include "qemu/osdep.h" #include "qemu/seqlock.h" #include "qemu/thread.h" #include "qemu/qdist.h"
tests/e1000e-test.c +0 -1
@@ -25,7 +25,6 @@#include "qemu/osdep.h" -#include <glib.h> #include "libqtest.h" #include "qemu-common.h" #include "libqos/pci-pc.h"
tests/postcopy-test.c +0 -1
@@ -11,7 +11,6 @@*/ #include "qemu/osdep.h" -#include <glib.h> #include "libqtest.h" #include "qemu/option.h"
tests/qht-bench.c +0 -1
@@ -5,7 +5,6 @@* See the COPYING file in the top-level directory. */ #include "qemu/osdep.h" -#include <glib.h> #include "qemu/processor.h" #include "qemu/atomic.h" #include "qemu/qht.h"
tests/test-qdist.c +0 -1
@@ -5,7 +5,6 @@* See the COPYING file in the top-level directory. */ #include "qemu/osdep.h" -#include <glib.h> #include "qemu/qdist.h" #include <math.h>
tests/test-qht-par.c +0 -1
@@ -5,7 +5,6 @@* See the COPYING file in the top-level directory. */ #include "qemu/osdep.h" -#include <glib.h> #define TEST_QHT_STRING "tests/qht-bench 1>/dev/null 2>&1 -R -S0.1 -D10000 -N1 "
tests/test-qht.c +0 -1
@@ -5,7 +5,6 @@* See the COPYING file in the top-level directory. */ #include "qemu/osdep.h" -#include <glib.h> #include "qemu/qht.h" #define N 5000
util/qdist.c +1 -0
@@ -6,6 +6,7 @@* License: GNU GPL, version 2 or later. * See the COPYING file in the top-level directory. */ +#include "qemu/osdep.h" #include "qemu/qdist.h" #include <math.h>
util/qht.c +1 -0
@@ -65,6 +65,7 @@* + Corbet, "Relativistic hash tables, part 1: Algorithms", @ lwn.net, 2014. * https://lwn.net/Articles/612021/ */ +#include "qemu/osdep.h" #include "qemu/qht.h" #include "qemu/atomic.h" #include "qemu/rcu.h"
Signature · 1 line
2.5.5
[Qemu-devel] [PULL 17/29] nbd: More debug typo fixes, use correct formats
In reply to Paolo BonziniFrom: Eric Blake <[email protected]>
Clean up some debug message oddities missed earlier; this includes some typos, and recognizing that %d is not necessarily compatible with uint32_t. Also add a couple messages that I found useful while debugging things.
Message-Id: <[email protected]>
--- nbd/client.c | 41 ++++++++++++++++++++++------------------- nbd/server.c | 48 +++++++++++++++++++++++++++--------------------- 2 files changed, 49 insertions(+), 40 deletions(-)
nbd/client.c +22 -19
@@ -109,25 +109,27 @@ static int nbd_handle_reply_err(QIOChannel *ioc, uint32_t opt, uint32_t type,switch (type) {case NBD_REP_ERR_UNSUP : -TRACE ("server doesn't understand request %d, attempting fallback" , - opt); +TRACE ("server doesn't understand request %" PRIx32 +", attempting fallback" , opt); result =0 ; goto cleanup;case NBD_REP_ERR_POLICY : -error_setg (errp,"Denied by server for option %x" , opt); +error_setg (errp,"Denied by server for option %" PRIx32, opt);break ;case NBD_REP_ERR_INVALID : -error_setg (errp,"Invalid data length for option %x" , opt); +error_setg (errp,"Invalid data length for option %" PRIx32, opt);break ;case NBD_REP_ERR_TLS_REQD : -error_setg (errp,"TLS negotiation required before option %x" , opt); +error_setg (errp,"TLS negotiation required before option %" PRIx32, + opt);break ;default : -error_setg (errp,"Unknown error code when asking for option %x" , opt); +error_setg (errp,"Unknown error code when asking for option %" PRIx32, + opt);break ; }
@@ -165,7 +167,7 @@ static int nbd_receive_list(QIOChannel *ioc, char **name, Error **errp) } opt =be32_to_cpu (opt);if (opt !=NBD_OPT_LIST ) { -error_setg (errp,"Unexpected option type %x expected %x" , +error_setg (errp,"Unexpected option type %" PRIx32" expected %x" , opt,NBD_OPT_LIST );return -1 ; }
@@ -207,7 +209,7 @@ static int nbd_receive_list(QIOChannel *ioc, char **name, Error **errp)return -1 ; }if (namelen >255 ) { -error_setg (errp,"export name length too long %d" , namelen); +error_setg (errp,"export name length too long %" PRIu32, namelen);return -1 ; }
@@ -234,7 +236,7 @@ static int nbd_receive_list(QIOChannel *ioc, char **name, Error **errp)g_free (buf); } }else { -error_setg (errp,"Unexpected reply type %x expected %x" , +error_setg (errp,"Unexpected reply type %" PRIx32" expected %x" , type,NBD_REP_SERVER );return -1 ; }
@@ -349,7 +351,7 @@ static QIOChannel *nbd_receive_starttls(QIOChannel *ioc, } opt =be32_to_cpu (opt);if (opt !=NBD_OPT_STARTTLS ) { -error_setg (errp,"Unexpected option type %x expected %x" , +error_setg (errp,"Unexpected option type %" PRIx32" expected %x" , opt,NBD_OPT_STARTTLS );return NULL ; }
@@ -361,7 +363,7 @@ static QIOChannel *nbd_receive_starttls(QIOChannel *ioc, } type =be32_to_cpu (type);if (type !=NBD_REP_ACK ) { -error_setg (errp,"Server rejected request to start TLS %x" , +error_setg (errp,"Server rejected request to start TLS %" PRIx32, type);return NULL ; }
@@ -373,7 +375,7 @@ static QIOChannel *nbd_receive_starttls(QIOChannel *ioc, } length =be32_to_cpu (length);if (length !=0 ) { -error_setg (errp,"Start TLS response was not zero %x" , +error_setg (errp,"Start TLS response was not zero %" PRIu32, length);return NULL ; }
@@ -384,7 +386,7 @@ static QIOChannel *nbd_receive_starttls(QIOChannel *ioc,return NULL ; } data.loop =g_main_loop_new (g_main_context_default (), FALSE); -TRACE ("Starting TLS hanshake" ); +TRACE ("Starting TLS handshake" ); qio_channel_tls_handshake(tioc, nbd_tls_handshake, &data,
@@ -474,7 +476,7 @@ int nbd_receive_negotiate(QIOChannel *ioc, const char *name, uint32_t *flags, } globalflags =be16_to_cpu (globalflags); *flags = globalflags <<16 ; -TRACE ("Global flags are %x" , globalflags); +TRACE ("Global flags are %" PRIx32, globalflags);if (globalflags &NBD_FLAG_FIXED_NEWSTYLE ) { fixedNewStyle = true;TRACE ("Server supports fixed new style" );
@@ -550,7 +552,7 @@ int nbd_receive_negotiate(QIOChannel *ioc, const char *name, uint32_t *flags, } exportflags =be16_to_cpu (exportflags); *flags |= exportflags; -TRACE ("Export flags are %x" , exportflags); +TRACE ("Export flags are %" PRIx16, exportflags); }else if (magic ==NBD_CLIENT_MAGIC ) {if (name) {error_setg (errp,"Server does not support export names" );
@@ -683,7 +685,8 @@ ssize_t nbd_send_request(QIOChannel *ioc, struct nbd_request *request)ssize_t ret;TRACE ("Sending request to server: " -"{ .from = %" PRIu64", .len = %u, .handle = %" PRIu64", .type=%i}" , +"{ .from = %" PRIu64", .len = %" PRIu32", .handle = %" PRIu64 +", .type=%" PRIu16" }" , request->from, request->len, request->handle, request->type);stl_be_p (buf,NBD_REQUEST_MAGIC );
@@ -732,12 +735,12 @@ ssize_t nbd_receive_reply(QIOChannel *ioc, struct nbd_reply *reply) reply->error =nbd_errno_to_system_errno (reply->error); -TRACE ("Got reply: " -"{ magic = 0x%x, .error = %d, handle = %" PRIu64" }" , +TRACE ("Got reply: { magic = 0x%" PRIx32", .error = % " PRId32 +", handle = %" PRIu64" }" , magic, reply->error, reply->handle);if (magic !=NBD_REPLY_MAGIC ) { -LOG ("invalid magic (got 0x%x)" , magic); +LOG ("invalid magic (got 0x%" PRIx32")" , magic);return -EINVAL ; }return 0 ;
nbd/server.c +27 -21
155 lines not on this page · raw message
Signature · 1 line
2.5.5
Peter Maydell
AppliedQuoted 6 lines · Paolo Bonzini
The following changes since commit
dc278c58fa02e5fb796dbacf02c8dde32f697015:Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging (2016-06-16 15:22:56 +0100)
are available in the git repository at:
Quoted 7 lines
git://github.com/bonzini/qemu.gittags/for-upstreamfor you to fetch changes up to
573c0caee76fc14f4557d2146f0c9ae67be658c4:vl:
smp_parse: cleanups (2016-06-16 18:33:04 +0200)
v1->v2: rebase, rerun clean-includes, drop Greg's patch, fix PRIx16
Applied, thanks.
-- PMM