x86/run: Use separate "-accel" option to configure the accelerator
PATCH 1/1 x86/run: Use separate "-accel" option to configure the accelerator
When configuring accelerator via machine's "accel" property, it cannot pass additional ACCEL_PROPS. For example, it hits following error when configuring KVM with "notify-vmexit":
# ACCEL="kvm,notify-vmexit=internal-error" ./x86-run x86/apic.c
# qemu-system-x86_64: Property 'pc-i440fx-11.1-machine.notify-vmexit' not found
Switch to use separate "-accel" option to configure the accelerator.
--- x86/run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
x86/run +1 -1
@@ -43,7 +43,7 @@ fi pit="-global kvm-pit.lost_tick_policy=discard" command="${qemu} --no-reboot -nodefaults $pit $pc_testdev -display none -serial stdio $pci_testdev" -command+=" -machine accel=$ACCEL$ACCEL_PROPS" +command+=" -accel $ACCEL$ACCEL_PROPS" if [ "${CONFIG_EFI}" != y ]; then command+=" -kernel" fi
Signature · 1 line
2.43.0
Sean Christopherson
reviewerQuoted 19 lines · Xiaoyao Li
When configuring accelerator via machine's "accel" property, it cannot pass additional
ACCEL_PROPS. For example, it hits following error when configuring KVM with "notify-vmexit":# ACCEL="kvm,notify-vmexit=internal-error" ./x86-run
x86/apic.c
# qemu-system-x86_64: Property 'pc-i440fx-11.1-machine.notify-vmexit' not foundSwitch to use separate "-accel" option to configure the accelerator.
Signed-off-by Xiaoyao Li <[email protected]>--- x86/run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)x86/run +0
-0
x86/run fi · line 46
Quoted 5 lines
x86/run +1
-1@@ -43,7 +43,7 @@ fi pit="-global kvm-pit.lost_tick_policy=discard" command="${qemu} --no-reboot -nodefaults $pit $pc_testdev -display none -serial stdio $pci_testdev" -command+=" -machine accel=$ACCEL$ACCEL_PROPS" +command+=" -accel $ACCEL$ACCEL_PROPS"
This breaks my setup for specifying kernel_irqchip=split.
qemu: -accel kvm,kernel_irqchip=split: Property 'kvm-accel.kernel_irqchip' not found
Quoted 6 lines
x86/run +0
-0if [ "${CONFIG_EFI}" != y ]; then command+=" -kernel" fiSignature · 1 line
2.43.0
Quoted 22 lines · Sean Christopherson
Quoted 21 lines · Xiaoyao Li
When configuring accelerator via machine's "accel" property, it cannot pass additional
ACCEL_PROPS. For example, it hits following error when configuring KVM with "notify-vmexit":# ACCEL="kvm,notify-vmexit=internal-error" ./x86-run x86/apic.c # qemu-system-x86_64: Property 'pc-i440fx-11.1-machine.notify-vmexit' not foundSwitch to use separate "-accel" option to configure the accelerator.
Signed-off-by Xiaoyao Li <[email protected]>--- x86/run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)x86/run +0
-0@@ -43,7 +43,7 @@ fi pit="-global kvm-pit.lost_tick_policy=discard"
Quoted 7 lines
x86/run fi · line 46
Quoted 3 lines
x86/run +1
-1command="${qemu} --no-reboot -nodefaults $pit $pc_testdev -display none -serial stdio $pci_testdev" -command+=" -machine accel=$ACCEL$ACCEL_PROPS" +command+=" -accel $ACCEL$ACCEL_PROPS"This breaks my setup for specifying kernel_irqchip=split.
qemu: -accel kvm,kernel_irqchip=split: Property 'kvm-accel.kernel_irqchip' not found
If you switch "kernel_irqchip" to "kernel-irqchip", it should work again.
This needs to be fixed on QEMU side. I'll look at it.
Sean Christopherson
reviewerQuoted 28 lines · Xiaoyao Li
Quoted 27 lines · Sean Christopherson
Quoted 19 lines · Xiaoyao Li
When configuring accelerator via machine's "accel" property, it cannot pass additional
ACCEL_PROPS. For example, it hits following error when configuring KVM with "notify-vmexit":# ACCEL="kvm,notify-vmexit=internal-error" ./x86-run x86/apic.c # qemu-system-x86_64: Property 'pc-i440fx-11.1-machine.notify-vmexit' not foundSwitch to use separate "-accel" option to configure the accelerator.
Signed-off-by Xiaoyao Li <[email protected]>--- x86/run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)x86/run +0
-0x86/run fi · line 45
Quoted 4 lines
x86/run +1
-1@@ -43,7 +43,7 @@ fi pit="-global kvm-pit.lost_tick_policy=discard" command="${qemu} --no-reboot -nodefaults $pit $pc_testdev -display none -serial stdio $pci_testdev" -command+=" -machine accel=$ACCEL$ACCEL_PROPS" +command+=" -accel $ACCEL$ACCEL_PROPS"This breaks my setup for specifying kernel_irqchip=split.
Quoted 3 lines
Quoted 1 line
qemu: -accel kvm,kernel_irqchip=split: Property 'kvm-accel.kernel_irqchip' not found
If you switch "
kernel_irqchip" to "kernel-irqchip", it should work again.
Oh, nice. Yep, that works for me.
Quoted 28 lines · Xiaoyao Li
Quoted 27 lines · Sean Christopherson
Quoted 21 lines · Xiaoyao Li
When configuring accelerator via machine's "accel" property, it cannot pass additional
ACCEL_PROPS. For example, it hits following error when configuring KVM with "notify-vmexit":# ACCEL="kvm,notify-vmexit=internal-error" ./x86-run
x86/apic.c
# qemu-system-x86_64: Property 'pc-i440fx-11.1-machine.notify- vmexit' not foundSwitch to use separate "-accel" option to configure the accelerator.
Signed-off-by Xiaoyao Li <[email protected]>---
x86/run | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)x86/run +0
-0@@ -43,7 +43,7 @@ fipit="-global kvm-pit.lost_tick_policy=discard"
command="${qemu} --no-reboot -nodefaults $pit $pc_testdev -display none -serial stdio $pci_testdev"x86/run fi · line 46
Quoted 2 lines
x86/run +1
-1-command+=" -machine accel=$ACCEL$ACCEL_PROPS" +command+=" -accel $ACCEL$ACCEL_PROPS"This breaks my setup for specifying kernel_irqchip=split.
Quoted 5 lines
Quoted 1 line
qemu: -accel kvm,kernel_irqchip=split: Property 'kvm- accel.kernel_irqchip' not found
If you switch "
kernel_irqchip" to "kernel-irqchip", it should work again.This needs to be fixed on QEMU side. I'll look at it.
Well, I feel hard to justify a QEMU "fix" for it.
"kernel_irqchip" was a property of "machine" in old QEMU, and QEMU switched it to "kernel-irqchip" automatically.
Then QEMU moved it to be a property of "accel", while keeping the compatibility when users configure it via "machine" that QEMU internally setting it to accel's property in this case.
However, "kernel_irqchip" is only valid on "machine", but not on "accel".
For this KVM unit test issue, do we need to add workaround to keep your (work-by-accident) usage working? or just kill it?
Sean Christopherson
reviewerQuoted 43 lines · Xiaoyao Li
Quoted 30 lines · Xiaoyao Li
Quoted 29 lines · Sean Christopherson
Quoted 22 lines · Xiaoyao Li
When configuring accelerator via machine's "accel" property, it cannot pass additional
ACCEL_PROPS. For example, it hits following error when configuring KVM with "notify-vmexit":# ACCEL="kvm,notify-vmexit=internal-error" ./x86-run
x86/apic.c# qemu-system-x86_64: Property 'pc-i440fx-11.1-machine.notify- vmexit' not foundSwitch to use separate "-accel" option to configure the accelerator.
Signed-off-by Xiaoyao Li <[email protected]>---
x86/run | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)x86/run +0
-0@@ -43,7 +43,7 @@ fipit="-global kvm-pit.lost_tick_policy=discard" command="${qemu} --no-reboot -nodefaults $pit $pc_testdev
x86/run fi · line 46
Quoted 3 lines
x86/run +1
-2-display none -serial stdio $pci_testdev" -command+=" -machine accel=$ACCEL$ACCEL_PROPS" +command+=" -accel $ACCEL$ACCEL_PROPS"This breaks my setup for specifying kernel_irqchip=split.
Quoted 6 lines
Quoted 2 lines
qemu: -accel kvm,kernel_irqchip=split: Property 'kvm- accel.kernel_irqchip' not found
If you switch "
kernel_irqchip" to "kernel-irqchip", it should work again.This needs to be fixed on QEMU side. I'll look at it.
Well, I feel hard to justify a QEMU "fix" for it.
"
kernel_irqchip" was a property of "machine" in old QEMU, and QEMU switched it to "kernel-irqchip" automatically.
Quoted 8 lines
Then QEMU moved it to be a property of "accel", while keeping the compatibility when users configure it via "machine" that QEMU internally setting it to accel's property in this case.
However, "
kernel_irqchip" is only valid on "machine", but not on "accel".For this KVM unit test issue, do we need to add workaround to keep your (work-by-accident) usage working? or just kill it?
Nah, just switch to "accel" and call it good. I'm likely the one and only user of kernel_irqchip.
Sean Christopherson
reviewerQuoted 48 lines · Sean Christopherson
Quoted 47 lines · Xiaoyao Li
Quoted 30 lines · Xiaoyao Li
Quoted 29 lines · Sean Christopherson
Quoted 22 lines · Xiaoyao Li
When configuring accelerator via machine's "accel" property, it cannot pass additional
ACCEL_PROPS. For example, it hits following error when configuring KVM with "notify-vmexit":# ACCEL="kvm,notify-vmexit=internal-error" ./x86-run
x86/apic.c# qemu-system-x86_64: Property 'pc-i440fx-11.1-machine.notify- vmexit' not foundSwitch to use separate "-accel" option to configure the accelerator.
Signed-off-by Xiaoyao Li <[email protected]>---
x86/run | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)x86/run +0
-0@@ -43,7 +43,7 @@ fipit="-global kvm-pit.lost_tick_policy=discard" command="${qemu} --no-reboot -nodefaults $pit $pc_testdev
x86/run fi · line 46
Quoted 3 lines
x86/run +1
-2-display none -serial stdio $pci_testdev" -command+=" -machine accel=$ACCEL$ACCEL_PROPS" +command+=" -accel $ACCEL$ACCEL_PROPS"This breaks my setup for specifying kernel_irqchip=split.
Quoted 6 lines
Quoted 2 lines
qemu: -accel kvm,kernel_irqchip=split: Property 'kvm- accel.kernel_irqchip' not found
If you switch "
kernel_irqchip" to "kernel-irqchip", it should work again.This needs to be fixed on QEMU side. I'll look at it.
Well, I feel hard to justify a QEMU "fix" for it.
"
kernel_irqchip" was a property of "machine" in old QEMU, and QEMU switched it to "kernel-irqchip" automatically.Then QEMU moved it to be a property of "accel", while keeping the compatibility when users configure it via "machine" that QEMU internally setting it to accel's property in this case.
Quoted 7 lines
Quoted 4 lines
However, "
kernel_irqchip" is only valid on "machine", but not on "accel".For this KVM unit test issue, do we need to add workaround to keep your (work-by-accident) usage working? or just kill it?
Nah, just switch to "accel" and call it good. I'm likely the one and only user of
kernel_irqchip.
There's another problem: the CET and LAM tests force -enable-kvm:
[cet]
file = cet.flat
arch = x86_64
smp = 2
qemu_params = -enable-kvm -m 2048 -cpu host
[lam]
file = lam.flat
arch = x86_64
qemu_params = -enable-kvm -cpu max
Which apparently is wired up to "-machine accel=" under the hood, because they get skipped with:
SKIP cet (qemu: The -accel and "-machine accel=" options are incompatible) SKIP lam (qemu: The -accel and "-machine accel=" options are incompatible)
Quoted 70 lines · Sean Christopherson
Quoted 48 lines · Sean Christopherson
Quoted 47 lines · Xiaoyao Li
Quoted 30 lines · Xiaoyao Li
Quoted 29 lines · Sean Christopherson
Quoted 22 lines · Xiaoyao Li
When configuring accelerator via machine's "accel" property, it cannot pass additional
ACCEL_PROPS. For example, it hits following error when configuring KVM with "notify-vmexit":# ACCEL="kvm,notify-vmexit=internal-error" ./x86-run
x86/apic.c# qemu-system-x86_64: Property 'pc-i440fx-11.1-machine.notify- vmexit' not foundSwitch to use separate "-accel" option to configure the accelerator.
Signed-off-by Xiaoyao Li <[email protected]>---
x86/run | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)x86/run +0
-0@@ -43,7 +43,7 @@ fipit="-global kvm-pit.lost_tick_policy=discard" command="${qemu} --no-reboot -nodefaults $pit $pc_testdev
x86/run fi · line 46
Quoted 3 lines
x86/run +1
-2-display none -serial stdio $pci_testdev" -command+=" -machine accel=$ACCEL$ACCEL_PROPS" +command+=" -accel $ACCEL$ACCEL_PROPS"This breaks my setup for specifying kernel_irqchip=split.
Quoted 6 lines
Quoted 2 lines
qemu: -accel kvm,kernel_irqchip=split: Property 'kvm- accel.kernel_irqchip' not found
If you switch "
kernel_irqchip" to "kernel-irqchip", it should work again.This needs to be fixed on QEMU side. I'll look at it.
Well, I feel hard to justify a QEMU "fix" for it.
"
kernel_irqchip" was a property of "machine" in old QEMU, and QEMU switched it to "kernel-irqchip" automatically.Then QEMU moved it to be a property of "accel", while keeping the compatibility when users configure it via "machine" that QEMU internally setting it to accel's property in this case.
Quoted 7 lines
Quoted 4 lines
However, "
kernel_irqchip" is only valid on "machine", but not on "accel".For this KVM unit test issue, do we need to add workaround to keep your (work-by-accident) usage working? or just kill it?
Nah, just switch to "accel" and call it good. I'm likely the one and only user of
kernel_irqchip.There's another problem: the CET and LAM tests force -enable-kvm:
[cet]
file = cet.flat
arch =x86_64
smp = 2
qemu_params= -enable-kvm -m 2048 -cpu host[lam]
file = lam.flat
arch =x86_64
qemu_params= -enable-kvm -cpu max
Quoted 5 lines
Which apparently is wired up to "-machine accel=" under the hood, because they get skipped with:
SKIP cet (qemu: The -accel and "-machine accel=" options are incompatible) SKIP lam (qemu: The -accel and "-machine accel=" options are incompatible)
Oh, sorry for not respond. I didn't see this mail until I decided to ping you for this patch after I noticed you were queuing kvm-unit-test patches.
I just sent a v2, which adds one patch to handle cet and lam tests: