Commit Graph

50336 Commits

Author SHA1 Message Date
Paolo Bonzini a0f80010b3 stubs: move vhost stubs to stubs/vhost.o
No need to include them in libqemustub.a, since only system emulators
need them.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-01-16 17:52:35 +01:00
Paolo Bonzini 858d436665 stubs: group all monitor_fdset_* functions in a single file
It makes little sense to implement only one of them, so avoid
proliferation of stubs files.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-01-16 17:52:35 +01:00
Paolo Bonzini 5564edb19e stubs: group stubs for user-mode emulation
Some stubs are used for user-mode emulation only; they are not
needed by tools.  Move them out of stubs/.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-01-16 17:52:35 +01:00
Paolo Bonzini 2f7b92a03f hw: move reset handlers from vl.c to hw/core
They are small, it is not worth stubbing them.  Just include them
in user-mode emulators and unit tests as well.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-01-16 17:52:35 +01:00
Paolo Bonzini 671ab4368a stubs: remove unused stub for serial_hd
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-01-16 17:52:35 +01:00
Paolo Bonzini 6a997d3b76 stubs: move acpi stubs to hw/acpi
No need to include them in libqemustub.a, since only system emulators
need them.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-01-16 17:52:35 +01:00
Paolo Bonzini cc7a73604a stubs: move smbios stubs to hw/smbios
No need to include them in libqemustub.a, since only system emulators
need them.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-01-16 17:52:35 +01:00
Paolo Bonzini 869e9aecbe stubs: merge all monitor stubs in one file, remove monitor_cur_is_qmp stub
monitor_cur_is_qmp was previously used by other stubs, but it's not
since 397d30e ("qemu-error: remove dependency of stubs on monitor",
2016-11-01).

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-01-16 17:52:35 +01:00
Leif Lindholm 1007a37e20 smbios: filter based on CONFIG_SMBIOS rather than TARGET
-smbios command line options were accepted but silently ignored on
TARGET_ARM, due to a test for TARGET_I386 in arch_init.c.

Copy the mechanism of hw/pci/pci-stub.c to implement an smbios-stub
instead, enabled for all targets without CONFIG_SMBIOS.

Signed-off-by: Leif Lindholm <leif.lindholm@linaro.org>
Message-Id: <20161222151828.28292-1-leif.lindholm@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-01-16 17:52:34 +01:00
Eduardo Habkost 1c6d75d5f7 qom: Make all interface types abstract
"qom-list-types abstract=false" currently returns all interface
types, as if they were not abstract. Fix this by making sure all
interface types are abstract.

All interface types have instance_size == 0, so we can use
it to set abstract=true on type_initialize().

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <1481567461-2341-1-git-send-email-ehabkost@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-01-16 17:52:34 +01:00
Paolo Bonzini 765a707000 megasas: fix guest-triggered memory leak
If the guest sets the sglist size to a value >=2GB, megasas_handle_dcmd
will return MFI_STAT_MEMORY_NOT_AVAILABLE without freeing the memory.
Avoid this by returning only the status from map_dcmd, and loading
cmd->iov_size in the caller.

Reported-by: Li Qiang <liqiang6-s@360.cn>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-01-16 17:52:34 +01:00
hangaohuai bf7bb91e3c bugfix: vm halt when in reset looping
reset mc146818rtc device when RESET event happens.

Fix the problem:
  1. Guest boot the second cpu, set CMOS_RESET_CODE 0x0a to protect selfboot;
  2. VM being reset by others, hmp_system_reset;
  3. seabios resume check the CMOS_RESET_CODE, if 0x0a, jump to the BDA
     resume execution by jump via 40h:0067h;
  4. Guest halt;

Signed-off-by: hangaohuai <hangaohuai@huawei.com>
Message-Id: <20161219060336.10176-1-hangaohuai@huawei.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2017-01-16 17:52:34 +01:00
Peter Maydell 2ccede18bd -----BEGIN PGP SIGNATURE-----
iQIcBAABAgAGBQJYeeoXAAoJEPMMOL0/L7482jcQAJFoNya2rIDrK8ljb8XldnlJ
 kvgywaceh6jZUuGTfgJ4S1k9CUvSvC3Ds9Y7qkseZ9kzktS9oIbvcuEi+INWiE6J
 ZmjP4KkYeKQ2rhiglbirHkweFmEXONqu2Ca1DfV/O6DkhyF25y1HO26Zu7P1ai2/
 oq7xNaQbot8+6fntatiRNvAcWOwrq2zHG/BHU8anaNVdgYqHViZWFOKl3oM/GF7M
 jz26SWhSduCNg4dzgULlnQsin8mnd3k9U+r2Rdo5szUhly794EOay3eVNPCmN1RF
 5tGP+pyx2m34ZiCNBxwQlcHVjNGq6vQMCrIWBo6x9wABeGStxX7HhrZQ88JtCjWU
 DQ7nbhLKaE1t39I/Ax3MCbz1c+zREHC0ivnZEMiXwdr/leP1dj6cyLw2UVQ2uk7r
 azgV6Z6AbdmCr1/kSJQQkWxTvQFzQDWTgfFXgC6LvYj+5wFp1JXphPSrGTYM72sz
 e3UnKyDHiBIK00jJ16k5wAlGI1yvu7N8zxVjAQ7WCs896ki3ita1NsG1Mgs2QAHb
 FWkinnfLZE0W7MKX9Iw3X7YUxI4r4LhODC31X7CCP/LeZPjAGV4qS96cICtm8VqM
 9/4nFFhGH15eYVKNQu/vVgjdh1IMpcmqMBtmv9Ndr5f9c/IIHlWXKGlj5qkypMpL
 14YzVoiBxP+1aUIo6mts
 =iBam
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/vivier/tags/m68k-for-2.9-pull-request' into staging

# gpg: Signature made Sat 14 Jan 2017 09:06:31 GMT
# gpg:                using RSA key 0xF30C38BD3F2FBE3C
# gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>"
# gpg:                 aka "Laurent Vivier <laurent@vivier.eu>"
# gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>"
# Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C

* remotes/vivier/tags/m68k-for-2.9-pull-request:
  target-m68k: increment/decrement with SP
  target-m68k: CAS doesn't need aligned access
  target-m68k: manage pre-dec et post-inc in CAS
  target-m68k: fix gen_flush_flags()
  target-m68k: fix bit operation with immediate value
  m68k: Remove PCI and USB from config file
  target-m68k: Implement bfffo
  target-m68k: Implement bitfield ops for memory
  target-m68k: Implement bitfield ops for registers

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-01-16 12:41:35 +00:00
Peter Maydell 02f50ca0de Fixes and more queued patches
-----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJYeTH1AAoJEK0ScMxN0CebPdwH/j8QEbA5e+icfR8LsUj5f1Uv
 ybsJB1CjGhQPxUZiXdhP7K6EUFSuDKgaH/azXaqlCZE/xUpxi2CANGqTfoeFyTLn
 iL4cPPicL1R0GgDa6MA7CDD3Qod4DkxZnLsBVff4DIj+gRHT4HhCkD4ralGoimfc
 efLZ8TNixOuPkHkNtRS7RgqzisOs0SaHUJggDwb8447hPxHlz/LD8kjXaYwpJ/13
 /MXEeh1R+rEX8BEZSW73S/WEKLYyDOY1NLSt8fx8G7YjtUrErrwuWhpGKIfe4M0U
 x0ShPV5ny3rlNaB6xv5+5f5jQOx72uKPcwS9RjpGqzI4cHM5pwO09QMu8Kq00u0=
 =UT1U
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20170113' into staging

Fixes and more queued patches

# gpg: Signature made Fri 13 Jan 2017 20:00:53 GMT
# gpg:                using RSA key 0xAD1270CC4DD0279B
# gpg: Good signature from "Richard Henderson <rth7680@gmail.com>"
# gpg:                 aka "Richard Henderson <rth@redhat.com>"
# gpg:                 aka "Richard Henderson <rth@twiddle.net>"
# Primary key fingerprint: 9CB1 8DDA F8E8 49AD 2AFC  16A4 AD12 70CC 4DD0 279B

* remotes/rth/tags/pull-tcg-20170113:
  tcg/aarch64: Fix tcg_out_movi
  tcg/aarch64: Fix addsub2 for 0+C
  target/arm: Fix ubfx et al for aarch64
  tcg/s390: Fix merge error with facilities

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-01-16 11:17:38 +00:00
Laurent Vivier 727d937b59 target-m68k: increment/decrement with SP
On 680x0 family only.

Address Register indirect With postincrement:

When using the stack pointer (A7) with byte size data, the register
is incremented by two.

Address Register indirect With predecrement:

When using the stack pointer (A7) with byte size data, the register
is decremented by two.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Thomas Huth <huth@tuxfamily.org>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Message-Id: <1484332593-16782-6-git-send-email-laurent@vivier.eu>
2017-01-14 10:06:21 +01:00
Laurent Vivier b19578f428 target-m68k: CAS doesn't need aligned access
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Message-Id: <1484332593-16782-5-git-send-email-laurent@vivier.eu>
2017-01-14 10:06:21 +01:00
Laurent Vivier 308feb9352 target-m68k: manage pre-dec et post-inc in CAS
In these cases we must update the address register after
the operation.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Message-Id: <1484332593-16782-4-git-send-email-laurent@vivier.eu>
2017-01-14 10:06:21 +01:00
Laurent Vivier 695576db2d target-m68k: fix gen_flush_flags()
gen_flush_flags() is setting unconditionally cc_op_synced to 1
and s->cc_op to CC_OP_FLAGS, whereas env->cc_op can be set
to something else by a previous tcg fragment.

We fix that by not setting cc_op_synced to 1
(except for gen_helper_flush_flags() that updates env->cc_op)

FIX: https://github.com/vivier/qemu-m68k/issues/19

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Message-Id: <1484332593-16782-3-git-send-email-laurent@vivier.eu>
2017-01-14 10:06:21 +01:00
Laurent Vivier fe53c2be8c target-m68k: fix bit operation with immediate value
M680x0 bit operations with an immediate value use 9 bits of the 16bit
value, while coldfire ones use only 8 bits.

Signed-off-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Richard Henderson <rth@twiddle.net>
Message-Id: <1484332593-16782-2-git-send-email-laurent@vivier.eu>
2017-01-14 10:06:21 +01:00
Thomas Huth 7b6de33e30 m68k: Remove PCI and USB from config file
None of the ColdFire boards that we currently support has a PCI or
USB bus (and AFAIK the upcoming q800 machine does not support PCI
and USB either), so we do not need these settings the config file.

Signed-off-by: Thomas Huth <huth@tuxfamily.org>
Message-Id: <20170106083956.53d08923@thl530>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2017-01-14 10:06:21 +01:00
Richard Henderson a45f1763cc target-m68k: Implement bfffo
Signed-off-by: Richard Henderson <rth@twiddle.net>
Message-Id: <1479242669-25852-1-git-send-email-rth@twiddle.net>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2017-01-14 10:06:21 +01:00
Richard Henderson f2224f2c9a target-m68k: Implement bitfield ops for memory
Signed-off-by: Richard Henderson <rth@twiddle.net>
Message-Id: <1478699171-10637-6-git-send-email-rth@twiddle.net>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2017-01-14 10:06:21 +01:00
Richard Henderson ac815f46a3 target-m68k: Implement bitfield ops for registers
Signed-off-by: Richard Henderson <rth@twiddle.net>
Message-Id: <1478699171-10637-5-git-send-email-rth@twiddle.net>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
2017-01-14 10:06:21 +01:00
Richard Henderson 8cf9a3d3f7 tcg/aarch64: Fix tcg_out_movi
There were some patterns, like 0x0000_ffff_ffff_00ff, for which we
would select to begin a multi-insn sequence with MOVN, but would
fail to set the 0x0000 lane back from 0xffff.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Message-Id: <20161207180727.6286-3-rth@twiddle.net>
2017-01-13 11:47:29 -08:00
Richard Henderson b1eb20da62 tcg/aarch64: Fix addsub2 for 0+C
When al == xzr, we cannot use addi/subi because that encodes xsp.
Force a zero into the temp register for that (rare) case.

Signed-off-by: Richard Henderson <rth@twiddle.net>
Message-Id: <20161207180727.6286-2-rth@twiddle.net>
2017-01-13 11:46:27 -08:00
Richard Henderson 86c9ab2776 target/arm: Fix ubfx et al for aarch64
The patch in 59a71b4c5b suffered from a merge failure
when compared to the original patch in

  http://lists.nongnu.org/archive/html/qemu-devel/2016-12/msg00137.html

Signed-off-by: Richard Henderson <rth@twiddle.net>
2017-01-13 09:48:20 -08:00
Richard Henderson a32b6ae897 tcg/s390: Fix merge error with facilities
The variable was renamed s390_facilities.

Signed-off-by: Richard Henderson <rth@twiddle.net>
2017-01-13 09:30:40 -08:00
Peter Maydell b6af8ea602 x86 and machine queue, 2017-01-17
Includes i386, CPU, NUMA, and memory backends changes.
 
 i386:
  target/i386: Fix bad patch application to translate.c
 
 CPU:
  qmp: Report QOM type name on query-cpu-definitions
 
 NUMA:
  numa: make -numa parser dynamically allocate CPUs masks
 
 Memory backends:
  qom: remove unused header
  monitor: reuse user_creatable_add_opts() instead of user_creatable_add()
  monitor: fix qmp/hmp query-memdev not reporting IDs of memory backends
 -----BEGIN PGP SIGNATURE-----
 
 iQIcBAABCAAGBQJYd8KHAAoJECgHk2+YTcWmHL4QALOeGD9hts4xw+1Q/kIzZYKt
 4fDdhGxyZ5faOiSUL8F2bOMXcOCsH+oNgvapxyKsZw1z79VbdEHgSUJtgv89Dz58
 sZ6UA1YAg2cWVaKFbRm98qGOImHmPEyNS/C7EpkejB41TXWAXM6Oh4PYeYgaibi3
 HxHW+oi7/4ugAs0dnIihaE/kMQmO4qWTtuDGosTPkTl4XuwWeMbC2BXaYIyZKAS5
 F2MgEXbxph889PcsNMeE5xy5hw3CA34gpq+Xs+ai+Box7AjIGemZVgqHdYcSjMSI
 pmaLO8R1ciyzPfjgwojOkVzFIft1A5XyoAiWUTmR0o3KQLs0gmG7XkKpjId2UzTk
 Xl2mxQjWAxZNlbfOoNYRf6UhwAIjpKYrjYyr0nrrumXB+9YH1d/0ix+3UjtZLU+e
 Qgg+sSgv11MPpdc9t1gcvXVzB+h+eqp7WLYH3j5vdYJZwLVVJJusXJxmyy72BrdK
 2AdL14RziPYvVvlQZ4fM5wp1HtTMUe96VLhHxwOpBDcdcdZIk1E8SxZXde1fUk41
 OS+egry27xgoJ6pJMZlB8t4TKqcSj8x5dNLi9+qjtfDSRonPAROCBus4jugUd6Ds
 xeW06s7Hbm0BxGYn/3s860RPTJrJPX3+MjLtFbIdXSbwHWM6jsy4U9qQdLRlneR9
 oTCyWo0AeuDFe0bQ110m
 =KII3
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/ehabkost/tags/x86-and-machine-pull-request' into staging

x86 and machine queue, 2017-01-17

Includes i386, CPU, NUMA, and memory backends changes.

i386:
 target/i386: Fix bad patch application to translate.c

CPU:
 qmp: Report QOM type name on query-cpu-definitions

NUMA:
 numa: make -numa parser dynamically allocate CPUs masks

Memory backends:
 qom: remove unused header
 monitor: reuse user_creatable_add_opts() instead of user_creatable_add()
 monitor: fix qmp/hmp query-memdev not reporting IDs of memory backends

# gpg: Signature made Thu 12 Jan 2017 17:53:11 GMT
# gpg:                using RSA key 0x2807936F984DC5A6
# gpg: Good signature from "Eduardo Habkost <ehabkost@redhat.com>"
# Primary key fingerprint: 5A32 2FD5 ABC4 D3DB ACCF  D1AA 2807 936F 984D C5A6

* remotes/ehabkost/tags/x86-and-machine-pull-request:
  qmp: Report QOM type name on query-cpu-definitions
  numa: make -numa parser dynamically allocate CPUs masks
  target/i386: Fix bad patch application to translate.c
  monitor: fix qmp/hmp query-memdev not reporting IDs of memory backends
  monitor: reuse user_creatable_add_opts() instead of user_creatable_add()
  qom: remove unused header

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-01-13 14:38:21 +00:00
Peter Maydell fdbd92f738 A couple of fixes to reduce the matrix some more that just missed the
last iteration.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJYd349AAoJEPvQ2wlanipEyl8IAJG48Jp39vWDCDy5YvUoStJ1
 dyPFlY6QqyVGVdw5RdtgTNofzHRm8l+xIKfoh+Kfylkzr/6m2Y4ZrBJlflnBAiHc
 cUnDWKZm+cgLmpRyUICABkTBw1rPg/blPq9On7Bzmww2dIZdtptT+RYpYlYg+SPQ
 sXahhhbNmQsbZU1QtiEvDQomEZQeh80Kk3bQPcB/aYZu0HkhjMDVHsHm7RASD/f6
 Ussgl4ILuL+BYjeIjRP3VucmWXtq+OvRkJlcHRqJKzS4qLXFApaI2GaAGdEX02aa
 3RGk6laArUck80LSdf1gYxU0PxlDoGtWDrwbv2ykM/aukBuRaHLrpP/GSfv57PA=
 =2gvl
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/stsquad/tags/pull-travis-20170112-1' into staging

A couple of fixes to reduce the matrix some more that just missed the
last iteration.

# gpg: Signature made Thu 12 Jan 2017 13:01:49 GMT
# gpg:                using RSA key 0xFBD0DB095A9E2A44
# gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>"
# Primary key fingerprint: 6685 AE99 E751 67BC AFC8  DF35 FBD0 DB09 5A9E 2A44

* remotes/stsquad/tags/pull-travis-20170112-1:
  travis: add Trusty with clang stable build
  travis: trim out most clang builds

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-01-13 14:02:30 +00:00
Gerd Hoffmann 8417cd0029 sdl2: fix build failure on windows
Cc: Stefan Weil <sw@weilnetz.de>
Cc: Samuel Thibault <samuel.thibault@gnu.org>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Stefan Weil <sw@weilnetz.de>
Message-id: 1484295285-8809-1-git-send-email-kraxel@redhat.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-01-13 10:56:17 +00:00
Peter Maydell b6c08970bc TriCore FPU patches
-----BEGIN PGP SIGNATURE-----
 
 iQJTBAABCgA9FiEEbmNqfoPy3Qz6bm43CtLGOWtpyhQFAlh2NbsfHGtiYXN0aWFu
 QG1haWwudW5pLXBhZGVyYm9ybi5kZQAKCRAK0sY5a2nKFLuOEAC5twyd1sXr1lGZ
 NNY/QwxBteNiEFhzl4FtvOCiIUF5V/FEo7h1Bz1AHsGqaUWMKFdTtFO1dT8VWyl+
 wQb0hnOtOiUxEl/UU35cviGzxr5iNWWUx/+yQezUrx7z8HBXUHpWgMbRvJSQ7ZpK
 Jjp/7zwbwtWjALTUPNOZZPWi7yYGSOXPIBHfSvsRx1KKC4o6hpQndm9uXOHUojf4
 DPrGXWayieRQCmJOSeEOosVjU/e4bNOIdQU2/P3fV9MRPzqapG0U7NsVZfcqxiUY
 loEUKOe7jhNrVnwSqStCpdQlA2W1h0PoaXLc3kEw7D92S+rHk6pCDsHlq19bJvIV
 /KrymUmbbw5D5W/GNEtyXY6Q+x7hK+zQ2pvoPfG/NVXHBdEp1lT/qrKJQQJqfmLi
 j2qozmty1aBrYMYL34caeXoFILJVUxwiZ51DKN3Y/MOArPV/ehPUujKfIRksCRJd
 nu+kUur9aRR4tmb8XwjEVj2ewtJhOE6SUdxRUT/C+kAGUAzRqQcPgTMhcj8UvITl
 lyrMB69zh3s3U1FthGefLuy+7XSy/tg+slqeFmHpt6tlU6+eD//jk/m+ryC236jq
 fqUIXYrKZM9hG4/q6OsdM5HN2uVPKGtZTJUxkGl6uLeRZHrjLoeMQJ5VM624/mJx
 6guBOiHSf4t+IgHuOumjTeIz5QaGuw==
 =80tR
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/bkoppelmann/tags/pull-tricore-2017-01-11-2' into staging

TriCore FPU patches

# gpg: Signature made Wed 11 Jan 2017 13:40:11 GMT
# gpg:                using RSA key 0x0AD2C6396B69CA14
# gpg: Good signature from "Bastian Koppelmann <kbastian@mail.uni-paderborn.de>"
# Primary key fingerprint: 6E63 6A7E 83F2 DD0C FA6E  6E37 0AD2 C639 6B69 CA14

* remotes/bkoppelmann/tags/pull-tricore-2017-01-11-2:
  target-tricore: Add updfl instruction
  target-tricore: Added new JNE instruction variant
  target-tricore: Added new MOV instruction variant
  target-tricore: Added MADD.F and MSUB.F instructions
  target-tricore: Added FTOUZ instruction

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-01-12 18:29:49 +00:00
Peter Maydell 80fbc689e0 vga: fixes for virtio-gpu and cirrus.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJYdgfYAAoJEEy22O7T6HE4tDYQAM4Pte9qCTi8yf1f9oOPnM5L
 9R86SPNwV42b162s+v1l3bZ1mebReJHcRmYWN53Mbv/M4jhuuGN678gGa0ok3cN/
 Jo0J8DdpycjbqM07bF/YOa001mjxX9eRw2hJhIkxAG1Dd64DSRslqPz5PDUz9/1z
 dvxHovDC/jL3YfNKXqihLogWzIAlw458Z5f7EHIlKURjaNQ+fi5ZKyzNl4PTzkAm
 DkN3CSiXg0DR6++50ds9HrTeXyhCkByU6dEqffmN2VofPnhSnNmem3p1SQum88XY
 7WYi2WHUWuncFw+4zzOvMU+8WD52Y6xe2Y5a/VBmK/hUqrHb+1V7Q3Ck+6PTIBlx
 pY/KZUrKr3M4rY1Ik0SiJSRx8Ub50oMJdQ2pCsWhHjNJXECCGgUWt/d1oWMyug1y
 3sONKCq9BggSISvX1QN48lXKSdObd5B8aWmSxxsaR42eUok2Bv2OV4LQIUQ4vtFx
 mxe31H6YNt4/zgX/BOhs85+VLFLXvjrc9u1fS5PFIS+CyToepn/4G9T85AsQ3RsB
 9HE0Mue00x8EhcrBh7YVjq98LGnkvPpabHV02DaJTG47koWli7ApxHz1PNCym2hM
 vaowH2pltoR4bb/2tEcokF6P/kV/DlxgjRAFrxDHjKKJX24vTPDNDxMhWXgC4wE1
 3OdKARbysrrXqVtWW8eq
 =W7M/
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/pull-vga-20170111-1' into staging

vga: fixes for virtio-gpu and cirrus.

# gpg: Signature made Wed 11 Jan 2017 10:24:24 GMT
# gpg:                using RSA key 0x4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/pull-vga-20170111-1:
  virtio-gpu: tag as not hotpluggable
  virtio-gpu: Fix memory leak in virtio_gpu_load()
  virtio-gpu: Recalculate VirtIOGPU::hostmem on VM load
  display: cirrus: ignore source pitch value as needed in blit_is_unsafe
  virtio-gpu: fix information leak in capset get dispatch

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-01-12 17:51:41 +00:00
Eduardo Habkost 8ed877b784 qmp: Report QOM type name on query-cpu-definitions
The new typename attribute on query-cpu-definitions will be used
to help management software use device-list-properties to check
which properties can be set using -cpu or -global for the CPU
model.

Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <1479320499-29818-1-git-send-email-ehabkost@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2017-01-12 15:51:36 -02:00
Igor Mammedov cdda2018e3 numa: make -numa parser dynamically allocate CPUs masks
so it won't impose an additional limits on max_cpus limits
supported by different targets.

It removes global MAX_CPUMASK_BITS constant and need to
bump it up whenever max_cpus is being increased for
a target above MAX_CPUMASK_BITS value.

Use runtime max_cpus value instead to allocate sufficiently
sized node_cpu bitmasks in numa parser.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <1479466974-249781-1-git-send-email-imammedo@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
[ehabkost: Added asserts to ensure cpu_index < max_cpus]
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2017-01-12 15:51:36 -02:00
Doug Evans 410e98146f target/i386: Fix bad patch application to translate.c
In commit c52ab08aee,
the patch snippet for the "syscall" insn got applied to "iret".

Signed-off-by: Doug Evans <dje@google.com>
Message-Id: <f403045cde4049058c05446d5c04@google.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2017-01-12 15:51:35 -02:00
Igor Mammedov e1ff3c67e8 monitor: fix qmp/hmp query-memdev not reporting IDs of memory backends
Considering 'id' is mandatory for user_creatable objects/backends
and user_creatable_add_type() always has it as an argument
regardless of where from it is called CLI/monitor or QMP,
Fix issue by adding 'id' property to hostmem backends and
set it in user_creatable_add_type() for every object that
implements 'id' property. Then later at query-memdev time
get 'id' from object directly.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <1484052795-158195-4-git-send-email-imammedo@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2017-01-12 15:35:06 -02:00
Igor Mammedov 3a4641054e monitor: reuse user_creatable_add_opts() instead of user_creatable_add()
Simplify code by dropping ~57LOC by merging user_creatable_add()
into user_creatable_add_opts() and using the later from monitor.
Along with it allocate opts_visitor_new() once in user_creatable_add_opts().

As result we have one less API func and a more readable/simple
user_creatable_add_opts() vs user_creatable_add().

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <1484052795-158195-3-git-send-email-imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2017-01-12 15:34:47 -02:00
Peter Maydell 4201e616c0 audio: qomify drivers, hotplug fixes.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJYdfuZAAoJEEy22O7T6HE4P7IQAKTuB0nqdTgwJKS4DfShPIpD
 a+EOipjVaNRHD41/9fv9A9h8adITX2H/7nl3LhN2avXCYhAeKqBX0P1anNoVbUuQ
 HZvztG+X5bNChzvEopHLT3J2iOT88RahG1yR47PQsBhH2v7EQWBD5CiHfQsEEL02
 lWPmnpvpXxx4q7qqXb2VgTB5yqNHoH7L25fKkhzw86FjH4CRHblyyXrWzYiVYDYu
 k5KdixRMnWguRRqWsNO2Z4axzS3ItWYKbwJ+GUUiCaIcm8gAi1OP6TJWUl52RVUi
 C4CAuq+Z1RuWVlj8bxWu6fvMKBxRAa96yreIbuzvsrK3GtyVx6cW/1kqItxboEAb
 KlJUrV//j/JGtZKrztWZdkEFcSpIEWwm1e7q6EvhaZkCmS3fdZlc+CpQf1Bkadd0
 maXyLIbr8CeDizimvsxcYL0Ahin/0oZ2g0t+YQ4Qrr0fZ1egbVeGzlYs1s3k+vtL
 f6WoENspFxJd4y7BLoXi4vdMJkQ4KhQ4tTjvJvKAmnbWFuFf2NqwQ6OikdQ7ojrf
 /MfqPl804AcLFqebfq6pNjy1bE50gcn4LIYubdoE08aDvBCEoA4d6PDQ4A5AmkSn
 gqJVfHP0Nf9C+KbQhXBWuTtN1Cgwgj9tZ09MV1o1fTAzjvt+bZBL4p5AYJt+iVr9
 8Ba++pSZu00OA4X+Ycss
 =uMEk
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/pull-audio-20170111-1' into staging

audio: qomify drivers, hotplug fixes.

# gpg: Signature made Wed 11 Jan 2017 09:32:09 GMT
# gpg:                using RSA key 0x4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>"
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>"
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>"
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/pull-audio-20170111-1:
  es1370: wire up reset via DeviceClass
  audio: ac97: add exit function
  audio: es1370: add exit function
  hw/audio: QOM'ify pl041.c
  hw/audio: QOM'ify marvell_88w8618.c

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-01-12 15:57:18 +00:00
Igor Mammedov 8a000250f1 qom: remove unused header
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <1484052795-158195-2-git-send-email-imammedo@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
2017-01-12 11:32:58 -02:00
Peter Maydell 0f2d17c1a5 TCG opcodes for extract, clz, ctz, ctpop
-----BEGIN PGP SIGNATURE-----
 
 iQEcBAABAgAGBQJYdZSZAAoJEK0ScMxN0CebMqAIAIxrZVlc46OUDDawEUNE5sZZ
 jq+FVWkopvj+Wn5m1YPf8tjBIuIuSnJuXAPT4JI3HpzZ6C0za68Qh55Yo/SVIOgF
 /DtIqVxKNudE8oCVLrx3Fhqzc2/Vy7m+WrPr8XQn/dLv1ngul6uTeeMW+AZASkbL
 PSQ+Ri3UlhVs//kOBw16R2dklGfwaGg2gZsUzoVUSDF6V4SVXgwPWzyuIwRch2L3
 Qf1VvCfIaKJKBZjE/SA6hlMnok99BZFagVM7ZdWTJX8+LljjTX2zlIfl+6anemcO
 oK0CPydWiwDz3GAfAL9TcHBRFTl8QpKTpS7Xgo7JqTLf6UkVI6EXMihIhAnX/kU=
 =ldlb
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/rth/tags/pull-tcg-20170110' into staging

TCG opcodes for extract, clz, ctz, ctpop

# gpg: Signature made Wed 11 Jan 2017 02:12:41 GMT
# gpg:                using RSA key 0xAD1270CC4DD0279B
# gpg: Good signature from "Richard Henderson <rth7680@gmail.com>"
# gpg:                 aka "Richard Henderson <rth@redhat.com>"
# gpg:                 aka "Richard Henderson <rth@twiddle.net>"
# Primary key fingerprint: 9CB1 8DDA F8E8 49AD 2AFC  16A4 AD12 70CC 4DD0 279B

* remotes/rth/tags/pull-tcg-20170110: (65 commits)
  tcg/i386: Handle ctpop opcode
  tcg/ppc: Handle ctpop opcode
  tcg: Use ctpop to generate ctz if needed
  tests: New test-bitcnt
  qemu/host-utils.h: Reduce the operation count in the fallback ctpop
  target-i386: Use ctpop helper
  target-tilegx: Use ctpop helper
  target-sparc: Use ctpop helper
  target-s390x: Avoid a loop for popcnt
  target-ppc: Use ctpop helper
  target-alpha: Use ctpop helper
  tcg: Add opcode for ctpop
  target-xtensa: Use clrsb helper
  target-tricore: Use clrsb helper
  target-arm: Use clrsb helper
  tcg: Add helpers for clrsb
  tcg/i386: Rely on undefined/undocumented behaviour of BSF/BSR
  tcg/i386: Handle ctz and clz opcodes
  tcg/i386: Allow bmi2 shiftx to have non-matching operands
  tcg/i386: Hoist common arguments in tcg_out_op
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-01-12 13:21:32 +00:00
Greg Kurz 204febd17f libqtest: handle zero length memwrite/memread
Some recently added tests pass a zero length to qtest_memwrite().
Unfortunately, the qtest protocol doesn't implement an on-the-wire
syntax for zero-length writes and the current code happily sends
garbage to QEMU. This causes intermittent failures.

It isn't worth the pain to enhance the protocol, so this patch
simply fixes the issue by "just return, doing nothing". The same
fix is applied to qtest_memread() since the issue also exists in
the QEMU part of the "memread" command.

Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: John Snow <jsnow@redhat.com>
Message-id: 148412457273.22750.983275587432075569.stgit@bahia
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2017-01-12 10:45:59 +00:00
Alex Bennée ae1a772c56 travis: add Trusty with clang stable build
Although we've reduced the matrix to avoid repeating clang builds we can
still add an additional clang build to use the latest stable version of
clang which will typically be available on current distros.

Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2017-01-12 10:04:17 +00:00
Daniel P. Berrange d9a6b01311 travis: trim out most clang builds
We test with both gcc and clang in order to detect cases
where clang issues warnings that gcc misses. To achieve
this though we don't need to build QEMU in multiple
different configurations. Just a single clang-on-linux
build will be sufficient, if we have an "all enabled"
config.

This cuts the number of build jobs from 21 to 16,
reducing the load imposed on shared Travis CI infra.
This will make it practical to enable jobs for other
interesting & useful configurations without DOS'ing
Travis to much.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Alex Bennée <alex.bennee@linaro.org>
2017-01-12 10:04:17 +00:00
Bastian Koppelmann 50788a3fdb target-tricore: Add updfl instruction
Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Reviewed-by: Richard Henderson <rth@twiddle.net>
2017-01-11 14:37:37 +01:00
Peer Adelt dedd8c9c32 target-tricore: Added new JNE instruction variant
If D[15] is != sign_ext(const4) then PC will be set to (PC +
zero_ext(disp4 + 16)).

[BK: fixed style errors]
Signed-off-by: Peer Adelt <peer.adelt@c-lab.de>
Message-Id: <1465314555-11501-5-git-send-email-peer.adelt@c-lab.de>
Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
2017-01-11 14:37:28 +01:00
Peer Adelt 550929dd46 target-tricore: Added new MOV instruction variant
Puts the content of data register D[a] into E[c][63:32] and the
content of data register D[b] into E[c][31:0].

[BK: fix style error]
[BK: Allocate temporaries only when needed]
Signed-off-by: Peer Adelt <peer.adelt@c-lab.de>
Message-Id: <1465314555-11501-4-git-send-email-peer.adelt@c-lab.de>
Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
2017-01-11 14:37:15 +01:00
Bastian Koppelmann ddd7fead8c target-tricore: Added MADD.F and MSUB.F instructions
Multiplies D[a] and D[b] and adds/subtracts the result to/from D[d].
The result is put in D[c]. All operands are floating-point numbers.

Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Reviewed-by: Richard Henderson <rth@twiddle.net>
2017-01-11 14:37:07 +01:00
Bastian Koppelmann 8f75983db8 target-tricore: Added FTOUZ instruction
Converts a 32-bit floating point number to an unsigned int. The
result is rounded towards zero.

Signed-off-by: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Reviewed-by: Richard Henderson <rth@twiddle.net>
2017-01-11 14:36:51 +01:00
Gerd Hoffmann a2056e09b0 virtio-gpu: tag as not hotpluggable
qemu can't hotplug display devices.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Message-id: 1483970138-20360-1-git-send-email-kraxel@redhat.com
2017-01-11 09:19:05 +01:00
Peter Maydell c84f0f25db virtio-gpu: Fix memory leak in virtio_gpu_load()
Coverity points out that if we fail in the "creating resources"
loop in virtio_gpu_load() we will leak various resources (CID 1356431).
Failing a VM load is going to leave the simulation in a complete mess,
but we can tidy up to the point that a full system reset should
get us back to sanity.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1483969123-14839-3-git-send-email-peter.maydell@linaro.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-01-11 09:19:05 +01:00