Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge tag 'misc-20230831' of https://github.com/philmd/qemu into staging
Misc patches queue

Build fixes:
- Only define OS_OBJECT_USE_OBJC with gcc

Overall cleanups:
- Do not declare function prototypes using 'extern' keyword
- Remove unmaintained HAX accelerator
- Have FEWatchFunc handlers return G_SOURCE_CONTINUE/REMOVE instead of boolean
- Avoid modifying QOM class internals from instance in pmbus_device
- Avoid variable-length array in xhci_get_port_bandwidth
- Remove unuseful kvmclock_create() stub
- Style: permit inline loop variables
- Various header cleanups
- Various spelling fixes

# -----BEGIN PGP SIGNATURE-----
#
# iQIzBAABCAAdFiEE+qvnXhKRciHc/Wuy4+MsLN6twN4FAmTw0oUACgkQ4+MsLN6t
# wN7nZQ/+Jyrw1TnHiKV8nS5NKtQIszMTcAbrcuV8YCk0XgwprmrLzxOsOcVOU+MN
# C9SHOhGGcu8NKho73CDrsKqye/IKm8rumMm0hcZrtqGS+3MX9RQzDBUgRgihgD9b
# 78Pmiz/91mrsV4zjXBkWLILipjDUwAL0oXh+MLfkmkTdzJMVfllF5KfF+hdOipwq
# +ECOzwEAFUtCWQk51aLGfrg9SarKC2jtRBEvd1RhwfvXAMCdGP9+pfXJQqkT7ZTK
# Hf4TuOHkzZjHumHGGcJn+P1WHM6W3ILdocG7AAl+/0Jwkx4vhR+6MENJGLxqg4pa
# VTnOpJiL/HsY8319mTswTmlxqmotEDakGjdaRm4ClWPxPksF7zQkdTspBx0/Qayu
# SPr7U5gFLPXMhCpMnrznvjCS+C/dqLYrJAczs9Ecv6KawOIwMiPRzc0SyimCV4DI
# kcpL88Vn4unoBCF7AdiDluPoY2Q41TZ6gRa7B1/nI/4j9Y+Gs/gWQxYHjMlDso+O
# sNgMJ+sqIPW9n1vhl9s6AQweBYnMRW34A5iok9MV0HyFTxNKMoCoR8Ssfk9YzT+L
# mK5a9AfgT8FrhtQXQz6ojIPFM8Q4zGcAQOMudpPiDICDAJaPuUpzL3XVwStT6Rfc
# YL0+Nb+Ja5hPh0fAhgX3BH0EsqruW+DA8rEZfIgAIXDbOC5QFIo=
# =SVsZ
# -----END PGP SIGNATURE-----
# gpg: Signature made Thu 31 Aug 2023 13:48:53 EDT
# gpg:                using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
# gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [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: FAAB E75E 1291 7221 DCFD  6BB2 E3E3 2C2C DEAD C0DE

* tag 'misc-20230831' of https://github.com/philmd/qemu: (39 commits)
  build: Only define OS_OBJECT_USE_OBJC with gcc
  tests/tcg/aarch64: Rename bti-crt.inc.c -> bti-crt.c.inc
  ui: spelling fixes
  util: spelling fixes
  util/fifo8: Fix typo in fifo8_push_all() description
  hw/i386: Rename 'hw/kvm/clock.h' -> 'hw/i386/kvm/clock.h'
  hw/i386: Remove unuseful kvmclock_create() stub
  hw/usb/hcd-xhci: Avoid variable-length array in xhci_get_port_bandwidth()
  hw/usb: spelling fixes
  hw/sd: spelling fixes
  hw/mips: spelling fixes
  hw/display: spelling fixes
  hw/ide: spelling fixes
  hw/i2c: spelling fixes
  hw/i2c/pmbus_device: Fix modifying QOM class internals from instance
  hw/char/pl011: Replace magic values by register field definitions
  hw/char/pl011: Remove duplicated PL011_INT_[RT]X definitions
  hw/char/pl011: Display register name in trace events
  hw/char/pl011: Restrict MemoryRegionOps implementation access sizes
  hw/char: Have FEWatchFunc handlers return G_SOURCE_CONTINUE/REMOVE
  ...

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
  • Loading branch information
Stefan Hajnoczi committed Sep 5, 2023
2 parents 17780ed + 2fc3653 commit a9c17e9
Show file tree
Hide file tree
Showing 186 changed files with 307 additions and 3,441 deletions.
8 changes: 0 additions & 8 deletions MAINTAINERS
Expand Up @@ -543,14 +543,6 @@ F: include/sysemu/xen.h
F: include/sysemu/xen-mapcache.h
F: stubs/xen-hw-stub.c

Guest CPU Cores (HAXM)
---------------------
X86 HAXM CPUs
S: Orphan
F: accel/stubs/hax-stub.c
F: include/sysemu/hax.h
F: target/i386/hax/

Guest CPU Cores (NVMM)
----------------------
NetBSD Virtual Machine Monitor (NVMM) CPU support
Expand Down
3 changes: 0 additions & 3 deletions accel/Kconfig
Expand Up @@ -4,9 +4,6 @@ config WHPX
config NVMM
bool

config HAX
bool

config HVF
bool

Expand Down
24 changes: 0 additions & 24 deletions accel/stubs/hax-stub.c

This file was deleted.

1 change: 0 additions & 1 deletion accel/stubs/meson.build
@@ -1,5 +1,4 @@
sysemu_stubs_ss = ss.source_set()
sysemu_stubs_ss.add(when: 'CONFIG_HAX', if_false: files('hax-stub.c'))
sysemu_stubs_ss.add(when: 'CONFIG_XEN', if_false: files('xen-stub.c'))
sysemu_stubs_ss.add(when: 'CONFIG_KVM', if_false: files('kvm-stub.c'))
sysemu_stubs_ss.add(when: 'CONFIG_TCG', if_false: files('tcg-stub.c'))
Expand Down
2 changes: 1 addition & 1 deletion accel/tcg/tb-maint.c
@@ -1,5 +1,5 @@
/*
* Translation Block Maintaince
* Translation Block Maintenance
*
* Copyright (c) 2003 Fabrice Bellard
*
Expand Down
6 changes: 2 additions & 4 deletions bsd-user/bsd-file.h
Expand Up @@ -51,10 +51,8 @@ do { \
unlock_user(p1, arg1, 0); \
} while (0)

extern struct iovec *lock_iovec(int type, abi_ulong target_addr, int count,
int copy);
extern void unlock_iovec(struct iovec *vec, abi_ulong target_addr, int count,
int copy);
struct iovec *lock_iovec(int type, abi_ulong target_addr, int count, int copy);
void unlock_iovec(struct iovec *vec, abi_ulong target_addr, int count, int copy);

int safe_open(const char *path, int flags, mode_t mode);
int safe_openat(int fd, const char *path, int flags, mode_t mode);
Expand Down
2 changes: 1 addition & 1 deletion contrib/plugins/cache.c
Expand Up @@ -350,7 +350,7 @@ static int in_cache(Cache *cache, uint64_t addr)
* @cache: The cache under simulation
* @addr: The address of the requested memory location
*
* Returns true if the requsted data is hit in the cache and false when missed.
* Returns true if the requested data is hit in the cache and false when missed.
* The cache is updated on miss for the next access.
*/
static bool access_cache(Cache *cache, uint64_t addr)
Expand Down
2 changes: 1 addition & 1 deletion contrib/plugins/lockstep.c
Expand Up @@ -108,7 +108,7 @@ static void report_divergance(ExecState *us, ExecState *them)

/*
* If we have diverged before did we get back on track or are we
* totally loosing it?
* totally losing it?
*/
if (divergence_log) {
DivergeState *last = (DivergeState *) divergence_log->data;
Expand Down
13 changes: 6 additions & 7 deletions crypto/hmacpriv.h
Expand Up @@ -28,19 +28,18 @@ struct QCryptoHmacDriver {
void (*hmac_free)(QCryptoHmac *hmac);
};

extern void *qcrypto_hmac_ctx_new(QCryptoHashAlgorithm alg,
const uint8_t *key, size_t nkey,
Error **errp);
void *qcrypto_hmac_ctx_new(QCryptoHashAlgorithm alg,
const uint8_t *key, size_t nkey,
Error **errp);
extern QCryptoHmacDriver qcrypto_hmac_lib_driver;

#ifdef CONFIG_AF_ALG

#include "afalgpriv.h"

extern QCryptoAFAlg *
qcrypto_afalg_hmac_ctx_new(QCryptoHashAlgorithm alg,
const uint8_t *key, size_t nkey,
Error **errp);
QCryptoAFAlg *qcrypto_afalg_hmac_ctx_new(QCryptoHashAlgorithm alg,
const uint8_t *key, size_t nkey,
Error **errp);
extern QCryptoHmacDriver qcrypto_hmac_afalg_driver;

#endif
Expand Down
2 changes: 1 addition & 1 deletion docs/about/build-platforms.rst
Expand Up @@ -52,7 +52,7 @@ Those hosts are officially supported, with various accelerators:
* - SPARC
- tcg
* - x86
- hax, hvf (64 bit only), kvm, nvmm, tcg, whpx (64 bit only), xen
- hvf (64 bit only), kvm, nvmm, tcg, whpx (64 bit only), xen

Other host architectures are not supported. It is possible to build QEMU system
emulation on an unsupported host architecture using the configure
Expand Down
6 changes: 0 additions & 6 deletions docs/about/deprecated.rst
Expand Up @@ -105,12 +105,6 @@ Use ``-machine hpet=off`` instead.
The ``-no-acpi`` setting has been turned into a machine property.
Use ``-machine acpi=off`` instead.

``-accel hax`` (since 8.0)
''''''''''''''''''''''''''

The HAXM project has been retired (see https://github.com/intel/haxm#status).
Use "whpx" (on Windows) or "hvf" (on macOS) instead.

``-async-teardown`` (since 8.1)
'''''''''''''''''''''''''''''''

Expand Down
2 changes: 1 addition & 1 deletion docs/about/index.rst
Expand Up @@ -8,7 +8,7 @@ QEMU can be used in several different ways. The most common is for
:ref:`System Emulation`, where it provides a virtual model of an
entire machine (CPU, memory and emulated devices) to run a guest OS.
In this mode the CPU may be fully emulated, or it may work with a
hypervisor such as KVM, Xen, Hax or Hypervisor.Framework to allow the
hypervisor such as KVM, Xen or Hypervisor.Framework to allow the
guest to run directly on the host CPU.

The second supported way to use QEMU is :ref:`User Mode Emulation`,
Expand Down
11 changes: 7 additions & 4 deletions docs/about/removed-features.rst
Expand Up @@ -659,15 +659,18 @@ Use ``Icelake-Server`` instead.
System accelerators
-------------------

Userspace local APIC with KVM (x86, removed 8.0)
''''''''''''''''''''''''''''''''''''''''''''''''
Userspace local APIC with KVM (x86, removed in 8.0)
'''''''''''''''''''''''''''''''''''''''''''''''''''

``-M kernel-irqchip=off`` cannot be used on KVM if the CPU model includes
a local APIC. The ``split`` setting is supported, as is using ``-M
kernel-irqchip=off`` when the CPU does not have a local APIC.

System accelerators
-------------------
HAXM (``-accel hax``) (removed in 8.2)
''''''''''''''''''''''''''''''''''''''

The HAXM project has been retired (see https://github.com/intel/haxm#status).
Use "whpx" (on Windows) or "hvf" (on macOS) instead.

MIPS "Trap-and-Emulate" KVM support (removed in 8.0)
''''''''''''''''''''''''''''''''''''''''''''''''''''
Expand Down
2 changes: 1 addition & 1 deletion docs/system/index.rst
Expand Up @@ -6,7 +6,7 @@ System Emulation

This section of the manual is the overall guide for users using QEMU
for full system emulation (as opposed to user-mode emulation).
This includes working with hypervisors such as KVM, Xen, Hax
This includes working with hypervisors such as KVM, Xen
or Hypervisor.Framework.

.. toctree::
Expand Down
3 changes: 0 additions & 3 deletions docs/system/introduction.rst
Expand Up @@ -21,9 +21,6 @@ Tiny Code Generator (TCG) capable of emulating many CPUs.
* - Xen
- Linux (as dom0)
- Arm, x86
* - Intel HAXM (hax)
- Linux, Windows
- x86
* - Hypervisor Framework (hvf)
- MacOS
- x86 (64 bit only), Arm (64 bit only)
Expand Down
8 changes: 4 additions & 4 deletions hw/char/cadence_uart.c
Expand Up @@ -307,11 +307,11 @@ static gboolean cadence_uart_xmit(void *do_not_use, GIOCondition cond,
/* instant drain the fifo when there's no back-end */
if (!qemu_chr_fe_backend_connected(&s->chr)) {
s->tx_count = 0;
return FALSE;
return G_SOURCE_REMOVE;
}

if (!s->tx_count) {
return FALSE;
return G_SOURCE_REMOVE;
}

ret = qemu_chr_fe_write(&s->chr, s->tx_fifo, s->tx_count);
Expand All @@ -326,12 +326,12 @@ static gboolean cadence_uart_xmit(void *do_not_use, GIOCondition cond,
cadence_uart_xmit, s);
if (!r) {
s->tx_count = 0;
return FALSE;
return G_SOURCE_REMOVE;
}
}

uart_update_status(s);
return FALSE;
return G_SOURCE_REMOVE;
}

static void uart_write_tx_fifo(CadenceUARTState *s, const uint8_t *buf,
Expand Down
6 changes: 3 additions & 3 deletions hw/char/cmsdk-apb-uart.c
Expand Up @@ -199,7 +199,7 @@ static gboolean uart_transmit(void *do_not_use, GIOCondition cond, void *opaque)
s->watch_tag = 0;

if (!(s->ctrl & R_CTRL_TX_EN_MASK) || !(s->state & R_STATE_TXFULL_MASK)) {
return FALSE;
return G_SOURCE_REMOVE;
}

ret = qemu_chr_fe_write(&s->chr, &s->txbuf, 1);
Expand All @@ -215,7 +215,7 @@ static gboolean uart_transmit(void *do_not_use, GIOCondition cond, void *opaque)
}
/* Transmit pending */
trace_cmsdk_apb_uart_tx_pending();
return FALSE;
return G_SOURCE_REMOVE;
}

buffer_drained:
Expand All @@ -227,7 +227,7 @@ static gboolean uart_transmit(void *do_not_use, GIOCondition cond, void *opaque)
s->intstatus |= R_INTSTATUS_TX_MASK;
}
cmsdk_apb_uart_update(s);
return FALSE;
return G_SOURCE_REMOVE;
}

static void uart_cancel_transmit(CMSDKAPBUART *s)
Expand Down
8 changes: 4 additions & 4 deletions hw/char/ibex_uart.c
Expand Up @@ -147,7 +147,7 @@ static gboolean ibex_uart_xmit(void *do_not_use, GIOCondition cond,
/* instant drain the fifo when there's no back-end */
if (!qemu_chr_fe_backend_connected(&s->chr)) {
s->tx_level = 0;
return FALSE;
return G_SOURCE_REMOVE;
}

if (!s->tx_level) {
Expand All @@ -156,7 +156,7 @@ static gboolean ibex_uart_xmit(void *do_not_use, GIOCondition cond,
s->uart_intr_state |= R_INTR_STATE_TX_EMPTY_MASK;
s->uart_intr_state &= ~R_INTR_STATE_TX_WATERMARK_MASK;
ibex_uart_update_irqs(s);
return FALSE;
return G_SOURCE_REMOVE;
}

ret = qemu_chr_fe_write(&s->chr, s->tx_fifo, s->tx_level);
Expand All @@ -171,7 +171,7 @@ static gboolean ibex_uart_xmit(void *do_not_use, GIOCondition cond,
ibex_uart_xmit, s);
if (!r) {
s->tx_level = 0;
return FALSE;
return G_SOURCE_REMOVE;
}
}

Expand All @@ -192,7 +192,7 @@ static gboolean ibex_uart_xmit(void *do_not_use, GIOCondition cond,
}

ibex_uart_update_irqs(s);
return FALSE;
return G_SOURCE_REMOVE;
}

static void uart_write_tx_fifo(IbexUartState *s, const uint8_t *buf,
Expand Down
4 changes: 2 additions & 2 deletions hw/char/nrf51_uart.c
Expand Up @@ -93,13 +93,13 @@ static gboolean uart_transmit(void *do_not_use, GIOCondition cond, void *opaque)
*/
goto buffer_drained;
}
return FALSE;
return G_SOURCE_REMOVE;
}

buffer_drained:
s->reg[R_UART_TXDRDY] = 1;
s->pending_tx_byte = false;
return FALSE;
return G_SOURCE_REMOVE;
}

static void uart_cancel_transmit(NRF51UARTState *s)
Expand Down

0 comments on commit a9c17e9

Please sign in to comment.