qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PULL 00/19] Misc HW patches for 2025-05-08
@ 2025-05-08 12:25 Philippe Mathieu-Daudé
  2025-05-08 12:25 ` [PULL 04/19] accel/hvf: Include missing 'hw/core/cpu.h' header Philippe Mathieu-Daudé
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-05-08 12:25 UTC (permalink / raw)
  To: qemu-devel; +Cc: Philippe Mathieu-Daudé

The following changes since commit 57b6f8d07f1478375f85a4593a207e936c63ff59:

  Merge tag 'pull-target-arm-20250506' of https://git.linaro.org/people/pmaydell/qemu-arm into staging (2025-05-07 14:28:20 -0400)

are available in the Git repository at:

  https://github.com/philmd/qemu.git tags/hw-misc-20250508

for you to fetch changes up to 201965865dd88b28e9a40a350642ce25784a574a:

  hw/i2c/imx_i2c: Always set interrupt status bit if interrupt condition occurs (2025-05-08 14:22:12 +0200)

----------------------------------------------------------------
Misc HW patches

- Allow using plugins on BSD user-emulation
- Inline VMSTATE_CPU() macro
- Fix headear includes for HVF x86
- Build hw/hyperv/ files once
- Various typo fixed
- Fix issue in i.MX I2C model

----------------------------------------------------------------

Bernhard Beschow (1):
  hw/i2c/imx_i2c: Always set interrupt status bit if interrupt condition
    occurs

Eric Auger (3):
  hw/pci/pcie_port: Fix pcie_slot_is_hotpluggbale_bus typo
  hw/acpi/ged: Fix wrong identation
  hw/i386/acpi-build: Fix build_append_notfication_callback typo

Gustavo Romero (2):
  hw/i386/acpi-build: Update document reference
  hw/i386/acpi-build: Fix typo and grammar in comment

Philippe Mathieu-Daudé (4):
  target/migration: Inline VMSTATE_CPU()
  accel/hvf: Include missing 'hw/core/cpu.h' header
  system/hvf: Avoid including 'cpu.h'
  system/hvf: Expose hvf_enabled() to common code

Pierrick Bouvier (8):
  bsd-user: add option to enable plugins
  hw/hyperv/hv-balloon-stub: common compilation unit
  hw/hyperv/hyperv.h: header cleanup
  hw/hyperv/vmbus: common compilation unit
  hw/hyperv/syndbg: common compilation unit
  hw/hyperv/balloon: common balloon compilation units
  hw/hyperv/hyperv_testdev: common compilation unit
  hw/hyperv/hyperv: common compilation unit

Steve Sistare (1):
  qom: Factor qom_resolve_path() out

 MAINTAINERS                    |  1 +
 hw/i386/acpi-build.h           |  2 +-
 include/hw/core/cpu.h          | 12 ------------
 include/hw/hyperv/hyperv.h     |  3 ++-
 include/system/hvf.h           | 17 +++++++++++------
 include/system/hvf_int.h       |  2 ++
 accel/hvf/hvf-all.c            |  1 +
 accel/stubs/hvf-stub.c         | 12 ++++++++++++
 bsd-user/main.c                | 12 ++++++++++++
 hw/acpi/generic_event_device.c | 10 +++++-----
 hw/hyperv/hyperv.c             |  3 ++-
 hw/hyperv/syndbg.c             |  9 ++++++---
 hw/hyperv/vmbus.c              |  2 +-
 hw/i2c/imx_i2c.c               | 11 +++++------
 hw/i386/acpi-build.c           | 10 +++++-----
 hw/pci/pcie_port.c             |  4 ++--
 qom/qom-qmp-cmds.c             | 21 +++++++++++++++------
 target/alpha/machine.c         |  2 +-
 target/hppa/machine.c          |  2 +-
 target/microblaze/machine.c    |  2 +-
 target/openrisc/machine.c      |  2 +-
 accel/stubs/meson.build        |  1 +
 hw/hyperv/meson.build          | 11 ++++++-----
 23 files changed, 94 insertions(+), 58 deletions(-)
 create mode 100644 accel/stubs/hvf-stub.c

-- 
2.47.1



^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PULL 04/19] accel/hvf: Include missing 'hw/core/cpu.h' header
  2025-05-08 12:25 [PULL 00/19] Misc HW patches for 2025-05-08 Philippe Mathieu-Daudé
@ 2025-05-08 12:25 ` Philippe Mathieu-Daudé
  2025-05-08 12:25 ` [PULL 19/19] hw/i2c/imx_i2c: Always set interrupt status bit if interrupt condition occurs Philippe Mathieu-Daudé
  2025-05-10 18:35 ` [PULL 00/19] Misc HW patches for 2025-05-08 Stefan Hajnoczi
  2 siblings, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-05-08 12:25 UTC (permalink / raw)
  To: qemu-devel
  Cc: Philippe Mathieu-Daudé, Mads Ynddal, Stefan Hajnoczi,
	Pierrick Bouvier, Mads Ynddal

Since commit d5bd8d8267e ("hvf: only update sysreg from owning
thread") hvf-all.c accesses the run_on_cpu_data type and calls
run_on_cpu(), both defined in the "hw/core/cpu.h" header.
Fortunately, it is indirectly included via:

  "system/hvf.h"
    -> "target/arm/cpu.h"
         -> "target/arm/cpu-qom.h"
              -> "hw/core/cpu.h"

"system/hvf.h" however doesn't need "target/arm/cpu.h" and we
want to remove it there. In order to do that we first need to
include it in hvf-all.c, otherwise we get:

  ../accel/hvf/hvf-all.c:61:54: error: unknown type name 'run_on_cpu_data'
   61 | static void do_hvf_update_guest_debug(CPUState *cpu, run_on_cpu_data arg)
      |                                                      ^
  ../accel/hvf/hvf-all.c:68:5: error: call to undeclared function 'run_on_cpu'
   68 |     run_on_cpu(cpu, do_hvf_update_guest_debug, RUN_ON_CPU_NULL);
      |     ^
  ../accel/hvf/hvf-all.c:68:48: error: use of undeclared identifier 'RUN_ON_CPU_NULL'
   68 |     run_on_cpu(cpu, do_hvf_update_guest_debug, RUN_ON_CPU_NULL);
      |                                                ^

Cc: Mads Ynddal <m.ynddal@samsung.com>
Reported-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org>
Reviewed-by: Mads Ynddal <mads@ynddal.dk>
Message-Id: <20250507204401.45379-1-philmd@linaro.org>
---
 accel/hvf/hvf-all.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/accel/hvf/hvf-all.c b/accel/hvf/hvf-all.c
index 3fc65d6b231..8c387fda24d 100644
--- a/accel/hvf/hvf-all.c
+++ b/accel/hvf/hvf-all.c
@@ -12,6 +12,7 @@
 #include "qemu/error-report.h"
 #include "system/hvf.h"
 #include "system/hvf_int.h"
+#include "hw/core/cpu.h"
 
 const char *hvf_return_string(hv_return_t ret)
 {
-- 
2.47.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PULL 19/19] hw/i2c/imx_i2c: Always set interrupt status bit if interrupt condition occurs
  2025-05-08 12:25 [PULL 00/19] Misc HW patches for 2025-05-08 Philippe Mathieu-Daudé
  2025-05-08 12:25 ` [PULL 04/19] accel/hvf: Include missing 'hw/core/cpu.h' header Philippe Mathieu-Daudé
@ 2025-05-08 12:25 ` Philippe Mathieu-Daudé
  2025-05-10 18:35 ` [PULL 00/19] Misc HW patches for 2025-05-08 Stefan Hajnoczi
  2 siblings, 0 replies; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2025-05-08 12:25 UTC (permalink / raw)
  To: qemu-devel
  Cc: Bernhard Beschow, qemu-stable, Corey Minyard,
	Philippe Mathieu-Daudé

From: Bernhard Beschow <shentey@gmail.com>

According to the i.MX 8M Plus reference manual, the status flag I2C_I2SR[IIF]
continues to be set when an interrupt condition occurs even when I2C interrupts
are disabled (I2C_I2CR[IIEN] is clear). However, the device model only sets the
flag when I2C interrupts are enabled which causes U-Boot to loop forever. Fix
the device model by always setting the flag and let I2C_I2CR[IIEN] guard I2C
interrupts only.

Also remove the comment in the code since it merely stated the obvious and would
be outdated now.

Cc: qemu-stable@nongnu.org
Fixes: 20d0f9cf6a41 ("i.MX: Add I2C controller emulator")
Signed-off-by: Bernhard Beschow <shentey@gmail.com>
Acked-by: Corey Minyard <cminyard@mvista.com>
Message-ID: <20250507124040.425773-1-shentey@gmail.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
---
 hw/i2c/imx_i2c.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/hw/i2c/imx_i2c.c b/hw/i2c/imx_i2c.c
index 91f84c2ad7d..d26177c85df 100644
--- a/hw/i2c/imx_i2c.c
+++ b/hw/i2c/imx_i2c.c
@@ -79,13 +79,12 @@ static void imx_i2c_reset(DeviceState *dev)
 
 static inline void imx_i2c_raise_interrupt(IMXI2CState *s)
 {
-    /*
-     * raise an interrupt if the device is enabled and it is configured
-     * to generate some interrupts.
-     */
-    if (imx_i2c_is_enabled(s) && imx_i2c_interrupt_is_enabled(s)) {
+    if (imx_i2c_is_enabled(s)) {
         s->i2sr |= I2SR_IIF;
-        qemu_irq_raise(s->irq);
+
+        if (imx_i2c_interrupt_is_enabled(s)) {
+            qemu_irq_raise(s->irq);
+        }
     }
 }
 
-- 
2.47.1



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PULL 00/19] Misc HW patches for 2025-05-08
  2025-05-08 12:25 [PULL 00/19] Misc HW patches for 2025-05-08 Philippe Mathieu-Daudé
  2025-05-08 12:25 ` [PULL 04/19] accel/hvf: Include missing 'hw/core/cpu.h' header Philippe Mathieu-Daudé
  2025-05-08 12:25 ` [PULL 19/19] hw/i2c/imx_i2c: Always set interrupt status bit if interrupt condition occurs Philippe Mathieu-Daudé
@ 2025-05-10 18:35 ` Stefan Hajnoczi
  2025-05-12 17:04   ` Peter Maydell
  2 siblings, 1 reply; 6+ messages in thread
From: Stefan Hajnoczi @ 2025-05-10 18:35 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé; +Cc: qemu-devel, Philippe Mathieu-Daudé

[-- Attachment #1: Type: text/plain, Size: 116 bytes --]

Applied, thanks.

Please update the changelog at https://wiki.qemu.org/ChangeLog/10.1 for any user-visible changes.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PULL 00/19] Misc HW patches for 2025-05-08
  2025-05-10 18:35 ` [PULL 00/19] Misc HW patches for 2025-05-08 Stefan Hajnoczi
@ 2025-05-12 17:04   ` Peter Maydell
  2025-05-12 17:42     ` Stefan Hajnoczi
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Maydell @ 2025-05-12 17:04 UTC (permalink / raw)
  To: Stefan Hajnoczi; +Cc: Philippe Mathieu-Daudé, qemu-devel

On Sat, 10 May 2025 at 19:38, Stefan Hajnoczi <stefanha@redhat.com> wrote:
>
> Applied, thanks.
>
> Please update the changelog at https://wiki.qemu.org/ChangeLog/10.1 for any user-visible changes.

This pullreq from Philippe doesn't seem to be in upstream git:
did you forget to push it?

thanks
-- PMM


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PULL 00/19] Misc HW patches for 2025-05-08
  2025-05-12 17:04   ` Peter Maydell
@ 2025-05-12 17:42     ` Stefan Hajnoczi
  0 siblings, 0 replies; 6+ messages in thread
From: Stefan Hajnoczi @ 2025-05-12 17:42 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Stefan Hajnoczi, Philippe Mathieu-Daudé, qemu-devel

On Mon, May 12, 2025 at 1:05 PM Peter Maydell <peter.maydell@linaro.org> wrote:
>
> On Sat, 10 May 2025 at 19:38, Stefan Hajnoczi <stefanha@redhat.com> wrote:
> >
> > Applied, thanks.
> >
> > Please update the changelog at https://wiki.qemu.org/ChangeLog/10.1 for any user-visible changes.
>
> This pullreq from Philippe doesn't seem to be in upstream git:
> did you forget to push it?

I probably forgot to push staging to master. It's there now because I
just pushed some more merged pull requests:

https://gitlab.com/qemu-project/qemu/-/commit/f9bb7e53a341d08fd4ec8d7e810ebfd4f6f936bd

commit f9bb7e53a341d08fd4ec8d7e810ebfd4f6f936bd
Merge: 3e1210e8b0 54e54e594b
Author: Stefan Hajnoczi <stefanha@redhat.com>
Date:   Fri May 9 12:04:10 2025 -0400

    Merge tag 'hw-misc-20250508' of https://github.com/philmd/qemu into staging


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-05-12 17:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-08 12:25 [PULL 00/19] Misc HW patches for 2025-05-08 Philippe Mathieu-Daudé
2025-05-08 12:25 ` [PULL 04/19] accel/hvf: Include missing 'hw/core/cpu.h' header Philippe Mathieu-Daudé
2025-05-08 12:25 ` [PULL 19/19] hw/i2c/imx_i2c: Always set interrupt status bit if interrupt condition occurs Philippe Mathieu-Daudé
2025-05-10 18:35 ` [PULL 00/19] Misc HW patches for 2025-05-08 Stefan Hajnoczi
2025-05-12 17:04   ` Peter Maydell
2025-05-12 17:42     ` Stefan Hajnoczi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).