Commit Graph

38736 Commits

Author SHA1 Message Date
Cole Robinson
bc119048d7 vnc: Tweak error when init fails
Before:
qemu-system-x86_64: -display vnc=unix:/root/foo.sock: Failed to start VNC server on `(null)': Failed to bind socket to /root/foo.sock: Permission denied

After:
qemu-system-x86_64: -display vnc=unix:/root/foo.sock: Failed to start VNC server: Failed to bind socket to /root/foo.sock: Permission denied

Rather than tweak the string possibly show unix: value as well,
just drop the explicit display reporting. We already get the cli
string in the error message, that should be sufficient.

Signed-off-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-05-20 10:23:08 +02:00
Cole Robinson
3d00ac1a2e vnc: Don't assert if opening unix socket fails
Reproducer:

$ qemu-system-x86_64 -display vnc=unix:/root/i-cant-access-you.sock
qemu-system-x86_64: iohandler.c:60: qemu_set_fd_handler2: Assertion `fd >= 0' failed.
Aborted (core dumped)

Signed-off-by: Cole Robinson <crobinso@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-05-20 10:23:08 +02:00
Daniel P. Berrange
2b2c1a38ee ui: remove check for failure of qemu_acl_init()
The qemu_acl_init() function has long since stopped being able
to return NULL, since g_malloc will abort on OOM. As such the
checks for NULL were unreachable code.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-05-20 10:23:08 +02:00
Ján Tomko
274c3b52e1 Strip brackets from vnc host
Commit v2.2.0-1530-ge556032 vnc: switch to inet_listen_opts
bypassed the use of inet_parse in inet_listen, making literal
IPv6 addresses enclosed in brackets fail:

qemu-kvm: -vnc [::1]:0: Failed to start VNC server on `(null)': address
resolution failed for [::1]:5900: Name or service not known

Strip the brackets to make it work again.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-05-20 10:23:08 +02:00
Peter Maydell
eba05e922e serial: fix multi-pci card error cleanup.
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJVWxTBAAoJEEy22O7T6HE48boP/0e+WavR48nhASyYNLTW5SR7
 NmOPqN964HN0dDP3S5jItD1GP2DtPb/9kQga0l8b/t5X89oW23ZjB6EHlVDLboNS
 b0zc6ahcvNpvNRm/DYEv8zZCXU9e6qwCUKfo/TZ7L74bP0/2ol49Ry3fvKZrs/JK
 M8emDFh3CoVvvQoLO1eUpoj9ATi20I28silVFgaHeU7kB/qGXoQCPiO8Wu5GBGgS
 HvtfB2VA0tn4D/NeWO5ll78GhO+TtB0SXsFfW9ln7wlYAgTv0/7mPaS4ELTTeSye
 ThBR/CN7ArKINPIEEDIJUT2y8Hv4XeKgFTH1WjAce3LMjx1kGeA6mfOsXm63YCgj
 JqMJhnxSkNY4GqHLxzb6+KYgqOq7KVPsjbUyHR52M2thl0PEEbP9Ft/XXZT6WAkB
 8ISjk+vmfojAEVYXjk/ZZvDTkws+53r/aWO5FakObAj/l2Sk8FtrBMJyqdo/+2QO
 6GCJUVnmPVhGpaT94ysCwihIJl6CPpARAFWwKKleCZx2AENL7amk8HxilaDcJE5S
 /is3c7YIc6vL5PENUuyoAIsnvWhnocSvwGvsMtWkLtrnGbCYaEGyLpk1ty12PSQM
 e2kWd/qxIerKECyJ1+BPZb8zewR0o9wxHX/qZtrfOo9zsSwc8JOZFw8s1HWxDMj8
 XbqDYzHlmBUvMg8kQY02
 =4NPQ
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/pull-serial-20150519-1' into staging

serial: fix multi-pci card error cleanup.

# gpg: Signature made Tue May 19 11:47:29 2015 BST using RSA key ID D3E87138
# 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>"

* remotes/kraxel/tags/pull-serial-20150519-1:
  serial: fix multi-pci card error cleanup.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-05-19 14:10:33 +01:00
Gerd Hoffmann
a48da7b5bc serial: fix multi-pci card error cleanup.
Put the number of serial ports into a local variable in
multi_serial_pci_realize, then increment the port count
(pci->ports) as we initialize the serial port cores.

Now pci->ports always holds the number of successfully
initialized ports and we can use multi_serial_pci_exit
to properly cleanup the already initialized bits in case
of a init failure.

https://bugzilla.redhat.com/show_bug.cgi?id=970551

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
2015-05-19 12:47:08 +02:00
Peter Maydell
fdbe454a24 hw/display: qomify vga cards
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJVWw8NAAoJEEy22O7T6HE4A74P/ihkDQXyBiFySkde0gLLOQZ0
 SSRmoO6HN4aNsCssliJSidYxp2AjWYCZJfG0Cc7ExwOcKqZ5u5N8ysOK20DjOuXd
 CjQMtUe7V0zHivJlhUeNHusuKx3+5Bvi+b/Az1fYXaN5UPD8VKKt7FWvRx6P44SE
 kQyP01HhQCvPL29GeJnx5PFaOeB+xMkIzYaywK0ZBzBrFKGpect2kQsEsRcCujil
 nnBn4XgMh7XZ3yPHfPtYaOj2kB5CCStKEfkXkZ58O0KsZGJXsuf+LVGtMuErpOtF
 HHnIUEysaFx5WcWkdgF35e2fRsPgmVUWykVsxQSa/1Gwpbgrxj98jr56pvNqUQ3P
 RebphUCOpB+xzHv1cJeBG5KApxfAKWuBLNqYICMiZgYYZV1kVl61ncLgxrXCBMQJ
 w8BVG9/N0T0MYT/2ITrXfmr6fWS0DhC6o4KSTPvraJ/BId6eCg757eNzI++bp5z3
 Fa8AKLz2aWFQAjO5dKQ5Qx8zMCQcvHu8LxDTv+VpliLl9hn+PUlAjovaLsiNHQtB
 Ij2UOK/ZF3Q9keHAcqYUZK8CmgTl5BzTPAisE/ARdSdnWhPBRxH0+x7Hs8CqXVAy
 M8Sajp4dJNRyn+PSN8Dro54nJnw0GCGrmrsDULldweVFAsC2eZ34gYB06M1F8exP
 SWSl2DPYc6csTKaQZTR1
 =bq6x
 -----END PGP SIGNATURE-----

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

hw/display: qomify vga cards

# gpg: Signature made Tue May 19 11:23:09 2015 BST using RSA key ID D3E87138
# 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>"

* remotes/kraxel/tags/pull-vga-20150519-1:
  vga-pci: QOMify
  qxl: QOMify
  cirrus_vga: QOMify

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-05-19 11:47:03 +01:00
Gonglei
176c324feb vga-pci: QOMify
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-05-19 11:40:01 +02:00
Gonglei
c69f6c7dcf qxl: QOMify
Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-05-19 11:40:01 +02:00
Gonglei
d338bae33a cirrus_vga: QOMify
QOMify pci-cirrus-vga like isa-cirrus-vga device.

Signed-off-by: Gonglei <arei.gonglei@huawei.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2015-05-19 11:40:01 +02:00
Peter Maydell
faa261a7fb cocoa queue:
* fix various issues with full screen in the OSX UI
  * set an icon for our binary file
  * add entries to the View menu for QEMU consoles
  * fix various warnings that are produced when building on 10.10
    (largely deprecated interfaces)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCAAGBQJVWvGTAAoJEDwlJe0UNgzeMgcP/AsRHEiGwsNqKRvOAfC9M0UX
 eqKHKgy1jyNn0GJHjhVHxmXgQ47o8nPlvOJi4EP/y8smdAQC3Ky373WsmyEfqEgN
 2JxErWeKOaxVw83Kms2o9d9lckc3BYg5UfnRDq8OhKCIZ2NQRjJ58/LuRMLU4/Th
 jCuFfdA1YmxIiMncdHL/tB1KT+fnvB+yFzFME1uq5jdKgEWW62OaNsdIQbSZLveu
 0YYX6vMQoRE70yAZI95HRF4+K4CAWyTiu3AUW2sjCv+OetHOR1BktJdmZ9DZthuq
 MB9FuCzapzkmZkKszBvRDmA1zgrzZmKdFrLxpVvSFwy0Hmytg7O3xeIbtiaus2Y7
 Uj6Td2YxQo+t1z9cu0UVqpvzBtl3Ez8Ze/lsu+07Upt8tzApEt53693402s/X+Xv
 7zTfGUOh/88Gbv7mZ/QXDxM+MBnlSicfMebC19jrumQPuddSmqE3UlAK7mQ0xpAY
 XGtmlqq6FJc7jq1BfjsTA4HbsEICtl5om2T6EyMZdKu4RXmtVZmQc0CDTLC8kitV
 qas6wvjlmysVX7btrQP+/mGI0WaDsetxp8UTjeLFSl+vPD0WVsru9zsSDrVdAFt4
 pshKDVp62xi8lDsW+DWzFC6S3BSiL3ZAuPSIFdRwp6kbYQvsxtC2zYIkVcrwGZdJ
 tYJtxkcSeKGRs2I4ugxZ
 =dZVT
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/pmaydell/tags/pull-cocoa-20150519' into staging

cocoa queue:
 * fix various issues with full screen in the OSX UI
 * set an icon for our binary file
 * add entries to the View menu for QEMU consoles
 * fix various warnings that are produced when building on 10.10
   (largely deprecated interfaces)

# gpg: Signature made Tue May 19 09:17:23 2015 BST using RSA key ID 14360CDE
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>"

* remotes/pmaydell/tags/pull-cocoa-20150519:
  ui/cocoa: Add console items to the View menu
  ui/cocoa: Avoid deprecated NSOKButton/NSCancelButton constants
  ui/cocoa: Don't use NSWindow useOptimizedDrawing on OSX 10.10 and up
  ui/cocoa: Declare that QemuCocoaAppController implements NSApplicationDelegate
  ui/cocoa: openPanelDidEnd returnCode should be NSInteger, not int
  ui/cocoa: Remove compatibility ifdefs for OSX 10.4
  ui/cocoa: Drop tests for CGImageCreateWithImageInRect support
  Makefile.target: set icon for binary file on Mac OS X
  ui/cocoa: Make -full-screen option work on Mac OS X
  ui/cocoa: Fix several full screen issues on Mac OS X

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-05-19 10:25:59 +01:00
Programmingkid
b4c6a112dc ui/cocoa: Add console items to the View menu
Add any console that is available to the current emulator as a
menu item under the View menu.

Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
[PMM: Adjusted to apply after zoom-to-fit menu item was added;
 create the View menu at the same time as all the others, and only
 add the dynamically-determined items to it later]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-05-19 09:11:18 +01:00
Peter Maydell
8617989eae ui/cocoa: Avoid deprecated NSOKButton/NSCancelButton constants
In OSX 10.10, the NSOKButton and NSCancelButton constants are deprecated
and provoke compiler warnings. Avoid them by using the
NSFileHandlingPanelCancelButton and NSFileHandlingPanelOKButton constants
instead. These are the documented correct constants for the 10.6-and-up
beginSheetModalForWindow API we use. We also use the same method for
the pre-10.6 compatibility code path, but conveniently the constant
values are the same and the constant names have been present since 10.0.
Preferring the constant names that match the non-legacy API makes more
sense anyway.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1431296361-16981-7-git-send-email-peter.maydell@linaro.org
2015-05-19 09:11:18 +01:00
Peter Maydell
81801ae213 ui/cocoa: Don't use NSWindow useOptimizedDrawing on OSX 10.10 and up
Starting in OSX 10.10, NSWindow useOptimizedDrawing is deprecated, so
don't use it there.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1431296361-16981-6-git-send-email-peter.maydell@linaro.org
2015-05-19 09:11:18 +01:00
Peter Maydell
2a4c8c53da ui/cocoa: Declare that QemuCocoaAppController implements NSApplicationDelegate
Our class QemuCocoaAppController implements the NSApplicationDelegate
interface, and we pass an object of this class to [NSApp setDelegate].
However, we weren't declaring in the class definition that we implemented
this interface; in OSX 10.10 this provokes the following (slighly
misleading) warning:
ui/cocoa.m:1031:24: warning: sending 'QemuCocoaAppController *' to parameter of
      incompatible type 'id<NSFileManagerDelegate>'
    [NSApp setDelegate:appController];
                       ^~~~~~~~~~~~~
/System/Library/Frameworks/Foundation.framework/Headers/NSFileManager.h:109:47:
note: passing argument to parameter 'delegate' here
@property (assign) id <NSFileManagerDelegate> delegate NS_AVAILABLE(10_5,
2_0);
                                              ^

Annoyingly, this interface wasn't formally defined until OSX 10.6, so we
have to surround the relevant part of the @interface line with an ifdef.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1431296361-16981-5-git-send-email-peter.maydell@linaro.org
2015-05-19 09:11:18 +01:00
Peter Maydell
de1aadee28 ui/cocoa: openPanelDidEnd returnCode should be NSInteger, not int
The type for openPanelDidEnd's returnCode argument should be NSInteger,
not int. This only matters for the OSX 10.5 code path where we pass
the method directly to an OSX function to call.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1431296361-16981-4-git-send-email-peter.maydell@linaro.org
2015-05-19 09:11:18 +01:00
Peter Maydell
89424ff32f ui/cocoa: Remove compatibility ifdefs for OSX 10.4
Remove compatibility ifdefs that work around OSX 10.4 not providing
various typedefs and functions.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1431296361-16981-3-git-send-email-peter.maydell@linaro.org
2015-05-19 09:11:17 +01:00
Peter Maydell
b63901d84c ui/cocoa: Drop tests for CGImageCreateWithImageInRect support
The code that tries to test at both compiletime and runtime
for whether CGImageCreateWithImageInRect is supported provokes
a compile warning on OSX 10.3:

ui/cocoa.m:378:13: warning: comparison of function 'CGImageCreateWithImageInRect'
      equal to a null pointer is always false[-Wtautological-pointer-compare]
        if (CGImageCreateWithImageInRect == NULL) { // test if "CGImageCreateWithImageInRect" is
supported on host at runtime
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~    ~~~~

The simplest way to deal with this is just to drop this code,
since we don't in practice support OSX 10.4 anyway. (10.5 was
released in 2007 and is the last PPC version, so is the earliest
we really need to continue to support at all.)

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Message-id: 1431296361-16981-2-git-send-email-peter.maydell@linaro.org
2015-05-19 09:11:17 +01:00
Programmingkid
4e34017c21 Makefile.target: set icon for binary file on Mac OS X
Implements setting the icon for the binary file in Mac OS X.

Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
[PMM: tweaked makefile to use $@ and quiet-command]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-05-19 09:11:17 +01:00
Programmingkid
43227af88a ui/cocoa: Make -full-screen option work on Mac OS X
This patch makes the -full-screen option actually instruct QEMU to
enter fullscreen at startup, on Mac OS X.

Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-05-19 09:11:17 +01:00
Programmingkid
5d1b2eef58 ui/cocoa: Fix several full screen issues on Mac OS X
This patch makes several changes:
- Minimizes distorted full screen display by respecting aspect
ratios.
- Makes full screen mode available on Mac OS 10.7 and higher.
- Allows user to decide if video should be stretched to fill the
screen, using a menu item called "Zoom To Fit".
- Hides the normalWindow so it won't show up in full screen mode.
- Allows user to exit full screen mode.

Signed-off-by: John Arbuckle <programmingkidx@gmail.com>
[PMM: minor whitespace tweaks, remove incorrectly duplicated
 use of 'f' menu accelerator key]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-05-19 09:11:17 +01:00
Peter Maydell
62bf3df432 target-arm:
* New board model: xlnx-ep108
  * Some more preparation for AArch64 EL2/EL3
  * Fix bugs in access checking for generic counter registers
  * Remove a stray '+' sign
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABCAAGBQJVWjnBAAoJEDwlJe0UNgzeH68QAIEQiV1A22NuQfmF/EJ2SnQ9
 kRc55WJRe1YH2O1UtyYut+VBa+JhtJ4GX57hbp5/dzCdbL1UAuBPUXpPxUdWfD9Z
 F0wzfQOlbNJoPwMdLRvBPVUEXd/U4c2/W0YA3y8+AfoCIa+khPzvcdyQUWleRhZT
 Xbpfmp8FyKetrxLP+ALj/lu1fWkpZ7RydKN0lY1LlGHeXEJyKvSzlXnTcmlrb12A
 2IoozO3Jmhr86g4K7fRfnDoggRR2alVTLncl1pw+GzNxTxm0rn/oH0+XYsVo7MRu
 2QnScwxWY7p1R7LONdx5a2WKJOuSSCrskX7mcekZgNKMgYbO/W1rUe+xIkWHJ70B
 6fhf62/gLLtCI04IyIB8wjFfruvIXX/KmRwzLwhEWtE8qDB1J4t5Fv9ZVs3OhSwP
 c5kOPyEB5cUxyX9ZN9K7pNH3amQN005d5onDXV1tCU2fgsLLQnFVNMBtECrOb0O5
 UX27rdyk6Ere4mizZqz4j5QyQyilrdRRi/Deum1XcNqJluo1RF1olmJKjSwKNMZa
 54aPIHW6NdqV0J8E4fiWRvygwNELChkmSIUVizxmZB2XytGFqQNqzRvK42+4HKnn
 lC6m3p1B/hOOUvG6UgMntdkxYFycyCVn2EjzugtwmX8eTq/fgwM83bsWS3d7Zjy2
 5G1std6fNl8AoK9Ra9xt
 =MuVm
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20150518-3' into staging

target-arm:
 * New board model: xlnx-ep108
 * Some more preparation for AArch64 EL2/EL3
 * Fix bugs in access checking for generic counter registers
 * Remove a stray '+' sign

# gpg: Signature made Mon May 18 20:13:05 2015 BST using RSA key ID 14360CDE
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>"

* remotes/pmaydell/tags/pull-target-arm-20150518-3: (21 commits)
  target-arm: Remove unneeded '+'
  target-arm: Correct accessfn for CNTV_TVAL_EL0
  target-arm: Correct accessfn for CNTP_{CT}VAL_EL0
  target-arm: Add WFx syndrome function
  target-arm: Add EL3 and EL2 TCR checking
  target-arm: Add TTBR regime function and use
  linux-user/arm: Correct TARGET_NR_timerfd to TARGET_NR_timerfd_create
  arm: xlnx-ep108: Add bootloading
  arm: xlnx-ep108: Add external RAM
  arm: Add xlnx-ep108 machine
  arm: xlnx-zynqmp: Add UART support
  char: cadence_uart: Split state struct and type into header
  char: cadence_uart: Clean up variable names
  arm: xlnx-zynqmp: Add GEM support
  net: cadence_gem: Split state struct and type into header
  net: cadence_gem: Clean up variable names
  arm: xlnx-zynqmp: Connect CPU Timers to GIC
  arm: xlnx-zynqmp: Add GIC
  arm: Introduce Xilinx ZynqMP SoC
  target-arm: cpu64: Add support for Cortex-A53
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-05-18 20:23:16 +01:00
Edgar E. Iglesias
18084b2f71 target-arm: Remove unneeded '+'
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 1431499963-1019-4-git-send-email-edgar.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-05-18 20:04:19 +01:00
Edgar E. Iglesias
b65c08ee1a target-arm: Correct accessfn for CNTV_TVAL_EL0
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1431499963-1019-3-git-send-email-edgar.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-05-18 20:04:17 +01:00
Edgar E. Iglesias
12cde08aaf target-arm: Correct accessfn for CNTP_{CT}VAL_EL0
Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1431499963-1019-2-git-send-email-edgar.iglesias@gmail.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-05-18 20:04:04 +01:00
Greg Bellows
06fbb2fdf7 target-arm: Add WFx syndrome function
Adds a utility function for creating a WFx exception syndrome

Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1429722561-12651-9-git-send-email-greg.bellows@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-05-18 20:04:04 +01:00
Greg Bellows
88e8add8b6 target-arm: Add EL3 and EL2 TCR checking
Updated get_phys_addr_lpae to check the appropriate TTBCR/TCR depending on the
current EL. Support includes using the different TCR format as well as checks to
insure TTBR1 is not used when in EL2 or EL3.

Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1429722561-12651-8-git-send-email-greg.bellows@linaro.org
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-05-18 20:04:04 +01:00
Greg Bellows
aef878be4e target-arm: Add TTBR regime function and use
Add a utility function for choosing the correct TTBR system register based on
the specified MMU index. Add use of function on physical address lookup.

Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Message-id: 1429722561-12651-7-git-send-email-greg.bellows@linaro.org
[PMM: fixed regime_ttbr() return type to be uint64_t]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-05-18 20:04:04 +01:00
Timothy Baldwin
d82322e175 linux-user/arm: Correct TARGET_NR_timerfd to TARGET_NR_timerfd_create
Misspelled system call name in macro was causing timerfd_create not
to be supported for the ARM target.

Signed-off-by: Timothy Edward Baldwin <T.E.Baldwin99@members.leeds.ac.uk>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-05-18 17:45:10 +01:00
Peter Crosthwaite
082587b741 arm: xlnx-ep108: Add bootloading
Add bootloader support using standard ARM bootloader.

Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Tested-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: b829abaf2b70d02b28e79301553cbd74afc416a1.1431381507.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-05-18 16:41:14 +01:00
Peter Crosthwaite
b79b9d28f6 arm: xlnx-ep108: Add external RAM
Zynq MPSoC supports external DDR RAM. Add a RAM at 0 to the model.

Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Tested-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: 2c25e2a4198402a6477aef2975d5df7c415dd341.1431381507.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-05-18 16:41:14 +01:00
Peter Crosthwaite
859a0c5b5f arm: Add xlnx-ep108 machine
Add a machine model for the Xilinx ZynqMP SoC EP108 board.

Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Tested-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: 3896b34c862f370dc0679e4428bf3848d1f9f83c.1431381507.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-05-18 16:41:13 +01:00
Peter Crosthwaite
3bade2a9e6 arm: xlnx-zynqmp: Add UART support
There are 2x Cadence UARTs in Zynq MP. Add them.

Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: e30795536f77599fabc1052278d846ccd52322e2.1431381507.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-05-18 16:41:13 +01:00
Peter Crosthwaite
8ae57b2fa3 char: cadence_uart: Split state struct and type into header
Create a new header for Cadence UART to allow using the device with
modern SoC programming conventions. The state struct needs to be
visible to embed the device in SoC containers.

Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Tested-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: 46a0fbd45b6b205f54c4a8c778deb75c77f8abdf.1431381507.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-05-18 16:41:12 +01:00
Peter Crosthwaite
e86da3cb40 char: cadence_uart: Clean up variable names
Clean up some variable names in preparation for migrating the state struct
and type cast macro to a public header. The acronym "UART" on it's own is
not specific enough to be used in a more global namespace so preface with
"cadence". Fix the capitalisation of "uart" in the state type while touching
the typename. Preface macros used by the state struct itself with CADENCE_UART
so they don't conflict in namespace either.

Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Tested-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: 3812b7426c338beae9e082557f3524a99310ddc6.1431381507.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-05-18 16:41:12 +01:00
Peter Crosthwaite
14ca2e462e arm: xlnx-zynqmp: Add GEM support
There are 4x Cadence GEMs in ZynqMP. Add them.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Tested-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: 7d3e68e5495d145255f0ee567046415e3a26d67e.1431381507.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-05-18 16:41:11 +01:00
Peter Crosthwaite
f49856d4e6 net: cadence_gem: Split state struct and type into header
Create a new header for Cadence GEM to allow using the device with
modern SoC programming conventions. The state struct needs to be
visible to embed the device in SoC containers.

Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Tested-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: a98b5df6440c5bff8f813a26bb53ce1cfefb4c4c.1431381507.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-05-18 16:41:11 +01:00
Peter Crosthwaite
448f19e231 net: cadence_gem: Clean up variable names
Cleanup some variable names in preparation for migrating the state
struct and type cast macro to a public header. The acronym "GEM" on
its own is not specific enough to be used in a more global namespace
so preface with "cadence". Fix the capitalisation of "gem" in the
state type while touching the typename. Also preface the GEM_MAXREG
macro as this will need to migrate to public header.

Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Tested-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: 8e2b0687b3a7b7a3fde5ba2f3bee6f3b911e84ef.1431381507.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-05-18 16:41:10 +01:00
Peter Crosthwaite
bf4cb10966 arm: xlnx-zynqmp: Connect CPU Timers to GIC
Connect the GPIO outputs from the individual CPUs for the timers to the
GIC.

Tested-by: Alistair Francis <alistair.francis@xilinx.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: a7866a4f0c903c91fa3034210b4d2879aa4bfcb9.1431381507.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-05-18 16:41:10 +01:00
Peter Crosthwaite
7729e1f4b3 arm: xlnx-zynqmp: Add GIC
Add the GIC and connect IRQ outputs to the CPUs. The GIC regions are
under-decoded through a 64k address region so implement aliases
accordingly.

Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: 5853189965728d676106d9e94e76b9bb87981cb5.1431381507.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-05-18 16:41:09 +01:00
Peter Crosthwaite
f0a902f764 arm: Introduce Xilinx ZynqMP SoC
With quad Cortex-A53 CPUs.

Use SMC PSCI, with the standard policy of secondaries starting in
power-off.

Tested-by: Alistair Francis <alistair.francis@xilinx.com>
Reviewed-by: Alistair Francis <alistair.francis@xilinx.com>
Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: a16202a6c7b79e446e5289d38cb18d2ee4b897a0.1431381507.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-05-18 16:41:09 +01:00
Peter Crosthwaite
e35310260e target-arm: cpu64: Add support for Cortex-A53
Add the ARM Cortex-A53 processor definition. Similar to A57, but with
different L1 I cache policy, phys addr size and different cache
geometries. The cache sizes is implementation configurable, but use
these values (from Xilinx Zynq MPSoC) as a default until cache size
configurability is added.

Acked-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: db439ff834cf0431bc192b05272a3b28fe2045d0.1431381507.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-05-18 16:41:08 +01:00
Peter Crosthwaite
ee804264dd target-arm: cpu64: generalise name of A57 regs
Rename some A57 CP register variables in preparation for support for
Cortex A53. Use "a57_a53" to describe the shareable features. Some of
the CP15 registers (such as ACTLR) are specific to implementation, but
we currently just RAZ them so continue with that as the policy for both
A57 and A53 processors under a shared definition.

Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Message-id: 5a5f957994677d91435190b3be1cefa6f657e274.1431381507.git.peter.crosthwaite@xilinx.com
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-05-18 16:31:59 +01:00
Peter Maydell
385057cbec qapi: Fix qapi mangling of downstream names, and more
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJVViG7AAoJEDhwtADrkYZTqu0QAJCtZI2V3JZ3RmUfj/ISpekZ
 9gery42k6mc9dnMp+YOEdfbYYkjtcb3NqSPQi1iJUtBS1GjYGgvC2dqYDs6Eemow
 OEMyat7pwzPL7oOgoXC2F3fd/LMkpGU+qNIcj9ofqrd0I46MXYCTuwS6f8j1geDQ
 QtG+P57g6VFNzoy6I2H7NV3u3kLw1uwUTGaIEuuoCPUmSSWJrCxmoN2pFmHK1Rwk
 8rjuN5ZBLt2Vonqkj59qv/MA7/VmpasIVdbfsbnt36Jih7IyojDxpcNB80xTMlnh
 2AmVXSTsP62f7xhG2xWJf9+aOu4MWqfKCmv2f4wxuLV78eHRqjBz9zvMZTzSIE3j
 ca71KBl5qXIPB0YdCXZrI6k6UnsXzkO8V51IfrclWqzGKX23JBaNltaKyFnAeFEU
 mkVZFX2STFqE1sv9rpYlXcwnXf0OzERtoSK0yeQOFCUVRdFuZkUBHMoCcb06cZMt
 kfP+gLt5d3hM9u1nv4rd2pfIq09HME+L6yyyG6x38EF1gvY7Up+ckqYSTaeioVWZ
 S4lv1Wus/QFll5EZ5RIQNmA9PW58CJ7v5E3M2II82WNcqoWjhvcnjFtmaorvJ8N1
 PFqIbODjbG3WOUTe5jZnJemzSoXKeX1QhQ4nwhAPMQQpvWiheOWlgE1sAj3vnK+l
 7PUF4BnOPk0pH6nCeWY6
 =wbUI
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2015-05-15' into staging

qapi: Fix qapi mangling of downstream names, and more

# gpg: Signature made Fri May 15 17:41:31 2015 BST using RSA key ID EB918653
# gpg: Good signature from "Markus Armbruster <armbru@redhat.com>"
# gpg:                 aka "Markus Armbruster <armbru@pond.sub.org>"

* remotes/armbru/tags/pull-qapi-2015-05-15: (26 commits)
  qapi: Inline gen_command_decl_prologue(), gen_command_def_prologue()
  qapi: Drop pointless flush() before close()
  qapi: Factor open_output(), close_output() out of generators
  qapi: Turn generators' mandatory option -i into an argument
  qapi: Fix generators to report command line errors decently
  qapi: Factor parse_command_line() out of the generators
  qapi: qapi-commands.py option --type is unused, drop it
  qapi: qapi-event.py option -b does nothing, drop it
  tests: Add missing dependencies on $(qapi-py)
  qapi: Support downstream events and commands
  qapi: Support downstream alternates
  qapi: Support downstream flat unions
  qapi: Support downstream simple unions
  qapi: Support downstream structs
  qapi: Support downstream enums
  qapi: Make c_type() consistently convert qapi names
  qapi: Tidy c_type() logic
  qapi: Move camel_to_upper(), c_enum_const() to closely related code
  qapi: Use c_enum_const() in generate_alternate_qtypes()
  qapi: Simplify c_enum_const()
  ...

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-05-15 17:51:20 +01:00
Peter Maydell
99e7627a70 Per-memop alignment
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQEcBAABAgAGBQJVVPTHAAoJEK0ScMxN0Cebt0gH/i67aFKsjweF4LRsSlCm+0NO
 SFUVooPB08bw2jRIXL+znLy/N4T/anUCJSRKEV2Wp6ihXbF9mcLk2ze6pImK3Gqd
 ImvZ8tuzQ11G2evkdN+CEYtjGWJ4HEM3qAd+6Cv1Lmk3Kw1mtaebi1AXOOGi5eCB
 5sK5L4ov6++kn1UDhuDyL0vRb3gHYRMhPxTv8RayK2LjcNw5LS9mN2FT7op5ATmM
 REf2uH4+c/7kKj25n1UR5Pg+j13jgd4bTiD8iMlUBvQTMftw7Oo7ggGz/eEZRguY
 Xe1lL3s/RgZushp86H74ohjwm/TPTcOLuZ3HrVCsge34xlsl4WjDxbxN+vIw0SQ=
 =oWEZ
 -----END PGP SIGNATURE-----

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

Per-memop alignment

# gpg: Signature made Thu May 14 20:17:27 2015 BST using RSA key ID 4DD0279B
# gpg: Good signature from "Richard Henderson <rth7680@gmail.com>"
# gpg:                 aka "Richard Henderson <rth@redhat.com>"
# gpg:                 aka "Richard Henderson <rth@twiddle.net>"

* remotes/rth/tags/pull-tcg-20150514:
  tcg: Add MO_ALIGN, MO_UNALN
  tcg: Push merged memop+mmu_idx parameter to softmmu routines
  tcg: Merge memop and mmu_idx parameters to qemu_ld/st

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2015-05-15 16:02:08 +01:00
Richard Henderson
dfb3630562 tcg: Add MO_ALIGN, MO_UNALN
These modifiers control, on a per-memory-op basis, whether
unaligned memory accesses are allowed.  The default setting
reflects the target's definition of ALIGNED_ONLY.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
2015-05-14 12:15:18 -07:00
Richard Henderson
3972ef6f83 tcg: Push merged memop+mmu_idx parameter to softmmu routines
The extra information is not yet used but it is now available.
This requires minor changes through all of the tcg backends.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
2015-05-14 12:15:14 -07:00
Richard Henderson
59227d5d45 tcg: Merge memop and mmu_idx parameters to qemu_ld/st
At the tcg opcode level, not at the tcg-op.h generator level.
This requires minor changes through all of the tcg backends,
but none of the cpu translators.

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Richard Henderson <rth@twiddle.net>
2015-05-14 12:14:55 -07:00
Markus Armbruster
4180978c92 qapi: Inline gen_command_decl_prologue(), gen_command_def_prologue()
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
2015-05-14 18:41:33 +02:00
Markus Armbruster
09896d3f48 qapi: Drop pointless flush() before close()
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
2015-05-14 18:41:32 +02:00