Skip to contentSkip to conversation

xen/arm: fix the build error for GIC on ARM64 QEMU Platform

PATCH In review Dongjiu Geng 3 participants 9 messages Dec 24, 2021 – Dec 28, 2021 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 xen/arm: fix the build error for GIC on ARM64 QEMU Platform

when enable CONFIG_NEW_VGIC in ARM64 QEMU Platform, it will build failed. so fix it and make it can select GICV2.

---

$ make dist-xen XEN_TARGET_ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j10
make -C xen install
make[1]: Entering directory '/home/workspace/gengdongjiu/old_machine/XEN/xen/xen'
make -f /home/workspace/gengdongjiu/old_machine/XEN/xen/xen/tools/kconfig/Makefile.kconfig ARCH=arm64 SRCARCH=arm HOSTCC="gcc" HOSTCXX="g++" syncconfig
make[2]: Entering directory '/home/workspace/gengdongjiu/old_machine/XEN/xen/xen'
gcc -Wp,-MD,tools/kconfig/.conf.o.d      -c -o tools/kconfig/conf.o tools/kconfig/conf.c
gcc -Wp,-MD,tools/kconfig/.confdata.o.d      -c -o tools/kconfig/confdata.o tools/kconfig/confdata.c
gcc -Wp,-MD,tools/kconfig/.expr.o.d      -c -o tools/kconfig/expr.o tools/kconfig/expr.c
flex -otools/kconfig/lexer.lex.c -L tools/kconfig/lexer.l
bison -o tools/kconfig/parser.tab.c --defines=tools/kconfig/parser.tab.h -t -l tools/kconfig/parser.y
gcc -Wp,-MD,tools/kconfig/.preprocess.o.d      -c -o tools/kconfig/preprocess.o tools/kconfig/preprocess.c
gcc -Wp,-MD,tools/kconfig/.symbol.o.d      -c -o tools/kconfig/symbol.o tools/kconfig/symbol.c
gcc -Wp,-MD,tools/kconfig/.lexer.lex.o.d     -I /home/workspace/gengdongjiu/old_machine/XEN/xen/xen/tools/kconfig -c -o tools/kconfig/lexer.lex.o tools/kconfig/lexer.lex.c
gcc -Wp,-MD,tools/kconfig/.parser.tab.o.d     -I /home/workspace/gengdongjiu/old_machine/XEN/xen/xen/tools/kconfig -c -o tools/kconfig/parser.tab.o tools/kconfig/parser.tab.c
gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/confdata.o tools/kconfig/expr.o tools/kconfig/lexer.lex.o tools/kconfig/parser.tab.o tools/kconfig/preprocess.o tools/kconfig/symbol.o
tools/kconfig/conf  --syncconfig Kconfig

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y] Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y] Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y]
Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]
make[2]: Leaving directory '/home/workspace/gengdongjiu/old_machine/XEN/xen/xen' make -f Rules.mk _install
make[2]: Entering directory '/home/workspace/gengdongjiu/old_machine/XEN/xen/xen'

---
 xen/arch/arm/Kconfig           | 5 +++--
 xen/arch/arm/platforms/Kconfig | 1 -
 2 files changed, 3 insertions(+), 3 deletions(-)
xen/arch/arm/Kconfig +3 -2
index ecfa6822e4..373c698018 100644
@@ -35,7 +35,7 @@ config ACPI
 
 config GICV3
 	bool "GICv3 driver"
-	depends on ARM_64 && !NEW_VGIC
+	depends on ARM_64
 	default y
 	---help---
 
@@ -44,13 +44,14 @@ config GICV3
 
 config HAS_ITS
         bool "GICv3 ITS MSI controller support (UNSUPPORTED)" if UNSUPPORTED
-        depends on GICV3 && !NEW_VGIC
+        depends on GICV3
 
 config HVM
         def_bool y
 
 config NEW_VGIC
 	bool "Use new VGIC implementation"
+	depends on !GICV3
 	---help---
 
 	This is an alternative implementation of the ARM GIC interrupt
xen/arch/arm/platforms/Kconfig +0 -1
index c93a6b2756..6d3ee99456 100644
@@ -15,7 +15,6 @@ config ALL_PLAT
 config QEMU
 	bool "QEMU aarch virt machine support"
 	depends on ARM_64
-	select GICV3
 	select HAS_PL011
 	---help---
 	Enable all the required drivers for QEMU aarch64 virt emulated
Signature · 1 line
2.25.1
#1 lore raw

Hi,

Quoted 2 lines · Dongjiu Geng

when enable CONFIG_NEW_VGIC in ARM64 QEMU Platform, it will build failed. so fix it and make it can select GICV2.

As I said in v1, last time I checked QEMU was only able to support virtualization with GICv3. This is why we added a depends on.

If you want to remove it, then I think you ought to explain in the commit message why this is fine. A pointer to the commit or a QEMU version used would be useful.

xen/arch/arm/Kconfig

Quoted 46 lines

---

$ make dist-xen XEN_TARGET_ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j10
make -C xen install
make[1]: Entering directory '/home/workspace/gengdongjiu/old_machine/XEN/xen/xen'
make -f /home/workspace/gengdongjiu/old_machine/XEN/xen/xen/tools/kconfig/Makefile.kconfig ARCH=arm64 SRCARCH=arm HOSTCC="gcc" HOSTCXX="g++" syncconfig
make[2]: Entering directory '/home/workspace/gengdongjiu/old_machine/XEN/xen/xen'
gcc -Wp,-MD,tools/kconfig/.conf.o.d      -c -o tools/kconfig/conf.o tools/kconfig/conf.c
gcc -Wp,-MD,tools/kconfig/.confdata.o.d      -c -o tools/kconfig/confdata.o tools/kconfig/confdata.c
gcc -Wp,-MD,tools/kconfig/.expr.o.d      -c -o tools/kconfig/expr.o tools/kconfig/expr.c
flex -otools/kconfig/lexer.lex.c -L tools/kconfig/lexer.l
bison -o tools/kconfig/parser.tab.c --defines=tools/kconfig/parser.tab.h -t -l tools/kconfig/parser.y
gcc -Wp,-MD,tools/kconfig/.preprocess.o.d      -c -o tools/kconfig/preprocess.o tools/kconfig/preprocess.c
gcc -Wp,-MD,tools/kconfig/.symbol.o.d      -c -o tools/kconfig/symbol.o tools/kconfig/symbol.c
gcc -Wp,-MD,tools/kconfig/.lexer.lex.o.d     -I /home/workspace/gengdongjiu/old_machine/XEN/xen/xen/tools/kconfig -c -o tools/kconfig/lexer.lex.o tools/kconfig/lexer.lex.c
gcc -Wp,-MD,tools/kconfig/.parser.tab.o.d     -I /home/workspace/gengdongjiu/old_machine/XEN/xen/xen/tools/kconfig -c -o tools/kconfig/parser.tab.o tools/kconfig/parser.tab.c
gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/confdata.o tools/kconfig/expr.o tools/kconfig/lexer.lex.o tools/kconfig/parser.tab.o tools/kconfig/preprocess.o tools/kconfig/symbol.o
tools/kconfig/conf  --syncconfig Kconfig

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y] Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y] Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y]
Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]
make[2]: Leaving directory '/home/workspace/gengdongjiu/old_machine/XEN/xen/xen' make -f Rules.mk _install
make[2]: Entering directory '/home/workspace/gengdongjiu/old_machine/XEN/xen/xen'

---
  xen/arch/arm/Kconfig           | 5 +++--
  xen/arch/arm/platforms/Kconfig | 1 -
  2 files changed, 3 insertions(+), 3 deletions(-)
xen/arch/arm/Kconfig +0 -0
index ecfa6822e4..373c698018 100644

The change in arch/arm/Kconfig is not really related to this patch. Technically the part in platforms/Kconfig is sufficient. I still think the change is good to have but it should be in a separate patch.

Quoted 30 lines
xen/arch/arm/Kconfig +3 -2
@@ -35,7 +35,7 @@ config ACPI
 
  config GICV3
  	bool "GICv3 driver"
-	depends on ARM_64 && !NEW_VGIC
+	depends on ARM_64
  	default y
  	---help---
 
@@ -44,13 +44,14 @@ config GICV3
 
  config HAS_ITS
          bool "GICv3 ITS MSI controller support (UNSUPPORTED)" if UNSUPPORTED
-        depends on GICV3 && !NEW_VGIC
+        depends on GICV3
 
  config HVM
          def_bool y
 
  config NEW_VGIC
  	bool "Use new VGIC implementation"
+	depends on !GICV3
  	---help---
 
  	This is an alternative implementation of the ARM GIC interrupt
xen/arch/arm/platforms/Kconfig +0 -0
index c93a6b2756..6d3ee99456 100644

xen/arch/arm/platforms/Kconfig config ALL_PLAT · line 20

Quoted 7 lines
xen/arch/arm/platforms/Kconfig +0 -1
@@ -15,7 +15,6 @@ config ALL_PLAT
  config QEMU
  	bool "QEMU aarch virt machine support"
  	depends on ARM_64
-	select GICV3
  	select HAS_PL011
  	---help---
  	Enable all the required drivers for QEMU aarch64 virt emulated

Cheers,

Signature · 1 line
Julien Grall

A message that is not in the archive (sent off-list or not yet received): CABSBigQjy2jvW6czAXHMvVc9DmHRED5HWz-5At6FN9gPLnzsng@mail.gmail.com

#3 lore raw

Hi,

I am not sure why you dropped the others. I have added them back.

Quoted 8 lines · Dongjiu Geng
Quoted 7 lines · Julien Grall <[email protected]> 于2021年12月24日周五 21:25写道:

Hi,

Quoted 2 lines · Dongjiu Geng

when enable CONFIG_NEW_VGIC in ARM64 QEMU Platform, it will build failed. so fix it and make it can select GICV2.

Quoted 6 lines
Quoted 2 lines

As I said in v1, last time I checked QEMU was only able to support virtualization with GICv3. This is why we added a depends on.

I enabled CONFIG_NEW_VGIC, then it will use GICv2. In my check, it does not report an error.
My QEMU emulator version is 4.0.0. What is the QEMU version that you used?

I am using a more recent QEMU. However, I have always only used GICv3 becuase it was IIRC there first.

Quoted 7 lines
Quoted 5 lines

If you want to remove it, then I think you ought to explain in the commit message why this is fine. A pointer to the commit or a QEMU version used would be useful.

OK,thanks. Can you check if QEMU 4.0.0 is workable with GICv2 on your side?

I don't have direct access to my QEMU setup at the moment. However, looking at the history.

So I would suggest the following commit message:

"
xen/arm: Allow QEMU platform to be built with GICv2

Trying to select PLATFORM_QEMU with NEW_VGIC will result to Kconfig complain about unmet dependencies:

tools/kconfig/conf --syncconfig Kconfig

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y] Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y] Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y] Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]

It turns out that QEMU has been supporting GICv2 virtualization since v3.1.0. So an easy way to solve the issue and allow more custom support is to remove the dependencies on GICv3. "

Quoted 82 lines

It is workable on my side.

Quoted 43 lines
Quoted 43 lines

---

$ make dist-xen XEN_TARGET_ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j10
make -C xen install
make[1]: Entering directory '/home/workspace/gengdongjiu/old_machine/XEN/xen/xen'
make -f /home/workspace/gengdongjiu/old_machine/XEN/xen/xen/tools/kconfig/Makefile.kconfig ARCH=arm64 SRCARCH=arm HOSTCC="gcc" HOSTCXX="g++" syncconfig
make[2]: Entering directory '/home/workspace/gengdongjiu/old_machine/XEN/xen/xen'
gcc -Wp,-MD,tools/kconfig/.conf.o.d      -c -o tools/kconfig/conf.o tools/kconfig/conf.c
gcc -Wp,-MD,tools/kconfig/.confdata.o.d      -c -o tools/kconfig/confdata.o tools/kconfig/confdata.c
gcc -Wp,-MD,tools/kconfig/.expr.o.d      -c -o tools/kconfig/expr.o tools/kconfig/expr.c
flex -otools/kconfig/lexer.lex.c -L tools/kconfig/lexer.l
bison -o tools/kconfig/parser.tab.c --defines=tools/kconfig/parser.tab.h -t -l tools/kconfig/parser.y
gcc -Wp,-MD,tools/kconfig/.preprocess.o.d      -c -o tools/kconfig/preprocess.o tools/kconfig/preprocess.c
gcc -Wp,-MD,tools/kconfig/.symbol.o.d      -c -o tools/kconfig/symbol.o tools/kconfig/symbol.c
gcc -Wp,-MD,tools/kconfig/.lexer.lex.o.d     -I /home/workspace/gengdongjiu/old_machine/XEN/xen/xen/tools/kconfig -c -o tools/kconfig/lexer.lex.o tools/kconfig/lexer.lex.c
gcc -Wp,-MD,tools/kconfig/.parser.tab.o.d     -I /home/workspace/gengdongjiu/old_machine/XEN/xen/xen/tools/kconfig -c -o tools/kconfig/parser.tab.o tools/kconfig/parser.tab.c
gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/confdata.o tools/kconfig/expr.o tools/kconfig/lexer.lex.o tools/kconfig/parser.tab.o tools/kconfig/preprocess.o tools/kconfig/symbol.o
tools/kconfig/conf  --syncconfig Kconfig

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y] Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y] Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y]
Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]
make[2]: Leaving directory '/home/workspace/gengdongjiu/old_machine/XEN/xen/xen' make -f Rules.mk _install
make[2]: Entering directory '/home/workspace/gengdongjiu/old_machine/XEN/xen/xen'

---
   xen/arch/arm/Kconfig           | 5 +++--
   xen/arch/arm/platforms/Kconfig | 1 -
   2 files changed, 3 insertions(+), 3 deletions(-)
Quoted 8 lines

xen/arch/arm/Kconfig

Quoted 4 lines
xen/arch/arm/Kconfig +0 -0
index ecfa6822e4..373c698018 100644

The change in arch/arm/Kconfig is not really related to this patch. Technically the part in platforms/Kconfig is sufficient. I still think the change is good to have but it should be in a separate patch.

sure

Quoted 25 lines
Quoted 25 lines
xen/arch/arm/Kconfig +3 -2
@@ -35,7 +35,7 @@ config ACPI
 
   config GICV3
       bool "GICv3 driver"
-     depends on ARM_64 && !NEW_VGIC
+     depends on ARM_64
       default y
       ---help---
 
@@ -44,13 +44,14 @@ config GICV3
 
   config HAS_ITS
           bool "GICv3 ITS MSI controller support (UNSUPPORTED)" if UNSUPPORTED
-        depends on GICV3 && !NEW_VGIC
+        depends on GICV3
 
   config HVM
           def_bool y
 
   config NEW_VGIC
       bool "Use new VGIC implementation"
+     depends on !GICV3
       ---help---
 
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
xen/arch/arm/Kconfig +0 -0
       This is an alternative implementation of the ARM GIC interrupt
xen/arch/arm/platforms/Kconfig +0 -0
index c93a6b2756..6d3ee99456 100644
Quoted 8 lines

xen/arch/arm/platforms/Kconfig config ALL_PLAT · line 20

Quoted 8 lines
xen/arch/arm/platforms/Kconfig +0 -1
@@ -15,7 +15,6 @@ config ALL_PLAT
   config QEMU
       bool "QEMU aarch virt machine support"
       depends on ARM_64
-     select GICV3
       select HAS_PL011
       ---help---
       Enable all the required drivers for QEMU aarch64 virt emulated

While writing a proposal for the commit message, I remembered that the goal of CONFIG_QEMU was to select all the required drivers to be able to boot Xen on QEMU.

AFAICT, if you start from tiny64_defconfig, you would not have GICv3 selected. So we would technically break users of QEMU with GICv3.

I am not entirely sure how to approach it. I can think of 2 options:

1) Use 'select GICv3 if !NEW_VGIC'
2) Add a specific platform for QEMU new vGIC

I have the feeling that 1) will result to same unmet dependency issue. Stefano any opinions?

Cheers,

Signature · 1 line
Julien Grall
#4 lore raw
Quoted 4 lines · Julien Grall <[email protected]> 于2021年12月24日周五 22:21写道:

Hi,

I am not sure why you dropped the others. I have added them back.

sorry, it is my mistake

Quoted 57 lines · Dongjiu Geng
Quoted 8 lines
Quoted 7 lines · Julien Grall <[email protected]> 于2021年12月24日周五 21:25写道:

Hi,

Quoted 2 lines · Dongjiu Geng

when enable CONFIG_NEW_VGIC in ARM64 QEMU Platform, it will build failed. so fix it and make it can select GICV2.

Quoted 6 lines
Quoted 2 lines

As I said in v1, last time I checked QEMU was only able to support virtualization with GICv3. This is why we added a depends on.

I enabled CONFIG_NEW_VGIC, then it will use GICv2. In my check, it does not report an error.
My QEMU emulator version is 4.0.0. What is the QEMU version that you used?

I am using a more recent QEMU. However, I have always only used GICv3 becuase it was IIRC there first.

Quoted 7 lines
Quoted 5 lines

If you want to remove it, then I think you ought to explain in the commit message why this is fine. A pointer to the commit or a QEMU version used would be useful.

OK,thanks. Can you check if QEMU 4.0.0 is workable with GICv2 on your side?

I don't have direct access to my QEMU setup at the moment. However, looking at the history.

So I would suggest the following commit message:

"
xen/arm: Allow QEMU platform to be built with GICv2

Trying to select PLATFORM_QEMU with NEW_VGIC will result to Kconfig complain about unmet dependencies:

tools/kconfig/conf --syncconfig Kconfig

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y] Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y] Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y] Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]

Quoted 4 lines

It turns out that QEMU has been supporting GICv2 virtualization since v3.1.0. So an easy way to solve the issue and allow more custom support is to remove the dependencies on GICv3.
"

Ok, thanks very much for your suggestion.

Quoted 101 lines
Quoted 83 lines

It is workable on my side.

Quoted 43 lines
Quoted 43 lines

---

$ make dist-xen XEN_TARGET_ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j10
make -C xen install
make[1]: Entering directory '/home/workspace/gengdongjiu/old_machine/XEN/xen/xen'
make -f /home/workspace/gengdongjiu/old_machine/XEN/xen/xen/tools/kconfig/Makefile.kconfig ARCH=arm64 SRCARCH=arm HOSTCC="gcc" HOSTCXX="g++" syncconfig
make[2]: Entering directory '/home/workspace/gengdongjiu/old_machine/XEN/xen/xen'
gcc -Wp,-MD,tools/kconfig/.conf.o.d      -c -o tools/kconfig/conf.o tools/kconfig/conf.c
gcc -Wp,-MD,tools/kconfig/.confdata.o.d      -c -o tools/kconfig/confdata.o tools/kconfig/confdata.c
gcc -Wp,-MD,tools/kconfig/.expr.o.d      -c -o tools/kconfig/expr.o tools/kconfig/expr.c
flex -otools/kconfig/lexer.lex.c -L tools/kconfig/lexer.l
bison -o tools/kconfig/parser.tab.c --defines=tools/kconfig/parser.tab.h -t -l tools/kconfig/parser.y
gcc -Wp,-MD,tools/kconfig/.preprocess.o.d      -c -o tools/kconfig/preprocess.o tools/kconfig/preprocess.c
gcc -Wp,-MD,tools/kconfig/.symbol.o.d      -c -o tools/kconfig/symbol.o tools/kconfig/symbol.c
gcc -Wp,-MD,tools/kconfig/.lexer.lex.o.d     -I /home/workspace/gengdongjiu/old_machine/XEN/xen/xen/tools/kconfig -c -o tools/kconfig/lexer.lex.o tools/kconfig/lexer.lex.c
gcc -Wp,-MD,tools/kconfig/.parser.tab.o.d     -I /home/workspace/gengdongjiu/old_machine/XEN/xen/xen/tools/kconfig -c -o tools/kconfig/parser.tab.o tools/kconfig/parser.tab.c
gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/confdata.o tools/kconfig/expr.o tools/kconfig/lexer.lex.o tools/kconfig/parser.tab.o tools/kconfig/preprocess.o tools/kconfig/symbol.o
tools/kconfig/conf  --syncconfig Kconfig

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y] Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y] Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y]
Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]
make[2]: Leaving directory '/home/workspace/gengdongjiu/old_machine/XEN/xen/xen' make -f Rules.mk _install
make[2]: Entering directory '/home/workspace/gengdongjiu/old_machine/XEN/xen/xen'

---
   xen/arch/arm/Kconfig           | 5 +++--
   xen/arch/arm/platforms/Kconfig | 1 -
   2 files changed, 3 insertions(+), 3 deletions(-)
Quoted 8 lines

xen/arch/arm/Kconfig

Quoted 4 lines
xen/arch/arm/Kconfig +0 -0
index ecfa6822e4..373c698018 100644

The change in arch/arm/Kconfig is not really related to this patch. Technically the part in platforms/Kconfig is sufficient. I still think the change is good to have but it should be in a separate patch.

sure

Quoted 25 lines
Quoted 25 lines
xen/arch/arm/Kconfig +3 -2
@@ -35,7 +35,7 @@ config ACPI
 
   config GICV3
       bool "GICv3 driver"
-     depends on ARM_64 && !NEW_VGIC
+     depends on ARM_64
       default y
       ---help---
 
@@ -44,13 +44,14 @@ config GICV3
 
   config HAS_ITS
           bool "GICv3 ITS MSI controller support (UNSUPPORTED)" if UNSUPPORTED
-        depends on GICV3 && !NEW_VGIC
+        depends on GICV3
 
   config HVM
           def_bool y
 
   config NEW_VGIC
       bool "Use new VGIC implementation"
+     depends on !GICV3
       ---help---
 
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
xen/arch/arm/Kconfig +0 -0
       This is an alternative implementation of the ARM GIC interrupt
xen/arch/arm/platforms/Kconfig +0 -0
index c93a6b2756..6d3ee99456 100644
Quoted 8 lines

xen/arch/arm/platforms/Kconfig config ALL_PLAT · line 20

Quoted 8 lines
xen/arch/arm/platforms/Kconfig +0 -1
@@ -15,7 +15,6 @@ config ALL_PLAT
   config QEMU
       bool "QEMU aarch virt machine support"
       depends on ARM_64
-     select GICV3
       select HAS_PL011
       ---help---
       Enable all the required drivers for QEMU aarch64 virt emulated

While writing a proposal for the commit message, I remembered that the goal of CONFIG_QEMU was to select all the required drivers to be able to boot Xen on QEMU.

Quoted 2 lines

AFAICT, if you start from tiny64_defconfig, you would not have GICv3 selected. So we would technically break users of QEMU with GICv3.

I think I can add CONFIG_GICV3=y in arch/arm/configs/tiny64_defconfig to this patch, if it must to use GICV3.

Quoted 8 lines

I am not entirely sure how to approach it. I can think of 2 options:

1) Use 'select GICv3 if !NEW_VGIC'
2) Add a specific platform for QEMU new vGIC

I have the feeling that 1) will result to same unmet dependency issue. Stefano any opinions?

Stefano?

Quoted 5 lines

Cheers,

--
Julien Grall

#5 lore raw
Quoted 66 lines · Dongjiu Geng <[email protected]> 于2021年12月26日周日 18:06写道:
Quoted 4 lines · Julien Grall <[email protected]> 于2021年12月24日周五 22:21写道:

Hi,

I am not sure why you dropped the others. I have added them back.

sorry, it is my mistake

Quoted 57 lines · Dongjiu Geng
Quoted 8 lines
Quoted 7 lines · Julien Grall <[email protected]> 于2021年12月24日周五 21:25写道:

Hi,

Quoted 2 lines · Dongjiu Geng

when enable CONFIG_NEW_VGIC in ARM64 QEMU Platform, it will build failed. so fix it and make it can select GICV2.

Quoted 6 lines
Quoted 2 lines

As I said in v1, last time I checked QEMU was only able to support virtualization with GICv3. This is why we added a depends on.

I enabled CONFIG_NEW_VGIC, then it will use GICv2. In my check, it does not report an error.
My QEMU emulator version is 4.0.0. What is the QEMU version that you used?

I am using a more recent QEMU. However, I have always only used GICv3 becuase it was IIRC there first.

Quoted 7 lines
Quoted 5 lines

If you want to remove it, then I think you ought to explain in the commit message why this is fine. A pointer to the commit or a QEMU version used would be useful.

OK,thanks. Can you check if QEMU 4.0.0 is workable with GICv2 on your side?

I don't have direct access to my QEMU setup at the moment. However, looking at the history.

So I would suggest the following commit message:

"
xen/arm: Allow QEMU platform to be built with GICv2

Trying to select PLATFORM_QEMU with NEW_VGIC will result to Kconfig complain about unmet dependencies:

tools/kconfig/conf --syncconfig Kconfig

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y] Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y] Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y] Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]

Quoted 110 lines
Quoted 4 lines

It turns out that QEMU has been supporting GICv2 virtualization since v3.1.0. So an easy way to solve the issue and allow more custom support is to remove the dependencies on GICv3.
"

Ok, thanks very much for your suggestion.

Quoted 103 lines
Quoted 83 lines

It is workable on my side.

Quoted 43 lines
Quoted 43 lines

---

$ make dist-xen XEN_TARGET_ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j10
make -C xen install
make[1]: Entering directory '/home/workspace/gengdongjiu/old_machine/XEN/xen/xen'
make -f /home/workspace/gengdongjiu/old_machine/XEN/xen/xen/tools/kconfig/Makefile.kconfig ARCH=arm64 SRCARCH=arm HOSTCC="gcc" HOSTCXX="g++" syncconfig
make[2]: Entering directory '/home/workspace/gengdongjiu/old_machine/XEN/xen/xen'
gcc -Wp,-MD,tools/kconfig/.conf.o.d      -c -o tools/kconfig/conf.o tools/kconfig/conf.c
gcc -Wp,-MD,tools/kconfig/.confdata.o.d      -c -o tools/kconfig/confdata.o tools/kconfig/confdata.c
gcc -Wp,-MD,tools/kconfig/.expr.o.d      -c -o tools/kconfig/expr.o tools/kconfig/expr.c
flex -otools/kconfig/lexer.lex.c -L tools/kconfig/lexer.l
bison -o tools/kconfig/parser.tab.c --defines=tools/kconfig/parser.tab.h -t -l tools/kconfig/parser.y
gcc -Wp,-MD,tools/kconfig/.preprocess.o.d      -c -o tools/kconfig/preprocess.o tools/kconfig/preprocess.c
gcc -Wp,-MD,tools/kconfig/.symbol.o.d      -c -o tools/kconfig/symbol.o tools/kconfig/symbol.c
gcc -Wp,-MD,tools/kconfig/.lexer.lex.o.d     -I /home/workspace/gengdongjiu/old_machine/XEN/xen/xen/tools/kconfig -c -o tools/kconfig/lexer.lex.o tools/kconfig/lexer.lex.c
gcc -Wp,-MD,tools/kconfig/.parser.tab.o.d     -I /home/workspace/gengdongjiu/old_machine/XEN/xen/xen/tools/kconfig -c -o tools/kconfig/parser.tab.o tools/kconfig/parser.tab.c
gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/confdata.o tools/kconfig/expr.o tools/kconfig/lexer.lex.o tools/kconfig/parser.tab.o tools/kconfig/preprocess.o tools/kconfig/symbol.o
tools/kconfig/conf  --syncconfig Kconfig

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y] Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y] Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y]
Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]
make[2]: Leaving directory '/home/workspace/gengdongjiu/old_machine/XEN/xen/xen' make -f Rules.mk _install
make[2]: Entering directory '/home/workspace/gengdongjiu/old_machine/XEN/xen/xen'

---
   xen/arch/arm/Kconfig           | 5 +++--
   xen/arch/arm/platforms/Kconfig | 1 -
   2 files changed, 3 insertions(+), 3 deletions(-)
Quoted 8 lines

xen/arch/arm/Kconfig

Quoted 4 lines
xen/arch/arm/Kconfig +0 -0
index ecfa6822e4..373c698018 100644

The change in arch/arm/Kconfig is not really related to this patch. Technically the part in platforms/Kconfig is sufficient. I still think the change is good to have but it should be in a separate patch.

sure

Quoted 25 lines
Quoted 25 lines
xen/arch/arm/Kconfig +3 -2
@@ -35,7 +35,7 @@ config ACPI
 
   config GICV3
       bool "GICv3 driver"
-     depends on ARM_64 && !NEW_VGIC
+     depends on ARM_64
       default y
       ---help---
 
@@ -44,13 +44,14 @@ config GICV3
 
   config HAS_ITS
           bool "GICv3 ITS MSI controller support (UNSUPPORTED)" if UNSUPPORTED
-        depends on GICV3 && !NEW_VGIC
+        depends on GICV3
 
   config HVM
           def_bool y
 
   config NEW_VGIC
       bool "Use new VGIC implementation"
+     depends on !GICV3
       ---help---
 
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
xen/arch/arm/Kconfig +0 -0
       This is an alternative implementation of the ARM GIC interrupt
xen/arch/arm/platforms/Kconfig +0 -0
index c93a6b2756..6d3ee99456 100644
Quoted 8 lines

xen/arch/arm/platforms/Kconfig config ALL_PLAT · line 20

Quoted 8 lines
xen/arch/arm/platforms/Kconfig +0 -1
@@ -15,7 +15,6 @@ config ALL_PLAT
   config QEMU
       bool "QEMU aarch virt machine support"
       depends on ARM_64
-     select GICV3
       select HAS_PL011
       ---help---
       Enable all the required drivers for QEMU aarch64 virt emulated

While writing a proposal for the commit message, I remembered that the goal of CONFIG_QEMU was to select all the required drivers to be able to boot Xen on QEMU.

AFAICT, if you start from tiny64_defconfig, you would not have GICv3 selected. So we would technically break users of QEMU with GICv3.

Hi, Julien

I revert my patch and generate the .config file using this comand :
"make tiny64_defconfig CROSS_COMPILE=aarch64-linux-gnu- XEN_TARGET_ARCH=arm64"
The generated .config[1] also does not select CONFIG_GICV3 and CONFIG_NEW_VGIC. I think you metioned issue does not related with my changes. thanks.

[1]
#
# Architecture Features
#
CONFIG_64BIT=y
CONFIG_NR_CPUS=128
# CONFIG_GICV3 is not set
CONFIG_HVM=y
# CONFIG_NEW_VGIC is not set

Quoted 20 lines

I think I can add CONFIG_GICV3=y in arch/arm/configs/tiny64_defconfig to this patch, if it must to use GICV3.

Quoted 8 lines

I am not entirely sure how to approach it. I can think of 2 options:

1) Use 'select GICv3 if !NEW_VGIC'
2) Add a specific platform for QEMU new vGIC

I have the feeling that 1) will result to same unmet dependency issue. Stefano any opinions?

Stefano?

Quoted 5 lines

Cheers,

--
Julien Grall

#6 lore raw
In reply to Dongjiu Geng

Hello,

Quoted 174 lines · Dongjiu Geng
Quoted 4 lines · Julien Grall <[email protected]> 于2021年12月24日周五 22:21写道:

Hi,

I am not sure why you dropped the others. I have added them back.

sorry, it is my mistake

Quoted 57 lines · Dongjiu Geng
Quoted 8 lines
Quoted 7 lines · Julien Grall <[email protected]> 于2021年12月24日周五 21:25写道:

Hi,

Quoted 2 lines · Dongjiu Geng

when enable CONFIG_NEW_VGIC in ARM64 QEMU Platform, it will build failed. so fix it and make it can select GICV2.

Quoted 6 lines
Quoted 2 lines

As I said in v1, last time I checked QEMU was only able to support virtualization with GICv3. This is why we added a depends on.

I enabled CONFIG_NEW_VGIC, then it will use GICv2. In my check, it does not report an error.
My QEMU emulator version is 4.0.0. What is the QEMU version that you used?

I am using a more recent QEMU. However, I have always only used GICv3 becuase it was IIRC there first.

Quoted 7 lines
Quoted 5 lines

If you want to remove it, then I think you ought to explain in the commit message why this is fine. A pointer to the commit or a QEMU version used would be useful.

OK,thanks. Can you check if QEMU 4.0.0 is workable with GICv2 on your side?

I don't have direct access to my QEMU setup at the moment. However, looking at the history.

So I would suggest the following commit message:

"
xen/arm: Allow QEMU platform to be built with GICv2

Trying to select PLATFORM_QEMU with NEW_VGIC will result to Kconfig complain about unmet dependencies:

tools/kconfig/conf --syncconfig Kconfig

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y] Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y] Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y] Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]

Quoted 4 lines

It turns out that QEMU has been supporting GICv2 virtualization since v3.1.0. So an easy way to solve the issue and allow more custom support is to remove the dependencies on GICv3.
"

Ok, thanks very much for your suggestion.

Quoted 101 lines
Quoted 83 lines

It is workable on my side.

Quoted 43 lines
Quoted 43 lines

---

$ make dist-xen XEN_TARGET_ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j10
make -C xen install
make[1]: Entering directory '/home/workspace/gengdongjiu/old_machine/XEN/xen/xen'
make -f /home/workspace/gengdongjiu/old_machine/XEN/xen/xen/tools/kconfig/Makefile.kconfig ARCH=arm64 SRCARCH=arm HOSTCC="gcc" HOSTCXX="g++" syncconfig
make[2]: Entering directory '/home/workspace/gengdongjiu/old_machine/XEN/xen/xen'
gcc -Wp,-MD,tools/kconfig/.conf.o.d      -c -o tools/kconfig/conf.o tools/kconfig/conf.c
gcc -Wp,-MD,tools/kconfig/.confdata.o.d      -c -o tools/kconfig/confdata.o tools/kconfig/confdata.c
gcc -Wp,-MD,tools/kconfig/.expr.o.d      -c -o tools/kconfig/expr.o tools/kconfig/expr.c
flex -otools/kconfig/lexer.lex.c -L tools/kconfig/lexer.l
bison -o tools/kconfig/parser.tab.c --defines=tools/kconfig/parser.tab.h -t -l tools/kconfig/parser.y
gcc -Wp,-MD,tools/kconfig/.preprocess.o.d      -c -o tools/kconfig/preprocess.o tools/kconfig/preprocess.c
gcc -Wp,-MD,tools/kconfig/.symbol.o.d      -c -o tools/kconfig/symbol.o tools/kconfig/symbol.c
gcc -Wp,-MD,tools/kconfig/.lexer.lex.o.d     -I /home/workspace/gengdongjiu/old_machine/XEN/xen/xen/tools/kconfig -c -o tools/kconfig/lexer.lex.o tools/kconfig/lexer.lex.c
gcc -Wp,-MD,tools/kconfig/.parser.tab.o.d     -I /home/workspace/gengdongjiu/old_machine/XEN/xen/xen/tools/kconfig -c -o tools/kconfig/parser.tab.o tools/kconfig/parser.tab.c
gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/confdata.o tools/kconfig/expr.o tools/kconfig/lexer.lex.o tools/kconfig/parser.tab.o tools/kconfig/preprocess.o tools/kconfig/symbol.o
tools/kconfig/conf  --syncconfig Kconfig

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y] Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y] Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y]
Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]
make[2]: Leaving directory '/home/workspace/gengdongjiu/old_machine/XEN/xen/xen' make -f Rules.mk _install
make[2]: Entering directory '/home/workspace/gengdongjiu/old_machine/XEN/xen/xen'

---
   xen/arch/arm/Kconfig           | 5 +++--
   xen/arch/arm/platforms/Kconfig | 1 -
   2 files changed, 3 insertions(+), 3 deletions(-)
Quoted 8 lines

xen/arch/arm/Kconfig

Quoted 4 lines
xen/arch/arm/Kconfig +0 -0
index ecfa6822e4..373c698018 100644

The change in arch/arm/Kconfig is not really related to this patch. Technically the part in platforms/Kconfig is sufficient. I still think the change is good to have but it should be in a separate patch.

sure

Quoted 25 lines
Quoted 25 lines
xen/arch/arm/Kconfig +3 -2
@@ -35,7 +35,7 @@ config ACPI
 
   config GICV3
       bool "GICv3 driver"
-     depends on ARM_64 && !NEW_VGIC
+     depends on ARM_64
       default y
       ---help---
 
@@ -44,13 +44,14 @@ config GICV3
 
   config HAS_ITS
           bool "GICv3 ITS MSI controller support (UNSUPPORTED)" if UNSUPPORTED
-        depends on GICV3 && !NEW_VGIC
+        depends on GICV3
 
   config HVM
           def_bool y
 
   config NEW_VGIC
       bool "Use new VGIC implementation"
+     depends on !GICV3
       ---help---
 
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
xen/arch/arm/Kconfig +0 -0
       This is an alternative implementation of the ARM GIC interrupt
xen/arch/arm/platforms/Kconfig +0 -0
index c93a6b2756..6d3ee99456 100644
Quoted 8 lines

xen/arch/arm/platforms/Kconfig config ALL_PLAT · line 20

Quoted 8 lines
xen/arch/arm/platforms/Kconfig +0 -1
@@ -15,7 +15,6 @@ config ALL_PLAT
   config QEMU
       bool "QEMU aarch virt machine support"
       depends on ARM_64
-     select GICV3
       select HAS_PL011
       ---help---
       Enable all the required drivers for QEMU aarch64 virt emulated

While writing a proposal for the commit message, I remembered that the goal of CONFIG_QEMU was to select all the required drivers to be able to boot Xen on QEMU.

Quoted 5 lines
Quoted 2 lines

AFAICT, if you start from tiny64_defconfig, you would not have GICv3 selected. So we would technically break users of QEMU with GICv3.

I think I can add CONFIG_GICV3=y in arch/arm/configs/tiny64_defconfig to this patch, if it must to use GICV3.

Please don't update tiny64_defconfig. The goal of tiny64_defconfig is to have a config with only the bare-minimum. If add CONFIG_GICV3=y, then it will be enabled when it is not necessary.

Cheers,

#7 lore raw
Quoted 181 lines · Julien Grall <[email protected]> 于2021年12月28日周二 18:27写道:

Hello,

Quoted 177 lines · Dongjiu Geng
Quoted 4 lines · Julien Grall <[email protected]> 于2021年12月24日周五 22:21写道:

Hi,

I am not sure why you dropped the others. I have added them back.

sorry, it is my mistake

Quoted 57 lines · Dongjiu Geng
Quoted 8 lines
Quoted 7 lines · Julien Grall <[email protected]> 于2021年12月24日周五 21:25写道:

Hi,

Quoted 2 lines · Dongjiu Geng

when enable CONFIG_NEW_VGIC in ARM64 QEMU Platform, it will build failed. so fix it and make it can select GICV2.

Quoted 6 lines
Quoted 2 lines

As I said in v1, last time I checked QEMU was only able to support virtualization with GICv3. This is why we added a depends on.

I enabled CONFIG_NEW_VGIC, then it will use GICv2. In my check, it does not report an error.
My QEMU emulator version is 4.0.0. What is the QEMU version that you used?

I am using a more recent QEMU. However, I have always only used GICv3 becuase it was IIRC there first.

Quoted 7 lines
Quoted 5 lines

If you want to remove it, then I think you ought to explain in the commit message why this is fine. A pointer to the commit or a QEMU version used would be useful.

OK,thanks. Can you check if QEMU 4.0.0 is workable with GICv2 on your side?

I don't have direct access to my QEMU setup at the moment. However, looking at the history.

So I would suggest the following commit message:

"
xen/arm: Allow QEMU platform to be built with GICv2

Trying to select PLATFORM_QEMU with NEW_VGIC will result to Kconfig complain about unmet dependencies:

tools/kconfig/conf --syncconfig Kconfig

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y] Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y] Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y] Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]

Quoted 4 lines

It turns out that QEMU has been supporting GICv2 virtualization since v3.1.0. So an easy way to solve the issue and allow more custom support is to remove the dependencies on GICv3.
"

Ok, thanks very much for your suggestion.

Quoted 103 lines
Quoted 83 lines

It is workable on my side.

Quoted 43 lines
Quoted 43 lines

---

$ make dist-xen XEN_TARGET_ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j10
make -C xen install
make[1]: Entering directory '/home/workspace/gengdongjiu/old_machine/XEN/xen/xen'
make -f /home/workspace/gengdongjiu/old_machine/XEN/xen/xen/tools/kconfig/Makefile.kconfig ARCH=arm64 SRCARCH=arm HOSTCC="gcc" HOSTCXX="g++" syncconfig
make[2]: Entering directory '/home/workspace/gengdongjiu/old_machine/XEN/xen/xen'
gcc -Wp,-MD,tools/kconfig/.conf.o.d      -c -o tools/kconfig/conf.o tools/kconfig/conf.c
gcc -Wp,-MD,tools/kconfig/.confdata.o.d      -c -o tools/kconfig/confdata.o tools/kconfig/confdata.c
gcc -Wp,-MD,tools/kconfig/.expr.o.d      -c -o tools/kconfig/expr.o tools/kconfig/expr.c
flex -otools/kconfig/lexer.lex.c -L tools/kconfig/lexer.l
bison -o tools/kconfig/parser.tab.c --defines=tools/kconfig/parser.tab.h -t -l tools/kconfig/parser.y
gcc -Wp,-MD,tools/kconfig/.preprocess.o.d      -c -o tools/kconfig/preprocess.o tools/kconfig/preprocess.c
gcc -Wp,-MD,tools/kconfig/.symbol.o.d      -c -o tools/kconfig/symbol.o tools/kconfig/symbol.c
gcc -Wp,-MD,tools/kconfig/.lexer.lex.o.d     -I /home/workspace/gengdongjiu/old_machine/XEN/xen/xen/tools/kconfig -c -o tools/kconfig/lexer.lex.o tools/kconfig/lexer.lex.c
gcc -Wp,-MD,tools/kconfig/.parser.tab.o.d     -I /home/workspace/gengdongjiu/old_machine/XEN/xen/xen/tools/kconfig -c -o tools/kconfig/parser.tab.o tools/kconfig/parser.tab.c
gcc  -o tools/kconfig/conf tools/kconfig/conf.o tools/kconfig/confdata.o tools/kconfig/expr.o tools/kconfig/lexer.lex.o tools/kconfig/parser.tab.o tools/kconfig/preprocess.o tools/kconfig/symbol.o
tools/kconfig/conf  --syncconfig Kconfig

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y] Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y] Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]

WARNING: unmet direct dependencies detected for GICV3
Depends on [n]: ARM_64 [=y] && !NEW_VGIC [=y]
Selected by [y]:
- QEMU [=y] && <choice> && ARM_64 [=y]
make[2]: Leaving directory '/home/workspace/gengdongjiu/old_machine/XEN/xen/xen' make -f Rules.mk _install
make[2]: Entering directory '/home/workspace/gengdongjiu/old_machine/XEN/xen/xen'

---
   xen/arch/arm/Kconfig           | 5 +++--
   xen/arch/arm/platforms/Kconfig | 1 -
   2 files changed, 3 insertions(+), 3 deletions(-)
Quoted 8 lines

xen/arch/arm/Kconfig

Quoted 4 lines
xen/arch/arm/Kconfig +0 -0
index ecfa6822e4..373c698018 100644

The change in arch/arm/Kconfig is not really related to this patch. Technically the part in platforms/Kconfig is sufficient. I still think the change is good to have but it should be in a separate patch.

sure

Quoted 25 lines
Quoted 25 lines
xen/arch/arm/Kconfig +3 -2
@@ -35,7 +35,7 @@ config ACPI
 
   config GICV3
       bool "GICv3 driver"
-     depends on ARM_64 && !NEW_VGIC
+     depends on ARM_64
       default y
       ---help---
 
@@ -44,13 +44,14 @@ config GICV3
 
   config HAS_ITS
           bool "GICv3 ITS MSI controller support (UNSUPPORTED)" if UNSUPPORTED
-        depends on GICV3 && !NEW_VGIC
+        depends on GICV3
 
   config HVM
           def_bool y
 
   config NEW_VGIC
       bool "Use new VGIC implementation"
+     depends on !GICV3
       ---help---
 
Quoted 13 lines
Quoted 5 lines
Quoted 5 lines
xen/arch/arm/Kconfig +0 -0
       This is an alternative implementation of the ARM GIC interrupt
xen/arch/arm/platforms/Kconfig +0 -0
index c93a6b2756..6d3ee99456 100644
Quoted 8 lines

xen/arch/arm/platforms/Kconfig config ALL_PLAT · line 20

Quoted 8 lines
xen/arch/arm/platforms/Kconfig +0 -1
@@ -15,7 +15,6 @@ config ALL_PLAT
   config QEMU
       bool "QEMU aarch virt machine support"
       depends on ARM_64
-     select GICV3
       select HAS_PL011
       ---help---
       Enable all the required drivers for QEMU aarch64 virt emulated

While writing a proposal for the commit message, I remembered that the goal of CONFIG_QEMU was to select all the required drivers to be able to boot Xen on QEMU.

AFAICT, if you start from tiny64_defconfig, you would not have GICv3 selected. So we would technically break users of QEMU with GICv3.

Quoted 6 lines
Quoted 2 lines

I think I can add CONFIG_GICV3=y in arch/arm/configs/tiny64_defconfig to this patch, if it must to use GICV3.

Please don't update tiny64_defconfig. The goal of tiny64_defconfig is to have a config with only the bare-minimum. If add CONFIG_GICV3=y, then it will be enabled when it is not necessary.

Ok,we can let the user configure the CONFIG_GICV3 in tiny64_defconfig according his neccesary.
So I think my modification does not affect the tiny64_defconfig. what is your concern about it?

Quoted 2 lines

Cheers,

#8 lore raw

Hi,

Quoted 7 lines · Dongjiu Geng
Quoted 3 lines

Please don't update tiny64_defconfig. The goal of tiny64_defconfig is to have a config with only the bare-minimum. If add CONFIG_GICV3=y, then it will be enabled when it is not necessary.

Ok,we can let the user configure the CONFIG_GICV3 in tiny64_defconfig according his neccesary.
So I think my modification does not affect the tiny64_defconfig.

But you modified tiny64_defconfig. Anything you add in it means it is going to be enabled by default.

Quoted 2 lines

what
is your concern about it?

As I wrote before, the goal of tiny64_defconfig is to enable the strict minimum. I don't consider GICv3 to be part of this.

Instead, we should let each user decide whether they want to include it depending on the platform they are targeting.

Cheers,

#9 lore raw
Quoted 15 lines · Julien Grall <[email protected]> 于2021年12月28日周二 20:30写道:

Hi,

Quoted 7 lines · Dongjiu Geng
Quoted 3 lines

Please don't update tiny64_defconfig. The goal of tiny64_defconfig is to have a config with only the bare-minimum. If add CONFIG_GICV3=y, then it will be enabled when it is not necessary.

Ok,we can let the user configure the CONFIG_GICV3 in tiny64_defconfig according his neccesary.
So I think my modification does not affect the tiny64_defconfig.

But you modified tiny64_defconfig. Anything you add in it means it is going to be enabled by default.

Quoted 8 lines
Quoted 2 lines

what
is your concern about it?

As I wrote before, the goal of tiny64_defconfig is to enable the strict minimum. I don't consider GICv3 to be part of this.

Instead, we should let each user decide whether they want to include it depending on the platform they are targeting.

Ok, thanks. I think we should not consider tiny64_defconfig, because the user can decide whether to use GICV3 or NEW_GIC.

Quoted 2 lines

Cheers,