target-arm queue:

* MAINTAINERS file update for whpx
  * target/arm: Fix accidental write to TCG constant
  * target/arm/cpu64: remove duplicate include
  * hw/display/xlnx_dp: don't abort() on guest errors
  * cxl, vfio, tests: clean up includes
  * hw/misc/npcm_clk: Don't divide by zero when calculating frequency
  * hw/audio/lm4549: Don't try to open a zero-frequency audio voice
 -----BEGIN PGP SIGNATURE-----
 
 iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAmkXSF0ZHHBldGVyLm1h
 eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3iLKEACahSPxoRe4+TOgr3F7mJvq
 CDFOOUQSXbBC4WTviyJAh1+MYFhtWrOxUB1EzLb9iw1+sbBcT6/K1CBEFiQ65dpn
 kjtIaJDidz4x52vNc1nz1B9jzRdme4xQ0kg5NeY9PqCGO4nC0iWqzzbBoA1XYHsR
 RXfXr9JNXKqN3cm+x/ZX/o++rz3eG8ba0DxJUIO+OR9rAv3n0No+oTOeAJ4SbDu4
 lcP+MHFA/V//Q4O9QSeZv1tD+brXerpNcMQlsRrffkmT8bvJMPozyvcijtEZQz3+
 9s8GUeL0b7/GgpdIqWyEAl2sreMtqmWh1GGpCZziFTiEmNWWI9M6fHINyZ2NVnPD
 T5UFOA9JbSG1ybxQHHf4Vj5tUjwWAAnVwRP1wXAb3p35fBYl0Y3JFDX+0HpL9tM/
 vB1BHA+PGRV51vDy7VoUpbbZkpa1/WJCqTm9s1BxzZ2BFu0tpQ2Rqg/V+y004NQY
 Xx1t7ilm18LyQrZpHYqmw3OJ/EVPtATBN2jomK2Z8ZWExLsDQ/Qd8k3cHg6OcN4N
 /ORpbqy29dOL5mQTEuBW8L0tLEN9tBqfadlqvlsbI9S0eDlZdyvPT9utV0aSCfe2
 km/rSjD2IJEmtJA1kcYgq3ipNsPu5eGFfw2OqGe+vowLaU42ki3uteaOqLgN81AX
 sB5cO49w7AtAmaocraAzPA==
 =+I+o
 -----END PGP SIGNATURE-----

Merge tag 'pull-target-arm-20251114' of https://gitlab.com/pm215/qemu into staging

target-arm queue:
 * MAINTAINERS file update for whpx
 * target/arm: Fix accidental write to TCG constant
 * target/arm/cpu64: remove duplicate include
 * hw/display/xlnx_dp: don't abort() on guest errors
 * cxl, vfio, tests: clean up includes
 * hw/misc/npcm_clk: Don't divide by zero when calculating frequency
 * hw/audio/lm4549: Don't try to open a zero-frequency audio voice

# -----BEGIN PGP SIGNATURE-----
#
# iQJNBAABCAA3FiEE4aXFk81BneKOgxXPPCUl7RQ2DN4FAmkXSF0ZHHBldGVyLm1h
# eWRlbGxAbGluYXJvLm9yZwAKCRA8JSXtFDYM3iLKEACahSPxoRe4+TOgr3F7mJvq
# CDFOOUQSXbBC4WTviyJAh1+MYFhtWrOxUB1EzLb9iw1+sbBcT6/K1CBEFiQ65dpn
# kjtIaJDidz4x52vNc1nz1B9jzRdme4xQ0kg5NeY9PqCGO4nC0iWqzzbBoA1XYHsR
# RXfXr9JNXKqN3cm+x/ZX/o++rz3eG8ba0DxJUIO+OR9rAv3n0No+oTOeAJ4SbDu4
# lcP+MHFA/V//Q4O9QSeZv1tD+brXerpNcMQlsRrffkmT8bvJMPozyvcijtEZQz3+
# 9s8GUeL0b7/GgpdIqWyEAl2sreMtqmWh1GGpCZziFTiEmNWWI9M6fHINyZ2NVnPD
# T5UFOA9JbSG1ybxQHHf4Vj5tUjwWAAnVwRP1wXAb3p35fBYl0Y3JFDX+0HpL9tM/
# vB1BHA+PGRV51vDy7VoUpbbZkpa1/WJCqTm9s1BxzZ2BFu0tpQ2Rqg/V+y004NQY
# Xx1t7ilm18LyQrZpHYqmw3OJ/EVPtATBN2jomK2Z8ZWExLsDQ/Qd8k3cHg6OcN4N
# /ORpbqy29dOL5mQTEuBW8L0tLEN9tBqfadlqvlsbI9S0eDlZdyvPT9utV0aSCfe2
# km/rSjD2IJEmtJA1kcYgq3ipNsPu5eGFfw2OqGe+vowLaU42ki3uteaOqLgN81AX
# sB5cO49w7AtAmaocraAzPA==
# =+I+o
# -----END PGP SIGNATURE-----
# gpg: Signature made Fri 14 Nov 2025 04:18:53 PM CET
# gpg:                using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg:                issuer "peter.maydell@linaro.org"
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [unknown]
# gpg:                 aka "Peter Maydell <pmaydell@gmail.com>" [unknown]
# gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [unknown]
# gpg:                 aka "Peter Maydell <peter@archaic.org.uk>" [unknown]
# gpg: WARNING: The key's User ID is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE

* tag 'pull-target-arm-20251114' of https://gitlab.com/pm215/qemu:
  hw/audio/lm4549: Don't try to open a zero-frequency audio voice
  hw/misc/npcm_clk: Don't divide by zero when calculating frequency
  tests: Clean up includes
  vfio: Clean up includes
  cxl: Clean up includes
  hw/display/xlnx_dp: Don't abort for unsupported graphics formats
  hw/display/xlnx_dp.c: Don't abort on AUX FIFO overrun/underrun
  target/arm/cpu64: remove duplicate include
  target/arm: Fix accidental write to TCG constant
  MAINTAINERS: update maintainers for WHPX

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2025-11-14 17:59:05 +01:00
commit e88510fcdc
24 changed files with 110 additions and 38 deletions

View file

@ -547,7 +547,8 @@ F: include/system/hvf.h
F: include/system/hvf_int.h
WHPX CPUs
M: Sunil Muthuswamy <sunilmut@microsoft.com>
M: Pedro Barbuda <pbarbuda@microsoft.com>
M: Mohamed Mediouni <mohamed@unpredictable.fr>
S: Supported
F: target/i386/whpx/
F: accel/stubs/whpx-stub.c

View file

@ -15,6 +15,7 @@
#include "qemu/osdep.h"
#include "hw/hw.h"
#include "qemu/log.h"
#include "qemu/audio.h"
#include "lm4549.h"
#include "migration/vmstate.h"
@ -179,9 +180,23 @@ void lm4549_write(lm4549_state *s,
break;
case LM4549_PCM_Front_DAC_Rate:
regfile[LM4549_PCM_Front_DAC_Rate] = value;
DPRINTF("DAC rate change = %i\n", value);
/*
* Valid sample rates are 4kHz to 48kHz.
* The datasheet doesn't say what happens if you try to
* set the frequency to zero. AUD_open_out() will print
* a bug message if we pass it a zero frequency, so just
* ignore attempts to set the DAC frequency to zero.
*/
if (value < 4000 || value > 48000) {
qemu_log_mask(LOG_GUEST_ERROR,
"%s: DAC sample rate %d Hz is invalid, ignoring it\n",
__func__, value);
break;
}
regfile[LM4549_PCM_Front_DAC_Rate] = value;
/* Re-open a voice with the new sample rate */
struct audsettings as;
as.freq = value;

View file

@ -7,9 +7,9 @@
* COPYING file in the top-level directory.
*/
#include "qemu/osdep.h"
#include <math.h>
#include "qemu/osdep.h"
#include "hw/pci/msi.h"
#include "hw/pci/msix.h"
#include "hw/cxl/cxl.h"

View file

@ -435,7 +435,18 @@ static void xlnx_dp_aux_clear_rx_fifo(XlnxDPState *s)
static void xlnx_dp_aux_push_rx_fifo(XlnxDPState *s, uint8_t *buf, size_t len)
{
size_t avail = fifo8_num_free(&s->rx_fifo);
DPRINTF("Push %u data in rx_fifo\n", (unsigned)len);
if (len > avail) {
/*
* Data sheet doesn't specify behaviour here: we choose to ignore
* the excess data.
*/
qemu_log_mask(LOG_GUEST_ERROR,
"%s: ignoring %zu bytes pushed to full RX_FIFO\n",
__func__, len - avail);
len = avail;
}
fifo8_push_all(&s->rx_fifo, buf, len);
}
@ -466,7 +477,18 @@ static void xlnx_dp_aux_clear_tx_fifo(XlnxDPState *s)
static void xlnx_dp_aux_push_tx_fifo(XlnxDPState *s, uint8_t *buf, size_t len)
{
size_t avail = fifo8_num_free(&s->tx_fifo);
DPRINTF("Push %u data in tx_fifo\n", (unsigned)len);
if (len > avail) {
/*
* Data sheet doesn't specify behaviour here: we choose to ignore
* the excess data.
*/
qemu_log_mask(LOG_GUEST_ERROR,
"%s: ignoring %zu bytes pushed to full TX_FIFO\n",
__func__, len - avail);
len = avail;
}
fifo8_push_all(&s->tx_fifo, buf, len);
}
@ -475,8 +497,10 @@ static uint8_t xlnx_dp_aux_pop_tx_fifo(XlnxDPState *s)
uint8_t ret;
if (fifo8_is_empty(&s->tx_fifo)) {
error_report("%s: TX_FIFO underflow", __func__);
abort();
/* Data sheet doesn't specify behaviour here: we choose to return 0 */
qemu_log_mask(LOG_GUEST_ERROR, "%s: attempt to read empty TX_FIFO\n",
__func__);
return 0;
}
ret = fifo8_pop(&s->tx_fifo);
DPRINTF("pop 0x%2.2X from tx_fifo.\n", ret);
@ -641,14 +665,28 @@ static void xlnx_dp_change_graphic_fmt(XlnxDPState *s)
case DP_GRAPHIC_BGR888:
s->g_plane.format = PIXMAN_b8g8r8;
break;
case DP_GRAPHIC_RGBA5551:
case DP_GRAPHIC_RGBA4444:
case DP_GRAPHIC_8BPP:
case DP_GRAPHIC_4BPP:
case DP_GRAPHIC_2BPP:
case DP_GRAPHIC_1BPP:
qemu_log_mask(LOG_UNIMP, "%s: unimplemented graphic format %u",
__func__,
s->avbufm_registers[AV_BUF_FORMAT] & DP_GRAPHIC_MASK);
s->g_plane.format = PIXMAN_r8g8b8a8;
break;
default:
error_report("%s: unsupported graphic format %u", __func__,
s->avbufm_registers[AV_BUF_FORMAT] & DP_GRAPHIC_MASK);
abort();
qemu_log_mask(LOG_GUEST_ERROR, "%s: invalid graphic format %u",
__func__,
s->avbufm_registers[AV_BUF_FORMAT] & DP_GRAPHIC_MASK);
s->g_plane.format = PIXMAN_r8g8b8a8;
break;
}
switch (s->avbufm_registers[AV_BUF_FORMAT] & DP_NL_VID_FMT_MASK) {
case 0:
/* This is DP_NL_VID_CB_Y0_CR_Y1 ??? */
s->v_plane.format = PIXMAN_x8b8g8r8;
break;
case DP_NL_VID_Y0_CB_Y1_CR:
@ -657,10 +695,39 @@ static void xlnx_dp_change_graphic_fmt(XlnxDPState *s)
case DP_NL_VID_RGBA8880:
s->v_plane.format = PIXMAN_x8b8g8r8;
break;
case DP_NL_VID_CR_Y0_CB_Y1:
case DP_NL_VID_Y0_CR_Y1_CB:
case DP_NL_VID_YV16:
case DP_NL_VID_YV24:
case DP_NL_VID_YV16CL:
case DP_NL_VID_MONO:
case DP_NL_VID_YV16CL2:
case DP_NL_VID_YUV444:
case DP_NL_VID_RGB888:
case DP_NL_VID_RGB888_10BPC:
case DP_NL_VID_YUV444_10BPC:
case DP_NL_VID_YV16CL2_10BPC:
case DP_NL_VID_YV16CL_10BPC:
case DP_NL_VID_YV16_10BPC:
case DP_NL_VID_YV24_10BPC:
case DP_NL_VID_Y_ONLY_10BPC:
case DP_NL_VID_YV16_420:
case DP_NL_VID_YV16CL_420:
case DP_NL_VID_YV16CL2_420:
case DP_NL_VID_YV16_420_10BPC:
case DP_NL_VID_YV16CL_420_10BPC:
case DP_NL_VID_YV16CL2_420_10BPC:
qemu_log_mask(LOG_UNIMP, "%s: unimplemented video format %u",
__func__,
s->avbufm_registers[AV_BUF_FORMAT] & DP_NL_VID_FMT_MASK);
s->v_plane.format = PIXMAN_x8b8g8r8;
break;
default:
error_report("%s: unsupported video format %u", __func__,
s->avbufm_registers[AV_BUF_FORMAT] & DP_NL_VID_FMT_MASK);
abort();
qemu_log_mask(LOG_UNIMP, "%s: invalid video format %u",
__func__,
s->avbufm_registers[AV_BUF_FORMAT] & DP_NL_VID_FMT_MASK);
s->v_plane.format = PIXMAN_x8b8g8r8;
break;
}
xlnx_dp_recreate_surface(s);

View file

@ -8,9 +8,9 @@
*
* SPDX-License-Identifier: GPL-v2-only
*/
#include "qemu/osdep.h"
#include <math.h>
#include "qemu/osdep.h"
#include "qemu/units.h"
#include "qemu/error-report.h"
#include "qapi/qapi-commands-cxl.h"

View file

@ -212,13 +212,14 @@ static void npcm7xx_clk_update_pll(void *opaque)
{
NPCM7xxClockPLLState *s = opaque;
uint32_t con = s->clk->regs[s->reg];
uint64_t freq;
uint64_t freq, freq_div;
/* The PLL is grounded if it is not locked yet. */
if (con & PLLCON_LOKI) {
freq = clock_get_hz(s->clock_in);
freq *= PLLCON_FBDV(con);
freq /= PLLCON_INDV(con) * PLLCON_OTDV1(con) * PLLCON_OTDV2(con);
freq_div = PLLCON_INDV(con) * PLLCON_OTDV1(con) * PLLCON_OTDV2(con);
freq = freq_div ? freq / freq_div : 0;
} else {
freq = 0;
}

View file

@ -6,9 +6,9 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "qemu/osdep.h"
#include <sys/ioctl.h>
#include <linux/vfio.h>
#include "qemu/osdep.h"
#include "hw/vfio-user/container.h"
#include "hw/vfio-user/device.h"

View file

@ -7,7 +7,6 @@
#ifndef HW_VFIO_USER_CONTAINER_H
#define HW_VFIO_USER_CONTAINER_H
#include "qemu/osdep.h"
#include "hw/vfio/vfio-container.h"
#include "hw/vfio-user/proxy.h"

View file

@ -9,7 +9,6 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "qemu/osdep.h"
#include "linux/vfio.h"
#include "hw/vfio-user/proxy.h"

View file

@ -6,8 +6,8 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#include <sys/ioctl.h>
#include "qemu/osdep.h"
#include <sys/ioctl.h>
#include "qapi-visit-sockets.h"
#include "qemu/error-report.h"

View file

@ -10,7 +10,6 @@
* directory.
*/
#include <stdbool.h>
#include "qemu/osdep.h"
#include CONFIG_DEVICES /* CONFIG_IOMMUFD */
#include <linux/vfio.h>

View file

@ -10,10 +10,10 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "qemu/osdep.h"
#include <sys/ioctl.h>
#include <linux/vfio.h>
#include "qemu/osdep.h"
#include "system/tcg.h"
#include "system/ram_addr.h"
#include "qapi/error.h"

View file

@ -4,9 +4,9 @@
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#include "qemu/osdep.h"
#include <sys/ioctl.h>
#include <linux/vfio.h>
#include "qemu/osdep.h"
#include "hw/vfio/vfio-container-legacy.h"
#include "hw/vfio/vfio-device.h"
#include "hw/vfio/vfio-listener.h"

View file

@ -12,7 +12,6 @@
#ifndef HW_VFIO_VFIO_PCI_QUIRKS_H
#define HW_VFIO_VFIO_PCI_QUIRKS_H
#include "qemu/osdep.h"
#include "exec/memop.h"
/*

View file

@ -34,7 +34,6 @@
#include "hw/qdev-properties.h"
#include "internals.h"
#include "cpu-features.h"
#include "cpregs.h"
/* convert between <register>_IDX and SYS_<register> */
#define DEF(NAME, OP0, OP1, CRN, CRM, OP2) \

View file

@ -303,20 +303,23 @@ TCGv_i32 add_reg_for_lit(DisasContext *s, int reg, int ofs)
marked as dead. */
void store_reg(DisasContext *s, int reg, TCGv_i32 var)
{
uint32_t mask = 0;
if (reg == 15) {
/* In Thumb mode, we must ignore bit 0.
/*
* In Thumb mode, we must ignore bit 0.
* In ARM mode, for ARMv4 and ARMv5, it is UNPREDICTABLE if bits [1:0]
* are not 0b00, but for ARMv6 and above, we must ignore bits [1:0].
* We choose to ignore [1:0] in ARM mode for all architecture versions.
*/
tcg_gen_andi_i32(var, var, s->thumb ? ~1 : ~3);
mask = s->thumb ? 1 : 3;
s->base.is_jmp = DISAS_JUMP;
s->pc_save = -1;
} else if (reg == 13 && arm_dc_feature(s, ARM_FEATURE_M)) {
/* For M-profile SP bits [1:0] are always zero */
tcg_gen_andi_i32(var, var, ~3);
mask = 3;
}
tcg_gen_mov_i32(cpu_R[reg], var);
tcg_gen_andi_i32(cpu_R[reg], var, ~mask);
}
/*

View file

@ -8,7 +8,6 @@
#ifndef TESTS_ASPEED_HACE_UTILS_H
#define TESTS_ASPEED_HACE_UTILS_H
#include "qemu/osdep.h"
#include "libqtest.h"
#include "qemu/bitops.h"

View file

@ -26,7 +26,6 @@
#ifndef TESTS_ASPEED_SMC_UTILS_H
#define TESTS_ASPEED_SMC_UTILS_H
#include "qemu/osdep.h"
#include "qemu/bswap.h"
#include "libqtest-single.h"
#include "qemu/bitops.h"

View file

@ -27,7 +27,6 @@
#include "qemu/timer.h"
#include "qobject/qdict.h"
#include "libqtest-single.h"
#include "qemu/typedefs.h"
#define AST2600_GPIO_BASE 0x1E780000

View file

@ -7,9 +7,6 @@
#include <gio/gio.h>
#include <gio/gunixfdlist.h>
#include "libqtest.h"
#ifndef WIN32
#include <sys/mman.h>
#endif
#include "ui/dbus-display1.h"
static GDBusConnection*

View file

@ -5,7 +5,6 @@
*
* SPDX-License-Identifier: GPL-2.0-or-later
*/
#include <unistd.h>
#include "qemu/osdep.h"
#include "libqtest.h"
#include "qemu/bswap.h"

View file

@ -25,9 +25,9 @@
* THE SOFTWARE.
*/
#include "qemu/osdep.h"
#include <math.h>
#include "qemu/osdep.h"
#include "qemu/cutils.h"
#include "qemu/units.h"

View file

@ -8,7 +8,6 @@
*/
#include "qemu/osdep.h"
#include "glib-compat.h"
#include <locale.h>
#include "qemu/error-report.h"

View file

@ -20,8 +20,6 @@
#include "qemu/osdep.h"
#include <glib/gstdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include "io/channel-command.h"
#include "io-channel-helpers.h"
#include "qapi/error.h"