Skip to contentSkip to conversation

target/loongarch/kvm: Include missing exec/cpu-defs.h header

PATCH In review Qiang Ma 3 participants 3 messages May 12 – May 13

lore
Share & tools
lore

Qiang Ma

author
#0 lore raw

PATCH v2 1/1 target/loongarch/kvm: Include missing exec/cpu-defs.h header

After commit 71cab1a42d2 removed the indirect include of exec/cpu-defs.h from target/loongarch/cpu.h, the TARGET_FMT_lx macro is no longer visible in kvm.c, causing build failures:

error: expected ')' before TARGET_FMT_lx

Add the missing #include exec/cpu-defs.h to restore the TARGET_FMT_lx definition.

---
 target/loongarch/kvm/kvm.c | 1 +
 1 file changed, 1 insertion(+)
target/loongarch/kvm/kvm.c +1 -0
index 9d844c4905..4af4ab2ed0 100644
@@ -6,6 +6,7 @@
  */
 
 #include "qemu/osdep.h"
+#include "exec/target_long.h"
 #include <sys/ioctl.h>
 #include <linux/kvm.h>
 #include "asm-loongarch/kvm_para.h"
Signature · 1 line
2.20.1
Reviewed-by on v2 1/1
#1 lore raw
Quoted 8 lines · Qiang Ma

After commit 71cab1a42d2 removed the indirect include of exec/cpu-defs.h from target/loongarch/cpu.h, the TARGET_FMT_lx macro is no longer visible in kvm.c, causing build failures:

error: expected ')' before TARGET_FMT_lx

Add the missing #include exec/cpu-defs.h to restore the TARGET_FMT_lx definition.

Hi,
The commit message does not match the changes.

Quoted 10 lines
---
  target/loongarch/kvm/kvm.c | 1 +
  1 file changed, 1 insertion(+)
target/loongarch/kvm/kvm.c +0 -0
index 9d844c4905..4af4ab2ed0 100644

target/loongarch/kvm/kvm.c line 9

Quoted 4 lines
target/loongarch/kvm/kvm.c +1 -0
@@ -6,6 +6,7 @@
   */
 
  #include "qemu/osdep.h"
+#include "exec/target_long.h"

Thanks.
Song Gao

Quoted 3 lines
target/loongarch/kvm/kvm.c +0 -0
  #include <sys/ioctl.h>
  #include <linux/kvm.h>
  #include "asm-loongarch/kvm_para.h"
#2 lore raw
Quoted 11 lines · gaosong
Quoted 8 lines · Qiang Ma

After commit 71cab1a42d2 removed the indirect include of exec/cpu-defs.h from target/loongarch/cpu.h, the TARGET_FMT_lx macro is no longer visible in kvm.c, causing build failures:

   error: expected ')' before TARGET_FMT_lx

Add the missing #include exec/cpu-defs.h to restore the TARGET_FMT_lx definition.

Hi,
The commit message does not match the changes.

Otherwise:

Quoted 21 lines

target/loongarch/kvm/kvm.c line 8

Quoted 13 lines

---
  target/loongarch/kvm/kvm.c | 1 +

  1 file changed, 1 insertion(+)
target/loongarch/kvm/kvm.c +1 -0
index 9d844c4905..4af4ab2ed0 100644
@@ -6,6 +6,7 @@
    */
   #include "qemu/osdep.h"
+#include "exec/target_long.h"

Thanks.
Song Gao

Quoted 3 lines
target/loongarch/kvm/kvm.c +0 -0
   #include <sys/ioctl.h>
   #include <linux/kvm.h>
   #include "asm-loongarch/kvm_para.h"