Commit Graph

32592 Commits

Author SHA1 Message Date
Cole Robinson 9068f20dfb gtk: Don't use deprecated gtk_image_menu_item_new_with_mnemonic
In these cases we weren't using an image in the menu item anyways, so
just do as the suggestion says. Should be fine for all qemu supported
gtk versions.

ui/gtk.c: In function ‘gd_create_menu_machine’:
ui/gtk.c:1284:5: error: ‘gtk_image_menu_item_new_with_mnemonic’ is deprecated (declared at /usr/include/gtk-3.0/gtk/deprecated/gtkimagemenuitem.h:76): Use 'gtk_menu_item_new_with_mnemonic' instead [-Werror=deprecated-declarations]
     s->reset_item = gtk_image_menu_item_new_with_mnemonic(_("_Reset"));
     ^
ui/gtk.c:1287:5: error: ‘gtk_image_menu_item_new_with_mnemonic’ is deprecated (declared at /usr/include/gtk-3.0/gtk/deprecated/gtkimagemenuitem.h:76): Use 'gtk_menu_item_new_with_mnemonic' instead [-Werror=deprecated-declarations]
     s->powerdown_item = gtk_image_menu_item_new_with_mnemonic(_("Power _Down"));

Signed-off-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-04-29 10:46:30 +02:00
Cole Robinson a3f4d63d63 configure: Re-run make if gtkabi/sdlabi is changed
Reconfiguring with a different --with-gtkabi or --with-sdlabi doesn't
trigger a remake. Generate an (unused) CONFIG_GTKABI/CONFIG_SDLABI
so config-host.h will actually give 'make' something to trigger on.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-04-29 10:46:30 +02:00
Cole Robinson f92d61f336 configure: Document --with-gtkabi
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-04-29 10:46:30 +02:00
Gerd Hoffmann 4843877e5d hda-audio: fix non-mixer codecs
They don't advertise mixer support, but still allow the guest change
mixer settings.  Add a check to avoid it.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-04-29 10:46:29 +02:00
Jeff Cody 5f6979cba9 block: Add '--version' option to qemu-img
This allows qemu-img to print out version information, without
needing to print the long help wall of text.

While there, perform some minor whitespace cleanup, and remove the
unused option_index variable in the call to getopt_long().

Reported-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-04-29 10:36:35 +02:00
Richard Henderson ebd0c614d7 tcg-sparc: Accept stores of zero
Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-04-28 11:06:35 -07:00
Richard Henderson 035b239826 tcg-sparc: Fix small 32-bit movi
We tested imm13 before discarding garbage high bits.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-04-28 11:06:35 -07:00
Richard Henderson 35e2da1556 tcg-sparc: Fixup function argument types
Use TCGReg everywhere appropriate.  Use int32_t for all arguments
that may be registers or immediate constants.  Merge tcg_out_addi
into its only caller.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-04-28 11:06:35 -07:00
Richard Henderson b357f902bf tcg-sparc: Hoist common argument loads in tcg_out_op
Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-04-28 11:06:35 -07:00
Richard Henderson 98b90bab3f tcg-sparc: Don't handle mov/movi in tcg_out_op
Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-04-28 11:06:35 -07:00
Richard Henderson 425532d71d tcg-sparc: Tidy check_fit_* tests
Use sextract instead of raw bit shifting for the tests.  Introduce
a new check_fit_ptr macro to make it clear we're looking at pointers.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-04-28 11:06:35 -07:00
Richard Henderson f4c166619e tcg-sparc: Implement muls2_i32
Using the 32-bit SMUL is a tad more efficient than
resorting to extending and using the 64-bit MULX.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-04-28 11:06:35 -07:00
Richard Henderson 8b66eefe0d tcg-sparc: Use the RETURN instruction
Saves one insn per TB exit over JMPL+RESTORE.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-04-28 11:06:35 -07:00
Richard Henderson 34b1a49cb1 tcg-sparc: Use 64-bit registers with sparcv8plus
Quite a lot of effort was spent composing and decomposing 64-bit
quantities in registers, when we should just create them and leave
them as one 64-bit register.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-04-28 11:06:35 -07:00
Richard Henderson a24fba935a tcg-sparc: Support trunc_shr_i32
Unlike a 64-bit shift op, allows the output to be in %l or %i registers
for sparcv8plus.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-04-28 11:06:35 -07:00
Richard Henderson 9f44adc573 tcg-sparc: Remove most uses of TCG_TARGET_REG_BITS
Replace with SPARC64 define.  Soon even sparcv8plus will use
64-bit register as far as TCG is concerned.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-04-28 11:06:35 -07:00
Richard Henderson 4bb7a41ed6 tcg: Add INDEX_op_trunc_shr_i32
Let the backend do something special for truncation.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-04-28 11:06:34 -07:00
Richard Henderson 71b926992e tcg: Fix missed pointer size != TCG_TARGET_REG_BITS changes
Signed-off-by: Richard Henderson <rth@twiddle.net>
2014-04-28 11:06:34 -07:00
Fam Zheng f0e9736012 mirror: Use DIV_ROUND_UP
Although bdrv_getlength() was just called above this, and checked for
error, it is better to just use the value we already get, and use
DIV_ROUND_UP.

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-04-28 17:36:30 +02:00
Jeff Cody 7db1689c35 block: fix qemu-img --help invocation
This fixes a bug introduced in commit ac1307ab, that caused the
'--help' option to not be recognized as a valid command, and not
print any help.

Signed-off-by: Jeff Cody <jcody@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-04-28 17:36:30 +02:00
Peter Maydell e2da502c00 Merge remote-tracking branch 'remotes/otubo/seccomp' into staging
* remotes/otubo/seccomp:
  seccomp: add shmctl(), mlock(), and munlock() to the syscall whitelist
  seccomp: add timerfd_create and timerfd_settime to the whitelist

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-04-28 14:14:35 +01:00
Peter Maydell 93156cef1c trivial patches for 2014-04-28
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.12 (GNU/Linux)
 
 iQEcBAABAgAGBQJTXd9hAAoJEL7lnXSkw9fb9XUIAKRVB/RAIuaQExVDOxq1C6ml
 o9gpFbCm1rE/fDB3fxUdppMxeOy4nLaX+H/RspYCtzEF8QBWA+OXiB5sH19I2Yd5
 1eiseNXimTMIWIJNwqgXCEabxOE2ae/9kQWry7pI3F7u2cA8EZZlgUIDzO5ogREj
 bi+Fy6KDlrMCLUBxtmoAkOnDPbTdnkVxu3Uv/oBFcrNCgklpGitIM+dMcayCUJ2q
 Mp2M/jRrGsCVB+cTpEbzqPoC/l2Xv6VYAvnjQWvJM9RpitzghufVAJ9IJa1xJM83
 2F05MEIr6h+ymLB7qh8x2lrJHN14O3t50uFaXL//om9JPlPei9lHQhfpVrg0UmQ=
 =2Bsm
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/mjt/tags/trivial-patches-2014-04-28' into staging

trivial patches for 2014-04-28

# gpg: Signature made Mon 28 Apr 2014 05:56:01 BST using RSA key ID A4C3D7DB
# gpg: Good signature from "Michael Tokarev <mjt@tls.msk.ru>"
# gpg:                 aka "Michael Tokarev <mjt@corpit.ru>"
# gpg:                 aka "Michael Tokarev <mjt@debian.org>"
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 6EE1 95D1 886E 8FFB 810D  4324 457C E0A0 8044 65C5
#      Subkey fingerprint: 6F67 E18E 7C91 C5B1 5514  66A7 BEE5 9D74 A4C3 D7DB

* remotes/mjt/tags/trivial-patches-2014-04-28:
  slirp/smb: Move ncalrpc directory to tmp
  po: add proper Language: tags to .po files
  po/Makefile: fix $SRC_PATH reference
  init_paths: fix minor memory leak
  virtfs-proxy-helper: fix call to accept
  net/net.c: remove unnecessary semicolon
  Add QEMU logo (SVG file)
  vl: avoid closing stdout with 'writeconfig'
  xilinx: Fix typo in comment (Marvel -> Marvell)
  vl: Eliminate a superfluous local variable
  vl: Remove useless 'continue'
  gitignore: cleanups #2
  tests/.gitignore: Ignore test-rfifolock
  move test-* from .gitignore to tests/.gitignore
  configure: Improve help behavior
  vl: convert -m to QemuOpts
  qemu-option: introduce qemu_find_opts_singleton
  misc: Use cpu_physical_memory_read and cpu_physical_memory_write

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-04-28 13:43:17 +01:00
Peter Maydell 13de54eedd Merge remote-tracking branch 'remotes/qmp-unstable/queue/qmp' into staging
* remotes/qmp-unstable/queue/qmp:
  monitor: fix qmp_getfd() fd leak in error case
  HMP: support specifying dump format for dump-guest-memory
  HMP: fix doc of dump-guest-memory
  qmp: object-add: Validate class before creating object
  monitor: Add device_add and device_del completion.
  monitor: Add command_completion callback to mon_cmd_t.
  monitor: Fix drive_del id argument type completion.
  error: Remove some unused headers
  qerror.h: Replace QERR_NOT_SUPPORTED with QERR_UNSUPPORTED
  qerror.h: Remove QERR defines that are only used once
  qerror.h: Remove unused error classes
  error: Print error_report() to stderr if using qmp
  monitor: Remove unused monitor_print_filename
  error: Privatize error_print_loc
  vnc: Remove default_mon usage
  slirp: Remove default_mon usage

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-04-28 12:56:34 +01:00
Peter Maydell a41b2c995b Block pull request
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJTWoe5AAoJEJykq7OBq3PI9hMH/0uF2rrn2z+Q5q2NzetLI8V7
 QoOIZETT4bgMyNXdnm7A0EIiPmRLhGt7DtUvbrA1BFxQCgw2xMN0bOmUiSwPGrrV
 Bbhb/9oVTM9lvyHkPW4DH2a0JYU+0VJ+McdOcD72/hv7xaEs+WoZoAPJkMsPD2yE
 iNnHWTH3D/6S5SMpZYAUTMn54ZS/1qV9YW46izsGgkqW8OHxeRKnPuX1FgRL06Uy
 r70iejNwZXbeH7DJZ4nIgLeQHwpYOVBzGXyV7v4UgoZdISLVlQb0neI3x+oYmhfo
 bwnV9lN4XqLveBna+zZTuW9eyb/2epUn9YJYsa2tbcE/3GaBz14dM82spnpWVnA=
 =u7ts
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging

Block pull request

# gpg: Signature made Fri 25 Apr 2014 17:05:13 BST using RSA key ID 81AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"

* remotes/stefanha/tags/block-pull-request:
  iscsi: Don't use error_is_set() to suppress additional errors
  blockdev: Clean up fragile use of error_is_set()
  nbd: Use return values instead of error_is_set(errp)
  qemu-img: Consistently name Error * objects err, and not errp
  Use error_is_set() only when necessary (again)
  block: Expose host_* drivers in blockdev-add
  MAINTAINERS: Add qemu-img/io to block subsystem
  qemu-iotests: Improve and make use of QMPTestCase.wait_until_completed()
  doc: add -drive rerror=,werror= to qemu --help output
  block: Prevent coroutine stack overflow when recursing in bdrv_open_backing_file.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-04-28 11:50:31 +01:00
Peter Maydell d09a18d44d Net patches
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJTWmwjAAoJEJykq7OBq3PI32kH+gMZlANje8MPlPn0rjuQC3Eb
 9dt5Oz7dbRbEbRJQHvadbKSvV0beeIdSBxVe8vD3IOyPwGQQg0LqwTnUfXadwNYD
 SGYwOXMNgKe/+o9NRAcZonRxNLoU9J+cSCfLnqXUPdhLzlPF1uuaglBBjlcrhOOE
 YQfDIEe3UcPLpehl6ALrgtiF6+ZrjDnvFnL0KZcMKomQlCnMHvBuzVJ26lQ0m+38
 JxYYc99q6qGvBleH/tHMT7jRWPdEud5rEINKAFnb/OB82YL44fbVTboDFmGVW5WI
 keWiWbs2BwpxXjOwyf7ZunmSMLWIdSVLiSja+WE0YUMiNh+DFxdO7I9YVNlYK4Q=
 =0oRs
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/stefanha/tags/net-pull-request' into staging

Net patches

# gpg: Signature made Fri 25 Apr 2014 15:07:31 BST using RSA key ID 81AB73C8
# gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
# gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"

* remotes/stefanha/tags/net-pull-request:
  net: Don't use error_is_set() to suppress additional errors
  net: Make qmp_query_rx_filter() with name argument more obvious
  net: xilinx_axienet.c: Add phy soft reset bit clearing
  net/net.c: Remove unnecessary semicolon
  pcnet: remove duplicate assignment
  tap: Avoid extra iterations while closing file fd

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-04-28 11:29:03 +01:00
Peter Maydell 4a39cbb034 Some s390x patches:
- gdb stubs to make it compile if gdb support is pulled in
 - linux-headers update for new oneregs
 - two onereg enhancements
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.11 (GNU/Linux)
 
 iQIcBAABAgAGBQJTWko2AAoJEN7Pa5PG8C+v4EIP/2+tCVaNV03OcdHrXWezOsaV
 +gkPp0F6csHQG2HxznoIV/IlZIdN8OyH3QqzUkVP585dfw7nyogZ3IbuFXxwfKPu
 umn9e63VfUnlZVkVNG0wVl0UXIo9nyvoS4XQkywni44BEgniGctQBoxNkKXiXVun
 JRYRLpaBcB3QxDVT1sGYkIIfcKw5MOct6bICVaS1IHj0gy7vh/T9mtrqnR4cnJao
 UzIurB6rSa2G8HaOKG9V17WdSE4IDfV/Rs3+Vn/a7ckXDqM+r/ki+VAWkSud8h+7
 +PxpH+MThG3XfYQDJ3K67LVzKYj1Tyq97sAO5/e48M15TRZ7+yk8qcBeplA9ZTv9
 IJzKzAZRRet+e6HCtrB1V+yMqVb/spX9BGzDn2oaq5dxBL82r1fN5rtgSXm56dsJ
 Zw08mhQd7pXRTDBMBxXfYj0BSjCphyA2uXFGXBBOp1S9f8hEa7DwPgKwkAC963yh
 rQGKTkSchVwayQb0yhfL8yT30T/K/PfWFvkB/ot4ZT6F7rm5CvJrseCLh6MXm+8G
 ql3yBNkJ9B/DjX6O7yirq3cxV7FfEjN5M4eISH+87YrK97/MzfEEXdaO1GwLUv4w
 l5vc1aJ0DjrtROecl6zz7EfI8g4WIUNZntX3JAbxmCEHuIsaYHdmc604mnVFNeIY
 wrcxrVQ+pwfC+fMKsdDa
 =uy70
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20140425' into staging

Some s390x patches:

- gdb stubs to make it compile if gdb support is pulled in
- linux-headers update for new oneregs
- two onereg enhancements

# gpg: Signature made Fri 25 Apr 2014 12:42:46 BST using RSA key ID C6F02FAF
# gpg: Can't check signature: public key not found

* remotes/cohuck/tags/s390x-20140425:
  s390x/kvm: sync gbea and pp register
  s390x/kvm: rework KVM synchronize to tracing for some ONEREGS
  linux-headers update
  s390x: empty function stubs in preparation for __KVM_HAVE_GUEST_DEBUG

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2014-04-28 10:51:32 +01:00
Gerd Hoffmann a889bc2bb2 add secondary-vga to display-vga test
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-04-28 11:03:39 +02:00
Gerd Hoffmann 0850fd583f add display-vga test
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-04-28 11:03:35 +02:00
Gerd Hoffmann 63e3e24db2 vga: add secondary stdvga variant
Add a standard vga variant which doesn't occupy any legacy
resources and thus can easily be used as secondary (or legacy-free)
graphics adapter.  Programming must be done using the MMIO bar.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-04-28 11:03:32 +02:00
Gerd Hoffmann e2bbfc8ee2 vga: allow non-global vmstate
Need a way to opt-out from vga.vram being global vmstate, for
secondary vga cards.  Add a bool parameter to vga_common_init
to support this.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2014-04-28 10:21:55 +02:00
Michael Buesch b87b8a8b32 slirp/smb: Move ncalrpc directory to tmp
The smbd forked by qemu still uses the default ncalrpc directory
in /var/run/samba. This may lead to problems, if /var/run/samba
does not exist (for example if /var/run is a tmpfs and the host
smbd was not started).

This leads to the following error message from samba
and an unworkable smbd:
	Failed to create pipe directory /var/run/samba/ncalrpc - No such file or directory

Fix this by pointing smbd to /tmp/qemu-smb.%d.%d/ncalrpc as ncalrpc directory.
Smbd will create the actual ncalrpc subdirectory on its own.

Signed-off-by: Michael Buesch <m@bues.ch>
Cc: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
(Applying this to -trivial because it _is_ rather trivial
 and because Jan does not reply for months)
2014-04-28 08:55:32 +04:00
Michael Tokarev 7a30842186 po: add proper Language: tags to .po files
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-04-28 08:55:32 +04:00
Michael Tokarev b920cad669 po/Makefile: fix $SRC_PATH reference
The rule for messages.po appears to be slightly wrong.
Move the `cd' command within parens.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
Tested-by: Stefan Weil <sw@weilnetz.de>
2014-04-28 08:55:32 +04:00
Kirill Batuzov 00a9cacaea init_paths: fix minor memory leak
Fields "name" (created with strdup in new_entry) and "pathname"
(created with g_strdup_printf in new_entry) of pathelem struct should
be freed before the whole struct is.

Signed-off-by: Kirill Batuzov <batuzovk@ispras.ru>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-04-28 08:55:32 +04:00
Tim Comer b0f9300ca3 virtfs-proxy-helper: fix call to accept
The current code calls accept() without initializing the size parameter
which means the accept call might write too much to the stack.

URL: https://bugs.gentoo.org/486714
Signed-off-by: Tim Comer <comer0@gmail.com>
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-04-28 08:55:32 +04:00
Igor Ryzhov 9057698d93 net/net.c: remove unnecessary semicolon
Signed-off-by: Igor Ryzhov <iryzhov@arccn.ru>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-04-28 08:55:32 +04:00
Stefan Weil d461863d3c Add QEMU logo (SVG file)
The "Q" of the logo is already included in pc-bios/qemu_logo_no_text.svg.

This file now adds the complete logo as it was designed by Benoît Canet.
Benoît licensed it under CC-BY 3.0, see
http://lists.gnu.org/archive/html/qemu-devel/2012-02/msg02865.html.

Unneeded borders from Benoît's original logo were removed,
and metadata (license, author, date) was added in this version.

Cc: Benoît Canet <benoit@irqsave.net>
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-04-28 08:55:31 +04:00
Chen Gang 7fb8b5d9c4 vl: avoid closing stdout with 'writeconfig'
'writeconfig' supports output to stdout (with '-'); when that happens,
we must not close stdout, or further command line options that also use
stdout will be impacted. (Although 'writeconfig' was copied from
'readconfig', the latter does not have the problem because it does not
support reading from '-')

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-04-28 08:55:31 +04:00
Stefan Weil 24c12b7923 xilinx: Fix typo in comment (Marvel -> Marvell)
Signed-off-by: Stefan Weil <sw@weilnetz.de>
Reviewed-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-04-28 08:55:31 +04:00
Chen Gang 6924bc1eef vl: Eliminate a superfluous local variable
CODING_STYLE frowns upon mixing declarations and statements.  main()
has such a declaration.  Clean up by eliminating the variable.

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-04-28 08:55:31 +04:00
Chen Gang a629f2fdba vl: Remove useless 'continue'
"This if else has no code between it and the end of the enclosing
while loop. This makes this continue redundant."

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-04-28 08:55:31 +04:00
Michael Tokarev 5d77c8f9b6 gitignore: cleanups #2
A few more cleanups for .gitignore file.
The final goal is to have only files in there which
are generated during build.  Things like .orig or
.gdbinit are definitely not generated during build.
Also, anchor a few more build-time directories.

Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-04-28 08:55:31 +04:00
Cole Robinson a27b04577e tests/.gitignore: Ignore test-rfifolock
Signed-off-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-04-27 13:04:18 +04:00
Laszlo Ersek 296b14491a move test-* from .gitignore to tests/.gitignore
Also sort the test-* entries in the latter.

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-04-27 13:04:18 +04:00
Fam Zheng 2d2ad6d090 configure: Improve help behavior
Old:
There are two paths to show help and exit 1, one is with "-h" or
"--help", one is with invalid options.

New:
Show help and exit 0 for --help.
On invalid option, don't show the long help and bury the early "ERROR:"
line, just give a message pointing to --help.

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-04-27 13:04:18 +04:00
Igor Mammedov 6e1d3c1c85 vl: convert -m to QemuOpts
Adds option to -m
 "size" - startup memory amount

For compatibility with legacy CLI if suffix-less number is passed,
it assumes amount in Mb.

Otherwise user is free to use suffixed number using suffixes b,k/K,M,G

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-04-27 13:04:18 +04:00
Paolo Bonzini e96e5ae880 qemu-option: introduce qemu_find_opts_singleton
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Andreas Färber <afaerber@suse.de>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-04-27 13:04:18 +04:00
Stefan Weil eb6282f230 misc: Use cpu_physical_memory_read and cpu_physical_memory_write
These functions don't need type casts (as does cpu_physical_memory_rw)
and also make the code better readable.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2014-04-27 13:04:18 +04:00
Paul Moore e3f9bb011a seccomp: add shmctl(), mlock(), and munlock() to the syscall whitelist
Additional testing reveals that PulseAudio requires shmctl() and the
mlock()/munlock() syscalls on some systems/configurations.  As before,
on systems that do require these syscalls, the problem can be seen with
the following command line:

  # qemu -monitor stdio  -sandbox on \
         -device intel-hda -device hda-duplex

Signed-off-by: Paul Moore <pmoore@redhat.com>
Signed-off-by: Eduardo Otubo <otubo@linux.vnet.ibm.com>
2014-04-25 14:52:03 -03:00
Felix Geyer 8439761852 seccomp: add timerfd_create and timerfd_settime to the whitelist
libusb calls timerfd_create() and timerfd_settime() when it's built with
timerfd support.

Command to reproduce:

       -device usb-host,hostbus=1,hostaddr=3,id=hostdev0

Log messages:

audit(1390730418.924:135): auid=4294967295 uid=121 gid=103 ses=4294967295
                           pid=5232 comm="qemu-system-x86" sig=31 syscall=283
                           compat=0 ip=0x7f2b0f4e96a7 code=0x0
audit(1390733100.580:142): auid=4294967295 uid=121 gid=103 ses=4294967295
                           pid=16909 comm="qemu-system-x86" sig=31 syscall=286
                           compat=0 ip=0x7f03513a06da code=0x0

Reading a few hundred MB from a USB drive on x86_64 shows this syscall distribution.
Therefore the timerfd_settime priority is set to 242.

    calls  syscall
 --------- ----------------
   5303600 write
   2240554 read
   2167030 ppoll
   2134828 ioctl
    704023 timerfd_settime
    689105 poll
     83122 futex
       803 writev
       476 rt_sigprocmask
       287 recvmsg
       178 brk

Signed-off-by: Felix Geyer <debfx@fobos.de>
Signed-off-by: Eduardo Otubo <otubo@linux.vnet.ibm.com>
2014-04-25 14:51:59 -03:00