Kernel KVM virtualization development
 help / color / mirror / Atom feed
* [kvm-unit-tests PATCH] x86/run: Use separate "-accel" option to configure the accelerator
@ 2026-05-28  7:17 Xiaoyao Li
  2026-05-28 13:00 ` Sean Christopherson
  0 siblings, 1 reply; 7+ messages in thread
From: Xiaoyao Li @ 2026-05-28  7:17 UTC (permalink / raw)
  To: Sean Christopherson, Paolo Bonzini; +Cc: kvm, 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 found

Switch to use separate "-accel" option to configure the accelerator.

Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
---
 x86/run | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/x86/run b/x86/run
index dd38f14c871f..a68d469dd1b8 100755
--- a/x86/run
+++ b/x86/run
@@ -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
-- 
2.43.0


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

* Re: [kvm-unit-tests PATCH] x86/run: Use separate "-accel" option to configure the accelerator
  2026-05-28  7:17 [kvm-unit-tests PATCH] x86/run: Use separate "-accel" option to configure the accelerator Xiaoyao Li
@ 2026-05-28 13:00 ` Sean Christopherson
  2026-05-29  0:09   ` Xiaoyao Li
  0 siblings, 1 reply; 7+ messages in thread
From: Sean Christopherson @ 2026-05-28 13:00 UTC (permalink / raw)
  To: Xiaoyao Li; +Cc: Paolo Bonzini, kvm

On Thu, May 28, 2026, Xiaoyao Li wrote:
> 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.
> 
> Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
> ---
>  x86/run | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/x86/run b/x86/run
> index dd38f14c871f..a68d469dd1b8 100755
> --- a/x86/run
> +++ b/x86/run
> @@ -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

>  if [ "${CONFIG_EFI}" != y ]; then
>  	command+=" -kernel"
>  fi
> -- 
> 2.43.0
> 

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

* Re: [kvm-unit-tests PATCH] x86/run: Use separate "-accel" option to configure the accelerator
  2026-05-28 13:00 ` Sean Christopherson
@ 2026-05-29  0:09   ` Xiaoyao Li
  2026-05-29 16:03     ` Sean Christopherson
  2026-06-02 10:00     ` Xiaoyao Li
  0 siblings, 2 replies; 7+ messages in thread
From: Xiaoyao Li @ 2026-05-29  0:09 UTC (permalink / raw)
  To: Sean Christopherson; +Cc: Paolo Bonzini, kvm

On 5/28/2026 9:00 PM, Sean Christopherson wrote:
> On Thu, May 28, 2026, Xiaoyao Li wrote:
>> 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.
>>
>> Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
>> ---
>>   x86/run | 2 +-
>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/x86/run b/x86/run
>> index dd38f14c871f..a68d469dd1b8 100755
>> --- a/x86/run
>> +++ b/x86/run
>> @@ -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

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.


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

* Re: [kvm-unit-tests PATCH] x86/run: Use separate "-accel" option to configure the accelerator
  2026-05-29  0:09   ` Xiaoyao Li
@ 2026-05-29 16:03     ` Sean Christopherson
  2026-06-02 10:00     ` Xiaoyao Li
  1 sibling, 0 replies; 7+ messages in thread
From: Sean Christopherson @ 2026-05-29 16:03 UTC (permalink / raw)
  To: Xiaoyao Li; +Cc: Paolo Bonzini, kvm

On Fri, May 29, 2026, Xiaoyao Li wrote:
> On 5/28/2026 9:00 PM, Sean Christopherson wrote:
> > On Thu, May 28, 2026, Xiaoyao Li wrote:
> > > 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.
> > > 
> > > Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
> > > ---
> > >   x86/run | 2 +-
> > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > 
> > > diff --git a/x86/run b/x86/run
> > > index dd38f14c871f..a68d469dd1b8 100755
> > > --- a/x86/run
> > > +++ b/x86/run
> > > @@ -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
> 
> If you switch "kernel_irqchip" to "kernel-irqchip", it should work again.

Oh, nice.  Yep, that works for me.

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

* Re: [kvm-unit-tests PATCH] x86/run: Use separate "-accel" option to configure the accelerator
  2026-05-29  0:09   ` Xiaoyao Li
  2026-05-29 16:03     ` Sean Christopherson
@ 2026-06-02 10:00     ` Xiaoyao Li
  2026-06-02 14:20       ` Sean Christopherson
  1 sibling, 1 reply; 7+ messages in thread
From: Xiaoyao Li @ 2026-06-02 10:00 UTC (permalink / raw)
  To: Sean Christopherson; +Cc: Paolo Bonzini, kvm

On 5/29/2026 8:09 AM, Xiaoyao Li wrote:
> On 5/28/2026 9:00 PM, Sean Christopherson wrote:
>> On Thu, May 28, 2026, Xiaoyao Li wrote:
>>> 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.
>>>
>>> Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
>>> ---
>>>   x86/run | 2 +-
>>>   1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/x86/run b/x86/run
>>> index dd38f14c871f..a68d469dd1b8 100755
>>> --- a/x86/run
>>> +++ b/x86/run
>>> @@ -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
> 
> 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?


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

* Re: [kvm-unit-tests PATCH] x86/run: Use separate "-accel" option to configure the accelerator
  2026-06-02 10:00     ` Xiaoyao Li
@ 2026-06-02 14:20       ` Sean Christopherson
  2026-06-02 20:22         ` Sean Christopherson
  0 siblings, 1 reply; 7+ messages in thread
From: Sean Christopherson @ 2026-06-02 14:20 UTC (permalink / raw)
  To: Xiaoyao Li; +Cc: Paolo Bonzini, kvm

On Tue, Jun 02, 2026, Xiaoyao Li wrote:
> On 5/29/2026 8:09 AM, Xiaoyao Li wrote:
> > On 5/28/2026 9:00 PM, Sean Christopherson wrote:
> > > On Thu, May 28, 2026, Xiaoyao Li wrote:
> > > > 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.
> > > > 
> > > > Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
> > > > ---
> > > >   x86/run | 2 +-
> > > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > > 
> > > > diff --git a/x86/run b/x86/run
> > > > index dd38f14c871f..a68d469dd1b8 100755
> > > > --- a/x86/run
> > > > +++ b/x86/run
> > > > @@ -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
> > 
> > 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?

Nah, just switch to "accel" and call it good.  I'm likely the one and only user
of kernel_irqchip.

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

* Re: [kvm-unit-tests PATCH] x86/run: Use separate "-accel" option to configure the accelerator
  2026-06-02 14:20       ` Sean Christopherson
@ 2026-06-02 20:22         ` Sean Christopherson
  0 siblings, 0 replies; 7+ messages in thread
From: Sean Christopherson @ 2026-06-02 20:22 UTC (permalink / raw)
  To: Xiaoyao Li; +Cc: Paolo Bonzini, kvm

On Tue, Jun 02, 2026, Sean Christopherson wrote:
> On Tue, Jun 02, 2026, Xiaoyao Li wrote:
> > On 5/29/2026 8:09 AM, Xiaoyao Li wrote:
> > > On 5/28/2026 9:00 PM, Sean Christopherson wrote:
> > > > On Thu, May 28, 2026, Xiaoyao Li wrote:
> > > > > 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.
> > > > > 
> > > > > Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
> > > > > ---
> > > > >   x86/run | 2 +-
> > > > >   1 file changed, 1 insertion(+), 1 deletion(-)
> > > > > 
> > > > > diff --git a/x86/run b/x86/run
> > > > > index dd38f14c871f..a68d469dd1b8 100755
> > > > > --- a/x86/run
> > > > > +++ b/x86/run
> > > > > @@ -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
> > > 
> > > 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?
> 
> 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)


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

end of thread, other threads:[~2026-06-02 20:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-28  7:17 [kvm-unit-tests PATCH] x86/run: Use separate "-accel" option to configure the accelerator Xiaoyao Li
2026-05-28 13:00 ` Sean Christopherson
2026-05-29  0:09   ` Xiaoyao Li
2026-05-29 16:03     ` Sean Christopherson
2026-06-02 10:00     ` Xiaoyao Li
2026-06-02 14:20       ` Sean Christopherson
2026-06-02 20:22         ` Sean Christopherson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox