Skip to content

Commit 07dbfdd

Browse files
committed
Merge remote-tracking branch 'remotes/bonzini-gitlab/tags/for-upstream' into staging
* fix --enable-fuzzing linker failures (Alexander) * target/i386: Add bus lock debug exception support (Chenyi) * update documentation for preferred boolean option syntax (Daniel) * make SCSI io_timeout configurable (Hannes) * fix handling of guest recoverable SCSI errors (myself) * misc fixes (Pavel, Zheng Zhan Liang, Zihao) * fix installation of binaries with entitlements (Akihiko) # gpg: Signature made Thu 25 Feb 2021 14:41:56 GMT # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "[email protected]" # gpg: Good signature from "Paolo Bonzini <[email protected]>" [full] # gpg: aka "Paolo Bonzini <[email protected]>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini-gitlab/tags/for-upstream: (29 commits) tcg/i386: rdpmc: fix the the condtions chardev: do not use short form boolean options in non-QemuOpts character device descriptions vl: deprecate -writeconfig target/i386: Add bus lock debug exception support qom/object.c: Fix typo target/i386: update to show preferred boolean syntax for -cpu docs: update to show preferred boolean syntax for -cpu docs: update to show preferred boolean syntax for -vnc docs: update to show preferred boolean syntax for -chardev qemu-options: update to show preferred boolean syntax for -vnc qemu-options: update to show preferred boolean syntax for -incoming qemu-options: update to show preferred boolean syntax for -netdev qemu-options: update to show preferred boolean syntax for -spice qemu-options: update to show preferred boolean syntax for -chardev gdbstub: use preferred boolean option syntax char: don't fail when client is not connected scsi: drop 'result' argument from command_complete callback scsi-disk: pass guest recoverable errors through even for rerror=stop scsi-disk: pass SCSI status to scsi_handle_rw_error scsi: introduce scsi_sense_from_errno() ... Signed-off-by: Peter Maydell <[email protected]>
2 parents cbcf098 + c45b426 commit 07dbfdd

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+406
-322
lines changed

chardev/char-socket.c

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -387,6 +387,9 @@ static ssize_t tcp_chr_recv(Chardev *chr, char *buf, size_t len)
387387
static GSource *tcp_chr_add_watch(Chardev *chr, GIOCondition cond)
388388
{
389389
SocketChardev *s = SOCKET_CHARDEV(chr);
390+
if (!s->ioc) {
391+
return NULL;
392+
}
390393
return qio_channel_create_watch(s->ioc, cond);
391394
}
392395

@@ -449,7 +452,7 @@ static char *qemu_chr_socket_address(SocketChardev *s, const char *prefix)
449452
qemu_chr_socket_protocol(s),
450453
s->addr->u.inet.host,
451454
s->addr->u.inet.port,
452-
s->is_listen ? ",server" : "");
455+
s->is_listen ? ",server=on" : "");
453456
break;
454457
case SOCKET_ADDRESS_TYPE_UNIX:
455458
{
@@ -467,12 +470,12 @@ static char *qemu_chr_socket_address(SocketChardev *s, const char *prefix)
467470

468471
return g_strdup_printf("%sunix:%s%s%s%s", prefix, sa->path,
469472
abstract, tight,
470-
s->is_listen ? ",server" : "");
473+
s->is_listen ? ",server=on" : "");
471474
break;
472475
}
473476
case SOCKET_ADDRESS_TYPE_FD:
474477
return g_strdup_printf("%sfd:%s%s", prefix, s->addr->u.fd.str,
475-
s->is_listen ? ",server" : "");
478+
s->is_listen ? ",server=on" : "");
476479
break;
477480
case SOCKET_ADDRESS_TYPE_VSOCK:
478481
return g_strdup_printf("%svsock:%s:%s", prefix,
@@ -604,7 +607,7 @@ static char *qemu_chr_compute_filename(SocketChardev *s)
604607
case AF_UNIX:
605608
return g_strdup_printf("unix:%s%s",
606609
((struct sockaddr_un *)(ss))->sun_path,
607-
s->is_listen ? ",server" : "");
610+
s->is_listen ? ",server=on" : "");
608611
#endif
609612
case AF_INET6:
610613
left = "[";
@@ -618,7 +621,7 @@ static char *qemu_chr_compute_filename(SocketChardev *s)
618621
return g_strdup_printf("%s:%s%s%s:%s%s <-> %s%s%s:%s",
619622
qemu_chr_socket_protocol(s),
620623
left, shost, right, sserv,
621-
s->is_listen ? ",server" : "",
624+
s->is_listen ? ",server=on" : "",
622625
left, phost, right, pserv);
623626

624627
default:

configure

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ skip_meson=no
463463
gettext="auto"
464464
fuse="auto"
465465
fuse_lseek="auto"
466-
multiprocess="no"
466+
multiprocess="auto"
467467

468468
malloc_trim="auto"
469469

@@ -798,7 +798,6 @@ Linux)
798798
linux="yes"
799799
linux_user="yes"
800800
vhost_user=${default_feature:-yes}
801-
multiprocess=${default_feature:-yes}
802801
;;
803802
esac
804803

@@ -1558,9 +1557,9 @@ for opt do
15581557
;;
15591558
--disable-fuse-lseek) fuse_lseek="disabled"
15601559
;;
1561-
--enable-multiprocess) multiprocess="yes"
1560+
--enable-multiprocess) multiprocess="enabled"
15621561
;;
1563-
--disable-multiprocess) multiprocess="no"
1562+
--disable-multiprocess) multiprocess="disabled"
15641563
;;
15651564
*)
15661565
echo "ERROR: unknown option $opt"
@@ -1914,7 +1913,7 @@ disabled with --disable-FEATURE, default is enabled if available
19141913
libdaxctl libdaxctl support
19151914
fuse FUSE block device export
19161915
fuse-lseek SEEK_HOLE/SEEK_DATA support for FUSE exports
1917-
multiprocess Multiprocess QEMU support
1916+
multiprocess Out of process device emulation support
19181917
19191918
NOTE: The object files are built at the place where configure is launched
19201919
EOF
@@ -6089,14 +6088,21 @@ fi
60896088
if test "$have_mlockall" = "yes" ; then
60906089
echo "HAVE_MLOCKALL=y" >> $config_host_mak
60916090
fi
6092-
if test "$multiprocess" = "yes" ; then
6093-
echo "CONFIG_MULTIPROCESS_ALLOWED=y" >> $config_host_mak
6094-
fi
60956091
if test "$fuzzing" = "yes" ; then
60966092
# If LIB_FUZZING_ENGINE is set, assume we are running on OSS-Fuzz, and the
60976093
# needed CFLAGS have already been provided
60986094
if test -z "${LIB_FUZZING_ENGINE+xxx}" ; then
6095+
# Add CFLAGS to tell clang to add fuzzer-related instrumentation to all the
6096+
# compiled code.
60996097
QEMU_CFLAGS="$QEMU_CFLAGS -fsanitize=fuzzer-no-link"
6098+
# To build non-fuzzer binaries with --enable-fuzzing, link everything with
6099+
# fsanitize=fuzzer-no-link. Otherwise, the linker will be unable to bind
6100+
# the fuzzer-related callbacks added by instrumentation.
6101+
QEMU_LDFLAGS="$QEMU_LDFLAGS -fsanitize=fuzzer-no-link"
6102+
# For the actual fuzzer binaries, we need to link against the libfuzzer
6103+
# library. Provide the flags for doing this in FUZZ_EXE_LDFLAGS. The meson
6104+
# rule for the fuzzer adds these to the link_args. They need to be
6105+
# configurable, to support OSS-Fuzz
61006106
FUZZ_EXE_LDFLAGS="-fsanitize=fuzzer"
61016107
else
61026108
FUZZ_EXE_LDFLAGS="$LIB_FUZZING_ENGINE"
@@ -6424,7 +6430,7 @@ NINJA=$ninja $meson setup \
64246430
-Dzstd=$zstd -Dseccomp=$seccomp -Dvirtfs=$virtfs -Dcap_ng=$cap_ng \
64256431
-Dattr=$attr -Ddefault_devices=$default_devices \
64266432
-Ddocs=$docs -Dsphinx_build=$sphinx_build -Dinstall_blobs=$blobs \
6427-
-Dvhost_user_blk_server=$vhost_user_blk_server \
6433+
-Dvhost_user_blk_server=$vhost_user_blk_server -Dmultiprocess=$multiprocess \
64286434
-Dfuse=$fuse -Dfuse_lseek=$fuse_lseek -Dguest_agent_msi=$guest_agent_msi \
64296435
$(if test "$default_features" = no; then echo "-Dauto_features=disabled"; fi) \
64306436
-Dtcg_interpreter=$tcg_interpreter \

docs/COLO-FT.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -158,15 +158,15 @@ instance.
158158

159159
# imagefolder="/mnt/vms/colo-test-primary"
160160

161-
# qemu-system-x86_64 -enable-kvm -cpu qemu64,+kvmclock -m 512 -smp 1 -qmp stdio \
161+
# qemu-system-x86_64 -enable-kvm -cpu qemu64,kvmclock=on -m 512 -smp 1 -qmp stdio \
162162
-device piix3-usb-uhci -device usb-tablet -name primary \
163163
-netdev tap,id=hn0,vhost=off,helper=/usr/lib/qemu/qemu-bridge-helper \
164164
-device rtl8139,id=e0,netdev=hn0 \
165-
-chardev socket,id=mirror0,host=0.0.0.0,port=9003,server,nowait \
166-
-chardev socket,id=compare1,host=0.0.0.0,port=9004,server,wait \
167-
-chardev socket,id=compare0,host=127.0.0.1,port=9001,server,nowait \
165+
-chardev socket,id=mirror0,host=0.0.0.0,port=9003,server=on,wait=off \
166+
-chardev socket,id=compare1,host=0.0.0.0,port=9004,server=on,wait=on \
167+
-chardev socket,id=compare0,host=127.0.0.1,port=9001,server=on,wait=off \
168168
-chardev socket,id=compare0-0,host=127.0.0.1,port=9001 \
169-
-chardev socket,id=compare_out,host=127.0.0.1,port=9005,server,nowait \
169+
-chardev socket,id=compare_out,host=127.0.0.1,port=9005,server=on,wait=off \
170170
-chardev socket,id=compare_out0,host=127.0.0.1,port=9005 \
171171
-object filter-mirror,id=m0,netdev=hn0,queue=tx,outdev=mirror0 \
172172
-object filter-redirector,netdev=hn0,id=redire0,queue=rx,indev=compare_out \
@@ -189,7 +189,7 @@ any IP's here, except for the $primary_ip variable.
189189

190190
# qemu-img create -f qcow2 $imagefolder/secondary-hidden.qcow2 10G
191191

192-
# qemu-system-x86_64 -enable-kvm -cpu qemu64,+kvmclock -m 512 -smp 1 -qmp stdio \
192+
# qemu-system-x86_64 -enable-kvm -cpu qemu64,kvmclock=on -m 512 -smp 1 -qmp stdio \
193193
-device piix3-usb-uhci -device usb-tablet -name secondary \
194194
-netdev tap,id=hn0,vhost=off,helper=/usr/lib/qemu/qemu-bridge-helper \
195195
-device rtl8139,id=e0,netdev=hn0 \

docs/ccid.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ NSS. Registration can be done from Firefox or the command line:
109109

110110
on the host specify the ccid-card-passthru device with a suitable chardev:
111111

112-
qemu -chardev socket,server,host=0.0.0.0,port=2001,id=ccid,nowait -usb -device usb-ccid -device ccid-card-passthru,chardev=ccid
112+
qemu -chardev socket,server=on,host=0.0.0.0,port=2001,id=ccid,wait=off \
113+
-usb -device usb-ccid -device ccid-card-passthru,chardev=ccid
113114

114115
on the client run vscclient, built when you built QEMU:
115116

@@ -125,7 +126,8 @@ Follow instructions as per #4, except run QEMU and vscclient as follows:
125126
Run qemu as per #5, and run vscclient from the "fake-smartcard"
126127
directory as follows:
127128

128-
qemu -chardev socket,server,host=0.0.0.0,port=2001,id=ccid,nowait -usb -device usb-ccid -device ccid-card-passthru,chardev=ccid
129+
qemu -chardev socket,server=on,host=0.0.0.0,port=2001,id=ccid,wait=off \
130+
-usb -device usb-ccid -device ccid-card-passthru,chardev=ccid
129131
vscclient -e "db=\"sql:$PWD\" use_hw=no soft=(,Test,CAC,,id-cert,signing-cert,encryption-cert)" <qemu-host> 2001
130132

131133

docs/colo-proxy.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -164,11 +164,11 @@ clearly describe the usage.
164164
Primary(ip:3.3.3.3):
165165
-netdev tap,id=hn0,vhost=off,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown
166166
-device e1000,id=e0,netdev=hn0,mac=52:a4:00:12:78:66
167-
-chardev socket,id=mirror0,host=3.3.3.3,port=9003,server,nowait
168-
-chardev socket,id=compare1,host=3.3.3.3,port=9004,server,nowait
169-
-chardev socket,id=compare0,host=3.3.3.3,port=9001,server,nowait
167+
-chardev socket,id=mirror0,host=3.3.3.3,port=9003,server=on,wait=off
168+
-chardev socket,id=compare1,host=3.3.3.3,port=9004,server=on,wait=off
169+
-chardev socket,id=compare0,host=3.3.3.3,port=9001,server=on,wait=off
170170
-chardev socket,id=compare0-0,host=3.3.3.3,port=9001
171-
-chardev socket,id=compare_out,host=3.3.3.3,port=9005,server,nowait
171+
-chardev socket,id=compare_out,host=3.3.3.3,port=9005,server=on,wait=off
172172
-chardev socket,id=compare_out0,host=3.3.3.3,port=9005
173173
-object iothread,id=iothread1
174174
-object filter-mirror,id=m0,netdev=hn0,queue=tx,outdev=mirror0
@@ -190,11 +190,11 @@ If you want to use virtio-net-pci or other driver with vnet_header:
190190
Primary(ip:3.3.3.3):
191191
-netdev tap,id=hn0,vhost=off,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown
192192
-device e1000,id=e0,netdev=hn0,mac=52:a4:00:12:78:66
193-
-chardev socket,id=mirror0,host=3.3.3.3,port=9003,server,nowait
194-
-chardev socket,id=compare1,host=3.3.3.3,port=9004,server,nowait
195-
-chardev socket,id=compare0,host=3.3.3.3,port=9001,server,nowait
193+
-chardev socket,id=mirror0,host=3.3.3.3,port=9003,server=on,wait=off
194+
-chardev socket,id=compare1,host=3.3.3.3,port=9004,server=on,wait=off
195+
-chardev socket,id=compare0,host=3.3.3.3,port=9001,server=on,wait=off
196196
-chardev socket,id=compare0-0,host=3.3.3.3,port=9001
197-
-chardev socket,id=compare_out,host=3.3.3.3,port=9005,server,nowait
197+
-chardev socket,id=compare_out,host=3.3.3.3,port=9005,server=on,wait=off
198198
-chardev socket,id=compare_out0,host=3.3.3.3,port=9005
199199
-object filter-mirror,id=m0,netdev=hn0,queue=tx,outdev=mirror0,vnet_hdr_support
200200
-object filter-redirector,netdev=hn0,id=redire0,queue=rx,indev=compare_out,vnet_hdr_support

docs/devel/writing-qmp-commands.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ shown here.
3939
First, QEMU should be started like this:
4040

4141
# qemu-system-TARGET [...] \
42-
-chardev socket,id=qmp,port=4444,host=localhost,server \
42+
-chardev socket,id=qmp,port=4444,host=localhost,server=on \
4343
-mon chardev=qmp,mode=control,pretty=on
4444

4545
Then, in a different terminal:

docs/interop/firmware.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@
129129
# "-machine smm=on". (On the "pc-q35-*" machine types of
130130
# the @i386 emulation target, @requires-smm presents
131131
# further CPU requirements; one combination known to work
132-
# is "-cpu coreduo,-nx".) If the firmware is marked as
132+
# is "-cpu coreduo,nx=off".) If the firmware is marked as
133133
# both @secure-boot and @requires-smm, then write
134134
# accesses to the pflash chip (NVRAM) that holds the UEFI
135135
# variable store must be restricted to code that executes

docs/interop/live-block-operations.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ socket::
133133
-M q35 -nodefaults -m 512 \
134134
-blockdev node-name=node-A,driver=qcow2,file.driver=file,file.node-name=file,file.filename=./a.qcow2 \
135135
-device virtio-blk,drive=node-A,id=virtio0 \
136-
-monitor stdio -qmp unix:/tmp/qmp-sock,server,nowait
136+
-monitor stdio -qmp unix:/tmp/qmp-sock,server=on,wait=off
137137

138138
The ``-blockdev`` command-line option, used above, is available from
139139
QEMU 2.9 onwards. In the above invocation, notice the ``node-name``
@@ -698,7 +698,7 @@ it could be located elsewhere)::
698698
-M q35 -nodefaults -m 512 \
699699
-blockdev node-name=node-TargetDisk,driver=qcow2,file.driver=file,file.node-name=file,file.filename=./target-disk.qcow2 \
700700
-device virtio-blk,drive=node-TargetDisk,id=virtio0 \
701-
-S -monitor stdio -qmp unix:./qmp-sock2,server,nowait \
701+
-S -monitor stdio -qmp unix:./qmp-sock2,server=on,wait=off \
702702
-incoming tcp:localhost:6666
703703

704704
Given the disk image chain on source QEMU::

docs/interop/qmp-intro.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ Usage
2626
You can use the -qmp option to enable QMP. For example, the following
2727
makes QMP available on localhost port 4444:
2828

29-
$ qemu [...] -qmp tcp:localhost:4444,server,nowait
29+
$ qemu [...] -qmp tcp:localhost:4444,server=on,wait=off
3030

3131
However, for more flexibility and to make use of more options, the -mon
3232
command-line option should be used. For instance, the following example
3333
creates one HMP instance (human monitor) on stdio and one QMP instance
3434
on localhost port 4444:
3535

3636
$ qemu [...] -chardev stdio,id=mon0 -mon chardev=mon0,mode=readline \
37-
-chardev socket,id=mon1,host=localhost,port=4444,server,nowait \
37+
-chardev socket,id=mon1,host=localhost,port=4444,server=on,wait=off \
3838
-mon chardev=mon1,mode=control,pretty=on
3939

4040
Please, refer to QEMU's manpage for more information.

docs/system/cpu-hotplug.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ vCPU hotplug
1414
$ qemu-system-x86_64 -display none -no-user-config -m 2048 \
1515
-nodefaults -monitor stdio -machine pc,accel=kvm,usb=off \
1616
-smp 1,maxcpus=2 -cpu IvyBridge-IBRS \
17-
-qmp unix:/tmp/qmp-sock,server,nowait
17+
-qmp unix:/tmp/qmp-sock,server=on,wait=off
1818

1919
(2) Run 'qmp-shell' (located in the source tree, under: "scripts/qmp/)
2020
to connect to the just-launched QEMU::

0 commit comments

Comments
 (0)