platform/upstream/qemu.git
2 years agoaudio: add sanity check
Gerd Hoffmann [Tue, 15 Dec 2020 08:11:51 +0000 (09:11 +0100)]
audio: add sanity check

Git-commit: 06c8c375389a54d8e4457d967f4f0896caecefb2
References: boo#1180210

Check whenever we actually found the spiceaudio driver
before flipping the can_be_default field.

Fixes: f0c4555edfdd ("audio: remove qemu_spice_audio_init()")
Buglink: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=977301
Reported-by: dann frazier <dann.frazier@canonical.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20201215081151.20095-1-kraxel@redhat.com>
Signed-off-by: Bruce Rogers <brogers@suse.com>
2 years agoblock: Fix deadlock in bdrv_co_yield_to_drain()
Kevin Wolf [Thu, 3 Dec 2020 17:23:11 +0000 (18:23 +0100)]
block: Fix deadlock in bdrv_co_yield_to_drain()

Git-commit: 960d5fb3e8ee09bc5f1a5c84f66dce42a6cef920

If bdrv_co_yield_to_drain() is called for draining a block node that
runs in a different AioContext, it keeps that AioContext locked while it
yields and schedules a BH in the AioContext to do the actual drain.

As long as executing the BH is the very next thing that the event loop
of the node's AioContext does, this actually happens to work, but when
it tries to execute something else that wants to take the AioContext
lock, it will deadlock. (In the bug report, this other thing is a
virtio-scsi device running virtio_scsi_data_plane_handle_cmd().)

Instead, always drop the AioContext lock across the yield and reacquire
it only when the coroutine is reentered. The BH needs to unconditionally
take the lock for itself now.

This fixes the 'block_resize' QMP command on a block node that runs in
an iothread.

Cc: qemu-stable@nongnu.org
Fixes: eb94b81a94bce112e6b206df846c1551aaf6cab6
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1903511
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20201203172311.68232-4-kwolf@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Bruce Rogers <brogers@suse.com>
2 years agoblock: Fix locking in qmp_block_resize()
Kevin Wolf [Thu, 3 Dec 2020 17:23:10 +0000 (18:23 +0100)]
block: Fix locking in qmp_block_resize()

Git-commit: 8089eab2bd5fb160b038e64e14cf7ffb3f37091e

The drain functions assume that we hold the AioContext lock of the
drained block node. Make sure to actually take the lock.

Cc: qemu-stable@nongnu.org
Fixes: eb94b81a94bce112e6b206df846c1551aaf6cab6
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20201203172311.68232-3-kwolf@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Bruce Rogers <brogers@suse.com>
2 years agoblock: Simplify qmp_block_resize() error paths
Kevin Wolf [Thu, 3 Dec 2020 17:23:09 +0000 (18:23 +0100)]
block: Simplify qmp_block_resize() error paths

Git-commit: d9dbf25f9624aac43e4357019bed4422f0b3368d

The only thing that happens after the 'out:' label is blk_unref(blk).
However, blk = NULL in all of the error cases, so instead of jumping to
'out:', we can just return directly.

Cc: qemu-stable@nongnu.org
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Message-Id: <20201203172311.68232-2-kwolf@redhat.com>
Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Bruce Rogers <brogers@suse.com>
2 years agoui/vnc: Add missing lock for send_color_map
Peng Liang [Mon, 16 Nov 2020 14:13:38 +0000 (22:13 +0800)]
ui/vnc: Add missing lock for send_color_map

Git-commit: 947191b4312a547621566d77d7b922d9e13bb63d
vnc_write() should be locked after the RFB protocol is initialized.

Fixes: 0c426e4534b4 ("vnc: Add support for color map")
Cc: qemu-stable@nongnu.org
Reported-by: Euler Robot <euler.robot@huawei.com>
Signed-off-by: Peng Liang <liangpeng10@huawei.com>
Message-id: 20201116141338.148911-1-liangpeng10@huawei.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Bruce Rogers <brogers@suse.com>
2 years agoImported vendor release 5.2.0-20.1
SoonKyu Park [Tue, 23 Nov 2021 04:45:12 +0000 (13:45 +0900)]
Imported vendor release 5.2.0-20.1

2 years agoImported Upstream version 5.2.0
SoonKyu Park [Tue, 23 Nov 2021 04:40:00 +0000 (13:40 +0900)]
Imported Upstream version 5.2.0

2 years agoTo support syscall_389 92/265992/1 sandbox/wangbiao/qemu_2_7
biao716.wang [Thu, 4 Nov 2021 16:13:17 +0000 (01:13 +0900)]
To support syscall_389

Change-Id: I7e780307e9c64525961fc70ecc7e1fcfb29d8d5e
Signed-off-by: biao716.wang <biao716.wang@samsung.com>
2 years agopackaging: add armv7hl support 14/265414/1
Dongkyun, Son [Fri, 24 Feb 2017 08:47:58 +0000 (17:47 +0900)]
packaging: add armv7hl support

Change-Id: I5e2568eb66be2fd4c10b4b6d6b376269b1e0b56d
Signed-off-by: Dongkyun, Son <dongkyun.s@samsung.com>
(cherry picked from commit a91f333858752b70d41d1e98a0c75fe4d59ce72a)

3 years agoRevert 8f8f75: "linux-user: Run multi-threaded code on a single core" 64/258964/2 tizen_6.5_base tizen_6.5.m2_release
hyokeun.jeon [Fri, 28 May 2021 09:14:49 +0000 (18:14 +0900)]
Revert 8f8f75: "linux-user: Run multi-threaded code on a single core"

Approved by Tizen PL team at 2021-05-27

Change-Id: I96f1312f0dd2d1e7aca611486c8df35669e2f722

4 years agoMerge '[Qemu-devel] [PATCH for-4.1] linux-user: Make sigaltstack stacks per-thread... 76/231176/2 accepted/tizen_base_tool sandbox/yan11meng/qemu_upgrade tizen_6.0_base tizen_6.0_base_hotfix accepted/tizen/6.0/base/20201029.105809 submit/tizen_6.0_base/20201029.184802 submit/tizen_6.0_base_hotfix/20201030.192502 submit/tizen_6.0_base_hotfix/20201102.162702 tizen_6.0.m2_release upstream/2.7.0.1
SoonKyu Park [Fri, 3 Apr 2020 00:31:58 +0000 (09:31 +0900)]
Merge '[Qemu-devel] [PATCH for-4.1] linux-user: Make sigaltstack stacks per-thread' for go language support
patch url : https://patchew.org/QEMU/20190725131645.19501-1-peter.maydell@linaro.org/

Change-Id: I591a7d1eab277ecdedbe8a886de4fb553f31a264

6 years agoASan-related hack to speedup aarch64 builds. 93/175393/1 accepted/tizen_5.5_base_mobile_hotfix accepted/tizen_5.5_base_wearable_hotfix tizen_5.0_base tizen_5.5_base tizen_5.5_base_mobile_hotfix tizen_5.5_base_wearable_hotfix tizen_5.5_tv accepted/tizen/5.0/base/20181101.091254 accepted/tizen/5.5/base/mobile/hotfix/20201023.083817 accepted/tizen/5.5/base/wearable/hotfix/20201023.080204 submit/tizen_5.0_base/20181101.000001 submit/tizen_5.5_base_mobile_hotfix/20201023.171502 submit/tizen_5.5_base_wearable_hotfix/20201023.155602 tizen_5.5.m2_release
Maxim Ostapenko [Fri, 8 Jul 2016 12:47:42 +0000 (15:47 +0300)]
ASan-related hack to speedup aarch64 builds.

Switch off memory pages checks in qemu if memory regions are mapped by ASan

Change-Id: I8233802ee35db00c799f5645072b8014f823b5c6
Signed-off-by: Maxim Ostapenko <m.ostapenko@samsung.com>
7 years agoImported Upstream version 2.6.1 upstream upstream/2.6.1
hyokeun [Tue, 27 Dec 2016 08:29:09 +0000 (17:29 +0900)]
Imported Upstream version 2.6.1

7 years agoUse different names for qemu-user binary: 65/96565/1 tizen_4.0_base_not_used accepted/tizen/4.0/base/20170811.093141 submit/tizen_4.0_base/20170811.071500 submit/tizen_4.0_base/20170828.000000 tizen_4.0.IoT.p1_release tizen_4.0.IoT.p2_release tizen_4.0.m1_release tizen_4.0.m2_release
Pavel Kopyl [Tue, 23 Aug 2016 13:42:07 +0000 (13:42 +0000)]
Use different names for qemu-user binary:

1. qemu-linux-user-x86_64-cross for 64-bit.
2. qemu-linux-user-x86-cross for 32-bit.
Also keep binaries with old names.

Change-Id: Ib2487b82c57189942e0925427cb2144dc8817dec
Signed-off-by: Pavel Kopyl <p.kopyl@samsung.com>
Signed-off-by: Chan Lee <chan45.lee@samsung.com>
(cherry picked from commit 4f4fc9b2f8ac86e081b08fb48d77fa860626d148)

7 years agoremoved qemu log (Unsupported syscall) 05/92405/1
Dongkyun, Son [Mon, 29 Aug 2016 06:17:44 +0000 (15:17 +0900)]
removed qemu log (Unsupported syscall)

blocked unexpeced warning message (qemu: Unsupported syscall: 219 or 311)

Change-Id: If17b6d80c0835fcc44822551127eca068b23eec9
Signed-off-by: Dongkyun, Son <dongkyun.s@samsung.com>
(cherry picked from commit 6b4067f8f34ee83f94042551267e951ab0b5e10e)

7 years agopackaging: mic-bootstrap link issue accepted/tizen_3.0_base qemu-2.7.0 tizen_3.0_base_not_used accepted/tizen/3.0/base/20161028.103448 submit/tizen_3.0_base/20161028.062326
hyokeun [Wed, 7 Sep 2016 08:54:56 +0000 (17:54 +0900)]
packaging: mic-bootstrap link issue

7 years agobinfmt: translate symbolic links correctly with realpath
Julien Isorce [Tue, 10 May 2016 12:18:06 +0000 (13:18 +0100)]
binfmt: translate symbolic links correctly with realpath

Change-Id: Ic0eeac9de40a8e1082c83b442829ac28f68bff04
Signed-off-by: Julien Isorce <j.isorce@samsung.com>
Signed-off-by: Yury Usishchev <y.usishchev@samsung.com>
7 years agoModify spec file to build qemu package in Tools:qemu project and aggregate it to...
SoonKyu Park [Fri, 19 Feb 2016 00:05:59 +0000 (09:05 +0900)]
Modify spec file to build qemu package in Tools:qemu project and aggregate it to use it

Change-Id: Id2db3f863d1d3fcdb57f841b69c3acda94e32cef

7 years agoAdd compatibility symlinks
Yury Usishchev [Wed, 5 Aug 2015 18:03:26 +0000 (21:03 +0300)]
Add compatibility symlinks

Symlinks to qemu binaries placed in directories where they are searched by
common non-Tizen binfmt_misc configurations (eq. in Ubuntu).

Change-Id: I6b8602736926dba24a7ffbc70c91222ec3ba5cc8

7 years agopackaging: ln -sf qemu-arm64, qemu-arm64-binfmt
hyokeun [Tue, 6 Sep 2016 04:58:06 +0000 (13:58 +0900)]
packaging: ln -sf qemu-arm64, qemu-arm64-binfmt

7 years agobinfmt: use binaries from /emul
Yury Usishchev [Wed, 5 Aug 2015 18:01:01 +0000 (21:01 +0300)]
binfmt: use binaries from /emul

This allows removing hardcoded architecture-dependent paths
from qemu-accel package. Also allows using symlinks for qemu-*-binfmt
as path don't depend on binary name now.

Change-Id: I92b9bc6df477ef925c761045d5307aca8cc1b2d4

7 years agoenable 32 bit qemu for Tizen.
Junfeng Dong [Tue, 19 Nov 2013 11:14:41 +0000 (19:14 +0800)]
enable 32 bit qemu for Tizen.

Change-Id: I75ecb5ef6952d1083c030f5e48ba2a24e4d6f4a1
Signed-off-by: Junfeng Dong <junfeng.dong@intel.com>
7 years agopackaging: Adding permissions-file-setuid-bit
hyokeun [Tue, 6 Sep 2016 01:18:07 +0000 (10:18 +0900)]
packaging: Adding permissions-file-setuid-bit

7 years agopackaging: BuildRequires: -post-build-checks
hyokeun [Mon, 5 Sep 2016 11:12:59 +0000 (20:12 +0900)]
packaging: BuildRequires: -post-build-checks

Change-Id: I27b7123c2637e7af82d59ca5e7d5bd139d727647

7 years agopackaging: Disable libseccomp
hyokeun [Tue, 6 Sep 2016 05:29:28 +0000 (14:29 +0900)]
packaging: Disable libseccomp

Change-Id: I177741ece64572b63c7fbad8267324449735ca97

7 years agopackaging: add packaging directory
hyokeun [Mon, 5 Sep 2016 04:22:58 +0000 (13:22 +0900)]
packaging: add packaging directory

Change-Id: I7eb77abf7c4e5afdc9606c723c125910280c65e6

7 years agoconfigure: Fix detection of seccomp on s390x
markkp [Thu, 11 Aug 2016 20:28:39 +0000 (16:28 -0400)]
configure: Fix detection of seccomp on s390x

Signed-off-by: Mark Post <mpost@suse.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
7 years agoqemu-binfmt-conf: use qemu-ARCH-binfmt
Andreas Schwab [Fri, 12 Aug 2016 16:20:49 +0000 (18:20 +0200)]
qemu-binfmt-conf: use qemu-ARCH-binfmt

Signed-off-by: Andreas Schwab <schwab@suse.de>
Signed-off-by: Andreas Färber <afaerber@suse.de>
7 years agoqemu-bridge-helper: reduce security profile
Bruce Rogers [Tue, 2 Aug 2016 17:36:02 +0000 (11:36 -0600)]
qemu-bridge-helper: reduce security profile

Change from using glib alloc and free routines to those
from libc. Also perform safety measure of dropping privs
to user if configured no-caps.

[BR: BOO#988279]
Signed-off-by: Bruce Rogers <brogers@suse.com>
[AF: Rebased for v2.7.0-rc2]
Signed-off-by: Andreas Färber <afaerber@suse.de>
7 years agoxen: SUSE xenlinux unplug for emulated PCI
Olaf Hering [Tue, 21 Jun 2016 16:42:45 +0000 (18:42 +0200)]
xen: SUSE xenlinux unplug for emulated PCI

Implement SUSE specific unplug protocol for emulated PCI devices
in PVonHVM guests
(bsc#953339, bsc#953362, bsc#953518, bsc#984981)

Signed-off-by: Olaf Hering <ohering@suse.de>
7 years agobuild: link with libatomic on powerpc-linux
Olaf Hering [Fri, 1 Apr 2016 10:27:16 +0000 (12:27 +0200)]
build: link with libatomic on powerpc-linux

Building on powerpc-linux fails with undefined reference to
__atomic_load_8 in icount_warp_rt(). Force linking to -latomic.

Fixes a0aa44b ("include/qemu/atomic.h: default to __atomic functions")

Signed-off-by: Olaf Hering <olaf@aepfle.de>
7 years agoxen_disk: Add suse specific flush disable handling and map to QEMU equiv
Bruce Rogers [Wed, 9 Mar 2016 22:18:11 +0000 (15:18 -0700)]
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]

Signed-off-by: Bruce Rogers <brogers@suse.com>
Signed-off-by: Olaf Hering <olaf@aepfle.de>
7 years agodictzip: Fix on big endian systems
Alexander Graf [Mon, 15 Jun 2015 15:36:32 +0000 (17:36 +0200)]
dictzip: Fix on big endian systems

The dictzip code in SLE11 received some treatment over time to support
running on big endian hosts. Somewhere in the transition to SLE12 this
support got lost. Add it back in again from the SLE11 code base.

Furthermore while at it, fix up the debug prints to not emit warnings.

[AG: BSC#937572]
Signed-off-by: Alexander Graf <agraf@suse.de>
[AF: Rebased for v2.7.0-rc2]
Signed-off-by: Andreas Färber <afaerber@suse.de>
7 years agoAIO: Reduce number of threads for 32bit hosts
Alexander Graf [Wed, 14 Jan 2015 00:32:11 +0000 (01:32 +0100)]
AIO: Reduce number of threads for 32bit hosts

On hosts with limited virtual address space (32bit pointers), we can very
easily run out of virtual memory with big thread pools.

Instead, we should limit ourselves to small pools to keep memory footprint
low on those systems.

This patch fixes random VM stalls like

  (process:25114): GLib-ERROR **: gmem.c:103: failed to allocate 1048576 bytes

on 32bit ARM systems for me.

Signed-off-by: Alexander Graf <agraf@suse.de>
7 years agoconfigure: Enable PIE for ppc and ppc64 hosts
Dinar Valeev [Wed, 2 Oct 2013 15:56:03 +0000 (17:56 +0200)]
configure: Enable PIE for ppc and ppc64 hosts

Signed-off-by: Dinar Valeev <dvaleev@suse.com>
[AF: Rebased for v1.7]
Signed-off-by: Andreas Färber <afaerber@suse.de>
7 years agovirtfs-proxy-helper: Provide __u64 for broken sys/capability.h
Bruce Rogers [Thu, 16 May 2013 10:39:10 +0000 (12:39 +0200)]
virtfs-proxy-helper: Provide __u64 for broken sys/capability.h

Fixes the build on SLE 11 SP2.

[AF: Extend to ppc64]

7 years agolinux-user: lseek: explicitly cast non-set offsets to signed
Alexander Graf [Thu, 13 Dec 2012 13:29:22 +0000 (14:29 +0100)]
linux-user: lseek: explicitly cast non-set offsets to signed

When doing lseek, SEEK_SET indicates that the offset is an unsigned variable.
Other seek types have parameters that can be negative.

When converting from 32bit to 64bit parameters, we need to take this into
account and enable SEEK_END and SEEK_CUR to be negative, while SEEK_SET stays
absolute positioned which we need to maintain as unsigned.

Signed-off-by: Alexander Graf <agraf@suse.de>
7 years agoMake char muxer more robust wrt small FIFOs
Alexander Graf [Thu, 1 Apr 2010 15:36:23 +0000 (17:36 +0200)]
Make char muxer more robust wrt small FIFOs

Virtio-Console can only process one character at a time. Using it on S390
gave me strage "lags" where I got the character I pressed before when
pressing one. So I typed in "abc" and only received "a", then pressed "d"
but the guest received "b" and so on.

While the stdio driver calls a poll function that just processes on its
queue in case virtio-console can't take multiple characters at once, the
muxer does not have such callbacks, so it can't empty its queue.

To work around that limitation, I introduced a new timer that only gets
active when the guest can not receive any more characters. In that case
it polls again after a while to check if the guest is now receiving input.

This patch fixes input when using -nographic on s390 for me.

[AF: Rebased for v2.7.0-rc2]

7 years agoconsole: add question-mark escape operator
Alexander Graf [Mon, 6 Jun 2011 04:53:52 +0000 (06:53 +0200)]
console: add question-mark escape operator

Some termcaps (found using SLES11SP1) use [? sequences. According to man
console_codes (http://linux.die.net/man/4/console_codes) the question mark
is a nop and should simply be ignored.

This patch does exactly that, rendering screen output readable when
outputting guest serial consoles to the graphical console emulator.

Signed-off-by: Alexander Graf <agraf@suse.de>
7 years agoLegacy Patch kvm-qemu-preXX-dictzip3.patch
Alexander Graf [Wed, 12 Dec 2012 18:11:30 +0000 (19:11 +0100)]
Legacy Patch kvm-qemu-preXX-dictzip3.patch

7 years agoblock: Add tar container format
Alexander Graf [Wed, 5 Aug 2009 15:28:38 +0000 (17:28 +0200)]
block: Add tar container format

Tar is a very widely used format to store data in. Sometimes people even put
virtual machine images in there.

So it makes sense for qemu to be able to read from tar files. I implemented a
written from scratch reader that also knows about the GNU sparse format, which
is what pigz creates.

This version checks for filenames that end on well-known extensions. The logic
could be changed to search for filenames given on the command line, but that
would require changes to more parts of qemu.

The tar reader in conjunctiuon with dzip gives us the chance to download
tar'ed up virtual machine images (even via http) and instantly make use of
them.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Bruce Rogers <brogers@novell.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
[TH: Use bdrv_open options instead of filename]
Signed-off-by: Tim Hardeck <thardeck@suse.de>
[AF: bdrv_file_open got an Error **errp argument, bdrv_delete -> brd_unref]
[AF: qemu_opts_create_nofail() -> qemu_opts_create(),
     bdrv_file_open() -> bdrv_open(), based on work by brogers]
[AF: error_is_set() dropped for v2.1.0-rc0]
[AF: BlockDriverAIOCB -> BlockAIOCB,
     BlockDriverCompletionFunc -> BlockCompletionFunc,
     qemu_aio_release() -> qemu_aio_unref(),
     drop tar_aio_cancel()]
[AF: common-obj-y -> block-obj-y, drop probe hook (bsc#945778)]
[AF: Drop bdrv_open() drv parameter for 2.5]
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Bruce Rogers <brogers@suse.com>
[AF: Changed bdrv_open() bs parameter and return value for v2.7.0-rc2,
     for bdrv_pread() and bdrv_aio_readv() s/s->hd/s->hd->file/]
Signed-off-by: Andreas Färber <afaerber@suse.de>
7 years agoblock: Add support for DictZip enabled gzip files
Alexander Graf [Wed, 5 Aug 2009 07:49:37 +0000 (09:49 +0200)]
block: Add support for DictZip enabled gzip files

DictZip is an extension to the gzip format that allows random seeks in gzip
compressed files by cutting the file into pieces and storing the piece offsets
in the "extra" header of the gzip format.

Thanks to that extension, we can use gzip compressed files as block backend,
though only in read mode.

This makes a lot of sense when stacked with tar files that can then be shipped
to VM users. If a VM image is inside a tar file that is inside a DictZip
enabled gzip file, the user can run the tar.gz file as is without having to
extract the image first.

Tar patch follows.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Bruce Rogers <brogers@novell.com>
Signed-off-by: Andreas Färber <afaerber@suse.de>
[TH: Use bdrv_open options instead of filename]
Signed-off-by: Tim Hardeck <thardeck@suse.de>
[AF: Error **errp added for bdrv_file_open, bdrv_delete -> bdrv_unref]
[AF: qemu_opts_create_nofail() -> qemu_opts_create(),
     bdrv_file_open() -> bdrv_open(), based on work by brogers]
[AF: error_is_set() dropped for v2.1.0-rc0]
[AF: BlockDriverAIOCB -> BlockAIOCB,
     BlockDriverCompletionFunc -> BlockCompletionFunc,
     qemu_aio_release() -> qemu_aio_unref(),
     drop dictzip_aio_cancel()]
[AF: common-obj-y -> block-obj-y, drop probe hook (bsc#945778)]
[AF: Drop bdrv_open() drv parameter for 2.5]
Signed-off-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Bruce Rogers <brogers@suse.com>
[AF: Drop bdrv_open() bs parameter and change return value for v2.7.0-rc2,
     for bdrv_pread() and bdrv_aio_readv() do s/s->hd/s->hd->file/]
Signed-off-by: Andreas Färber <afaerber@suse.de>
7 years agolinux-user: use target_ulong
Alexander Graf [Tue, 9 Oct 2012 07:06:49 +0000 (09:06 +0200)]
linux-user: use target_ulong

Linux syscalls pass pointers or data length or other information of that sort
to the kernel. This is all stuff you don't want to have sign extended.
Otherwise a host 64bit variable parameter with a size parameter will extend
it to a negative number, breaking lseek for example.

Pass syscall arguments as ulong always.

Signed-off-by: Alexander Graf <agraf@suse.de>
7 years agovnc: password-file= and incoming-connections=
Andreas Färber [Wed, 29 Aug 2012 18:06:01 +0000 (20:06 +0200)]
vnc: password-file= and incoming-connections=

TBD (from SUSE Studio team)

7 years agoslirp: -nooutgoing
Andreas Färber [Wed, 29 Aug 2012 16:42:56 +0000 (18:42 +0200)]
slirp: -nooutgoing

TBD (from SUSE Studio team)

7 years agolinux-user: XXX disable fiemap
Alexander Graf [Tue, 21 Aug 2012 12:20:40 +0000 (14:20 +0200)]
linux-user: XXX disable fiemap

agraf: fiemap breaks in libarchive. Disable it for now.

7 years agolinux-user: implement FS_IOC_SETFLAGS ioctl
Alexander Graf [Sun, 19 Aug 2012 22:07:13 +0000 (00:07 +0200)]
linux-user: implement FS_IOC_SETFLAGS ioctl

Signed-off-by: Alexander Graf <agraf@suse.de>
---

v1 -> v2

  - use TYPE_LONG instead of TYPE_INT

7 years agolinux-user: implement FS_IOC_GETFLAGS ioctl
Alexander Graf [Sun, 19 Aug 2012 22:02:52 +0000 (00:02 +0200)]
linux-user: implement FS_IOC_GETFLAGS ioctl

Signed-off-by: Alexander Graf <agraf@suse.de>
---

v1 -> v2:

  - use TYPE_LONG instead of TYPE_INT

7 years agolinux-user: Fake /proc/cpuinfo
Alexander Graf [Mon, 23 Jul 2012 08:24:14 +0000 (10:24 +0200)]
linux-user: Fake /proc/cpuinfo

Fedora 17 for ARM reads /proc/cpuinfo and fails if it doesn't contain
ARM related contents. This patch implements a quick hack to expose real
/proc/cpuinfo data taken from a real world machine.

The real fix would be to generate at least the flags automatically based
on the selected CPU. Please do not submit this patch upstream until this
has happened.

Signed-off-by: Alexander Graf <agraf@suse.de>
[AF: Rebased for v1.6 and v1.7]
Signed-off-by: Andreas Färber <afaerber@suse.de>
7 years agolinux-user: lock tb flushing too
Alexander Graf [Wed, 11 Jul 2012 14:47:42 +0000 (16:47 +0200)]
linux-user: lock tb flushing too

Signed-off-by: Alexander Graf <agraf@suse.de>
[AF: Rebased onto exec.c/translate-all.c split for 1.4]
[AF: Rebased onto tb_alloc() changes for v2.5.0-rc0]
Signed-off-by: Andreas Färber <afaerber@suse.de>
7 years agolinux-user: Run multi-threaded code on a single core
Alexander Graf [Tue, 10 Jul 2012 18:40:55 +0000 (20:40 +0200)]
linux-user: Run multi-threaded code on a single core

Running multi-threaded code can easily expose some of the fundamental
breakages in QEMU's design. It's just not a well supported scenario.

So if we pin the whole process to a single host CPU, we guarantee that
we will never have concurrent memory access actually happen. We can still
get scheduled away at any time, so it's no complete guarantee, but apparently
it reduces the odds well enough to get my test cases to pass.

This gets Java 1.7 working for me again on my test box.

Signed-off-by: Alexander Graf <agraf@suse.de>
7 years agolinux-user: lock tcg
Alexander Graf [Thu, 5 Jul 2012 15:31:39 +0000 (17:31 +0200)]
linux-user: lock tcg

The tcg code generator is not thread safe. Lock its generation between
different threads.

Signed-off-by: Alexander Graf <agraf@suse.de>
[AF: Rebased onto exec.c/translate-all.c split for 1.4]
[AF: Rebased for v2.1.0-rc0]
[AF: Rebased onto tcg_gen_code_common() drop for v2.5.0-rc0]
[AF: Rebased for v2.7.0-rc2]
Signed-off-by: Andreas Färber <afaerber@suse.de>
7 years agolinux-user: binfmt: support host binaries
Alexander Graf [Thu, 2 Feb 2012 17:02:33 +0000 (18:02 +0100)]
linux-user: binfmt: support host binaries

When we have a working host binary equivalent for the guest binary we're
trying to run, let's just use that instead as it will be a lot faster.

Signed-off-by: Alexander Graf <agraf@suse.de>
7 years agolinux-user: fix segfault deadlock
Alexander Graf [Fri, 13 Jan 2012 16:05:41 +0000 (17:05 +0100)]
linux-user: fix segfault deadlock

When entering the guest we take a lock to ensure that nobody else messes
with our TB chaining while we're doing it. If we get a segfault inside that
code, we manage to work on, but will not unlock the lock.

This patch forces unlocking of that lock in the segv handler. I'm not sure
this is the right approach though. Maybe we should rather make sure we don't
segfault in the code? I would greatly appreciate someone more intelligible
than me to look at this :).

Example code to trigger this is at: http://csgraf.de/tmp/conftest.c

Reported-by: Fabio Erculiani <lxnay@sabayon.org>
Signed-off-by: Alexander Graf <agraf@suse.de>
[AF: Drop spinlock_safe_unlock() and switch to tb_lock_reset() (bonzini)]
Signed-off-by: Andreas Färber <afaerber@suse.de>
7 years agoPPC: KVM: Disable mmu notifier check
Alexander Graf [Fri, 6 Jan 2012 00:05:55 +0000 (01:05 +0100)]
PPC: KVM: Disable mmu notifier check

When using hugetlbfs (which is required for HV mode KVM on 970), we
check for MMU notifiers that on 970 can not be implemented properly.

So disable the check for mmu notifiers on PowerPC guests, making
KVM guests work there, even if possibly racy in some odd circumstances.

7 years agolinux-user: add binfmt wrapper for argv[0] handling
Alexander Graf [Fri, 30 Sep 2011 17:40:36 +0000 (19:40 +0200)]
linux-user: add binfmt wrapper for argv[0] handling

When using qemu's linux-user binaries through binfmt, argv[0] gets lost
along the execution because qemu only gets passed in the full file name
to the executable while argv[0] can be something completely different.

This breaks in some subtile situations, such as the grep and make test
suites.

This patch adds a wrapper binary called qemu-$TARGET-binfmt that can be
used with binfmt's P flag which passes the full path _and_ argv[0] to
the binfmt handler.

The binary would be smart enough to be versatile and only exist in the
system once, creating the qemu binary path names from its own argv[0].
However, this seemed like it didn't fit the make system too well, so
we're currently creating a new binary for each target archictecture.

CC: Reinhard Max <max@suse.de>
Signed-off-by: Alexander Graf <agraf@suse.de>
[AF: Rebased onto new Makefile infrastructure, twice]
[AF: Updated for aarch64 for v2.0.0-rc1]
[AF: Rebased onto Makefile changes for v2.1.0-rc0]
[AF: Rebased onto script rewrite for v2.7.0-rc2 - to be fixed]
Signed-off-by: Andreas Färber <afaerber@suse.de>
7 years agoqemu-cvs-ioctl_nodirection
Alexander Graf [Tue, 14 Apr 2009 14:27:36 +0000 (16:27 +0200)]
qemu-cvs-ioctl_nodirection

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.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Ulrich Hecht <uli@suse.de>
7 years agoqemu-cvs-ioctl_debug
Alexander Graf [Tue, 14 Apr 2009 14:26:33 +0000 (16:26 +0200)]
qemu-cvs-ioctl_debug

Extends unsupported ioctl debug output.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Ulrich Hecht <uli@suse.de>
7 years agoqemu-cvs-gettimeofday
Ulrich Hecht [Tue, 14 Apr 2009 14:25:41 +0000 (16:25 +0200)]
qemu-cvs-gettimeofday

No clue what this is for.

7 years agoqemu-cvs-alsa_mmap
Alexander Graf [Tue, 14 Apr 2009 14:24:15 +0000 (16:24 +0200)]
qemu-cvs-alsa_mmap

Hack to prevent ALSA from using mmap() interface to simplify emulation.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Ulrich Hecht <uli@suse.de>
7 years agoqemu-cvs-alsa_ioctl
Alexander Graf [Tue, 14 Apr 2009 14:23:27 +0000 (16:23 +0200)]
qemu-cvs-alsa_ioctl

Implements ALSA ioctls on PPC hosts.

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Ulrich Hecht <uli@suse.de>
[AF: Rebased for v2.7.0-rc2]
Signed-off-by: Andreas Färber <afaerber@suse.de>
7 years agoqemu-cvs-alsa_bitfield
Alexander Graf [Tue, 14 Apr 2009 14:20:50 +0000 (16:20 +0200)]
qemu-cvs-alsa_bitfield

Implements TYPE_INTBITFIELD partially. (required for ALSA support)

Signed-off-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Ulrich Hecht <uli@suse.de>
7 years agoqemu-binfmt-conf: Modify default path
Andreas Färber [Wed, 10 Aug 2016 17:00:24 +0000 (19:00 +0200)]
qemu-binfmt-conf: Modify default path

Change QEMU_PATH from /usr/local/bin to /usr/bin prefix.

Signed-off-by: Andreas Färber <afaerber@suse.de>
7 years agoXXX dont dump core on sigabort
Alexander Graf [Mon, 21 Nov 2011 22:50:36 +0000 (23:50 +0100)]
XXX dont dump core on sigabort

7 years agoImported Upstream version 2.7.0 upstream/2.7.0
hyokeun [Tue, 6 Sep 2016 05:09:22 +0000 (14:09 +0900)]
Imported Upstream version 2.7.0

8 years agoImported Upstream version 2.6.0 90/81590/2 upstream/2.6.0
Yonghee Han [Wed, 27 Jul 2016 07:43:51 +0000 (16:43 +0900)]
Imported Upstream version 2.6.0

Change-Id: I8e3ccf55257695533c385aa8706484c73a733251

8 years agoImported Upstream version 2.5.1.1 89/81589/2 upstream/2.5.1.1
Yonghee Han [Wed, 27 Jul 2016 07:42:54 +0000 (16:42 +0900)]
Imported Upstream version 2.5.1.1

Change-Id: Ie290b0e68882590d8a64fab165a943940b7c98ed

8 years agoImported Upstream version 2.4.1 88/81588/2 upstream/2.4.1
Yonghee Han [Wed, 27 Jul 2016 07:40:17 +0000 (16:40 +0900)]
Imported Upstream version 2.4.1

Change-Id: I0b584f569cb0e0f4eac13cdb79e110c2dbc34bfc

8 years agoImported Upstream version 2.3.1 87/81587/2 upstream/2.3.1
Yonghee Han [Wed, 27 Jul 2016 07:39:12 +0000 (16:39 +0900)]
Imported Upstream version 2.3.1

Change-Id: I2161522ea1d7ff10cd1d697609d473243c05e1df

9 years agoImported Upstream version 2.2.0 upstream/2.2.0 upstream/2.2.1
Chanho Park [Wed, 10 Dec 2014 06:42:55 +0000 (15:42 +0900)]
Imported Upstream version 2.2.0

9 years agoImported Upstream version 2.1.0 upstream/2.1.0
Chanho Park [Fri, 5 Sep 2014 11:35:53 +0000 (20:35 +0900)]
Imported Upstream version 2.1.0

10 years agoImported Upstream version 2.0.0 62/23962/1 upstream/2.0.0
Chanho Park [Thu, 26 Jun 2014 11:28:10 +0000 (20:28 +0900)]
Imported Upstream version 2.0.0

Change-Id: I081766c4314e7893f54fec80b920b1638d15021f

10 years agoImport upstream 1.6.0. upstream/1.6.0
Junfeng Dong [Tue, 19 Nov 2013 09:45:23 +0000 (17:45 +0800)]
Import upstream 1.6.0.

Change-Id: Icf52b556470cac8677297f2ef14ded16684f7887
Signed-off-by: Junfeng Dong <junfeng.dong@intel.com>
11 years agoImported Upstream version 1.3.0 upstream/1.3.0
Anas Nashif [Tue, 15 Jan 2013 21:31:42 +0000 (13:31 -0800)]
Imported Upstream version 1.3.0

11 years agoImported Upstream version 1.2.0 upstream/1.2.0
Anas Nashif [Tue, 6 Nov 2012 15:50:24 +0000 (07:50 -0800)]
Imported Upstream version 1.2.0