platform/upstream/qemu.git
10 years agopackaging: add qemu-ppc64le to the list of packaged files 44/27244/2
Ilya Palachev [Mon, 8 Sep 2014 15:26:04 +0000 (19:26 +0400)]
packaging: add qemu-ppc64le to the list of packaged files

Otherwise the build fails at the execution of the %packagind section:

[  662s] error: Installed (but unpackaged) file(s) found:
[  662s]    /usr/bin/qemu-ppc64le

Change-Id: Iae46712a3a94893e99516972d5163a83897bb41b
Signed-off-by: Ilya Palachev <i.palachev@samsung.com>
10 years agopackaging: add packaging spec files
Chanho Park [Fri, 27 Jun 2014 05:53:53 +0000 (14:53 +0900)]
packaging: add packaging spec files

This patch adds packaging files to build with GBS and rpmbuild.

Change-Id: I1cb93997635a28b91a489dbe77d306e6ac684581
Signed-off-by: Chanho Park <chanho61.park@samsung.com>
10 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>
10 years agovirtfs-proxy-helper.c: fix compile error
Steven Noonan [Thu, 9 Jan 2014 21:55:07 +0000 (13:55 -0800)]
virtfs-proxy-helper.c: fix compile error

This is caused by a linux/xattr.h and sys/xattr.h incompatibility:

    In file included from /home/snoonan/Development/qemu/include/qemu/xattr.h:27:0,
     from fsdev/virtfs-proxy-helper.c:25:
    /usr/include/sys/xattr.h:31:3: error: expected identifier before numeric constant
       XATTR_CREATE = 1, /* set value, fail if attr already exists.  */
       ^
    /home/snoonan/Development/qemu/qemu/rules.mak:25: recipe for target 'fsdev/virtfs-proxy-helper.o' failed

Moving the include around resolves it.

Change-Id: I8242070c18a511e62877d57564a7ad754a8f14c8
Signed-off-by: Steven Noonan <snoonan@amazon.com>
Cc: Anthony Liguori <aliguori@amazon.com>
10 years agolinux-user: Convert blkpg to use a special subop handler
Alexander Graf [Fri, 22 Aug 2014 10:22:28 +0000 (12:22 +0200)]
linux-user: Convert blkpg to use a special subop handler

The blkpg ioctl can take different payloads depending on the opcode in
its payload structure. Create a new special ioctl handler that can only
deal with partition style ones for now.

Signed-off-by: Alexander Graf <agraf@suse.de>
10 years agolinux-user: Cast validity checks on g_posix_timers range
Alexander Graf [Fri, 22 Aug 2014 09:28:52 +0000 (11:28 +0200)]
linux-user: Cast validity checks on g_posix_timers range

We check whether the passed in counter value is negative on all calls
that involve g_posix_timers. However, we also check check for negativity
of that value after casting it - at which point it couldn't possibly be
negative anymore.

Cast the check to int16_t. Maybe this is correct. Maybe the check should
get removed completely.

Signed-off-by: Alexander Graf <agraf@suse.de>
10 years agoqtest: Increase socket timeout
Andreas Färber [Thu, 17 Apr 2014 16:39:10 +0000 (18:39 +0200)]
qtest: Increase socket timeout

Change from 5 to 15 seconds.

Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agotests: Don't run qom-test twice
Andreas Färber [Mon, 7 Apr 2014 14:03:08 +0000 (16:03 +0200)]
tests: Don't run qom-test twice

Commit 3687d5325 accidentally resulted in running qom-test twice
for x86_64, once directly via the wildcard, and once because x86_64
includes all the i386 qtests (which includes qom-test).

Filter out x86_64 as well as microblazeel and xtensaeb to fix this.

Cc: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 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>
10 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]

10 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>
10 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.

10 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>
10 years agoLegacy Patch kvm-qemu-preXX-report-default-mac-used.patch
Alexander Graf [Wed, 12 Dec 2012 18:11:31 +0000 (19:11 +0100)]
Legacy Patch kvm-qemu-preXX-report-default-mac-used.patch

10 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

10 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]
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 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]
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 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>
10 years agolinux-user: add more blk ioctls
Alexander Graf [Wed, 10 Oct 2012 08:21:20 +0000 (10:21 +0200)]
linux-user: add more blk ioctls

Implement a few more ioctls that operate on block devices.

Signed-off-by: Alexander Graf <agraf@suse.de>
10 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)

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

TBD (from SUSE Studio team)

10 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.

10 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>
10 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>
10 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>
10 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]
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 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>
10 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]
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agolinux-user: Ignore broken loop ioctl
Alexander Graf [Tue, 12 Jun 2012 02:41:10 +0000 (04:41 +0200)]
linux-user: Ignore broken loop ioctl

During invocations of losetup, we run into an ioctl that doesn't
exist. However, because of that we output an error, which then
screws up the kiwi logic around that call.

So let's silently ignore that bogus ioctl.

Signed-off-by: Alexander Graf <agraf@suse.de>
[AF: Rebased for v2.1.0-rc0]
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agotarget-arm: linux-user: no tb_flush on reset
Alexander Graf [Tue, 29 May 2012 13:30:01 +0000 (15:30 +0200)]
target-arm: linux-user: no tb_flush on reset

When running automoc4 as linux-user guest program, it segfaults right after
it creates a thread. Bisecting pointed to commit a84fac1426 which introduces
tb_flush on reset.

So something in our thread creation is broken. But for now, let's revert the
change to at least get a working build again.

[AF: Rebased, fixed typo]

10 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>
10 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>
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 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.

10 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]
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agoblock/vmdk: Support creation of SCSI VMDK images in qemu-img
Ulrich Hecht [Tue, 14 Apr 2009 14:37:42 +0000 (16:37 +0200)]
block/vmdk: Support creation of SCSI VMDK images in qemu-img

Signed-off-by: Ulrich Hecht <uli@suse.de>
[AF: Changed BLOCK_FLAG_SCSI from 8 to 16 for v1.2]
[AF: Rebased onto upstream VMDK SCSI support]
[AF: Rebased onto skipping of image creation in v1.7]
[AF: Simplified in preparation for v1.7.1/v2.0]
[AF: Rebased onto QemuOpts conversion for v2.1]
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 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>
10 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>
10 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.

10 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>
10 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>
10 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>
10 years agoqemu-0.9.0.cvs-binfmt
Ulrich Hecht [Tue, 14 Apr 2009 14:18:44 +0000 (16:18 +0200)]
qemu-0.9.0.cvs-binfmt

Fixes binfmt_misc setup script:
- x86_64 is i386-compatible
- m68k signature fixed
- path to QEMU

Signed-off-by: Ulrich Hecht <uli@suse.de>
[AF: Update path for qemu-aarch64 for v2.0.0-rc1]
Signed-off-by: Andreas Färber <afaerber@suse.de>
10 years agoXXX work around SA_RESTART race with boehm-gc (ARM only)
Alexander Graf [Thu, 1 Dec 2011 18:00:01 +0000 (19:00 +0100)]
XXX work around SA_RESTART race with boehm-gc (ARM only)

[AF: CPUState -> CPUArchState, adapt to reindentation]
[AF: CPUArchState::opaque -> CPUState::opaque]

10 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

10 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

12 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