Commit Graph

68372 Commits (4158e93f4aced247c8db94a0275fc027da7dc97e)

Author SHA1 Message Date
Roger Pau Monne 4158e93f4a xen-mapcache: use MAP_FIXED flag so the mmap address hint is always honored
Or if it's not possible to honor the hinted address an error is returned
instead. This makes it easier to spot the actual failure, instead of
failing later on when the caller of xen_remap_bucket realizes the
mapping has not been created at the requested address.

Also note that at least on FreeBSD using MAP_FIXED will cause mmap to
try harder to honor the passed address.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Paul Durrant <paul.durrant@citrix.com>
Acked-by: Anthony PERARD <anthony.perard@citrix.com>
Reviewed-by: Igor Druzhinin <igor.druzhinin@cirtix.com>
Message-Id: <20190318173731.14494-1-roger.pau@citrix.com>
Signed-off-by: Anthony PERARD <anthony.perard@citrix.com>
2019-03-19 15:32:13 +00:00
Peter Maydell b98a66201d RISC-V Patches for 4.0-rc0, Part 2
This patch set contains three major sources of bug fixes:
 
 * Jim has added support for GDB XML files, as well as fixing access to
   CSRs via the GDB stub.
 * Alistair has rebased a large set of fixes from Michael that were still
   in his patch queue.  These fix bugs all over our tree, including:
     * Logging of PMP errors.
     * User ABI cleanups and fixes, most notably on RVE guests.
     * Fixes for interrupt emulation fidelity.
     * Improvements to the emulation fidelity of the sifive_u machine.
 * Bin Meng has improved the emulation fidelity of the SiFive UART, which
   now supports both TX and RX interrupts (as well as setting the correct
   interrupt line).
 -----BEGIN PGP SIGNATURE-----
 
 iQJHBAABCAAxFiEEAM520YNJYN/OiG3470yhUCzLq0EFAlyQ46MTHHBhbG1lckBk
 YWJiZWx0LmNvbQAKCRDvTKFQLMurQT7CEACDhwOw5Xmp5OBUrZWBUG84nURt8yNG
 WJ4hPfyc765xVJ8FHPlRR5s1mAIF9232LfV/sBnAtlNnl1pRbyckPuOFxLUjPpjK
 DLY83z3zJgVhsTCa7oBGd2WSJG6YQ+uSS/g8MomtVUjU34qZliF0nX5HeLUmj/EY
 2AAge+vYUj7+5aQh5pveRaC4F7aZ4hukowPsDTknUo8EpAR25DTtHIjfxxdo4ONQ
 8gWxGsg/QpaJPyIw4fw5yBn1D49hq8+3VNaBNv+Lajq6BLl/esIIrCawvp90EGUx
 QeIm7Sws1vVaeOIYmrjLjChRveS4xxV7fjScZZ4IlhMqY0yQU7nNfcRkefsS0EoE
 0TKEQxkNMLfJcB7SEL6FtbnPTfzz4nyouA9D4feZaLh6cgRXj77LyoO54kKRxugX
 m1+VOd0VT34VM1QaXIy6fYXod6GdXw5mAnSQsfIAKSk9/0fOzeafMBj5gAZuf7jI
 YWEKwXZOmENXehTXRvVDQh2A4j5tBXP9T2K3iSVktcxjc7/3a4vQAJZMudpYmLSx
 sKYTBSF2bQ379fZUoEU6B+7AwBSf7VT/WqOqf2GC/IJ/dmpxzZY7bq4G9lqodhGl
 zYgVOqAVJHjfEHSXaMICvAb+/mK6EGIw77xvHUZ3RPFWjaTrMHBifogzQMQ5+ZWD
 V3JBczHO9VrviA==
 =365E
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/palmer/tags/riscv-for-master-4.0-rc0-2' into staging

RISC-V Patches for 4.0-rc0, Part 2

This patch set contains three major sources of bug fixes:

* Jim has added support for GDB XML files, as well as fixing access to
  CSRs via the GDB stub.
* Alistair has rebased a large set of fixes from Michael that were still
  in his patch queue.  These fix bugs all over our tree, including:
    * Logging of PMP errors.
    * User ABI cleanups and fixes, most notably on RVE guests.
    * Fixes for interrupt emulation fidelity.
    * Improvements to the emulation fidelity of the sifive_u machine.
* Bin Meng has improved the emulation fidelity of the SiFive UART, which
  now supports both TX and RX interrupts (as well as setting the correct
  interrupt line).

# gpg: Signature made Tue 19 Mar 2019 12:42:11 GMT
# gpg:                using RSA key 00CE76D1834960DFCE886DF8EF4CA1502CCBAB41
# gpg:                issuer "palmer@dabbelt.com"
# gpg: Good signature from "Palmer Dabbelt <palmer@dabbelt.com>" [unknown]
# gpg:                 aka "Palmer Dabbelt <palmer@sifive.com>" [unknown]
# 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: 00CE 76D1 8349 60DF CE88  6DF8 EF4C A150 2CCB AB41

* remotes/palmer/tags/riscv-for-master-4.0-rc0-2:
  riscv: sifive_u: Correct UART0's IRQ in the device tree
  riscv: sifive_uart: Generate TX interrupt
  target/riscv: Remove unused struct
  riscv: sifive_u: Allow up to 4 CPUs to be created
  RISC-V: Update load reservation comment in do_interrupt
  RISC-V: Convert trap debugging to trace events
  RISC-V: Add support for vectored interrupts
  RISC-V: Change local interrupts from edge to level
  RISC-V: linux-user support for RVE ABI
  elf: Add RISC-V PSABI ELF header defines
  RISC-V: Remove unnecessary disassembler constraints
  RISC-V: Allow interrupt controllers to claim interrupts
  RISC-V: Replace __builtin_popcount with ctpop8 in PLIC
  riscv: pmp: Log pmp access errors as guest errors
  RISC-V: Add hooks to use the gdb xml files.
  RISC-V: Add debug support for accessing CSRs.
  RISC-V: Fixes to CSR_* register macros.
  RISC-V: Add 64-bit gdb xml files.
  RISC-V: Add 32-bit gdb xml files.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-03-19 12:55:02 +00:00
Bin Meng a9ec1c76d5
riscv: sifive_u: Correct UART0's IRQ in the device tree
The UART0's interrupt vector is wrongly set to 1 in the device tree.
Use SIFIVE_U_UART0_IRQ instead.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
2019-03-19 05:18:42 -07:00
Bin Meng 4e85ea82c1
riscv: sifive_uart: Generate TX interrupt
At present the sifive uart model only generates RX interrupt. This
updates it to generate TX interrupt so that it is more useful.

Note the TX fifo is still unimplemented.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
2019-03-19 05:18:28 -07:00
Alistair Francis 6b745d4fad
target/riscv: Remove unused struct
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
2019-03-19 05:14:40 -07:00
Alistair Francis 8b1d0714bf
riscv: sifive_u: Allow up to 4 CPUs to be created
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
2019-03-19 05:14:40 -07:00
Michael Clark d9360e9688
RISC-V: Update load reservation comment in do_interrupt
Cc: Palmer Dabbelt <palmer@sifive.com>
Cc: Alistair Francis <Alistair.Francis@wdc.com>
Signed-off-by: Michael Clark <mjc@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
2019-03-19 05:14:40 -07:00
Michael Clark 929f0a7fc4
RISC-V: Convert trap debugging to trace events
Cc: Palmer Dabbelt <palmer@sifive.com>
Cc: Alistair Francis <Alistair.Francis@wdc.com>
Signed-off-by: Michael Clark <mjc@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
2019-03-19 05:14:40 -07:00
Michael Clark acbbb94e57
RISC-V: Add support for vectored interrupts
If vectored interrupts are enabled (bits[1:0]
of mtvec/stvec == 1) then use the following
logic for trap entry address calculation:

 pc = mtvec + cause * 4

In addition to adding support for vectored interrupts
this patch simplifies the interrupt delivery logic
by making sync/async cause decoding and encoding
steps distinct.

The cause code and the sign bit indicating sync/async
is split at the beginning of the function and fixed
cause is renamed to cause. The MSB setting for async
traps is delayed until setting mcause/scause to allow
redundant variables to be eliminated. Some variables
are renamed for conciseness and moved so that decls
are at the start of the block.

Cc: Palmer Dabbelt <palmer@sifive.com>
Cc: Alistair Francis <Alistair.Francis@wdc.com>
Signed-off-by: Michael Clark <mjc@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
2019-03-19 05:14:39 -07:00
Michael Clark d26f5a4234
RISC-V: Change local interrupts from edge to level
This effectively changes riscv_cpu_update_mip
from edge to level. i.e. cpu_interrupt or
cpu_reset_interrupt are called regardless of
the current interrupt level.

Fixes WFI doesn't return when a IPI is issued:

- https://github.com/riscv/riscv-qemu/issues/132

To test:

1) Apply RISC-V Linux CPU hotplug patch:

- http://lists.infradead.org/pipermail/linux-riscv/2018-May/000603.html

2) Enable CONFIG_CPU_HOTPLUG in linux .config

3) Try to offline and online cpus:

  echo 1 > /sys/devices/system/cpu/cpu2/online
  echo 0 > /sys/devices/system/cpu/cpu2/online
  echo 1 > /sys/devices/system/cpu/cpu2/online

Reported-by: Atish Patra <atishp04@gmail.com>
Cc: Atish Patra <atishp04@gmail.com>
Cc: Alistair Francis <Alistair.Francis@wdc.com>
Signed-off-by: Michael Clark <mjc@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
2019-03-19 05:14:39 -07:00
Kito Cheng 5836c3ecce
RISC-V: linux-user support for RVE ABI
This change checks elf_flags for EF_RISCV_RVE and if
present uses the RVE linux syscall ABI which uses t0
for the syscall number instead of a7.

Warn and exit if a non-RVE ABI binary is run on a
cpu with the RVE extension as it is incompatible.

Cc: Palmer Dabbelt <palmer@sifive.com>
Cc: Sagar Karandikar <sagark@eecs.berkeley.edu>
Cc: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Cc: Alistair Francis <Alistair.Francis@wdc.com>
Co-authored-by: Kito Cheng <kito.cheng@gmail.com>
Co-authored-by: Michael Clark <mjc@sifive.com>
Signed-off-by: Michael Clark <mjc@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
2019-03-19 05:14:39 -07:00
Michael Clark c02b78c7b4
elf: Add RISC-V PSABI ELF header defines
Refer to the RISC-V PSABI specification for details:

- https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md

Cc: Michael Tokarev <mjt@tls.msk.ru>
Cc: Richard Henderson <richard.henderson@linaro.org>
Cc: Alistair Francis <Alistair.Francis@wdc.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Signed-off-by: Michael Clark <mjc@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
2019-03-19 05:14:39 -07:00
Michael Clark c124c15242
RISC-V: Remove unnecessary disassembler constraints
Remove machine generated constraints that are not
referenced by the pseudo-instruction constraints.

Cc: Palmer Dabbelt <palmer@sifive.com>
Cc: Sagar Karandikar <sagark@eecs.berkeley.edu>
Cc: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Cc: Alistair Francis <Alistair.Francis@wdc.com>
Signed-off-by: Michael Clark <mjc@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
2019-03-19 05:14:39 -07:00
Michael Clark e3e7039cc2
RISC-V: Allow interrupt controllers to claim interrupts
We can't allow the supervisor to control SEIP as this would allow the
supervisor to clear a pending external interrupt which will result in
lost a interrupt in the case a PLIC is attached. The SEIP bit must be
hardware controlled when a PLIC is attached.

This logic was previously hard-coded so SEIP was always masked even
if no PLIC was attached. This patch adds riscv_cpu_claim_interrupts
so that the PLIC can register control of SEIP. In the case of models
without a PLIC (spike), the SEIP bit remains software controlled.

This interface allows for hardware control of supervisor timer and
software interrupts by other interrupt controller models.

Cc: Palmer Dabbelt <palmer@sifive.com>
Cc: Sagar Karandikar <sagark@eecs.berkeley.edu>
Cc: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Cc: Alistair Francis <Alistair.Francis@wdc.com>
Signed-off-by: Michael Clark <mjc@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
2019-03-19 05:14:39 -07:00
Michael Clark 244df42133
RISC-V: Replace __builtin_popcount with ctpop8 in PLIC
The mode variable only uses the lower 4-bits (M,H,S,U) so
replace the GCC specific __builtin_popcount with ctpop8.

Cc: Palmer Dabbelt <palmer@sifive.com>
Cc: Sagar Karandikar <sagark@eecs.berkeley.edu>
Cc: Bastian Koppelmann <kbastian@mail.uni-paderborn.de>
Cc: Alistair Francis <Alistair.Francis@wdc.com>
Signed-off-by: Michael Clark <mjc@sifive.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
2019-03-19 05:14:38 -07:00
Alistair Francis aad5ac2311
riscv: pmp: Log pmp access errors as guest errors
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
2019-03-19 05:14:38 -07:00
Jim Wilson 5371f5cd71
RISC-V: Add hooks to use the gdb xml files.
The gdb CSR xml file has registers in documentation order, not numerical
order, so we need a table to map the register numbers.  This also adds
fairly standard gdb hooks to access xml specified registers.

notice:
    The fpu xml from gdb 8.3 has unused register #, 65 and make first
    csr register # become 69. We register extra register on gdb to correct
    csr offset calculation

Signed-off-by: Jim Wilson <jimw@sifive.com>
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
2019-03-19 05:13:24 -07:00
Jim Wilson 753e3fe207
RISC-V: Add debug support for accessing CSRs.
Add a debugger field to CPURISCVState.  Add riscv_csrrw_debug function
to set it.  Disable mode checks when debugger field true.

Signed-off-by: Jim Wilson <jimw@sifive.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20190212230903.9215-1-jimw@sifive.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
2019-03-19 05:13:24 -07:00
Jim Wilson 8e73df6aa3
RISC-V: Fixes to CSR_* register macros.
This adds some missing CSR_* register macros, and documents some as being
priv v1.9.1 specific.

Signed-off-by: Jim Wilson <jimw@sifive.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20190212230830.9160-1-jimw@sifive.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
2019-03-19 05:13:24 -07:00
Jim Wilson c670970dc0
RISC-V: Add 64-bit gdb xml files.
Signed-off-by: Jim Wilson <jimw@sifive.com>
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
2019-03-19 05:13:24 -07:00
Jim Wilson 1a987a1d5f
RISC-V: Add 32-bit gdb xml files.
Signed-off-by: Jim Wilson <jimw@sifive.com>
Signed-off-by: Chih-Min Chao <chihmin.chao@sifive.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
2019-03-19 05:13:24 -07:00
Peter Maydell 86e2fca2d7 ppc patch queue for 2019-03-19
This is a small set, it has a number of fixes and a couple of minor
 cleanups to go in for the hard freeze.
 -----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEdfRlhq5hpmzETofcbDjKyiDZs5IFAlyQvvwACgkQbDjKyiDZ
 s5J7QhAAs6PgC5BsI+pU+ZqBrliRUQ52FO0yJiZ/vidqocDvhqZP43hsb0+9kTLX
 +MItyBOBF6514r5EIVfhUPtW0AIkXP7SQ6/9KI231/KuWIKBcPEFPdR1NwIovR5m
 6xs3r9Twt9jGTdtMnrmD4xpLwSf9ZBPkqBcI+Bkf4mF/zMoKDz1oMGtS3wzwLqDa
 0I3n3z8Sowx/HRBKFQBG+B86uvoMVJbRSxwNu8rsViTlnUXF+27hvMjCfpvQnCxd
 AzD/viduvOqdLUclqxNX+jMGyfjx830y5Mh50HXQZ4fY1hfH7cp+vSb1+rO+QnFP
 kPAb46gZmKJfa6/AOjOrMRUi5DHH20+Xayi7BJswGgBZJZnhRN/S4n2NEdpSxcY7
 G4wyY138SNy3WE3p3PW7/otXFNRHeoW0NMLgcApE5ZGaYvVTvK39SwOKonZwsfco
 leTbDd57/WitqhVKSXqdnCvWkGd5cKqAITwG/FfiBBL+EyfBOeRuyHoUKXeFZt11
 N8iw44ZrmAIrsZyH/DMuux/ZP9oTDewNd4uNwPev/mzg0EE+KOaGL3c/OJpOKkne
 HwwGr4JMPOs0Jbu/xRYHwoANbqTUnXrd9U87uNHD3QtmfEA7plGg9IGVm5ZSUpmh
 GpVcilPyKr7AmuWxxVPhhqo2XldpUWgIjY8IZMQ+jeqP/Cj3JWE=
 =Hsqd
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-4.0-20190319' into staging

ppc patch queue for 2019-03-19

This is a small set, it has a number of fixes and a couple of minor
cleanups to go in for the hard freeze.

# gpg: Signature made Tue 19 Mar 2019 10:05:48 GMT
# gpg:                using RSA key 75F46586AE61A66CC44E87DC6C38CACA20D9B392
# gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" [full]
# gpg:                 aka "David Gibson (Red Hat) <dgibson@redhat.com>" [full]
# gpg:                 aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" [full]
# gpg:                 aka "David Gibson (kernel.org) <dwg@kernel.org>" [unknown]
# Primary key fingerprint: 75F4 6586 AE61 A66C C44E  87DC 6C38 CACA 20D9 B392

* remotes/dgibson/tags/ppc-for-4.0-20190319:
  spapr: Remove NULL checks on error_propagate() calls
  ppc/xics/spapr: Fix H_IPOLL implementation
  ppc/pnv: Fix variable size in pnv_psi_power9_irq_set()
  ppc/pnv: Use local_err variable in pnv_chip_power9_intc_create()
  MAINTAINERS: PPC: add a PowerNV machine entry
  ppc/pnv: update skiboot to commit 261ca8e779e5.
  spapr: Correctly set LPCR[GTSE] in H_REGISTER_PROCESS_TABLE

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-03-19 10:52:45 +00:00
Peter Maydell 54281eefc2 qemu-ga patch queue for 4.0
* fix w32 build breakages with VSS enabled
 * fix PCI topology reporting for Windows
 * fix OS version reporting for Windows
 * add systemd info to qga schema documentation
 * add proper 'id' handling to QGA so it conforms to QMP spec
 -----BEGIN PGP SIGNATURE-----
 
 iQFOBAABCgA4FiEEzqzJ4VU066u4LT+gM1PJzvEItYQFAlyPxVAaHG1kcm90aEBs
 aW51eC52bmV0LmlibS5jb20ACgkQM1PJzvEItYTUegf+NTCVX15dKrOTgXfbh9A8
 CTnSY+1qj3oOW/z9obvAto6Dgq/BUefC18fKSxWMgtcaMQcH8rTQXQRYuw7b9TKP
 rLoBa/AmSsJqjl/X6b9IVnFwpoqZzmyjsvjbcSh5RUMy0dMg3DridQQGmu0vduFk
 TAoL5eeFup/dbdKOIqUBCv3b0X3eCYMYRrwMkIX1GLaWaC/Gb3gasXDdKSi39E00
 sgJSsnXbsepOpht9BA74CpgVaawUsFfq/RiRQbUgLSNt+4AqkTVsVN2WkmcxN/MA
 Zgmwvl0jsuf1l0jO3aUFAK9uUDTB8oYqF0oCiun3nK2eqF4CLb+PG9DTjk8vycLA
 vA==
 =IICQ
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/mdroth/tags/qga-pull-2019-03-18-tag' into staging

qemu-ga patch queue for 4.0

* fix w32 build breakages with VSS enabled
* fix PCI topology reporting for Windows
* fix OS version reporting for Windows
* add systemd info to qga schema documentation
* add proper 'id' handling to QGA so it conforms to QMP spec

# gpg: Signature made Mon 18 Mar 2019 16:20:32 GMT
# gpg:                using RSA key CEACC9E15534EBABB82D3FA03353C9CEF108B584
# gpg:                issuer "mdroth@linux.vnet.ibm.com"
# gpg: Good signature from "Michael Roth <flukshun@gmail.com>" [full]
# gpg:                 aka "Michael Roth <mdroth@utexas.edu>" [full]
# gpg:                 aka "Michael Roth <mdroth@linux.vnet.ibm.com>" [full]
# Primary key fingerprint: CEAC C9E1 5534 EBAB B82D  3FA0 3353 C9CE F108 B584

* remotes/mdroth/tags/qga-pull-2019-03-18-tag:
  qmp: common 'id' handling & make QGA conform to QMP spec
  qga: process_event() simplification
  qga: Fix guest-get-fsinfo PCI address collection in Windows
  qga-win: fix VSS build breakage due to unintended gnu99 C++ flag
  qga-win: include glib when building VSS DLL
  qga-win: Adding support for Windows Server 2019 get-osinfo command
  qga: update docs with systemd suspend support info

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-03-19 09:53:29 +00:00
Markus Armbruster e366d181ce spapr: Remove NULL checks on error_propagate() calls
Patch created mechanically by rerunning:

  $  spatch --sp-file scripts/coccinelle/error_propagate_null.cocci \
	    --macro-file scripts/cocci-macro-file.h \
	    --dir . --in-place

Signed-off-by: Markus Armbruster <armbru@redhat.com>
Message-Id: <20190318190148.18283-1-armbru@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-03-19 15:24:15 +11:00
Benjamin Herrenschmidt ebc184be64 ppc/xics/spapr: Fix H_IPOLL implementation
H_IPOLL takes the CPU# of the processor to poll as an argument,
it doesn't operate on self.

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20190314063855.27890-1-clg@kaod.org>
Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-03-19 15:20:14 +11:00
Greg Kurz f3e971ac9b ppc/pnv: Fix variable size in pnv_psi_power9_irq_set()
PSI registers are 64-bit.

Spotted by Coverity: CID 1399704

Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <155248884690.893204.5428179144527749023.stgit@bahia.lan>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-03-19 15:20:14 +11:00
Greg Kurz 26aa5b1eeb ppc/pnv: Use local_err variable in pnv_chip_power9_intc_create()
Detected by Coverity: CID 1399702

Signed-off-by: Greg Kurz <groug@kaod.org>
Message-Id: <155248884129.893204.2293309859485638162.stgit@bahia.lan>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-03-19 15:20:14 +11:00
Cédric Le Goater 1af82d4f28 MAINTAINERS: PPC: add a PowerNV machine entry
and declare David and myself as maintainers of the PPC PowerNV
(Non-Virtualized) machine using the OPAL (skiboot) firmware.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Greg Kurz <groug@kaod.org>
Message-Id: <20190313162423.22081-1-clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-03-19 15:20:14 +11:00
Cédric Le Goater 1a7c00bb3a ppc/pnv: update skiboot to commit 261ca8e779e5.
It includes better support for POWER9 processor and the QEMU platform.
DD1.0 workarounds have been removed which simplifies a bit the XIVE
PowerNV model.

Built from submodule.

Signed-off-by: Cédric Le Goater <clg@kaod.org>
Message-Id: <20190310175338.22266-1-clg@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2019-03-19 15:20:14 +11:00
David Gibson 49e9fdd741 spapr: Correctly set LPCR[GTSE] in H_REGISTER_PROCESS_TABLE
176dccee "target/ppc/spapr: Clear partition table entry when allocating
hash table" reworked the H_REGISTER_PROCESS_TABLE hypercall, but
unfortunately due to a small error no longer correctly sets the LPCR[GTSE]
bit which allows the guest to directly execute (some types of) tlbie (TLB
flush) instructions without involving the hypervisor.

We got away with this, initially, because POWER9 did not have hypervisor
mode enabled in its msr_mask, which meant we didn't actually run hypervisor
privilege checks in TCG at all.  However, da874d90 "target/ppc: add HV
support for POWER9" turned on HV support on POWER9 for the benefit of the
powernv machine type.

This exposed the earlier bug in H_REGISTER_PROCESS_TABLE, and causes guests
which rely on LPCR[GTSE] (i.e. basically all of them) to crash during early
boot when their first tlbie instruction causes an unexpected trap.

Fixes: 176dccee target/ppc/spapr: Clear partition table entry when allocating hash table
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Reviewed-by: Greg Kurz <groug@kaod.org>
Tested-by: Cleber Rosa <crosa@redhat.com>
2019-03-19 15:20:14 +11:00
Marc-André Lureau 4eaca8de26 qmp: common 'id' handling & make QGA conform to QMP spec
Let qmp_dispatch() copy the 'id' field. That way any qmp client will
conform to the specification, including QGA. Furthermore, it
simplifies the work for qemu monitor.

CC: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2019-03-18 10:48:06 -05:00
Marc-André Lureau 781f2b3d1e qga: process_event() simplification
Simplify the code around qmp_dispatch():
- rely on qmp_dispatch/check_obj() for message checking
- have a single send_response() point
- constify send_response() argument

It changes a couple of error messages:

* When @req isn't a dictionary, from
    Invalid JSON syntax
  to
    QMP input must be a JSON object

* When @req lacks member "execute", from
    this feature or command is not currently supported
  to
    QMP input lacks member 'execute'

CC: Michael Roth <mdroth@linux.vnet.ibm.com>
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
2019-03-18 10:48:06 -05:00
Matt Hines 996b9cdc2f qga: Fix guest-get-fsinfo PCI address collection in Windows
The Windows QEMU guest agent erroneously tries to collect PCI information
directly from the physical drive. However, windows stores SCSI/IDE information
with the drive and PCI information with the underlying storage controller
This changes get_pci_info to use the physical drive's underlying storage
controller to get PCI information.

* Additionally Fixes incorrect size being passed to DeviceIoControl
  when getting volume extents. Can occasionally crash the guest agent

Signed-off-by: Matt Hines <mhines@scalecomputing.com>
*fix up some checkpatch warnings
*fix domain reporting and add some sanity checks for debug
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2019-03-18 10:48:07 -05:00
Peter Maydell 082c0543ba scripts/make-release: Stop shipping u-boot source as a tarball
In commit d0dead3b6d we changed to shipping the u-boot
sources as a tarball, to work around a problem where they
contained a file and directory that had the same name except
for case, which was preventing QEMU's source tarball being
unpacked on case-insensitive filesystems.

In commit f2a3b549e3 we updated our u-boot blob
and sources to v2019.01, which no longer has this problem,
so we can finally remove our workaround (effectively
reverting d0dead3b6d).

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Message-id: 20190314155628.8822-1-peter.maydell@linaro.org
2019-03-18 15:40:00 +00:00
Michael Roth 40cebc5811 qga-win: fix VSS build breakage due to unintended gnu99 C++ flag
Commit 7be41675f7 set -std=gnu99 for C code via QEMU_CFLAGS. Currently
we generate a "custom" QEMU_CXXFLAGS for VSS DLL C++ build by
filtering out some options from QEMU_CFLAGS and adding some others.
Since we don't filter out -std=gnu99 currently this breaks builds when
VSS support is enabled.

We could keep the existing approach, filter out -std=gnu99 from
QEMU_CFLAGS, and add -std=gnu++98, like configure currently does for
QEMU_CXXFLAGS, but as it turns out our resulting QEMU_CXXFLAGS would
be exactly what configure already generates, just with these filtered
out:

  -fstack-protector-all -fstack-protector-strong

and these added:

  -Wno-unknown-pragmas -Wno-delete-non-virtual-dtor

So fix the issue by re-using configure-generated QEMU_CXXFLAGS and
just handling these specific changes.

Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-03-18 10:24:20 -05:00
Michael Roth 82a58d270c qga-win: include glib when building VSS DLL
Commit 3ebee3b191 defined assert() as g_assert(), but when we build
the VSS DLL component of QGA (to handle fsfreeze) we do not include
glib, which results in breakage when building with VSS support enabled.

Fix this by including glib (along with the -lintl and -lws2_32
dependencies it brings).

Since the VSS DLL is built statically, this introduces an additional
dependency on static glib and supporting libs for the mingw environment
(possibly why we didn't include glib originally), but VSS support
already has very specific prerequisites so it shouldn't affect too many
build environments.

Since the VSS DLL code does use qemu/osdep.h, this should also help
avoid future breakages and possibly allow for some clean ups in current
VSS code.

Suggested-by: Daniel P. Berrangé <berrange@redhat.com>
Cc: Daniel P. Berrangé <berrange@redhat.com>
Cc: qemu-stable@nongnu.org
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2019-03-18 10:24:20 -05:00
Bishara AbuHattoum bd586a9133 qga-win: Adding support for Windows Server 2019 get-osinfo command
Since Windows Server 2016, Microsoft stopped upgrading the major and minor
versions of their new Windows Server product, so, the current functionality
of checking major and minor version numbers to determine the Windows Server
version wont work as expected.
The implemented solution here is to use the build number in addition to the
major and minor version numbers of the product to determine the Windows
Server product version.
The final build number of Windows Server 2016 is 14939, and
the final build number of Windows Server 2019 is 17764, so any Windows
Server product that has the major version of 10 and minor version of 0
with a build number lower or equal to 14939 will resemble 2016 and if the
build number is lower or equal to 17763 will resemble 2019.

Reference:
https://techcommunity.microsoft.com/t5/Windows-Server-Insiders/Windows-Server-2019-version-info/m-p/293112/highlight/true#M859

Signed-off-by: Bishara AbuHattoum <bishara@daynix.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2019-03-18 10:24:20 -05:00
Daniel Henrique Barboza bb6c8d407e qga: update docs with systemd suspend support info
Commit 067927d62e ("qga: systemd hibernate/suspend/hybrid-sleep
support") failed to update qapi-schema.json after adding systemd
hibernate/suspend/hybrid-sleep capabilities to guest-suspend-* QGA
commands.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
2019-03-18 10:24:20 -05:00
Peter Maydell e5b670c9f8 vga: fixes for 4.0 (ati trace, virtio-gpu reset).
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJcj5xiAAoJEEy22O7T6HE4TRoQAKcqkM6v/fBbROlfEyEFEoW3
 FEMdmUWxYFtLgdL8hjjnkoODYaXBbjMyxgf719ITIn38fGeqfuTD8WLwJTnf5047
 hAEXiVJeWdP3+FSonenhcbK34F3VX79wmUrj8zd4ScWEvaTtB4WdbfdnwjMa21FV
 52I6tKRkarnEpVltMgA6wdanQk5YgVWaNJndCkVx/kYc07j3Atg5Z6gEp0zVWLeh
 7wh0qsscYmBrgguwLZvua/JncRATTX0LMdMOY8Ef3MFwIX6ZFctD/M+v9a/q36ql
 6GYNNRGFnA349zAQcqTJsPXAOs78gBo6IFLQhNRqebwy/Bdu9SiK2sPzTPClpgzJ
 Tjq2hkcgkGNhVYEdyhjVPyrTxelKA7+hhbqoNkvcHX3pG65rRADIsObgRi7R7io8
 W8bFPJe0r/PpENyH9diwsx8pFMj1IuTaKjhju5kwr3Jl2qLU5QIUNxzWU5nmVUC8
 54LqvQPKP1C752041pbXcbaSzRP4Dj2WBmo2zTagsrDaL1q4C3KMpJxei2dnD+6O
 i12TvVg3vRJoT9kJkq2GIqGBNoN3Dz211b5iyKQ9sPMyeouvTuvsqhMIYw1Md8FU
 g/WrUVeNF9GQYbYOODV1IsEgokui8Udbwln5KP53Dp93mwVbDHxunKd0nQMqMKsd
 60+Q3x/fLAUly3y0oNlH
 =n4eo
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/vga-20190318-pull-request' into staging

vga: fixes for 4.0 (ati trace, virtio-gpu reset).

# gpg: Signature made Mon 18 Mar 2019 13:25:54 GMT
# gpg:                using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full]
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>" [full]
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full]
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/vga-20190318-pull-request:
  virtio-gpu: clear command and fence queues on reset
  virtio-gpu: delay virglrenderer reset when blocked.
  ati-vga: fix tracing

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-03-18 15:00:15 +00:00
Peter Maydell 3c18a08cf3 seabios update for 4.0
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJcj5gpAAoJEEy22O7T6HE4FlEQAIMcvgfIJx6PVeghZApZglsv
 zGtxrOhKl1N5Zpu0SbFm3raf9ut3TIQkMnwUOzziGPPDeL9wl4rB/dHeTm2pvrp8
 G/d7DRzm5OrblmwUmakoEc5k9oShXxjV9GjMBxJb7yxA1YxfAGK3grjG3Ll7Gmgr
 8QFymiIhCPd4AlqIVi/UyC2VtkT9RMTNgmnJIiYVcFgrZ6BcKigH1F8gtdz3S6eb
 0uIOZTos/rqs6cBvj4S9pV1iESFlSQl650LXhkaLwHn1BnqdjLWPxCdzx4L1CDyS
 aCZCRo9oXFDWM1n3VUZUfHc62DoNQgChvDOjJzMGihicKm0FqrLbS6wF2xs7osag
 Lxwe479BDpa0F0O/yE8wKIGD917ZWUaY6NuJ8HGVpPoNR2I2hfBudanyGHm+no51
 sR5PRdoqzNGKPx6FSZIn12ZRpRfHZD893+rHKcClSC1eLXZWzIadhoRdZXFDCTPl
 hyqPkIMEeqEL6sOp5gNcp/gkcXgpBAbCFlG3qYe5665MV9fDXYeYJlSDTDNyi+He
 7nQrYhRmLIAfEEZnxSo2gj6Rc2JU9/00bmo5Wv8s00Dg4TcEnhENXGSChKBVZJCV
 ROYmPSDcpFh0uPNvshChDUkge41Bm8kUEZAnD1qSPWpetnTFL3tpq3Xk8Qfc4eQP
 tF/so+4xcXJ6sTaMaFZY
 =EhCG
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/seabios-1.12.1-20190318-pull-request' into staging

seabios update for 4.0

# gpg: Signature made Mon 18 Mar 2019 13:07:53 GMT
# gpg:                using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full]
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>" [full]
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full]
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/seabios-1.12.1-20190318-pull-request:
  seabios: update binaries to 1.12.1
  seabios: turn off CONFIG_ATA_DMA
  seabios: update submodule to 1.12.1

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-03-18 13:14:24 +00:00
Gerd Hoffmann 92b80ab1d6 seabios: update binaries to 1.12.1
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-03-18 14:07:06 +01:00
Gerd Hoffmann b435a8f8c8 seabios: turn off CONFIG_ATA_DMA
There have been regressions reported, when booting FreeDOS.
https://www.mail-archive.com/qemu-devel@nongnu.org/msg593254.html

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-03-18 14:07:06 +01:00
Gerd Hoffmann 0a553c58ec seabios: update submodule to 1.12.1
git shortlog rel-1.12.0..rel-1.12.1
===================================

Kevin O'Connor (1):
      usb-ehci: Clear pipe token on pipe reallocate

Stephen Douthit (1):
      tpm: Check for TPM related ACPI tables before attempting hw probe

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-03-18 14:07:06 +01:00
Peter Maydell a9d1cc9f56 audio: pulseaudio fixes for 4.0
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJcj4pSAAoJEEy22O7T6HE4n58P/i8gyfM/aDaSGDeLEvtcsXAX
 fmlqBT7iU6qu7Ts2yssHLsqJI202vD7Ji9s3s1KRtVs5UJwg7XMYliZjg6LOBJQ7
 VgGtLF1KqmMG7uPAFq2N7ctaBYtEj03hAqEeDljkOI6cbbfQgdusr4ixtk6h7buT
 eCTrYSAUqVHwcErKLCfaDll/+pNxEtaObnBXz4cuNd0B1Hkcc/zWCeZ/XXTZCH+z
 uP2T3qK40Q7Hf7wzQeMtQ/2w+Rel4AxwvpGR13evabkNP7t1l/6X884bHk70PxI0
 tsHLqmOnjsBrc43AJBoOx3CFlLDQ7IapnThZz9kxRN5ZFEzXZAJD3gVhtZ5cNqmV
 I1+Hk16Wea+zDYdY8VytburFwEj9Jixu0pZXpD+u+ZTZ0b3iv8mflktAASu9qU9O
 uN7bYUs7U2Ol9Q9xLwnYUIUthhVjOpdMpWtiYa6X7MoqFw7YqRCFmdLGUjHWWV3l
 mQ6QKlmi05OgKRlVaZbTdoWL+NHd4iTBy3HDjNHghT7Whex6bD6ZJILFuEKSgKNk
 FORGS0WFME6aM0I7YT+KA7DDNinUw06MX6l/PFiLByOA2tW8B+HRtnAM+BOy9pQ1
 RHyvGfl9LEgdPIES0oBHQyLFwI6y76X4/EBpgGU5tvIHVcoopJ8CQPH5YqY+a3rW
 Mw7pS+97cIVHQubmU7It
 =R4aN
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/audio-20190318-pull-request' into staging

audio: pulseaudio fixes for 4.0

# gpg: Signature made Mon 18 Mar 2019 12:08:50 GMT
# gpg:                using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full]
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>" [full]
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full]
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/audio-20190318-pull-request:
  audio/paaudio: fix microphone input being unusable
  audio/paaudio: prolong and make latency configurable
  audio/paaudio: fix ignored buffer_length setting

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-03-18 12:39:59 +00:00
Gerd Hoffmann dc84ed5b57 virtio-gpu: clear command and fence queues on reset
It was never correct to not clear them.  Due to commit "3912e66a3feb
virtio-vga: fix reset." this became more obvious though.  The virtio
rings get properly reset now, and trying to process the stale commands
will trigger an assert in the virtio core.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-id: 20190314115358.26678-3-kraxel@redhat.com
2019-03-18 13:10:57 +01:00
Gerd Hoffmann 9032e3d71c virtio-gpu: delay virglrenderer reset when blocked.
If renderer_blocked is set do not call virtio_gpu_virgl_reset().
Instead set a flag indicating that virglrenderer needs a reset.
When renderer_blocked gets cleared do the actual reset call.

Without this we can trigger an assert in spice due to calling
spice_qxl_gl_scanout() while another operation is still running:

spice_qxl_gl_scanout: condition `qxl_state->gl_draw_cookie == GL_DRAW_COOKIE_INVALID' failed

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-id: 20190314115358.26678-2-kraxel@redhat.com
2019-03-18 13:10:57 +01:00
Gerd Hoffmann a223b478cb ati-vga: fix tracing
HWADDR_PRIx can't be used in tracing, use PRIx64 instead.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-id: 20190312081143.24850-1-kraxel@redhat.com
2019-03-18 13:10:17 +01:00
Peter Maydell 185521102b ui: fixes for 4.0 (vnc, curses, keymaps).
-----BEGIN PGP SIGNATURE-----
 Version: GnuPG v2.0.22 (GNU/Linux)
 
 iQIcBAABAgAGBQJcj37zAAoJEEy22O7T6HE4EEcQAM67fVNZQbTaweLfCmK+Bb60
 F+QoOINQZBZBcQB9I4cgn6gXheOcfiYA1ZBMUFW/UWL4OyeNhamAWX5LnpkI0rAR
 ChHvn/xBUQ+sfs5KFnTjLMuU6tIzFzvPWPHGMteQSG/zQ2h97ELVBYZE3l9xbDUC
 Px20ZRVgklzZVwm+KB6Mwq/zcel/lp/jawYVJBsOXRVqf42yH7Mj1IycD0vD1pfj
 wTSRMgRabNi37Jq6HP26T4aM+LxRmrUA8/Ip9Htq0C5NOeCR/rLqgvwSNxeU4JoW
 TlMtzs0hnn8ro0uYashid01FK4s0VKGstjDHVyr3z5FeB+HU3SZxRF2+gx6Efi/q
 AvsKmIs6OyBUbiUCpMC/OytJDKVaOYNEPPN6cpvz63/yzQD0ogifyBYGcQYbhwn/
 mdXNpEhd+14+4nVkvS5zAjec45O7WddTEmNk/TuzAdc6dEWdyW009PO1kVzM2Icx
 R4OyNFE02+wxSnEzLCW1Z31NkSh57ZBRNmGUFZLfIEuauv31nQkW+fUwlirWaFLc
 uziCS+l+I22jvi3kJX31jB4mojSVyldbi7JIuh4ymyEyEm0I0FqmikGvq9Yrz74d
 iLX5ps9t8pFAJKZusfR1JQpZG5MeQcnL89xfvzZ3M+tbPBEoqPxSAUzRmQ1APg5/
 C9pPifofv/LRkXV+vxQK
 =B/sm
 -----END PGP SIGNATURE-----

Merge remote-tracking branch 'remotes/kraxel/tags/ui-20190318-pull-request' into staging

ui: fixes for 4.0 (vnc, curses, keymaps).

# gpg: Signature made Mon 18 Mar 2019 11:20:19 GMT
# gpg:                using RSA key 4CB6D8EED3E87138
# gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" [full]
# gpg:                 aka "Gerd Hoffmann <gerd@kraxel.org>" [full]
# gpg:                 aka "Gerd Hoffmann (private) <kraxel@gmail.com>" [full]
# Primary key fingerprint: A032 8CFF B93A 17A7 9901  FE7D 4CB6 D8EE D3E8 7138

* remotes/kraxel/tags/ui-20190318-pull-request:
  keymaps: regenerate keymaps
  keymaps: use nodeadkeys variant for de and fr
  curses ui: add missing iconv_close calls
  curses ui: always initialize all curses_line fields
  vnc: fix unalignment access in tight_pack24

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2019-03-18 11:30:13 +00:00
Martin Schrodt ade103011c audio/paaudio: fix microphone input being unusable
The current code does not specify the metrics of the buffers for the
input device. This makes PulseAudio choose very bad defaults, which
causes input to be unusable: Audio put in gets out 30 seconds later.
This patch fixes that and makes the latency configurable as well.

Signed-off-by: Martin Schrodt <martin@schrodt.org>
Message-id: 20190315084653.120020-4-martin@schrodt.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-03-18 12:21:15 +01:00
Martin Schrodt f614277765 audio/paaudio: prolong and make latency configurable
The latency of a connection to the PulseAudio server is determined by
the tlength parameter. This was hardcoded to 10ms, which is a bit too
tight on my machine, causing audio on host and guest to malfunction.
A setting of 15ms works fine here. To allow tweaking, I also made the
setting configurable via the new -audiodev config. This allows to squeeze out better timings in scenarios where the emulation allows it.

I also removed setting of the minreq parameter to (seemingly arbitrary) half the latency, since it showed worse audio quality during my tests. Allowing PulseAudio to request smaller chunks helped.

Signed-off-by: Martin Schrodt <martin@schrodt.org>
Message-id: 20190315084653.120020-3-martin@schrodt.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
2019-03-18 12:21:15 +01:00