Accepting request 701649 from Virtualization

Update to v4.0.0. Also include some gcc9 related code fixes.

OBS-URL: https://build.opensuse.org/request/show/701649
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/qemu?expand=0&rev=154
This commit is contained in:
Dominique Leuenberger 2019-05-10 07:10:48 +00:00 committed by Git OBS Bridge
commit d1bf355ab2
101 changed files with 2482 additions and 4302 deletions

View File

@ -8,7 +8,7 @@ Signed-off-by: Bruce Rogers <brogers@suse.com>
1 file changed, 6 insertions(+)
diff --git a/linux-user/signal.c b/linux-user/signal.c
index 602b631b92..49b00e0b2b 100644
index e2c0b37173..8588c97507 100644
--- a/linux-user/signal.c
+++ b/linux-user/signal.c
@@ -575,6 +575,10 @@ static void QEMU_NORETURN dump_core_and_abort(int target_sig)

View File

@ -11,10 +11,10 @@ Signed-off-by: Bruce Rogers <brogers@suse.com>
1 file changed, 3 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 280137da8c..0f6ce7231a 100644
index 96cd4bf86d..cb0019b3df 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -8116,6 +8116,9 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
@@ -8173,6 +8173,9 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
case TARGET_NR_gettimeofday:
{
struct timeval tv;

View File

@ -13,10 +13,10 @@ Signed-off-by: Bruce Rogers <brogers@suse.com>
1 file changed, 13 insertions(+), 1 deletion(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 0f6ce7231a..331177716b 100644
index cb0019b3df..4d4112adf9 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -4773,7 +4773,19 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg)
@@ -4824,7 +4824,19 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg)
ie = ioctl_entries;
for(;;) {
if (ie->target_cmd == 0) {

View File

@ -12,26 +12,28 @@ Signed-off-by: Ulrich Hecht <uli@suse.de>
[BR: minor edits to pass qemu's checkpatch script]
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
linux-user/syscall.c | 6 ++++++
1 file changed, 6 insertions(+)
linux-user/syscall.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 331177716b..f3cdecce7e 100644
index 4d4112adf9..958f94ab2a 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -4814,6 +4814,11 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg)
@@ -4865,6 +4865,13 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg)
arg_type++;
target_size = thunk_type_size(arg_type, 0);
switch(ie->access) {
+ /* FIXME: actually the direction given in the ioctl should be
+ /*
+ * FIXME: actually the direction given in the ioctl should be
+ * correct so we can assume the communication is uni-directional.
+ * The alsa developers did not like this concept though and
+ * declared ioctls IOC_R and IOC_W even though they were IOC_RW.*/
+ * declared ioctls IOC_R and IOC_W even though they were IOC_RW.
+ */
+/*
case IOC_R:
ret = get_errno(safe_ioctl(fd, ie->host_cmd, buf_temp));
if (!is_error(ret)) {
@@ -4832,6 +4837,7 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg)
@@ -4883,6 +4890,7 @@ static abi_long do_ioctl(int fd, int cmd, abi_long arg)
unlock_user(argptr, arg, 0);
ret = get_errno(safe_ioctl(fd, ie->host_cmd, buf_temp));
break;

View File

@ -35,12 +35,12 @@ Signed-off-by: Andreas Färber <afaerber@suse.de>
3 files changed, 57 insertions(+)
diff --git a/Makefile.target b/Makefile.target
index 4d56298bbf..c85327169f 100644
index ae02495951..53fd5aa01e 100644
--- a/Makefile.target
+++ b/Makefile.target
@@ -41,6 +41,10 @@ ifdef CONFIG_USER_ONLY
@@ -42,6 +42,10 @@ STPFILES=
# Makefile Tests
include $(SRC_PATH)/tests/tcg/Makefile.include
endif
+ifdef CONFIG_LINUX_USER
+PROGS+=$(QEMU_PROG)-binfmt
@ -49,7 +49,7 @@ index 4d56298bbf..c85327169f 100644
config-target.h: config-target.h-timestamp
config-target.h-timestamp: config-target.mak
@@ -119,6 +123,8 @@ QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) \
@@ -130,6 +134,8 @@ QEMU_CFLAGS+=-I$(SRC_PATH)/linux-user/$(TARGET_ABI_DIR) \
obj-y += linux-user/
obj-y += gdbstub.o thunk.o
@ -58,9 +58,9 @@ index 4d56298bbf..c85327169f 100644
endif #CONFIG_LINUX_USER
#########################################################
@@ -161,7 +167,11 @@ endif # CONFIG_SOFTMMU
# Workaround for http://gcc.gnu.org/PR55489, see configure.
%/translate.o: QEMU_CFLAGS += $(TRANSLATE_OPT_CFLAGS)
@@ -170,7 +176,11 @@ GENERATED_FILES += hmp-commands.h hmp-commands-info.h
endif # CONFIG_SOFTMMU
+ifdef CONFIG_LINUX_USER
+dummy := $(call unnest-vars,,obj-y obj-binfmt-y)
@ -69,8 +69,8 @@ index 4d56298bbf..c85327169f 100644
+endif
all-obj-y := $(obj-y)
target-obj-y :=
@@ -202,6 +212,9 @@ ifdef CONFIG_DARWIN
include $(SRC_PATH)/Makefile.objs
@@ -207,6 +217,9 @@ ifdef CONFIG_DARWIN
$(call quiet-command,SetFile -a C $@,"SETFILE","$(TARGET_DIR)$@")
endif

View File

@ -14,10 +14,10 @@ Signed-off-by: Bruce Rogers <brogers@suse.com>
1 file changed, 2 insertions(+)
diff --git a/exec.c b/exec.c
index bb6170dbff..6ca259efaa 100644
index 6ab62f4eee..55f3bed025 100644
--- a/exec.c
+++ b/exec.c
@@ -2248,11 +2248,13 @@ RAMBlock *qemu_ram_alloc_from_fd(ram_addr_t size, MemoryRegion *mr,
@@ -2281,11 +2281,13 @@ RAMBlock *qemu_ram_alloc_from_fd(ram_addr_t size, MemoryRegion *mr,
return NULL;
}

View File

@ -21,10 +21,10 @@ Signed-off-by: Andreas Färber <afaerber@suse.de>
1 file changed, 20 insertions(+)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index f3cdecce7e..df07e84eba 100644
index 958f94ab2a..fade440440 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -6658,6 +6658,25 @@ static int open_self_stat(void *cpu_env, int fd)
@@ -6711,6 +6711,25 @@ static int open_self_stat(void *cpu_env, int fd)
return 0;
}
@ -50,7 +50,7 @@ index f3cdecce7e..df07e84eba 100644
static int open_self_auxv(void *cpu_env, int fd)
{
CPUState *cpu = ENV_GET_CPU((CPUArchState *)cpu_env);
@@ -6772,6 +6791,7 @@ static int do_openat(void *cpu_env, int dirfd, const char *pathname, int flags,
@@ -6831,6 +6850,7 @@ static int do_openat(void *cpu_env, int dirfd, const char *pathname, int flags,
#if defined(HOST_WORDS_BIGENDIAN) != defined(TARGET_WORDS_BIGENDIAN)
{ "/proc/net/route", open_net_route, is_proc },
#endif

View File

@ -1,31 +0,0 @@
From: Adam Williamson <awilliam@redhat.com>
Date: Wed, 20 Dec 2017 15:43:07 -0800
Subject: Remove problematic 'evdev 86' key from en-us keymap
This causes LP#1738283. Gerd will have to come up with a better
fix, but just hacking out the problematic key definition should
work for now.
[BR: We see this issue as well, eg via vnc]
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
pc-bios/keymaps/en-us | 6 ------
1 file changed, 6 deletions(-)
diff --git a/pc-bios/keymaps/en-us b/pc-bios/keymaps/en-us
index a70e03adc0..e518a9dc35 100644
--- a/pc-bios/keymaps/en-us
+++ b/pc-bios/keymaps/en-us
@@ -343,12 +343,6 @@ KP_Decimal 0x53 numlock
# evdev 85 (0x55): no evdev -> QKeyCode mapping (xkb keysym NoSymbol)
-# evdev 86 (0x56), QKeyCode "less", number 0x56
-less 0x56
-greater 0x56 shift
-bar 0x56 altgr
-brokenbar 0x56 shift altgr
-
# evdev 87 (0x57), QKeyCode "f11", number 0x57
F11 0x57

View File

@ -16,7 +16,7 @@ Signed-off-by: Alexander Graf <agraf@suse.de>
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/linux-user/qemu.h b/linux-user/qemu.h
index dd5771ce0c..7e5a0fd026 100644
index ef400cb78a..ccb198f666 100644
--- a/linux-user/qemu.h
+++ b/linux-user/qemu.h
@@ -206,10 +206,10 @@ abi_long memcpy_to_target(abi_ulong dest, const void *src,
@ -35,10 +35,10 @@ index dd5771ce0c..7e5a0fd026 100644
extern __thread CPUState *thread_cpu;
void cpu_loop(CPUArchState *env);
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index df07e84eba..6ef3d3b5a8 100644
index fade440440..f2d1f8669f 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -6929,10 +6929,10 @@ static int host_to_target_cpu_mask(const unsigned long *host_mask,
@@ -6988,10 +6988,10 @@ static int host_to_target_cpu_mask(const unsigned long *host_mask,
* of syscall results, can be performed.
* All errnos that do_syscall() returns must be -TARGET_<errcode>.
*/
@ -53,7 +53,7 @@ index df07e84eba..6ef3d3b5a8 100644
{
CPUState *cpu = ENV_GET_CPU(cpu_env);
abi_long ret;
@@ -9668,7 +9668,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
@@ -9727,7 +9727,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
*/
ret = -TARGET_EINVAL;
if (cpu_isar_feature(aa64_sve, arm_env_get_cpu(cpu_env))
@ -62,7 +62,7 @@ index df07e84eba..6ef3d3b5a8 100644
CPUARMState *env = cpu_env;
ARMCPU *cpu = arm_env_get_cpu(env);
uint32_t vq, old_vq;
@@ -11521,10 +11521,10 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
@@ -11630,10 +11630,10 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_long arg1,
return ret;
}

View File

@ -22,14 +22,14 @@ This patch fixes input when using -nographic on s390 for me.
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
chardev/char-fe.c | 1 +
chardev/char-mux.c | 14 ++++++++++++++
chardev/char-mux.c | 16 ++++++++++++++++
chardev/char.c | 1 +
include/chardev/char-mux.h | 3 +++
tests/test-char.c | 1 +
5 files changed, 20 insertions(+)
5 files changed, 22 insertions(+)
diff --git a/chardev/char-fe.c b/chardev/char-fe.c
index a8931f7afd..f2455ed619 100644
index f3530a90e6..f8aa0daf31 100644
--- a/chardev/char-fe.c
+++ b/chardev/char-fe.c
@@ -21,6 +21,7 @@
@ -41,7 +41,7 @@ index a8931f7afd..f2455ed619 100644
#include "qemu/error-report.h"
#include "qapi/error.h"
diff --git a/chardev/char-mux.c b/chardev/char-mux.c
index 6055e76293..ef25fecb0c 100644
index 23aa82125d..83252fd399 100644
--- a/chardev/char-mux.c
+++ b/chardev/char-mux.c
@@ -22,6 +22,7 @@
@ -52,14 +52,16 @@ index 6055e76293..ef25fecb0c 100644
#include "qemu/osdep.h"
#include "qapi/error.h"
#include "qemu/option.h"
@@ -190,6 +191,15 @@ static void mux_chr_accept_input(Chardev *chr)
@@ -190,6 +191,17 @@ static void mux_chr_accept_input(Chardev *chr)
be->chr_read(be->opaque,
&d->buffer[m][d->cons[m]++ & MUX_BUFFER_MASK], 1);
}
+
+#if defined(TARGET_S390X)
+ /* We're still not able to sync producer and consumer, so let's wait a bit
+ and try again by then. */
+ /*
+ * We're still not able to sync producer and consumer, so let's wait a bit
+ * and try again by then.
+ */
+ if (d->prod[m] != d->cons[m]) {
+ qemu_mod_timer(d->accept_timer, qemu_get_clock_ns(vm_clock)
+ + (int64_t)100000);
@ -68,7 +70,7 @@ index 6055e76293..ef25fecb0c 100644
}
static int mux_chr_can_read(void *opaque)
@@ -324,6 +334,10 @@ static void qemu_chr_open_mux(Chardev *chr,
@@ -324,6 +336,10 @@ static void qemu_chr_open_mux(Chardev *chr,
}
d->focus = -1;
@ -80,7 +82,7 @@ index 6055e76293..ef25fecb0c 100644
* set of muxes
*/
diff --git a/chardev/char.c b/chardev/char.c
index 152dde5327..4726d7b304 100644
index 514cd6b0c3..9bd3848366 100644
--- a/chardev/char.c
+++ b/chardev/char.c
@@ -22,6 +22,7 @@
@ -92,7 +94,7 @@ index 152dde5327..4726d7b304 100644
#include "qemu/cutils.h"
#include "monitor/monitor.h"
diff --git a/include/chardev/char-mux.h b/include/chardev/char-mux.h
index 1e13187767..3a000a9e9f 100644
index 572cefd517..6e80785bd9 100644
--- a/include/chardev/char-mux.h
+++ b/include/chardev/char-mux.h
@@ -34,6 +34,9 @@ typedef struct MuxChardev {
@ -106,7 +108,7 @@ index 1e13187767..3a000a9e9f 100644
int mux_cnt;
int term_got_escape;
diff --git a/tests/test-char.c b/tests/test-char.c
index 19c3efad72..ea061dde50 100644
index 95ccfd3cdb..87fb0c1a4c 100644
--- a/tests/test-char.c
+++ b/tests/test-char.c
@@ -1,3 +1,4 @@

View File

@ -15,10 +15,10 @@ Signed-off-by: Alexander Graf <agraf@suse.de>
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 6ef3d3b5a8..e251ef4655 100644
index f2d1f8669f..5088649781 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -7283,8 +7283,13 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_ulong arg1,
@@ -7342,8 +7342,13 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_ulong arg1,
return ret;
#endif
#ifdef TARGET_NR_lseek

View File

@ -0,0 +1,49 @@
From: Bruce Rogers <brogers@suse.com>
Date: Wed, 9 Mar 2016 15:18:11 -0700
Subject: xen_disk: Add suse specific flush disable handling and map to QEMU
equiv
Add code to read the suse specific suse-diskcache-disable-flush flag out
of xenstore, and set the equivalent flag within QEMU.
Patch taken from Xen's patch queue, Olaf Hering being the original author.
[bsc#879425]
[BR: minor edits to pass qemu's checkpatch script]
[BR: With qdevification of xen-block, code has changed significantly]
Signed-off-by: Bruce Rogers <brogers@suse.com>
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
hw/block/xen-block.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c
index ef635be4c2..7cbab33247 100644
--- a/hw/block/xen-block.c
+++ b/hw/block/xen-block.c
@@ -730,6 +730,8 @@ static XenBlockDrive *xen_block_drive_create(const char *id,
const char *mode = qdict_get_try_str(opts, "mode");
const char *direct_io_safe = qdict_get_try_str(opts, "direct-io-safe");
const char *discard_enable = qdict_get_try_str(opts, "discard-enable");
+ const char *suse_diskcache_disable_flush = qdict_get_try_str(opts,
+ "suse-diskcache-disable-flush");
char *driver = NULL;
char *filename = NULL;
XenBlockDrive *drive = NULL;
@@ -799,6 +801,16 @@ static XenBlockDrive *xen_block_drive_create(const char *id,
}
}
+ if (suse_diskcache_disable_flush) {
+ unsigned long value;
+ if (!qemu_strtoul(suse_diskcache_disable_flush, NULL, 2, &value) && !!value) {
+ QDict *cache_qdict = qdict_new();
+
+ qdict_put_bool(cache_qdict, "no-flush", true);
+ qdict_put_obj(file_layer, "cache", QOBJECT(cache_qdict));
+ }
+ }
+
/*
* It is necessary to turn file locking off as an emulated device
* may have already opened the same image file.

View File

@ -14,11 +14,11 @@ Signed-off-by: Bruce Rogers <brogers@suse.com>
[AF: Rebased for v2.7.0-rc2]
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
qemu-bridge-helper.c | 27 ++++++++++++++++++++++++---
1 file changed, 24 insertions(+), 3 deletions(-)
qemu-bridge-helper.c | 28 +++++++++++++++++++++++++---
1 file changed, 25 insertions(+), 3 deletions(-)
diff --git a/qemu-bridge-helper.c b/qemu-bridge-helper.c
index 5396fbfbb6..f3710b80a3 100644
index 5396fbfbb6..cafe2bf27b 100644
--- a/qemu-bridge-helper.c
+++ b/qemu-bridge-helper.c
@@ -110,7 +110,12 @@ static int parse_acl_file(const char *filename, ACLList *acl_list)
@ -49,12 +49,13 @@ index 5396fbfbb6..f3710b80a3 100644
if (strcmp(arg, "all") == 0) {
acl_rule->type = ACL_ALLOW_ALL;
} else {
@@ -413,6 +423,17 @@ int main(int argc, char **argv)
@@ -413,6 +423,18 @@ int main(int argc, char **argv)
goto cleanup;
}
+#ifndef CONFIG_LIBCAP
+ /* avoid sending the fd as root user if running suid to not fool
+ /*
+ * avoid sending the fd as root user if running suid to not fool
+ * peer credentials to daemons that dont expect that
+ */
+ if (setuid(getuid()) < 0) {
@ -67,7 +68,7 @@ index 5396fbfbb6..f3710b80a3 100644
/* write fd to the domain socket */
if (send_fd(unixfd, fd) == -1) {
fprintf(stderr, "failed to write fd to unix socket: %s\n",
@@ -434,7 +455,7 @@ cleanup:
@@ -434,7 +456,7 @@ cleanup:
}
while ((acl_rule = QSIMPLEQ_FIRST(&acl_list)) != NULL) {
QSIMPLEQ_REMOVE_HEAD(&acl_list, entry);

View File

@ -1,69 +0,0 @@
From: Bruce Rogers <brogers@suse.com>
Date: Wed, 9 Mar 2016 15:18:11 -0700
Subject: xen_disk: Add suse specific flush disable handling and map to QEMU
equiv
Add code to read the suse specific suse-diskcache-disable-flush flag out
of xenstore, and set the equivalent flag within QEMU.
Patch taken from Xen's patch queue, Olaf Hering being the original author.
[bsc#879425]
[BR: minor edits to pass qemu's checkpatch script]
Signed-off-by: Bruce Rogers <brogers@suse.com>
Signed-off-by: Olaf Hering <olaf@aepfle.de>
---
hw/block/xen_disk.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c
index 36eff94f84..ddd5c7cbfd 100644
--- a/hw/block/xen_disk.c
+++ b/hw/block/xen_disk.c
@@ -90,6 +90,8 @@ struct XenBlkDev {
int requests_finished;
unsigned int max_requests;
+ gboolean cache_unsafe;
+ /* Persistent grants extension */
gboolean feature_discard;
/* qemu block driver */
@@ -642,6 +644,18 @@ static void blk_parse_discard(struct XenBlkDev *blkdev)
}
}
+static void blk_parse_cache_unsafe(struct XenBlkDev *blkdev)
+{
+ int enable;
+
+ blkdev->cache_unsafe = false;
+
+ if (xenstore_read_be_int(&blkdev->xendev, "suse-diskcache-disable-flush",
+ &enable) == 0) {
+ blkdev->cache_unsafe = !!enable;
+ }
+}
+
static int blk_init(struct XenDevice *xendev)
{
struct XenBlkDev *blkdev = container_of(xendev, struct XenBlkDev, xendev);
@@ -717,6 +731,7 @@ static int blk_init(struct XenDevice *xendev)
MAX_RING_PAGE_ORDER);
blk_parse_discard(blkdev);
+ blk_parse_cache_unsafe(blkdev);
g_free(directiosafe);
return 0;
@@ -764,6 +779,10 @@ static int blk_connect(struct XenDevice *xendev)
qflags |= BDRV_O_UNMAP;
}
+ if (blkdev->cache_unsafe) {
+ qflags |= BDRV_O_NO_FLUSH;
+ }
+
/* init qemu block driver */
index = (xendev->dev - 202 * 256) / 16;
blkdev->dinfo = drive_get(IF_XEN, 0, index);

View File

@ -15,10 +15,10 @@ Signed-off-by: Andreas Schwab <schwab@suse.de>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index e251ef4655..d978c67d6b 100644
index 5088649781..ed1c76e304 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -9301,7 +9301,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_ulong arg1,
@@ -9360,7 +9360,7 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_ulong arg1,
{
struct timespec ts, *pts;

View File

@ -19,12 +19,12 @@ Signed-off-by: Bruce Rogers <brogers@suse.com>
1 file changed, 12 insertions(+), 2 deletions(-)
diff --git a/roms/Makefile b/roms/Makefile
index f4141e1d96..3b3d9b7a67 100644
index 1ff78b63bb..b4a3adccb2 100644
--- a/roms/Makefile
+++ b/roms/Makefile
@@ -52,6 +52,12 @@ SEABIOS_EXTRAVERSION="-prebuilt.qemu.org"
@@ -49,6 +49,12 @@ SEABIOS_EXTRAVERSION="-prebuilt.qemu.org"
#
EFIROM ?= $(shell which EfiRom 2>/dev/null)
EDK2_EFIROM = edk2/BaseTools/Source/C/bin/EfiRom
+# NB: Certain SUSE qemu subpackages use date information, but we want
+# reproducible builds, so we use a pre-determined timestamp, rather
@ -35,7 +35,7 @@ index f4141e1d96..3b3d9b7a67 100644
default:
@echo "nothing is build by default"
@echo "available build targets:"
@@ -95,7 +101,7 @@ build-seabios-config-%: config.%
@@ -91,7 +97,7 @@ build-seabios-config-%: config.%
.PHONY: sgabios skiboot
sgabios:
@ -44,7 +44,7 @@ index f4141e1d96..3b3d9b7a67 100644
cp sgabios/sgabios.bin ../pc-bios
@@ -115,18 +121,22 @@ efi-rom-%: build-pxe-roms build-efi-roms
@@ -111,11 +117,13 @@ efi-rom-%: build-pxe-roms build-efi-roms $(EDK2_EFIROM)
build-pxe-roms:
$(MAKE) -C ipxe/src CONFIG=qemu \
@ -58,7 +58,8 @@ index f4141e1d96..3b3d9b7a67 100644
CROSS_COMPILE=$(x86_64_cross_prefix) \
$(patsubst %,bin-i386-efi/%.efidrv,$(pxerom_targets)) \
$(patsubst %,bin-x86_64-efi/%.efidrv,$(pxerom_targets))
@@ -137,7 +145,9 @@ $(EDK2_EFIROM):
EXTRA_LDFLAGS='$(EDK2_BASETOOLS_LDFLAGS)'
slof:
- $(MAKE) -C SLOF CROSS=$(powerpc64_cross_prefix) qemu

View File

@ -16,7 +16,7 @@ Signed-off-by: Bruce Rogers <brogers@suse.com>
1 file changed, 12 insertions(+)
diff --git a/vl.c b/vl.c
index a5ae5f23d2..3882df6ebe 100644
index c696ad2a13..de43d2adf2 100644
--- a/vl.c
+++ b/vl.c
@@ -29,6 +29,7 @@
@ -27,15 +27,15 @@ index a5ae5f23d2..3882df6ebe 100644
#include "sysemu/seccomp.h"
#ifdef CONFIG_SDL
@@ -3014,6 +3015,7 @@ int main(int argc, char **argv, char **envp)
} BlockdevOptions_queue;
QSIMPLEQ_HEAD(, BlockdevOptions_queue) bdo_queue
= QSIMPLEQ_HEAD_INITIALIZER(bdo_queue);
@@ -3021,6 +3022,7 @@ int main(int argc, char **argv, char **envp)
bool list_data_dirs = false;
char *dir, **dirs;
BlockdevOptionsQueue bdo_queue = QSIMPLEQ_HEAD_INITIALIZER(bdo_queue);
+ struct rlimit rlimit_as;
module_call_init(MODULE_INIT_TRACE);
@@ -3022,6 +3024,16 @@ int main(int argc, char **argv, char **envp)
@@ -3029,6 +3031,16 @@ int main(int argc, char **argv, char **envp)
qemu_mutex_lock_iothread();

View File

@ -18,10 +18,10 @@ Signed-off-by: Andreas Färber <afaerber@suse.de>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/i386/cpu.h b/target/i386/cpu.h
index 9c52d0cbeb..48a6186e2f 100644
index 83fb522554..572290c3d6 100644
--- a/target/i386/cpu.h
+++ b/target/i386/cpu.h
@@ -1699,7 +1699,7 @@ uint64_t cpu_get_tsc(CPUX86State *env);
@@ -1708,7 +1708,7 @@ uint64_t cpu_get_tsc(CPUX86State *env);
/* XXX: This value should match the one returned by CPUID
* and in exec.c */
# if defined(TARGET_X86_64)

View File

@ -0,0 +1,61 @@
From: =?UTF-8?q?Andreas=20F=C3=A4rber?= <afaerber@suse.de>
Date: Wed, 12 Jun 2013 19:26:37 +0200
Subject: vga: Raise VRAM to 16 MiB for pc-0.15 and below
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
qemu-kvm.git commit a7fe0297840908a4fd65a1cf742481ccd45960eb
(Extend vram size to 16MB) deviated from qemu.git since kvm-61, and only
in commit 9e56edcf8dd1d4bc7ba2b1efb3641f36c0fad8ba (vga: raise default
vgamem size) did qemu.git adjust the VRAM size for v1.2.
Add compatibility properties so that up to and including pc-0.15 we
maintain migration compatibility with qemu-kvm rather than QEMU and
from pc-1.0 on with QEMU (last qemu-kvm release was 1.2).
Addresses part of BNC#812836.
Signed-off-by: Andreas Färber <afaerber@suse.de>
[BR: adjust comma position in list in macro for v2.5.0 compat]
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
hw/i386/pc_piix.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 8ad8e885c6..2e2502bf14 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -777,6 +777,31 @@ static void pc_i440fx_0_15_machine_options(MachineClass *m)
{
static GlobalProperty compat[] = {
PC_CPU_MODEL_IDS("0.15")
+ {
+ .driver = "VGA",
+ .property = "vgamem_mb",
+ .value = stringify(16),
+ },{
+ .driver = "vmware-svga",
+ .property = "vgamem_mb",
+ .value = stringify(16),
+ },{
+ .driver = "qxl-vga",
+ .property = "vgamem_mb",
+ .value = stringify(16),
+ },{
+ .driver = "qxl",
+ .property = "vgamem_mb",
+ .value = stringify(16),
+ },{
+ .driver = "isa-cirrus-vga",
+ .property = "vgamem_mb",
+ .value = stringify(16),
+ },{
+ .driver = "cirrus-vga",
+ .property = "vgamem_mb",
+ .value = stringify(16),
+ },
};
pc_i440fx_1_0_machine_options(m);

View File

@ -1,63 +0,0 @@
From: =?UTF-8?q?Andreas=20F=C3=A4rber?= <afaerber@suse.de>
Date: Wed, 12 Jun 2013 19:26:37 +0200
Subject: vga: Raise VRAM to 16 MiB for pc-0.15 and below
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
qemu-kvm.git commit a7fe0297840908a4fd65a1cf742481ccd45960eb
(Extend vram size to 16MB) deviated from qemu.git since kvm-61, and only
in commit 9e56edcf8dd1d4bc7ba2b1efb3641f36c0fad8ba (vga: raise default
vgamem size) did qemu.git adjust the VRAM size for v1.2.
Add compatibility properties so that up to and including pc-0.15 we
maintain migration compatibility with qemu-kvm rather than QEMU and
from pc-1.0 on with QEMU (last qemu-kvm release was 1.2).
Addresses part of BNC#812836.
Signed-off-by: Andreas Färber <afaerber@suse.de>
[BR: adjust comma position in list in macro for v2.5.0 compat]
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
hw/i386/pc_piix.c | 27 ++++++++++++++++++++++++++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c
index 7092d6d13f..253952d3a3 100644
--- a/hw/i386/pc_piix.c
+++ b/hw/i386/pc_piix.c
@@ -818,7 +818,32 @@ DEFINE_I440FX_MACHINE(v1_0, "pc-1.0", pc_compat_1_2,
#define PC_COMPAT_0_15 \
- PC_CPU_MODEL_IDS("0.15")
+ PC_CPU_MODEL_IDS("0.15")\
+ {\
+ .driver = "VGA",\
+ .property = "vgamem_mb",\
+ .value = stringify(16),\
+ },{\
+ .driver = "vmware-svga",\
+ .property = "vgamem_mb",\
+ .value = stringify(16),\
+ },{\
+ .driver = "qxl-vga",\
+ .property = "vgamem_mb",\
+ .value = stringify(16),\
+ },{\
+ .driver = "qxl",\
+ .property = "vgamem_mb",\
+ .value = stringify(16),\
+ },{\
+ .driver = "isa-cirrus-vga",\
+ .property = "vgamem_mb",\
+ .value = stringify(16),\
+ },{\
+ .driver = "cirrus-vga",\
+ .property = "vgamem_mb",\
+ .value = stringify(16),\
+ },
static void pc_i440fx_0_15_machine_options(MachineClass *m)
{

View File

@ -16,10 +16,10 @@ Signed-off-by: Andreas Färber <afaerber@suse.de>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index e330f24c71..b0bd10b3f9 100644
index 9c079d6834..ebcc240196 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -310,7 +310,7 @@ static const VMStateDescription vmstate_cpuhp_state = {
@@ -315,7 +315,7 @@ static bool piix4_vmstate_need_smbus(void *opaque, int version_id)
static const VMStateDescription vmstate_acpi = {
.name = "piix4_pm",
.version_id = 3,

View File

@ -9,12 +9,12 @@ Signed-off-by: Bruce Rogers <brogers@suse.com>
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index f2947186a4..ea30cd3fb6 100644
index 04a0d45050..f9d6e92510 100644
--- a/Makefile
+++ b/Makefile
@@ -551,7 +551,7 @@ fsdev/virtfs-proxy-helper$(EXESUF): LIBS += -lcap
@@ -521,7 +521,7 @@ fsdev/virtfs-proxy-helper$(EXESUF): LIBS += -lcap
scsi/qemu-pr-helper$(EXESUF): scsi/qemu-pr-helper.o scsi/utils.o $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
scsi/qemu-pr-helper$(EXESUF): scsi/qemu-pr-helper.o scsi/utils.o $(authz-obj-y) $(crypto-obj-y) $(io-obj-y) $(qom-obj-y) $(COMMON_LDADDS)
ifdef CONFIG_MPATH
-scsi/qemu-pr-helper$(EXESUF): LIBS += -ludev -lmultipath -lmpathpersist
+scsi/qemu-pr-helper$(EXESUF): LIBS += -ludev -lmpathpersist -lmultipath
@ -22,10 +22,10 @@ index f2947186a4..ea30cd3fb6 100644
qemu-img-cmds.h: $(SRC_PATH)/qemu-img-cmds.hx $(SRC_PATH)/scripts/hxtool
diff --git a/configure b/configure
index 0a3c6a72c3..84cd35c1b9 100755
index 1c563a7027..5df1b9a285 100755
--- a/configure
+++ b/configure
@@ -3594,7 +3594,7 @@ int main(void) {
@@ -3755,7 +3755,7 @@ int main(void) {
return 0;
}
EOF

View File

@ -1,54 +0,0 @@
From: Chunyan Liu <cyliu@suse.com>
Date: Thu, 3 Mar 2016 16:48:17 +0800
Subject: Fix tigervnc long press issue
Using xen tools 'xl vncviewer' with tigervnc (default on SLE-12),
found that: the display of the guest is unexpected while keep
pressing a key. We expect the same character multiple times, but
it prints only one time. This happens on a PV guest in text mode.
After debugging, found that tigervnc sends repeated key down events
in this case, to differentiate from user pressing the same key many
times. Vnc server only prints the character when it finally receives
key up event.
To solve this issue, this patch tries to add additional key up event
before the next repeated key down event (if the key is not a control
key).
[CYL: BSC#882405]
Signed-off-by: Chunyan Liu <cyliu@suse.com>
---
ui/vnc.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/ui/vnc.c b/ui/vnc.c
index 0c1b477425..1c98bb91c7 100644
--- a/ui/vnc.c
+++ b/ui/vnc.c
@@ -1824,6 +1824,25 @@ static void do_key_event(VncState *vs, int down, int keycode, int sym)
if (down)
vs->modifiers_state[keycode] ^= 1;
break;
+ default:
+ if (qemu_console_is_graphic(NULL)) {
+ /* record key 'down' info. Some client like tigervnc
+ * will send key down repeatedly if user pressing a
+ * a key for long time. In this case, we should add
+ * additional key up event before repeated key down,
+ * so that it can display the key multiple times.
+ */
+ if (down) {
+ if (vs->modifiers_state[keycode]) {
+ /* add a key up event */
+ do_key_event(vs, 0, keycode, sym);
+ }
+ vs->modifiers_state[keycode] = 1;
+ } else {
+ vs->modifiers_state[keycode] = 0;
+ }
+ }
+ break;
}
/* Turn off the lock state sync logic if the client support the led

View File

@ -2,7 +2,7 @@ From: Bruce Rogers <brogers@suse.com>
Date: Thu, 25 Jan 2018 14:16:10 -0700
Subject: Make installed scripts explicitly python3
We want to expliitly reference python3 in the scripts we install.
We want to explicitly reference python3 in the scripts we install.
[BR: BSC#1077564]
Signed-off-by: Bruce Rogers <brogers@suse.com>
@ -12,7 +12,7 @@ Signed-off-by: Bruce Rogers <brogers@suse.com>
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/analyze-migration.py b/scripts/analyze-migration.py
index 5c2010c917..8786801270 100755
index e527eb168e..fd376eac71 100755
--- a/scripts/analyze-migration.py
+++ b/scripts/analyze-migration.py
@@ -1,4 +1,4 @@

View File

@ -0,0 +1,92 @@
From: Bruce Rogers <brogers@suse.com>
Date: Fri, 5 Apr 2019 21:10:30 -0600
Subject: hw/smbios: handle both file formats regardless of machine type
It's easy enough to handle either per-spec or legacy smbios structures
in the smbios file input without regard to the machine type used, by
simply applying the basic smbios formatting rules. then depending on
what is detected. terminal numm bytes are added or removed for machine
type specific processing.
[BR: BSC#994082 BSC#1084316 BOO#1131894]
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
hw/smbios/smbios.c | 43 +++++++++++++++++++++++++++++++++++++++----
1 file changed, 39 insertions(+), 4 deletions(-)
diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c
index 47be9071fa..d4b95ebc84 100644
--- a/hw/smbios/smbios.c
+++ b/hw/smbios/smbios.c
@@ -960,6 +960,7 @@ void smbios_entry_add(QemuOpts *opts, Error **errp)
struct smbios_structure_header *header;
int size;
struct smbios_table *table; /* legacy mode only */
+ uint8_t *dbl_nulls, *orig_end;
qemu_opts_validate(opts, qemu_smbios_file_opts, &err);
if (err) {
@@ -974,11 +975,21 @@ void smbios_entry_add(QemuOpts *opts, Error **errp)
}
/*
- * NOTE: standard double '\0' terminator expected, per smbios spec.
- * (except in legacy mode, where the second '\0' is implicit and
- * will be inserted by the BIOS).
+ * NOTE: standard double '\0' terminator expected, per smbios spec,
+ * unless the data is formatted for legacy mode, which is used by
+ * pc-i440fx-2.0 and earlier machine types. Legacy mode structures
+ * without strings have no '\0' terminators, and those with strings
+ * also don't have an additional '\0' terminator at the end of the
+ * final string '\0' terminator. The BIOS will add the '\0' terminators
+ * to comply with the smbios spec.
+ * For greater compatibility, regardless of the machine type used,
+ * either format is accepted.
*/
- smbios_tables = g_realloc(smbios_tables, smbios_tables_len + size);
+ smbios_tables = g_realloc(smbios_tables, smbios_tables_len + size + 2);
+ orig_end = smbios_tables + smbios_tables_len + size;
+ /* add extra null bytes to end in case of legacy file data */
+ *orig_end = '\0';
+ *(orig_end + 1) = '\0';
header = (struct smbios_structure_header *)(smbios_tables +
smbios_tables_len);
@@ -993,6 +1004,19 @@ void smbios_entry_add(QemuOpts *opts, Error **errp)
header->type);
return;
}
+ for (dbl_nulls = smbios_tables + smbios_tables_len + header->length;
+ dbl_nulls + 2 <= orig_end; dbl_nulls++) {
+ if (*dbl_nulls == '\0' && *(dbl_nulls + 1) == '\0') {
+ break;
+ }
+ }
+ if (dbl_nulls + 2 < orig_end) {
+ error_setg(errp, "SMBIOS file data malformed");
+ return;
+ }
+ /* increase size by how many extra nulls were actually needed */
+ size += dbl_nulls + 2 - orig_end;
+ smbios_tables = g_realloc(smbios_tables, smbios_tables_len + size);
set_bit(header->type, have_binfile_bitmap);
if (header->type == 4) {
@@ -1013,6 +1037,17 @@ void smbios_entry_add(QemuOpts *opts, Error **errp)
* delete the one we don't need from smbios_set_defaults(),
* once we know which machine version has been requested.
*/
+ if (dbl_nulls + 2 == orig_end) {
+ /* chop off nulls to get legacy format */
+ if (header->length + 2 == size) {
+ size -= 2;
+ } else {
+ size -= 1;
+ }
+ } else {
+ /* undo conversion from legacy format to per-spec format */
+ size -= dbl_nulls + 2 - orig_end;
+ }
if (!smbios_entries) {
smbios_entries_len = sizeof(uint16_t);
smbios_entries = g_malloc0(smbios_entries_len);

View File

@ -1,144 +0,0 @@
From: =?UTF-8?q?Andreas=20F=C3=A4rber?= <afaerber@suse.de>
Date: Thu, 24 Sep 2015 19:21:11 +0200
Subject: string-input-visitor: Fix uint64 parsing
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
All integers would get parsed by strtoll(), not handling the case of
UINT64 properties with the most significient bit set.
Implement a .type_uint64 visitor callback, reusing the existing
parse_str() code through a new argument, using strtoull().
As this is a bug fix, it intentionally ignores checkpatch warnings to
prefer the use of qemu_strto[u]ll() over strto[u]ll().
Cc: qemu-stable@nongnu.org
Signed-off-by: Andreas Färber <afaerber@suse.de>
[BR: define qemu_strtoll and qemu_strtoull and use to avoid checkpatch
error. Grr}
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
qapi/string-input-visitor.c | 65 +++++++++++++++++++++++++++++--------
1 file changed, 52 insertions(+), 13 deletions(-)
diff --git a/qapi/string-input-visitor.c b/qapi/string-input-visitor.c
index b3fdd0827d..ac118d03c8 100644
--- a/qapi/string-input-visitor.c
+++ b/qapi/string-input-visitor.c
@@ -21,6 +21,8 @@
#include "qemu/queue.h"
#include "qemu/range.h"
+#define qemu_strtoll strtoll
+#define qemu_strtoull strtoull
struct StringInputVisitor
{
@@ -44,7 +46,8 @@ static void free_range(void *range, void *dummy)
g_free(range);
}
-static int parse_str(StringInputVisitor *siv, const char *name, Error **errp)
+static int parse_str(StringInputVisitor *siv, const char *name, bool u64,
+ Error **errp)
{
char *str = (char *) siv->string;
long long start, end;
@@ -61,7 +64,11 @@ static int parse_str(StringInputVisitor *siv, const char *name, Error **errp)
do {
errno = 0;
- start = strtoll(str, &endptr, 0);
+ if (u64) {
+ start = qemu_strtoull(str, &endptr, 0);
+ } else {
+ start = qemu_strtoll(str, &endptr, 0);
+ }
if (errno == 0 && endptr > str) {
if (*endptr == '\0') {
cur = g_malloc0(sizeof(*cur));
@@ -72,7 +79,11 @@ static int parse_str(StringInputVisitor *siv, const char *name, Error **errp)
} else if (*endptr == '-') {
str = endptr + 1;
errno = 0;
- end = strtoll(str, &endptr, 0);
+ if (u64) {
+ end = qemu_strtoull(str, &endptr, 0);
+ } else {
+ end = qemu_strtoll(str, &endptr, 0);
+ }
if (errno == 0 && endptr > str && start <= end &&
(start > INT64_MAX - 65536 ||
end < start + 65536)) {
@@ -128,7 +139,7 @@ start_list(Visitor *v, const char *name, GenericList **list, size_t size,
assert(list);
siv->list = list;
- if (parse_str(siv, name, errp) < 0) {
+ if (parse_str(siv, name, false, errp) < 0) {
*list = NULL;
return;
}
@@ -216,7 +227,7 @@ static void parse_type_int64(Visitor *v, const char *name, int64_t *obj,
{
StringInputVisitor *siv = to_siv(v);
- if (parse_str(siv, name, errp) < 0) {
+ if (parse_str(siv, name, false, errp) < 0) {
return;
}
@@ -252,15 +263,43 @@ error:
static void parse_type_uint64(Visitor *v, const char *name, uint64_t *obj,
Error **errp)
{
- /* FIXME: parse_type_int64 mishandles values over INT64_MAX */
- int64_t i;
- Error *err = NULL;
- parse_type_int64(v, name, &i, &err);
- if (err) {
- error_propagate(errp, err);
- } else {
- *obj = i;
+ StringInputVisitor *siv = to_siv(v);
+
+ if (!siv->string) {
+ error_setg(errp, QERR_INVALID_PARAMETER_TYPE, name ? name : "null",
+ "integer");
+ return;
+ }
+
+ parse_str(siv, name, true, errp);
+
+ if (!siv->ranges) {
+ goto error;
}
+
+ if (!siv->cur_range) {
+ Range *r;
+
+ siv->cur_range = g_list_first(siv->ranges);
+ if (!siv->cur_range) {
+ goto error;
+ }
+
+ r = siv->cur_range->data;
+ if (!r) {
+ goto error;
+ }
+
+ siv->cur = range_lob(r);
+ }
+
+ *obj = siv->cur;
+ siv->cur++;
+ return;
+
+error:
+ error_setg(errp, QERR_INVALID_PARAMETER_VALUE, name,
+ "a uint64 value or range");
}
static void parse_type_size(Visitor *v, const char *name, uint64_t *obj,

View File

@ -1,33 +0,0 @@
From: =?UTF-8?q?Andreas=20F=C3=A4rber?= <afaerber@suse.de>
Date: Thu, 24 Sep 2015 19:23:50 +0200
Subject: test-string-input-visitor: Add int test case
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
In addition to -42 also parse the maximum int64.
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
tests/test-string-input-visitor.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/tests/test-string-input-visitor.c b/tests/test-string-input-visitor.c
index 88e0e1aa9a..9bbe9c1120 100644
--- a/tests/test-string-input-visitor.c
+++ b/tests/test-string-input-visitor.c
@@ -53,6 +53,14 @@ static void test_visitor_in_int(TestInputVisitorData *data,
v = visitor_input_test_init(data, "-42");
+ visit_type_int(v, NULL, &res, &err);
+ g_assert(!err);
+ g_assert_cmpint(res, ==, value);
+ visitor_input_teardown(data, unused);
+
+ value = INT64_MAX;
+ v = visitor_input_test_init(data, g_strdup_printf("%" PRId64, value));
+
visit_type_int(v, NULL, &res, &err);
g_assert(!err);
g_assert_cmpint(res, ==, value);

View File

@ -1,56 +0,0 @@
From: =?UTF-8?q?Andreas=20F=C3=A4rber?= <afaerber@suse.de>
Date: Thu, 24 Sep 2015 19:24:23 +0200
Subject: test-string-input-visitor: Add uint64 test
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Test parsing of decimal and hexadecimal uint64 numbers with most
significant bit set.
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
tests/test-string-input-visitor.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/tests/test-string-input-visitor.c b/tests/test-string-input-visitor.c
index 9bbe9c1120..099ff7f5ab 100644
--- a/tests/test-string-input-visitor.c
+++ b/tests/test-string-input-visitor.c
@@ -76,6 +76,27 @@ static void test_visitor_in_int(TestInputVisitorData *data,
error_free_or_abort(&err);
}
+static void test_visitor_in_uint64(TestInputVisitorData *data,
+ const void *unused)
+{
+ uint64_t res = 0, value = UINT64_MAX;
+ Error *err = NULL;
+ Visitor *v;
+
+ v = visitor_input_test_init(data, g_strdup_printf("%" PRIu64, value));
+
+ visit_type_uint64(v, NULL, &res, &err);
+ g_assert(!err);
+ g_assert_cmpint(res, ==, value);
+ visitor_input_teardown(data, unused);
+
+ v = visitor_input_test_init(data, g_strdup_printf("0x%" PRIx64, value));
+
+ visit_type_uint64(v, NULL, &res, &err);
+ g_assert(!err);
+ g_assert_cmpint(res, ==, value);
+}
+
static void check_ilist(Visitor *v, int64_t *expected, size_t n)
{
int64List *res = NULL;
@@ -362,6 +383,8 @@ int main(int argc, char **argv)
input_visitor_test_add("/string-visitor/input/int",
&in_visitor_data, test_visitor_in_int);
+ input_visitor_test_add("/string-visitor/input/uint64",
+ &in_visitor_data, test_visitor_in_uint64);
input_visitor_test_add("/string-visitor/input/intList",
&in_visitor_data, test_visitor_in_intList);
input_visitor_test_add("/string-visitor/input/bool",

View File

@ -0,0 +1,30 @@
From: Bruce Rogers <brogers@suse.com>
Date: Wed, 16 Jan 2019 16:29:36 -0700
Subject: xen: add block resize support for xen disks
Provide monitor naming of xen disks, and plumb guest driver
notification through xenstore of resizing instigated via the
monitor.
[BR: minor edits to pass qemu's checkpatch script]
[BR: significant rework needed due to upstream xen disk qdevification]
[BR: At this point, monitor_add_blk call is all we need to add!]
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
hw/block/xen-block.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/block/xen-block.c b/hw/block/xen-block.c
index 7cbab33247..022546bfa5 100644
--- a/hw/block/xen-block.c
+++ b/hw/block/xen-block.c
@@ -263,6 +263,9 @@ static void xen_block_realize(XenDevice *xendev, Error **errp)
xen_block_set_size(blockdev);
+ if (!monitor_add_blk(conf->blk, blockdev->drive->id, errp)) {
+ return;
+ }
blockdev->dataplane =
xen_block_dataplane_create(xendev, conf, blockdev->props.iothread);
}

View File

@ -1,176 +0,0 @@
From: =?UTF-8?q?Andreas=20F=C3=A4rber?= <afaerber@suse.de>
Date: Sun, 6 Sep 2015 20:12:42 +0200
Subject: tests: Add QOM property unit tests
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Add a test for parsing and setting a uint64 property.
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
MAINTAINERS | 1 +
tests/Makefile.include | 2 +
tests/check-qom-props.c | 122 ++++++++++++++++++++++++++++++++++++++++
3 files changed, 125 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 63effdc473..d8521ade0d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1889,6 +1889,7 @@ F: qom/
X: qom/cpu.c
F: tests/check-qom-interface.c
F: tests/check-qom-proplist.c
+F: tests/check-qom-props.c
QMP
M: Markus Armbruster <armbru@redhat.com>
diff --git a/tests/Makefile.include b/tests/Makefile.include
index fb0b449c02..f7e6b841cb 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -94,6 +94,7 @@ check-unit-y += tests/test-bitcnt$(EXESUF)
check-unit-y += tests/test-qdev-global-props$(EXESUF)
check-unit-y += tests/check-qom-interface$(EXESUF)
check-unit-y += tests/check-qom-proplist$(EXESUF)
+check-unit-y += tests/check-qom-props$(EXESUF)
check-unit-y += tests/test-qemu-opts$(EXESUF)
check-unit-y += tests/test-keyval$(EXESUF)
check-unit-y += tests/test-write-threshold$(EXESUF)
@@ -528,6 +529,7 @@ tests/check-qjson$(EXESUF): tests/check-qjson.o $(test-util-obj-y)
tests/check-qlit$(EXESUF): tests/check-qlit.o $(test-util-obj-y)
tests/check-qom-interface$(EXESUF): tests/check-qom-interface.o $(test-qom-obj-y)
tests/check-qom-proplist$(EXESUF): tests/check-qom-proplist.o $(test-qom-obj-y)
+tests/check-qom-props$(EXESUF): tests/check-qom-props.o $(test-qom-obj-y)
tests/test-char$(EXESUF): tests/test-char.o $(test-util-obj-y) $(qtest-obj-y) $(test-io-obj-y) $(chardev-obj-y)
tests/test-coroutine$(EXESUF): tests/test-coroutine.o $(test-block-obj-y)
diff --git a/tests/check-qom-props.c b/tests/check-qom-props.c
new file mode 100644
index 0000000000..681e121c07
--- /dev/null
+++ b/tests/check-qom-props.c
@@ -0,0 +1,122 @@
+/*
+ * Copyright (C) 2015 Red Hat, Inc.
+ * Copyright (c) 2015 SUSE Linux GmbH
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library. If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * Author: Daniel P. Berrange <berrange@redhat.com>
+ * Andreas Färber <afaerber@suse.com>
+ */
+
+#include "qemu/osdep.h"
+
+#include <glib.h>
+
+#include "qapi/visitor.h"
+#include "qom/object.h"
+#include "qemu/module.h"
+
+
+#define TYPE_DUMMY "qemu-dummy"
+
+typedef struct DummyObject DummyObject;
+typedef struct DummyObjectClass DummyObjectClass;
+
+#define DUMMY_OBJECT(obj) \
+ OBJECT_CHECK(DummyObject, (obj), TYPE_DUMMY)
+
+struct DummyObject {
+ Object parent_obj;
+
+ uint64_t u64val;
+};
+
+struct DummyObjectClass {
+ ObjectClass parent_class;
+};
+
+static void dummy_set_uint64(Object *obj, Visitor *v,
+ const char *name, void *opaque,
+ Error **errp)
+{
+ uint64_t *ptr = (uint64_t *)opaque;
+
+ visit_type_uint64(v, name, ptr, errp);
+}
+
+static void dummy_get_uint64(Object *obj, Visitor *v,
+ const char *name, void *opaque,
+ Error **errp)
+{
+ uint64_t value = *(uint64_t *)opaque;
+
+ visit_type_uint64(v, name, &value, errp);
+}
+
+static void dummy_init(Object *obj)
+{
+ DummyObject *dobj = DUMMY_OBJECT(obj);
+
+ object_property_add(obj, "u64val", "uint64",
+ dummy_get_uint64,
+ dummy_set_uint64,
+ NULL, &dobj->u64val, NULL);
+}
+
+
+static const TypeInfo dummy_info = {
+ .name = TYPE_DUMMY,
+ .parent = TYPE_OBJECT,
+ .instance_size = sizeof(DummyObject),
+ .instance_init = dummy_init,
+ .class_size = sizeof(DummyObjectClass),
+};
+
+static void test_dummy_uint64(void)
+{
+ Error *err = NULL;
+ char *str;
+ DummyObject *dobj = DUMMY_OBJECT(object_new(TYPE_DUMMY));
+
+ g_assert(dobj->u64val == 0);
+
+ str = g_strdup_printf("%" PRIu64, UINT64_MAX);
+ object_property_parse(OBJECT(dobj), str, "u64val", &err);
+ g_free(str);
+ g_assert(!err);
+ g_assert_cmpint(dobj->u64val, ==, UINT64_MAX);
+
+ dobj->u64val = 0;
+ str = g_strdup_printf("0x%" PRIx64, UINT64_MAX);
+ object_property_parse(OBJECT(dobj), str, "u64val", &err);
+ g_free(str);
+ g_assert(!err);
+ g_assert_cmpint(dobj->u64val, ==, UINT64_MAX);
+
+ object_unref(OBJECT(dobj));
+}
+
+
+int main(int argc, char **argv)
+{
+ g_test_init(&argc, &argv, NULL);
+
+ module_call_init(MODULE_INIT_QOM);
+ type_register_static(&dummy_info);
+
+ g_test_add_func("/qom/props/uint64", test_dummy_uint64);
+
+ return g_test_run();
+}

View File

@ -13,7 +13,7 @@ Signed-off-by: Bruce Rogers <brogers@suse.com>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/common.qemu b/tests/qemu-iotests/common.qemu
index 7c87b897fa..2793e9fde6 100644
index 8d2021a7eb..e19ea76fff 100644
--- a/tests/qemu-iotests/common.qemu
+++ b/tests/qemu-iotests/common.qemu
@@ -76,7 +76,7 @@ _timed_wait_for()

View File

@ -1,140 +0,0 @@
From: =?UTF-8?q?Andreas=20F=C3=A4rber?= <afaerber@suse.de>
Date: Fri, 25 Sep 2015 12:31:11 +0200
Subject: tests: Add scsi-disk test
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Test scsi-{disk,hd,cd} wwn properties for correct 64-bit parsing.
For now piggyback on virtio-scsi.
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
---
MAINTAINERS | 1 +
tests/Makefile.include | 2 +
tests/scsi-disk-test.c | 83 ++++++++++++++++++++++++++++++++++++++++++
3 files changed, 86 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index d8521ade0d..d1e90f6f64 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1286,6 +1286,7 @@ R: Fam Zheng <famz@redhat.com>
S: Supported
F: include/hw/scsi/*
F: hw/scsi/*
+F: tests/scsi-disk-test.c
F: tests/virtio-scsi-test.c
T: git https://github.com/bonzini/qemu.git scsi-next
diff --git a/tests/Makefile.include b/tests/Makefile.include
index f7e6b841cb..d6f67eed85 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -151,6 +151,7 @@ check-qtest-virtio-y += tests/virtio-balloon-test$(EXESUF)
check-qtest-virtio-y += tests/virtio-blk-test$(EXESUF)
check-qtest-virtio-y += tests/virtio-rng-test$(EXESUF)
check-qtest-virtio-y += tests/virtio-scsi-test$(EXESUF)
+check-qtest-virtio-y += tests/scsi-disk-test$(EXESUF)
ifeq ($(CONFIG_VIRTIO)$(CONFIG_VIRTFS)$(CONFIG_PCI),yyy)
check-qtest-virtio-y += tests/virtio-9p-test$(EXESUF)
endif
@@ -748,6 +749,7 @@ tests/migration-test$(EXESUF): tests/migration-test.o
tests/vhost-user-test$(EXESUF): tests/vhost-user-test.o $(test-util-obj-y) \
$(qtest-obj-y) $(test-io-obj-y) $(libqos-virtio-obj-y) $(libqos-pc-obj-y) \
$(chardev-obj-y)
+tests/scsi-disk-test$(EXESUF): tests/scsi-disk-test.o
tests/qemu-iotests/socket_scm_helper$(EXESUF): tests/qemu-iotests/socket_scm_helper.o
tests/test-qemu-opts$(EXESUF): tests/test-qemu-opts.o $(test-util-obj-y)
tests/test-keyval$(EXESUF): tests/test-keyval.o $(test-util-obj-y) $(test-qapi-obj-y)
diff --git a/tests/scsi-disk-test.c b/tests/scsi-disk-test.c
new file mode 100644
index 0000000000..cd8c807200
--- /dev/null
+++ b/tests/scsi-disk-test.c
@@ -0,0 +1,83 @@
+/*
+ * QTest testcase for SCSI disks
+ * See virtio-scsi-test for more integrated tests.
+ *
+ * Copyright (c) 2015 SUSE Linux GmbH
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#include "qemu/osdep.h"
+#include <glib.h>
+#include "libqtest.h"
+#include "qapi/qmp/qnum.h"
+#include "qapi/qmp/qdict.h"
+
+static void test_scsi_disk_common(const char *type, const char *id)
+{
+ char *cmdline, *path;
+ QDict *response;
+ QNum *value;
+
+ cmdline = g_strdup_printf(
+ "-drive id=drv0,if=none,file=/dev/null,format=raw "
+ "-device virtio-scsi-pci,id=scsi0 "
+ "-device %s,id=%s,bus=scsi0.0,drive=drv0"
+ ",wwn=0x%" PRIx64 ",port_wwn=0x%" PRIx64,
+ type, id, UINT64_MAX, UINT64_C(1) << 63);
+ qtest_start(cmdline);
+ g_free(cmdline);
+
+ path = g_strdup_printf("/machine/peripheral/%s", id);
+
+ response = qmp("{ 'execute': 'qom-get',"
+ " 'arguments': { 'path': %s,"
+ " 'property': 'wwn' } }",
+ path);
+ g_assert(response);
+ g_assert(qdict_haskey(response, "return"));
+ value = qobject_to(QNum, qdict_get(response, "return"));
+ g_assert_cmpint(qnum_get_uint(value), ==, UINT64_MAX);
+
+ response = qmp("{ 'execute': 'qom-get',"
+ " 'arguments': { 'path': %s,"
+ " 'property': 'port_wwn' } }",
+ path);
+ g_assert(response);
+ g_assert(qdict_haskey(response, "return"));
+ value = qobject_to(QNum, qdict_get(response, "return"));
+ g_assert_cmpint(qnum_get_uint(value), ==, UINT64_C(1) << 63);
+
+ g_free(path);
+ qtest_end();
+}
+
+static void test_scsi_disk(void)
+{
+ test_scsi_disk_common("scsi-disk", "disk0");
+}
+
+static void test_scsi_hd(void)
+{
+ test_scsi_disk_common("scsi-hd", "hd0");
+}
+
+static void test_scsi_cd(void)
+{
+ test_scsi_disk_common("scsi-cd", "cd0");
+}
+
+int main(int argc, char **argv)
+{
+ int ret;
+
+ g_test_init(&argc, &argv, NULL);
+ qtest_add_func("/scsi-disk/props", test_scsi_disk);
+ qtest_add_func("/scsi-hd/props", test_scsi_hd);
+ qtest_add_func("/scsi-cd/props", test_scsi_cd);
+
+ ret = g_test_run();
+
+ return ret;
+}

View File

@ -11,7 +11,7 @@ Signed-off-by: Bruce Rogers <brogers@suse.com>
1 file changed, 2 insertions(+)
diff --git a/tests/qemu-iotests/130 b/tests/qemu-iotests/130
index f2f2706b28..69d7a7286a 100755
index 77ad2aa13a..14a2b759f6 100755
--- a/tests/qemu-iotests/130
+++ b/tests/qemu-iotests/130
@@ -63,6 +63,7 @@ echo

View File

@ -25,10 +25,10 @@ Signed-off-by: Olaf Hering <olaf@aepfle.de>
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/migration/savevm.c b/migration/savevm.c
index 9e45fb4f3f..47d4c51186 100644
index 34bcad3807..9827762494 100644
--- a/migration/savevm.c
+++ b/migration/savevm.c
@@ -2602,7 +2602,7 @@ void qmp_xen_save_devices_state(const char *filename, bool has_live, bool live,
@@ -2689,7 +2689,7 @@ void qmp_xen_save_devices_state(const char *filename, bool has_live, bool live,
* So call bdrv_inactivate_all (release locks) here to let the other
* side of the migration take controle of the images.
*/

View File

@ -0,0 +1,25 @@
From: Bruce Rogers <brogers@suse.com>
Date: Fri, 11 Jan 2019 16:26:21 -0700
Subject: tests: Fix Makefile handling of check-report.tap
I assume this will get fixed upstream soon, but for now, fix
what I understand to be the intended functionality.
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
tests/Makefile.include | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/Makefile.include b/tests/Makefile.include
index 36fc73fef5..befc02ac7a 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -923,7 +923,7 @@ check-report-unit.tap: $(check-unit-y)
# Reports and overall runs
check-report.tap: $(patsubst %,check-report-qtest-%.tap, $(QTEST_TARGETS)) check-report-unit.tap
- $(call quiet-command,./scripts/tap-merge.py $^ > $@,"GEN","$@")
+ $(call quiet-command,./scripts/tap-merge.pl < $^ > $@,"GEN","$@")
# FPU Emulation tests (aka softfloat)
#

View File

@ -0,0 +1,29 @@
From: Bruce Rogers <brogers@suse.com>
Date: Wed, 23 Jan 2019 20:23:01 -0700
Subject: Conditionalize ui bitmap installation better
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Makefile b/Makefile
index f9d6e92510..583bfc5d93 100644
--- a/Makefile
+++ b/Makefile
@@ -809,6 +809,7 @@ ifneq ($(BLOBS),)
$(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(qemu_datadir)"; \
done
endif
+ifneq ($(or $(CONFIG_GTK),$(CONFIG_SDL)),)
for s in $(ICON_SIZES); do \
mkdir -p "$(DESTDIR)/$(qemu_icondir)/hicolor/$${s}/apps"; \
$(INSTALL_DATA) $(SRC_PATH)/ui/icons/qemu_$${s}.png \
@@ -823,6 +824,7 @@ endif
mkdir -p "$(DESTDIR)/$(qemu_desktopdir)"
$(INSTALL_DATA) $(SRC_PATH)/ui/qemu.desktop \
"$(DESTDIR)/$(qemu_desktopdir)/qemu.desktop"
+endif
ifdef CONFIG_GTK
$(MAKE) -C po $@
endif

View File

@ -1,190 +0,0 @@
From: Lin Ma <lma@suse.com>
Date: Wed, 14 Mar 2018 14:31:26 +0800
Subject: smbios: Add 1 terminator if any string fields defined in given table.
If user specifies smbios table files through qemu command line, Then will
get error messages while decoding those table content in guest.
Reproducer:
1. dump a smbios table(say table 1) to a binary file from a pc.
2. load the binary file through command line: 'qemu -smbios file=...'.
3. perform 'dmidecode' or 'dmidecode -t 1' in guest.
It reports 'Invalid entry length...' because qemu doesn't add terminator(s)
correctly for the table.
This patch fixed the issue by:
For smbios tables which have string fields provided, qemu should add 1 terminator.
For smbios tables which dont have string fields provided, qemu should add 2.
[LM: BSC#994082]
[LM: BSC#1084316]
Signed-off-by: Lin Ma <lma@suse.com>
---
hw/smbios/smbios.c | 90 ++++++++++++++++++++++++++++++++++++++
include/hw/smbios/smbios.h | 44 +++++++++++++++++++
2 files changed, 134 insertions(+)
diff --git a/hw/smbios/smbios.c b/hw/smbios/smbios.c
index 920939454e..52d1e10c3c 100644
--- a/hw/smbios/smbios.c
+++ b/hw/smbios/smbios.c
@@ -953,6 +953,9 @@ void smbios_entry_add(QemuOpts *opts, Error **errp)
Error *err = NULL;
const char *val;
+ int i, terminator_count = 2, table_str_field_count = 0;
+ int *tables_str_field_offset = NULL;
+
assert(!smbios_immutable);
val = qemu_opt_get(opts, "file");
@@ -999,7 +1002,94 @@ void smbios_entry_add(QemuOpts *opts, Error **errp)
smbios_type4_count++;
}
+ switch (header->type) {
+ case 0:
+ tables_str_field_offset = g_malloc0(sizeof(int) * \
+ TYPE_0_STR_FIELD_COUNT);
+ tables_str_field_offset = (int []){\
+ TYPE_0_STR_FIELD_OFFSET_VENDOR, \
+ TYPE_0_STR_FIELD_OFFSET_BIOS_VERSION, \
+ TYPE_0_STR_FIELD_OFFSET_BIOS_RELEASE_DATE};
+ table_str_field_count = sizeof(tables_str_field_offset) / \
+ sizeof(tables_str_field_offset[0]);
+ break;
+ case 1:
+ tables_str_field_offset = g_malloc0(sizeof(int) * \
+ TYPE_1_STR_FIELD_COUNT);
+ tables_str_field_offset = (int []){
+ TYPE_1_STR_FIELD_OFFSET_MANUFACTURER, \
+ TYPE_1_STR_FIELD_OFFSET_PRODUCT, \
+ TYPE_1_STR_FIELD_OFFSET_VERSION, \
+ TYPE_1_STR_FIELD_OFFSET_SERIAL, \
+ TYPE_1_STR_FIELD_OFFSET_SKU, \
+ TYPE_1_STR_FIELD_OFFSET_FAMILY};
+ table_str_field_count = sizeof(tables_str_field_offset) / \
+ sizeof(tables_str_field_offset[0]);
+ break;
+ case 2:
+ tables_str_field_offset = g_malloc0(sizeof(int) * \
+ TYPE_2_STR_FIELD_COUNT);
+ tables_str_field_offset = (int []){\
+ TYPE_2_STR_FIELD_OFFSET_MANUFACTURER, \
+ TYPE_2_STR_FIELD_OFFSET_PRODUCT, \
+ TYPE_2_STR_FIELD_OFFSET_VERSION, \
+ TYPE_2_STR_FIELD_OFFSET_SERIAL, \
+ TYPE_2_STR_FIELD_OFFSET_ASSET, \
+ TYPE_2_STR_FIELD_OFFSET_LOCATION};
+ table_str_field_count = sizeof(tables_str_field_offset) / \
+ sizeof(tables_str_field_offset[0]);
+ break;
+ case 3:
+ tables_str_field_offset = g_malloc0(sizeof(int) * \
+ TYPE_3_STR_FIELD_COUNT);
+ tables_str_field_offset = (int []){\
+ TYPE_3_STR_FIELD_OFFSET_MANUFACTURER, \
+ TYPE_3_STR_FIELD_OFFSET_VERSION, \
+ TYPE_3_STR_FIELD_OFFSET_SERIAL, \
+ TYPE_3_STR_FIELD_OFFSET_ASSET, \
+ TYPE_3_STR_FIELD_OFFSET_SKU};
+ table_str_field_count = sizeof(tables_str_field_offset) / \
+ sizeof(tables_str_field_offset[0]);
+ break;
+ case 4:
+ tables_str_field_offset = g_malloc0(sizeof(int) * \
+ TYPE_4_STR_FIELD_COUNT);
+ tables_str_field_offset = (int []){\
+ TYPE_4_STR_FIELD_OFFSET_SOCKET, \
+ TYPE_4_STR_FIELD_OFFSET_PROCESSOR_MANUFACTURER, \
+ TYPE_4_STR_FIELD_OFFSET_PROCESSOR_VERSION, \
+ TYPE_4_STR_FIELD_OFFSET_SERIAL, \
+ TYPE_4_STR_FIELD_OFFSET_ASSET, \
+ TYPE_4_STR_FIELD_OFFSET_PART};
+ table_str_field_count = sizeof(tables_str_field_offset) / \
+ sizeof(tables_str_field_offset[0]);
+ break;
+ case 17:
+ tables_str_field_offset = g_malloc0(sizeof(int) * \
+ TYPE_17_STR_FIELD_COUNT);
+ tables_str_field_offset = (int []){\
+ TYPE_17_STR_FIELD_OFFSET_DEVICE_LOCATOR, \
+ TYPE_17_STR_FIELD_OFFSET_BANK_LOCATOR, \
+ TYPE_17_STR_FIELD_OFFSET_MANUFACTURER, \
+ TYPE_17_STR_FIELD_OFFSET_SERIAL, \
+ TYPE_17_STR_FIELD_OFFSET_ASSET, \
+ TYPE_17_STR_FIELD_OFFSET_PART};
+ table_str_field_count = sizeof(tables_str_field_offset) / \
+ sizeof(tables_str_field_offset[0]);
+ break;
+ default:
+ break;
+ }
+
+ for (i = 0; i < table_str_field_count; i++) {
+ if (*(uint8_t *)(smbios_tables + tables_str_field_offset[i]) > 0) {
+ terminator_count = 1;
+ break;
+ }
+ }
+
smbios_tables_len += size;
+ smbios_tables_len += terminator_count;
if (size > smbios_table_max) {
smbios_table_max = size;
}
diff --git a/include/hw/smbios/smbios.h b/include/hw/smbios/smbios.h
index eeb5a4d7b6..2662df995a 100644
--- a/include/hw/smbios/smbios.h
+++ b/include/hw/smbios/smbios.h
@@ -272,4 +272,48 @@ void smbios_get_tables(const struct smbios_phys_mem_area *mem_array,
const unsigned int mem_array_size,
uint8_t **tables, size_t *tables_len,
uint8_t **anchor, size_t *anchor_len);
+
+#define TYPE_0_STR_FIELD_OFFSET_VENDOR 0x4
+#define TYPE_0_STR_FIELD_OFFSET_BIOS_VERSION 0x5
+#define TYPE_0_STR_FIELD_OFFSET_BIOS_RELEASE_DATE 0x8
+#define TYPE_0_STR_FIELD_COUNT 3
+
+#define TYPE_1_STR_FIELD_OFFSET_MANUFACTURER 0x4
+#define TYPE_1_STR_FIELD_OFFSET_PRODUCT 0x5
+#define TYPE_1_STR_FIELD_OFFSET_VERSION 0x6
+#define TYPE_1_STR_FIELD_OFFSET_SERIAL 0x7
+#define TYPE_1_STR_FIELD_OFFSET_SKU 0x19
+#define TYPE_1_STR_FIELD_OFFSET_FAMILY 0x1a
+#define TYPE_1_STR_FIELD_COUNT 6
+
+#define TYPE_2_STR_FIELD_OFFSET_MANUFACTURER 0x4
+#define TYPE_2_STR_FIELD_OFFSET_PRODUCT 0x5
+#define TYPE_2_STR_FIELD_OFFSET_VERSION 0x6
+#define TYPE_2_STR_FIELD_OFFSET_SERIAL 0x7
+#define TYPE_2_STR_FIELD_OFFSET_ASSET 0x8
+#define TYPE_2_STR_FIELD_OFFSET_LOCATION 0xa
+#define TYPE_2_STR_FIELD_COUNT 6
+
+#define TYPE_3_STR_FIELD_OFFSET_MANUFACTURER 0x4
+#define TYPE_3_STR_FIELD_OFFSET_VERSION 0x6
+#define TYPE_3_STR_FIELD_OFFSET_SERIAL 0x7
+#define TYPE_3_STR_FIELD_OFFSET_ASSET 0x8
+#define TYPE_3_STR_FIELD_OFFSET_SKU 0x14
+#define TYPE_3_STR_FIELD_COUNT 5
+
+#define TYPE_4_STR_FIELD_OFFSET_SOCKET 0x4
+#define TYPE_4_STR_FIELD_OFFSET_PROCESSOR_MANUFACTURER 0x7
+#define TYPE_4_STR_FIELD_OFFSET_PROCESSOR_VERSION 0x10
+#define TYPE_4_STR_FIELD_OFFSET_SERIAL 0x20
+#define TYPE_4_STR_FIELD_OFFSET_ASSET 0x21
+#define TYPE_4_STR_FIELD_OFFSET_PART 0x22
+#define TYPE_4_STR_FIELD_COUNT 6
+
+#define TYPE_17_STR_FIELD_OFFSET_DEVICE_LOCATOR 0x10
+#define TYPE_17_STR_FIELD_OFFSET_BANK_LOCATOR 0x11
+#define TYPE_17_STR_FIELD_OFFSET_MANUFACTURER 0x17
+#define TYPE_17_STR_FIELD_OFFSET_SERIAL 0x18
+#define TYPE_17_STR_FIELD_OFFSET_ASSET 0x19
+#define TYPE_17_STR_FIELD_OFFSET_PART 0x1a
+#define TYPE_17_STR_FIELD_COUNT 6
#endif /* QEMU_SMBIOS_H */

View File

@ -34,10 +34,10 @@ Signed-off-by: Bruce Rogers <brogers@suse.com>
1 file changed, 12 deletions(-)
diff --git a/target/i386/kvm.c b/target/i386/kvm.c
index b2401d13ea..f97bfc164d 100644
index 3b29ce5c0d..6ad450d9f1 100644
--- a/target/i386/kvm.c
+++ b/target/i386/kvm.c
@@ -855,7 +855,6 @@ static int hyperv_init_vcpu(X86CPU *cpu)
@@ -906,7 +906,6 @@ static int hyperv_init_vcpu(X86CPU *cpu)
}
static Error *invtsc_mig_blocker;
@ -45,7 +45,7 @@ index b2401d13ea..f97bfc164d 100644
#define KVM_MAX_CPUID_ENTRIES 100
@@ -1248,17 +1247,6 @@ int kvm_arch_init_vcpu(CPUState *cs)
@@ -1270,17 +1269,6 @@ int kvm_arch_init_vcpu(CPUState *cs)
!!(c->ecx & CPUID_EXT_SMX);
}

View File

@ -1,49 +0,0 @@
From: Bruce Rogers <brogers@suse.com>
Date: Fri, 6 Apr 2018 13:33:31 -0600
Subject: qemu-io tests: comment out problematic block io tests issues
The following issues are seen:
153 - error resulting from failed to get "write" lock
162 - sometimes we see different error code / message
229 - we get periodic failures on ARM and POWER, not sure why
235 - test explicitly requires KVM as part of the test
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
tests/qemu-iotests/group | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/qemu-iotests/group b/tests/qemu-iotests/group
index 61a6d98ebd..85b2bf75a8 100644
--- a/tests/qemu-iotests/group
+++ b/tests/qemu-iotests/group
@@ -159,7 +159,7 @@
150 rw auto quick
151 rw auto
152 rw auto quick
-153 rw auto quick
+#ISSUES 153 rw auto quick
154 rw auto backing quick
155 rw auto
156 rw auto quick
@@ -168,7 +168,7 @@
159 rw auto quick
160 rw auto quick
161 rw auto quick
-162 auto quick
+#ISSUES 162 auto quick
163 rw auto
165 rw auto quick
169 rw auto quick migration
@@ -227,9 +227,9 @@
225 rw auto quick
226 auto quick
227 auto quick
-229 auto quick
+#ISSUES on ARM and POWER, we somtimes see failure, not sure why 229 auto quick
231 auto quick
232 auto quick
233 auto quick
234 auto quick migration
-235 auto quick
+#ISSUES - requires KVM 235 auto quick

View File

@ -0,0 +1,27 @@
From: Bruce Rogers <brogers@suse.com>
Date: Mon, 11 Mar 2019 22:02:37 -0600
Subject: tests: change error message in test 162
Since we have a quite restricted execution environment, as far as
networking is concerned, we need to change the error message we expect
in test 162. There is actually no routing set up so the error we get is
"Network is unreachable". Change the expected output accordingly.
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
tests/qemu-iotests/162.out | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/qemu-iotests/162.out b/tests/qemu-iotests/162.out
index 3c5be2c569..390cca9027 100644
--- a/tests/qemu-iotests/162.out
+++ b/tests/qemu-iotests/162.out
@@ -1,7 +1,7 @@
QA output created by 162
=== NBD ===
-qemu-img: Could not open 'json:{"driver": "nbd", "host": 42}': Failed to connect socket: Invalid argument
+qemu-img: Could not open 'json:{"driver": "nbd", "host": 42}': Failed to connect socket: Network is unreachable
image: nbd://localhost:PORT
image: nbd+unix://?socket=42

View File

@ -0,0 +1,44 @@
From: Alistair Francis <Alistair.Francis@wdc.com>
Date: Sat, 4 May 2019 07:57:32 -0600
Subject: util/qemu-sockets: Fix GCC 9 build warnings
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fix this warning when building with GCC9 on Fedora 30:
In function ‘strncpy’,
inlined from ‘unix_connect_saddr.isra.0’ at util/qemu-sockets.c:925:5:
/usr/include/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ specified bound 108 equals destination size [-Werror=stringop-truncation]
106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In function ‘strncpy’,
inlined from ‘unix_listen_saddr.isra.0’ at util/qemu-sockets.c:880:5:
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
util/qemu-sockets.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/util/qemu-sockets.c b/util/qemu-sockets.c
index 9705051690..8c3322958f 100644
--- a/util/qemu-sockets.c
+++ b/util/qemu-sockets.c
@@ -829,7 +829,7 @@ static int unix_listen_saddr(UnixSocketAddress *saddr,
struct sockaddr_un un;
int sock, fd;
char *pathbuf = NULL;
- const char *path;
+ const char *path QEMU_NONSTRING;
sock = qemu_socket(PF_UNIX, SOCK_STREAM, 0);
if (sock < 0) {
@@ -922,7 +922,7 @@ static int unix_connect_saddr(UnixSocketAddress *saddr, Error **errp)
memset(&un, 0, sizeof(un));
un.sun_family = AF_UNIX;
- strncpy(un.sun_path, saddr->path, sizeof(un.sun_path));
+ memcpy(un.sun_path, saddr->path, MIN(strlen(saddr->path), sizeof(un.sun_path)));
/* connect to peer */
do {

View File

@ -1,186 +0,0 @@
From: Bruce Rogers <brogers@suse.com>
Date: Fri, 8 Jun 2018 11:04:36 -0600
Subject: xen: add block resize support for xen disks
Provide monitor naming of xen disks, and plumb guest driver
notification through xenstore of resizing instigated via the
monitor.
[BR: minor edits to pass qemu's checkpatch script]
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
block/block-backend.c | 12 +++++++++++-
blockdev.c | 8 ++++++++
hw/block/xen_disk.c | 24 ++++++++++++++++++++++++
include/hw/xen/xen.h | 4 ++++
include/sysemu/block-backend.h | 1 +
stubs/xen-common.c | 9 +++++++++
6 files changed, 57 insertions(+), 1 deletion(-)
diff --git a/block/block-backend.c b/block/block-backend.c
index 60d37a0c3d..1d41622942 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -23,6 +23,7 @@
#include "qemu/option.h"
#include "trace.h"
#include "migration/misc.h"
+#include "hw/xen/xen.h"
/* Number of coroutines to reserve per attached device model */
#define COROUTINE_POOL_RESERVATION 64
@@ -910,7 +911,9 @@ char *blk_get_attached_dev_id(BlockBackend *blk)
{
DeviceState *dev;
- assert(!blk->legacy_dev);
+ if (blk->legacy_dev) {
+ return xen_blk_get_attached_dev_id(blk->dev);
+ }
dev = blk->dev;
if (!dev) {
@@ -2012,6 +2015,13 @@ int blk_truncate(BlockBackend *blk, int64_t offset, PreallocMode prealloc,
return bdrv_truncate(blk->root, offset, prealloc, errp);
}
+void blk_legacy_resize_cb(BlockBackend *blk)
+{
+ if (blk->legacy_dev) {
+ xen_blk_resize_cb(blk->dev);
+ }
+}
+
static void blk_pdiscard_entry(void *opaque)
{
BlkRwCo *rwco = opaque;
diff --git a/blockdev.c b/blockdev.c
index 81f95d920b..e67116974e 100644
--- a/blockdev.c
+++ b/blockdev.c
@@ -3091,6 +3091,7 @@ void qmp_block_resize(bool has_device, const char *device,
{
Error *local_err = NULL;
BlockBackend *blk = NULL;
+ BlockBackend *cb_blk = NULL;
BlockDriverState *bs;
AioContext *aio_context;
int ret;
@@ -3103,6 +3104,10 @@ void qmp_block_resize(bool has_device, const char *device,
return;
}
+ if (has_device) {
+ cb_blk = blk_by_name(device);
+ }
+
aio_context = bdrv_get_aio_context(bs);
aio_context_acquire(aio_context);
@@ -3129,6 +3134,9 @@ void qmp_block_resize(bool has_device, const char *device,
bdrv_drained_begin(bs);
ret = blk_truncate(blk, size, PREALLOC_MODE_OFF, errp);
+ if (!ret && cb_blk) {
+ blk_legacy_resize_cb(cb_blk);
+ }
bdrv_drained_end(bs);
out:
diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c
index ddd5c7cbfd..d9a55faf27 100644
--- a/hw/block/xen_disk.c
+++ b/hw/block/xen_disk.c
@@ -761,6 +761,7 @@ static int blk_connect(struct XenDevice *xendev)
int order, ring_ref;
unsigned int ring_size, max_grants;
unsigned int i;
+ Error *errp = NULL;
trace_xen_disk_connect(xendev->name);
@@ -821,6 +822,13 @@ static int blk_connect(struct XenDevice *xendev)
blk_ref(blkdev->blk);
}
blk_attach_dev_legacy(blkdev->blk, blkdev);
+ if (!monitor_add_blk(blkdev->blk, g_strdup(blkdev->dev), &errp)) {
+ xen_pv_printf(&blkdev->xendev, 0, "error: %s\n",
+ error_get_pretty(errp));
+ error_free(errp);
+ return -1;
+ }
+
blkdev->file_size = blk_getlength(blkdev->blk);
if (blkdev->file_size < 0) {
BlockDriverState *bs = blk_bs(blkdev->blk);
@@ -971,6 +979,7 @@ static void blk_disconnect(struct XenDevice *xendev)
if (blkdev->blk) {
blk_set_aio_context(blkdev->blk, qemu_get_aio_context());
blk_detach_dev(blkdev->blk, blkdev);
+ monitor_remove_blk(blkdev->blk);
blk_unref(blkdev->blk);
blkdev->blk = NULL;
}
@@ -1018,6 +1027,21 @@ static void blk_event(struct XenDevice *xendev)
qemu_bh_schedule(blkdev->bh);
}
+void xen_blk_resize_cb(void *dev)
+{
+ struct XenBlkDev *blkdev = dev;
+ blkdev->file_size = blk_getlength(blkdev->blk);
+ xenstore_write_be_int64(&blkdev->xendev, "sectors",
+ blkdev->file_size / blkdev->file_blk);
+ xen_be_set_state(&blkdev->xendev, blkdev->xendev.be_state);
+}
+
+char *xen_blk_get_attached_dev_id(void *dev)
+{
+ struct XenBlkDev *blkdev = dev;
+ return g_strdup_printf("xen-qdisk-%i", blkdev->xendev.dev);
+}
+
struct XenDevOps xen_blkdev_ops = {
.flags = DEVOPS_FLAG_NEED_GNTDEV,
.size = sizeof(struct XenBlkDev),
diff --git a/include/hw/xen/xen.h b/include/hw/xen/xen.h
index 7efcdaa8fe..45c8c0b6f7 100644
--- a/include/hw/xen/xen.h
+++ b/include/hw/xen/xen.h
@@ -48,4 +48,8 @@ void xen_hvm_modified_memory(ram_addr_t start, ram_addr_t length);
void xen_register_framebuffer(struct MemoryRegion *mr);
+void xen_blk_resize_cb(void *dev);
+
+char *xen_blk_get_attached_dev_id(void *dev);
+
#endif /* QEMU_HW_XEN_H */
diff --git a/include/sysemu/block-backend.h b/include/sysemu/block-backend.h
index c96bcdee14..0488cf45ff 100644
--- a/include/sysemu/block-backend.h
+++ b/include/sysemu/block-backend.h
@@ -236,5 +236,6 @@ int coroutine_fn blk_co_copy_range(BlockBackend *blk_in, int64_t off_in,
BlockBackend *blk_out, int64_t off_out,
int bytes, BdrvRequestFlags read_flags,
BdrvRequestFlags write_flags);
+void blk_legacy_resize_cb(BlockBackend *blk);
#endif
diff --git a/stubs/xen-common.c b/stubs/xen-common.c
index 09fce2dd36..91542fc019 100644
--- a/stubs/xen-common.c
+++ b/stubs/xen-common.c
@@ -12,3 +12,12 @@
void xenstore_store_pv_console_info(int i, Chardev *chr)
{
}
+
+void xen_blk_resize_cb(void *dev)
+{
+}
+
+char *xen_blk_get_attached_dev_id(void *dev)
+{
+ return g_strdup("");
+}

View File

@ -0,0 +1,41 @@
From: Alistair Francis <Alistair.Francis@wdc.com>
Date: Sat, 4 May 2019 07:58:35 -0600
Subject: hw/usb/hcd-xhci: Fix GCC 9 build warning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fix this build warning with GCC 9 on Fedora 30:
hw/usb/hcd-xhci.c:3339:66: error: ‘%d’ directive output may be truncated writing between 1 and 10 bytes into a region of size 5 [-Werror=format-truncation=]
3339 | snprintf(port->name, sizeof(port->name), "usb2 port #%d", i+1);
| ^~
hw/usb/hcd-xhci.c:3339:54: note: directive argument in the range [1, 2147483647]
3339 | snprintf(port->name, sizeof(port->name), "usb2 port #%d", i+1);
| ^~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:867,
from /home/alistair/qemu/include/qemu/osdep.h:99,
from hw/usb/hcd-xhci.c:21:
/usr/include/bits/stdio2.h:67:10: note: ‘__builtin___snprintf_chk’ output between 13 and 22 bytes into a destination of size 16
67 | return __builtin___snprintf_chk (__s, __n, __USE_FORTIFY_LEVEL - 1,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
68 | __bos (__s), __fmt, __va_arg_pack ());
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
hw/usb/hcd-xhci.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/usb/hcd-xhci.c b/hw/usb/hcd-xhci.c
index ec28bee319..2b061772b2 100644
--- a/hw/usb/hcd-xhci.c
+++ b/hw/usb/hcd-xhci.c
@@ -3322,6 +3322,7 @@ static void usb_xhci_init(XHCIState *xhci)
usb_bus_new(&xhci->bus, sizeof(xhci->bus), &xhci_bus_ops, dev);
for (i = 0; i < usbports; i++) {
+ g_assert(i < MAX(MAXPORTS_2, MAXPORTS_3));
speedmask = 0;
if (i < xhci->numports_2) {
if (xhci_get_flag(xhci, XHCI_FLAG_SS_FIRST)) {

View File

@ -0,0 +1,45 @@
From: Alistair Francis <Alistair.Francis@wdc.com>
Date: Sat, 4 May 2019 07:58:55 -0600
Subject: hw/usb/dev-mtp: Fix GCC 9 build warning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fix this warning with GCC 9 on Fedora 30:
hw/usb/dev-mtp.c:1715:36: error: taking address of packed member of ‘struct <anonymous>’ may result in an unaligned pointer value [-Werror=address-of-packed-member]
1715 | dataset->filename);
| ~~~~~~~^~~~~~~~~~
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
hw/usb/dev-mtp.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c
index 99548b012d..8233beacab 100644
--- a/hw/usb/dev-mtp.c
+++ b/hw/usb/dev-mtp.c
@@ -1711,9 +1711,22 @@ static void usb_mtp_write_metadata(MTPState *s, uint64_t dlen)
assert(!s->write_pending);
assert(p != NULL);
+/*
+ * We are about to access a packed struct. We are confident that the pointer
+ * address won't be unaligned, so we ignore GCC warnings.
+ */
+#if defined(CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE) && QEMU_GNUC_PREREQ(9, 0)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Waddress-of-packed-member"
+#endif
+
filename = utf16_to_str(MIN(dataset->length, filename_chars),
dataset->filename);
+#if defined(CONFIG_PRAGMA_DIAGNOSTIC_AVAILABLE) && QEMU_GNUC_PREREQ(9, 0)
+#pragma GCC diagnostic pop
+#endif
+
if (strchr(filename, '/')) {
usb_mtp_queue_result(s, RES_PARAMETER_NOT_SUPPORTED, d->trans,
0, 0, 0, 0);

View File

@ -0,0 +1,33 @@
From: Alistair Francis <Alistair.Francis@wdc.com>
Date: Sat, 4 May 2019 07:59:09 -0600
Subject: linux-user/uname: Fix GCC 9 build warnings
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fix this warning when building with GCC9 on Fedora 30:
In function ‘strncpy’,
inlined from ‘sys_uname’ at /home/alistair/qemu/linux-user/uname.c:94:3:
/usr/include/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ output may be truncated copying 64 bytes from a string of length 64 [-Werror=stringop-truncation]
106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
linux-user/uname.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/linux-user/uname.c b/linux-user/uname.c
index 313b79dbad..2fc6096a5b 100644
--- a/linux-user/uname.c
+++ b/linux-user/uname.c
@@ -73,7 +73,7 @@ const char *cpu_to_uname_machine(void *cpu_env)
#define COPY_UTSNAME_FIELD(dest, src) \
do { \
/* __NEW_UTS_LEN doesn't include terminating null */ \
- (void) strncpy((dest), (src), __NEW_UTS_LEN); \
+ (void) memcpy((dest), (src), MIN(strlen(src), __NEW_UTS_LEN)); \
(dest)[__NEW_UTS_LEN] = '\0'; \
} while (0)

View File

@ -1,80 +0,0 @@
From: Tim Smith <tim.smith@citrix.com>
Date: Fri, 2 Nov 2018 10:01:09 +0000
Subject: xen_disk: Avoid repeated memory allocation
xen_disk currently allocates memory to hold the data for each ioreq
as that ioreq is used, and frees it afterwards. Because it requires
page-aligned blocks, this interacts poorly with non-page-aligned
allocations and balloons the heap.
Instead, allocate the maximum possible requirement, which is
BLKIF_MAX_SEGMENTS_PER_REQUEST pages (currently 11 pages) when
the ioreq is created, and keep that allocation until it is destroyed.
Since the ioreqs themselves are re-used via a free list, this
should actually improve memory usage.
Signed-off-by: Tim Smith <tim.smith@citrix.com>
[BR: BSC#1100408]
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
hw/block/xen_disk.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/hw/block/xen_disk.c b/hw/block/xen_disk.c
index d9a55faf27..df99162520 100644
--- a/hw/block/xen_disk.c
+++ b/hw/block/xen_disk.c
@@ -110,7 +110,6 @@ static void ioreq_reset(struct ioreq *ioreq)
memset(&ioreq->req, 0, sizeof(ioreq->req));
ioreq->status = 0;
ioreq->start = 0;
- ioreq->buf = NULL;
ioreq->size = 0;
ioreq->presync = 0;
@@ -135,6 +134,9 @@ static struct ioreq *ioreq_start(struct XenBlkDev *blkdev)
/* allocate new struct */
ioreq = g_malloc0(sizeof(*ioreq));
ioreq->blkdev = blkdev;
+ ioreq->buf = qemu_memalign(XC_PAGE_SIZE,
+ BLKIF_MAX_SEGMENTS_PER_REQUEST *
+ XC_PAGE_SIZE);
blkdev->requests_total++;
qemu_iovec_init(&ioreq->v, 1);
} else {
@@ -317,14 +319,12 @@ static void qemu_aio_complete(void *opaque, int ret)
if (ret == 0) {
ioreq_grant_copy(ioreq);
}
- qemu_vfree(ioreq->buf);
break;
case BLKIF_OP_WRITE:
case BLKIF_OP_FLUSH_DISKCACHE:
if (!ioreq->req.nr_segments) {
break;
}
- qemu_vfree(ioreq->buf);
break;
default:
break;
@@ -392,12 +392,10 @@ static int ioreq_runio_qemu_aio(struct ioreq *ioreq)
{
struct XenBlkDev *blkdev = ioreq->blkdev;
- ioreq->buf = qemu_memalign(XC_PAGE_SIZE, ioreq->size);
if (ioreq->req.nr_segments &&
(ioreq->req.operation == BLKIF_OP_WRITE ||
ioreq->req.operation == BLKIF_OP_FLUSH_DISKCACHE) &&
ioreq_grant_copy(ioreq)) {
- qemu_vfree(ioreq->buf);
goto err;
}
@@ -1007,6 +1005,7 @@ static int blk_free(struct XenDevice *xendev)
ioreq = QLIST_FIRST(&blkdev->freelist);
QLIST_REMOVE(ioreq, list);
qemu_iovec_destroy(&ioreq->v);
+ qemu_vfree(ioreq->buf);
g_free(ioreq);
}

View File

@ -0,0 +1,35 @@
From: Alistair Francis <Alistair.Francis@wdc.com>
Date: Sat, 4 May 2019 07:59:23 -0600
Subject: linux-user/elfload: Fix GCC 9 build warnings
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Fix this warning when building with GCC9 on Fedora 30:
In function ‘strncpy’,
inlined from ‘fill_psinfo’ at /home/alistair/qemu/linux-user/elfload.c:3208:12,
inlined from ‘fill_note_info’ at /home/alistair/qemu/linux-user/elfload.c:3390:5,
inlined from ‘elf_core_dump’ at /home/alistair/qemu/linux-user/elfload.c:3539:9:
/usr/include/bits/string_fortified.h:106:10: error: ‘__builtin_strncpy’ specified bound 16 equals destination size [-Werror=stringop-truncation]
106 | return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
linux-user/elfload.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/linux-user/elfload.c b/linux-user/elfload.c
index c1a26021f8..d08fe23466 100644
--- a/linux-user/elfload.c
+++ b/linux-user/elfload.c
@@ -2872,7 +2872,7 @@ struct target_elf_prpsinfo {
target_gid_t pr_gid;
target_pid_t pr_pid, pr_ppid, pr_pgrp, pr_sid;
/* Lots missing */
- char pr_fname[16]; /* filename of executable */
+ char pr_fname[16] QEMU_NONSTRING; /* filename of executable */
char pr_psargs[ELF_PRARGSZ]; /* initial part of arg list */
};

View File

@ -0,0 +1,188 @@
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
Date: Sat, 4 May 2019 07:59:35 -0600
Subject: qxl: fix -Waddress-of-packed-member
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The GCC9 compiler complains about QXL code that takes the address of
members of the 'struct QXLReleaseRing' which is marked packed:
CC hw/display/qxl.o
/home/elmarco/src/qemu/hw/display/qxl.c: In function ‘init_qxl_ram’:
/home/elmarco/src/qemu/hw/display/qxl.c:50:19: warning: taking address of packed member of ‘struct QXLReleaseRing_ring_el’ may result in an unaligned pointer value [-Waddress-of-packed-member]
50 | ret = &(r)->items[prod].el; \
| ^~~~~~~~~~~~~~~~~~~~
/home/elmarco/src/qemu/hw/display/qxl.c:429:5: note: in expansion of macro ‘SPICE_RING_PROD_ITEM’
429 | SPICE_RING_PROD_ITEM(d, &d->ram->release_ring, item);
| ^~~~~~~~~~~~~~~~~~~~
/home/elmarco/src/qemu/hw/display/qxl.c: In function ‘qxl_push_free_res’:
/home/elmarco/src/qemu/hw/display/qxl.c:50:19: warning: taking address of packed member of ‘struct QXLReleaseRing_ring_el’ may result in an unaligned pointer value [-Waddress-of-packed-member]
50 | ret = &(r)->items[prod].el; \
| ^~~~~~~~~~~~~~~~~~~~
/home/elmarco/src/qemu/hw/display/qxl.c:762:5: note: in expansion of macro ‘SPICE_RING_PROD_ITEM’
762 | SPICE_RING_PROD_ITEM(d, ring, item);
| ^~~~~~~~~~~~~~~~~~~~
/home/elmarco/src/qemu/hw/display/qxl.c: In function ‘interface_release_resource’:
/home/elmarco/src/qemu/hw/display/qxl.c:50:19: warning: taking address of packed member of ‘struct QXLReleaseRing_ring_el’ may result in an unaligned pointer value [-Waddress-of-packed-member]
50 | ret = &(r)->items[prod].el; \
| ^~~~~~~~~~~~~~~~~~~~
/home/elmarco/src/qemu/hw/display/qxl.c:795:5: note: in expansion of macro ‘SPICE_RING_PROD_ITEM’
795 | SPICE_RING_PROD_ITEM(qxl, ring, item);
| ^~~~~~~~~~~~~~~~~~~~
Replace pointer usage by direct structure/array access instead.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
hw/display/qxl.c | 83 +++++++++++++++++++++++++++++-------------------
1 file changed, 50 insertions(+), 33 deletions(-)
diff --git a/hw/display/qxl.c b/hw/display/qxl.c
index c8ce5781e0..12d83dd6f1 100644
--- a/hw/display/qxl.c
+++ b/hw/display/qxl.c
@@ -39,29 +39,49 @@
* abort we just qxl_set_guest_bug and set the return to NULL. Still
* it may happen as a result of emulator bug as well.
*/
-#undef SPICE_RING_PROD_ITEM
-#define SPICE_RING_PROD_ITEM(qxl, r, ret) { \
- uint32_t prod = (r)->prod & SPICE_RING_INDEX_MASK(r); \
- if (prod >= ARRAY_SIZE((r)->items)) { \
- qxl_set_guest_bug(qxl, "SPICE_RING_PROD_ITEM indices mismatch " \
- "%u >= %zu", prod, ARRAY_SIZE((r)->items)); \
- ret = NULL; \
- } else { \
- ret = &(r)->items[prod].el; \
- } \
+#define SPICE_RING_GET_CHECK(qxl, r, field) ({ \
+ field = (r)->field & SPICE_RING_INDEX_MASK(r); \
+ bool mismatch = field >= ARRAY_SIZE((r)->items); \
+ if (mismatch) { \
+ qxl_set_guest_bug(qxl, "SPICE_RING_GET %s indices mismatch " \
+ "%u >= %zu", stringify(field), field, \
+ ARRAY_SIZE((r)->items)); \
+ } \
+ !mismatch; \
+})
+
+static inline uint64_t
+qxl_release_ring_get_prod(PCIQXLDevice *qxl)
+{
+ struct QXLReleaseRing *ring = &qxl->ram->release_ring;
+ uint32_t prod;
+ bool ok = SPICE_RING_GET_CHECK(qxl, ring, prod);
+ assert(ok);
+
+ return ring->items[prod].el;
+}
+
+static inline bool
+qxl_release_ring_set_prod(PCIQXLDevice *qxl, uint64_t val)
+{
+ struct QXLReleaseRing *ring = &qxl->ram->release_ring;
+ uint32_t prod;
+ bool ok = SPICE_RING_GET_CHECK(qxl, ring, prod);
+ if (ok) {
+ ring->items[prod].el = val;
}
+ return ok;
+}
#undef SPICE_RING_CONS_ITEM
-#define SPICE_RING_CONS_ITEM(qxl, r, ret) { \
- uint32_t cons = (r)->cons & SPICE_RING_INDEX_MASK(r); \
- if (cons >= ARRAY_SIZE((r)->items)) { \
- qxl_set_guest_bug(qxl, "SPICE_RING_CONS_ITEM indices mismatch " \
- "%u >= %zu", cons, ARRAY_SIZE((r)->items)); \
- ret = NULL; \
- } else { \
- ret = &(r)->items[cons].el; \
- } \
- }
+#define SPICE_RING_CONS_ITEM(qxl, r, ret) { \
+ uint32_t cons; \
+ if (!SPICE_RING_GET_CHECK(qxl, r, cons)) { \
+ ret = NULL; \
+ } else { \
+ ret = &(r)->items[cons].el; \
+ } \
+}
#undef ALIGN
#define ALIGN(a, b) (((a) + ((b) - 1)) & ~((b) - 1))
@@ -414,7 +434,6 @@ static void init_qxl_rom(PCIQXLDevice *d)
static void init_qxl_ram(PCIQXLDevice *d)
{
uint8_t *buf;
- uint64_t *item;
buf = d->vga.vram_ptr;
d->ram = (QXLRam *)(buf + le32_to_cpu(d->shadow_rom.ram_header_offset));
@@ -426,9 +445,9 @@ static void init_qxl_ram(PCIQXLDevice *d)
SPICE_RING_INIT(&d->ram->cmd_ring);
SPICE_RING_INIT(&d->ram->cursor_ring);
SPICE_RING_INIT(&d->ram->release_ring);
- SPICE_RING_PROD_ITEM(d, &d->ram->release_ring, item);
- assert(item);
- *item = 0;
+ if (!qxl_release_ring_set_prod(d, 0)) {
+ g_assert_not_reached();
+ }
qxl_ring_set_dirty(d);
}
@@ -732,7 +751,6 @@ static int interface_req_cmd_notification(QXLInstance *sin)
static inline void qxl_push_free_res(PCIQXLDevice *d, int flush)
{
QXLReleaseRing *ring = &d->ram->release_ring;
- uint64_t *item;
int notify;
#define QXL_FREE_BUNCH_SIZE 32
@@ -759,11 +777,9 @@ static inline void qxl_push_free_res(PCIQXLDevice *d, int flush)
if (notify) {
qxl_send_events(d, QXL_INTERRUPT_DISPLAY);
}
- SPICE_RING_PROD_ITEM(d, ring, item);
- if (!item) {
+ if (!qxl_release_ring_set_prod(d, 0)) {
return;
}
- *item = 0;
d->num_free_res = 0;
d->last_release = NULL;
qxl_ring_set_dirty(d);
@@ -775,7 +791,8 @@ static void interface_release_resource(QXLInstance *sin,
{
PCIQXLDevice *qxl = container_of(sin, PCIQXLDevice, ssd.qxl);
QXLReleaseRing *ring;
- uint64_t *item, id;
+ uint32_t prod;
+ uint64_t id;
if (ext.group_id == MEMSLOT_GROUP_HOST) {
/* host group -> vga mode update request */
@@ -792,16 +809,16 @@ static void interface_release_resource(QXLInstance *sin,
* pci bar 0, $command.release_info
*/
ring = &qxl->ram->release_ring;
- SPICE_RING_PROD_ITEM(qxl, ring, item);
- if (!item) {
+
+ if (!SPICE_RING_GET_CHECK(qxl, ring, prod)) {
return;
}
- if (*item == 0) {
+ if (qxl_release_ring_get_prod(qxl) == 0) {
/* stick head into the ring */
id = ext.info->id;
ext.info->next = 0;
qxl_ram_set_dirty(qxl, &ext.info->next);
- *item = id;
+ qxl_release_ring_set_prod(qxl, id);
qxl_ring_set_dirty(qxl);
} else {
/* append item to the list */

View File

@ -1,40 +0,0 @@
From: Cornelia Huck <cohuck@redhat.com>
Date: Wed, 5 Dec 2018 15:35:03 +0100
Subject: vfio-ap: flag as compatible with balloon
vfio-ap devices do not pin any pages in the host. Therefore, they
are compatible with memory ballooning.
Flag them as compatible, so both vfio-ap and a balloon can be
used simultaneously.
Cc: qemu-stable@nongnu.org
Acked-by: Christian Borntraeger <borntraeger@de.ibm.com>
Tested-by: Tony Krowiak <akrowiak@linux.ibm.com>
Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
(cherry picked from commit 1883e8fc8005e9ef452890a075bae98e8c432968)
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
hw/vfio/ap.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c
index 65de952f44..0a25f5e096 100644
--- a/hw/vfio/ap.c
+++ b/hw/vfio/ap.c
@@ -104,6 +104,14 @@ static void vfio_ap_realize(DeviceState *dev, Error **errp)
vapdev->vdev.name = g_strdup_printf("%s", mdevid);
vapdev->vdev.dev = dev;
+ /*
+ * vfio-ap devices operate in a way compatible with
+ * memory ballooning, as no pages are pinned in the host.
+ * This needs to be set before vfio_get_device() for vfio common to
+ * handle the balloon inhibitor.
+ */
+ vapdev->vdev.balloon_allowed = true;
+
ret = vfio_get_device(vfio_group, mdevid, &vapdev->vdev, &local_err);
if (ret) {
goto out_get_dev_err;

View File

@ -1,35 +0,0 @@
From: Thomas Huth <thuth@redhat.com>
Date: Fri, 14 Dec 2018 14:08:07 +0100
Subject: hw/s390x: Fix bad mask in time2tod()
Since "s390x/tcg: avoid overflows in time2tod/tod2time", the
time2tod() function tries to deal with the 9 uppermost bits in the
time value, but uses the wrong mask for this: 0xff80000000000000 should
be used instead of 0xff10000000000000 here.
Fixes: 14055ce53c2d901d826ffad7fb7d6bb8ab46bdfd
Cc: qemu-stable@nongnu.org
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1544792887-14575-1-git-send-email-thuth@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
[CH: tweaked commit message]
(cherry picked from commit aba7a5a2de3dba5917024df25441f715b9249e31)
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
include/hw/s390x/tod.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/hw/s390x/tod.h b/include/hw/s390x/tod.h
index 413c0d7c02..442f45b2f5 100644
--- a/include/hw/s390x/tod.h
+++ b/include/hw/s390x/tod.h
@@ -50,7 +50,7 @@ typedef struct S390TODClass {
/* Converts ns to s390's clock format */
static inline uint64_t time2tod(uint64_t ns)
{
- return (ns << 9) / 125 + (((ns & 0xff10000000000000ull) / 125) << 9);
+ return (ns << 9) / 125 + (((ns & 0xff80000000000000ull) / 125) << 9);
}
/* Converts s390's clock format to ns */

View File

@ -1,102 +0,0 @@
From: Zheng Xiang <zhengxiang9@huawei.com>
Date: Mon, 3 Dec 2018 15:05:17 +0800
Subject: pcie: set link state inactive/active after hot unplug/plug
When VM boots from the latest version of linux kernel, after
hot-unpluging virtio-blk disks which are hotplugged into
pcie-root-port, the VM's dmesg log shows:
[ 151.046242] pciehp 0000:00:05.0:pcie004: pending interrupts 0x0001 from Slot Status
[ 151.046365] pciehp 0000:00:05.0:pcie004: Slot(0-3): Attention button pressed
[ 151.046369] pciehp 0000:00:05.0:pcie004: Slot(0-3): Powering off due to button press
[ 151.046420] pciehp 0000:00:05.0:pcie004: pending interrupts 0x0010 from Slot Status
[ 151.046425] pciehp 0000:00:05.0:pcie004: pciehp_green_led_blink: SLOTCTRL a8 write cmd 200
[ 151.046464] pciehp 0000:00:05.0:pcie004: pending interrupts 0x0010 from Slot Status
[ 151.046468] pciehp 0000:00:05.0:pcie004: pciehp_set_attention_status: SLOTCTRL a8 write cmd c0
[ 156.163421] pciehp 0000:00:05.0:pcie004: pciehp_get_power_status: SLOTCTRL a8 value read 2f1
[ 156.163427] pciehp 0000:00:05.0:pcie004: pciehp_unconfigure_device: domain:bus:dev = 0000:06:00
[ 156.198736] pciehp 0000:00:05.0:pcie004: pending interrupts 0x0010 from Slot Status
[ 156.198772] pciehp 0000:00:05.0:pcie004: pciehp_power_off_slot: SLOTCTRL a8 write cmd 400
[ 157.224124] pciehp 0000:00:05.0:pcie004: pending interrupts 0x0018 from Slot Status
[ 157.224194] pciehp 0000:00:05.0:pcie004: pciehp_green_led_off: SLOTCTRL a8 write cmd 300
[ 157.224220] pciehp 0000:00:05.0:pcie004: pciehp_check_link_active: lnk_status = 2011
[ 157.224223] pciehp 0000:00:05.0:pcie004: Slot(0-3): Link Up
[ 157.224233] pciehp 0000:00:05.0:pcie004: pciehp_get_power_status: SLOTCTRL a8 value read 7f1
[ 157.224281] pciehp 0000:00:05.0:pcie004: pending interrupts 0x0010 from Slot Status
[ 157.224285] pciehp 0000:00:05.0:pcie004: pciehp_power_on_slot: SLOTCTRL a8 write cmd 0
[ 157.224300] pciehp 0000:00:05.0:pcie004: __pciehp_link_set: lnk_ctrl = 0
[ 157.224336] pciehp 0000:00:05.0:pcie004: pending interrupts 0x0010 from Slot Status
[ 157.224339] pciehp 0000:00:05.0:pcie004: pciehp_green_led_blink: SLOTCTRL a8 write cmd 200
[ 159.739294] pci 0000:06:00.0 id reading try 50 times with interval 20 ms to get ffffffff
[ 159.739315] pciehp 0000:00:05.0:pcie004: pciehp_check_link_status: lnk_status = 2011
[ 159.739318] pciehp 0000:00:05.0:pcie004: Failed to check link status
[ 159.739371] pciehp 0000:00:05.0:pcie004: pending interrupts 0x0010 from Slot Status
[ 159.739394] pciehp 0000:00:05.0:pcie004: pciehp_power_off_slot: SLOTCTRL a8 write cmd 400
[ 160.771426] pciehp 0000:00:05.0:pcie004: pending interrupts 0x0010 from Slot Status
[ 160.771452] pciehp 0000:00:05.0:pcie004: pciehp_green_led_off: SLOTCTRL a8 write cmd 300
[ 160.771495] pciehp 0000:00:05.0:pcie004: pending interrupts 0x0010 from Slot Status
[ 160.771499] pciehp 0000:00:05.0:pcie004: pciehp_set_attention_status: SLOTCTRL a8 write cmd 40
[ 160.771535] pciehp 0000:00:05.0:pcie004: pending interrupts 0x0010 from Slot Status
[ 160.771539] pciehp 0000:00:05.0:pcie004: pciehp_green_led_off: SLOTCTRL a8 write cmd 300
After analyzing the log information, it seems that qemu doesn't
change the Link Status from active to inactive after hot-unplug.
This results in the abnormal log after the linux kernel commit
d331710ea78fea merged.
Furthermore, If I hotplug the same virtio-blk disk after hot-unplug,
the virtio-blk would turn on and then back off.
So this patch set the Link Status inactive after hot-unplug and
active after hot-plug.
Signed-off-by: Zheng Xiang <zhengxiang9@huawei.com>
Signed-off-by: Zheng Xiang <xiang.zheng@linaro.org>
Cc: Wang Haibin <wanghaibin.wang@huawei.com>
Cc: qemu-stable@nongnu.org
Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 2f2b18f60bf17453b4c01197a9316615a3c1f1de)
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
hw/pci/pcie.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/hw/pci/pcie.c b/hw/pci/pcie.c
index 6c91bd44a0..66b73b87c8 100644
--- a/hw/pci/pcie.c
+++ b/hw/pci/pcie.c
@@ -345,6 +345,10 @@ void pcie_cap_slot_hotplug_cb(HotplugHandler *hotplug_dev, DeviceState *dev,
if (!dev->hotplugged) {
pci_word_test_and_set_mask(exp_cap + PCI_EXP_SLTSTA,
PCI_EXP_SLTSTA_PDS);
+ if (pci_dev->cap_present & QEMU_PCIE_LNKSTA_DLLLA) {
+ pci_word_test_and_set_mask(exp_cap + PCI_EXP_LNKSTA,
+ PCI_EXP_LNKSTA_DLLLA);
+ }
return;
}
@@ -355,6 +359,10 @@ void pcie_cap_slot_hotplug_cb(HotplugHandler *hotplug_dev, DeviceState *dev,
if (pci_get_function_0(pci_dev)) {
pci_word_test_and_set_mask(exp_cap + PCI_EXP_SLTSTA,
PCI_EXP_SLTSTA_PDS);
+ if (pci_dev->cap_present & QEMU_PCIE_LNKSTA_DLLLA) {
+ pci_word_test_and_set_mask(exp_cap + PCI_EXP_LNKSTA,
+ PCI_EXP_LNKSTA_DLLLA);
+ }
pcie_cap_slot_event(PCI_DEVICE(hotplug_dev),
PCI_EXP_HP_EV_PDC | PCI_EXP_HP_EV_ABP);
}
@@ -531,6 +539,10 @@ void pcie_cap_slot_write_config(PCIDevice *dev,
pci_word_test_and_clear_mask(exp_cap + PCI_EXP_SLTSTA,
PCI_EXP_SLTSTA_PDS);
+ if (dev->cap_present & QEMU_PCIE_LNKSTA_DLLLA) {
+ pci_word_test_and_clear_mask(exp_cap + PCI_EXP_LNKSTA,
+ PCI_EXP_LNKSTA_DLLLA);
+ }
pci_word_test_and_set_mask(exp_cap + PCI_EXP_SLTSTA,
PCI_EXP_SLTSTA_PDC);
}

View File

@ -1,30 +0,0 @@
From: Corey Minyard <cminyard@mvista.com>
Date: Mon, 26 Nov 2018 12:28:44 -0600
Subject: pc:piix4: Update smbus I/O space after a migration
Otherwise it won't be set up correctly and won't work after
miigration.
Signed-off-by: Corey Minyard <cminyard@mvista.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: qemu-stable@nongnu.org
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
(cherry picked from commit 2b4e573c7c7b9a698ba6931ba456bbd8d3d8c84c)
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
hw/acpi/piix4.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/acpi/piix4.c b/hw/acpi/piix4.c
index b0bd10b3f9..fb3620e6c0 100644
--- a/hw/acpi/piix4.c
+++ b/hw/acpi/piix4.c
@@ -173,6 +173,7 @@ static int vmstate_acpi_post_load(void *opaque, int version_id)
PIIX4PMState *s = opaque;
pm_io_space_update(s);
+ smbus_io_space_update(s);
return 0;
}

View File

@ -1,54 +0,0 @@
From: Gerd Hoffmann <kraxel@redhat.com>
Date: Wed, 9 Jan 2019 11:07:15 -0700
Subject: hw/usb: fix mistaken de-initialization of CCID state
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From: Daniel P. Berrangé <berrange@redhat.com>
In previous commit:
commit 7dea29e4af17fc1d27478de9f8ea38144deac54a
Author: Li Qiang <liq3ea@gmail.com>
Date: Fri Oct 19 03:50:36 2018 -0700
hw: ccid-card-emulated: cleanup resource when realize in error path
The emulated_realize method was changed so that it jumps to a cleanup
label to de-initialize state upon error. This change failed to ensure
the success path exited the method before this point though. So the
mutexes are always destroyed even in normal operation. The result is
as crashtastic as expected:
$ qemu-system-x86_64 -usb -device usb-ccid,id=ccid0 -device ccid-card-emulated,backend=nss-emulated,id=smartcard0,bus=ccid0.0
qemu-system-x86_64: util/qemu-thread-posix.c:64: qemu_mutex_lock_impl: Assertion `mutex->initialized' failed.
Aborted (core dumped)
Fixes: 7dea29e4af1
Reported-by: Michael Tokarev <mjt@tls.msk.ru>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Michael Tokarev <mjt@tls.msk.ru>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Tested-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20181221134115.27973-1-berrange@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
(cherry picked from commit 3fd2092fd11b9e4220a08eca0663cc59178a6c3f)
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
hw/usb/ccid-card-emulated.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/hw/usb/ccid-card-emulated.c b/hw/usb/ccid-card-emulated.c
index 25976ed84f..e0457d305b 100644
--- a/hw/usb/ccid-card-emulated.c
+++ b/hw/usb/ccid-card-emulated.c
@@ -549,6 +549,8 @@ static void emulated_realize(CCIDCardState *base, Error **errp)
qemu_thread_create(&card->apdu_thread_id, "ccid/apdu", handle_apdu_thread,
card, QEMU_THREAD_JOINABLE);
+ return;
+
out2:
clean_event_notifier(card);
out1:

View File

@ -1,79 +0,0 @@
From: Gerd Hoffmann <kraxel@redhat.com>
Date: Thu, 13 Dec 2018 13:25:11 +0100
Subject: usb-mtp: use O_NOFOLLOW and O_CLOEXEC.
Open files and directories with O_NOFOLLOW to avoid symlinks attacks.
While being at it also add O_CLOEXEC.
usb-mtp only handles regular files and directories and ignores
everything else, so users should not see a difference.
Because qemu ignores symlinks, carrying out a successful symlink attack
requires swapping an existing file or directory below rootdir for a
symlink and winning the race against the inotify notification to qemu.
Fixes: CVE-2018-16872
Cc: Prasad J Pandit <ppandit@redhat.com>
Cc: Bandan Das <bsd@redhat.com>
Reported-by: Michael Hanselmann <public@hansmi.ch>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Michael Hanselmann <public@hansmi.ch>
Message-id: 20181213122511.13853-1-kraxel@redhat.com
(cherry picked from commit bab9df35ce73d1c8e19a37e2737717ea1c984dc1)
[BR: BSC#1119493]
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
hw/usb/dev-mtp.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/hw/usb/dev-mtp.c b/hw/usb/dev-mtp.c
index 100b7171f4..36c43b8c20 100644
--- a/hw/usb/dev-mtp.c
+++ b/hw/usb/dev-mtp.c
@@ -653,13 +653,18 @@ static void usb_mtp_object_readdir(MTPState *s, MTPObject *o)
{
struct dirent *entry;
DIR *dir;
+ int fd;
if (o->have_children) {
return;
}
o->have_children = true;
- dir = opendir(o->path);
+ fd = open(o->path, O_DIRECTORY | O_CLOEXEC | O_NOFOLLOW);
+ if (fd < 0) {
+ return;
+ }
+ dir = fdopendir(fd);
if (!dir) {
return;
}
@@ -1007,7 +1012,7 @@ static MTPData *usb_mtp_get_object(MTPState *s, MTPControl *c,
trace_usb_mtp_op_get_object(s->dev.addr, o->handle, o->path);
- d->fd = open(o->path, O_RDONLY);
+ d->fd = open(o->path, O_RDONLY | O_CLOEXEC | O_NOFOLLOW);
if (d->fd == -1) {
usb_mtp_data_free(d);
return NULL;
@@ -1031,7 +1036,7 @@ static MTPData *usb_mtp_get_partial_object(MTPState *s, MTPControl *c,
c->argv[1], c->argv[2]);
d = usb_mtp_data_alloc(c);
- d->fd = open(o->path, O_RDONLY);
+ d->fd = open(o->path, O_RDONLY | O_CLOEXEC | O_NOFOLLOW);
if (d->fd == -1) {
usb_mtp_data_free(d);
return NULL;
@@ -1658,7 +1663,7 @@ static void usb_mtp_write_data(MTPState *s)
0, 0, 0, 0);
goto done;
}
- d->fd = open(path, O_CREAT | O_WRONLY, mask);
+ d->fd = open(path, O_CREAT | O_WRONLY | O_CLOEXEC | O_NOFOLLOW, mask);
if (d->fd == -1) {
usb_mtp_queue_result(s, RES_STORE_FULL, d->trans,
0, 0, 0, 0);

View File

@ -1,41 +0,0 @@
From: Prasad J Pandit <pjp@fedoraproject.org>
Date: Wed, 12 Dec 2018 23:28:17 +0530
Subject: pvrdma: release device resources in case of an error
If during pvrdma device initialisation an error occurs,
pvrdma_realize() does not release memory resources, leading
to memory leakage.
Reported-by: Li Qiang <liq3ea@163.com>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Message-Id: <20181212175817.815-1-ppandit@redhat.com>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
(cherry picked from commit cce648613bc802be1b894227f7fd94d88476ea07)
[BR: BSC#1119437 CVE-2018-20123]
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
hw/rdma/vmw/pvrdma_main.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/rdma/vmw/pvrdma_main.c b/hw/rdma/vmw/pvrdma_main.c
index ca5fa8d981..34d8cc4694 100644
--- a/hw/rdma/vmw/pvrdma_main.c
+++ b/hw/rdma/vmw/pvrdma_main.c
@@ -572,7 +572,7 @@ static int pvrdma_check_ram_shared(Object *obj, void *opaque)
static void pvrdma_realize(PCIDevice *pdev, Error **errp)
{
- int rc;
+ int rc = 0;
PVRDMADev *dev = PVRDMA_DEV(pdev);
Object *memdev_root;
bool ram_shared = false;
@@ -632,6 +632,7 @@ static void pvrdma_realize(PCIDevice *pdev, Error **errp)
out:
if (rc) {
+ pvrdma_fini(pdev);
error_append_hint(errp, "Device fail to load\n");
}
}

View File

@ -1,47 +0,0 @@
From: Prasad J Pandit <pjp@fedoraproject.org>
Date: Thu, 13 Dec 2018 01:00:34 +0530
Subject: rdma: check num_sge does not exceed MAX_SGE
rdma back-end has scatter/gather array ibv_sge[MAX_SGE=4] set
to have 4 elements. A guest could send a 'PvrdmaSqWqe' ring element
with 'num_sge' set to > MAX_SGE, which may lead to OOB access issue.
Add check to avoid it.
Reported-by: Saar Amar <saaramar5@gmail.com>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
(cherry picked from commit 0e68373cc2b3a063ce067bc0cc3edaf370752890)
[BR: BSC#1119840 CVE-2018-20124, modified complete_work() calls to be
comp_handler()]
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
hw/rdma/rdma_backend.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/rdma/rdma_backend.c b/hw/rdma/rdma_backend.c
index d7a4bbd91f..0b3b98a94c 100644
--- a/hw/rdma/rdma_backend.c
+++ b/hw/rdma/rdma_backend.c
@@ -311,8 +311,8 @@ void rdma_backend_post_send(RdmaBackendDev *backend_dev,
}
pr_dbg("num_sge=%d\n", num_sge);
- if (!num_sge) {
- pr_dbg("num_sge=0\n");
+ if (!num_sge || num_sge > MAX_SGE) {
+ pr_dbg("invalid num_sge=%d\n", num_sge);
comp_handler(IBV_WC_GENERAL_ERR, VENDOR_ERR_NO_SGE, ctx);
return;
}
@@ -390,8 +390,8 @@ void rdma_backend_post_recv(RdmaBackendDev *backend_dev,
}
pr_dbg("num_sge=%d\n", num_sge);
- if (!num_sge) {
- pr_dbg("num_sge=0\n");
+ if (!num_sge || num_sge > MAX_SGE) {
+ pr_dbg("invalid num_sge=%d\n", num_sge);
comp_handler(IBV_WC_GENERAL_ERR, VENDOR_ERR_NO_SGE, ctx);
return;
}

View File

@ -1,41 +0,0 @@
From: Prasad J Pandit <pjp@fedoraproject.org>
Date: Thu, 13 Dec 2018 01:00:35 +0530
Subject: pvrdma: add uar_read routine
Define skeleton 'uar_read' routine. Avoid NULL dereference.
Reported-by: Li Qiang <liq3ea@163.com>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Reviewed-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
(cherry picked from commit 2aa86456fb938a11f2b7bd57c8643c213218681c)
[BR: BSC#1119979 CVE-2018-20191]
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
hw/rdma/vmw/pvrdma_main.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/hw/rdma/vmw/pvrdma_main.c b/hw/rdma/vmw/pvrdma_main.c
index 34d8cc4694..c9d9631769 100644
--- a/hw/rdma/vmw/pvrdma_main.c
+++ b/hw/rdma/vmw/pvrdma_main.c
@@ -455,6 +455,11 @@ static const MemoryRegionOps regs_ops = {
},
};
+static uint64_t uar_read(void *opaque, hwaddr addr, unsigned size)
+{
+ return 0xffffffff;
+}
+
static void uar_write(void *opaque, hwaddr addr, uint64_t val, unsigned size)
{
PVRDMADev *dev = opaque;
@@ -496,6 +501,7 @@ static void uar_write(void *opaque, hwaddr addr, uint64_t val, unsigned size)
}
static const MemoryRegionOps uar_ops = {
+ .read = uar_read,
.write = uar_write,
.endianness = DEVICE_LITTLE_ENDIAN,
.impl = {

View File

@ -1,48 +0,0 @@
From: Prasad J Pandit <pjp@fedoraproject.org>
Date: Thu, 13 Dec 2018 01:00:36 +0530
Subject: pvrdma: check number of pages when creating rings
When creating CQ/QP rings, an object can have up to
PVRDMA_MAX_FAST_REG_PAGES 8 pages. Check 'npages' parameter
to avoid excessive memory allocation or a null dereference.
Reported-by: Li Qiang <liq3ea@163.com>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
(cherry picked from commit 2c858ce5da8ae6689c75182b73bc455a291cad41)
[BR: BSC#1119989 CVE-2018-20125]
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
hw/rdma/vmw/pvrdma_cmd.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/hw/rdma/vmw/pvrdma_cmd.c b/hw/rdma/vmw/pvrdma_cmd.c
index 4faeb21631..ce2514aacb 100644
--- a/hw/rdma/vmw/pvrdma_cmd.c
+++ b/hw/rdma/vmw/pvrdma_cmd.c
@@ -261,6 +261,11 @@ static int create_cq_ring(PCIDevice *pci_dev , PvrdmaRing **ring,
int rc = -EINVAL;
char ring_name[MAX_RING_NAME_SZ];
+ if (!nchunks || nchunks > PVRDMA_MAX_FAST_REG_PAGES) {
+ pr_dbg("invalid nchunks: %d\n", nchunks);
+ return rc;
+ }
+
pr_dbg("pdir_dma=0x%llx\n", (long long unsigned int)pdir_dma);
dir = rdma_pci_dma_map(pci_dev, pdir_dma, TARGET_PAGE_SIZE);
if (!dir) {
@@ -377,6 +382,12 @@ static int create_qp_rings(PCIDevice *pci_dev, uint64_t pdir_dma,
char ring_name[MAX_RING_NAME_SZ];
uint32_t wqe_sz;
+ if (!spages || spages > PVRDMA_MAX_FAST_REG_PAGES
+ || !rpages || rpages > PVRDMA_MAX_FAST_REG_PAGES) {
+ pr_dbg("invalid pages: %d, %d\n", spages, rpages);
+ return rc;
+ }
+
pr_dbg("pdir_dma=0x%llx\n", (long long unsigned int)pdir_dma);
dir = rdma_pci_dma_map(pci_dev, pdir_dma, TARGET_PAGE_SIZE);
if (!dir) {

View File

@ -1,79 +0,0 @@
From: Prasad J Pandit <pjp@fedoraproject.org>
Date: Thu, 13 Dec 2018 01:00:39 +0530
Subject: pvrdma: check return value from pvrdma_idx_ring_has_ routines
pvrdma_idx_ring_has_[data/space] routines also return invalid
index PVRDMA_INVALID_IDX[=-1], if ring has no data/space. Check
return value from these routines to avoid plausible infinite loops.
Reported-by: Li Qiang <liq3ea@163.com>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
(cherry picked from commit f1e2e38ee0136b7710a2caa347049818afd57a1b)
[BR: BSC#1119984 CVE-2018-20216]
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
hw/rdma/vmw/pvrdma_dev_ring.c | 29 +++++++++++------------------
1 file changed, 11 insertions(+), 18 deletions(-)
diff --git a/hw/rdma/vmw/pvrdma_dev_ring.c b/hw/rdma/vmw/pvrdma_dev_ring.c
index 01247fc041..e8e5b502f6 100644
--- a/hw/rdma/vmw/pvrdma_dev_ring.c
+++ b/hw/rdma/vmw/pvrdma_dev_ring.c
@@ -73,23 +73,16 @@ out:
void *pvrdma_ring_next_elem_read(PvrdmaRing *ring)
{
+ int e;
unsigned int idx = 0, offset;
- /*
- pr_dbg("%s: t=%d, h=%d\n", ring->name, ring->ring_state->prod_tail,
- ring->ring_state->cons_head);
- */
-
- if (!pvrdma_idx_ring_has_data(ring->ring_state, ring->max_elems, &idx)) {
+ e = pvrdma_idx_ring_has_data(ring->ring_state, ring->max_elems, &idx);
+ if (e <= 0) {
pr_dbg("No more data in ring\n");
return NULL;
}
offset = idx * ring->elem_sz;
- /*
- pr_dbg("idx=%d\n", idx);
- pr_dbg("offset=%d\n", offset);
- */
return ring->pages[offset / TARGET_PAGE_SIZE] + (offset % TARGET_PAGE_SIZE);
}
@@ -105,20 +98,20 @@ void pvrdma_ring_read_inc(PvrdmaRing *ring)
void *pvrdma_ring_next_elem_write(PvrdmaRing *ring)
{
- unsigned int idx, offset, tail;
+ int idx;
+ unsigned int offset, tail;
- /*
- pr_dbg("%s: t=%d, h=%d\n", ring->name, ring->ring_state->prod_tail,
- ring->ring_state->cons_head);
- */
-
- if (!pvrdma_idx_ring_has_space(ring->ring_state, ring->max_elems, &tail)) {
+ idx = pvrdma_idx_ring_has_space(ring->ring_state, ring->max_elems, &tail);
+ if (idx <= 0) {
pr_dbg("CQ is full\n");
return NULL;
}
idx = pvrdma_idx(&ring->ring_state->prod_tail, ring->max_elems);
- /* TODO: tail == idx */
+ if (idx < 0 || tail != idx) {
+ pr_dbg("invalid idx\n");
+ return NULL;
+ }
offset = idx * ring->elem_sz;
return ring->pages[offset / TARGET_PAGE_SIZE] + (offset % TARGET_PAGE_SIZE);

View File

@ -1,103 +0,0 @@
From: Prasad J Pandit <pjp@fedoraproject.org>
Date: Thu, 13 Dec 2018 01:00:37 +0530
Subject: pvrdma: release ring object in case of an error
create_cq and create_qp routines allocate ring object, but it's
not released in case of an error, leading to memory leakage.
Reported-by: Li Qiang <liq3ea@163.com>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Reviewed-by: Yuval Shaia <yuval.shaia@oracle.com>
Signed-off-by: Marcel Apfelbaum <marcel.apfelbaum@gmail.com>
(cherry picked from commit 509f57c98e7536905bb4902363d0cba66ce7e089)
[BR: BSC#1119991 CVE-2018-20126]
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
hw/rdma/vmw/pvrdma_cmd.c | 39 ++++++++++++++++++++++++++++-----------
1 file changed, 28 insertions(+), 11 deletions(-)
diff --git a/hw/rdma/vmw/pvrdma_cmd.c b/hw/rdma/vmw/pvrdma_cmd.c
index ce2514aacb..51da4a1c40 100644
--- a/hw/rdma/vmw/pvrdma_cmd.c
+++ b/hw/rdma/vmw/pvrdma_cmd.c
@@ -315,6 +315,14 @@ out:
return rc;
}
+static void destroy_cq_ring(PvrdmaRing *ring)
+{
+ pvrdma_ring_free(ring);
+ /* ring_state was in slot 1, not 0 so need to jump back */
+ rdma_pci_dma_unmap(ring->dev, --ring->ring_state, TARGET_PAGE_SIZE);
+ g_free(ring);
+}
+
static int create_cq(PVRDMADev *dev, union pvrdma_cmd_req *req,
union pvrdma_cmd_resp *rsp)
{
@@ -338,6 +346,9 @@ static int create_cq(PVRDMADev *dev, union pvrdma_cmd_req *req,
resp->hdr.err = rdma_rm_alloc_cq(&dev->rdma_dev_res, &dev->backend_dev,
cmd->cqe, &resp->cq_handle, ring);
+ if (resp->hdr.err) {
+ destroy_cq_ring(ring);
+ }
resp->cqe = cmd->cqe;
out:
@@ -361,10 +372,7 @@ static int destroy_cq(PVRDMADev *dev, union pvrdma_cmd_req *req,
}
ring = (PvrdmaRing *)cq->opaque;
- pvrdma_ring_free(ring);
- /* ring_state was in slot 1, not 0 so need to jump back */
- rdma_pci_dma_unmap(PCI_DEVICE(dev), --ring->ring_state, TARGET_PAGE_SIZE);
- g_free(ring);
+ destroy_cq_ring(ring);
rdma_rm_dealloc_cq(&dev->rdma_dev_res, cmd->cq_handle);
@@ -462,6 +470,17 @@ out:
return rc;
}
+static void destroy_qp_rings(PvrdmaRing *ring)
+{
+ pr_dbg("sring=%p\n", &ring[0]);
+ pvrdma_ring_free(&ring[0]);
+ pr_dbg("rring=%p\n", &ring[1]);
+ pvrdma_ring_free(&ring[1]);
+
+ rdma_pci_dma_unmap(ring->dev, ring->ring_state, TARGET_PAGE_SIZE);
+ g_free(ring);
+}
+
static int create_qp(PVRDMADev *dev, union pvrdma_cmd_req *req,
union pvrdma_cmd_resp *rsp)
{
@@ -492,6 +511,10 @@ static int create_qp(PVRDMADev *dev, union pvrdma_cmd_req *req,
cmd->max_send_sge, cmd->send_cq_handle,
cmd->max_recv_wr, cmd->max_recv_sge,
cmd->recv_cq_handle, rings, &resp->qpn);
+ if (resp->hdr.err) {
+ destroy_qp_rings(rings);
+ return resp->hdr.err;
+ }
resp->max_send_wr = cmd->max_send_wr;
resp->max_recv_wr = cmd->max_recv_wr;
@@ -566,13 +589,7 @@ static int destroy_qp(PVRDMADev *dev, union pvrdma_cmd_req *req,
rdma_rm_dealloc_qp(&dev->rdma_dev_res, cmd->qp_handle);
ring = (PvrdmaRing *)qp->opaque;
- pr_dbg("sring=%p\n", &ring[0]);
- pvrdma_ring_free(&ring[0]);
- pr_dbg("rring=%p\n", &ring[1]);
- pvrdma_ring_free(&ring[1]);
-
- rdma_pci_dma_unmap(PCI_DEVICE(dev), ring->ring_state, TARGET_PAGE_SIZE);
- g_free(ring);
+ destroy_qp_rings(ring);
return 0;
}

View File

@ -1,637 +0,0 @@
From: Kevin Wolf <kwolf@redhat.com>
Date: Wed, 9 Jan 2019 11:10:07 -0700
Subject: block: Fix hangs in synchronous APIs with iothreads
In the block layer, synchronous APIs are often implemented by creating a
coroutine that calls the asynchronous coroutine-based implementation and
then waiting for completion with BDRV_POLL_WHILE().
For this to work with iothreads (more specifically, when the synchronous
API is called in a thread that is not the home thread of the block
device, so that the coroutine will run in a different thread), we must
make sure to call aio_wait_kick() at the end of the operation. Many
places are missing this, so that BDRV_POLL_WHILE() keeps hanging even if
the condition has long become false.
Note that bdrv_dec_in_flight() involves an aio_wait_kick() call. This
corresponds to the BDRV_POLL_WHILE() in the drain functions, but it is
generally not enough for most other operations because they haven't set
the return value in the coroutine entry stub yet. To avoid race
conditions there, we need to kick after setting the return value.
The race window is small enough that the problem doesn't usually surface
in the common path. However, it does surface and causes easily
reproducible hangs if the operation can return early before even calling
bdrv_inc/dec_in_flight, which many of them do (trivial error or no-op
success paths).
The bug in bdrv_truncate(), bdrv_check() and bdrv_invalidate_cache() is
slightly different: These functions even neglected to schedule the
coroutine in the home thread of the node. This avoids the hang, but is
obviously wrong, too. Fix those to schedule the coroutine in the right
AioContext in addition to adding aio_wait_kick() calls.
Cc: qemu-stable@nongnu.org
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
block.c | 6 +-
block/block-backend.c | 5 +
block/io.c | 8 +-
block/nbd-client.c | 1 +
block/nvme.c | 1 +
block/qcow2.c | 1 +
block/qed.c | 1 +
tests/Makefile.include | 2 +
tests/test-block-iothread.c | 372 ++++++++++++++++++++++++++++++++++++
9 files changed, 394 insertions(+), 3 deletions(-)
diff --git a/block.c b/block.c
index 811239ca23..79d48d7d78 100644
--- a/block.c
+++ b/block.c
@@ -3736,6 +3736,7 @@ static void bdrv_check_co_entry(void *opaque)
{
CheckCo *cco = opaque;
cco->ret = bdrv_co_check(cco->bs, cco->res, cco->fix);
+ aio_wait_kick();
}
int bdrv_check(BlockDriverState *bs,
@@ -3754,7 +3755,7 @@ int bdrv_check(BlockDriverState *bs,
bdrv_check_co_entry(&cco);
} else {
co = qemu_coroutine_create(bdrv_check_co_entry, &cco);
- qemu_coroutine_enter(co);
+ bdrv_coroutine_enter(bs, co);
BDRV_POLL_WHILE(bs, cco.ret == -EINPROGRESS);
}
@@ -4571,6 +4572,7 @@ static void coroutine_fn bdrv_invalidate_cache_co_entry(void *opaque)
InvalidateCacheCo *ico = opaque;
bdrv_co_invalidate_cache(ico->bs, ico->errp);
ico->done = true;
+ aio_wait_kick();
}
void bdrv_invalidate_cache(BlockDriverState *bs, Error **errp)
@@ -4587,7 +4589,7 @@ void bdrv_invalidate_cache(BlockDriverState *bs, Error **errp)
bdrv_invalidate_cache_co_entry(&ico);
} else {
co = qemu_coroutine_create(bdrv_invalidate_cache_co_entry, &ico);
- qemu_coroutine_enter(co);
+ bdrv_coroutine_enter(bs, co);
BDRV_POLL_WHILE(bs, !ico.done);
}
}
diff --git a/block/block-backend.c b/block/block-backend.c
index 1d41622942..35e3edb861 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -1223,6 +1223,7 @@ static void blk_read_entry(void *opaque)
rwco->ret = blk_co_preadv(rwco->blk, rwco->offset, qiov->size,
qiov, rwco->flags);
+ aio_wait_kick();
}
static void blk_write_entry(void *opaque)
@@ -1232,6 +1233,7 @@ static void blk_write_entry(void *opaque)
rwco->ret = blk_co_pwritev(rwco->blk, rwco->offset, qiov->size,
qiov, rwco->flags);
+ aio_wait_kick();
}
static int blk_prw(BlockBackend *blk, int64_t offset, uint8_t *buf,
@@ -1543,6 +1545,7 @@ static void blk_ioctl_entry(void *opaque)
rwco->ret = blk_co_ioctl(rwco->blk, rwco->offset,
qiov->iov[0].iov_base);
+ aio_wait_kick();
}
int blk_ioctl(BlockBackend *blk, unsigned long int req, void *buf)
@@ -1589,6 +1592,7 @@ static void blk_flush_entry(void *opaque)
{
BlkRwCo *rwco = opaque;
rwco->ret = blk_co_flush(rwco->blk);
+ aio_wait_kick();
}
int blk_flush(BlockBackend *blk)
@@ -2028,6 +2032,7 @@ static void blk_pdiscard_entry(void *opaque)
QEMUIOVector *qiov = rwco->iobuf;
rwco->ret = blk_co_pdiscard(rwco->blk, rwco->offset, qiov->size);
+ aio_wait_kick();
}
int blk_pdiscard(BlockBackend *blk, int64_t offset, int bytes)
diff --git a/block/io.c b/block/io.c
index bd9d688f8b..213ca03d8d 100644
--- a/block/io.c
+++ b/block/io.c
@@ -806,6 +806,7 @@ static void coroutine_fn bdrv_rw_co_entry(void *opaque)
rwco->qiov->size, rwco->qiov,
rwco->flags);
}
+ aio_wait_kick();
}
/*
@@ -2279,6 +2280,7 @@ static void coroutine_fn bdrv_block_status_above_co_entry(void *opaque)
data->offset, data->bytes,
data->pnum, data->map, data->file);
data->done = true;
+ aio_wait_kick();
}
/*
@@ -2438,6 +2440,7 @@ static void coroutine_fn bdrv_co_rw_vmstate_entry(void *opaque)
{
BdrvVmstateCo *co = opaque;
co->ret = bdrv_co_rw_vmstate(co->bs, co->qiov, co->pos, co->is_read);
+ aio_wait_kick();
}
static inline int
@@ -2559,6 +2562,7 @@ static void coroutine_fn bdrv_flush_co_entry(void *opaque)
FlushCo *rwco = opaque;
rwco->ret = bdrv_co_flush(rwco->bs);
+ aio_wait_kick();
}
int coroutine_fn bdrv_co_flush(BlockDriverState *bs)
@@ -2704,6 +2708,7 @@ static void coroutine_fn bdrv_pdiscard_co_entry(void *opaque)
DiscardCo *rwco = opaque;
rwco->ret = bdrv_co_pdiscard(rwco->child, rwco->offset, rwco->bytes);
+ aio_wait_kick();
}
int coroutine_fn bdrv_co_pdiscard(BdrvChild *child, int64_t offset, int bytes)
@@ -3217,6 +3222,7 @@ static void coroutine_fn bdrv_truncate_co_entry(void *opaque)
TruncateCo *tco = opaque;
tco->ret = bdrv_co_truncate(tco->child, tco->offset, tco->prealloc,
tco->errp);
+ aio_wait_kick();
}
int bdrv_truncate(BdrvChild *child, int64_t offset, PreallocMode prealloc,
@@ -3236,7 +3242,7 @@ int bdrv_truncate(BdrvChild *child, int64_t offset, PreallocMode prealloc,
bdrv_truncate_co_entry(&tco);
} else {
co = qemu_coroutine_create(bdrv_truncate_co_entry, &tco);
- qemu_coroutine_enter(co);
+ bdrv_coroutine_enter(child->bs, co);
BDRV_POLL_WHILE(child->bs, tco.ret == NOT_DONE);
}
diff --git a/block/nbd-client.c b/block/nbd-client.c
index fc5b7eda8e..a6b5605c0b 100644
--- a/block/nbd-client.c
+++ b/block/nbd-client.c
@@ -116,6 +116,7 @@ static coroutine_fn void nbd_read_reply_entry(void *opaque)
s->quit = true;
nbd_recv_coroutines_wake_all(s);
s->read_reply_co = NULL;
+ aio_wait_kick();
}
static int nbd_co_send_request(BlockDriverState *bs,
diff --git a/block/nvme.c b/block/nvme.c
index 29294038fc..36779fdd3d 100644
--- a/block/nvme.c
+++ b/block/nvme.c
@@ -390,6 +390,7 @@ static void nvme_cmd_sync_cb(void *opaque, int ret)
{
int *pret = opaque;
*pret = ret;
+ aio_wait_kick();
}
static int nvme_cmd_sync(BlockDriverState *bs, NVMeQueuePair *q,
diff --git a/block/qcow2.c b/block/qcow2.c
index 991d6ac91b..9334414513 100644
--- a/block/qcow2.c
+++ b/block/qcow2.c
@@ -1665,6 +1665,7 @@ static int qcow2_open(BlockDriverState *bs, QDict *options, int flags,
/* From bdrv_co_create. */
qcow2_open_entry(&qoc);
} else {
+ assert(qemu_get_current_aio_context() == qemu_get_aio_context());
qemu_coroutine_enter(qemu_coroutine_create(qcow2_open_entry, &qoc));
BDRV_POLL_WHILE(bs, qoc.ret == -EINPROGRESS);
}
diff --git a/block/qed.c b/block/qed.c
index 9377c0b7ad..1280870024 100644
--- a/block/qed.c
+++ b/block/qed.c
@@ -559,6 +559,7 @@ static int bdrv_qed_open(BlockDriverState *bs, QDict *options, int flags,
if (qemu_in_coroutine()) {
bdrv_qed_open_entry(&qoc);
} else {
+ assert(qemu_get_current_aio_context() == qemu_get_aio_context());
qemu_coroutine_enter(qemu_coroutine_create(bdrv_qed_open_entry, &qoc));
BDRV_POLL_WHILE(bs, qoc.ret == -EINPROGRESS);
}
diff --git a/tests/Makefile.include b/tests/Makefile.include
index d6f67eed85..5682e41384 100644
--- a/tests/Makefile.include
+++ b/tests/Makefile.include
@@ -70,6 +70,7 @@ check-unit-y += tests/test-bdrv-drain$(EXESUF)
check-unit-y += tests/test-blockjob$(EXESUF)
check-unit-y += tests/test-blockjob-txn$(EXESUF)
check-unit-y += tests/test-block-backend$(EXESUF)
+check-unit-y += tests/test-block-iothread$(EXESUF)
check-unit-y += tests/test-image-locking$(EXESUF)
check-unit-y += tests/test-x86-cpuid$(EXESUF)
# all code tested by test-x86-cpuid is inside topology.h
@@ -541,6 +542,7 @@ tests/test-bdrv-drain$(EXESUF): tests/test-bdrv-drain.o $(test-block-obj-y) $(te
tests/test-blockjob$(EXESUF): tests/test-blockjob.o $(test-block-obj-y) $(test-util-obj-y)
tests/test-blockjob-txn$(EXESUF): tests/test-blockjob-txn.o $(test-block-obj-y) $(test-util-obj-y)
tests/test-block-backend$(EXESUF): tests/test-block-backend.o $(test-block-obj-y) $(test-util-obj-y)
+tests/test-block-iothread$(EXESUF): tests/test-block-iothread.o $(test-block-obj-y) $(test-util-obj-y)
tests/test-image-locking$(EXESUF): tests/test-image-locking.o $(test-block-obj-y) $(test-util-obj-y)
tests/test-thread-pool$(EXESUF): tests/test-thread-pool.o $(test-block-obj-y)
tests/test-iov$(EXESUF): tests/test-iov.o $(test-util-obj-y)
diff --git a/tests/test-block-iothread.c b/tests/test-block-iothread.c
new file mode 100644
index 0000000000..97ac0b159d
--- /dev/null
+++ b/tests/test-block-iothread.c
@@ -0,0 +1,372 @@
+/*
+ * Block tests for iothreads
+ *
+ * Copyright (c) 2018 Kevin Wolf <kwolf@redhat.com>
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
+ * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#include "qemu/osdep.h"
+#include "block/block.h"
+#include "block/blockjob_int.h"
+#include "sysemu/block-backend.h"
+#include "qapi/error.h"
+#include "iothread.h"
+
+static int coroutine_fn bdrv_test_co_prwv(BlockDriverState *bs,
+ uint64_t offset, uint64_t bytes,
+ QEMUIOVector *qiov, int flags)
+{
+ return 0;
+}
+
+static int coroutine_fn bdrv_test_co_pdiscard(BlockDriverState *bs,
+ int64_t offset, int bytes)
+{
+ return 0;
+}
+
+static int coroutine_fn
+bdrv_test_co_truncate(BlockDriverState *bs, int64_t offset,
+ PreallocMode prealloc, Error **errp)
+{
+ return 0;
+}
+
+static int coroutine_fn bdrv_test_co_block_status(BlockDriverState *bs,
+ bool want_zero,
+ int64_t offset, int64_t count,
+ int64_t *pnum, int64_t *map,
+ BlockDriverState **file)
+{
+ *pnum = count;
+ return 0;
+}
+
+static BlockDriver bdrv_test = {
+ .format_name = "test",
+ .instance_size = 1,
+
+ .bdrv_co_preadv = bdrv_test_co_prwv,
+ .bdrv_co_pwritev = bdrv_test_co_prwv,
+ .bdrv_co_pdiscard = bdrv_test_co_pdiscard,
+ .bdrv_co_truncate = bdrv_test_co_truncate,
+ .bdrv_co_block_status = bdrv_test_co_block_status,
+};
+
+static void test_sync_op_pread(BdrvChild *c)
+{
+ uint8_t buf[512];
+ int ret;
+
+ /* Success */
+ ret = bdrv_pread(c, 0, buf, sizeof(buf));
+ g_assert_cmpint(ret, ==, 512);
+
+ /* Early error: Negative offset */
+ ret = bdrv_pread(c, -2, buf, sizeof(buf));
+ g_assert_cmpint(ret, ==, -EIO);
+}
+
+static void test_sync_op_pwrite(BdrvChild *c)
+{
+ uint8_t buf[512];
+ int ret;
+
+ /* Success */
+ ret = bdrv_pwrite(c, 0, buf, sizeof(buf));
+ g_assert_cmpint(ret, ==, 512);
+
+ /* Early error: Negative offset */
+ ret = bdrv_pwrite(c, -2, buf, sizeof(buf));
+ g_assert_cmpint(ret, ==, -EIO);
+}
+
+static void test_sync_op_blk_pread(BlockBackend *blk)
+{
+ uint8_t buf[512];
+ int ret;
+
+ /* Success */
+ ret = blk_pread(blk, 0, buf, sizeof(buf));
+ g_assert_cmpint(ret, ==, 512);
+
+ /* Early error: Negative offset */
+ ret = blk_pread(blk, -2, buf, sizeof(buf));
+ g_assert_cmpint(ret, ==, -EIO);
+}
+
+static void test_sync_op_blk_pwrite(BlockBackend *blk)
+{
+ uint8_t buf[512];
+ int ret;
+
+ /* Success */
+ ret = blk_pwrite(blk, 0, buf, sizeof(buf), 0);
+ g_assert_cmpint(ret, ==, 512);
+
+ /* Early error: Negative offset */
+ ret = blk_pwrite(blk, -2, buf, sizeof(buf), 0);
+ g_assert_cmpint(ret, ==, -EIO);
+}
+
+static void test_sync_op_load_vmstate(BdrvChild *c)
+{
+ uint8_t buf[512];
+ int ret;
+
+ /* Error: Driver does not support snapshots */
+ ret = bdrv_load_vmstate(c->bs, buf, 0, sizeof(buf));
+ g_assert_cmpint(ret, ==, -ENOTSUP);
+}
+
+static void test_sync_op_save_vmstate(BdrvChild *c)
+{
+ uint8_t buf[512];
+ int ret;
+
+ /* Error: Driver does not support snapshots */
+ ret = bdrv_save_vmstate(c->bs, buf, 0, sizeof(buf));
+ g_assert_cmpint(ret, ==, -ENOTSUP);
+}
+
+static void test_sync_op_pdiscard(BdrvChild *c)
+{
+ int ret;
+
+ /* Normal success path */
+ c->bs->open_flags |= BDRV_O_UNMAP;
+ ret = bdrv_pdiscard(c, 0, 512);
+ g_assert_cmpint(ret, ==, 0);
+
+ /* Early success: UNMAP not supported */
+ c->bs->open_flags &= ~BDRV_O_UNMAP;
+ ret = bdrv_pdiscard(c, 0, 512);
+ g_assert_cmpint(ret, ==, 0);
+
+ /* Early error: Negative offset */
+ ret = bdrv_pdiscard(c, -2, 512);
+ g_assert_cmpint(ret, ==, -EIO);
+}
+
+static void test_sync_op_blk_pdiscard(BlockBackend *blk)
+{
+ int ret;
+
+ /* Early success: UNMAP not supported */
+ ret = blk_pdiscard(blk, 0, 512);
+ g_assert_cmpint(ret, ==, 0);
+
+ /* Early error: Negative offset */
+ ret = blk_pdiscard(blk, -2, 512);
+ g_assert_cmpint(ret, ==, -EIO);
+}
+
+static void test_sync_op_truncate(BdrvChild *c)
+{
+ int ret;
+
+ /* Normal success path */
+ ret = bdrv_truncate(c, 65536, PREALLOC_MODE_OFF, NULL);
+ g_assert_cmpint(ret, ==, 0);
+
+ /* Early error: Negative offset */
+ ret = bdrv_truncate(c, -2, PREALLOC_MODE_OFF, NULL);
+ g_assert_cmpint(ret, ==, -EINVAL);
+
+ /* Error: Read-only image */
+ c->bs->read_only = true;
+ c->bs->open_flags &= ~BDRV_O_RDWR;
+
+ ret = bdrv_truncate(c, 65536, PREALLOC_MODE_OFF, NULL);
+ g_assert_cmpint(ret, ==, -EACCES);
+
+ c->bs->read_only = false;
+ c->bs->open_flags |= BDRV_O_RDWR;
+}
+
+static void test_sync_op_block_status(BdrvChild *c)
+{
+ int ret;
+ int64_t n;
+
+ /* Normal success path */
+ ret = bdrv_is_allocated(c->bs, 0, 65536, &n);
+ g_assert_cmpint(ret, ==, 0);
+
+ /* Early success: No driver support */
+ bdrv_test.bdrv_co_block_status = NULL;
+ ret = bdrv_is_allocated(c->bs, 0, 65536, &n);
+ g_assert_cmpint(ret, ==, 1);
+
+ /* Early success: bytes = 0 */
+ ret = bdrv_is_allocated(c->bs, 0, 0, &n);
+ g_assert_cmpint(ret, ==, 0);
+
+ /* Early success: Offset > image size*/
+ ret = bdrv_is_allocated(c->bs, 0x1000000, 0x1000000, &n);
+ g_assert_cmpint(ret, ==, 0);
+}
+
+static void test_sync_op_flush(BdrvChild *c)
+{
+ int ret;
+
+ /* Normal success path */
+ ret = bdrv_flush(c->bs);
+ g_assert_cmpint(ret, ==, 0);
+
+ /* Early success: Read-only image */
+ c->bs->read_only = true;
+ c->bs->open_flags &= ~BDRV_O_RDWR;
+
+ ret = bdrv_flush(c->bs);
+ g_assert_cmpint(ret, ==, 0);
+
+ c->bs->read_only = false;
+ c->bs->open_flags |= BDRV_O_RDWR;
+}
+
+static void test_sync_op_blk_flush(BlockBackend *blk)
+{
+ BlockDriverState *bs = blk_bs(blk);
+ int ret;
+
+ /* Normal success path */
+ ret = blk_flush(blk);
+ g_assert_cmpint(ret, ==, 0);
+
+ /* Early success: Read-only image */
+ bs->read_only = true;
+ bs->open_flags &= ~BDRV_O_RDWR;
+
+ ret = blk_flush(blk);
+ g_assert_cmpint(ret, ==, 0);
+
+ bs->read_only = false;
+ bs->open_flags |= BDRV_O_RDWR;
+}
+
+static void test_sync_op_check(BdrvChild *c)
+{
+ BdrvCheckResult result;
+ int ret;
+
+ /* Error: Driver does not implement check */
+ ret = bdrv_check(c->bs, &result, 0);
+ g_assert_cmpint(ret, ==, -ENOTSUP);
+}
+
+static void test_sync_op_invalidate_cache(BdrvChild *c)
+{
+ /* Early success: Image is not inactive */
+ bdrv_invalidate_cache(c->bs, NULL);
+}
+
+
+typedef struct SyncOpTest {
+ const char *name;
+ void (*fn)(BdrvChild *c);
+ void (*blkfn)(BlockBackend *blk);
+} SyncOpTest;
+
+const SyncOpTest sync_op_tests[] = {
+ {
+ .name = "/sync-op/pread",
+ .fn = test_sync_op_pread,
+ .blkfn = test_sync_op_blk_pread,
+ }, {
+ .name = "/sync-op/pwrite",
+ .fn = test_sync_op_pwrite,
+ .blkfn = test_sync_op_blk_pwrite,
+ }, {
+ .name = "/sync-op/load_vmstate",
+ .fn = test_sync_op_load_vmstate,
+ }, {
+ .name = "/sync-op/save_vmstate",
+ .fn = test_sync_op_save_vmstate,
+ }, {
+ .name = "/sync-op/pdiscard",
+ .fn = test_sync_op_pdiscard,
+ .blkfn = test_sync_op_blk_pdiscard,
+ }, {
+ .name = "/sync-op/truncate",
+ .fn = test_sync_op_truncate,
+ }, {
+ .name = "/sync-op/block_status",
+ .fn = test_sync_op_block_status,
+ }, {
+ .name = "/sync-op/flush",
+ .fn = test_sync_op_flush,
+ .blkfn = test_sync_op_blk_flush,
+ }, {
+ .name = "/sync-op/check",
+ .fn = test_sync_op_check,
+ }, {
+ .name = "/sync-op/invalidate_cache",
+ .fn = test_sync_op_invalidate_cache,
+ },
+};
+
+/* Test synchronous operations that run in a different iothread, so we have to
+ * poll for the coroutine there to return. */
+static void test_sync_op(const void *opaque)
+{
+ const SyncOpTest *t = opaque;
+ IOThread *iothread = iothread_new();
+ AioContext *ctx = iothread_get_aio_context(iothread);
+ BlockBackend *blk;
+ BlockDriverState *bs;
+ BdrvChild *c;
+
+ blk = blk_new(BLK_PERM_ALL, BLK_PERM_ALL);
+ bs = bdrv_new_open_driver(&bdrv_test, "base", BDRV_O_RDWR, &error_abort);
+ bs->total_sectors = 65536 / BDRV_SECTOR_SIZE;
+ blk_insert_bs(blk, bs, &error_abort);
+ c = QLIST_FIRST(&bs->parents);
+
+ blk_set_aio_context(blk, ctx);
+ aio_context_acquire(ctx);
+ t->fn(c);
+ if (t->blkfn) {
+ t->blkfn(blk);
+ }
+ aio_context_release(ctx);
+ blk_set_aio_context(blk, qemu_get_aio_context());
+
+ bdrv_unref(bs);
+ blk_unref(blk);
+}
+
+int main(int argc, char **argv)
+{
+ int i;
+
+ bdrv_init();
+ qemu_init_main_loop(&error_abort);
+
+ g_test_init(&argc, &argv, NULL);
+
+ for (i = 0; i < ARRAY_SIZE(sync_op_tests); i++) {
+ const SyncOpTest *t = &sync_op_tests[i];
+ g_test_add_data_func(t->name, t, test_sync_op);
+ }
+
+ return g_test_run();
+}

View File

@ -1,68 +0,0 @@
From: Peter Maydell <peter.maydell@linaro.org>
Date: Tue, 8 Jan 2019 18:49:00 +0000
Subject: linux-user: make pwrite64/pread64(fd, NULL, 0, offset) return 0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Linux returns success if pwrite64() or pread64() are called with a
zero length NULL buffer, but QEMU was returning -TARGET_EFAULT.
This is the same bug that we fixed in commit 58cfa6c2e6eb51b23cc9
for the write syscall, and long before that in 38d840e6790c29f59
for the read syscall.
Fixes: https://bugs.launchpad.net/qemu/+bug/1810433
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190108184900.9654-1-peter.maydell@linaro.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
(cherry picked from commit 2bd3f8998e1e7dcd9afc29fab252fb9936f9e956)
[LY: BSC#1121600]
Signed-off-by: Liang Yan <lyan@suse.com>
---
linux-user/syscall.c | 22 ++++++++++++++++++----
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index d978c67d6b..4d3b98c6f7 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -9723,8 +9723,15 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_ulong arg1,
arg4 = arg5;
arg5 = arg6;
}
- if (!(p = lock_user(VERIFY_WRITE, arg2, arg3, 0)))
- return -TARGET_EFAULT;
+ if (arg2 == 0 && arg3 == 0) {
+ /* Special-case NULL buffer and zero length, which should succeed */
+ p = 0;
+ } else {
+ p = lock_user(VERIFY_WRITE, arg2, arg3, 0);
+ if (!p) {
+ return -TARGET_EFAULT;
+ }
+ }
ret = get_errno(pread64(arg1, p, arg3, target_offset64(arg4, arg5)));
unlock_user(p, arg2, ret);
return ret;
@@ -9733,8 +9740,15 @@ static abi_long do_syscall1(void *cpu_env, int num, abi_ulong arg1,
arg4 = arg5;
arg5 = arg6;
}
- if (!(p = lock_user(VERIFY_READ, arg2, arg3, 1)))
- return -TARGET_EFAULT;
+ if (arg2 == 0 && arg3 == 0) {
+ /* Special-case NULL buffer and zero length, which should succeed */
+ p = 0;
+ } else {
+ p = lock_user(VERIFY_READ, arg2, arg3, 1);
+ if (!p) {
+ return -TARGET_EFAULT;
+ }
+ }
ret = get_errno(pwrite64(arg1, p, arg3, target_offset64(arg4, arg5)));
unlock_user(p, arg2, 0);
return ret;

View File

@ -1,31 +0,0 @@
From: Bruce Rogers <brogers@suse.com>
Date: Thu, 17 Jan 2019 14:40:10 -0700
Subject: xen: Add xen v4.12 based xc_domain_create call
In xen v4.12, the xc_domain_create call parameters changed.
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
include/hw/xen/xen_common.h | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/include/hw/xen/xen_common.h b/include/hw/xen/xen_common.h
index 93f631e5bf..42b088ae90 100644
--- a/include/hw/xen/xen_common.h
+++ b/include/hw/xen/xen_common.h
@@ -674,7 +674,15 @@ static inline int xen_domain_create(xc_interface *xc, uint32_t ssidref,
xen_domain_handle_t handle, uint32_t flags,
uint32_t *pdomid)
{
+#if CONFIG_XEN_CTRL_INTERFACE_VERSION < 41200
return xc_domain_create(xc, ssidref, handle, flags, pdomid, NULL);
+#else
+ struct xen_domctl_createdomain create;
+ create.ssidref = ssidref;
+ memcpy(&(create.handle), handle, sizeof(xen_domain_handle_t));
+ create.flags = flags;
+ return xc_domain_create(xc, pdomid, &create);
+#endif
}
#endif
#endif

View File

@ -1,33 +0,0 @@
From: Prasad J Pandit <pjp@fedoraproject.org>
Date: Sun, 13 Jan 2019 23:29:48 +0530
Subject: slirp: check data length while emulating ident function
While emulating identification protocol, tcp_emu() does not check
available space in the 'sc_rcv->sb_data' buffer. It could lead to
heap buffer overflow issue. Add check to avoid it.
Reported-by: Kira <864786842@qq.com>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
(cherry picked from commit a7104eda7dab99d0cdbd3595c211864cba415905)
[BR: BSC#1123156 CVE-2019-6778, modify patch to use spaces instead of tabs]
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
slirp/tcp_subr.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c
index fa61349cbb..7a23ce738c 100644
--- a/slirp/tcp_subr.c
+++ b/slirp/tcp_subr.c
@@ -635,6 +635,10 @@ tcp_emu(struct socket *so, struct mbuf *m)
socklen_t addrlen = sizeof(struct sockaddr_in);
struct sbuf *so_rcv = &so->so_rcv;
+ if (m->m_len > so_rcv->sb_datalen - (so_rcv->sb_wptr - so_rcv->sb_data)) {
+ return 1;
+ }
+
memcpy(so_rcv->sb_wptr, m->m_data, m->m_len);
so_rcv->sb_wptr += m->m_len;
so_rcv->sb_rptr += m->m_len;

View File

@ -1,40 +0,0 @@
From: Janosch Frank <frankja@linux.ibm.com>
Date: Fri, 11 Jan 2019 12:36:57 +0100
Subject: s390x: Return specification exception for unimplemented diag 308
subcodes
The architecture specifies specification exceptions for all
unavailable subcodes.
The presence of subcodes is indicated by checking some query subcode.
For example 6 will indicate that 3-6 are available. So future systems
might call new subcodes to check for new features. This should not
trigger a hw error, instead we return the architectured specification
exception.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
Cc: qemu-stable@nongnu.org
Message-Id: <20190111113657.66195-3-frankja@linux.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
(cherry picked from commit 37dbd1f4d4805edcd18d94eb202bb3461b3cd52d)
[LY: BSC#1123179]
Signed-off-by: Liang Yan <lyan@suse.com>
---
target/s390x/diag.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/s390x/diag.c b/target/s390x/diag.c
index acb0f3d4af..aafa740f61 100644
--- a/target/s390x/diag.c
+++ b/target/s390x/diag.c
@@ -130,7 +130,7 @@ out:
}
return;
default:
- hw_error("Unhandled diag308 subcode %" PRIx64, subcode);
+ s390_program_interrupt(env, PGM_SPECIFICATION, ILEN_AUTO, ra);
break;
}
}

View File

@ -1,44 +0,0 @@
From: "Singh, Brijesh" <brijesh.singh@amd.com>
Date: Fri, 15 Feb 2019 14:22:21 -0700
Subject: memory: Fix the memory region type assignment order
Currently, a callback registered through the RAMBlock notifier
is not able to get the memory region type (i.e callback is not
able to use memory_region_is_ram_device function). This is
because mr->ram assignment happens _after_ the memory is allocated
whereas the callback is executed during allocation.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1667249
Suggested-by: Alex Williamson <alex.williamson@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
[BSC#1123205]
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
memory.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/memory.c b/memory.c
index d14c6dec1d..d1b68fdae8 100644
--- a/memory.c
+++ b/memory.c
@@ -1605,10 +1605,17 @@ void memory_region_init_ram_device_ptr(MemoryRegion *mr,
uint64_t size,
void *ptr)
{
- memory_region_init_ram_ptr(mr, owner, name, size, ptr);
+ memory_region_init(mr, owner, name, size);
+ mr->ram = true;
+ mr->terminates = true;
mr->ram_device = true;
mr->ops = &ram_device_mem_ops;
mr->opaque = mr;
+ mr->destructor = memory_region_destructor_ram;
+ mr->dirty_log_mask = tcg_enabled() ? (1 << DIRTY_MEMORY_CODE) : 0;
+ /* qemu_ram_alloc_from_ptr cannot fail with ptr != NULL. */
+ assert(ptr != NULL);
+ mr->ram_block = qemu_ram_alloc_from_ptr(size, ptr, mr, &error_fatal);
}
void memory_region_init_alias(MemoryRegion *mr,

View File

@ -1,43 +0,0 @@
From: "Singh, Brijesh" <brijesh.singh@amd.com>
Date: Fri, 15 Feb 2019 14:24:21 -0700
Subject: target/i386: sev: Do not pin the ram device memory region
The RAM device presents a memory region that should be handled
as an IO region and should not be pinned.
In the case of the vfio-pci, RAM device represents a MMIO BAR
and the memory region is not backed by pages hence
KVM_MEMORY_ENCRYPT_REG_REGION fails to lock the memory range.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1667249
Cc: Alex Williamson <alex.williamson@redhat.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Brijesh Singh <brijesh.singh@amd.com>
[BSC#1123205]
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
target/i386/sev.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/target/i386/sev.c b/target/i386/sev.c
index 2395171acf..7d6f4032d6 100644
--- a/target/i386/sev.c
+++ b/target/i386/sev.c
@@ -130,6 +130,17 @@ sev_ram_block_added(RAMBlockNotifier *n, void *host, size_t size)
{
int r;
struct kvm_enc_region range;
+ ram_addr_t offset;
+ MemoryRegion *mr;
+
+ /*
+ * The RAM device presents a memory region that should be treated
+ * as IO region and should not be pinned.
+ */
+ mr = memory_region_from_host(host, &offset);
+ if (mr && memory_region_is_ram_device(mr)) {
+ return;
+ }
range.addr = (__u64)(unsigned long)host;
range.size = size;

View File

@ -1,47 +0,0 @@
From: William Bowling <will@wbowling.info>
Date: Fri, 1 Mar 2019 21:45:56 +0000
Subject: slirp: check sscanf result when emulating ident
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
When emulating ident in tcp_emu, if the strchr checks passed but the
sscanf check failed, two uninitialized variables would be copied and
sent in the reply, so move this code inside the if(sscanf()) clause.
Signed-off-by: William Bowling <will@wbowling.info>
Cc: qemu-stable@nongnu.org
Cc: secalert@redhat.com
Message-Id: <1551476756-25749-1-git-send-email-will@wbowling.info>
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
(cherry picked from commit d3222975c7d6cda9e25809dea05241188457b113)
[BR: BSC#1129622 CVE-2019-9824 To pass our checkpatch check, I changed
the patch to use spaces, not tabs, as in the initially proposed]
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
slirp/tcp_subr.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/slirp/tcp_subr.c b/slirp/tcp_subr.c
index 7a23ce738c..a6fd8626a8 100644
--- a/slirp/tcp_subr.c
+++ b/slirp/tcp_subr.c
@@ -661,12 +661,12 @@ tcp_emu(struct socket *so, struct mbuf *m)
break;
}
}
+ so_rcv->sb_cc = snprintf(so_rcv->sb_data,
+ so_rcv->sb_datalen,
+ "%d,%d\r\n", n1, n2);
+ so_rcv->sb_rptr = so_rcv->sb_data;
+ so_rcv->sb_wptr = so_rcv->sb_data + so_rcv->sb_cc;
}
- so_rcv->sb_cc = snprintf(so_rcv->sb_data,
- so_rcv->sb_datalen,
- "%d,%d\r\n", n1, n2);
- so_rcv->sb_rptr = so_rcv->sb_data;
- so_rcv->sb_wptr = so_rcv->sb_data + so_rcv->sb_cc;
}
m_free(m);
return 0;

View File

@ -1,153 +0,0 @@
From: Prasad J Pandit <pjp@fedoraproject.org>
Date: Mon, 18 Feb 2019 23:43:49 +0530
Subject: ppc: add host-serial and host-model machine attributes
(CVE-2019-8934)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
On ppc hosts, hypervisor shares following system attributes
- /proc/device-tree/system-id
- /proc/device-tree/model
with a guest. This could lead to information leakage and misuse.[*]
Add machine attributes to control such system information exposure
to a guest.
[*] https://wiki.openstack.org/wiki/OSSN/OSSN-0028
Reported-by: Daniel P. Berrangé <berrange@redhat.com>
Fix-suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Prasad J Pandit <pjp@fedoraproject.org>
Message-Id: <20190218181349.23885-1-ppandit@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
(cherry picked from commit 27461d69a0f108dea756419251acc3ea65198f1b)
[BR: BSC#1126455 CVE-2019-03812]
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
hw/ppc/spapr.c | 73 ++++++++++++++++++++++++++++++++++++++----
include/hw/ppc/spapr.h | 2 ++
2 files changed, 69 insertions(+), 6 deletions(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index 7afd1a175b..d3098d520e 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1244,13 +1244,30 @@ static void *spapr_build_fdt(sPAPRMachineState *spapr,
* Add info to guest to indentify which host is it being run on
* and what is the uuid of the guest
*/
- if (kvmppc_get_host_model(&buf)) {
- _FDT(fdt_setprop_string(fdt, 0, "host-model", buf));
- g_free(buf);
+ if (spapr->host_model && !g_str_equal(spapr->host_model, "none")) {
+ if (g_str_equal(spapr->host_model, "passthrough")) {
+ /* -M host-model=passthrough */
+ if (kvmppc_get_host_model(&buf)) {
+ _FDT(fdt_setprop_string(fdt, 0, "host-model", buf));
+ g_free(buf);
+ }
+ } else {
+ /* -M host-model=<user-string> */
+ _FDT(fdt_setprop_string(fdt, 0, "host-model", spapr->host_model));
+ }
}
- if (kvmppc_get_host_serial(&buf)) {
- _FDT(fdt_setprop_string(fdt, 0, "host-serial", buf));
- g_free(buf);
+
+ if (spapr->host_serial && !g_str_equal(spapr->host_serial, "none")) {
+ if (g_str_equal(spapr->host_serial, "passthrough")) {
+ /* -M host-serial=passthrough */
+ if (kvmppc_get_host_serial(&buf)) {
+ _FDT(fdt_setprop_string(fdt, 0, "host-serial", buf));
+ g_free(buf);
+ }
+ } else {
+ /* -M host-serial=<user-string> */
+ _FDT(fdt_setprop_string(fdt, 0, "host-serial", spapr->host_serial));
+ }
}
buf = qemu_uuid_unparse_strdup(&qemu_uuid);
@@ -3031,6 +3048,36 @@ static void spapr_set_vsmt(Object *obj, Visitor *v, const char *name,
visit_type_uint32(v, name, (uint32_t *)opaque, errp);
}
+static char *spapr_get_host_model(Object *obj, Error **errp)
+{
+ sPAPRMachineState *spapr = SPAPR_MACHINE(obj);
+
+ return g_strdup(spapr->host_model);
+}
+
+static void spapr_set_host_model(Object *obj, const char *value, Error **errp)
+{
+ sPAPRMachineState *spapr = SPAPR_MACHINE(obj);
+
+ g_free(spapr->host_model);
+ spapr->host_model = g_strdup(value);
+}
+
+static char *spapr_get_host_serial(Object *obj, Error **errp)
+{
+ sPAPRMachineState *spapr = SPAPR_MACHINE(obj);
+
+ return g_strdup(spapr->host_serial);
+}
+
+static void spapr_set_host_serial(Object *obj, const char *value, Error **errp)
+{
+ sPAPRMachineState *spapr = SPAPR_MACHINE(obj);
+
+ g_free(spapr->host_serial);
+ spapr->host_serial = g_strdup(value);
+}
+
static void spapr_instance_init(Object *obj)
{
sPAPRMachineState *spapr = SPAPR_MACHINE(obj);
@@ -3067,6 +3114,17 @@ static void spapr_instance_init(Object *obj)
" the host's SMT mode", &error_abort);
object_property_add_bool(obj, "vfio-no-msix-emulation",
spapr_get_msix_emulation, NULL, NULL);
+
+ object_property_add_str(obj, "host-model",
+ spapr_get_host_model, spapr_set_host_model,
+ &error_abort);
+ object_property_set_description(obj, "host-model",
+ "Set host's model-id to use - none|passthrough|string", &error_abort);
+ object_property_add_str(obj, "host-serial",
+ spapr_get_host_serial, spapr_set_host_serial,
+ &error_abort);
+ object_property_set_description(obj, "host-serial",
+ "Set host's system-id to use - none|passthrough|string", &error_abort);
}
static void spapr_machine_finalizefn(Object *obj)
@@ -3961,6 +4019,9 @@ static const TypeInfo spapr_machine_info = {
*/
static void spapr_machine_3_1_instance_options(MachineState *machine)
{
+ sPAPRMachineState *spapr = SPAPR_MACHINE(machine);
+ spapr->host_model = g_strdup("passthrough");
+ spapr->host_serial = g_strdup("passthrough");
}
static void spapr_machine_3_1_class_options(MachineClass *mc)
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
index 6279711fe8..63692a13bd 100644
--- a/include/hw/ppc/spapr.h
+++ b/include/hw/ppc/spapr.h
@@ -171,6 +171,8 @@ struct sPAPRMachineState {
/*< public >*/
char *kvm_type;
+ char *host_model;
+ char *host_serial;
const char *icp_type;
int32_t irq_map_nr;

View File

@ -1,32 +0,0 @@
From: Gerd Hoffmann <kraxel@redhat.com>
Date: Tue, 8 Jan 2019 11:23:01 +0100
Subject: i2c-ddc: fix oob read
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Suggested-by: Michael Hanselmann <public@hansmi.ch>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Michael Hanselmann <public@hansmi.ch>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Message-id: 20190108102301.1957-1-kraxel@redhat.com
(cherry picked from commit b05b267840515730dbf6753495d5b7bd8b04ad1c)
[BR: BSC#1125721 CVE-2019-3812]
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
hw/i2c/i2c-ddc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/i2c/i2c-ddc.c b/hw/i2c/i2c-ddc.c
index be34fe072c..0a0367ff38 100644
--- a/hw/i2c/i2c-ddc.c
+++ b/hw/i2c/i2c-ddc.c
@@ -56,7 +56,7 @@ static int i2c_ddc_rx(I2CSlave *i2c)
I2CDDCState *s = I2CDDC(i2c);
int value;
- value = s->edid_blob[s->reg];
+ value = s->edid_blob[s->reg % sizeof(s->edid_blob)];
s->reg++;
return value;
}

View File

@ -1,34 +0,0 @@
From: Peter Maydell <peter.maydell@linaro.org>
Date: Fri, 14 Dec 2018 13:30:52 +0000
Subject: device_tree.c: Don't use load_image()
The load_image() function is deprecated, as it does not let the
caller specify how large the buffer to read the file into is.
Instead use load_image_size().
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20181130151712.2312-9-peter.maydell@linaro.org
(cherry picked from commit da885fe1ee8b4589047484bd7fa05a4905b52b17)
[BR: BSC#1130675 CVE-2018-20815]
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
device_tree.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/device_tree.c b/device_tree.c
index 6d9c9726f6..296278e12a 100644
--- a/device_tree.c
+++ b/device_tree.c
@@ -91,7 +91,7 @@ void *load_device_tree(const char *filename_path, int *sizep)
/* First allocate space in qemu for device tree */
fdt = g_malloc0(dt_size);
- dt_file_load_size = load_image(filename_path, fdt);
+ dt_file_load_size = load_image_size(filename_path, fdt, dt_size);
if (dt_file_load_size < 0) {
error_report("Unable to open device tree file '%s'",
filename_path);

View File

@ -1,167 +0,0 @@
From: David Gibson <david@gibson.dropbear.id.au>
Date: Wed, 27 Mar 2019 13:54:11 +1100
Subject: spapr: Simplify handling of host-serial and host-model values
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
27461d69a0f "ppc: add host-serial and host-model machine attributes
(CVE-2019-8934)" introduced 'host-serial' and 'host-model' machine
properties for spapr to explicitly control the values advertised to the
guest in device tree properties with the same names.
The previous behaviour on KVM was to unconditionally populate the device
tree with the real host serial number and model, which leaks possibly
sensitive information about the host to the guest.
To maintain compatibility for old machine types, we allowed those props
to be set to "passthrough" to take the value from the host as before. Or
they could be set to "none" to explicitly omit the device tree items.
Special casing specific values on what's otherwise a user supplied string
is very ugly. So, this patch simplifies things by implementing the
backwards compatibility in a different way: we have a machine class flag
set for the older machines, and we only load the host values into the
device tree if A) they're not set by the user and B) we have that flag set.
This does mean that the "passthrough" functionality is no longer available
with the current machine type. That's ok though: if a user or management
layer really wants the information passed through they can read it
themselves (OpenStack Nova already does something similar for x86).
It also means the user can't explicitly ask for the values to be omitted
on the old machine types. I think that's an acceptable trade-off: if you
care enough about not leaking the host information you can either move to
the new machine type, or use a dummy value for the properties.
For the new machine type, this also removes an odd inconsistency
between running on a POWER and non-POWER (or non-Linux) hosts: if the
host information couldn't be read from where we expect (in the host's
device tree as exposed by Linux), we'd fallback to omitting the guest
device tree items.
While we're there, improve some poorly worded comments, and the help text
for the properties.
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Tested-by: Greg Kurz <groug@kaod.org>
(cherry picked from commit 0a794529bd1109aeea0c407784b40a2605e808b9)
[BR: BSC#1126455 CVE-2019-03812]
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
hw/ppc/spapr.c | 56 +++++++++++++++---------------------------
include/hw/ppc/spapr.h | 1 +
2 files changed, 21 insertions(+), 36 deletions(-)
diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c
index d3098d520e..b60e1702fc 100644
--- a/hw/ppc/spapr.c
+++ b/hw/ppc/spapr.c
@@ -1240,38 +1240,8 @@ static void *spapr_build_fdt(sPAPRMachineState *spapr,
_FDT(fdt_setprop_string(fdt, 0, "model", "IBM pSeries (emulated by qemu)"));
_FDT(fdt_setprop_string(fdt, 0, "compatible", "qemu,pseries"));
- /*
- * Add info to guest to indentify which host is it being run on
- * and what is the uuid of the guest
- */
- if (spapr->host_model && !g_str_equal(spapr->host_model, "none")) {
- if (g_str_equal(spapr->host_model, "passthrough")) {
- /* -M host-model=passthrough */
- if (kvmppc_get_host_model(&buf)) {
- _FDT(fdt_setprop_string(fdt, 0, "host-model", buf));
- g_free(buf);
- }
- } else {
- /* -M host-model=<user-string> */
- _FDT(fdt_setprop_string(fdt, 0, "host-model", spapr->host_model));
- }
- }
-
- if (spapr->host_serial && !g_str_equal(spapr->host_serial, "none")) {
- if (g_str_equal(spapr->host_serial, "passthrough")) {
- /* -M host-serial=passthrough */
- if (kvmppc_get_host_serial(&buf)) {
- _FDT(fdt_setprop_string(fdt, 0, "host-serial", buf));
- g_free(buf);
- }
- } else {
- /* -M host-serial=<user-string> */
- _FDT(fdt_setprop_string(fdt, 0, "host-serial", spapr->host_serial));
- }
- }
-
+ /* Guest UUID & Name*/
buf = qemu_uuid_unparse_strdup(&qemu_uuid);
-
_FDT(fdt_setprop_string(fdt, 0, "vm,uuid", buf));
if (qemu_uuid_set) {
_FDT(fdt_setprop_string(fdt, 0, "system-id", buf));
@@ -1283,6 +1253,21 @@ static void *spapr_build_fdt(sPAPRMachineState *spapr,
qemu_get_vm_name()));
}
+ /* Host Model & Serial Number */
+ if (spapr->host_model) {
+ _FDT(fdt_setprop_string(fdt, 0, "host-model", spapr->host_model));
+ } else if (smc->broken_host_serial_model && kvmppc_get_host_model(&buf)) {
+ _FDT(fdt_setprop_string(fdt, 0, "host-model", buf));
+ g_free(buf);
+ }
+
+ if (spapr->host_serial) {
+ _FDT(fdt_setprop_string(fdt, 0, "host-serial", spapr->host_serial));
+ } else if (smc->broken_host_serial_model && kvmppc_get_host_serial(&buf)) {
+ _FDT(fdt_setprop_string(fdt, 0, "host-serial", buf));
+ g_free(buf);
+ }
+
_FDT(fdt_setprop_cell(fdt, 0, "#address-cells", 2));
_FDT(fdt_setprop_cell(fdt, 0, "#size-cells", 2));
@@ -3119,12 +3104,12 @@ static void spapr_instance_init(Object *obj)
spapr_get_host_model, spapr_set_host_model,
&error_abort);
object_property_set_description(obj, "host-model",
- "Set host's model-id to use - none|passthrough|string", &error_abort);
+ "Host model to advertise in guest device tree", &error_abort);
object_property_add_str(obj, "host-serial",
spapr_get_host_serial, spapr_set_host_serial,
&error_abort);
object_property_set_description(obj, "host-serial",
- "Set host's system-id to use - none|passthrough|string", &error_abort);
+ "Host serial number to advertise in guest device tree", &error_abort);
}
static void spapr_machine_finalizefn(Object *obj)
@@ -4019,14 +4004,13 @@ static const TypeInfo spapr_machine_info = {
*/
static void spapr_machine_3_1_instance_options(MachineState *machine)
{
- sPAPRMachineState *spapr = SPAPR_MACHINE(machine);
- spapr->host_model = g_strdup("passthrough");
- spapr->host_serial = g_strdup("passthrough");
}
static void spapr_machine_3_1_class_options(MachineClass *mc)
{
/* Defaults for the latest behaviour inherited from the base class */
+ sPAPRMachineClass *smc = SPAPR_MACHINE_CLASS(mc);
+ smc->broken_host_serial_model = true;
}
DEFINE_SPAPR_MACHINE(3_1, "3.1", true);
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
index 63692a13bd..d3142e0d26 100644
--- a/include/hw/ppc/spapr.h
+++ b/include/hw/ppc/spapr.h
@@ -105,6 +105,7 @@ struct sPAPRMachineClass {
bool use_ohci_by_default; /* use USB-OHCI instead of XHCI */
bool pre_2_10_has_unused_icps;
bool legacy_irq_allocation;
+ bool broken_host_serial_model; /* present real host info to the guest */
void (*phb_placement)(sPAPRMachineState *spapr, uint32_t index,
uint64_t *buid, hwaddr *pio,

View File

@ -25,23 +25,11 @@
</hardware>
</overwrite>
<!-- Excluding ARM, qemu-testsuite needs more than the default memory -->
<overwrite>
<conditions>
<arch>ppc64</arch>
<arch>ppc64le</arch>
<package>qemu-testsuite</package>
</conditions>
<hardware>
<memory>
<size unit="M">4000</size>
</memory>
</hardware>
</overwrite>
<!-- And x86 needs even more, as certain tests are x86 only -->
<overwrite>
<conditions>
<arch>i586</arch>
<arch>x86_64</arch>
<arch>ppc64le</arch>
<package>qemu-testsuite</package>
</conditions>
<hardware>
@ -50,4 +38,16 @@
</memory>
</hardware>
</overwrite>
<!-- And for some reason ppc64 needs even more -->
<overwrite>
<conditions>
<arch>ppc64</arch>
<package>qemu-testsuite</package>
</conditions>
<hardware>
<memory>
<size unit="M">4800</size>
</memory>
</hardware>
</overwrite>
</constraints>

View File

@ -13,8 +13,8 @@ default build considers warnings to be errors, needs to be disabled.
Signed-off-by: Bruce Rogers <brogers@suse.com>
--- a/src/Makefile.housekeeping
+++ b/src/Makefile.housekeeping
@@ -179,6 +179,19 @@ WNA_FLAGS := $(shell $(WNA_TEST) && $(EC
WORKAROUND_CFLAGS += $(WNA_FLAGS)
@@ -187,6 +187,19 @@ WNST_FLAGS := $(shell $(WNST_TEST) && $(
WORKAROUND_CFLAGS += $(WNST_FLAGS)
endif
+# GCC 9.0 introduces a new warning for using pointers to packed

View File

@ -0,0 +1,37 @@
From 16a934b5fc715cd0f213390c88df0b4ec73d85f1 Mon Sep 17 00:00:00 2001
From: Bruce Rogers <brogers@suse.com>
Date: Mon, 25 Feb 2019 15:21:06 -0700
Subject: [PATCH] efi: Avoid string op warning with cross gcc 7 compile
When we started cross compiling using the gcc7 arm compiler, the
a string op warning popped up that isn't addressed by the mechanism
already in place. Add a kludge to address it.
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
src/util/elf2efi.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/util/elf2efi.c b/src/util/elf2efi.c
index 2c5b9df8..7d1cf03f 100644
--- a/src/util/elf2efi.c
+++ b/src/util/elf2efi.c
@@ -494,7 +494,14 @@ static struct pe_section * process_section ( struct elf_file *elf,
memset ( new, 0, sizeof ( *new ) + section_filesz );
/* Fill in section header details */
- strncpy ( ( char * ) new->hdr.Name, name, sizeof ( new->hdr.Name ) );
+ /*
+ * The arm cross gcc 7 compiler warns about string problem here. Avoid
+ * it by doing operation in two stages
+ */
+ strncpy ( ( char * ) new->hdr.Name, name, sizeof ( new->hdr.Name ) -1 );
+ if (strlen(name) == sizeof( new->hdr.Name ) -1 ) {
+ *(( char * ) new->hdr.Name + sizeof( new->hdr.Name ) -1) = '\0';
+ }
new->hdr.Misc.VirtualSize = section_memsz;
new->hdr.VirtualAddress = shdr->sh_addr;
new->hdr.SizeOfRawData = section_filesz;
--
2.20.1

View File

@ -1,43 +0,0 @@
From cd6ca646c12371f0146d43ea5a6b7574342c2a7f Mon Sep 17 00:00:00 2001
From: Bruce Rogers <brogers@suse.com>
Date: Wed, 25 Apr 2018 10:26:28 -0600
Subject: [PATCH] [efi] guard strncpy with gcc warning ignore pragma
Using gcc 8 with the -Wstringop-truncation option, and with warnings
treated as errors, the following error is emitted:
util/elf2efi.c:494:2: error: 'strncpy' specified bound 8 equals destination
size [-Werror=stringop-truncation]
strncpy ( ( char * ) new->hdr.Name, name, sizeof ( new->hdr.Name ) );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Use gcc pragmas surrounding this line of code which avoid this warning. The
strncpy usage here is correct.
[BR: BSC#1090355]
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
src/util/elf2efi.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/util/elf2efi.c b/src/util/elf2efi.c
index 6718df77..93cdda03 100644
--- a/src/util/elf2efi.c
+++ b/src/util/elf2efi.c
@@ -494,7 +494,13 @@ static struct pe_section * process_section ( struct elf_file *elf,
memset ( new, 0, sizeof ( *new ) + section_filesz );
/* Fill in section header details */
+/* gcc 8 warning gives false positive here - our usage is correct */
+#pragma GCC diagnostic push
+#if __GNUC__ >= 8
+#pragma GCC diagnostic ignored "-Wstringop-truncation"
+#endif
strncpy ( ( char * ) new->hdr.Name, name, sizeof ( new->hdr.Name ) );
+#pragma GCC diagnostic pop
new->hdr.Misc.VirtualSize = section_memsz;
new->hdr.VirtualAddress = shdr->sh_addr;
new->hdr.SizeOfRawData = section_filesz;
--
2.16.3

View File

@ -1,21 +0,0 @@
Newer binutils (>= 2.31) will emit PLT32 relocs for call/jmp
instructions on x86_64 in some cases, instead of PC32 relocs
as before. This can only be done because on x86-64 the PLT
doesn't need any special setup, and in turn this means that
for post-processing/after-link purposes PLT32 and PC32 relocs
can be handled the same. elf2efi simply ignores all PC-relative
relocs (as the code is already fully final for them) and PLT32
is one of them, so add it to the list.
(Otherwise an "Unrecognized relocation type 4" error occurs
when building some of the EFI images for IPXE).
--- a/src/util/elf2efi.c.mm 2018-07-25 12:19:10.647661846 +0000
+++ b/src/util/elf2efi.c 2018-07-25 13:18:18.609633494 +0000
@@ -637,6 +637,7 @@ static void process_reloc ( struct elf_f
case ELF_MREL ( EM_ARM, R_ARM_THM_PC22 ) :
case ELF_MREL ( EM_ARM, R_ARM_THM_JUMP24 ) :
case ELF_MREL ( EM_X86_64, R_X86_64_PC32 ) :
+ case ELF_MREL ( EM_X86_64, R_X86_64_PLT32 ) :
case ELF_MREL ( EM_AARCH64, R_AARCH64_CALL26 ) :
case ELF_MREL ( EM_AARCH64, R_AARCH64_JUMP26 ) :
case ELF_MREL ( EM_AARCH64, R_AARCH64_ADR_PREL_LO21 ) :

View File

@ -9,9 +9,22 @@ to find enough opportunities in the ipxe code and data to reduce
its size, and found that using a more recent compiler would be the
best solution to keeping the rom size within the 64K size limit.
I also discovered that $(WORKAROUND_CFLAGS) is specific to CC, but
gets used with HOST_CC, so we'd better keep those the same version
to not get in trouble with different supported options.
Signed-off-by: Bruce Rogers <brogers@suse.com>
--- a/src/Makefile
+++ b/src/Makefile
@@ -15,7 +15,7 @@ CROSS_COMPILE ?= $(CROSS)
#
# Locations of tools
#
-HOST_CC := gcc
+HOST_CC := gcc-6
RM := rm -f
TOUCH := touch
MKDIR := mkdir
@@ -24,7 +24,7 @@ ECHO := echo
PRINTF := printf
PERL := perl

View File

@ -6,8 +6,8 @@ ConditionVirtualization=no
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/bash -c "/bin/echo 1 > /sys/kernel/mm/ksm/run"
ExecStop=/bin/bash -c "/bin/echo 0 > /sys/kernel/mm/ksm/run"
ExecStart=/bin/echo 1 > /sys/kernel/mm/ksm/run
ExecStop=/bin/echo 0 > /sys/kernel/mm/ksm/run
[Install]
WantedBy=multi-user.target

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6a0508df079a0a33c2487ca936a56c12122f105b8a96a44374704bef6c69abfc
size 36070104

Binary file not shown.

3
qemu-4.0.0.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:13a93dfe75b86734326f8d5b475fde82ec692d5b5a338b4262aeeb6b0fa4e469
size 55628624

BIN
qemu-4.0.0.tar.xz.sig Normal file

Binary file not shown.

View File

@ -1,3 +1,125 @@
-------------------------------------------------------------------
Mon May 6 21:36:25 UTC 2019 - Bruce Rogers <brogers@suse.com>
- Disable LTO as suggested by Martin Liska (boo#1133281)
- Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-4.0
* Patches added:
0036-util-qemu-sockets-Fix-GCC-9-build-w.patch
0037-hw-usb-hcd-xhci-Fix-GCC-9-build-war.patch
0038-hw-usb-dev-mtp-Fix-GCC-9-build-warn.patch
0039-linux-user-uname-Fix-GCC-9-build-wa.patch
0040-linux-user-elfload-Fix-GCC-9-build-.patch
0041-qxl-fix-Waddress-of-packed-member.patch
-------------------------------------------------------------------
Wed May 1 19:29:22 UTC 2019 - Bruce Rogers <brogers@suse.com>
- Update to v4.0.0: See http://wiki.qemu.org/ChangeLog/4.0
Take note that ongoing feature deprecation is tracked at both
http://wiki.qemu-project.org/Features/LegacyRemoval and in
Appendix B of the qemu-doc.* files installed with the qemu package
Some noteworthy changes relevant to qemu-linux-user package:
* TCG:
- SoftFloat acceleration - where it is safe to do so, the softfloat
helpers will use host floating-point instructions yielding
significant performance increases
- Dynamic sizing of software TLBs, yielding noticable performance
increases
- Host support for 64-bit RISC-V.
* User-mode emulation:
- The docker.py script now checks the path and persistence status
of binfmt_misc entries when installing and updating user-mode
docker containers
- Made these package building changes:
* Removed this token from spec file: #!BuildIgnore: gcc-PIE
* Created ability to build qemu source out-of-tree
* Patches dropped (upstream unless otherwise noted):
0010-Remove-problematic-evdev-86-key-fro.patch
0025-Fix-tigervnc-long-press-issue.patch
0026-string-input-visitor-Fix-uint64-par.patch
0027-test-string-input-visitor-Add-int-t.patch
0028-test-string-input-visitor-Add-uint6.patch
0029-tests-Add-QOM-property-unit-tests.patch
0030-tests-Add-scsi-disk-test.patch
0033-smbios-Add-1-terminator-if-any-stri.patch (different approach used)
0034-qemu-io-tests-comment-out-problemat.patch (not as needed)
0039-xen_disk-Avoid-repeated-memory-allo.patch
0041-vfio-ap-flag-as-compatible-with-bal.patch
0042-hw-s390x-Fix-bad-mask-in-time2tod.patch
0043-pcie-set-link-state-inactive-active.patch
0044-pc-piix4-Update-smbus-I-O-space-aft.patch
0045-hw-usb-fix-mistaken-de-initializati.patch
0046-usb-mtp-use-O_NOFOLLOW-and-O_CLOEXE.patch
0047-pvrdma-release-device-resources-in-.patch
0048-rdma-check-num_sge-does-not-exceed-.patch
0049-pvrdma-add-uar_read-routine.patch
0050-pvrdma-check-number-of-pages-when-c.patch
0051-pvrdma-check-return-value-from-pvrd.patch
0052-pvrdma-release-ring-object-in-case-.patch
0053-block-Fix-hangs-in-synchronous-APIs.patch
0054-linux-user-make-pwrite64-pread64-fd.patch
0055-xen-Add-xen-v4.12-based-xc_domain_c.patch
0056-slirp-check-data-length-while-emula.patch
0057-s390x-Return-specification-exceptio.patch
0059-memory-Fix-the-memory-region-type-a.patch
0060-target-i386-sev-Do-not-pin-the-ram-.patch
0061-slirp-check-sscanf-result-when-emul.patch
0062-ppc-add-host-serial-and-host-model-.patch
0063-i2c-ddc-fix-oob-read.patch
0064-device_tree.c-Don-t-use-load_image.patch
0065-spapr-Simplify-handling-of-host-ser.patch
* Patches renamed:
0011-linux-user-use-target_ulong.patch
-> 0010-linux-user-use-target_ulong.patch
0012-Make-char-muxer-more-robust-wrt-sma.patch
-> 0011-Make-char-muxer-more-robust-wrt-sma.patch
0013-linux-user-lseek-explicitly-cast-no.patch
-> 0012-linux-user-lseek-explicitly-cast-no.patch
0014-AIO-Reduce-number-of-threads-for-32.patch
-> 0013-AIO-Reduce-number-of-threads-for-32.patch
0015-xen_disk-Add-suse-specific-flush-di.patch
-> 0014-xen_disk-Add-suse-specific-flush-di.patch
0016-qemu-bridge-helper-reduce-security-.patch
-> 0015-qemu-bridge-helper-reduce-security-.patch
0017-qemu-binfmt-conf-use-qemu-ARCH-binf.patch
-> 0016-qemu-binfmt-conf-use-qemu-ARCH-binf.patch
0018-linux-user-properly-test-for-infini.patch
-> 0017-linux-user-properly-test-for-infini.patch
0019-roms-Makefile-pass-a-packaging-time.patch
-> 0018-roms-Makefile-pass-a-packaging-time.patch
0020-Raise-soft-address-space-limit-to-h.patch
-> 0019-Raise-soft-address-space-limit-to-h.patch
0021-increase-x86_64-physical-bits-to-42.patch
-> 0020-increase-x86_64-physical-bits-to-42.patch
0022-vga-Raise-VRAM-to-16-MiB-for-pc-0.1.patch
-> 0021-vga-Raise-VRAM-to-16-MiB-for-pc-0.1.patch
0023-i8254-Fix-migration-from-SLE11-SP2.patch
-> 0022-i8254-Fix-migration-from-SLE11-SP2.patch
0024-acpi_piix4-Fix-migration-from-SLE11.patch
-> 0023-acpi_piix4-Fix-migration-from-SLE11.patch
0031-Switch-order-of-libraries-for-mpath.patch
-> 0024-Switch-order-of-libraries-for-mpath.patch
0032-Make-installed-scripts-explicitly-p.patch
-> 0025-Make-installed-scripts-explicitly-p.patch
0035-tests-test-thread-pool-is-racy-add-.patch
-> 0027-tests-test-thread-pool-is-racy-add-.patch
0036-xen-add-block-resize-support-for-xe.patch
-> 0028-xen-add-block-resize-support-for-xe.patch
0037-tests-qemu-iotests-Triple-timeout-o.patch
-> 0029-tests-qemu-iotests-Triple-timeout-o.patch
0038-tests-block-io-test-130-needs-some-.patch
-> 0030-tests-block-io-test-130-needs-some-.patch
0040-xen-ignore-live-parameter-from-xen-.patch
-> 0031-xen-ignore-live-parameter-from-xen-.patch
0058-Revert-target-i386-kvm-add-VMX-migr.patch
-> 0034-Revert-target-i386-kvm-add-VMX-migr.patch
* Patches added:
0026-hw-smbios-handle-both-file-formats-.patch
0032-tests-Fix-Makefile-handling-of-chec.patch
0033-Conditionalize-ui-bitmap-installati.patch
0035-tests-change-error-message-in-test-.patch
- Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-4.0
-------------------------------------------------------------------
Fri Mar 29 13:13:59 UTC 2019 - Bruce Rogers <brogers@suse.com>

View File

@ -16,14 +16,16 @@
#
%define build_in_tree 1
%define srcname qemu
Name: qemu-linux-user
Url: https://www.qemu.org/
Summary: CPU emulator for user space
License: BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT
License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT
Group: System/Emulators/PC
%define qemuver 3.1.0
%define srcver 3.1.0
%define qemuver 4.0.0
%define srcver 4.0.0
Version: %qemuver
Release: 0
Source: https://wiki.qemu.org/download/%{srcname}-%{srcver}.tar.xz
@ -41,67 +43,42 @@ Patch0006: 0006-linux-user-add-binfmt-wrapper-for-a.patch
Patch0007: 0007-PPC-KVM-Disable-mmu-notifier-check.patch
Patch0008: 0008-linux-user-binfmt-support-host-bina.patch
Patch0009: 0009-linux-user-Fake-proc-cpuinfo.patch
Patch0010: 0010-Remove-problematic-evdev-86-key-fro.patch
Patch0011: 0011-linux-user-use-target_ulong.patch
Patch0012: 0012-Make-char-muxer-more-robust-wrt-sma.patch
Patch0013: 0013-linux-user-lseek-explicitly-cast-no.patch
Patch0014: 0014-AIO-Reduce-number-of-threads-for-32.patch
Patch0015: 0015-xen_disk-Add-suse-specific-flush-di.patch
Patch0016: 0016-qemu-bridge-helper-reduce-security-.patch
Patch0017: 0017-qemu-binfmt-conf-use-qemu-ARCH-binf.patch
Patch0018: 0018-linux-user-properly-test-for-infini.patch
Patch0019: 0019-roms-Makefile-pass-a-packaging-time.patch
Patch0020: 0020-Raise-soft-address-space-limit-to-h.patch
Patch0021: 0021-increase-x86_64-physical-bits-to-42.patch
Patch0022: 0022-vga-Raise-VRAM-to-16-MiB-for-pc-0.1.patch
Patch0023: 0023-i8254-Fix-migration-from-SLE11-SP2.patch
Patch0024: 0024-acpi_piix4-Fix-migration-from-SLE11.patch
Patch0025: 0025-Fix-tigervnc-long-press-issue.patch
Patch0026: 0026-string-input-visitor-Fix-uint64-par.patch
Patch0027: 0027-test-string-input-visitor-Add-int-t.patch
Patch0028: 0028-test-string-input-visitor-Add-uint6.patch
Patch0029: 0029-tests-Add-QOM-property-unit-tests.patch
Patch0030: 0030-tests-Add-scsi-disk-test.patch
Patch0031: 0031-Switch-order-of-libraries-for-mpath.patch
Patch0032: 0032-Make-installed-scripts-explicitly-p.patch
Patch0033: 0033-smbios-Add-1-terminator-if-any-stri.patch
Patch0034: 0034-qemu-io-tests-comment-out-problemat.patch
Patch0035: 0035-tests-test-thread-pool-is-racy-add-.patch
Patch0036: 0036-xen-add-block-resize-support-for-xe.patch
Patch0037: 0037-tests-qemu-iotests-Triple-timeout-o.patch
Patch0038: 0038-tests-block-io-test-130-needs-some-.patch
Patch0039: 0039-xen_disk-Avoid-repeated-memory-allo.patch
Patch0040: 0040-xen-ignore-live-parameter-from-xen-.patch
Patch0041: 0041-vfio-ap-flag-as-compatible-with-bal.patch
Patch0042: 0042-hw-s390x-Fix-bad-mask-in-time2tod.patch
Patch0043: 0043-pcie-set-link-state-inactive-active.patch
Patch0044: 0044-pc-piix4-Update-smbus-I-O-space-aft.patch
Patch0045: 0045-hw-usb-fix-mistaken-de-initializati.patch
Patch0046: 0046-usb-mtp-use-O_NOFOLLOW-and-O_CLOEXE.patch
Patch0047: 0047-pvrdma-release-device-resources-in-.patch
Patch0048: 0048-rdma-check-num_sge-does-not-exceed-.patch
Patch0049: 0049-pvrdma-add-uar_read-routine.patch
Patch0050: 0050-pvrdma-check-number-of-pages-when-c.patch
Patch0051: 0051-pvrdma-check-return-value-from-pvrd.patch
Patch0052: 0052-pvrdma-release-ring-object-in-case-.patch
Patch0053: 0053-block-Fix-hangs-in-synchronous-APIs.patch
Patch0054: 0054-linux-user-make-pwrite64-pread64-fd.patch
Patch0055: 0055-xen-Add-xen-v4.12-based-xc_domain_c.patch
Patch0056: 0056-slirp-check-data-length-while-emula.patch
Patch0057: 0057-s390x-Return-specification-exceptio.patch
Patch0058: 0058-Revert-target-i386-kvm-add-VMX-migr.patch
Patch0059: 0059-memory-Fix-the-memory-region-type-a.patch
Patch0060: 0060-target-i386-sev-Do-not-pin-the-ram-.patch
Patch0061: 0061-slirp-check-sscanf-result-when-emul.patch
Patch0062: 0062-ppc-add-host-serial-and-host-model-.patch
Patch0063: 0063-i2c-ddc-fix-oob-read.patch
Patch0064: 0064-device_tree.c-Don-t-use-load_image.patch
Patch0065: 0065-spapr-Simplify-handling-of-host-ser.patch
Patch0010: 0010-linux-user-use-target_ulong.patch
Patch0011: 0011-Make-char-muxer-more-robust-wrt-sma.patch
Patch0012: 0012-linux-user-lseek-explicitly-cast-no.patch
Patch0013: 0013-AIO-Reduce-number-of-threads-for-32.patch
Patch0014: 0014-xen_disk-Add-suse-specific-flush-di.patch
Patch0015: 0015-qemu-bridge-helper-reduce-security-.patch
Patch0016: 0016-qemu-binfmt-conf-use-qemu-ARCH-binf.patch
Patch0017: 0017-linux-user-properly-test-for-infini.patch
Patch0018: 0018-roms-Makefile-pass-a-packaging-time.patch
Patch0019: 0019-Raise-soft-address-space-limit-to-h.patch
Patch0020: 0020-increase-x86_64-physical-bits-to-42.patch
Patch0021: 0021-vga-Raise-VRAM-to-16-MiB-for-pc-0.1.patch
Patch0022: 0022-i8254-Fix-migration-from-SLE11-SP2.patch
Patch0023: 0023-acpi_piix4-Fix-migration-from-SLE11.patch
Patch0024: 0024-Switch-order-of-libraries-for-mpath.patch
Patch0025: 0025-Make-installed-scripts-explicitly-p.patch
Patch0026: 0026-hw-smbios-handle-both-file-formats-.patch
Patch0027: 0027-tests-test-thread-pool-is-racy-add-.patch
Patch0028: 0028-xen-add-block-resize-support-for-xe.patch
Patch0029: 0029-tests-qemu-iotests-Triple-timeout-o.patch
Patch0030: 0030-tests-block-io-test-130-needs-some-.patch
Patch0031: 0031-xen-ignore-live-parameter-from-xen-.patch
Patch0032: 0032-tests-Fix-Makefile-handling-of-chec.patch
Patch0033: 0033-Conditionalize-ui-bitmap-installati.patch
Patch0034: 0034-Revert-target-i386-kvm-add-VMX-migr.patch
Patch0035: 0035-tests-change-error-message-in-test-.patch
Patch0036: 0036-util-qemu-sockets-Fix-GCC-9-build-w.patch
Patch0037: 0037-hw-usb-hcd-xhci-Fix-GCC-9-build-war.patch
Patch0038: 0038-hw-usb-dev-mtp-Fix-GCC-9-build-warn.patch
Patch0039: 0039-linux-user-uname-Fix-GCC-9-build-wa.patch
Patch0040: 0040-linux-user-elfload-Fix-GCC-9-build-.patch
Patch0041: 0041-qxl-fix-Waddress-of-packed-member.patch
# Please do not add QEMU patches manually here.
# Run update_git.sh to regenerate this queue.
ExcludeArch: s390
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#!BuildIgnore: gcc-PIE
BuildRequires: e2fsprogs-devel
BuildRequires: fdupes
BuildRequires: gcc-c++
@ -169,33 +146,19 @@ syscall layer occurs on the native hardware and operating system.
%patch0039 -p1
%patch0040 -p1
%patch0041 -p1
%patch0042 -p1
%patch0043 -p1
%patch0044 -p1
%patch0045 -p1
%patch0046 -p1
%patch0047 -p1
%patch0048 -p1
%patch0049 -p1
%patch0050 -p1
%patch0051 -p1
%patch0052 -p1
%patch0053 -p1
%patch0054 -p1
%patch0055 -p1
%patch0056 -p1
%patch0057 -p1
%patch0058 -p1
%patch0059 -p1
%patch0060 -p1
%patch0061 -p1
%patch0062 -p1
%patch0063 -p1
%patch0064 -p1
%patch0065 -p1
%build
./configure \
%define _lto_cflags %{nil}
%if %build_in_tree
%define mybuilddir %{_builddir}/%buildsubdir
%else
%define mybuilddir %{_builddir}/mybuilddir
mkdir -p %mybuilddir
cd %mybuilddir
%endif
%{_builddir}/%buildsubdir/configure \
--prefix=%_prefix \
--sysconfdir=%_sysconfdir \
--libdir=%_libdir \
@ -209,6 +172,7 @@ syscall layer occurs on the native hardware and operating system.
--extra-cflags="%{optflags}" \
--disable-stack-protector \
--disable-strip \
--without-default-devices \
--disable-system --enable-linux-user \
--disable-tools --disable-guest-agent \
--static \
@ -217,6 +181,7 @@ syscall layer occurs on the native hardware and operating system.
--disable-docs \
--audio-drv-list="" \
--enable-attr \
--disable-auth-pam \
--disable-blobs \
--disable-bluez \
--disable-bochs \
@ -236,6 +201,7 @@ syscall layer occurs on the native hardware and operating system.
--disable-gtk \
--disable-hax \
--disable-hvf \
--disable-iconv \
--disable-jemalloc \
--disable-kvm \
--disable-libiscsi \
@ -245,6 +211,7 @@ syscall layer occurs on the native hardware and operating system.
--disable-libusb \
--disable-libxml2 \
--disable-linux-aio \
--disable-lzfse \
--disable-lzo \
--disable-malloc-trim \
--enable-membarrier \
@ -262,8 +229,10 @@ syscall layer occurs on the native hardware and operating system.
--disable-replication \
--disable-sanitizers \
--disable-sdl \
--disable-sdl-image \
--disable-seccomp \
--disable-sheepdog \
--disable-slirp \
--disable-smartcard \
--disable-snappy \
--disable-spice \
@ -273,7 +242,11 @@ syscall layer occurs on the native hardware and operating system.
--disable-vde \
--disable-vdi \
--disable-vhost-crypto \
--disable-vhost-kernel \
--disable-vhost-net \
--disable-vhost-scsi \
--disable-vhost-user \
--disable-vhost-vsock \
--disable-virglrenderer \
--disable-virtfs \
--disable-vnc \
@ -282,10 +255,10 @@ syscall layer occurs on the native hardware and operating system.
--disable-vnc-sasl \
--disable-vte \
--disable-vvfat \
--enable-werror \
--disable-whpx \
--disable-xen \
--disable-xen-pci-passthrough \
--disable-xen-pv-domain-build \
--disable-xfsctl \
make %{?_smp_mflags} V=1
@ -317,11 +290,14 @@ make %{?_smp_mflags} V=1
%ifarch %ix86 x86_64 %arm aarch64 ppc ppc64 ppc64le s390x
%check
cd %mybuilddir
%{qemu_arch}-linux-user/qemu-%{qemu_arch} %_bindir/ls > /dev/null
make %{?_smp_mflags} check-softfloat
%endif
%install
make install DESTDIR=%{buildroot}
cd %mybuilddir
make %{?_smp_mflags} install DESTDIR=%{buildroot}
rm -rf %{buildroot}%_datadir/qemu/keymaps
unlink %{buildroot}%_datadir/qemu/trace-events-all
install -d -m 755 %{buildroot}%_sbindir

View File

@ -16,11 +16,13 @@
#
%define build_in_tree 1
%define srcname qemu
Name: qemu-linux-user
Url: https://www.qemu.org/
Summary: CPU emulator for user space
License: BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT
License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT
Group: System/Emulators/PC
QEMU_VERSION
Release: 0
@ -34,7 +36,6 @@ PATCH_FILES
# Run update_git.sh to regenerate this queue.
ExcludeArch: s390
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#!BuildIgnore: gcc-PIE
BuildRequires: e2fsprogs-devel
BuildRequires: fdupes
BuildRequires: gcc-c++
@ -64,7 +65,17 @@ syscall layer occurs on the native hardware and operating system.
PATCH_EXEC
%build
./configure \
%define _lto_cflags %{nil}
%if %build_in_tree
%define mybuilddir %{_builddir}/%buildsubdir
%else
%define mybuilddir %{_builddir}/mybuilddir
mkdir -p %mybuilddir
cd %mybuilddir
%endif
%{_builddir}/%buildsubdir/configure \
--prefix=%_prefix \
--sysconfdir=%_sysconfdir \
--libdir=%_libdir \
@ -78,6 +89,7 @@ PATCH_EXEC
--extra-cflags="%{optflags}" \
--disable-stack-protector \
--disable-strip \
--without-default-devices \
--disable-system --enable-linux-user \
--disable-tools --disable-guest-agent \
--static \
@ -86,6 +98,7 @@ PATCH_EXEC
--disable-docs \
--audio-drv-list="" \
--enable-attr \
--disable-auth-pam \
--disable-blobs \
--disable-bluez \
--disable-bochs \
@ -105,6 +118,7 @@ PATCH_EXEC
--disable-gtk \
--disable-hax \
--disable-hvf \
--disable-iconv \
--disable-jemalloc \
--disable-kvm \
--disable-libiscsi \
@ -114,6 +128,7 @@ PATCH_EXEC
--disable-libusb \
--disable-libxml2 \
--disable-linux-aio \
--disable-lzfse \
--disable-lzo \
--disable-malloc-trim \
--enable-membarrier \
@ -131,8 +146,10 @@ PATCH_EXEC
--disable-replication \
--disable-sanitizers \
--disable-sdl \
--disable-sdl-image \
--disable-seccomp \
--disable-sheepdog \
--disable-slirp \
--disable-smartcard \
--disable-snappy \
--disable-spice \
@ -142,7 +159,11 @@ PATCH_EXEC
--disable-vde \
--disable-vdi \
--disable-vhost-crypto \
--disable-vhost-kernel \
--disable-vhost-net \
--disable-vhost-scsi \
--disable-vhost-user \
--disable-vhost-vsock \
--disable-virglrenderer \
--disable-virtfs \
--disable-vnc \
@ -151,10 +172,10 @@ PATCH_EXEC
--disable-vnc-sasl \
--disable-vte \
--disable-vvfat \
--enable-werror \
--disable-whpx \
--disable-xen \
--disable-xen-pci-passthrough \
--disable-xen-pv-domain-build \
--disable-xfsctl \
make %{?_smp_mflags} V=1
@ -186,11 +207,14 @@ make %{?_smp_mflags} V=1
%ifarch %ix86 x86_64 %arm aarch64 ppc ppc64 ppc64le s390x
%check
cd %mybuilddir
%{qemu_arch}-linux-user/qemu-%{qemu_arch} %_bindir/ls > /dev/null
make %{?_smp_mflags} check-softfloat
%endif
%install
make install DESTDIR=%{buildroot}
cd %mybuilddir
make %{?_smp_mflags} install DESTDIR=%{buildroot}
rm -rf %{buildroot}%_datadir/qemu/keymaps
unlink %{buildroot}%_datadir/qemu/trace-events-all
install -d -m 755 %{buildroot}%_sbindir

View File

@ -1,3 +1,178 @@
-------------------------------------------------------------------
Mon May 6 21:36:24 UTC 2019 - Bruce Rogers <brogers@suse.com>
- Disable LTO as suggested by Martin Liska (boo#1133281)
- Remove and obsolete qemu-oss-audio subpackage. OSS audio is very
old, and we didn't really even configure the package properly for
it for a very long time, so presumably there can't be any users
of it as far as qemu is concerned
- Avoid warnings which gcc9 complains about
0036-util-qemu-sockets-Fix-GCC-9-build-w.patch
0037-hw-usb-hcd-xhci-Fix-GCC-9-build-war.patch
0038-hw-usb-dev-mtp-Fix-GCC-9-build-warn.patch
0039-linux-user-uname-Fix-GCC-9-build-wa.patch
0040-linux-user-elfload-Fix-GCC-9-build-.patch
0041-qxl-fix-Waddress-of-packed-member.patch
- Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-4.0
-------------------------------------------------------------------
Wed May 1 19:29:10 UTC 2019 - Bruce Rogers <brogers@suse.com>
- Update to v4.0.0: See http://wiki.qemu.org/ChangeLog/4.0
Take note that ongoing feature deprecation is tracked at both
http://wiki.qemu-project.org/Features/LegacyRemoval and in
Appendix B of the qemu-doc.* files installed with the qemu package
Some noteworthy changes:
* ARM: ARMv8+ extensions for SB, PredInv, HPD, LOR, FHM, AA32HPD,
PAuth, JSConv, CondM, FRINT, and BTI
* ARM: new emulation support for "Musca" and "MPS2" development boards
* ARM: virt: support for >255GB of RAM and u-boot "noload" image types
* ARM: improved emulation of ARM PMU
* HPPA: support for TLB protection IDs and TLB trace events
* MIPS: support for multi-threaded TCG emulation
* MIPS: emulation support for I7200 I6500 CPUs, QMP-base querying of
CPU types, and improved support for SAARI and SAAR configuration registers
* MIPS: improvements to Interthread Communication Unit, Fulong 2E
machine types, and end-user documentation.
* PowerPC: pseries/powernv: support for POWER9 large decrementer
* PowerPC: pseries: emulation support for XIVE interrupt controller
* PowerPC: pseries: support for hotplugging PCI host bridges (PHBs)
* PowerPC: pseries: Spectre/Meltdown mitigations enabled by default,
additional support for count-cache-flush mitigation
* RISC-V: virt: support for PCI and USB
* RISC-V: support for TSR, TW, and TVM fields of mstatus, FS field now
supports three stats (dirty, clean, and off)
* RISC-V: built-in gdbserver supports register lists via XML files
* s390: support for z14 GA 2 CPU model, Multiple-epoch and PTFF
features now enabled in z14 CPU model by default
* s390: vfio-ap: now supports hot plug/unplug, and no longer inhibits memory
ballooning
* s390: emulation support for floating-point extension facility and
vector support instructions
* x86: HAX accelerator now supported POSIX hosts other than Darwin,
including Linux and NetBSD
* x86: Q35: advertised PCIe root port speeds will now optimally default
to maximum link speed (16GT/s) and width (x32) provided by PCIe 4.0 for
QEMU 4.0+ machine types; older machine types will retain 2.5GT/x1
defaults for compatibility.
* x86: Xen PVH images can now be booted with "-kernel" option
* Xtensa: xtfpga: improved SMP support for linux (interrupt
distributor, IPI, and runstall) and new SMP-capable test_mmuhifi_c3
core configuration
* Xtensa: support for Flexible length instructions extension (FLIX)
* GUI: new '-display spice-app' to configure/launch a Spice client GUI with
a similar UI to QEMU GTK. VNC server now supports access controls via
tls-authz/sasl-authz options
* QMP: support for "out-of-band" command execution, can be useful for
postcopy migration recovery. Additional QMP commands for working with
block devices and dirty bitmaps
* VFIO: EDID interface for supported mdev (Intel vGPU for kernel 5.0+),
allows resolution setting via xres/yres options.
* Xen: new 'xen-disk' device which can create a Xen PV disk backend,
and performance improvements for Xen PV disk backend.
* Network Block Device: improved tracing and error diagnostics, improved
client compatibility with buggy NBD server implementations, new
--bitmap, --list, --tls-authz options for qemu-nbd
* virtio-blk now supports DISCARD and WRITE_ZEROES
* qemu-test-suite output is now in TAP format
* Sphinx now used for part of qemu documentation
* A few more configure features are enabled: iconv, lzfse (for openSUSE)
* Provide better logo icons
- Made these package building changes:
* Removed this token from spec file: #!BuildIgnore: gcc-PIE
* Created ability to build qemu source out-of-tree
* Added BSD-2-Clause license clause due to EDK II code inclusion
* Patches dropped (upstream unless otherwise noted):
0010-Remove-problematic-evdev-86-key-fro.patch
0025-Fix-tigervnc-long-press-issue.patch
0026-string-input-visitor-Fix-uint64-par.patch
0027-test-string-input-visitor-Add-int-t.patch
0028-test-string-input-visitor-Add-uint6.patch
0029-tests-Add-QOM-property-unit-tests.patch
0030-tests-Add-scsi-disk-test.patch
0033-smbios-Add-1-terminator-if-any-stri.patch (different approach used)
0034-qemu-io-tests-comment-out-problemat.patch (not as needed)
0039-xen_disk-Avoid-repeated-memory-allo.patch
0041-vfio-ap-flag-as-compatible-with-bal.patch
0042-hw-s390x-Fix-bad-mask-in-time2tod.patch
0043-pcie-set-link-state-inactive-active.patch
0044-pc-piix4-Update-smbus-I-O-space-aft.patch
0045-hw-usb-fix-mistaken-de-initializati.patch
0046-usb-mtp-use-O_NOFOLLOW-and-O_CLOEXE.patch
0047-pvrdma-release-device-resources-in-.patch
0048-rdma-check-num_sge-does-not-exceed-.patch
0049-pvrdma-add-uar_read-routine.patch
0050-pvrdma-check-number-of-pages-when-c.patch
0051-pvrdma-check-return-value-from-pvrd.patch
0052-pvrdma-release-ring-object-in-case-.patch
0053-block-Fix-hangs-in-synchronous-APIs.patch
0054-linux-user-make-pwrite64-pread64-fd.patch
0055-xen-Add-xen-v4.12-based-xc_domain_c.patch
0056-slirp-check-data-length-while-emula.patch
0057-s390x-Return-specification-exceptio.patch
0059-memory-Fix-the-memory-region-type-a.patch
0060-target-i386-sev-Do-not-pin-the-ram-.patch
0061-slirp-check-sscanf-result-when-emul.patch
0062-ppc-add-host-serial-and-host-model-.patch
0063-i2c-ddc-fix-oob-read.patch
0064-device_tree.c-Don-t-use-load_image.patch
0065-spapr-Simplify-handling-of-host-ser.patch
ipxe-efi-guard-strncpy-with-gcc-warning-ignore-pragma.patch
ipxe-fix-build.patch
skiboot-hdata-i2c.c-fix-building-with-gcc8.patch
* Patches renamed:
0011-linux-user-use-target_ulong.patch
-> 0010-linux-user-use-target_ulong.patch
0012-Make-char-muxer-more-robust-wrt-sma.patch
-> 0011-Make-char-muxer-more-robust-wrt-sma.patch
0013-linux-user-lseek-explicitly-cast-no.patch
-> 0012-linux-user-lseek-explicitly-cast-no.patch
0014-AIO-Reduce-number-of-threads-for-32.patch
-> 0013-AIO-Reduce-number-of-threads-for-32.patch
0015-xen_disk-Add-suse-specific-flush-di.patch
-> 0014-xen_disk-Add-suse-specific-flush-di.patch
0016-qemu-bridge-helper-reduce-security-.patch
-> 0015-qemu-bridge-helper-reduce-security-.patch
0017-qemu-binfmt-conf-use-qemu-ARCH-binf.patch
-> 0016-qemu-binfmt-conf-use-qemu-ARCH-binf.patch
0018-linux-user-properly-test-for-infini.patch
-> 0017-linux-user-properly-test-for-infini.patch
0019-roms-Makefile-pass-a-packaging-time.patch
-> 0018-roms-Makefile-pass-a-packaging-time.patch
0020-Raise-soft-address-space-limit-to-h.patch
-> 0019-Raise-soft-address-space-limit-to-h.patch
0021-increase-x86_64-physical-bits-to-42.patch
-> 0020-increase-x86_64-physical-bits-to-42.patch
0022-vga-Raise-VRAM-to-16-MiB-for-pc-0.1.patch
-> 0021-vga-Raise-VRAM-to-16-MiB-for-pc-0.1.patch
0023-i8254-Fix-migration-from-SLE11-SP2.patch
-> 0022-i8254-Fix-migration-from-SLE11-SP2.patch
0024-acpi_piix4-Fix-migration-from-SLE11.patch
-> 0023-acpi_piix4-Fix-migration-from-SLE11.patch
0031-Switch-order-of-libraries-for-mpath.patch
-> 0024-Switch-order-of-libraries-for-mpath.patch
0032-Make-installed-scripts-explicitly-p.patch
-> 0025-Make-installed-scripts-explicitly-p.patch
0035-tests-test-thread-pool-is-racy-add-.patch
-> 0027-tests-test-thread-pool-is-racy-add-.patch
0036-xen-add-block-resize-support-for-xe.patch
-> 0028-xen-add-block-resize-support-for-xe.patch
0037-tests-qemu-iotests-Triple-timeout-o.patch
-> 0029-tests-qemu-iotests-Triple-timeout-o.patch
0038-tests-block-io-test-130-needs-some-.patch
-> 0030-tests-block-io-test-130-needs-some-.patch
0040-xen-ignore-live-parameter-from-xen-.patch
-> 0031-xen-ignore-live-parameter-from-xen-.patch
0058-Revert-target-i386-kvm-add-VMX-migr.patch
-> 0034-Revert-target-i386-kvm-add-VMX-migr.patch
* Patches added:
0026-hw-smbios-handle-both-file-formats-.patch
0032-tests-Fix-Makefile-handling-of-chec.patch
0033-Conditionalize-ui-bitmap-installati.patch
0035-tests-change-error-message-in-test-.patch
ipxe-efi-Avoid-string-op-warning-with-cross-gcc-7-compile.patch
- Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-4.0
-------------------------------------------------------------------
Fri Mar 29 13:13:57 UTC 2019 - Bruce Rogers <brogers@suse.com>

View File

@ -16,6 +16,7 @@
#
%define build_in_tree 1
%define build_x86_firmware_from_source 0
%define build_skiboot_from_source 0
%define build_slof_from_source 0
@ -115,10 +116,10 @@
Name: qemu-testsuite
Url: https://www.qemu.org/
Summary: Machine emulator and virtualizer
License: BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT
License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT
Group: System/Emulators/PC
%define qemuver 3.1.0
%define srcver 3.1.0
%define qemuver 4.0.0
%define srcver 4.0.0
Version: %qemuver
Release: 0
Source: https://wiki.qemu.org/download/%{srcname}-%{srcver}.tar.xz
@ -152,62 +153,38 @@ Patch0006: 0006-linux-user-add-binfmt-wrapper-for-a.patch
Patch0007: 0007-PPC-KVM-Disable-mmu-notifier-check.patch
Patch0008: 0008-linux-user-binfmt-support-host-bina.patch
Patch0009: 0009-linux-user-Fake-proc-cpuinfo.patch
Patch0010: 0010-Remove-problematic-evdev-86-key-fro.patch
Patch0011: 0011-linux-user-use-target_ulong.patch
Patch0012: 0012-Make-char-muxer-more-robust-wrt-sma.patch
Patch0013: 0013-linux-user-lseek-explicitly-cast-no.patch
Patch0014: 0014-AIO-Reduce-number-of-threads-for-32.patch
Patch0015: 0015-xen_disk-Add-suse-specific-flush-di.patch
Patch0016: 0016-qemu-bridge-helper-reduce-security-.patch
Patch0017: 0017-qemu-binfmt-conf-use-qemu-ARCH-binf.patch
Patch0018: 0018-linux-user-properly-test-for-infini.patch
Patch0019: 0019-roms-Makefile-pass-a-packaging-time.patch
Patch0020: 0020-Raise-soft-address-space-limit-to-h.patch
Patch0021: 0021-increase-x86_64-physical-bits-to-42.patch
Patch0022: 0022-vga-Raise-VRAM-to-16-MiB-for-pc-0.1.patch
Patch0023: 0023-i8254-Fix-migration-from-SLE11-SP2.patch
Patch0024: 0024-acpi_piix4-Fix-migration-from-SLE11.patch
Patch0025: 0025-Fix-tigervnc-long-press-issue.patch
Patch0026: 0026-string-input-visitor-Fix-uint64-par.patch
Patch0027: 0027-test-string-input-visitor-Add-int-t.patch
Patch0028: 0028-test-string-input-visitor-Add-uint6.patch
Patch0029: 0029-tests-Add-QOM-property-unit-tests.patch
Patch0030: 0030-tests-Add-scsi-disk-test.patch
Patch0031: 0031-Switch-order-of-libraries-for-mpath.patch
Patch0032: 0032-Make-installed-scripts-explicitly-p.patch
Patch0033: 0033-smbios-Add-1-terminator-if-any-stri.patch
Patch0034: 0034-qemu-io-tests-comment-out-problemat.patch
Patch0035: 0035-tests-test-thread-pool-is-racy-add-.patch
Patch0036: 0036-xen-add-block-resize-support-for-xe.patch
Patch0037: 0037-tests-qemu-iotests-Triple-timeout-o.patch
Patch0038: 0038-tests-block-io-test-130-needs-some-.patch
Patch0039: 0039-xen_disk-Avoid-repeated-memory-allo.patch
Patch0040: 0040-xen-ignore-live-parameter-from-xen-.patch
Patch0041: 0041-vfio-ap-flag-as-compatible-with-bal.patch
Patch0042: 0042-hw-s390x-Fix-bad-mask-in-time2tod.patch
Patch0043: 0043-pcie-set-link-state-inactive-active.patch
Patch0044: 0044-pc-piix4-Update-smbus-I-O-space-aft.patch
Patch0045: 0045-hw-usb-fix-mistaken-de-initializati.patch
Patch0046: 0046-usb-mtp-use-O_NOFOLLOW-and-O_CLOEXE.patch
Patch0047: 0047-pvrdma-release-device-resources-in-.patch
Patch0048: 0048-rdma-check-num_sge-does-not-exceed-.patch
Patch0049: 0049-pvrdma-add-uar_read-routine.patch
Patch0050: 0050-pvrdma-check-number-of-pages-when-c.patch
Patch0051: 0051-pvrdma-check-return-value-from-pvrd.patch
Patch0052: 0052-pvrdma-release-ring-object-in-case-.patch
Patch0053: 0053-block-Fix-hangs-in-synchronous-APIs.patch
Patch0054: 0054-linux-user-make-pwrite64-pread64-fd.patch
Patch0055: 0055-xen-Add-xen-v4.12-based-xc_domain_c.patch
Patch0056: 0056-slirp-check-data-length-while-emula.patch
Patch0057: 0057-s390x-Return-specification-exceptio.patch
Patch0058: 0058-Revert-target-i386-kvm-add-VMX-migr.patch
Patch0059: 0059-memory-Fix-the-memory-region-type-a.patch
Patch0060: 0060-target-i386-sev-Do-not-pin-the-ram-.patch
Patch0061: 0061-slirp-check-sscanf-result-when-emul.patch
Patch0062: 0062-ppc-add-host-serial-and-host-model-.patch
Patch0063: 0063-i2c-ddc-fix-oob-read.patch
Patch0064: 0064-device_tree.c-Don-t-use-load_image.patch
Patch0065: 0065-spapr-Simplify-handling-of-host-ser.patch
Patch0010: 0010-linux-user-use-target_ulong.patch
Patch0011: 0011-Make-char-muxer-more-robust-wrt-sma.patch
Patch0012: 0012-linux-user-lseek-explicitly-cast-no.patch
Patch0013: 0013-AIO-Reduce-number-of-threads-for-32.patch
Patch0014: 0014-xen_disk-Add-suse-specific-flush-di.patch
Patch0015: 0015-qemu-bridge-helper-reduce-security-.patch
Patch0016: 0016-qemu-binfmt-conf-use-qemu-ARCH-binf.patch
Patch0017: 0017-linux-user-properly-test-for-infini.patch
Patch0018: 0018-roms-Makefile-pass-a-packaging-time.patch
Patch0019: 0019-Raise-soft-address-space-limit-to-h.patch
Patch0020: 0020-increase-x86_64-physical-bits-to-42.patch
Patch0021: 0021-vga-Raise-VRAM-to-16-MiB-for-pc-0.1.patch
Patch0022: 0022-i8254-Fix-migration-from-SLE11-SP2.patch
Patch0023: 0023-acpi_piix4-Fix-migration-from-SLE11.patch
Patch0024: 0024-Switch-order-of-libraries-for-mpath.patch
Patch0025: 0025-Make-installed-scripts-explicitly-p.patch
Patch0026: 0026-hw-smbios-handle-both-file-formats-.patch
Patch0027: 0027-tests-test-thread-pool-is-racy-add-.patch
Patch0028: 0028-xen-add-block-resize-support-for-xe.patch
Patch0029: 0029-tests-qemu-iotests-Triple-timeout-o.patch
Patch0030: 0030-tests-block-io-test-130-needs-some-.patch
Patch0031: 0031-xen-ignore-live-parameter-from-xen-.patch
Patch0032: 0032-tests-Fix-Makefile-handling-of-chec.patch
Patch0033: 0033-Conditionalize-ui-bitmap-installati.patch
Patch0034: 0034-Revert-target-i386-kvm-add-VMX-migr.patch
Patch0035: 0035-tests-change-error-message-in-test-.patch
Patch0036: 0036-util-qemu-sockets-Fix-GCC-9-build-w.patch
Patch0037: 0037-hw-usb-hcd-xhci-Fix-GCC-9-build-war.patch
Patch0038: 0038-hw-usb-dev-mtp-Fix-GCC-9-build-warn.patch
Patch0039: 0039-linux-user-uname-Fix-GCC-9-build-wa.patch
Patch0040: 0040-linux-user-elfload-Fix-GCC-9-build-.patch
Patch0041: 0041-qxl-fix-Waddress-of-packed-member.patch
# Please do not add QEMU patches manually here.
# Run update_git.sh to regenerate this queue.
@ -219,10 +196,9 @@ Patch1102: seabios-fix_cross_compilation.patch
# ipxe - path: roms/ipxe (patch range 1200-1299)
Patch1200: ipxe-stable-buildid.patch
Patch1201: ipxe-use-gcc6-for-more-compact-code.patch
Patch1202: ipxe-efi-guard-strncpy-with-gcc-warning-ignore-pragma.patch
Patch1203: ipxe-fix-build.patch
Patch1204: ipxe-efi-Simplify-diagnostic-for-NULL-handle.patch
Patch1205: ipxe-build-Disable-gcc-address-of-packed-member-warning.patch
Patch1202: ipxe-efi-Simplify-diagnostic-for-NULL-handle.patch
Patch1203: ipxe-build-Disable-gcc-address-of-packed-member-warning.patch
Patch1204: ipxe-efi-Avoid-string-op-warning-with-cross-gcc-7-compile.patch
# sgabios - path: roms/sgabios (patch range 1300-1399)
Patch1300: sgabios-stable-buildid.patch
@ -230,8 +206,7 @@ Patch1301: sgabios-fix-cross-build.patch
# SLOF - path: roms/SLOF (patch range 1400-1499) (Currently no patches)
# skiboot - path: roms/skiboot (patch range 1500-1599)
Patch1500: skiboot-hdata-i2c.c-fix-building-with-gcc8.patch
# skiboot - path: roms/skiboot (patch range 1500-1599) (Currently no patches)
# keycodemapdb - path: ui/keycodemapdb (patch range 1600-1699) (Currently no patches)
@ -242,30 +217,28 @@ Patch1500: skiboot-hdata-i2c.c-fix-building-with-gcc8.patch
ExcludeArch: s390
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#!BuildIgnore: gcc-PIE
BuildRequires: Mesa-devel
%if 0%{?is_opensuse}
BuildRequires: SDL-devel
%if 0%{?suse_version} >= 1320
BuildRequires: SDL2-devel
%endif
%if %{build_x86_firmware_from_source}
BuildRequires: acpica
%endif
BuildRequires: alsa-devel
%if %{build_x86_firmware_from_source}
BuildRequires: acpica
BuildRequires: binutils-devel
%endif
BuildRequires: bison
BuildRequires: bluez-devel
BuildRequires: brlapi-devel
%if %{build_x86_firmware_from_source}
%ifnarch %{ix86} x86_64
# We must cross-compile on non-x86*
BuildRequires: cross-x86_64-binutils
BuildRequires: cross-x86_64-gcc7
%endif
%endif
BuildRequires: bluez-devel
BuildRequires: brlapi-devel
BuildRequires: curl-devel
BuildRequires: cyrus-sasl-devel
BuildRequires: e2fsprogs-devel
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gcc-c++
%if %{build_x86_firmware_from_source}
%if 0%{?suse_version} <= 1320
@ -333,6 +306,10 @@ BuildRequires: librbd-devel
BuildRequires: ceph-devel
%endif
%endif
%if 0%{?suse_version} >= 1320 && 0%{?is_opensuse}
BuildRequires: libSDL2-devel
BuildRequires: libSDL2_image-devel
%endif
%if 0%{?with_seccomp}
BuildRequires: libseccomp-devel
%endif
@ -345,6 +322,10 @@ BuildRequires: libvdeplug-devel
%else
BuildRequires: libvdeplug3-devel
%endif
%if 0%{?is_opensuse}
BuildRequires: lzfse-devel
%endif
BuildRequires: Mesa-devel
BuildRequires: libxkbcommon-devel
BuildRequires: lzo-devel
BuildRequires: makeinfo
@ -352,9 +333,6 @@ BuildRequires: makeinfo
BuildRequires: multipath-tools-devel
%endif
BuildRequires: ncurses-devel
%if %{build_x86_firmware_from_source}
BuildRequires: ovmf-tools
%endif
BuildRequires: pkgconfig
BuildRequires: pwdutils
%if 0%{?suse_version} > 1320
@ -362,6 +340,7 @@ BuildRequires: python3-base
%else
BuildRequires: python-base
%endif
BuildRequires: python-Sphinx
%if 0%{?suse_version} >= 1315
BuildRequires: rdma-core-devel
%endif
@ -390,7 +369,12 @@ BuildRequires: zlib-devel
BuildRequires: python-base
%endif
BuildRequires: bc
BuildRequires: qemu-arm = %{qemuver}
BuildRequires: qemu-arm = %{qemuver}
BuildRequires: qemu-audio-alsa = %{qemuver}
BuildRequires: qemu-audio-pa = %{qemuver}
%if 0%{?suse_version} >= 1320 && 0%{?is_opensuse}
BuildRequires: qemu-audio-sdl = %{qemuver}
%endif
BuildRequires: qemu-block-curl = %{qemuver}
BuildRequires: qemu-block-dmg = %{qemuver}
%if 0%{?with_glusterfs}
@ -408,14 +392,22 @@ BuildRequires: qemu-block-rbd = %{qemuver}
BuildRequires: qemu-block-ssh = %{qemuver}
BuildRequires: qemu-extra = %{qemuver}
BuildRequires: qemu-guest-agent = %{qemuver}
BuildRequires: qemu-ipxe = 1.0.0+
%if 0%{?is_opensuse}
BuildRequires: qemu-ksm = %{qemuver}
%endif
BuildRequires: qemu-lang = %{qemuver}
BuildRequires: qemu-ppc = %{qemuver}
BuildRequires: qemu-s390 = %{qemuver}
BuildRequires: qemu-seabios = 1.12.1
BuildRequires: qemu-sgabios = 8
BuildRequires: qemu-tools = %{qemuver}
BuildRequires: qemu-ui-curses = %{qemuver}
BuildRequires: qemu-ui-gtk = %{qemuver}
%if 0%{?is_opensuse}
%if 0%{?suse_version} >= 1320 && 0%{?is_opensuse}
BuildRequires: qemu-ui-sdl = %{qemuver}
%endif
BuildRequires: qemu-vgabios = 1.12.1
BuildRequires: qemu-x86 = %{qemuver}
%endif
Requires(pre): shadow
@ -432,7 +424,7 @@ Recommends: qemu-block-curl
Recommends: qemu-tools
Recommends: qemu-ui-curses
Recommends: qemu-ui-gtk
%if 0%{?is_opensuse}
%if 0%{?suse_version} >= 1320 && 0%{?is_opensuse}
Recommends: qemu-ui-sdl
%endif
Recommends: qemu-x86
@ -470,10 +462,42 @@ Suggests: qemu-lang
%if 0%{?is_opensuse}
Recommends: qemu-ksm = %{qemuver}
%endif
Provides: qemu-audio-oss = %{qemuver}
Obsoletes: qemu-audio-oss < %{qemuver}
%define ppc_default_built_firmware {%nil}
# for the record, this set of firmware files is installed, but we don't
# build (yet): bamboo.dtb canyonlands.dtb hppa-firmware.img openbios-ppc openbios-sparc32
# openbios-sparc64 palcode-clipper petalogix-ml605.dtb petalogix-s3adsp1800.dtb ppc_rom.bin
# QEMU,cgthree.bin QEMU,tcx.bin qemu_vga.ndrv u-boot.e500 u-boot-sam460-20100605.bin
# This first list group isn't specific to what this instance builds
%define ppc_default_firmware {%nil}
%define ppc_extra_firmware {skiboot.lid slof.bin}
%define ppc64_only_default_firmware {spapr-rtas.bin}
%define ppc64_only_extra_firmware {%nil}
%define s390x_default_firmware {s390-ccw.img s390-netboot.img}
%define s390x_extra_firmware {%nil}
%define x86_default_firmware {linuxboot.bin linuxboot_dma.bin multiboot.bin \
kvmvapic.bin pvh.bin}
%define x86_extra_firmware {bios.bin bios-256k.bin pxe-e1000.rom pxe-eepro100.rom \
pxe-ne2k_pci.rom pxe-pcnet.rom pxe-rtl8139.rom pxe-virtio.rom sgabios.bin \
vgabios-bochs-display.bin vgabios.bin vgabios-cirrus.bin vgabios-qxl.bin \
vgabios-ramfb.bin vgabios-stdvga.bin vgabios-virtio.bin vgabios-vmware.bin}
%define x86_64_only_default_firmware {%nil}
%define x86_64_only_extra_firmware {efi-e1000.rom efi-e1000e.rom efi-eepro100.rom \
efi-ne2k_pci.rom efi-pcnet.rom efi-rtl8139.rom efi-virtio.rom efi-vmxnet3.rom}
%define firmware { \
%{?ppc_default_firmware} %{?ppc_extra_firmware} \
%{?ppc64_only_default_firmware} %{?ppc64_only_extra_firmware} \
%{?s390x_default_firmware} %{?s390x_extra_firmware} \
%{?x86_default_firmware} %{?x86_extra_firmware} \
%{?x86_64_only_default_firmware} %{?x86_64_only_extra_firmware} }
# This second list group is specific to what this instance builds
%define ppc_default_built_firmware %{ppc_default_firmware}
%if %{build_skiboot_from_source} && %{build_slof_from_source}
%define ppc_extra_built_firmware {skiboot.lid slof.bin}
%define ppc_extra_built_firmware %{ppc_extra_firmware}
%else
%if %{build_skiboot_from_source}
%define ppc_extra_built_firmware {skiboot.lid}
@ -484,36 +508,26 @@ Recommends: qemu-ksm = %{qemuver}
%endif
%ifarch ppc64
%define ppc64_only_default_built_firmware {spapr-rtas.bin}
%define ppc64_only_extra_built_firmware {%nil}
%define ppc64_only_default_built_firmware %{ppc64_only_default_firmware}
%define ppc64_only_extra_built_firmware %{ppc64_only_extra_firmware}
%endif
%ifarch s390x
%define s390x_default_built_firmware {s390-ccw.img s390-netboot.img}
%define s390x_extra_built_firmware {%nil}
%define s390x_default_built_firmware %{s390x_default_firmware}
%define s390x_extra_built_firmware %{s390x_extra_firmware}
%endif
%ifarch %ix86 x86_64
%define x86_default_built_firmware {linuxboot.bin linuxboot_dma.bin \
multiboot.bin kvmvapic.bin}
%define x86_default_built_firmware %{x86_default_firmware}
%ifarch x86_64
%define x86_64_only_default_built_firmware {%nil}
%define x86_64_only_default_built_firmware %{x86_64_only_default_firmware}
%endif
%endif
%define x86_extra_built_firmware_list {bios.bin bios-256k.bin pxe-e1000.rom \
pxe-eepro100.rom pxe-ne2k_pci.rom pxe-pcnet.rom pxe-rtl8139.rom pxe-virtio.rom \
sgabios.bin vgabios-bochs-display.bin vgabios.bin vgabios-cirrus.bin \
vgabios-qxl.bin vgabios-ramfb.bin vgabios-stdvga.bin vgabios-virtio.bin \
vgabios-vmware.bin}
%define x86_64_only_extra_built_firmware_list {efi-e1000.rom efi-e1000e.rom \
efi-eepro100.rom efi-ne2k_pci.rom efi-pcnet.rom efi-rtl8139.rom efi-virtio.rom \
efi-vmxnet3.rom}
%if %{build_x86_firmware_from_source}
%define x86_extra_built_firmware %{x86_extra_built_firmware_list}
%define x86_extra_built_firmware %{x86_extra_firmware}
%ifarch x86_64
%define x86_64_only_extra_built_firmware %{x86_64_only_extra_built_firmware_list}
%define x86_64_only_extra_built_firmware %{x86_64_only_extra_firmware}
%endif
%endif
@ -785,7 +799,7 @@ Release: 0
%description ui-gtk
This package contains a module for doing GTK based UI for QEMU.
%if 0%{?is_opensuse}
%if 0%{?suse_version} >= 1320 && 0%{?is_opensuse}
%package ui-sdl
Summary: SDL based UI support for QEMU
Group: System/Emulators/PC
@ -807,16 +821,6 @@ Release: 0
%description audio-alsa
This package contains a module for ALSA based audio support for QEMU.
%package audio-oss
Summary: OSS based audio support for QEMU
Group: System/Emulators/PC
Version: %{qemuver}
Release: 0
%{qemu_module_conflicts}
%description audio-oss
This package contains a module for OSS based audio support for QEMU.
%package audio-pa
Summary: Pulse Audio based audio support for QEMU
Group: System/Emulators/PC
@ -827,7 +831,7 @@ Release: 0
%description audio-pa
This package contains a module for Pulse Audio based audio support for QEMU.
%if 0%{?is_opensuse}
%if 0%{?suse_version} >= 1320 && 0%{?is_opensuse}
%package audio-sdl
Summary: SDL based audio support for QEMU
Group: System/Emulators/PC
@ -880,7 +884,7 @@ to provide information and control at the guest OS level.
%package seabios
Summary: x86 Legacy BIOS for QEMU
Group: System/Emulators/PC
Version: 1.12.0
Version: 1.12.1
Release: 0
BuildArch: noarch
Conflicts: %name < 1.6.0
@ -892,7 +896,7 @@ is the default and legacy BIOS for QEMU.
%package vgabios
Summary: VGA BIOSes for QEMU
Group: System/Emulators/PC
Version: 1.12.0
Version: 1.12.1
Release: 0
BuildArch: noarch
Conflicts: %name < 1.6.0
@ -989,30 +993,6 @@ This package provides a service file for starting and stopping KSM.
%patch0039 -p1
%patch0040 -p1
%patch0041 -p1
%patch0042 -p1
%patch0043 -p1
%patch0044 -p1
%patch0045 -p1
%patch0046 -p1
%patch0047 -p1
%patch0048 -p1
%patch0049 -p1
%patch0050 -p1
%patch0051 -p1
%patch0052 -p1
%patch0053 -p1
%patch0054 -p1
%patch0055 -p1
%patch0056 -p1
%patch0057 -p1
%patch0058 -p1
%patch0059 -p1
%patch0060 -p1
%patch0061 -p1
%patch0062 -p1
%patch0063 -p1
%patch0064 -p1
%patch0065 -p1
pushd roms/seabios
%patch1100 -p1
@ -1026,11 +1006,12 @@ pushd roms/ipxe
%patch1200 -p1
%if 0%{?suse_version} <= 1320
%patch1201 -p1
%endif
%patch1202 -p1
%patch1203 -p1
%endif
%ifarch aarch64
%patch1204 -p1
%patch1205 -p1
%endif
popd
pushd roms/sgabios
@ -1042,7 +1023,6 @@ pushd roms/SLOF
popd
pushd roms/skiboot
%patch1500 -p1
popd
pushd ui/keycodemapdb
@ -1051,23 +1031,29 @@ popd
pushd roms/openbios
popd
# as a safeguard, delete the firmware files that we intend to build
%if "%{name}" != "qemu-testsuite"
# delete the firmware files that we intend to build
for i in %built_firmware
%else
# delete the firmware files that we intend to link from built packages
for i in %firmware
%endif
do
unlink pc-bios/$i
done
%build
XC_COMPAT="
-DXC_WANT_COMPAT_DEVICEMODEL_API=1
-DXC_WANT_COMPAT_EVTCHN_API=1
-DXC_WANT_COMPAT_GNTTAB_API=1
-DXC_WANT_COMPAT_MAP_FOREIGN_API=1
"
XC_COMPAT="`echo ${XC_COMPAT} | xargs`"
sed -i~ /undef/d include/hw/xen/xen_common.h
diff -u include/hw/xen/xen_common.h~ include/hw/xen/xen_common.h || :
./configure \
%define _lto_cflags %{nil}
%if %build_in_tree
%define mybuilddir %{_builddir}/%buildsubdir
%else
%define mybuilddir %{_builddir}/mybuilddir
mkdir -p %mybuilddir
cd %mybuilddir
%endif
%{_builddir}/%buildsubdir/configure \
--prefix=%_prefix \
--sysconfdir=%_sysconfdir \
--libdir=%_libdir \
@ -1080,21 +1066,23 @@ diff -u include/hw/xen/xen_common.h~ include/hw/xen/xen_common.h || :
%else
--python=%_bindir/python2 \
%endif
--extra-cflags="%{optflags} ${XC_COMPAT}" \
--extra-cflags="%{optflags}" \
--disable-stack-protector \
--disable-strip \
--with-pkgversion="%(echo '%{distro}' | sed 's/ (.*)//')" \
--with-default-devices \
--enable-system --disable-linux-user \
--enable-tools --enable-guest-agent \
--enable-modules \
--enable-pie \
--enable-docs \
%if 0%{?is_opensuse}
--audio-drv-list="pa alsa sdl oss" \
%if 0%{?suse_version} >= 1320 && 0%{?is_opensuse}
--audio-drv-list="pa alsa sdl" \
%else
--audio-drv-list="pa alsa oss" \
--audio-drv-list="pa alsa" \
%endif
--enable-attr \
--disable-auth-pam \
--enable-bluez \
--enable-bochs \
--enable-brlapi \
@ -1118,6 +1106,7 @@ diff -u include/hw/xen/xen_common.h~ include/hw/xen/xen_common.h || :
--enable-gtk \
--disable-hax \
--disable-hvf \
--enable-iconv \
--disable-jemalloc \
%if %{kvm_available}
--enable-kvm \
@ -1143,6 +1132,11 @@ diff -u include/hw/xen/xen_common.h~ include/hw/xen/xen_common.h || :
--enable-libusb \
--disable-libxml2 \
--enable-linux-aio \
%if 0%{?is_opensuse}
--enable-lzfse \
%else
--disable-lzfse \
%endif
--enable-lzo \
--disable-malloc-trim \
--enable-membarrier \
@ -1197,15 +1191,12 @@ diff -u include/hw/xen/xen_common.h~ include/hw/xen/xen_common.h || :
%endif
--enable-replication \
--disable-sanitizers \
%if 0%{?is_opensuse}
%if 0%{?suse_version} >= 1320 && 0%{?is_opensuse}
--enable-sdl \
%if 0%{?suse_version} >= 1320
--with-sdlabi=2.0 \
%else
--with-sdlabi=1.2 \
%endif
--enable-sdl-image \
%else
--disable-sdl \
--disable-sdl-image \
%endif
%if 0%{?with_seccomp}
--enable-seccomp \
@ -1226,7 +1217,11 @@ diff -u include/hw/xen/xen_common.h~ include/hw/xen/xen_common.h || :
--enable-vde \
--enable-vdi \
--enable-vhost-crypto \
--enable-vhost-kernel \
--enable-vhost-net \
--enable-vhost-scsi \
--enable-vhost-user \
--enable-vhost-vsock \
%if 0%{?suse_version} >= 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
--enable-virglrenderer \
%endif
@ -1241,11 +1236,11 @@ diff -u include/hw/xen/xen_common.h~ include/hw/xen/xen_common.h || :
--enable-vte \
%endif
--enable-vvfat \
--enable-werror \
--disable-whpx \
%ifarch x86_64
--enable-xen \
--enable-xen-pci-passthrough \
--enable-xen-pv-domain-build \
%else
--disable-xen \
%endif
@ -1260,26 +1255,26 @@ make %{?_smp_mflags} V=1
%ifarch s390x
for i in %s390x_default_built_firmware
do
cp pc-bios/s390-ccw/$i pc-bios/
cp pc-bios/s390-ccw/$i %{_builddir}/%buildsubdir/pc-bios/
done
%endif
%ifarch ppc64
for i in %ppc64_only_default_built_firmware
do
cp pc-bios/spapr-rtas/$i pc-bios/
cp pc-bios/spapr-rtas/$i %{_builddir}/%buildsubdir/pc-bios/
done
%endif
%ifarch %ix86 x86_64
for i in %x86_default_built_firmware
do
cp pc-bios/optionrom/$i pc-bios/
cp pc-bios/optionrom/$i %{_builddir}/%buildsubdir/pc-bios/
done
%ifarch x86_64
for i in %x86_64_only_default_built_firmware
do
cp pc-bios/optionrom/$i pc-bios/
cp pc-bios/optionrom/$i %{_builddir}/%buildsubdir/pc-bios/
done
%endif
%endif
@ -1290,30 +1285,31 @@ export CC=x86_64-suse-linux-gcc
export LD=x86_64-suse-linux-ld
%endif
make %{?_smp_mflags} -C roms bios \
make %{?_smp_mflags} -C %{_builddir}/%buildsubdir/roms bios \
%ifnarch %ix86 x86_64
HOSTCC=cc \
%endif
make %{?_smp_mflags} -C roms seavgabios \
make %{?_smp_mflags} -C %{_builddir}/%buildsubdir/roms seavgabios \
%ifnarch %ix86 x86_64
HOSTCC=cc \
%endif
make %{?_smp_mflags} -C roms pxerom
make %{?_smp_mflags} -C %{_builddir}/%buildsubdir/roms pxerom
%ifnarch %ix86
make %{?_smp_mflags} -C roms efirom
make %{?_smp_mflags} -C %{_builddir}/%buildsubdir/roms efirom \
EDK2_BASETOOLS_OPTFLAGS='-fPIE'
%endif
make -C roms sgabios \
make -C %{_builddir}/%buildsubdir/roms sgabios \
HOSTCC=cc
%if %{force_fit_virtio_pxe_rom}
pushd roms/ipxe
pushd %{_builddir}/%buildsubdir/roms/ipxe
patch -p1 < %{SOURCE301}
popd
make %{?_smp_mflags} -C roms pxerom_variants=virtio pxerom_targets=1af41000 pxerom
make %{?_smp_mflags} -C %{_builddir}/%buildsubdir/roms pxerom_variants=virtio pxerom_targets=1af41000 pxerom
%endif
# enforce pxe rom sizes for migration compatability from SLE 11 SP3 forward
@ -1326,30 +1322,34 @@ make %{?_smp_mflags} -C roms pxerom_variants=virtio pxerom_targets=1af41000 pxer
for i in %supported_nics_large %unsupported_nics
do
if test "`stat -c '%s' pc-bios/pxe-$i.rom`" -gt "131072" ; then
if test "`stat -c '%s' %{_builddir}/%buildsubdir/pc-bios/pxe-$i.rom`" -gt "131072" ; then
echo "pxe rom is too large"
exit 1
fi
if test "`stat -c '%s' pc-bios/pxe-$i.rom`" -le "65536" ; then
./roms/ipxe/src/util/padimg.pl pc-bios/pxe-$i.rom -s 65536 -b 255
echo -ne "SEGMENT OVERAGE\0" >> pc-bios/pxe-$i.rom
if test "`stat -c '%s' %{_builddir}/%buildsubdir/pc-bios/pxe-$i.rom`" -le "65536" ; then
./%{_builddir}/%buildsubdir/roms/ipxe/src/util/padimg.pl %{_builddir}/%buildsubdir/pc-bios/pxe-$i.rom -s 65536 -b 255
echo -ne "SEGMENT OVERAGE\0" >> %{_builddir}/%buildsubdir/pc-bios/pxe-$i.rom
fi
done
for i in %supported_nics_small
do
if test "`stat -c '%s' pc-bios/pxe-$i.rom`" -gt "65536" ; then
if test "`stat -c '%s' %{_builddir}/%buildsubdir/pc-bios/pxe-$i.rom`" -gt "65536" ; then
echo "pxe rom is too large"
exit 1
fi
done
%ifnarch %{ix86} x86_64
unset CC
unset LD
%endif
%endif
%if %{build_skiboot_from_source}
make %{?_smp_mflags} -C roms skiboot CROSS=
make %{?_smp_mflags} -C %{_builddir}/%buildsubdir/roms skiboot CROSS=
%endif
%if %{build_slof_from_source}
make %{?_smp_mflags} -C roms slof
make %{?_smp_mflags} -C %{_builddir}/%buildsubdir/roms slof
%endif
%else # qemu-testsuite
@ -1357,46 +1357,46 @@ make %{?_smp_mflags} -C roms slof
ln -s %_bindir/qemu-img qemu-img
ln -s %_bindir/qemu-ga qemu-ga
ln -s %_bindir/qemu-io qemu-io
# And what about these binaries: qemu-nbd, elf2dmp, ivshmem-client, ivshmem-server, qemu-edid, qemu-keymap, qemu-pr-helper, virtfs-proxy-helper
for i in %built_firmware
for i in %firmware
do
ln -s %_datadir/%name/$i pc-bios/$i
done
for conf in default-configs/*-softmmu.mak; do
arch=`echo "$conf" | sed -e 's|default-configs/\(.*\)-softmmu.mak|\1|g'`
for conf in %{_builddir}/%buildsubdir/default-configs/*-softmmu.mak; do
arch=`echo "$conf" | sed -e 's|%{_builddir}/%buildsubdir/default-configs/\(.*\)-softmmu.mak|\1|g'`
ln -s %_bindir/qemu-system-$arch $arch-softmmu/qemu-system-$arch
done
# Compile the QOM test binary first, so that ...
touch -r config-host.mak pc-bios
make tests/qom-test %{?_smp_mflags} V=1
# Firmware
make %{?_smp_mflags} tests/qom-test %{?_smp_mflags} V=1
# ... make comes in fresh and has lots of address space (needed for 32bit, bsc#957379)
make check-report.html V=1
make %{?_smp_mflags} check-report.tap V=1
%endif
%check
cd %mybuilddir
%if "%{name}" == "qemu-testsuite"
export QEMU_PROG=%_bindir/qemu-system-x86_64
export QEMU_IMG_PROG=%_bindir/qemu-img
export QEMU_IO_PROG=%_bindir/qemu-io
export QEMU_NBD_PROG=%_bindir/qemu-nbd
make check-block V=1
make %{?_smp_mflags} check-block V=1
%endif # qemu-testsuite
%install
cd %mybuilddir
%if "%{name}" != "qemu-testsuite"
touch -r config-host.mak pc-bios
make install DESTDIR=%{buildroot}
make %{?_smp_mflags} install DESTDIR=%{buildroot}
%ifnarch %{build_rom_arch}
for f in %{x86_extra_built_firmware_list} \
%{x86_64_only_extra_built_firmware_list}; do
for f in %{x86_extra_firmware} \
%{x86_64_only_extra_firmware}; do
unlink %{buildroot}%_datadir/%name/$f
done
%endif
@ -1449,8 +1449,7 @@ install -D -m 0644 %{SOURCE2} %{buildroot}%_libexecdir/modules-load.d/kvm.conf
%else # qemu-testsuite
install -D -m 0644 check-report.html %{buildroot}%_datadir/qemu/check-report.html
install -D -m 0644 check-report.xml %{buildroot}%_datadir/qemu/check-report.xml
install -D -m 0644 check-report.tap %{buildroot}%_datadir/qemu/check-report.tap
%endif
@ -1529,6 +1528,49 @@ fi
%if "%{name}" != "qemu-testsuite"
%doc Changelog README VERSION
%license COPYING COPYING.LIB LICENSE
%dir %_docdir/%name/interop
%dir %_docdir/%name/interop/_static
%_docdir/%name/interop/.buildinfo
%_docdir/%name/interop/_static/ajax-loader.gif
%_docdir/%name/interop/_static/alabaster.css
%_docdir/%name/interop/_static/basic.css
%_docdir/%name/interop/_static/comment-bright.png
%_docdir/%name/interop/_static/comment-close.png
%_docdir/%name/interop/_static/comment.png
%_docdir/%name/interop/_static/custom.css
%_docdir/%name/interop/_static/doctools.js
%if 0%{?sle_version} != 150000
%_docdir/%name/interop/_static/documentation_options.js
%endif
%_docdir/%name/interop/_static/down-pressed.png
%_docdir/%name/interop/_static/down.png
%_docdir/%name/interop/_static/file.png
%if 0%{?sle_version} != 150000
%_docdir/%name/interop/_static/jquery-3.2.1.js
%else
%_docdir/%name/interop/_static/jquery-3.1.0.js
%endif
%_docdir/%name/interop/_static/jquery.js
%if 0%{?sle_version} != 150000 && 0%{?sle_version} != 150100
%_docdir/%name/interop/_static/language_data.js
%endif
%_docdir/%name/interop/_static/minus.png
%_docdir/%name/interop/_static/plus.png
%_docdir/%name/interop/_static/pygments.css
%_docdir/%name/interop/_static/searchtools.js
%_docdir/%name/interop/_static/underscore-1.3.1.js
%_docdir/%name/interop/_static/underscore.js
%_docdir/%name/interop/_static/up-pressed.png
%_docdir/%name/interop/_static/up.png
%_docdir/%name/interop/_static/websupport.js
%_docdir/%name/interop/bitmaps.html
%_docdir/%name/interop/genindex.html
%_docdir/%name/interop/index.html
%_docdir/%name/interop/live-block-operations.html
%_docdir/%name/interop/objects.inv
%_docdir/%name/interop/pr-helper.html
%_docdir/%name/interop/search.html
%_docdir/%name/interop/searchindex.js
%_docdir/%name/qemu-doc.txt
%_docdir/%name/qemu-doc.html
%_docdir/%name/qemu-qmp-ref.txt
@ -1543,8 +1585,6 @@ fi
%dir %_datadir/%name
%_datadir/%name/keymaps
%_datadir/%name/trace-events-all
%_datadir/%name/qemu-icon.bmp
%_datadir/%name/qemu_logo_no_text.svg
%dir %_sysconfdir/%name
%_datadir/%name/qemu-ifup
%dir %_libexecdir/supportconfig
@ -1555,6 +1595,20 @@ fi
%ifarch s390x
%_libexecdir/modules-load.d/kvm.conf
%endif
%dir %_datadir/icons/hicolor
%dir %_datadir/icons/hicolor/*/
%dir %_datadir/icons/hicolor/*/apps
%_datadir/icons/hicolor/16x16/apps/qemu.png
%_datadir/icons/hicolor/24x24/apps/qemu.png
%_datadir/icons/hicolor/32x32/apps/qemu.bmp
%_datadir/icons/hicolor/32x32/apps/qemu.png
%_datadir/icons/hicolor/48x48/apps/qemu.png
%_datadir/icons/hicolor/64x64/apps/qemu.png
%_datadir/icons/hicolor/128x128/apps/qemu.png
%_datadir/icons/hicolor/256x256/apps/qemu.png
%_datadir/icons/hicolor/512x512/apps/qemu.png
%_datadir/icons/hicolor/scalable/apps/qemu.svg
%_datadir/applications/qemu.desktop
%endif
%files x86
@ -1565,6 +1619,7 @@ fi
%_datadir/%name/linuxboot.bin
%_datadir/%name/linuxboot_dma.bin
%_datadir/%name/multiboot.bin
%_datadir/%name/pvh.bin
%if 0%{?is_opensuse} == 0
%dir %_docdir/qemu-x86
%_docdir/qemu-x86/supported.txt
@ -1663,6 +1718,9 @@ fi
%defattr(-, root, root)
%dir %_libdir/%name
%_libdir/%name/block-dmg-bz2.so
%if 0%{?is_opensuse}
%_libdir/%name/block-dmg-lzfse.so
%endif
%if 0%{?with_glusterfs}
%files block-gluster
@ -1707,7 +1765,7 @@ fi
%dir %_libdir/%name
%_libdir/%name/ui-gtk.so
%if 0%{?is_opensuse}
%if 0%{?suse_version} >= 1320 && 0%{?is_opensuse}
%files ui-sdl
%defattr(-, root, root)
%dir %_libdir/%name
@ -1719,24 +1777,19 @@ fi
%dir %_libdir/%name
%_libdir/%name/audio-alsa.so
%files audio-oss
%defattr(-, root, root)
%dir %_libdir/%name
%_libdir/%name/audio-oss.so
%files audio-pa
%defattr(-, root, root)
%dir %_libdir/%name
%_libdir/%name/audio-pa.so
%if 0%{?is_opensuse}
%if 0%{?suse_version} >= 1320 && 0%{?is_opensuse}
%files audio-sdl
%defattr(-, root, root)
%dir %_libdir/%name
%_libdir/%name/audio-sdl.so
%endif
%files lang -f %name.lang
%files lang -f %mybuilddir/%name.lang
%defattr(-, root, root)
%ifarch %{build_rom_arch}
@ -1787,9 +1840,10 @@ fi
%_mandir/man1/qemu-img.1.gz
%_mandir/man1/virtfs-proxy-helper.1.gz
%_mandir/man8/qemu-nbd.8.gz
%_bindir/qemu-edid
%_bindir/elf2dmp
%_bindir/ivshmem-client
%_bindir/ivshmem-server
%_bindir/qemu-edid
%_bindir/qemu-io
%_bindir/qemu-img
%_bindir/qemu-keymap
@ -1816,8 +1870,7 @@ fi
%endif
%else # qemu-testsuite
%_datadir/qemu/check-report.xml
%_datadir/qemu/check-report.html
%_datadir/qemu/check-report.tap
%endif
%changelog

View File

@ -1,3 +1,178 @@
-------------------------------------------------------------------
Mon May 6 21:36:24 UTC 2019 - Bruce Rogers <brogers@suse.com>
- Disable LTO as suggested by Martin Liska (boo#1133281)
- Remove and obsolete qemu-oss-audio subpackage. OSS audio is very
old, and we didn't really even configure the package properly for
it for a very long time, so presumably there can't be any users
of it as far as qemu is concerned
- Avoid warnings which gcc9 complains about
0036-util-qemu-sockets-Fix-GCC-9-build-w.patch
0037-hw-usb-hcd-xhci-Fix-GCC-9-build-war.patch
0038-hw-usb-dev-mtp-Fix-GCC-9-build-warn.patch
0039-linux-user-uname-Fix-GCC-9-build-wa.patch
0040-linux-user-elfload-Fix-GCC-9-build-.patch
0041-qxl-fix-Waddress-of-packed-member.patch
- Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-4.0
-------------------------------------------------------------------
Wed May 1 19:29:10 UTC 2019 - Bruce Rogers <brogers@suse.com>
- Update to v4.0.0: See http://wiki.qemu.org/ChangeLog/4.0
Take note that ongoing feature deprecation is tracked at both
http://wiki.qemu-project.org/Features/LegacyRemoval and in
Appendix B of the qemu-doc.* files installed with the qemu package
Some noteworthy changes:
* ARM: ARMv8+ extensions for SB, PredInv, HPD, LOR, FHM, AA32HPD,
PAuth, JSConv, CondM, FRINT, and BTI
* ARM: new emulation support for "Musca" and "MPS2" development boards
* ARM: virt: support for >255GB of RAM and u-boot "noload" image types
* ARM: improved emulation of ARM PMU
* HPPA: support for TLB protection IDs and TLB trace events
* MIPS: support for multi-threaded TCG emulation
* MIPS: emulation support for I7200 I6500 CPUs, QMP-base querying of
CPU types, and improved support for SAARI and SAAR configuration registers
* MIPS: improvements to Interthread Communication Unit, Fulong 2E
machine types, and end-user documentation.
* PowerPC: pseries/powernv: support for POWER9 large decrementer
* PowerPC: pseries: emulation support for XIVE interrupt controller
* PowerPC: pseries: support for hotplugging PCI host bridges (PHBs)
* PowerPC: pseries: Spectre/Meltdown mitigations enabled by default,
additional support for count-cache-flush mitigation
* RISC-V: virt: support for PCI and USB
* RISC-V: support for TSR, TW, and TVM fields of mstatus, FS field now
supports three stats (dirty, clean, and off)
* RISC-V: built-in gdbserver supports register lists via XML files
* s390: support for z14 GA 2 CPU model, Multiple-epoch and PTFF
features now enabled in z14 CPU model by default
* s390: vfio-ap: now supports hot plug/unplug, and no longer inhibits memory
ballooning
* s390: emulation support for floating-point extension facility and
vector support instructions
* x86: HAX accelerator now supported POSIX hosts other than Darwin,
including Linux and NetBSD
* x86: Q35: advertised PCIe root port speeds will now optimally default
to maximum link speed (16GT/s) and width (x32) provided by PCIe 4.0 for
QEMU 4.0+ machine types; older machine types will retain 2.5GT/x1
defaults for compatibility.
* x86: Xen PVH images can now be booted with "-kernel" option
* Xtensa: xtfpga: improved SMP support for linux (interrupt
distributor, IPI, and runstall) and new SMP-capable test_mmuhifi_c3
core configuration
* Xtensa: support for Flexible length instructions extension (FLIX)
* GUI: new '-display spice-app' to configure/launch a Spice client GUI with
a similar UI to QEMU GTK. VNC server now supports access controls via
tls-authz/sasl-authz options
* QMP: support for "out-of-band" command execution, can be useful for
postcopy migration recovery. Additional QMP commands for working with
block devices and dirty bitmaps
* VFIO: EDID interface for supported mdev (Intel vGPU for kernel 5.0+),
allows resolution setting via xres/yres options.
* Xen: new 'xen-disk' device which can create a Xen PV disk backend,
and performance improvements for Xen PV disk backend.
* Network Block Device: improved tracing and error diagnostics, improved
client compatibility with buggy NBD server implementations, new
--bitmap, --list, --tls-authz options for qemu-nbd
* virtio-blk now supports DISCARD and WRITE_ZEROES
* qemu-test-suite output is now in TAP format
* Sphinx now used for part of qemu documentation
* A few more configure features are enabled: iconv, lzfse (for openSUSE)
* Provide better logo icons
- Made these package building changes:
* Removed this token from spec file: #!BuildIgnore: gcc-PIE
* Created ability to build qemu source out-of-tree
* Added BSD-2-Clause license clause due to EDK II code inclusion
* Patches dropped (upstream unless otherwise noted):
0010-Remove-problematic-evdev-86-key-fro.patch
0025-Fix-tigervnc-long-press-issue.patch
0026-string-input-visitor-Fix-uint64-par.patch
0027-test-string-input-visitor-Add-int-t.patch
0028-test-string-input-visitor-Add-uint6.patch
0029-tests-Add-QOM-property-unit-tests.patch
0030-tests-Add-scsi-disk-test.patch
0033-smbios-Add-1-terminator-if-any-stri.patch (different approach used)
0034-qemu-io-tests-comment-out-problemat.patch (not as needed)
0039-xen_disk-Avoid-repeated-memory-allo.patch
0041-vfio-ap-flag-as-compatible-with-bal.patch
0042-hw-s390x-Fix-bad-mask-in-time2tod.patch
0043-pcie-set-link-state-inactive-active.patch
0044-pc-piix4-Update-smbus-I-O-space-aft.patch
0045-hw-usb-fix-mistaken-de-initializati.patch
0046-usb-mtp-use-O_NOFOLLOW-and-O_CLOEXE.patch
0047-pvrdma-release-device-resources-in-.patch
0048-rdma-check-num_sge-does-not-exceed-.patch
0049-pvrdma-add-uar_read-routine.patch
0050-pvrdma-check-number-of-pages-when-c.patch
0051-pvrdma-check-return-value-from-pvrd.patch
0052-pvrdma-release-ring-object-in-case-.patch
0053-block-Fix-hangs-in-synchronous-APIs.patch
0054-linux-user-make-pwrite64-pread64-fd.patch
0055-xen-Add-xen-v4.12-based-xc_domain_c.patch
0056-slirp-check-data-length-while-emula.patch
0057-s390x-Return-specification-exceptio.patch
0059-memory-Fix-the-memory-region-type-a.patch
0060-target-i386-sev-Do-not-pin-the-ram-.patch
0061-slirp-check-sscanf-result-when-emul.patch
0062-ppc-add-host-serial-and-host-model-.patch
0063-i2c-ddc-fix-oob-read.patch
0064-device_tree.c-Don-t-use-load_image.patch
0065-spapr-Simplify-handling-of-host-ser.patch
ipxe-efi-guard-strncpy-with-gcc-warning-ignore-pragma.patch
ipxe-fix-build.patch
skiboot-hdata-i2c.c-fix-building-with-gcc8.patch
* Patches renamed:
0011-linux-user-use-target_ulong.patch
-> 0010-linux-user-use-target_ulong.patch
0012-Make-char-muxer-more-robust-wrt-sma.patch
-> 0011-Make-char-muxer-more-robust-wrt-sma.patch
0013-linux-user-lseek-explicitly-cast-no.patch
-> 0012-linux-user-lseek-explicitly-cast-no.patch
0014-AIO-Reduce-number-of-threads-for-32.patch
-> 0013-AIO-Reduce-number-of-threads-for-32.patch
0015-xen_disk-Add-suse-specific-flush-di.patch
-> 0014-xen_disk-Add-suse-specific-flush-di.patch
0016-qemu-bridge-helper-reduce-security-.patch
-> 0015-qemu-bridge-helper-reduce-security-.patch
0017-qemu-binfmt-conf-use-qemu-ARCH-binf.patch
-> 0016-qemu-binfmt-conf-use-qemu-ARCH-binf.patch
0018-linux-user-properly-test-for-infini.patch
-> 0017-linux-user-properly-test-for-infini.patch
0019-roms-Makefile-pass-a-packaging-time.patch
-> 0018-roms-Makefile-pass-a-packaging-time.patch
0020-Raise-soft-address-space-limit-to-h.patch
-> 0019-Raise-soft-address-space-limit-to-h.patch
0021-increase-x86_64-physical-bits-to-42.patch
-> 0020-increase-x86_64-physical-bits-to-42.patch
0022-vga-Raise-VRAM-to-16-MiB-for-pc-0.1.patch
-> 0021-vga-Raise-VRAM-to-16-MiB-for-pc-0.1.patch
0023-i8254-Fix-migration-from-SLE11-SP2.patch
-> 0022-i8254-Fix-migration-from-SLE11-SP2.patch
0024-acpi_piix4-Fix-migration-from-SLE11.patch
-> 0023-acpi_piix4-Fix-migration-from-SLE11.patch
0031-Switch-order-of-libraries-for-mpath.patch
-> 0024-Switch-order-of-libraries-for-mpath.patch
0032-Make-installed-scripts-explicitly-p.patch
-> 0025-Make-installed-scripts-explicitly-p.patch
0035-tests-test-thread-pool-is-racy-add-.patch
-> 0027-tests-test-thread-pool-is-racy-add-.patch
0036-xen-add-block-resize-support-for-xe.patch
-> 0028-xen-add-block-resize-support-for-xe.patch
0037-tests-qemu-iotests-Triple-timeout-o.patch
-> 0029-tests-qemu-iotests-Triple-timeout-o.patch
0038-tests-block-io-test-130-needs-some-.patch
-> 0030-tests-block-io-test-130-needs-some-.patch
0040-xen-ignore-live-parameter-from-xen-.patch
-> 0031-xen-ignore-live-parameter-from-xen-.patch
0058-Revert-target-i386-kvm-add-VMX-migr.patch
-> 0034-Revert-target-i386-kvm-add-VMX-migr.patch
* Patches added:
0026-hw-smbios-handle-both-file-formats-.patch
0032-tests-Fix-Makefile-handling-of-chec.patch
0033-Conditionalize-ui-bitmap-installati.patch
0035-tests-change-error-message-in-test-.patch
ipxe-efi-Avoid-string-op-warning-with-cross-gcc-7-compile.patch
- Patch queue updated from git://github.com/openSUSE/qemu.git opensuse-4.0
-------------------------------------------------------------------
Fri Mar 29 13:13:57 UTC 2019 - Bruce Rogers <brogers@suse.com>

471
qemu.spec
View File

@ -16,6 +16,7 @@
#
%define build_in_tree 1
%define build_x86_firmware_from_source 0
%define build_skiboot_from_source 0
%define build_slof_from_source 0
@ -115,10 +116,10 @@
Name: qemu
Url: https://www.qemu.org/
Summary: Machine emulator and virtualizer
License: BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT
License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT
Group: System/Emulators/PC
%define qemuver 3.1.0
%define srcver 3.1.0
%define qemuver 4.0.0
%define srcver 4.0.0
Version: %qemuver
Release: 0
Source: https://wiki.qemu.org/download/%{srcname}-%{srcver}.tar.xz
@ -152,62 +153,38 @@ Patch0006: 0006-linux-user-add-binfmt-wrapper-for-a.patch
Patch0007: 0007-PPC-KVM-Disable-mmu-notifier-check.patch
Patch0008: 0008-linux-user-binfmt-support-host-bina.patch
Patch0009: 0009-linux-user-Fake-proc-cpuinfo.patch
Patch0010: 0010-Remove-problematic-evdev-86-key-fro.patch
Patch0011: 0011-linux-user-use-target_ulong.patch
Patch0012: 0012-Make-char-muxer-more-robust-wrt-sma.patch
Patch0013: 0013-linux-user-lseek-explicitly-cast-no.patch
Patch0014: 0014-AIO-Reduce-number-of-threads-for-32.patch
Patch0015: 0015-xen_disk-Add-suse-specific-flush-di.patch
Patch0016: 0016-qemu-bridge-helper-reduce-security-.patch
Patch0017: 0017-qemu-binfmt-conf-use-qemu-ARCH-binf.patch
Patch0018: 0018-linux-user-properly-test-for-infini.patch
Patch0019: 0019-roms-Makefile-pass-a-packaging-time.patch
Patch0020: 0020-Raise-soft-address-space-limit-to-h.patch
Patch0021: 0021-increase-x86_64-physical-bits-to-42.patch
Patch0022: 0022-vga-Raise-VRAM-to-16-MiB-for-pc-0.1.patch
Patch0023: 0023-i8254-Fix-migration-from-SLE11-SP2.patch
Patch0024: 0024-acpi_piix4-Fix-migration-from-SLE11.patch
Patch0025: 0025-Fix-tigervnc-long-press-issue.patch
Patch0026: 0026-string-input-visitor-Fix-uint64-par.patch
Patch0027: 0027-test-string-input-visitor-Add-int-t.patch
Patch0028: 0028-test-string-input-visitor-Add-uint6.patch
Patch0029: 0029-tests-Add-QOM-property-unit-tests.patch
Patch0030: 0030-tests-Add-scsi-disk-test.patch
Patch0031: 0031-Switch-order-of-libraries-for-mpath.patch
Patch0032: 0032-Make-installed-scripts-explicitly-p.patch
Patch0033: 0033-smbios-Add-1-terminator-if-any-stri.patch
Patch0034: 0034-qemu-io-tests-comment-out-problemat.patch
Patch0035: 0035-tests-test-thread-pool-is-racy-add-.patch
Patch0036: 0036-xen-add-block-resize-support-for-xe.patch
Patch0037: 0037-tests-qemu-iotests-Triple-timeout-o.patch
Patch0038: 0038-tests-block-io-test-130-needs-some-.patch
Patch0039: 0039-xen_disk-Avoid-repeated-memory-allo.patch
Patch0040: 0040-xen-ignore-live-parameter-from-xen-.patch
Patch0041: 0041-vfio-ap-flag-as-compatible-with-bal.patch
Patch0042: 0042-hw-s390x-Fix-bad-mask-in-time2tod.patch
Patch0043: 0043-pcie-set-link-state-inactive-active.patch
Patch0044: 0044-pc-piix4-Update-smbus-I-O-space-aft.patch
Patch0045: 0045-hw-usb-fix-mistaken-de-initializati.patch
Patch0046: 0046-usb-mtp-use-O_NOFOLLOW-and-O_CLOEXE.patch
Patch0047: 0047-pvrdma-release-device-resources-in-.patch
Patch0048: 0048-rdma-check-num_sge-does-not-exceed-.patch
Patch0049: 0049-pvrdma-add-uar_read-routine.patch
Patch0050: 0050-pvrdma-check-number-of-pages-when-c.patch
Patch0051: 0051-pvrdma-check-return-value-from-pvrd.patch
Patch0052: 0052-pvrdma-release-ring-object-in-case-.patch
Patch0053: 0053-block-Fix-hangs-in-synchronous-APIs.patch
Patch0054: 0054-linux-user-make-pwrite64-pread64-fd.patch
Patch0055: 0055-xen-Add-xen-v4.12-based-xc_domain_c.patch
Patch0056: 0056-slirp-check-data-length-while-emula.patch
Patch0057: 0057-s390x-Return-specification-exceptio.patch
Patch0058: 0058-Revert-target-i386-kvm-add-VMX-migr.patch
Patch0059: 0059-memory-Fix-the-memory-region-type-a.patch
Patch0060: 0060-target-i386-sev-Do-not-pin-the-ram-.patch
Patch0061: 0061-slirp-check-sscanf-result-when-emul.patch
Patch0062: 0062-ppc-add-host-serial-and-host-model-.patch
Patch0063: 0063-i2c-ddc-fix-oob-read.patch
Patch0064: 0064-device_tree.c-Don-t-use-load_image.patch
Patch0065: 0065-spapr-Simplify-handling-of-host-ser.patch
Patch0010: 0010-linux-user-use-target_ulong.patch
Patch0011: 0011-Make-char-muxer-more-robust-wrt-sma.patch
Patch0012: 0012-linux-user-lseek-explicitly-cast-no.patch
Patch0013: 0013-AIO-Reduce-number-of-threads-for-32.patch
Patch0014: 0014-xen_disk-Add-suse-specific-flush-di.patch
Patch0015: 0015-qemu-bridge-helper-reduce-security-.patch
Patch0016: 0016-qemu-binfmt-conf-use-qemu-ARCH-binf.patch
Patch0017: 0017-linux-user-properly-test-for-infini.patch
Patch0018: 0018-roms-Makefile-pass-a-packaging-time.patch
Patch0019: 0019-Raise-soft-address-space-limit-to-h.patch
Patch0020: 0020-increase-x86_64-physical-bits-to-42.patch
Patch0021: 0021-vga-Raise-VRAM-to-16-MiB-for-pc-0.1.patch
Patch0022: 0022-i8254-Fix-migration-from-SLE11-SP2.patch
Patch0023: 0023-acpi_piix4-Fix-migration-from-SLE11.patch
Patch0024: 0024-Switch-order-of-libraries-for-mpath.patch
Patch0025: 0025-Make-installed-scripts-explicitly-p.patch
Patch0026: 0026-hw-smbios-handle-both-file-formats-.patch
Patch0027: 0027-tests-test-thread-pool-is-racy-add-.patch
Patch0028: 0028-xen-add-block-resize-support-for-xe.patch
Patch0029: 0029-tests-qemu-iotests-Triple-timeout-o.patch
Patch0030: 0030-tests-block-io-test-130-needs-some-.patch
Patch0031: 0031-xen-ignore-live-parameter-from-xen-.patch
Patch0032: 0032-tests-Fix-Makefile-handling-of-chec.patch
Patch0033: 0033-Conditionalize-ui-bitmap-installati.patch
Patch0034: 0034-Revert-target-i386-kvm-add-VMX-migr.patch
Patch0035: 0035-tests-change-error-message-in-test-.patch
Patch0036: 0036-util-qemu-sockets-Fix-GCC-9-build-w.patch
Patch0037: 0037-hw-usb-hcd-xhci-Fix-GCC-9-build-war.patch
Patch0038: 0038-hw-usb-dev-mtp-Fix-GCC-9-build-warn.patch
Patch0039: 0039-linux-user-uname-Fix-GCC-9-build-wa.patch
Patch0040: 0040-linux-user-elfload-Fix-GCC-9-build-.patch
Patch0041: 0041-qxl-fix-Waddress-of-packed-member.patch
# Please do not add QEMU patches manually here.
# Run update_git.sh to regenerate this queue.
@ -219,10 +196,9 @@ Patch1102: seabios-fix_cross_compilation.patch
# ipxe - path: roms/ipxe (patch range 1200-1299)
Patch1200: ipxe-stable-buildid.patch
Patch1201: ipxe-use-gcc6-for-more-compact-code.patch
Patch1202: ipxe-efi-guard-strncpy-with-gcc-warning-ignore-pragma.patch
Patch1203: ipxe-fix-build.patch
Patch1204: ipxe-efi-Simplify-diagnostic-for-NULL-handle.patch
Patch1205: ipxe-build-Disable-gcc-address-of-packed-member-warning.patch
Patch1202: ipxe-efi-Simplify-diagnostic-for-NULL-handle.patch
Patch1203: ipxe-build-Disable-gcc-address-of-packed-member-warning.patch
Patch1204: ipxe-efi-Avoid-string-op-warning-with-cross-gcc-7-compile.patch
# sgabios - path: roms/sgabios (patch range 1300-1399)
Patch1300: sgabios-stable-buildid.patch
@ -230,8 +206,7 @@ Patch1301: sgabios-fix-cross-build.patch
# SLOF - path: roms/SLOF (patch range 1400-1499) (Currently no patches)
# skiboot - path: roms/skiboot (patch range 1500-1599)
Patch1500: skiboot-hdata-i2c.c-fix-building-with-gcc8.patch
# skiboot - path: roms/skiboot (patch range 1500-1599) (Currently no patches)
# keycodemapdb - path: ui/keycodemapdb (patch range 1600-1699) (Currently no patches)
@ -242,30 +217,28 @@ Patch1500: skiboot-hdata-i2c.c-fix-building-with-gcc8.patch
ExcludeArch: s390
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#!BuildIgnore: gcc-PIE
BuildRequires: Mesa-devel
%if 0%{?is_opensuse}
BuildRequires: SDL-devel
%if 0%{?suse_version} >= 1320
BuildRequires: SDL2-devel
%endif
%if %{build_x86_firmware_from_source}
BuildRequires: acpica
%endif
BuildRequires: alsa-devel
%if %{build_x86_firmware_from_source}
BuildRequires: acpica
BuildRequires: binutils-devel
%endif
BuildRequires: bison
BuildRequires: bluez-devel
BuildRequires: brlapi-devel
%if %{build_x86_firmware_from_source}
%ifnarch %{ix86} x86_64
# We must cross-compile on non-x86*
BuildRequires: cross-x86_64-binutils
BuildRequires: cross-x86_64-gcc7
%endif
%endif
BuildRequires: bluez-devel
BuildRequires: brlapi-devel
BuildRequires: curl-devel
BuildRequires: cyrus-sasl-devel
BuildRequires: e2fsprogs-devel
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gcc-c++
%if %{build_x86_firmware_from_source}
%if 0%{?suse_version} <= 1320
@ -333,6 +306,10 @@ BuildRequires: librbd-devel
BuildRequires: ceph-devel
%endif
%endif
%if 0%{?suse_version} >= 1320 && 0%{?is_opensuse}
BuildRequires: libSDL2-devel
BuildRequires: libSDL2_image-devel
%endif
%if 0%{?with_seccomp}
BuildRequires: libseccomp-devel
%endif
@ -345,6 +322,10 @@ BuildRequires: libvdeplug-devel
%else
BuildRequires: libvdeplug3-devel
%endif
%if 0%{?is_opensuse}
BuildRequires: lzfse-devel
%endif
BuildRequires: Mesa-devel
BuildRequires: libxkbcommon-devel
BuildRequires: lzo-devel
BuildRequires: makeinfo
@ -352,9 +333,6 @@ BuildRequires: makeinfo
BuildRequires: multipath-tools-devel
%endif
BuildRequires: ncurses-devel
%if %{build_x86_firmware_from_source}
BuildRequires: ovmf-tools
%endif
BuildRequires: pkgconfig
BuildRequires: pwdutils
%if 0%{?suse_version} > 1320
@ -362,6 +340,7 @@ BuildRequires: python3-base
%else
BuildRequires: python-base
%endif
BuildRequires: python-Sphinx
%if 0%{?suse_version} >= 1315
BuildRequires: rdma-core-devel
%endif
@ -390,7 +369,12 @@ BuildRequires: zlib-devel
BuildRequires: python-base
%endif
BuildRequires: bc
BuildRequires: qemu-arm = %{qemuver}
BuildRequires: qemu-arm = %{qemuver}
BuildRequires: qemu-audio-alsa = %{qemuver}
BuildRequires: qemu-audio-pa = %{qemuver}
%if 0%{?suse_version} >= 1320 && 0%{?is_opensuse}
BuildRequires: qemu-audio-sdl = %{qemuver}
%endif
BuildRequires: qemu-block-curl = %{qemuver}
BuildRequires: qemu-block-dmg = %{qemuver}
%if 0%{?with_glusterfs}
@ -408,14 +392,22 @@ BuildRequires: qemu-block-rbd = %{qemuver}
BuildRequires: qemu-block-ssh = %{qemuver}
BuildRequires: qemu-extra = %{qemuver}
BuildRequires: qemu-guest-agent = %{qemuver}
BuildRequires: qemu-ipxe = 1.0.0+
%if 0%{?is_opensuse}
BuildRequires: qemu-ksm = %{qemuver}
%endif
BuildRequires: qemu-lang = %{qemuver}
BuildRequires: qemu-ppc = %{qemuver}
BuildRequires: qemu-s390 = %{qemuver}
BuildRequires: qemu-seabios = 1.12.1
BuildRequires: qemu-sgabios = 8
BuildRequires: qemu-tools = %{qemuver}
BuildRequires: qemu-ui-curses = %{qemuver}
BuildRequires: qemu-ui-gtk = %{qemuver}
%if 0%{?is_opensuse}
%if 0%{?suse_version} >= 1320 && 0%{?is_opensuse}
BuildRequires: qemu-ui-sdl = %{qemuver}
%endif
BuildRequires: qemu-vgabios = 1.12.1
BuildRequires: qemu-x86 = %{qemuver}
%endif
Requires(pre): shadow
@ -432,7 +424,7 @@ Recommends: qemu-block-curl
Recommends: qemu-tools
Recommends: qemu-ui-curses
Recommends: qemu-ui-gtk
%if 0%{?is_opensuse}
%if 0%{?suse_version} >= 1320 && 0%{?is_opensuse}
Recommends: qemu-ui-sdl
%endif
Recommends: qemu-x86
@ -470,10 +462,42 @@ Suggests: qemu-lang
%if 0%{?is_opensuse}
Recommends: qemu-ksm = %{qemuver}
%endif
Provides: qemu-audio-oss = %{qemuver}
Obsoletes: qemu-audio-oss < %{qemuver}
%define ppc_default_built_firmware {%nil}
# for the record, this set of firmware files is installed, but we don't
# build (yet): bamboo.dtb canyonlands.dtb hppa-firmware.img openbios-ppc openbios-sparc32
# openbios-sparc64 palcode-clipper petalogix-ml605.dtb petalogix-s3adsp1800.dtb ppc_rom.bin
# QEMU,cgthree.bin QEMU,tcx.bin qemu_vga.ndrv u-boot.e500 u-boot-sam460-20100605.bin
# This first list group isn't specific to what this instance builds
%define ppc_default_firmware {%nil}
%define ppc_extra_firmware {skiboot.lid slof.bin}
%define ppc64_only_default_firmware {spapr-rtas.bin}
%define ppc64_only_extra_firmware {%nil}
%define s390x_default_firmware {s390-ccw.img s390-netboot.img}
%define s390x_extra_firmware {%nil}
%define x86_default_firmware {linuxboot.bin linuxboot_dma.bin multiboot.bin \
kvmvapic.bin pvh.bin}
%define x86_extra_firmware {bios.bin bios-256k.bin pxe-e1000.rom pxe-eepro100.rom \
pxe-ne2k_pci.rom pxe-pcnet.rom pxe-rtl8139.rom pxe-virtio.rom sgabios.bin \
vgabios-bochs-display.bin vgabios.bin vgabios-cirrus.bin vgabios-qxl.bin \
vgabios-ramfb.bin vgabios-stdvga.bin vgabios-virtio.bin vgabios-vmware.bin}
%define x86_64_only_default_firmware {%nil}
%define x86_64_only_extra_firmware {efi-e1000.rom efi-e1000e.rom efi-eepro100.rom \
efi-ne2k_pci.rom efi-pcnet.rom efi-rtl8139.rom efi-virtio.rom efi-vmxnet3.rom}
%define firmware { \
%{?ppc_default_firmware} %{?ppc_extra_firmware} \
%{?ppc64_only_default_firmware} %{?ppc64_only_extra_firmware} \
%{?s390x_default_firmware} %{?s390x_extra_firmware} \
%{?x86_default_firmware} %{?x86_extra_firmware} \
%{?x86_64_only_default_firmware} %{?x86_64_only_extra_firmware} }
# This second list group is specific to what this instance builds
%define ppc_default_built_firmware %{ppc_default_firmware}
%if %{build_skiboot_from_source} && %{build_slof_from_source}
%define ppc_extra_built_firmware {skiboot.lid slof.bin}
%define ppc_extra_built_firmware %{ppc_extra_firmware}
%else
%if %{build_skiboot_from_source}
%define ppc_extra_built_firmware {skiboot.lid}
@ -484,36 +508,26 @@ Recommends: qemu-ksm = %{qemuver}
%endif
%ifarch ppc64
%define ppc64_only_default_built_firmware {spapr-rtas.bin}
%define ppc64_only_extra_built_firmware {%nil}
%define ppc64_only_default_built_firmware %{ppc64_only_default_firmware}
%define ppc64_only_extra_built_firmware %{ppc64_only_extra_firmware}
%endif
%ifarch s390x
%define s390x_default_built_firmware {s390-ccw.img s390-netboot.img}
%define s390x_extra_built_firmware {%nil}
%define s390x_default_built_firmware %{s390x_default_firmware}
%define s390x_extra_built_firmware %{s390x_extra_firmware}
%endif
%ifarch %ix86 x86_64
%define x86_default_built_firmware {linuxboot.bin linuxboot_dma.bin \
multiboot.bin kvmvapic.bin}
%define x86_default_built_firmware %{x86_default_firmware}
%ifarch x86_64
%define x86_64_only_default_built_firmware {%nil}
%define x86_64_only_default_built_firmware %{x86_64_only_default_firmware}
%endif
%endif
%define x86_extra_built_firmware_list {bios.bin bios-256k.bin pxe-e1000.rom \
pxe-eepro100.rom pxe-ne2k_pci.rom pxe-pcnet.rom pxe-rtl8139.rom pxe-virtio.rom \
sgabios.bin vgabios-bochs-display.bin vgabios.bin vgabios-cirrus.bin \
vgabios-qxl.bin vgabios-ramfb.bin vgabios-stdvga.bin vgabios-virtio.bin \
vgabios-vmware.bin}
%define x86_64_only_extra_built_firmware_list {efi-e1000.rom efi-e1000e.rom \
efi-eepro100.rom efi-ne2k_pci.rom efi-pcnet.rom efi-rtl8139.rom efi-virtio.rom \
efi-vmxnet3.rom}
%if %{build_x86_firmware_from_source}
%define x86_extra_built_firmware %{x86_extra_built_firmware_list}
%define x86_extra_built_firmware %{x86_extra_firmware}
%ifarch x86_64
%define x86_64_only_extra_built_firmware %{x86_64_only_extra_built_firmware_list}
%define x86_64_only_extra_built_firmware %{x86_64_only_extra_firmware}
%endif
%endif
@ -785,7 +799,7 @@ Release: 0
%description ui-gtk
This package contains a module for doing GTK based UI for QEMU.
%if 0%{?is_opensuse}
%if 0%{?suse_version} >= 1320 && 0%{?is_opensuse}
%package ui-sdl
Summary: SDL based UI support for QEMU
Group: System/Emulators/PC
@ -807,16 +821,6 @@ Release: 0
%description audio-alsa
This package contains a module for ALSA based audio support for QEMU.
%package audio-oss
Summary: OSS based audio support for QEMU
Group: System/Emulators/PC
Version: %{qemuver}
Release: 0
%{qemu_module_conflicts}
%description audio-oss
This package contains a module for OSS based audio support for QEMU.
%package audio-pa
Summary: Pulse Audio based audio support for QEMU
Group: System/Emulators/PC
@ -827,7 +831,7 @@ Release: 0
%description audio-pa
This package contains a module for Pulse Audio based audio support for QEMU.
%if 0%{?is_opensuse}
%if 0%{?suse_version} >= 1320 && 0%{?is_opensuse}
%package audio-sdl
Summary: SDL based audio support for QEMU
Group: System/Emulators/PC
@ -880,7 +884,7 @@ to provide information and control at the guest OS level.
%package seabios
Summary: x86 Legacy BIOS for QEMU
Group: System/Emulators/PC
Version: 1.12.0
Version: 1.12.1
Release: 0
BuildArch: noarch
Conflicts: %name < 1.6.0
@ -892,7 +896,7 @@ is the default and legacy BIOS for QEMU.
%package vgabios
Summary: VGA BIOSes for QEMU
Group: System/Emulators/PC
Version: 1.12.0
Version: 1.12.1
Release: 0
BuildArch: noarch
Conflicts: %name < 1.6.0
@ -989,30 +993,6 @@ This package provides a service file for starting and stopping KSM.
%patch0039 -p1
%patch0040 -p1
%patch0041 -p1
%patch0042 -p1
%patch0043 -p1
%patch0044 -p1
%patch0045 -p1
%patch0046 -p1
%patch0047 -p1
%patch0048 -p1
%patch0049 -p1
%patch0050 -p1
%patch0051 -p1
%patch0052 -p1
%patch0053 -p1
%patch0054 -p1
%patch0055 -p1
%patch0056 -p1
%patch0057 -p1
%patch0058 -p1
%patch0059 -p1
%patch0060 -p1
%patch0061 -p1
%patch0062 -p1
%patch0063 -p1
%patch0064 -p1
%patch0065 -p1
pushd roms/seabios
%patch1100 -p1
@ -1026,11 +1006,12 @@ pushd roms/ipxe
%patch1200 -p1
%if 0%{?suse_version} <= 1320
%patch1201 -p1
%endif
%patch1202 -p1
%patch1203 -p1
%endif
%ifarch aarch64
%patch1204 -p1
%patch1205 -p1
%endif
popd
pushd roms/sgabios
@ -1042,7 +1023,6 @@ pushd roms/SLOF
popd
pushd roms/skiboot
%patch1500 -p1
popd
pushd ui/keycodemapdb
@ -1051,23 +1031,29 @@ popd
pushd roms/openbios
popd
# as a safeguard, delete the firmware files that we intend to build
%if "%{name}" != "qemu-testsuite"
# delete the firmware files that we intend to build
for i in %built_firmware
%else
# delete the firmware files that we intend to link from built packages
for i in %firmware
%endif
do
unlink pc-bios/$i
done
%build
XC_COMPAT="
-DXC_WANT_COMPAT_DEVICEMODEL_API=1
-DXC_WANT_COMPAT_EVTCHN_API=1
-DXC_WANT_COMPAT_GNTTAB_API=1
-DXC_WANT_COMPAT_MAP_FOREIGN_API=1
"
XC_COMPAT="`echo ${XC_COMPAT} | xargs`"
sed -i~ /undef/d include/hw/xen/xen_common.h
diff -u include/hw/xen/xen_common.h~ include/hw/xen/xen_common.h || :
./configure \
%define _lto_cflags %{nil}
%if %build_in_tree
%define mybuilddir %{_builddir}/%buildsubdir
%else
%define mybuilddir %{_builddir}/mybuilddir
mkdir -p %mybuilddir
cd %mybuilddir
%endif
%{_builddir}/%buildsubdir/configure \
--prefix=%_prefix \
--sysconfdir=%_sysconfdir \
--libdir=%_libdir \
@ -1080,21 +1066,23 @@ diff -u include/hw/xen/xen_common.h~ include/hw/xen/xen_common.h || :
%else
--python=%_bindir/python2 \
%endif
--extra-cflags="%{optflags} ${XC_COMPAT}" \
--extra-cflags="%{optflags}" \
--disable-stack-protector \
--disable-strip \
--with-pkgversion="%(echo '%{distro}' | sed 's/ (.*)//')" \
--with-default-devices \
--enable-system --disable-linux-user \
--enable-tools --enable-guest-agent \
--enable-modules \
--enable-pie \
--enable-docs \
%if 0%{?is_opensuse}
--audio-drv-list="pa alsa sdl oss" \
%if 0%{?suse_version} >= 1320 && 0%{?is_opensuse}
--audio-drv-list="pa alsa sdl" \
%else
--audio-drv-list="pa alsa oss" \
--audio-drv-list="pa alsa" \
%endif
--enable-attr \
--disable-auth-pam \
--enable-bluez \
--enable-bochs \
--enable-brlapi \
@ -1118,6 +1106,7 @@ diff -u include/hw/xen/xen_common.h~ include/hw/xen/xen_common.h || :
--enable-gtk \
--disable-hax \
--disable-hvf \
--enable-iconv \
--disable-jemalloc \
%if %{kvm_available}
--enable-kvm \
@ -1143,6 +1132,11 @@ diff -u include/hw/xen/xen_common.h~ include/hw/xen/xen_common.h || :
--enable-libusb \
--disable-libxml2 \
--enable-linux-aio \
%if 0%{?is_opensuse}
--enable-lzfse \
%else
--disable-lzfse \
%endif
--enable-lzo \
--disable-malloc-trim \
--enable-membarrier \
@ -1197,15 +1191,12 @@ diff -u include/hw/xen/xen_common.h~ include/hw/xen/xen_common.h || :
%endif
--enable-replication \
--disable-sanitizers \
%if 0%{?is_opensuse}
%if 0%{?suse_version} >= 1320 && 0%{?is_opensuse}
--enable-sdl \
%if 0%{?suse_version} >= 1320
--with-sdlabi=2.0 \
%else
--with-sdlabi=1.2 \
%endif
--enable-sdl-image \
%else
--disable-sdl \
--disable-sdl-image \
%endif
%if 0%{?with_seccomp}
--enable-seccomp \
@ -1226,7 +1217,11 @@ diff -u include/hw/xen/xen_common.h~ include/hw/xen/xen_common.h || :
--enable-vde \
--enable-vdi \
--enable-vhost-crypto \
--enable-vhost-kernel \
--enable-vhost-net \
--enable-vhost-scsi \
--enable-vhost-user \
--enable-vhost-vsock \
%if 0%{?suse_version} >= 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
--enable-virglrenderer \
%endif
@ -1241,11 +1236,11 @@ diff -u include/hw/xen/xen_common.h~ include/hw/xen/xen_common.h || :
--enable-vte \
%endif
--enable-vvfat \
--enable-werror \
--disable-whpx \
%ifarch x86_64
--enable-xen \
--enable-xen-pci-passthrough \
--enable-xen-pv-domain-build \
%else
--disable-xen \
%endif
@ -1260,26 +1255,26 @@ make %{?_smp_mflags} V=1
%ifarch s390x
for i in %s390x_default_built_firmware
do
cp pc-bios/s390-ccw/$i pc-bios/
cp pc-bios/s390-ccw/$i %{_builddir}/%buildsubdir/pc-bios/
done
%endif
%ifarch ppc64
for i in %ppc64_only_default_built_firmware
do
cp pc-bios/spapr-rtas/$i pc-bios/
cp pc-bios/spapr-rtas/$i %{_builddir}/%buildsubdir/pc-bios/
done
%endif
%ifarch %ix86 x86_64
for i in %x86_default_built_firmware
do
cp pc-bios/optionrom/$i pc-bios/
cp pc-bios/optionrom/$i %{_builddir}/%buildsubdir/pc-bios/
done
%ifarch x86_64
for i in %x86_64_only_default_built_firmware
do
cp pc-bios/optionrom/$i pc-bios/
cp pc-bios/optionrom/$i %{_builddir}/%buildsubdir/pc-bios/
done
%endif
%endif
@ -1290,30 +1285,31 @@ export CC=x86_64-suse-linux-gcc
export LD=x86_64-suse-linux-ld
%endif
make %{?_smp_mflags} -C roms bios \
make %{?_smp_mflags} -C %{_builddir}/%buildsubdir/roms bios \
%ifnarch %ix86 x86_64
HOSTCC=cc \
%endif
make %{?_smp_mflags} -C roms seavgabios \
make %{?_smp_mflags} -C %{_builddir}/%buildsubdir/roms seavgabios \
%ifnarch %ix86 x86_64
HOSTCC=cc \
%endif
make %{?_smp_mflags} -C roms pxerom
make %{?_smp_mflags} -C %{_builddir}/%buildsubdir/roms pxerom
%ifnarch %ix86
make %{?_smp_mflags} -C roms efirom
make %{?_smp_mflags} -C %{_builddir}/%buildsubdir/roms efirom \
EDK2_BASETOOLS_OPTFLAGS='-fPIE'
%endif
make -C roms sgabios \
make -C %{_builddir}/%buildsubdir/roms sgabios \
HOSTCC=cc
%if %{force_fit_virtio_pxe_rom}
pushd roms/ipxe
pushd %{_builddir}/%buildsubdir/roms/ipxe
patch -p1 < %{SOURCE301}
popd
make %{?_smp_mflags} -C roms pxerom_variants=virtio pxerom_targets=1af41000 pxerom
make %{?_smp_mflags} -C %{_builddir}/%buildsubdir/roms pxerom_variants=virtio pxerom_targets=1af41000 pxerom
%endif
# enforce pxe rom sizes for migration compatability from SLE 11 SP3 forward
@ -1326,30 +1322,34 @@ make %{?_smp_mflags} -C roms pxerom_variants=virtio pxerom_targets=1af41000 pxer
for i in %supported_nics_large %unsupported_nics
do
if test "`stat -c '%s' pc-bios/pxe-$i.rom`" -gt "131072" ; then
if test "`stat -c '%s' %{_builddir}/%buildsubdir/pc-bios/pxe-$i.rom`" -gt "131072" ; then
echo "pxe rom is too large"
exit 1
fi
if test "`stat -c '%s' pc-bios/pxe-$i.rom`" -le "65536" ; then
./roms/ipxe/src/util/padimg.pl pc-bios/pxe-$i.rom -s 65536 -b 255
echo -ne "SEGMENT OVERAGE\0" >> pc-bios/pxe-$i.rom
if test "`stat -c '%s' %{_builddir}/%buildsubdir/pc-bios/pxe-$i.rom`" -le "65536" ; then
./%{_builddir}/%buildsubdir/roms/ipxe/src/util/padimg.pl %{_builddir}/%buildsubdir/pc-bios/pxe-$i.rom -s 65536 -b 255
echo -ne "SEGMENT OVERAGE\0" >> %{_builddir}/%buildsubdir/pc-bios/pxe-$i.rom
fi
done
for i in %supported_nics_small
do
if test "`stat -c '%s' pc-bios/pxe-$i.rom`" -gt "65536" ; then
if test "`stat -c '%s' %{_builddir}/%buildsubdir/pc-bios/pxe-$i.rom`" -gt "65536" ; then
echo "pxe rom is too large"
exit 1
fi
done
%ifnarch %{ix86} x86_64
unset CC
unset LD
%endif
%endif
%if %{build_skiboot_from_source}
make %{?_smp_mflags} -C roms skiboot CROSS=
make %{?_smp_mflags} -C %{_builddir}/%buildsubdir/roms skiboot CROSS=
%endif
%if %{build_slof_from_source}
make %{?_smp_mflags} -C roms slof
make %{?_smp_mflags} -C %{_builddir}/%buildsubdir/roms slof
%endif
%else # qemu-testsuite
@ -1357,46 +1357,46 @@ make %{?_smp_mflags} -C roms slof
ln -s %_bindir/qemu-img qemu-img
ln -s %_bindir/qemu-ga qemu-ga
ln -s %_bindir/qemu-io qemu-io
# And what about these binaries: qemu-nbd, elf2dmp, ivshmem-client, ivshmem-server, qemu-edid, qemu-keymap, qemu-pr-helper, virtfs-proxy-helper
for i in %built_firmware
for i in %firmware
do
ln -s %_datadir/%name/$i pc-bios/$i
done
for conf in default-configs/*-softmmu.mak; do
arch=`echo "$conf" | sed -e 's|default-configs/\(.*\)-softmmu.mak|\1|g'`
for conf in %{_builddir}/%buildsubdir/default-configs/*-softmmu.mak; do
arch=`echo "$conf" | sed -e 's|%{_builddir}/%buildsubdir/default-configs/\(.*\)-softmmu.mak|\1|g'`
ln -s %_bindir/qemu-system-$arch $arch-softmmu/qemu-system-$arch
done
# Compile the QOM test binary first, so that ...
touch -r config-host.mak pc-bios
make tests/qom-test %{?_smp_mflags} V=1
# Firmware
make %{?_smp_mflags} tests/qom-test %{?_smp_mflags} V=1
# ... make comes in fresh and has lots of address space (needed for 32bit, bsc#957379)
make check-report.html V=1
make %{?_smp_mflags} check-report.tap V=1
%endif
%check
cd %mybuilddir
%if "%{name}" == "qemu-testsuite"
export QEMU_PROG=%_bindir/qemu-system-x86_64
export QEMU_IMG_PROG=%_bindir/qemu-img
export QEMU_IO_PROG=%_bindir/qemu-io
export QEMU_NBD_PROG=%_bindir/qemu-nbd
make check-block V=1
make %{?_smp_mflags} check-block V=1
%endif # qemu-testsuite
%install
cd %mybuilddir
%if "%{name}" != "qemu-testsuite"
touch -r config-host.mak pc-bios
make install DESTDIR=%{buildroot}
make %{?_smp_mflags} install DESTDIR=%{buildroot}
%ifnarch %{build_rom_arch}
for f in %{x86_extra_built_firmware_list} \
%{x86_64_only_extra_built_firmware_list}; do
for f in %{x86_extra_firmware} \
%{x86_64_only_extra_firmware}; do
unlink %{buildroot}%_datadir/%name/$f
done
%endif
@ -1449,8 +1449,7 @@ install -D -m 0644 %{SOURCE2} %{buildroot}%_libexecdir/modules-load.d/kvm.conf
%else # qemu-testsuite
install -D -m 0644 check-report.html %{buildroot}%_datadir/qemu/check-report.html
install -D -m 0644 check-report.xml %{buildroot}%_datadir/qemu/check-report.xml
install -D -m 0644 check-report.tap %{buildroot}%_datadir/qemu/check-report.tap
%endif
@ -1529,6 +1528,49 @@ fi
%if "%{name}" != "qemu-testsuite"
%doc Changelog README VERSION
%license COPYING COPYING.LIB LICENSE
%dir %_docdir/%name/interop
%dir %_docdir/%name/interop/_static
%_docdir/%name/interop/.buildinfo
%_docdir/%name/interop/_static/ajax-loader.gif
%_docdir/%name/interop/_static/alabaster.css
%_docdir/%name/interop/_static/basic.css
%_docdir/%name/interop/_static/comment-bright.png
%_docdir/%name/interop/_static/comment-close.png
%_docdir/%name/interop/_static/comment.png
%_docdir/%name/interop/_static/custom.css
%_docdir/%name/interop/_static/doctools.js
%if 0%{?sle_version} != 150000
%_docdir/%name/interop/_static/documentation_options.js
%endif
%_docdir/%name/interop/_static/down-pressed.png
%_docdir/%name/interop/_static/down.png
%_docdir/%name/interop/_static/file.png
%if 0%{?sle_version} != 150000
%_docdir/%name/interop/_static/jquery-3.2.1.js
%else
%_docdir/%name/interop/_static/jquery-3.1.0.js
%endif
%_docdir/%name/interop/_static/jquery.js
%if 0%{?sle_version} != 150000 && 0%{?sle_version} != 150100
%_docdir/%name/interop/_static/language_data.js
%endif
%_docdir/%name/interop/_static/minus.png
%_docdir/%name/interop/_static/plus.png
%_docdir/%name/interop/_static/pygments.css
%_docdir/%name/interop/_static/searchtools.js
%_docdir/%name/interop/_static/underscore-1.3.1.js
%_docdir/%name/interop/_static/underscore.js
%_docdir/%name/interop/_static/up-pressed.png
%_docdir/%name/interop/_static/up.png
%_docdir/%name/interop/_static/websupport.js
%_docdir/%name/interop/bitmaps.html
%_docdir/%name/interop/genindex.html
%_docdir/%name/interop/index.html
%_docdir/%name/interop/live-block-operations.html
%_docdir/%name/interop/objects.inv
%_docdir/%name/interop/pr-helper.html
%_docdir/%name/interop/search.html
%_docdir/%name/interop/searchindex.js
%_docdir/%name/qemu-doc.txt
%_docdir/%name/qemu-doc.html
%_docdir/%name/qemu-qmp-ref.txt
@ -1543,8 +1585,6 @@ fi
%dir %_datadir/%name
%_datadir/%name/keymaps
%_datadir/%name/trace-events-all
%_datadir/%name/qemu-icon.bmp
%_datadir/%name/qemu_logo_no_text.svg
%dir %_sysconfdir/%name
%_datadir/%name/qemu-ifup
%dir %_libexecdir/supportconfig
@ -1555,6 +1595,20 @@ fi
%ifarch s390x
%_libexecdir/modules-load.d/kvm.conf
%endif
%dir %_datadir/icons/hicolor
%dir %_datadir/icons/hicolor/*/
%dir %_datadir/icons/hicolor/*/apps
%_datadir/icons/hicolor/16x16/apps/qemu.png
%_datadir/icons/hicolor/24x24/apps/qemu.png
%_datadir/icons/hicolor/32x32/apps/qemu.bmp
%_datadir/icons/hicolor/32x32/apps/qemu.png
%_datadir/icons/hicolor/48x48/apps/qemu.png
%_datadir/icons/hicolor/64x64/apps/qemu.png
%_datadir/icons/hicolor/128x128/apps/qemu.png
%_datadir/icons/hicolor/256x256/apps/qemu.png
%_datadir/icons/hicolor/512x512/apps/qemu.png
%_datadir/icons/hicolor/scalable/apps/qemu.svg
%_datadir/applications/qemu.desktop
%endif
%files x86
@ -1565,6 +1619,7 @@ fi
%_datadir/%name/linuxboot.bin
%_datadir/%name/linuxboot_dma.bin
%_datadir/%name/multiboot.bin
%_datadir/%name/pvh.bin
%if 0%{?is_opensuse} == 0
%dir %_docdir/qemu-x86
%_docdir/qemu-x86/supported.txt
@ -1663,6 +1718,9 @@ fi
%defattr(-, root, root)
%dir %_libdir/%name
%_libdir/%name/block-dmg-bz2.so
%if 0%{?is_opensuse}
%_libdir/%name/block-dmg-lzfse.so
%endif
%if 0%{?with_glusterfs}
%files block-gluster
@ -1707,7 +1765,7 @@ fi
%dir %_libdir/%name
%_libdir/%name/ui-gtk.so
%if 0%{?is_opensuse}
%if 0%{?suse_version} >= 1320 && 0%{?is_opensuse}
%files ui-sdl
%defattr(-, root, root)
%dir %_libdir/%name
@ -1719,24 +1777,19 @@ fi
%dir %_libdir/%name
%_libdir/%name/audio-alsa.so
%files audio-oss
%defattr(-, root, root)
%dir %_libdir/%name
%_libdir/%name/audio-oss.so
%files audio-pa
%defattr(-, root, root)
%dir %_libdir/%name
%_libdir/%name/audio-pa.so
%if 0%{?is_opensuse}
%if 0%{?suse_version} >= 1320 && 0%{?is_opensuse}
%files audio-sdl
%defattr(-, root, root)
%dir %_libdir/%name
%_libdir/%name/audio-sdl.so
%endif
%files lang -f %name.lang
%files lang -f %mybuilddir/%name.lang
%defattr(-, root, root)
%ifarch %{build_rom_arch}
@ -1787,9 +1840,10 @@ fi
%_mandir/man1/qemu-img.1.gz
%_mandir/man1/virtfs-proxy-helper.1.gz
%_mandir/man8/qemu-nbd.8.gz
%_bindir/qemu-edid
%_bindir/elf2dmp
%_bindir/ivshmem-client
%_bindir/ivshmem-server
%_bindir/qemu-edid
%_bindir/qemu-io
%_bindir/qemu-img
%_bindir/qemu-keymap
@ -1816,8 +1870,7 @@ fi
%endif
%else # qemu-testsuite
%_datadir/qemu/check-report.xml
%_datadir/qemu/check-report.html
%_datadir/qemu/check-report.tap
%endif
%changelog

View File

@ -16,6 +16,7 @@
#
%define build_in_tree 1
%define build_x86_firmware_from_source 0
%define build_skiboot_from_source 0
%define build_slof_from_source 0
@ -115,7 +116,7 @@
Name: qemu
Url: https://www.qemu.org/
Summary: Machine emulator and virtualizer
License: BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT
License: BSD-2-Clause AND BSD-3-Clause AND GPL-2.0-only AND GPL-2.0-or-later AND LGPL-2.1-or-later AND MIT
Group: System/Emulators/PC
QEMU_VERSION
Release: 0
@ -152,10 +153,9 @@ Patch1102: seabios-fix_cross_compilation.patch
# ipxe - path: roms/ipxe (patch range 1200-1299)
Patch1200: ipxe-stable-buildid.patch
Patch1201: ipxe-use-gcc6-for-more-compact-code.patch
Patch1202: ipxe-efi-guard-strncpy-with-gcc-warning-ignore-pragma.patch
Patch1203: ipxe-fix-build.patch
Patch1204: ipxe-efi-Simplify-diagnostic-for-NULL-handle.patch
Patch1205: ipxe-build-Disable-gcc-address-of-packed-member-warning.patch
Patch1202: ipxe-efi-Simplify-diagnostic-for-NULL-handle.patch
Patch1203: ipxe-build-Disable-gcc-address-of-packed-member-warning.patch
Patch1204: ipxe-efi-Avoid-string-op-warning-with-cross-gcc-7-compile.patch
# sgabios - path: roms/sgabios (patch range 1300-1399)
Patch1300: sgabios-stable-buildid.patch
@ -163,8 +163,7 @@ Patch1301: sgabios-fix-cross-build.patch
# SLOF - path: roms/SLOF (patch range 1400-1499) (Currently no patches)
# skiboot - path: roms/skiboot (patch range 1500-1599)
Patch1500: skiboot-hdata-i2c.c-fix-building-with-gcc8.patch
# skiboot - path: roms/skiboot (patch range 1500-1599) (Currently no patches)
# keycodemapdb - path: ui/keycodemapdb (patch range 1600-1699) (Currently no patches)
@ -175,30 +174,28 @@ Patch1500: skiboot-hdata-i2c.c-fix-building-with-gcc8.patch
ExcludeArch: s390
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#!BuildIgnore: gcc-PIE
BuildRequires: Mesa-devel
%if 0%{?is_opensuse}
BuildRequires: SDL-devel
%if 0%{?suse_version} >= 1320
BuildRequires: SDL2-devel
%endif
%if %{build_x86_firmware_from_source}
BuildRequires: acpica
%endif
BuildRequires: alsa-devel
%if %{build_x86_firmware_from_source}
BuildRequires: acpica
BuildRequires: binutils-devel
%endif
BuildRequires: bison
BuildRequires: bluez-devel
BuildRequires: brlapi-devel
%if %{build_x86_firmware_from_source}
%ifnarch %{ix86} x86_64
# We must cross-compile on non-x86*
BuildRequires: cross-x86_64-binutils
BuildRequires: cross-x86_64-gcc7
%endif
%endif
BuildRequires: bluez-devel
BuildRequires: brlapi-devel
BuildRequires: curl-devel
BuildRequires: cyrus-sasl-devel
BuildRequires: e2fsprogs-devel
BuildRequires: fdupes
BuildRequires: flex
BuildRequires: gcc-c++
%if %{build_x86_firmware_from_source}
%if 0%{?suse_version} <= 1320
@ -266,6 +263,10 @@ BuildRequires: librbd-devel
BuildRequires: ceph-devel
%endif
%endif
%if 0%{?suse_version} >= 1320 && 0%{?is_opensuse}
BuildRequires: libSDL2-devel
BuildRequires: libSDL2_image-devel
%endif
%if 0%{?with_seccomp}
BuildRequires: libseccomp-devel
%endif
@ -278,6 +279,10 @@ BuildRequires: libvdeplug-devel
%else
BuildRequires: libvdeplug3-devel
%endif
%if 0%{?is_opensuse}
BuildRequires: lzfse-devel
%endif
BuildRequires: Mesa-devel
BuildRequires: libxkbcommon-devel
BuildRequires: lzo-devel
BuildRequires: makeinfo
@ -285,9 +290,6 @@ BuildRequires: makeinfo
BuildRequires: multipath-tools-devel
%endif
BuildRequires: ncurses-devel
%if %{build_x86_firmware_from_source}
BuildRequires: ovmf-tools
%endif
BuildRequires: pkgconfig
BuildRequires: pwdutils
%if 0%{?suse_version} > 1320
@ -295,6 +297,7 @@ BuildRequires: python3-base
%else
BuildRequires: python-base
%endif
BuildRequires: python-Sphinx
%if 0%{?suse_version} >= 1315
BuildRequires: rdma-core-devel
%endif
@ -323,7 +326,12 @@ BuildRequires: zlib-devel
BuildRequires: python-base
%endif
BuildRequires: bc
BuildRequires: qemu-arm = %{qemuver}
BuildRequires: qemu-arm = %{qemuver}
BuildRequires: qemu-audio-alsa = %{qemuver}
BuildRequires: qemu-audio-pa = %{qemuver}
%if 0%{?suse_version} >= 1320 && 0%{?is_opensuse}
BuildRequires: qemu-audio-sdl = %{qemuver}
%endif
BuildRequires: qemu-block-curl = %{qemuver}
BuildRequires: qemu-block-dmg = %{qemuver}
%if 0%{?with_glusterfs}
@ -341,14 +349,22 @@ BuildRequires: qemu-block-rbd = %{qemuver}
BuildRequires: qemu-block-ssh = %{qemuver}
BuildRequires: qemu-extra = %{qemuver}
BuildRequires: qemu-guest-agent = %{qemuver}
BuildRequires: qemu-ipxe = 1.0.0+
%if 0%{?is_opensuse}
BuildRequires: qemu-ksm = %{qemuver}
%endif
BuildRequires: qemu-lang = %{qemuver}
BuildRequires: qemu-ppc = %{qemuver}
BuildRequires: qemu-s390 = %{qemuver}
BuildRequires: qemu-seabios = 1.12.1
BuildRequires: qemu-sgabios = 8
BuildRequires: qemu-tools = %{qemuver}
BuildRequires: qemu-ui-curses = %{qemuver}
BuildRequires: qemu-ui-gtk = %{qemuver}
%if 0%{?is_opensuse}
%if 0%{?suse_version} >= 1320 && 0%{?is_opensuse}
BuildRequires: qemu-ui-sdl = %{qemuver}
%endif
BuildRequires: qemu-vgabios = 1.12.1
BuildRequires: qemu-x86 = %{qemuver}
%endif
Requires(pre): shadow
@ -365,7 +381,7 @@ Recommends: qemu-block-curl
Recommends: qemu-tools
Recommends: qemu-ui-curses
Recommends: qemu-ui-gtk
%if 0%{?is_opensuse}
%if 0%{?suse_version} >= 1320 && 0%{?is_opensuse}
Recommends: qemu-ui-sdl
%endif
Recommends: qemu-x86
@ -403,10 +419,42 @@ Suggests: qemu-lang
%if 0%{?is_opensuse}
Recommends: qemu-ksm = %{qemuver}
%endif
Provides: qemu-audio-oss = %{qemuver}
Obsoletes: qemu-audio-oss < %{qemuver}
%define ppc_default_built_firmware {%nil}
# for the record, this set of firmware files is installed, but we don't
# build (yet): bamboo.dtb canyonlands.dtb hppa-firmware.img openbios-ppc openbios-sparc32
# openbios-sparc64 palcode-clipper petalogix-ml605.dtb petalogix-s3adsp1800.dtb ppc_rom.bin
# QEMU,cgthree.bin QEMU,tcx.bin qemu_vga.ndrv u-boot.e500 u-boot-sam460-20100605.bin
# This first list group isn't specific to what this instance builds
%define ppc_default_firmware {%nil}
%define ppc_extra_firmware {skiboot.lid slof.bin}
%define ppc64_only_default_firmware {spapr-rtas.bin}
%define ppc64_only_extra_firmware {%nil}
%define s390x_default_firmware {s390-ccw.img s390-netboot.img}
%define s390x_extra_firmware {%nil}
%define x86_default_firmware {linuxboot.bin linuxboot_dma.bin multiboot.bin \
kvmvapic.bin pvh.bin}
%define x86_extra_firmware {bios.bin bios-256k.bin pxe-e1000.rom pxe-eepro100.rom \
pxe-ne2k_pci.rom pxe-pcnet.rom pxe-rtl8139.rom pxe-virtio.rom sgabios.bin \
vgabios-bochs-display.bin vgabios.bin vgabios-cirrus.bin vgabios-qxl.bin \
vgabios-ramfb.bin vgabios-stdvga.bin vgabios-virtio.bin vgabios-vmware.bin}
%define x86_64_only_default_firmware {%nil}
%define x86_64_only_extra_firmware {efi-e1000.rom efi-e1000e.rom efi-eepro100.rom \
efi-ne2k_pci.rom efi-pcnet.rom efi-rtl8139.rom efi-virtio.rom efi-vmxnet3.rom}
%define firmware { \
%{?ppc_default_firmware} %{?ppc_extra_firmware} \
%{?ppc64_only_default_firmware} %{?ppc64_only_extra_firmware} \
%{?s390x_default_firmware} %{?s390x_extra_firmware} \
%{?x86_default_firmware} %{?x86_extra_firmware} \
%{?x86_64_only_default_firmware} %{?x86_64_only_extra_firmware} }
# This second list group is specific to what this instance builds
%define ppc_default_built_firmware %{ppc_default_firmware}
%if %{build_skiboot_from_source} && %{build_slof_from_source}
%define ppc_extra_built_firmware {skiboot.lid slof.bin}
%define ppc_extra_built_firmware %{ppc_extra_firmware}
%else
%if %{build_skiboot_from_source}
%define ppc_extra_built_firmware {skiboot.lid}
@ -417,36 +465,26 @@ Recommends: qemu-ksm = %{qemuver}
%endif
%ifarch ppc64
%define ppc64_only_default_built_firmware {spapr-rtas.bin}
%define ppc64_only_extra_built_firmware {%nil}
%define ppc64_only_default_built_firmware %{ppc64_only_default_firmware}
%define ppc64_only_extra_built_firmware %{ppc64_only_extra_firmware}
%endif
%ifarch s390x
%define s390x_default_built_firmware {s390-ccw.img s390-netboot.img}
%define s390x_extra_built_firmware {%nil}
%define s390x_default_built_firmware %{s390x_default_firmware}
%define s390x_extra_built_firmware %{s390x_extra_firmware}
%endif
%ifarch %ix86 x86_64
%define x86_default_built_firmware {linuxboot.bin linuxboot_dma.bin \
multiboot.bin kvmvapic.bin}
%define x86_default_built_firmware %{x86_default_firmware}
%ifarch x86_64
%define x86_64_only_default_built_firmware {%nil}
%define x86_64_only_default_built_firmware %{x86_64_only_default_firmware}
%endif
%endif
%define x86_extra_built_firmware_list {bios.bin bios-256k.bin pxe-e1000.rom \
pxe-eepro100.rom pxe-ne2k_pci.rom pxe-pcnet.rom pxe-rtl8139.rom pxe-virtio.rom \
sgabios.bin vgabios-bochs-display.bin vgabios.bin vgabios-cirrus.bin \
vgabios-qxl.bin vgabios-ramfb.bin vgabios-stdvga.bin vgabios-virtio.bin \
vgabios-vmware.bin}
%define x86_64_only_extra_built_firmware_list {efi-e1000.rom efi-e1000e.rom \
efi-eepro100.rom efi-ne2k_pci.rom efi-pcnet.rom efi-rtl8139.rom efi-virtio.rom \
efi-vmxnet3.rom}
%if %{build_x86_firmware_from_source}
%define x86_extra_built_firmware %{x86_extra_built_firmware_list}
%define x86_extra_built_firmware %{x86_extra_firmware}
%ifarch x86_64
%define x86_64_only_extra_built_firmware %{x86_64_only_extra_built_firmware_list}
%define x86_64_only_extra_built_firmware %{x86_64_only_extra_firmware}
%endif
%endif
@ -718,7 +756,7 @@ Release: 0
%description ui-gtk
This package contains a module for doing GTK based UI for QEMU.
%if 0%{?is_opensuse}
%if 0%{?suse_version} >= 1320 && 0%{?is_opensuse}
%package ui-sdl
Summary: SDL based UI support for QEMU
Group: System/Emulators/PC
@ -740,16 +778,6 @@ Release: 0
%description audio-alsa
This package contains a module for ALSA based audio support for QEMU.
%package audio-oss
Summary: OSS based audio support for QEMU
Group: System/Emulators/PC
Version: %{qemuver}
Release: 0
%{qemu_module_conflicts}
%description audio-oss
This package contains a module for OSS based audio support for QEMU.
%package audio-pa
Summary: Pulse Audio based audio support for QEMU
Group: System/Emulators/PC
@ -760,7 +788,7 @@ Release: 0
%description audio-pa
This package contains a module for Pulse Audio based audio support for QEMU.
%if 0%{?is_opensuse}
%if 0%{?suse_version} >= 1320 && 0%{?is_opensuse}
%package audio-sdl
Summary: SDL based audio support for QEMU
Group: System/Emulators/PC
@ -895,11 +923,12 @@ pushd roms/ipxe
%patch1200 -p1
%if 0%{?suse_version} <= 1320
%patch1201 -p1
%endif
%patch1202 -p1
%patch1203 -p1
%endif
%ifarch aarch64
%patch1204 -p1
%patch1205 -p1
%endif
popd
pushd roms/sgabios
@ -911,7 +940,6 @@ pushd roms/SLOF
popd
pushd roms/skiboot
%patch1500 -p1
popd
pushd ui/keycodemapdb
@ -920,23 +948,29 @@ popd
pushd roms/openbios
popd
# as a safeguard, delete the firmware files that we intend to build
%if "%{name}" != "qemu-testsuite"
# delete the firmware files that we intend to build
for i in %built_firmware
%else
# delete the firmware files that we intend to link from built packages
for i in %firmware
%endif
do
unlink pc-bios/$i
done
%build
XC_COMPAT="
-DXC_WANT_COMPAT_DEVICEMODEL_API=1
-DXC_WANT_COMPAT_EVTCHN_API=1
-DXC_WANT_COMPAT_GNTTAB_API=1
-DXC_WANT_COMPAT_MAP_FOREIGN_API=1
"
XC_COMPAT="`echo ${XC_COMPAT} | xargs`"
sed -i~ /undef/d include/hw/xen/xen_common.h
diff -u include/hw/xen/xen_common.h~ include/hw/xen/xen_common.h || :
./configure \
%define _lto_cflags %{nil}
%if %build_in_tree
%define mybuilddir %{_builddir}/%buildsubdir
%else
%define mybuilddir %{_builddir}/mybuilddir
mkdir -p %mybuilddir
cd %mybuilddir
%endif
%{_builddir}/%buildsubdir/configure \
--prefix=%_prefix \
--sysconfdir=%_sysconfdir \
--libdir=%_libdir \
@ -949,21 +983,23 @@ diff -u include/hw/xen/xen_common.h~ include/hw/xen/xen_common.h || :
%else
--python=%_bindir/python2 \
%endif
--extra-cflags="%{optflags} ${XC_COMPAT}" \
--extra-cflags="%{optflags}" \
--disable-stack-protector \
--disable-strip \
--with-pkgversion="%(echo '%{distro}' | sed 's/ (.*)//')" \
--with-default-devices \
--enable-system --disable-linux-user \
--enable-tools --enable-guest-agent \
--enable-modules \
--enable-pie \
--enable-docs \
%if 0%{?is_opensuse}
--audio-drv-list="pa alsa sdl oss" \
%if 0%{?suse_version} >= 1320 && 0%{?is_opensuse}
--audio-drv-list="pa alsa sdl" \
%else
--audio-drv-list="pa alsa oss" \
--audio-drv-list="pa alsa" \
%endif
--enable-attr \
--disable-auth-pam \
--enable-bluez \
--enable-bochs \
--enable-brlapi \
@ -987,6 +1023,7 @@ diff -u include/hw/xen/xen_common.h~ include/hw/xen/xen_common.h || :
--enable-gtk \
--disable-hax \
--disable-hvf \
--enable-iconv \
--disable-jemalloc \
%if %{kvm_available}
--enable-kvm \
@ -1012,6 +1049,11 @@ diff -u include/hw/xen/xen_common.h~ include/hw/xen/xen_common.h || :
--enable-libusb \
--disable-libxml2 \
--enable-linux-aio \
%if 0%{?is_opensuse}
--enable-lzfse \
%else
--disable-lzfse \
%endif
--enable-lzo \
--disable-malloc-trim \
--enable-membarrier \
@ -1066,15 +1108,12 @@ diff -u include/hw/xen/xen_common.h~ include/hw/xen/xen_common.h || :
%endif
--enable-replication \
--disable-sanitizers \
%if 0%{?is_opensuse}
%if 0%{?suse_version} >= 1320 && 0%{?is_opensuse}
--enable-sdl \
%if 0%{?suse_version} >= 1320
--with-sdlabi=2.0 \
%else
--with-sdlabi=1.2 \
%endif
--enable-sdl-image \
%else
--disable-sdl \
--disable-sdl-image \
%endif
%if 0%{?with_seccomp}
--enable-seccomp \
@ -1095,7 +1134,11 @@ diff -u include/hw/xen/xen_common.h~ include/hw/xen/xen_common.h || :
--enable-vde \
--enable-vdi \
--enable-vhost-crypto \
--enable-vhost-kernel \
--enable-vhost-net \
--enable-vhost-scsi \
--enable-vhost-user \
--enable-vhost-vsock \
%if 0%{?suse_version} >= 1320 || ( 0%{?suse_version} == 1315 && 0%{?sle_version} > 120100 )
--enable-virglrenderer \
%endif
@ -1110,11 +1153,11 @@ diff -u include/hw/xen/xen_common.h~ include/hw/xen/xen_common.h || :
--enable-vte \
%endif
--enable-vvfat \
--enable-werror \
--disable-whpx \
%ifarch x86_64
--enable-xen \
--enable-xen-pci-passthrough \
--enable-xen-pv-domain-build \
%else
--disable-xen \
%endif
@ -1129,26 +1172,26 @@ make %{?_smp_mflags} V=1
%ifarch s390x
for i in %s390x_default_built_firmware
do
cp pc-bios/s390-ccw/$i pc-bios/
cp pc-bios/s390-ccw/$i %{_builddir}/%buildsubdir/pc-bios/
done
%endif
%ifarch ppc64
for i in %ppc64_only_default_built_firmware
do
cp pc-bios/spapr-rtas/$i pc-bios/
cp pc-bios/spapr-rtas/$i %{_builddir}/%buildsubdir/pc-bios/
done
%endif
%ifarch %ix86 x86_64
for i in %x86_default_built_firmware
do
cp pc-bios/optionrom/$i pc-bios/
cp pc-bios/optionrom/$i %{_builddir}/%buildsubdir/pc-bios/
done
%ifarch x86_64
for i in %x86_64_only_default_built_firmware
do
cp pc-bios/optionrom/$i pc-bios/
cp pc-bios/optionrom/$i %{_builddir}/%buildsubdir/pc-bios/
done
%endif
%endif
@ -1159,30 +1202,31 @@ export CC=x86_64-suse-linux-gcc
export LD=x86_64-suse-linux-ld
%endif
make %{?_smp_mflags} -C roms bios \
make %{?_smp_mflags} -C %{_builddir}/%buildsubdir/roms bios \
%ifnarch %ix86 x86_64
HOSTCC=cc \
%endif
make %{?_smp_mflags} -C roms seavgabios \
make %{?_smp_mflags} -C %{_builddir}/%buildsubdir/roms seavgabios \
%ifnarch %ix86 x86_64
HOSTCC=cc \
%endif
make %{?_smp_mflags} -C roms pxerom
make %{?_smp_mflags} -C %{_builddir}/%buildsubdir/roms pxerom
%ifnarch %ix86
make %{?_smp_mflags} -C roms efirom
make %{?_smp_mflags} -C %{_builddir}/%buildsubdir/roms efirom \
EDK2_BASETOOLS_OPTFLAGS='-fPIE'
%endif
make -C roms sgabios \
make -C %{_builddir}/%buildsubdir/roms sgabios \
HOSTCC=cc
%if %{force_fit_virtio_pxe_rom}
pushd roms/ipxe
pushd %{_builddir}/%buildsubdir/roms/ipxe
patch -p1 < %{SOURCE301}
popd
make %{?_smp_mflags} -C roms pxerom_variants=virtio pxerom_targets=1af41000 pxerom
make %{?_smp_mflags} -C %{_builddir}/%buildsubdir/roms pxerom_variants=virtio pxerom_targets=1af41000 pxerom
%endif
# enforce pxe rom sizes for migration compatability from SLE 11 SP3 forward
@ -1195,30 +1239,34 @@ make %{?_smp_mflags} -C roms pxerom_variants=virtio pxerom_targets=1af41000 pxer
for i in %supported_nics_large %unsupported_nics
do
if test "`stat -c '%s' pc-bios/pxe-$i.rom`" -gt "131072" ; then
if test "`stat -c '%s' %{_builddir}/%buildsubdir/pc-bios/pxe-$i.rom`" -gt "131072" ; then
echo "pxe rom is too large"
exit 1
fi
if test "`stat -c '%s' pc-bios/pxe-$i.rom`" -le "65536" ; then
./roms/ipxe/src/util/padimg.pl pc-bios/pxe-$i.rom -s 65536 -b 255
echo -ne "SEGMENT OVERAGE\0" >> pc-bios/pxe-$i.rom
if test "`stat -c '%s' %{_builddir}/%buildsubdir/pc-bios/pxe-$i.rom`" -le "65536" ; then
./%{_builddir}/%buildsubdir/roms/ipxe/src/util/padimg.pl %{_builddir}/%buildsubdir/pc-bios/pxe-$i.rom -s 65536 -b 255
echo -ne "SEGMENT OVERAGE\0" >> %{_builddir}/%buildsubdir/pc-bios/pxe-$i.rom
fi
done
for i in %supported_nics_small
do
if test "`stat -c '%s' pc-bios/pxe-$i.rom`" -gt "65536" ; then
if test "`stat -c '%s' %{_builddir}/%buildsubdir/pc-bios/pxe-$i.rom`" -gt "65536" ; then
echo "pxe rom is too large"
exit 1
fi
done
%ifnarch %{ix86} x86_64
unset CC
unset LD
%endif
%endif
%if %{build_skiboot_from_source}
make %{?_smp_mflags} -C roms skiboot CROSS=
make %{?_smp_mflags} -C %{_builddir}/%buildsubdir/roms skiboot CROSS=
%endif
%if %{build_slof_from_source}
make %{?_smp_mflags} -C roms slof
make %{?_smp_mflags} -C %{_builddir}/%buildsubdir/roms slof
%endif
%else # qemu-testsuite
@ -1226,46 +1274,46 @@ make %{?_smp_mflags} -C roms slof
ln -s %_bindir/qemu-img qemu-img
ln -s %_bindir/qemu-ga qemu-ga
ln -s %_bindir/qemu-io qemu-io
# And what about these binaries: qemu-nbd, elf2dmp, ivshmem-client, ivshmem-server, qemu-edid, qemu-keymap, qemu-pr-helper, virtfs-proxy-helper
for i in %built_firmware
for i in %firmware
do
ln -s %_datadir/%name/$i pc-bios/$i
done
for conf in default-configs/*-softmmu.mak; do
arch=`echo "$conf" | sed -e 's|default-configs/\(.*\)-softmmu.mak|\1|g'`
for conf in %{_builddir}/%buildsubdir/default-configs/*-softmmu.mak; do
arch=`echo "$conf" | sed -e 's|%{_builddir}/%buildsubdir/default-configs/\(.*\)-softmmu.mak|\1|g'`
ln -s %_bindir/qemu-system-$arch $arch-softmmu/qemu-system-$arch
done
# Compile the QOM test binary first, so that ...
touch -r config-host.mak pc-bios
make tests/qom-test %{?_smp_mflags} V=1
# Firmware
make %{?_smp_mflags} tests/qom-test %{?_smp_mflags} V=1
# ... make comes in fresh and has lots of address space (needed for 32bit, bsc#957379)
make check-report.html V=1
make %{?_smp_mflags} check-report.tap V=1
%endif
%check
cd %mybuilddir
%if "%{name}" == "qemu-testsuite"
export QEMU_PROG=%_bindir/qemu-system-x86_64
export QEMU_IMG_PROG=%_bindir/qemu-img
export QEMU_IO_PROG=%_bindir/qemu-io
export QEMU_NBD_PROG=%_bindir/qemu-nbd
make check-block V=1
make %{?_smp_mflags} check-block V=1
%endif # qemu-testsuite
%install
cd %mybuilddir
%if "%{name}" != "qemu-testsuite"
touch -r config-host.mak pc-bios
make install DESTDIR=%{buildroot}
make %{?_smp_mflags} install DESTDIR=%{buildroot}
%ifnarch %{build_rom_arch}
for f in %{x86_extra_built_firmware_list} \
%{x86_64_only_extra_built_firmware_list}; do
for f in %{x86_extra_firmware} \
%{x86_64_only_extra_firmware}; do
unlink %{buildroot}%_datadir/%name/$f
done
%endif
@ -1318,8 +1366,7 @@ install -D -m 0644 %{SOURCE2} %{buildroot}%_libexecdir/modules-load.d/kvm.conf
%else # qemu-testsuite
install -D -m 0644 check-report.html %{buildroot}%_datadir/qemu/check-report.html
install -D -m 0644 check-report.xml %{buildroot}%_datadir/qemu/check-report.xml
install -D -m 0644 check-report.tap %{buildroot}%_datadir/qemu/check-report.tap
%endif
@ -1398,6 +1445,49 @@ fi
%if "%{name}" != "qemu-testsuite"
%doc Changelog README VERSION
%license COPYING COPYING.LIB LICENSE
%dir %_docdir/%name/interop
%dir %_docdir/%name/interop/_static
%_docdir/%name/interop/.buildinfo
%_docdir/%name/interop/_static/ajax-loader.gif
%_docdir/%name/interop/_static/alabaster.css
%_docdir/%name/interop/_static/basic.css
%_docdir/%name/interop/_static/comment-bright.png
%_docdir/%name/interop/_static/comment-close.png
%_docdir/%name/interop/_static/comment.png
%_docdir/%name/interop/_static/custom.css
%_docdir/%name/interop/_static/doctools.js
%if 0%{?sle_version} != 150000
%_docdir/%name/interop/_static/documentation_options.js
%endif
%_docdir/%name/interop/_static/down-pressed.png
%_docdir/%name/interop/_static/down.png
%_docdir/%name/interop/_static/file.png
%if 0%{?sle_version} != 150000
%_docdir/%name/interop/_static/jquery-3.2.1.js
%else
%_docdir/%name/interop/_static/jquery-3.1.0.js
%endif
%_docdir/%name/interop/_static/jquery.js
%if 0%{?sle_version} != 150000 && 0%{?sle_version} != 150100
%_docdir/%name/interop/_static/language_data.js
%endif
%_docdir/%name/interop/_static/minus.png
%_docdir/%name/interop/_static/plus.png
%_docdir/%name/interop/_static/pygments.css
%_docdir/%name/interop/_static/searchtools.js
%_docdir/%name/interop/_static/underscore-1.3.1.js
%_docdir/%name/interop/_static/underscore.js
%_docdir/%name/interop/_static/up-pressed.png
%_docdir/%name/interop/_static/up.png
%_docdir/%name/interop/_static/websupport.js
%_docdir/%name/interop/bitmaps.html
%_docdir/%name/interop/genindex.html
%_docdir/%name/interop/index.html
%_docdir/%name/interop/live-block-operations.html
%_docdir/%name/interop/objects.inv
%_docdir/%name/interop/pr-helper.html
%_docdir/%name/interop/search.html
%_docdir/%name/interop/searchindex.js
%_docdir/%name/qemu-doc.txt
%_docdir/%name/qemu-doc.html
%_docdir/%name/qemu-qmp-ref.txt
@ -1412,8 +1502,6 @@ fi
%dir %_datadir/%name
%_datadir/%name/keymaps
%_datadir/%name/trace-events-all
%_datadir/%name/qemu-icon.bmp
%_datadir/%name/qemu_logo_no_text.svg
%dir %_sysconfdir/%name
%_datadir/%name/qemu-ifup
%dir %_libexecdir/supportconfig
@ -1424,6 +1512,20 @@ fi
%ifarch s390x
%_libexecdir/modules-load.d/kvm.conf
%endif
%dir %_datadir/icons/hicolor
%dir %_datadir/icons/hicolor/*/
%dir %_datadir/icons/hicolor/*/apps
%_datadir/icons/hicolor/16x16/apps/qemu.png
%_datadir/icons/hicolor/24x24/apps/qemu.png
%_datadir/icons/hicolor/32x32/apps/qemu.bmp
%_datadir/icons/hicolor/32x32/apps/qemu.png
%_datadir/icons/hicolor/48x48/apps/qemu.png
%_datadir/icons/hicolor/64x64/apps/qemu.png
%_datadir/icons/hicolor/128x128/apps/qemu.png
%_datadir/icons/hicolor/256x256/apps/qemu.png
%_datadir/icons/hicolor/512x512/apps/qemu.png
%_datadir/icons/hicolor/scalable/apps/qemu.svg
%_datadir/applications/qemu.desktop
%endif
%files x86
@ -1434,6 +1536,7 @@ fi
%_datadir/%name/linuxboot.bin
%_datadir/%name/linuxboot_dma.bin
%_datadir/%name/multiboot.bin
%_datadir/%name/pvh.bin
%if 0%{?is_opensuse} == 0
%dir %_docdir/qemu-x86
%_docdir/qemu-x86/supported.txt
@ -1532,6 +1635,9 @@ fi
%defattr(-, root, root)
%dir %_libdir/%name
%_libdir/%name/block-dmg-bz2.so
%if 0%{?is_opensuse}
%_libdir/%name/block-dmg-lzfse.so
%endif
%if 0%{?with_glusterfs}
%files block-gluster
@ -1576,7 +1682,7 @@ fi
%dir %_libdir/%name
%_libdir/%name/ui-gtk.so
%if 0%{?is_opensuse}
%if 0%{?suse_version} >= 1320 && 0%{?is_opensuse}
%files ui-sdl
%defattr(-, root, root)
%dir %_libdir/%name
@ -1588,24 +1694,19 @@ fi
%dir %_libdir/%name
%_libdir/%name/audio-alsa.so
%files audio-oss
%defattr(-, root, root)
%dir %_libdir/%name
%_libdir/%name/audio-oss.so
%files audio-pa
%defattr(-, root, root)
%dir %_libdir/%name
%_libdir/%name/audio-pa.so
%if 0%{?is_opensuse}
%if 0%{?suse_version} >= 1320 && 0%{?is_opensuse}
%files audio-sdl
%defattr(-, root, root)
%dir %_libdir/%name
%_libdir/%name/audio-sdl.so
%endif
%files lang -f %name.lang
%files lang -f %mybuilddir/%name.lang
%defattr(-, root, root)
%ifarch %{build_rom_arch}
@ -1656,9 +1757,10 @@ fi
%_mandir/man1/qemu-img.1.gz
%_mandir/man1/virtfs-proxy-helper.1.gz
%_mandir/man8/qemu-nbd.8.gz
%_bindir/qemu-edid
%_bindir/elf2dmp
%_bindir/ivshmem-client
%_bindir/ivshmem-server
%_bindir/qemu-edid
%_bindir/qemu-io
%_bindir/qemu-img
%_bindir/qemu-keymap
@ -1685,8 +1787,7 @@ fi
%endif
%else # qemu-testsuite
%_datadir/qemu/check-report.xml
%_datadir/qemu/check-report.html
%_datadir/qemu/check-report.tap
%endif
%changelog

View File

@ -1,35 +0,0 @@
From 70d544de8739abbc381398cbfd07a6bd6dc8c1a5 Mon Sep 17 00:00:00 2001
From: Stewart Smith <stewart@linux.ibm.com>
Date: Tue, 29 May 2018 14:54:10 +1000
Subject: [PATCH] hdata/i2c.c: fix building with gcc8
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
hdata/test/../i2c.c:200:1: error: alignment 1 of struct host_i2c_hdr is less than 4 [-Werror=packed-not-aligned]
} __packed;
^
Fixes: https://github.com/open-power/skiboot/issues/160
Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
Signed-off-by: Bruce Rogers <brogers@suse.com>
---
hdata/i2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hdata/i2c.c b/hdata/i2c.c
index 5cb56faf..9bbec665 100644
--- a/hdata/i2c.c
+++ b/hdata/i2c.c
@@ -197,7 +197,7 @@ static bool is_zeros(const void *p, size_t size)
struct host_i2c_hdr {
const struct HDIF_array_hdr hdr;
__be32 version;
-} __packed;
+} __packed __align(0x4);
int parse_i2c_devs(const struct HDIF_common_hdr *hdr, int idata_index,
struct dt_node *xscom)
--
2.18.0

View File

@ -1,6 +1,7 @@
[qemu-arm package document]
[Note: post SLES 15 SP1 changes are not fully incorporated into this document]
SLES 15 SP1 QEMU/KVM RELATED SUPPORT STATEMENTS
POST SLES 15 SP1 QEMU/KVM RELATED SUPPORT STATEMENTS
Overview
--------
@ -56,7 +57,7 @@ Major QEMU/KVM Supported Features
Since a KVM guest runs in the context of a normal linux process, some types
of execution controls are managed with linux tools.
- QEMU is compatible with EDK based UEFI firmware available with SLES 15 SP1,
- QEMU is compatible with EDK II based UEFI firmware available with SLES 15 SP1,
which allow boot options common to physical systems, along with other features
tailored to virtualization. Various VGABIOS ROMs, from the SEABIOS project,
are also available.
@ -145,7 +146,7 @@ Deprecated, Superseded, Modified and Dropped Features
in Appendix B of the qemu-doc.* files installed with the qemu package.
- The use of "?" as a parameter to "-cpu", "-soundhw", "-device", "-M",
"-machine", "-d", and "-clock" is now considered deprecated. Use "help"
"-machine" and "-d" is now considered deprecated. Use "help"
instead.
- The use of "if=scsi" as a parameter to "-drive" does not work anymore with PC
@ -164,21 +165,22 @@ Deprecated, Superseded, Modified and Dropped Features
acpitable, boot, and smp respectively.
- These previously supported command line options are now considered deprecated:
-clock
-device ivshmem (use ivshmem-doorbell or ivshmem-plain instead)
-no-frame
-virtioconsole (use -device virtconsole instead)
<none>
- These previously supported command line options are no longer supported:
<previously mentioned items have been moved to another category>
- These previously supported command line options are no longer recognized:
-balloon (use -device virtio-balloon instead)
-clock
-device ivshmem (use ivshmem-doorbell or ivshmem-plain instead)
-device pc-sysfw (no longer needed)
-device pci-assign, -device kvm-pci-assign (use -device vfio-pci instead)
-display sdl
-no-frame
-nodefconfig (use -no-user-config instead)
-sdl
-virtioconsole (use -device virtconsole instead)
- The previously unsupported machine type xlnx-ep108 is no longer recognized
(used xlnx-zcu102 unstead)
@ -194,16 +196,22 @@ Deprecated, Superseded, Modified and Dropped Features
- These previously unsupported command line options are now deprecated:
-bt
-enable-hax
- These previously unsupported command line options are no longer recognized:
-device at24c-eeprom
-device mmio_interface
-device ssi-sd
-enable-hax
-tdf
-xen-create
- This previously supported QMP command is now deprecated:
cpu-add
query-cpus (use query-cpus-fast instead)
query-events
- This previously supported monitor command is now deprecated:
cpu-add
- These previously supported monitor commands are no longer recognized:
pci_add (use device_add instead)
@ -211,13 +219,27 @@ Deprecated, Superseded, Modified and Dropped Features
usb_add (use device_add instead)
usb_del (use device_del instead)
- These previously unsupported monitor command are now deprecated:
acl_add ...
acl_policy ...
acl_remove ...
acl_reset ...
acl_show ...
- These previously unsupported monitor commands are no longer recognized:
host_net_add
host_net_remove
- This previously unsupported QMP command is now supported under a new name:
- These previously unsupported QMP command is now supported under a new name:
x-block-dirty-bitmap-disable (use block-dirty-bitmap-disable instead)
x-block-dirty-bitmap-enable (use block-dirty-bitmap-enable instead)
x-block-dirty-bitmap-merge (use block-dirty-bitmap-merge instead)
x-block-latency-histogram-set (use block-latency-histogram-set instead)
x-blockdev-create (use blockdev-create instead)
- This previously unsupported QMP command is no longer recognized:
x-nbd-server-add-bitmap
- Due to upstream's decision to no longer fully support the qed storage format
going forward (since it really provides no benefit over qcow2 and is now no
longer actively maintained upstream), creating qed storage images is no longer
@ -251,12 +273,12 @@ QEMU Command-Line and Monitor Syntax and Support
-alt-grab
-append ...
-audio-help
-audiodev
-bios ...
-blockdev ...
-boot ...
-cdrom ...
-chardev ..
-clock ...
-cpu host
-ctrl-grab
-d ...
@ -268,11 +290,27 @@ QEMU Command-Line and Monitor Syntax and Support
virtio-scsi-pci|scsi-cd|scsi-hd|scsi-generic|scsi-disk|scsi-block|
pci-serial|pci-serial-2x|pci-serial-4x|ich9-ahci|usb-host|usb-serial|
usb-wacom-tablet|usb-braille|usb-net|pci-ohci|virtio-rng-pci|i6300esb|
qxl|qxl-vga|pvpanic|vfio-pci|ivshmem|ivshmem-doorbell|ivshmem-plain|
pci-bridge|megasas-gen2|e1000e|e1000|vmcoreinfo|pcie-pci-bridge]
qxl|qxl-vga|pvpanic|vfio-pci|ivshmem-doorbell|ivshmem-plain|
pci-bridge|megasas-gen2|e1000e|e1000|vmcoreinfo|pcie-pci-bridge|
vhost-user-blk|vhost-user-blk-pci|vhost-user-scsi|vhost-user-scsi-pci|
vhost-vsock-pci|virtio-crypto-pci|virtio-vga|
vhost-scsi-pci-non-transitional|vhost-scsi-pci-transitional|
vhost-user-blk-pci-non-transitional|vhost-user-blk-pci-transitional|
vhost-user-scsi-pci-non-transitional|vhost-user-scsi-pci-transitional|
vhost-vsock-pci-non-transitional|vhost-vsock-pci-transitional|
virtio-9p-pci-non-transitional|virtio-9p-pci-transitional|
virtio-balloon-pci-non-transitional|virtio-balloon-pci-transitional|
virtio-blk-pci-non-transitional|virtio-blk-pci-transitional|
virtio-input-host-pci-non-transitional|
virtio-input-host-pci-transitional|virtio-net-pci-non-transitional|
virtio-net-pci-transitional|virtio-rng-pci-non-transitional|
virtio-rng-pci-transitional|virtio-scsi-pci-non-transitional|
virtio-scsi-pci-transitional|virtio-serial-pci-non-transitional|
virtio-serial-pci-transitional]
(the following are aliases of these supported devices: ahci|
virtio-blk|virtio-net|virtio-serial|virtio-balloon| virtio-9p|
virtio-scsi|virtio-rng|e1000-82540em)
virtio-input-host|virtio-keyboard|virtio-mouse|virtio-tablet|
virtio-gpu|virtio-scsi|virtio-rng|e1000-82540em)
-dfilter range, ...
-display ...
-drive ... (if specified if=[virtio] and format=[qcow2|raw] and
@ -308,7 +346,6 @@ QEMU Command-Line and Monitor Syntax and Support
-nic ...
-no-acpi
-nodefaults
-no-frame
-nographic
-no-quit
-no-reboot
@ -340,7 +377,6 @@ QEMU Command-Line and Monitor Syntax and Support
-version
-vga [none|qxl|std|virtio]
-virtfs ...
-virtioconsole ...
-vnc ...
-watchdog ...
-watchdog-action ...
@ -443,6 +479,9 @@ QEMU Command-Line and Monitor Syntax and Support
block-commit
block-dirty-bitmap-add
block-dirty-bitmap-clear
block-dirty-bitmap-disable
block-dirty-bitmap-enable
block-dirty-bitmap-merge
block-dirty-bitmap-remove
block_passwd
block_resize
@ -512,6 +551,7 @@ QEMU Command-Line and Monitor Syntax and Support
query-cpu-model-expansion
query-cpus
query-cpus-fast
query-current-machine
query-display-options
query-dump
query-dump-guest-memory-capability
@ -642,16 +682,17 @@ QEMU Command-Line and Monitor Syntax and Support
tosa_dac|tosa-ssp|tusb6010|twl92230|tz-msc|usb-redir|versatile_i2c|
versatilepb_sic|versatile_pci|versatile_pci_host|
vfio-pci-igd-lpc-bridge|vfio-pci-nohotplug|vfio-platform|
vhost-user-blk|vhost-user-blk-pci|vhost-user-scsi|vhost-user-scsi-pci|
vhost-vsock-device|vhost-vsock-pci|virtconsole|virtio-crypto-device|
virtio-crypto-pci|virtio-vga|vmgenid|vmware-svga|w25q256|w25q32|
w25q32dw|w25q64|w25q80|w25q80bl|w25x10|w25x16|w25x20|w25x32|w25x40|
w25x64|w25x80|wm8750|*-x86_64-cpu|xen-backend|xen-pci-passthrough|
xen-platform|xen-pvdevice|xgmac|xilinxzynq_slcr|xlnx-versal|
xlnx.ps7-qspi|xlnx.ps7-spi|xlnxps7-usb|xlnxzynqmp|xlnxzynq-xadc]
vhost-vsock-device|virtconsole|virtio-crypto-device|vmgenid|
vmware-svga|w25q256|w25q32|w25q32dw|w25q64|w25q80|w25q80bl|w25x10|
w25x16|w25x20|w25x32|w25x40|w25x64|w25x80|wm8750|*-x86_64-cpu|
xen-backend|xen-pci-passthrough|xen-platform|xen-pvdevice|xgmac|
xilinxzynq_slcr|xlnx-versal|xlnx.ps7-qspi|xlnx.ps7-spi|xlnxps7-usb|
xlnxzynqmp|xlnxzynq-xadc|armsse-cpuid|armsse-mhu|cpu-cluster|
luminary-watchdog|microbit.i2c|nrf51_soc.gpio|nrf51_soc.nvm|
nrf51_soc.rng|nrf51_soc.timer|platform-ehci-usb|sse-200|vmware-svga|
vmxnet3|ati-vga|cirrus-vga]
(the following are aliases of these unsupported devices: lsi|
virtio-input-host|virtio-keyboard|virtio-mouse|virtio-tablet|
virtio-gpu||piix-usb-uhci)
piix3-usb-uhci)
(note that some of these device names represent supported devices and
are used internally, but are not specifyable via -device even though
they appear in the list of devices)
@ -715,7 +756,6 @@ QEMU Command-Line and Monitor Syntax and Support
-vga [cg3|tcx|virtio|cirrus|xenfb]
-win2k-hack
-xen-attach ...
-xen-create
-xen-domid ...
-xen-domid-restrict ...
@ -770,16 +810,13 @@ QEMU Command-Line and Monitor Syntax and Support
query-colo-status
query-sev
query-sev-launch-measure
x-block-dirty-bitmap-disable
x-block-dirty-bitmap-enable
x-block-dirty-bitmap-merge
x-blockdev-change
x-blockdev-insert-medium
x-blockdev-remove-medium
x-blockdev-reopen
x-colo-lost-heartbeat
x-debug-block-dirty-bitmap-sha256
x-exit-preconfig
x-nbd-server-add-bitmap
xen-colo-do-checkpoint
xen-load-devices-state
xen-save-devices-state

View File

@ -1,6 +1,7 @@
[qemu-ppc package document]
[Note: post SLES 15 SP1 changes are not fully incorporated into this document]
SLES 15 SP1 QEMU/KVM RELATED SUPPORT STATEMENTS
POST SLES 15 SP1 QEMU/KVM RELATED SUPPORT STATEMENTS
Overview
--------
@ -144,7 +145,7 @@ Deprecated, Superseded, Modified and Dropped Features
in Appendix B of the qemu-doc.* files installed with the qemu package.
- The use of "?" as a parameter to "-cpu", "-soundhw", "-device", "-M",
"-machine", "-d", and "-clock" is now considered deprecated. Use "help"
"-machine" and "-d" is now considered deprecated. Use "help"
instead.
- The use of "if=scsi" as a parameter to "-drive" does not work anymore with PC
@ -163,21 +164,21 @@ Deprecated, Superseded, Modified and Dropped Features
acpitable, boot, and smp respectively.
- These previously supported command line options are now considered deprecated:
-clock
-device ivshmem (use ivshmem-doorbell or ivshmem-plain instead)
-no-frame
-virtioconsole (use -device virtconsole instead)
- These previously supported command line options are no longer supported:
<previously mentioned items have been moved to another category>
- These previously supported command line options are no longer recognized:
-balloon (use -device virtio-balloon instead)
-clock
-device ivshmem (use ivshmem-doorbell or ivshmem-plain instead)
-device pc-sysfw (no longer needed)
-device pci-assign, -device kvm-pci-assign (use -device vfio-pci instead)
-display sdl
-no-frame
-nodefconfig (use -no-user-config instead)
-sdl
-virtioconsole (use -device virtconsole instead)
- These previously unsupported command line options are no longer recognized:
-device cmd646-ide
@ -196,17 +197,23 @@ Deprecated, Superseded, Modified and Dropped Features
- These previously unsupported command line options are now deprecated:
-bt
-enable-hax
-machine prep (use -machine 40p instead)
-M prep (use -M 40p instead)
- These previously unsupported command line options are no longer recognized:
-device isa-cirrus-vga
-device ramfb
-enable-hax
-tdf
-xen-create
- This previously supported QMP command is now deprecated:
cpu-add
query-cpus (use query-cpus-fast instead)
query-events
- This previously supported monitor command is now deprecated:
cpu-add
- These previously supported monitor commands are no longer recognized:
pci_add (use device_add instead)
@ -214,13 +221,27 @@ Deprecated, Superseded, Modified and Dropped Features
usb_add (use device_add instead)
usb_del (use device_del instead)
- These previously unsupported monitor command are now deprecated:
acl_add ...
acl_policy ...
acl_remove ...
acl_reset ...
acl_show ...
- These previously unsupported monitor commands are no longer recognized:
host_net_add
host_net_remove
- This previously unsupported QMP command is now supported under a new name:
- These previously unsupported QMP command is now supported under a new name:
x-block-dirty-bitmap-disable (use block-dirty-bitmap-disable instead)
x-block-dirty-bitmap-enable (use block-dirty-bitmap-enable instead)
x-block-dirty-bitmap-merge (use block-dirty-bitmap-merge instead)
x-block-latency-histogram-set (use block-latency-histogram-set instead)
x-blockdev-create (use blockdev-create instead)
- This previously unsupported QMP command is no longer recognized:
x-nbd-server-add-bitmap
- Due to upstream's decision to no longer fully support the qed storage format
going forward (since it really provides no benefit over qcow2 and is now no
longer actively maintained upstream), creating qed storage images is no longer
@ -254,12 +275,12 @@ QEMU Command-Line and Monitor Syntax and Support
-alt-grab
-append ...
-audio-help
-audiodev
-bios ...
-blockdev ...
-boot ...
-cdrom ...
-chardev ..
-clock ...
-cpu host
-ctrl-grab
-d ...
@ -271,11 +292,26 @@ QEMU Command-Line and Monitor Syntax and Support
virtio-scsi-pci|scsi-cd|scsi-hd|scsi-generic|scsi-disk|scsi-block|
pci-serial|pci-serial-2x|pci-serial-4x|ich9-ahci|usb-host|usb-serial|
usb-wacom-tablet|usb-braille|usb-net|pci-ohci|virtio-rng-pci|i6300esb|
qxl|qxl-vga|pvpanic|vfio-pci|ivshmem|ivshmem-doorbell|ivshmem-plain|
pci-bridge|megasas-gen2|e1000e|e1000|cirrus-vga]
qxl|qxl-vga|pvpanic|vfio-pci|ivshmem-doorbell|ivshmem-plain|
virtio-crypto-pci|virtio-mmio|vhost-vsock-pci|vhost-user-blk|
vhost-user-blk-pci|pci-bridge|megasas-gen2|e1000e|e1000|cirrus-vga|
virtio-vga|vhost-scsi-pci-non-transitional|
vhost-scsi-pci-transitional|vhost-user-blk-pci-non-transitional|
vhost-user-blk-pci-transitional|vhost-user-scsi-pci-non-transitional|
vhost-user-scsi-pci-transitional|vhost-vsock-pci-non-transitional|
vhost-vsock-pci-transitional|virtio-9p-pci-non-transitional|
virtio-9p-pci-transitional|virtio-balloon-pci-non-transitional|
virtio-balloon-pci-transitional|virtio-blk-pci-non-transitional|
virtio-blk-pci-transitional|virtio-input-host-pci-non-transitional|
virtio-input-host-pci-transitional|virtio-net-pci-non-transitional|
virtio-net-pci-transitional|virtio-rng-pci-non-transitional|
virtio-rng-pci-transitional|virtio-scsi-pci-non-transitional|
virtio-scsi-pci-transitional|virtio-serial-pci-non-transitional|
virtio-serial-pci-transitional]
(the following are aliases of these supported devices: ahci|
virtio-blk|virtio-net|virtio-serial|virtio-balloon| virtio-9p|
virtio-scsi|virtio-rng|e1000-82540em)
virtio-input-host|virtio-keyboard|virtio-mouse|virtio-tablet|
virtio-gpu|virtio-scsi|virtio-rng|e1000-82540em)
-dfilter range, ...
-display ...
-drive ... (if specified if=[virtio] and format=[qcow2|raw] and
@ -310,7 +346,6 @@ QEMU Command-Line and Monitor Syntax and Support
-netdev [bridge|tap|user] ...
-nic ...
-nodefaults
-no-frame
-nographic
-no-quit
-no-reboot
@ -341,7 +376,6 @@ QEMU Command-Line and Monitor Syntax and Support
-version
-vga [none|qxl|std|virtio]
-virtfs ...
-virtioconsole ...
-vnc ...
-watchdog ...
-watchdog-action ...
@ -440,6 +474,9 @@ QEMU Command-Line and Monitor Syntax and Support
block-commit
block-dirty-bitmap-add
block-dirty-bitmap-clear
block-dirty-bitmap-disable
block-dirty-bitmap-enable
block-dirty-bitmap-merge
block-dirty-bitmap-remove
block_passwd
block_resize
@ -507,6 +544,7 @@ QEMU Command-Line and Monitor Syntax and Support
query-cpu-model-expansion
query-cpus
query-cpus-fast
query-current-machine
query-display-options
query-dump
query-dump-guest-memory-capability
@ -571,7 +609,7 @@ QEMU Command-Line and Monitor Syntax and Support
-chroot ...
-cpu ... (all except host)
-curses
-device [adb-keyboard| adb-mouse|adlib|amd-iommu|AMDVI-PCI|ccid-card-emulated|
-device [adb-keyboard|adb-mouse|adlib|amd-iommu|AMDVI-PCI|ccid-card-emulated|
ccid-card-passthrough|cfi.pflash02|cirrus-vga|cs4231a|
dec-21154-p2p-bridge|dec-21154-sysbus|e1000 e500-ccsr|e500-pcihost|
e500-spin|escc|esp|eTSEC|floppy|generic-sdhci|gus|grackle-pcihost|
@ -582,7 +620,7 @@ QEMU Command-Line and Monitor Syntax and Support
isa-vga|isabus-bridge|kvm-openpic|loader|lsi53c810a|macio-ide|
macio-nvram|mpc8544-guts|mpc8xxx_gpio|ne2k_isa|nvdimm|openpic|pc-dimm|
pc-testdev|pc87312|piix3-ide|piix3-ide|piix3-ide-xen|piix3-usb-uhci|
platform-bus-device|pnv-lpc|powernv-chip-POWER8|powernv-chip-POWER8E|
platform-bus-device|powernv-chip-POWER8|powernv-chip-POWER8E|
powernv-chip-POWER8NVL|powernv-chip-POWER9|powernv-cpu-core-POWER8|
powernv-cpu-core-POWER8E|powernv-cpu-core-POWER8NVL|
powernv-cpu-core-POWER9|ppc4xx-pcihost|prep-systemio|raven-pcihost|
@ -592,17 +630,21 @@ QEMU Command-Line and Monitor Syntax and Support
uni-north-agp-pcihost|uni-north-internal-pci-pcihost|uni-north-pci|
uni-north-pci-pcihost|unimplemented-device|usb-redir|
vfio-pci-igd-lpc-bridge|vfio-pci-nohotplug|vfio-platform|
vhost-vsock-device|vhost-vsock-pci|virtconsole|virtio-crypto-device|
virtio-crypto-pci|virtio-mmio|virtio-vga|vmgenid|vmware-svga|
xen-backend|xen-pci-passthrough|xen-platform|xen-pvdevice|xen-sysdev|
xlnx.xps-ethernetlite|xlnx.xps-intc|xlnx.xps-timer|xlnx.xps-uartlite|
*-i386-cpu|*-powerpc64-cpu|*-spapr-cpu-core|*-x86_64-cpu|vmcoreinfo|
sii3112|vhost-user-blk|vhost-user-blk-pci|pvrdma|sungem|
virtio-crypto-device|vhost-vsock-device|virtconsole|vmgenid|
vmware-svga|xen-backend|xen-pci-passthrough|xen-platform|
xen-pvdevice|xen-sysdev|xlnx.xps-ethernetlite|xlnx.xps-intc|
xlnx.xps-timer|xlnx.xps-uartlite|*-i386-cpu|*-powerpc64-cpu|
*-spapr-cpu-core|*-x86_64-cpu|vmcoreinfo|sii3112|pvrdma|sungem|
ccid-card-emulated|ccid-card-passthru| bochs-display|isa-cirrus-vga|
at24c-eeprom|i2c-ddc|kvaser_pci|m41t80|mioe3680_pci|pcm3680_pci]
at24c-eeprom|i2c-ddc|kvaser_pci|m41t80|mioe3680_pci|pcm3680_pci|
ati-vga|cpu-cluster|ds1338|i82801b11-bridge|ib700|ioh3420|mpc-i2c|
pcie-pci-bridge|pcie-root-port|platform-ehci-usb|pnv-lpc-POWER8|
pnv-lpc-POWER9|pnv-occ-POWER8|pnv-occ-POWER9|pnv-psi-POWER8|
pnv-psi-POWER9|pnv-xive|powernv-cpu-quad|spapr-drc-phb|spapr-xive|
vfio-amd-xgbe|vfio-calxeda-xgmac|vmxnet3|x3130-upstream|
xio3130-downstream|xive-end-source|xive-source|xive-tctx]
(the following are aliases of these unsupported devices: lsi|
virtio-input-host|virtio-keyboard|virtio-mouse|virtio-tablet|
virtio-gpu|piix-usb-uhci|mac-dbdma|ppc4xx-i2c)
piix3-usb-uhci|mac-dbdma|ppc4xx-i2c)
(note that some of these device names represent supported devices and
are used internally, but are not specifyable via -device even though
they appear in the list of devices)
@ -656,7 +698,6 @@ QEMU Command-Line and Monitor Syntax and Support
-vga [cg3|tcx|virtio|cirrus|xenfb]
-win2k-hack
-xen-attach ...
-xen-create
-xen-domid ...
- The following monitor commands are unsupported:
@ -710,16 +751,13 @@ QEMU Command-Line and Monitor Syntax and Support
query-colo-status
query-sev
query-sev-launch-measure
x-block-dirty-bitmap-disable
x-block-dirty-bitmap-enable
x-block-dirty-bitmap-merge
x-blockdev-change
x-blockdev-insert-medium
x-blockdev-remove-medium
x-blockdev-reopen
x-colo-lost-heartbeat
x-exit-preconfig
x-debug-block-dirty-bitmap-sha256
x-nbd-server-add-bitmap
xen-colo-do-checkpoint
xen-load-devices-state
xen-save-devices-state

View File

@ -1,6 +1,7 @@
[qemu-s390 package document]
[Note: post SLES 15 SP1 changes are not fully incorporated into this document]
SLES 15 SP1 QEMU/KVM RELATED SUPPORT STATEMENTS
POST SLES 15 SP1 QEMU/KVM RELATED SUPPORT STATEMENTS
Overview
--------
@ -28,8 +29,8 @@ Overview
QEMU is a primary component of KVM based virtualization. The legacy qemu-kvm
program is available for continuity with pre SLES 12 usage, including in
libvirt domain xml references. The QEMU emulator binary qemu-system-s390x is
now the primary programs to use to access KVM virtualization. When using this
programs, the -machine option accel=kvm (or its alias -enable-kvm) must be
now the primary program to use to access KVM virtualization. When using this
program, the -machine option accel=kvm (or its alias -enable-kvm) must be
specified for KVM acceleration to be used by the guest.
Libvirt is the preferred means of accessing QEMU/KVM functionality and is
@ -146,7 +147,7 @@ Deprecated, Superseded, Modified and Dropped Features
in Appendix B of the qemu-doc.* files installed with the qemu package.
- The use of "?" as a parameter to "-cpu", "-soundhw", "-device", "-M",
"-machine", "-d", and "-clock" is now considered deprecated. Use "help"
"-machine" and "-d" is now considered deprecated. Use "help"
instead.
- The use of "if=scsi" as a parameter to "-drive" does not work anymore with PC
@ -165,21 +166,22 @@ Deprecated, Superseded, Modified and Dropped Features
acpitable, boot, and smp respectively.
- These previously supported command line options are now considered deprecated:
-clock
-device ivshmem (use ivshmem-doorbell or ivshmem-plain instead)
-no-frame
-virtioconsole (use -device virtconsole instead)
<none>
- These previously supported command line options are no longer supported:
<previously mentioned items have been moved to another category>
- These previously supported command line options are no longer recognized:
-balloon (use -device virtio-balloon instead)
-clock
-device ivshmem (use ivshmem-doorbell or ivshmem-plain instead)
-device pc-sysfw (no longer needed)
-device pci-assign, -device kvm-pci-assign (use -device vfio-pci instead)
-display sdl
-no-frame
-nodefconfig (use -no-user-config instead)
-sdl
-virtioconsole (use -device virtconsole instead)
- Specifying a cpu feature with both "+feature/-feature" and "feature=on/off"
will now cause a warning. The current behavior for this combination where
@ -192,29 +194,49 @@ Deprecated, Superseded, Modified and Dropped Features
- These previously unsupported command line options are now deprecated:
-bt
-enable-hax
- These previously unsupported command line options are no longer recognized:
-device mmio_interface
-device ramfb
-enable-hax
-tdf
-xen-create
- This previously supported QMP command is now deprecated:
cpu-add
query-cpus (use query-cpus-fast instead)
query-events
- This previously supported monitor command is now deprecated:
cpu-add
- These previously supported monitor commands are no longer recognized:
pci_add (use device_add instead)
pci_del (use device_del instead)
- These previously unsupported monitor command are now deprecated:
acl_add ...
acl_policy ...
acl_remove ...
acl_reset ...
acl_show ...
- These previously unsupported monitor commands are no longer recognized:
host_net_add
host_net_remove
usb_add
usb_del
- This previously unsupported QMP command is now supported under a new name:
- These previously unsupported QMP command is now supported under a new name:
x-block-dirty-bitmap-disable (use block-dirty-bitmap-disable instead)
x-block-dirty-bitmap-enable (use block-dirty-bitmap-enable instead)
x-block-dirty-bitmap-merge (use block-dirty-bitmap-merge instead)
x-block-latency-histogram-set (use block-latency-histogram-set instead)
x-blockdev-create (use blockdev-create instead)
- This previously unsupported QMP command is no longer recognized:
x-nbd-server-add-bitmap
- Due to upstream's decision to no longer fully support the qed storage format
going forward (since it really provides no benefit over qcow2 and is now no
longer actively maintained upstream), creating qed storage images is no longer
@ -248,12 +270,12 @@ QEMU Command-Line and Monitor Syntax and Support
-alt-grab
-append ...
-audio-help
-audiodev
-bios ...
-blockdev ...
-boot ...
-cdrom ...
-chardev ..
-clock ...
-cpu host
-ctrl-grab
-d ...
@ -263,9 +285,27 @@ QEMU Command-Line and Monitor Syntax and Support
virtconsole|virtio-serial-pci|virtio-scsi-pci|scsi-cd|scsi-hd|
scsi-generic|scsi-disk|scsi-block|virtio-rng-pci|pci-bridge|
megasas-gen2|e1000e|e1000|zpci|virtio-gpu-ccw|virtio-keyboard-ccw|
virtio-mouse-ccw|virtio-tablet-ccw|vfio-pci]
vhost-user-blk-pci|vhost-user-scsi|vhost-user-scsi-pci|
vhost-vsock-ccw|virtio-balloon-ccw|virtio-blk-ccw|
vhost-scsi-ccw|vhost-user-blk|virtio-crypto-ccw|virtio-net-ccw|
virtio-rng-ccw|virtio-scsi-ccw|virtio-serial-ccw|virtio-mouse-ccw|
virtio-tablet-ccw|vfio-pci|virtio-vga|vhost-scsi-pci-non-transitional|
vhost-scsi-pci-transitional|vhost-user-blk-pci-non-transitional|
vhost-user-blk-pci-transitional|vhost-user-scsi-pci-non-transitional|
vhost-user-scsi-pci-transitional|vhost-vsock-pci-non-transitional|
vhost-vsock-pci-transitional|virtio-9p-pci-non-transitional|
virtio-9p-pci-transitional|virtio-balloon-pci-non-transitional|
virtio-balloon-pci-transitional|virtio-blk-pci-non-transitional|
virtio-blk-pci-transitional|virtio-input-host-pci-non-transitional|
virtio-input-host-pci-transitional|virtio-net-pci-non-transitional|
virtio-net-pci-transitional|virtio-rng-pci-non-transitional|
virtio-rng-pci-transitional|virtio-scsi-pci-non-transitional|
virtio-scsi-pci-transitional|virtio-serial-pci-non-transitional|
virtio-serial-pci-transitional]
(the following are aliases of these supported devices: virtio-blk|
virtio-net|virtio-serial|virtio-balloon|virtio-scsi|virtio-rng)
virtio-input-host|virtio-keyboard|virtio-mouse|virtio-tablet|
virtio-gpu|virtio-9p|virtio-net|virtio-serial|virtio-balloon|
virtio-scsi|virtio-rng)
-dfilter range, ...
-display ...
-drive ... (if specified if=[virtio] and format=[qcow2|raw] and
@ -302,7 +342,6 @@ QEMU Command-Line and Monitor Syntax and Support
-netdev [bridge|tap|user] ...
-nic ...
-nodefaults
-no-frame
-nographic
-no-quit
-no-reboot
@ -329,7 +368,6 @@ QEMU Command-Line and Monitor Syntax and Support
-version
-vga [none|qxl|std]
-virtfs ...
-virtioconsole ...
-vnc ...
-watchdog ...
-watchdog-action ...
@ -432,6 +470,9 @@ QEMU Command-Line and Monitor Syntax and Support
block-commit
block-dirty-bitmap-add
block-dirty-bitmap-clear
block-dirty-bitmap-disable
block-dirty-bitmap-enable
block-dirty-bitmap-merge
block-dirty-bitmap-remove
block_passwd
block_resize
@ -501,6 +542,7 @@ QEMU Command-Line and Monitor Syntax and Support
query-cpu-model-expansion
query-cpus
query-cpus-fast
query-current-machine
query-display-options
query-dump
query-dump-guest-memory-capability
@ -576,27 +618,23 @@ QEMU Command-Line and Monitor Syntax and Support
isa-parallel|isa-serial|isa-vga|lsi53c810|lsi53c810a|max-s390x-cpu|
megasas|mptsas1068|ne2k_isa|ne2k_pci|nec-usb-xhci|nvdimm|nvme|pc-dimm|
pci-testdev|pcnet|pc-testdev|piix3-ide|piix3-ide|piix3-ide-xen|
piix4-usb-uhci|pvrdma|pvscsi|pxb|pxb-host|pxb-pcie|qemu-s390-cpu|
piix4-usb-uhci|pvscsi|pxb|pxb-host|pxb-pcie|qemu-s390-cpu|
rocker|s390-flic|s390-flic-qemu|s390-ipl|s390-pcihost|
s390-sclp-event-facility|s390-skeys-qemu|sb16|sclp|sclpconsole|
sclp-cpu-hotplug|sclplmconsole|sclp-memory-hotplug-dev|sclpquiesce|
sd-card|sdhci-pci|secondary-vga|sga|smbus-eeprom|tpci200|usb-audio|
usb-bot|usb-bt-dongle|usb-ccid|usb-mtp|usb-uas|vfio-ap|
vfio-pci-nohotplug|vfio-platform|vhost-scsi-ccw|vhost-user-blk|
vhost-user-blk-pci|vhost-user-scsi|vhost-user-scsi-pci|
vhost-vsock-ccw|virtio-9p-device|virtio-balloon-ccw|virtio-blk-ccw|
virtio-crypto-ccw|virtio-net-ccw|virtio-rng-ccw|virtio-scsi-ccw|
virtio-serial-ccw|virtio-vga|virtual-css-bridge|vmcoreinfo|vmgenid|
vmware-svga|vmxnet3|vt82c686b-usb-uhci|x3130-upstream|*-x86_64-cpu|
xen-backend|xen-pci-passthrough|xen-platform|xen-pvdevice|
xio3130-downstream|z10BC.2-base-s390x-cpu|z10BC.2-s390x-cpu|
z10BC-base-s390x-cpu|z10BC-s390x-cpu|z10EC.2-base-s390x-cpu|
z10EC.2-s390x-cpu|z10EC.3-base-s390x-cpu|z10EC.3-s390x-cpu|
z10EC-base-s390x-cpu|z10EC-s390x-cpu|z114-base-s390x-cpu|
z114-s390x-cpu|z13.2-base-s390x-cpu|z13.2-s390x-cpu|
z13-base-s390x-cpu|z13-s390x-cpu|z13s-base-s390x-cpu|z13s-s390x-cpu|
z196.2-base-s390x-cpu|z196.2-s390x-cpu|z196-base-s390x-cpu|
z196-s390x-cpu|z800-base-s390x-cpu|z800-s390x-cpu|
vfio-pci-nohotplug|virtio-9p-device|virtual-css-bridge|vmcoreinfo|
vmgenid|vmware-svga|vmxnet3|vt82c686b-usb-uhci|x3130-upstream|
*-x86_64-cpu|xen-backend|xen-pci-passthrough|xen-platform|
xen-pvdevice|xio3130-downstream|z10BC.2-base-s390x-cpu|
z10BC.2-s390x-cpu|z10BC-base-s390x-cpu|z10BC-s390x-cpu|
z10EC.2-base-s390x-cpu|z10EC.2-s390x-cpu|z10EC.3-base-s390x-cpu|
z10EC.3-s390x-cpu|z10EC-base-s390x-cpu|z10EC-s390x-cpu|
z114-base-s390x-cpu|z114-s390x-cpu|z13.2-base-s390x-cpu|
z13.2-s390x-cpu|z13-base-s390x-cpu|z13-s390x-cpu|z13s-base-s390x-cpu|
z13s-s390x-cpu|z196.2-base-s390x-cpu|z196.2-s390x-cpu|
z196-base-s390x-cpu|z196-s390x-cpu|z800-base-s390x-cpu|z800-s390x-cpu|
z890.2-base-s390x-cpu|z890.2-s390x-cpu|z890.3-base-s390x-cpu|
z890.3-s390x-cpu|z890-base-s390x-cpu|z890-s390x-cpu|
z900.2-base-s390x-cpu|z900.2-s390x-cpu|z900.3-base-s390x-cpu|
@ -610,10 +648,9 @@ QEMU Command-Line and Monitor Syntax and Support
z9EC-base-s390x-cpu|z9EC-s390x-cpu|z14ZR1-base-s390x-cpu|
z14ZR1-s390x-cpu|zBC12-base-s390x-cpu|zBC12-s390x-cpu|
zEC12.2-base-s390x-cpu|zEC12.2-s390x-cpu|zEC12-base-s390x-cpu|
zEC12-s390x-cpu]
zEC12-s390x-cpu|cpu-cluster|z14.2-base-s390x-cpu|z14.2-s390x-cpu]
(the following are aliases of these unsupported devices: lsi|
virtio-input-host|virtio-keyboard|virtio-mouse|virtio-tablet|
virtio-gpu|virtio-9p|ahci|e1000-82540em|vfio-ccw)
ahci|e1000-82540em|vfio-ccw)
(note that some of these device names represent supported devices and
are used internally, but are not specifyable via -device even though
they appear in the list of devices)
@ -672,7 +709,6 @@ QEMU Command-Line and Monitor Syntax and Support
-vga [cg3|tcx|virtio|cirrus|xenfb|vmware]
-win2k-hack
-xen-attach ...
-xen-create
-xen-domid ...
-xen-domid-restrict ...
@ -730,16 +766,13 @@ QEMU Command-Line and Monitor Syntax and Support
query-tpm
query-tpm-models
query-tpm-types
x-block-dirty-bitmap-disable
x-block-dirty-bitmap-enable
x-block-dirty-bitmap-merge
x-blockdev-change
x-blockdev-insert-medium
x-blockdev-remove-medium
x-blockdev-reopen
x-colo-lost-heartbeat
x-debug-block-dirty-bitmap-sha256
x-exit-preconfig
x-nbd-server-add-bitmap
xen-colo-do-checkpoint
xen-load-devices-state
xen-save-devices-state

View File

@ -1,6 +1,7 @@
[qemu-x86 package document]
[Note: post SLES 15 SP1 changes are not fully incorporated into this document]
SLES 15 SP1 QEMU/KVM RELATED SUPPORT STATEMENTS
POST SLES 15 SP1 QEMU/KVM RELATED SUPPORT STATEMENTS
Overview
--------
@ -180,7 +181,7 @@ Deprecated, Superseded, Modified and Dropped Features
problems, and is now considered deprecated.
- The use of "?" as a parameter to "-cpu", "-soundhw", "-device", "-M",
"-machine", "-d", and "-clock" is now considered deprecated. Use "help"
"-machine" and "-d" is now considered deprecated. Use "help"
instead.
- The use of "if=scsi" as a parameter to "-drive" does not work anymore with PC
@ -204,22 +205,26 @@ Deprecated, Superseded, Modified and Dropped Features
threads) the derived guest ABI is not guaranteed to be equivalent in future
versions.
- The previously supported machine types pc-0.12, pc-0.14 and pc-0.15 are now
deprecated.
- These previously supported command line options are now considered deprecated:
-clock
-device ivshmem (use ivshmem-doorbell or ivshmem-plain instead)
-no-frame
-virtioconsole (use -device virtconsole instead)
<none>
- These previously supported command line options are no longer supported:
<previously mentioned items have been moved to another category>
- These previously supported command line options are no longer recognized:
-balloon (use -device virtio-balloon instead)
-clock
-device ivshmem (use ivshmem-doorbell or ivshmem-plain instead)
-device pc-sysfw (no longer needed)
-device pci-assign, -device kvm-pci-assign (use -device vfio-pci instead)
-display sdl
-no-frame
-nodefconfig (use -no-user-config instead)
-sdl
-virtioconsole (use -device virtconsole instead)
- Specifying a cpu feature with both "+feature/-feature" and "feature=on/off"
will now cause a warning. The current behavior for this combination where
@ -232,10 +237,9 @@ Deprecated, Superseded, Modified and Dropped Features
- These previously unsupported command line options are now deprecated:
-bt
-enable-hax (used -accel hax instead)
-no-kvm-pit
- The unsupported machine types pc-0.10 and pc-0.11 are now deprecated.
- The previously unsupported machine type pc-0.13 is now deprecated.
- The case of specified sockets, cores, and threads not matching the vcpu count
is no longer silently ignored. QEMU now requires that the topology match the
@ -261,9 +265,11 @@ Deprecated, Superseded, Modified and Dropped Features
-device testdev (use -device pc-testdev instead)
-device virtio-mmio
-device xln,ps7-usb
-enable-hax (use -accel hax instead)
-enable-nesting
-kvm-shadow-memory (use -machine kvm_shadow_mem= instead)
-M mac
-machine mac
-no-kvm-irqchip (use -machine kernel_irqchip=off instead)
-no-kvm-pit
-no-kvm-pit-reinjection (use -global kvm-pit.lost_tick_policy=discard instead)
@ -274,9 +280,18 @@ Deprecated, Superseded, Modified and Dropped Features
-qtest
-semihosting
-tdf (note: mistakenly listed previously as supported)
-xen-create
- The previously unsupported machine types pc-0.10 and pc-0.11 are no longer
recognized.
- This previously supported QMP command is now deprecated:
cpu-add
query-cpus (use query-cpus-fast instead)
query-events
- This previously supported monitor command is now deprecated:
cpu-add
- These previously supported monitor commands are no longer recognized:
cpu_set
@ -285,14 +300,28 @@ Deprecated, Superseded, Modified and Dropped Features
usb_add (use device_add instead)
usb_del (use device_del instead)
- These previously unsupported monitor command are now deprecated:
acl_add ...
acl_policy ...
acl_remove ...
acl_reset ...
acl_show ...
- These previously unsupported monitor commands are no longer recognized:
host_net_add
host_net_remove
- This previously unsupported QMP command is now supported under a new name:
- These previously unsupported QMP command is now supported under a new name:
x-block-dirty-bitmap-disable (use block-dirty-bitmap-disable instead)
x-block-dirty-bitmap-enable (use block-dirty-bitmap-enable instead)
x-block-dirty-bitmap-merge (use block-dirty-bitmap-merge instead)
x-block-latency-histogram-set (use block-latency-histogram-set instead)
x-blockdev-create (use blockdev-create instead)
x-input-send-event (use input-send-event instead)
- This previously unsupported QMP command is no longer recognized:
x-nbd-server-add-bitmap
- Due to the lack of migration support (mainly due to ahci interface issues)
and other unstable interface issues, earlier versions of the q35 machine type
are not supported in this release. The current q35 machine type is however now
@ -337,32 +366,49 @@ QEMU Command-Line and Monitor Syntax and Support
-alt-grab
-append ...
-audio-help
-audiodev
-bios ...
-blockdev ...
-boot ...
-cdrom ...
-chardev ..
-clock ...
-cpu ... (all except host)
-ctrl-grab
-d ...
-daemonize
-debugcon ...
-device [isa-serial|isa-parallel|isa-fdc|ide-drive|ide-hd|ide-cd|
VGA|cirrus-vga|rtl8139|virtio-net-pci|virtio-blk-pci|
virtio-balloon-pci|virtio-9p-pci|usb-hub|usb-ehci|usb-tablet|
usb-storage|usb-mouse|usb-kbd|virtserialport|virtconsole|
virtio-serial-pci|sga|i82559er|virtio-scsi-pci|scsi-cd|scsi-hd|
-device [isa-serial|isa-parallel|isa-fdc|ide-drive|ide-hd|ide-cd|VGA|
cirrus-vga|rtl8139|usb-hub|usb-ehci|usb-tablet|usb-storage|usb-mouse|
usb-kbd|virtserialport|virtconsole|sga|i82559er|scsi-cd|scsi-hd|
scsi-generic|scsi-disk|scsi-block|pci-serial|pci-serial-2x|
pci-serial-4x|ich9-ahci|piix-usb-uhci|usb-host|usb-serial|
usb-wacom-tablet|usb-braille|usb-net|pci-ohci|piix4-usb-uhci|
virtio-rng-pci|i6300esb|ib700|qxl|qxl-vga|pvpanic|vfio-pci|ivshmem|
ivshmem-doorbell|ivshmem-plain|pci-bridge|megasas-gen2|pc-dimm|
floppy|e1000e|ccid-card-emulated|ccid-card-passthrough|xen-backend|
loader|e1000|vmgenid|vmcoreinfo|pcie-pci-bridge]
pci-serial-4x|ich9-ahci|piix3-usb-uhci|usb-host|usb-serial|
usb-wacom-tablet|usb-braille|usb-net|pci-ohci|piix4-usb-uhci|i6300esb|
ib700|qxl|qxl-vga|pvpanic|vfio-pci|ivshmem-doorbell|ivshmem-plain|
pci-bridge|megasas-gen2|pc-dimm|floppy|e1000e|ccid-card-emulated|
ccid-card-passthrough|xen-backend|loader|e1000-82540em|vmgenid|
vmcoreinfo|pcie-pci-bridge|ich9-usb-ehci1|ich9-usb-ehci2|
ich9-usb-uhci1|ich9-usb-uhci2|ich9-usb-uhci3|ich9-usb-uhci4|
ich9-usb-uhci5|ich9-usb-uhci6|usb-redir|vhost-scsi|vhost-scsi-pci|
vhost-user-blk|vhost-user-blk-pci|vhost-user-scsi|vhost-user-scsi-pci|
vhost-vsock-pci|virtio-balloon-pci|
virtio-balloon-pci-non-transitional|virtio-balloon-pci-transitional|
virtio-blk-pci|virtio-blk-pci-non-transitional|
virtio-blk-pci-transitional|virtio-net-pci|
virtio-net-pci-non-transitional|virtio-net-pci-transitional|
virtio-9p-pci|virtio-9p-pci-non-transitional|
virtio-9p-pci-transitional|virtio-serial-pci|
virtio-serial-pci-non-transitional|virtio-serial-pci-transitional|
virtio-scsi-pci|virtio-scsi-pci-non-transitional|
virtio-scsi-pci-transitional|virtio-rng-pci|
virtio-rng-pci-non-transitional|virtio-rng-pci-transitional|
virtio-input-host-pci|virtio-input-host-pci-non-transitional|
virtio-input-host-pci-transitional|virtio-keyboard-pci|
virtio-mouse-pci|virtio-tablet-pci|virtio-gpu-pci|virtio-crypto-pci|
virtio-vga]
(the following are aliases of these supported devices: ahci|
virtio-blk|virtio-net|virtio-serial|virtio-balloon| virtio-9p|
virtio-scsi|virtio-rng|e1000-82540em)
e1000|virtio-blk|virtio-net|virtio-serial|virtio-balloon|virtio-9p|
virtio-scsi|virtio-rng|virtio-input-host|virtio-keyboard|virtio-mouse|
virtio-tablet|virtio-gpu)
-dfilter range, ...
-display ...
-drive ... (if specified if=[floppy|ide|virtio] and format=[qcow2|raw] and
@ -406,7 +452,6 @@ QEMU Command-Line and Monitor Syntax and Support
-no-acpi
-nodefaults
-no-fd-bootchk
-no-frame
-nographic
-no-hpet
-no-quit
@ -441,7 +486,6 @@ QEMU Command-Line and Monitor Syntax and Support
-version
-vga [cirrus|none|qxl|std|xenfb]
-virtfs ...
-virtioconsole ...
-vnc ...
-watchdog ...
-watchdog-action ...
@ -549,6 +593,9 @@ QEMU Command-Line and Monitor Syntax and Support
block-commit
block-dirty-bitmap-add
block-dirty-bitmap-clear
block-dirty-bitmap-disable
block-dirty-bitmap-enable
block-dirty-bitmap-merge
block-dirty-bitmap-remove
block_passwd
block_resize
@ -618,6 +665,7 @@ QEMU Command-Line and Monitor Syntax and Support
query-cpu-model-expansion
query-cpus
query-cpus-fast
query-current-machine
query-display-options
query-dump
query-dump-guest-memory-capability
@ -687,36 +735,29 @@ QEMU Command-Line and Monitor Syntax and Support
-cpu host
-curses
-device [ipoctal232|i82562|nec-usb-xhci|hda-duplex|hda-output|usb-bot|
lsi53c810a|ich9-usb-uhci2|ich9-usb-uhci6|ich9-usb-uhci5|
ich9-usb-uhci3|isa-debug-exit|ne2k_pci|usb-uas|ich9-usb-uhci4|ioh3420|
isa-ide|usb-ccid|ich9-usb-ehci2|pcnet|ich9-intel-hda|dc390|
ich9-usb-ehci1|hda-micro|x3130-upstream|isa-cirrus-vga|ich9-usb-uhci1|
lsi53c810a|isa-debug-exit|ne2k_pci|usb-uas|ioh3420|isa-ide|usb-ccid|
pcnet|ich9-intel-hda|dc390|hda-micro|x3130-upstream|isa-cirrus-vga|
pc-testdev|ne2k_isa|isa-vga|cs4231a|gus|vmware-svga|i82801b11-bridge|
i82557a|i82557c|i82557b|i82801|AC97|am53c974|intel-hda|i82558a|
i82558b|usb-audio|i82550|isa-debugcon|sb16|megasas|i82551|
xio3130-downstream|vt82c686b-usb-uhci|tpci200|i82559a|i82559b|i82559c|
isa-applesmc|usb-bt-dongle|adlib|ES1370|lsi53c810|nvme|pci-testdev|
pvscsi|vhost-scsi|vhost-scsi-pci|virtio-9p-device|
virtio-balloon-device|virtio-blk-device|virtio-net-device|
virtio-rng-device|virtio-scsi-device|virtio-serial-device|vmxnet3|
xen-pci-passthrough|xen-platform|xen-pvdevice|piix3-ide|piix3-ide-xen|
piix3-ide|i8042|sdhci-pci|secondary-vga|edu|intel_iommu|usb-mtp|
e1000-82544gc|e1000-82545em|virtio-input-host-pci|virtio-keyboard-pci|
virtio-mouse-pci|virtio-tablet-pci|virtio-gpu-pci|pci-bridge-seat|pxb|
pxb-pcie|rocker|virtio-input-host-device|virtio-keyboard-device|
virtio-mouse-device|virtio-tablet-device|virtio-vga|hyperv-testdev|
generic-sdhci|igd-passthrough-isa-bridge|ipmi-bmc-extern|ipmi-bmc-sim|
isa-ipmi-bt|isa-ipmi-kcs|mptsas1068|nvdimm|pxb-host|sd-card|
virtio-gpu-device|amd-iommu|AMDVI-PCI|vhost-vsock-device|
vhost-vsock-pci|virtio-crypto-device|virtio-crypto-pci|
vfio-pci-igd-lpc-bridge|pcie-root-port|qemu-xhci|*-i386-cpu|
*-x86_64-cpu|vhost-user-scsi|vhost-user-scsi-pci|vhost-user-blk|
vhost-user-blk-pci|pvrdma|bochs-display|ramfb|ccid-card-emulated|
ccid-card-passthru|kvaser_pci|tpm-crb|mioe3680_pci|pcm3680_pci|
hyperv-synic|vfio-pci-nohotplug|vfio-platform]
(the following are aliases of these unsupported devices: lsi|
virtio-input-host|virtio-keyboard|virtio-mouse|virtio-tablet|
virtio-gpu)
pvscsi|virtio-9p-device|virtio-balloon-device|virtio-blk-device|
virtio-net-device|virtio-rng-device|virtio-scsi-device|
virtio-serial-device|vmxnet3|xen-pci-passthrough|xen-platform|
xen-pvdevice|piix3-ide|piix3-ide-xen|piix3-ide|i8042|sdhci-pci|
secondary-vga|edu|intel_iommu|usb-mtp|e1000-82544gc|e1000-82545em|
pci-bridge-seat|pxb|pxb-pcie|rocker|virtio-input-host-device|
virtio-keyboard-device|virtio-mouse-device|virtio-tablet-device|
hyperv-testdev|generic-sdhci|igd-passthrough-isa-bridge|
ipmi-bmc-extern|ipmi-bmc-sim|isa-ipmi-bt|isa-ipmi-kcs|mptsas1068|
nvdimm|pxb-host|sd-card|virtio-gpu-device|amd-iommu|AMDVI-PCI|
vhost-vsock-device|virtio-crypto-device|vfio-pci-igd-lpc-bridge|
pcie-root-port|qemu-xhci|*-i386-cpu|*-x86_64-cpu|pvrdma|bochs-display|
ramfb|ccid-card-emulated|ccid-card-passthru|kvaser_pci|tpm-crb|
mioe3680_pci|pcm3680_pci|hyperv-synic|vfio-pci-nohotplug|
vfio-platform|xen-bridge|xen-cdrom|xen-disk|ati-vga|cpu-cluster]
(the following are aliases of these unsupported devices: lsi)
(note that some of these device names represent supported devices and
are used internally, but are not specifyable via -device even though
they appear in the list of devices)
@ -728,18 +769,19 @@ QEMU Command-Line and Monitor Syntax and Support
-g ...
-icount ...
-L ...
-M [isapc|pc-0.10|pc-0.11|pc-0.13|pc-1.0|pc-1.1|pc-1.2|pc-1.3|pc-i440fx-1.5|
pc-i440fx-1.6|pc-i440fx-2.1|pc-i440fx-2.2|pc-i440fx-2.4|pc-i440fx-2.5|
pc-i440fx-2.7|pc-i440fx-2.8|pc-i440fx-2.10|pc-i440fx-2.12|pc-i440fx-3.0|
-M [isapc|pc-0.13|pc-1.0|pc-1.1|pc-1.2|pc-1.3|pc-i440fx-1.5|pc-i440fx-1.6|
pc-i440fx-2.1|pc-i440fx-2.2|pc-i440fx-2.4|pc-i440fx-2.5|pc-i440fx-2.7|
pc-i440fx-2.8|pc-i440fx-2.10|pc-i440fx-2.12|pc-i440fx-3.0|pc-1440fx-4.0|
pc-q35-1.4|pc-q35-1.5|pc-q35-1.6|pc-q35-1.7|pc-q35-2.0|pc-q35-2.1|
pc-q35-2.2|pc-q35-2.3|pc-q35-2.4|pc-q35-2.5|pc-q35-2.7|pc-q35-2.8|
pc-q35-2.10|pc-q35-2.12|pc-q35-3.0]
-machine [isapc|pc-0.10|pc-0.11|pc-0.13|pc-1.0|pc-1.1|pc-1.2|pc-1.3|
pc-i440fx-1.5|pc-i440fx-1.6|pc-i440fx-2.1|pc-i440fx-2.2|
pc-i440fx-2.4|pc-i440fx-2.5|pc-i440fx-2.7|pc-i440fx-2.8|
pc-i440fx-2.10|pc-i440fx-2.12|pc-i440fx-3.0|pc-q35-1.4|pc-q35-1.5|
pc-q35-2.10|pc-q35-2.12|pc-q35-3.0|pc-q35-4.0]
-machine [isapc|pc-0.13|pc-1.0|pc-1.1|pc-1.2|pc-1.3|pc-i440fx-1.5|
pc-i440fx-1.6|pc-i440fx-2.1|pc-i440fx-2.2|pc-i440fx-2.4|
pc-i440fx-2.5|pc-i440fx-2.7|pc-i440fx-2.8|pc-i440fx-2.10|
pc-i440fx-2.12|pc-i440fx-3.0|pc-i440fx-4.0|pc-q35-1.4|pc-q35-1.5|
pc-q35-1.6|pc-q35-1.7|pc-q35-2.0|pc-q35-2.1|pc-q35-2.2|pc-q35-2.3|
pc-q35-2.4|pc-q35-2.5|pc-q35-2.7|pc-q35-2.8|pc-q35-2.10|pc-q35-2.12]
pc-q35-2.4|pc-q35-2.5|pc-q35-2.7|pc-q35-2.8|pc-q35-2.10|pc-q35-2.12|
pc-q35-3.0|pc-q35-4.0]
-mtdblock file
-net [dump|socket|vde] ...
-netdev [dump|hubport|l2tpv3|socket|vde] ...
@ -764,7 +806,6 @@ QEMU Command-Line and Monitor Syntax and Support
-tpmdev emulator ...
-vga [cg3|tcx|virtio|vmware]
-win2k-hack
-xen-create
- The following monitor commands are unsupported:
acl_add ...
@ -817,15 +858,12 @@ QEMU Command-Line and Monitor Syntax and Support
query-colo-status
query-sev
query-sev-launch-measure
x-block-dirty-bitmap-disable
x-block-dirty-bitmap-enable
x-block-dirty-bitmap-merge
x-blockdev-change
x-blockdev-insert-medium
x-blockdev-remove-medium
x-blockdev-reopen
x-colo-lost-heartbeat
x-debug-block-dirty-bitmap-sha256
x-exit-preconfig
x-nbd-server-add-bitmap
xen-colo-do-checkpoint
xen-set-replication

Some files were not shown because too many files have changed in this diff Show More