Commit Graph

18440 Commits

Author SHA1 Message Date
Stefan Hajnoczi dd1559bb26 -----BEGIN PGP SIGNATURE-----
iQIcBAABAgAGBQJZCxOSAAoJENro4Ql1lpzlGagQAIoff4XMbbh2l5eFobcv00hn
 JdVT4u/Ie/Y1CTjOr8lhtgkKolA+cxfynlXMJN2pW8RP7W4J8Xo7SBpO84OpEKrc
 BGUmn4BSJQM6oOM5/YaITUBvfN+ZUFJMWwlBbHNTpF54jYb0y7UqbA8G/pJV8lAm
 ivo6wDrlwaOQLVs9RZWIZclVQOoCQ4VdTGwra9yKFf9BqtorSOs1BsDGvNprKLkw
 0B5aRcTfBVS1qv7C/eGqOwigmCyE8s1h+HN2FTm7FIxYWiztRBezv76Yt+sV721w
 MvXPn9XSxHqhNnml2hsyEgKMblnutdRooKbdSesgVLKFnlt290WuDCOhj02phNXx
 qj8wnJ49nt8VzuPLUON5PKDnyhJrNHr+Hw0/YlneBZvjOhBEqX9BxSMvz8t1sTYC
 eAxQXrd+pFdUzLjv1HRrLBLfh8PUPtCluKkhGDh6MznXXzEbvZEGSeVCnLqy62w7
 4gKxwinwfpod/1HFPTgfoFQBZzGzhTN7CjM6kh6PsIluTgsW0ROA2oVJSosVmv1P
 QfONhnGZJJf/yjkTjea40qHbJftBsVs9UiOHZ4PZ1QYgX4ZOj+FKaj1l5XYi6AG/
 FNWWpKtelyf/YlU2ogFiRTYY7Y9BTITfk/K4vpOMRlQ9XFLf45z6DP1PRqCKx2Ub
 fOuWoPQOHLtyeAx8lrJM
 =rxGe
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'elmarco/tags/chr-tests-pull-request' into staging

# gpg: Signature made Thu 04 May 2017 12:42:10 PM BST
# gpg:                using RSA key 0xDAE8E10975969CE5
# gpg: Good signature from "Marc-André Lureau <marcandre.lureau@redhat.com>"
# gpg:                 aka "Marc-André Lureau <marcandre.lureau@gmail.com>"
# Primary key fingerprint: 87A9 BD93 3F87 C606 D276  F62D DAE8 E109 7596 9CE5

* elmarco/tags/chr-tests-pull-request: (21 commits)
  tests: add /char/console test
  tests: add /char/udp test
  tests: add /char/socket test
  tests: add /char/file test
  tests: add /char/pipe test
  tests: add alias check in /char/ringbuf
  char-udp: flush as much buffer as possible
  char-socket: add 'connected' property
  char-socket: add 'addr' property
  char-socket: update local address after listen
  char-socket: introduce update_disconnected_filename()
  char: useless NULL check
  char: remove chardevs list
  char: remove qemu_chardev_add
  char: use /chardevs container instead of chardevs list
  vl: add todo note about root container cleanup
  char: add a /chardevs container
  container: don't leak container reference
  xen: use a better chardev type check
  mux: simplfy muxes_realize_done
  ...

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2017-05-05 17:07:55 +01:00
Stefan Hajnoczi f03f9f0c10 Basic support for using channel-attached 3270 'green-screen'
devices via tn3270. Actual handling of the data stream is
 delegated to x3270; more info at http://wiki.qemu.org/Features/3270
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJZCwRDAAoJEN7Pa5PG8C+vNvgQAK8UDFFJPWvgCMhkSfh8rPyM
 glIAlmLkowJpjqgV5UDWWB/TjUdM+8xFKLEARjtbrWvKkbqrz/8yrCop4XEYcLmz
 FGQKlKQfhoUP5vZUsuxdZ/lzUBEKnFpLfmgC68AC0jchByIsQxbaTpxTeafMHp/N
 F8dL7KS8sH+MkdPQkGevUGD68BkF1MzggWkrfmRsgLdMfS7eR4z0w3W0MT0fYuqM
 1/G+Fpc4Z7FqJE4d7mFJHYrUvQIXH9FXab/EB3yu+c3GkKNZ5MEfCaJ70ZlkpVD2
 WLvl4NS4D+TsUae1/jYP4tNoZwdf0WqFCsbdMYONEljmQ1omy0unkQ+pXDIKG/sn
 dOOpe2JGUgh8Fhjak90KC07efoKRa6IUT3CUWB4j14tDzhpjf8SbVmSVKOzLI0Rs
 vmW3BA48NHPehl+Twm9jA4n1qtC7t1ctO1Q7nCp1sN5Vo/VdArAyws9Sw6cjxKbw
 7A7ldqa+h6Rg/CWONnZQUF/dr3pLqiUpuO5yN+ofg9yntJvaMLtybhO7kMNa+k64
 SLm8NSnbLjTxfQ9md/SjUp/EmxOWcnkKXDMVYfl4LOvHYiNwW+wzQGQUP7ibapPZ
 9TZ5UYfCr7a+d7wab2HAU4SWyr+5csFz5csZKEpc9TIYkDqwbqkMpi7aUCVHij2/
 8k7mEMlnfwn4HDda88jC
 =kMb4
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'cohuck/tags/s390x-3270-20170504' into staging

Basic support for using channel-attached 3270 'green-screen'
devices via tn3270. Actual handling of the data stream is
delegated to x3270; more info at http://wiki.qemu.org/Features/3270

# gpg: Signature made Thu 04 May 2017 11:36:51 AM BST
# gpg:                using RSA key 0xDECF6B93C6F02FAF
# gpg: Good signature from "Cornelia Huck <conny@cornelia-huck.de>"
# gpg:                 aka "Cornelia Huck <cohuck@kernel.org>"
# gpg:                 aka "Cornelia Huck <cornelia.huck@de.ibm.com>"
# gpg:                 aka "Cornelia Huck <huckc@linux.vnet.ibm.com>"
# Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0  18CE DECF 6B93 C6F0 2FAF

* cohuck/tags/s390x-3270-20170504:
  s390x/3270: Mark non-migratable and enable the device
  s390x/3270: Detect for continued presence of a 3270 client
  s390x/3270: Add the TCP socket events handler for 3270
  s390x/3270: 3270 data stream handling
  s390x/3270: Add emulated terminal3270 device
  s390x/3270: Add abstract emulated ccw-attached 3270 device
  s390x/css: Add an algorithm to find a free chpid
  chardev: Basic support for TN3270

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2017-05-05 16:56:38 +01:00
Stefan Hajnoczi bc56fd3a23 audio: cleanups, bugfixes (memory leaks).
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJZCtViAAoJEEy22O7T6HE40bIP/j6kwZjDyduyGQvrc8lnVkkO
 OmApS0v0cImxHaNLTgXNYBsEfkkDaVWnIl2bcVw9JkMY7Q2r0axXFM18XjzMPvPB
 NOFddYiOv0RnmCBnsGxdv+DXAMhg32SbrC8bKFxiFVDMhpZFDyvyjX7Ou+AnTRtV
 kB/a+emLJcrZNU+eo8DOV4FjBk/BcP4IjcA5hgihPMQHf21cG9xrzZPisbd91SRk
 7vQU8uc0uuUJrGx1T7eRnKexMeLZ5citrhMpC3OLw+ESlvJthuntARbYFJMPl/s9
 DqdCfHDNKdjlIi7NO3kq0xAprxKi1lE9lgybNHGr1miOfEqAsl+0y262sQ5fHG1e
 0dXHxXXJYtwgCMIu9XydcZQLRCtxq+vglsG2dhBqYxlpH/6sxNbSfyMzxGzVgdxV
 ULHLdA+XYXUS2qS/GaKAVLiqmR018yHxGXEkd+h0xbUnY311Y6BdDAhFRrc/OGL/
 IzzGg8cRFpyWemPfiy21vqaMoF/nvD+7ayaOOjMJAHDYct596Ed1y0KMlq7ulEpi
 7yh8qWIV7D4FfKkGutxcWAoLfJ2+1mNrBFzVY4kK2OIR1XVLNA2cBfes9mRwCQjZ
 N5eXQQ6cgw8C5+aq5N1dZSCikaikjhylqRWhBukC4F1vw52q3ZpZqCxmgfthASyn
 +55StVoMMQtmmrkFYAVt
 =oBxJ
 -----END PGP SIGNATURE-----

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

audio: cleanups, bugfixes (memory leaks).

# gpg: Signature made Thu 04 May 2017 08:16:50 AM BST
# 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

* kraxel/tags/pull-audio-20170504-1: (30 commits)
  audio: Use ARRAY_SIZE from qemu/osdep.h
  audio: un-export OPLResetChip
  audio: Remove unused typedefs
  audio: UpdateHandler is not used anymore
  audio: IRQHandler is not used anymore
  audio: OPLSetUpdateHandler is not used anywhere
  audio: OPLSetIRQHandler is not used anywhere
  audio: GUSsample is int16_t
  audio: GUSword is uint16_t
  audio: GUSword is uint16_t
  audio: remove GUSchar
  audio: GUSbyte is uint8_t
  audio: Remove unused fields
  audio: Remove type field
  audio: Remove Unused OPL_TYPE_*
  audio: Unfold OPLSAMPLE
  audio: Remove INT32
  audio: remove INT16
  audio: Remove INT8
  audio: remove UINT32
  ...

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2017-05-05 16:47:16 +01:00
Stefan Hajnoczi dd76c10f9f input: limit kbd queue depth
input: don't queue delay if paused
 input: Add trace event for empty keyboard queue
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJZCsC1AAoJEEy22O7T6HE4IUMQAMmnkzlnFbhfKuTRhcVBwe7g
 vFlQku05gYmk/FcEC4gMkrqzgS9CvG8ogiHu0nwaTAPwaxU4f5g+asmTc4LVwB+U
 LGDtJ++kTRxcKr6JDl68IENr1WkF1xDlod/NgiI0H5MJjoB0WJIoP0W9hBiJfK8z
 m3Fc86AxneeyIexJyTf3hoeoCmrXx4WGVVqA1Pg0OhvYig/v5Yg7zGSZYBh0u8zF
 4rG7VZz2euyPawHa8RvOhO9ZB0GSh0KujSFGPr8QGGniL3qmDGEd5ScvMAlKoNg0
 hkH+Oymghcyy/OiYBGmb4pj/XrKmlPKN2IIvttGh00cFVmHcp8WqQXshg/aSz75A
 +ApI78enBI64uNypxvD38+DgT7EGA+1SbmOMQrlz8S1m/PlbLRS5XpcHMwqv0MrS
 Lj/6nKui5VLCFTlzCpERP2rVX1ysdH7RF+jte4MWWcindvx3QJ7yenJyqpTpvw6g
 248H899diejhIJUcPBvbf3rNGsi9H7ORCfc9g0HKetr1bg8UHyu5zVWLlN/dTCUQ
 6thHvTK1kqBKCshrIRe41Y2ikZQHak/r1983pOxddTy0SAc1mDteB9yq7uzgBKW5
 UQ8TxSGcslygPfCvXd3T+kdO0puahqZdXMcKRRvDmKH0dzlmfMfhVcmzfDSJfjGy
 kR2fKHl+lf+qW7fJynA5
 =Rzbi
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'kraxel/tags/pull-input-20170504-1' into staging

input: limit kbd queue depth
input: don't queue delay if paused
input: Add trace event for empty keyboard queue

# gpg: Signature made Thu 04 May 2017 06:48:37 AM BST
# 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

* kraxel/tags/pull-input-20170504-1:
  input: Add trace event for empty keyboard queue
  input: don't queue delay if paused
  input: limit kbd queue depth

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2017-05-05 16:31:28 +01:00
Stefan Hajnoczi 317134bb54 Openrisc Features and Fixes for qemu 2.10
-----BEGIN PGP SIGNATURE-----
 
 iQIcBAABAgAGBQJZCnjJAAoJEMOzHC1eZifkjegP/ieGXCOfRQxLkr7SzWvigjWx
 HYUCqZ55Qt2nlirKV30Y7sSxuWnHKthgAvp/9/E/d1UGuFjvao9iia0Aet3elh4B
 bq8BM3LTBTnwknHc2tgHaNyP7VHsNZkCmMsESSEO6NexjnmXIoWxqbdAQ8FdYXpN
 evzz2pa1uTLju1gu7gDe3gIUBJjqiIOTmsjIkzIj7v9IqHOYKdGlJQSnZ+AHbQJn
 nRs+uqxN8sKaAILHmteXTEL1v1xhMJGKSY212m0OnUImlJrNgjAFGHKjSD4p8+6h
 /k4msQXCjdNo5NKu/0S3N8MKYaWTdcHohe4fnevV2fgdUpljLLm0RBNwP0wWi8Gp
 SZZ4GgeKGioCuqew1OdrhUNEQ+je3o4wdNYH243vVx3AIxXKS/EVIYhjNqDQLJ9M
 HGD+zcjcplpUlZ9dOXgWXK6yff2GUORPZJw8BLnDeRxjJA0xTefaK3qA5gWqJXrY
 HahUi0G4fJNZeROaBemcQ4+nPXfz55Ti4jp4Y3l5QqzvRidSZkdEoRfrnyMYP3/C
 6RmR/iRQLjEGStKEqeqGMqhJ9Gn2aAkU+l+h4394fzS6CQulPOFZEkjobcAd2/5O
 lxXilhQOrAVlW8OIQzuGfIbuLdSFh55vurq8bwrMi8leeJ/AIbColun8PnO5E6Zd
 +1m4x+gT7IIv4QfMoerL
 =zXGN
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'shorne/tags/pull-or-20170504' into staging

Openrisc Features and Fixes for qemu 2.10

# gpg: Signature made Thu 04 May 2017 01:41:45 AM BST
# gpg:                using RSA key 0xC3B31C2D5E6627E4
# gpg: Good signature from "Stafford Horne <shorne@gmail.com>"
# 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: D9C4 7354 AEF8 6C10 3A25  EFF1 C3B3 1C2D 5E66 27E4

* shorne/tags/pull-or-20170504:
  target/openrisc: Support non-busy idle state using PMR SPR
  target/openrisc: Remove duplicate features property
  target/openrisc: Implement full vmstate serialization
  migration: Add VMSTATE_STRUCT_2DARRAY()
  target/openrisc: implement shadow registers
  migration: Add VMSTATE_UINTTL_2DARRAY()
  target/openrisc: add numcores and coreid support
  target/openrisc: Fixes for memory debugging
  target/openrisc: Implement EPH bit
  target/openrisc: Implement EVBAR register
  MAINTAINERS: Add myself as openrisc maintainer

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2017-05-05 16:21:16 +01:00
Stefan Hajnoczi 4f3652b3aa VFIO fixes 2017-05-03
- Enable 8-byte memory region accesses (Jose Ricardo Ziviani)
  - Fix vfio-pci error message (Dong Jia Shi)
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.14 (GNU/Linux)
 
 iQIcBAABAgAGBQJZCkuXAAoJECObm247sIsijr4QAIQMh2SK2ES7m0RTVNDYq/JP
 HnOxSooFSxh3KoDmBi639vZL06tx7U0YDmFiUcQKekXVVxXuQgHWoqi+vATcTpj5
 Mehp3jDFWdZlFFWrkX0ncOkPNhL1M9V+KKhdo7Il7XAhEAM9yz86zQkbbfJjgS+I
 5c0wO8OTaaTdKC8vSBAJWGwdsC7IYzOkBSCvIXeVP+6gCBT/PoBZpNMN+gsrzRkT
 InNM34Gx52e74BlPfPrVN9Bn3/VN8vbY/pxU5xnRe1KqrYcfXG6GqoR5KSEqPkDI
 QEtIEdQnqdPmhAJMvpv3XtKkEFJhWzo+mTOObsBHjgcFXrk+q4HtT1nkah55SuXX
 xhyhcRtJ4S0vVNGCERQBfdJbYcO2w3Q/7P+esF05uz3BvZ01bEqOiMGFnCG9ask2
 kZwL09Yl+TAnXhsoxvvPTzbmPHii5sd5Kjv+ggkwHF9fdYsariLclquekYpbfK7N
 H/zyZgDmMGRpg3nUVIr2+8BrKImivrl0pCs6Zr049Y6C0bS7jDIeBs5qHktNTJ4k
 ubPt35/lMZMgZ1CxMDYNjvXwOTiuk3VWcESNJcCYZWiYW/5CEu4c3f8A46VxdsQ/
 S39QelED/+uagyRPLr0NDqdXp/KUpbr9nEWuYXpfal/GpihANgYuLjiyAkD9Xqwo
 ndwv4XcEXE6HGViOdFq9
 =Kuvv
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'awilliam/tags/vfio-updates-20170503.0' into staging

VFIO fixes 2017-05-03

 - Enable 8-byte memory region accesses (Jose Ricardo Ziviani)
 - Fix vfio-pci error message (Dong Jia Shi)

# gpg: Signature made Wed 03 May 2017 10:28:55 PM BST
# gpg:                using RSA key 0x239B9B6E3BB08B22
# gpg: Good signature from "Alex Williamson <alex.williamson@redhat.com>"
# gpg:                 aka "Alex Williamson <alex@shazbot.org>"
# gpg:                 aka "Alex Williamson <alwillia@redhat.com>"
# gpg:                 aka "Alex Williamson <alex.l.williamson@gmail.com>"
# Primary key fingerprint: 42F6 C04E 540B D1A9 9E7B  8A90 239B 9B6E 3BB0 8B22

* awilliam/tags/vfio-updates-20170503.0:
  vfio/pci: Fix incorrect error message
  vfio: enable 8-byte reads/writes to vfio
  vfio: Set MemoryRegionOps:max_access_size and min_access_size

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2017-05-05 16:14:15 +01:00
Marc-André Lureau 2f5d45a150 char: add a /chardevs container
Add a /chardevs container object to hold the list of chardevs.
(Note: QTAILQ chardevs is going away in the following commits)

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
2017-05-04 15:34:41 +04:00
Marc-André Lureau 315dd72d75 xen: use a better chardev type check
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2017-05-04 15:34:41 +04:00
Jing Liu 9e8b3009b7 s390x/3270: Mark non-migratable and enable the device
Mark 3270 as non-migratable for the experimental stage. Enable
the 3270 device so that we can use x3270 client to operate the guest.

Run qemu with the arguments:
    -chardev socket,id=char3270_0,host=0.0.0.0,port=23,nowait,server,tn3270 \
    -device x-terminal3270,chardev=char3270_0,devno=fe.0.000a,id=terminal3270_0 \

There are some restrictions for the first stage: We don't support SSL
connections, multiple client connections and client resizing. Only
tested with the x3270 client.

Signed-off-by: Jing Liu <liujbjl@linux.vnet.ibm.com>
Signed-off-by: Yang Chen <bjcyang@linux.vnet.ibm.com>
Reviewed-by: QingFeng Hao <haoqf@linux.vnet.ibm.com>
Reviewed-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2017-05-04 10:34:37 +02:00
Jing Liu e65a27209c s390x/3270: Detect for continued presence of a 3270 client
To ensure that we do not keep any 3270 sockets where the client is not
connected anymore, we send a packet with the timing mark option after
ten minutes of client inactivity. If the client does not answer it,
then the socket will be closed automatically.

This helps to ensure that there is no half-open situation on the 3270
socket.

Signed-off-by: Jing Liu <liujbjl@linux.vnet.ibm.com>
Reviewed-by: QingFeng Hao <haoqf@linux.vnet.ibm.com>
Reviewed-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2017-05-04 10:34:37 +02:00
Jing Liu 4996241a4a s390x/3270: Add the TCP socket events handler for 3270
This introduces a chr_event handler to handle the 3270 connection
and disconnection events.

Signed-off-by: Jing Liu <liujbjl@linux.vnet.ibm.com>
Reviewed-by: QingFeng Hao <haoqf@linux.vnet.ibm.com>
Reviewed-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2017-05-04 10:34:37 +02:00
Jing Liu 2dc95b4cac s390x/3270: 3270 data stream handling
This introduces the input and output handlers for 3270 device, setting
up the data tunnel among guest kernel, qemu and the 3270 client.

After the client connected and TN3270 handshake done, signal the not-ready
to ready status by an unsolicited device-end interrupt, and then the 3270
data stream could be handled correctly between the channel and socket.
Multiple commands generated by "Reset" key on x3270 are not supported now,
just simply terminate the connection.

Signed-off-by: Jing Liu <liujbjl@linux.vnet.ibm.com>
Signed-off-by: Yang Chen <bjcyang@linux.vnet.ibm.com>
Reviewed-by: QingFeng Hao <haoqf@linux.vnet.ibm.com>
Reviewed-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2017-05-04 10:34:37 +02:00
Yang Chen b847620540 s390x/3270: Add emulated terminal3270 device
This is a basic implementation of the emulated ccw-attached 3270
called x-terminal3270, which provides visibility of the device in
the qemu monitor and guest. The x prefix indicates that this is
just an experimental implementation for the current stage. This
device will not be compiled until the basic functions are available.

Signed-off-by: Yang Chen <bjcyang@linux.vnet.ibm.com>
Signed-off-by: Jing Liu <liujbjl@linux.vnet.ibm.com>
Reviewed-by: QingFeng Hao <haoqf@linux.vnet.ibm.com>
Reviewed-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2017-05-04 10:34:37 +02:00
Yang Chen ff20b0a3d8 s390x/3270: Add abstract emulated ccw-attached 3270 device
This introduces the infrastructure for the emulated 3270
devices, which will be attached to the virtual-css-bus.

Signed-off-by: Yang Chen <bjcyang@linux.vnet.ibm.com>
Signed-off-by: Jing Liu <liujbjl@linux.vnet.ibm.com>
Reviewed-by: QingFeng Hao <haoqf@linux.vnet.ibm.com>
Reviewed-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2017-05-04 10:34:37 +02:00
Jing Liu 6c15e9bfb6 s390x/css: Add an algorithm to find a free chpid
This introduces a function named css_find_free_chpid() to find a
free channel path. Because virtio-ccw device used zero as its
channel path number, it would be sensible to skip the reserved one
and search upwards.

Signed-off-by: Jing Liu <liujbjl@linux.vnet.ibm.com>
Reviewed-by: QingFeng Hao <haoqf@linux.vnet.ibm.com>
Reviewed-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2017-05-04 10:34:37 +02:00
Juan Quintela 9ea5ada76f audio: Use ARRAY_SIZE from qemu/osdep.h
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20170425223739.6703-27-quintela@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-04 09:16:05 +02:00
Juan Quintela d52ccc0eca audio: un-export OPLResetChip
Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20170425223739.6703-26-quintela@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-04 09:16:05 +02:00
Juan Quintela 3fab7b675a audio: Remove unused typedefs
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-id: 20170425223739.6703-25-quintela@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-04 09:16:05 +02:00
Juan Quintela b3b40917c7 audio: UpdateHandler is not used anymore
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-id: 20170425223739.6703-24-quintela@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-04 09:16:05 +02:00
Juan Quintela e14e09c945 audio: IRQHandler is not used anymore
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-id: 20170425223739.6703-23-quintela@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-04 09:16:05 +02:00
Juan Quintela ade339896b audio: OPLSetUpdateHandler is not used anywhere
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-id: 20170425223739.6703-22-quintela@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-04 09:16:05 +02:00
Juan Quintela 17a1694a56 audio: OPLSetIRQHandler is not used anywhere
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-id: 20170425223739.6703-21-quintela@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-04 09:16:05 +02:00
Juan Quintela 135f5ae197 audio: GUSsample is int16_t
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-id: 20170425223739.6703-20-quintela@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-04 09:16:05 +02:00
Juan Quintela 4bf7792aae audio: GUSword is uint16_t
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-id: 20170425223739.6703-19-quintela@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-04 09:16:05 +02:00
Juan Quintela 1c742f2b8e audio: GUSword is uint16_t
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-id: 20170425223739.6703-18-quintela@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-04 09:16:04 +02:00
Juan Quintela 222e0356fa audio: remove GUSchar
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-id: 20170425223739.6703-17-quintela@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-04 09:16:04 +02:00
Juan Quintela 0af81c56bf audio: GUSbyte is uint8_t
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-id: 20170425223739.6703-16-quintela@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-04 09:16:04 +02:00
Juan Quintela 9887e22155 audio: Remove unused fields
These were used for the remove stuff.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-id: 20170425223739.6703-15-quintela@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-04 09:16:04 +02:00
Juan Quintela 8f7e2c2cb7 audio: Remove type field
It was not used anymore as now there is only one type of devices.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-id: 20170425223739.6703-14-quintela@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-04 09:16:04 +02:00
Juan Quintela 7852b53acc audio: Remove Unused OPL_TYPE_*
Since we removed the previous unused devices, they are not used anymore.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-id: 20170425223739.6703-13-quintela@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-04 09:16:04 +02:00
Juan Quintela 8ec734d027 audio: Unfold OPLSAMPLE
It was used only once, and now it was always int16_t.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-id: 20170425223739.6703-12-quintela@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-04 09:16:04 +02:00
Juan Quintela 7f643fb53a audio: Remove INT32
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-id: 20170425223739.6703-11-quintela@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-04 09:16:04 +02:00
Juan Quintela 7bf10b1de2 audio: remove INT16
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-id: 20170425223739.6703-10-quintela@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-04 09:16:04 +02:00
Juan Quintela d2a4a01fa4 audio: Remove INT8
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-id: 20170425223739.6703-9-quintela@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-04 09:16:04 +02:00
Juan Quintela 3795f18095 audio: remove UINT32
Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-id: 20170425223739.6703-8-quintela@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-04 09:16:03 +02:00
Juan Quintela d8586afd8b audio: remove UINT16
More modernitation.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-id: 20170425223739.6703-7-quintela@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-04 09:16:03 +02:00
Juan Quintela 4a796e979e audio: Remove UINT8
uint8_t has existed since ..... all this century?

Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-id: 20170425223739.6703-6-quintela@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-04 09:16:03 +02:00
Juan Quintela 882ab9d615 audio: YM3812 was always defined
So, remove the ifdefs.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-id: 20170425223739.6703-5-quintela@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-04 09:16:03 +02:00
Juan Quintela 2004429e9b audio: Remove YM3526 support
It was never compiled in.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-id: 20170425223739.6703-4-quintela@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-04 09:16:03 +02:00
Juan Quintela b6c6919e21 audio: remove Y8950 configuration
Include file has never been on qemu and it has been undefined from the very beginning.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-id: 20170425223739.6703-3-quintela@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-04 09:16:03 +02:00
Juan Quintela 68883a4078 adlib: Remove support for YMF262
Notice that the code was supposed to be in the file ymf262.h, that has
never been on qemu source tree.

Signed-off-by: Juan Quintela <quintela@redhat.com>
Message-id: 20170425223739.6703-2-quintela@redhat.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-04 09:16:03 +02:00
Zihan Yang 5eaa8e1e0f hw/audio: convert exit callback in HDACodecDeviceClass to void
The exit callback always return 0, convert it to void

Signed-off-by: Zihan Yang <tgnyang@gmail.com>
Message-id: 1493211188-24086-5-git-send-email-tgnyang@gmail.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-04 08:29:01 +02:00
Zihan Yang 8ac5535145 hw/audio: replace exit with unrealize in hda_codec_device_class_init
The exit callback of DeviceClass will be removed in the future, so
convert to unrealize in the init functioin

Signed-off-by: Zihan Yang <tgnyang@gmail.com>
Message-id: 1493211188-24086-4-git-send-email-tgnyang@gmail.com
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-04 08:29:01 +02:00
Stafford Horne f4d1414a93 target/openrisc: Support non-busy idle state using PMR SPR
The OpenRISC architecture has the Power Management Register (PMR)
special purpose register to manage cpu power states.  The interesting
modes are:

 * Doze Mode (DME) - Stop cpu except timer & pic - wake on interrupt
 * Sleep Mode (SME) - Stop cpu and all units - wake on interrupt
 * Suspend Model (SUME) - Stop cpu and all units - wake on reset

The linux kernel will set DME when idle.

This patch implements the PMR SPR and halts the qemu cpu when there is a
change to DME or SME.  This means that openrisc qemu in no longer peggs
a host cpu at 100%.

In order for this to work we need to kick the CPU when timers are
expired.  Update the cpu timer to kick the cpu upon each timer event.

Reviewed-by: Richard Henderson <rth@twiddle.net>
Signed-off-by: Stafford Horne <shorne@gmail.com>
2017-05-04 09:39:14 +09:00
Dong Jia Shi 6e4e6f0d40 vfio/pci: Fix incorrect error message
When the "No host device provided" error occurs, the hint message
that starts with "Use -vfio-pci," makes no sense, since "-vfio-pci"
is not a valid command line parameter.

Correct this by replacing "-vfio-pci" with "-device vfio-pci".

Signed-off-by: Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2017-05-03 14:52:35 -06:00
Jose Ricardo Ziviani 38d49e8c15 vfio: enable 8-byte reads/writes to vfio
This patch enables 8-byte writes and reads to VFIO. Such implemention
is already done but it's missing the 'case' to handle such accesses in
both vfio_region_write and vfio_region_read and the MemoryRegionOps:
impl.max_access_size and impl.min_access_size.

After this patch, 8-byte writes such as:

qemu_mutex_lock locked mutex 0x10905ad8
vfio_region_write  (0001:03:00.0:region1+0xc0, 0x4140c, 4)
vfio_region_write  (0001:03:00.0:region1+0xc4, 0xa0000, 4)
qemu_mutex_unlock unlocked mutex 0x10905ad8

goes like this:

qemu_mutex_lock locked mutex 0x10905ad8
vfio_region_write  (0001:03:00.0:region1+0xc0, 0xbfd0008, 8)
qemu_mutex_unlock unlocked mutex 0x10905ad8

Signed-off-by: Jose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2017-05-03 14:52:34 -06:00
Jose Ricardo Ziviani 15126cba86 vfio: Set MemoryRegionOps:max_access_size and min_access_size
Sets valid.max_access_size and valid.min_access_size to ensure safe
8-byte accesses to vfio. Today, 8-byte accesses are broken into pairs
of 4-byte calls that goes unprotected:

qemu_mutex_lock locked mutex 0x10905ad8
  vfio_region_write  (0001:03:00.0:region1+0xc0, 0x2020c, 4)
qemu_mutex_unlock unlocked mutex 0x10905ad8
qemu_mutex_lock locked mutex 0x10905ad8
  vfio_region_write  (0001:03:00.0:region1+0xc4, 0xa0000, 4)
qemu_mutex_unlock unlocked mutex 0x10905ad8

which occasionally leads to:

qemu_mutex_lock locked mutex 0x10905ad8
  vfio_region_write  (0001:03:00.0:region1+0xc0, 0x2030c, 4)
qemu_mutex_unlock unlocked mutex 0x10905ad8
qemu_mutex_lock locked mutex 0x10905ad8
  vfio_region_write  (0001:03:00.0:region1+0xc0, 0x1000c, 4)
qemu_mutex_unlock unlocked mutex 0x10905ad8
qemu_mutex_lock locked mutex 0x10905ad8
  vfio_region_write  (0001:03:00.0:region1+0xc4, 0xb0000, 4)
qemu_mutex_unlock unlocked mutex 0x10905ad8
qemu_mutex_lock locked mutex 0x10905ad8
  vfio_region_write  (0001:03:00.0:region1+0xc4, 0xa0000, 4)
qemu_mutex_unlock unlocked mutex 0x10905ad8

causing strange errors in guest OS. With this patch, such accesses
are protected by the same lock guard:

qemu_mutex_lock locked mutex 0x10905ad8
vfio_region_write  (0001:03:00.0:region1+0xc0, 0x2000c, 4)
vfio_region_write  (0001:03:00.0:region1+0xc4, 0xb0000, 4)
qemu_mutex_unlock unlocked mutex 0x10905ad8

This happens because the 8-byte write should be broken into 4-byte
writes by memory.c:access_with_adjusted_size() in order to be under
the same lock. Today, it's done in exec.c:address_space_write_continue()
which was able to handle only 4 bytes due to a zero'ed
valid.max_access_size (see exec.c:memory_access_size()).

Signed-off-by: Jose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
2017-05-03 14:52:34 -06:00
Alexander Graf 2222e0a633 input: Add trace event for empty keyboard queue
When driving QEMU from the outside, we have basically no chance to
determine how quickly the guest OS picks up key events, so we usually
have to limit ourselves to very slow keyboard presses to make sure
the guest always has enough chance to pick them up.

This patch adds a trace events when the keyboarde queue is drained.
An external driver can use that as hint that new keys can be pressed.

Signed-off-by: Alexander Graf <agraf@suse.de>
Message-id: 1490883775-94658-1-git-send-email-agraf@suse.de
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2017-05-03 14:20:12 +02:00
Thomas Huth 99efaa2696 hw/s390x/ipl: Fix crash with virtio-scsi-pci device
qemu-system-s390x currently crashes when it is started with a
virtio-scsi-pci device, e.g.:

 qemu-system-s390x -nographic -enable-kvm -device virtio-scsi-pci \
                   -drive file=/tmp/disk.dat,if=none,id=d1,format=raw \
                   -device scsi-cd,drive=d1,bootindex=1

The problem is that the code in s390_gen_initial_iplb() currently assumes
that all SCSI devices are also CCW devices, which is not the case for
virtio-scsi-pci of course. Fix it by adding an appropriate check for
TYPE_CCW_DEVICE here.

Signed-off-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Message-Id: <1493126327-13162-1-git-send-email-thuth@redhat.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2017-05-02 15:08:54 +02:00
Farhan Ali b038411d85 hw/s390x/sclp: update LOADPARM in SCP Info
LOADPARM has two copies:
1. in SCP Information Block
2. in IPL Information Parameter Block

So, update SCLP intrinsics now. We always store LOADPARM in SCP
information block even if we don't have a valid IPL Information
Parameter Block.

Initial patch from Eugene (jno) Dvurechenski.

Signed-off-by: Eugene (jno) Dvurechenski <jno@linux.vnet.ibm.com>
Signed-off-by: Farhan Ali <alifm@linux.vnet.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cornelia.huck@de.ibm.com>
2017-05-02 15:08:54 +02:00