qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH for-6.1 v2] i386: do not call cpudef-only models functions fo


From: Claudio Fontana
Subject: Re: [PATCH for-6.1 v2] i386: do not call cpudef-only models functions for max, host, base
Date: Mon, 29 Nov 2021 15:14:00 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0

On 11/29/21 12:39 PM, Woodhouse, David wrote:
> On Fri, 2021-07-23 at 13:29 +0200, Claudio Fontana wrote:
>>  static void kvm_cpu_instance_init(CPUState *cs)
>>  {
>>      X86CPU *cpu = X86_CPU(cs);
>> +    X86CPUClass *xcc = X86_CPU_GET_CLASS(cpu);
>>  
>>      host_cpu_instance_init(cpu);
>>  
>> -    if (!kvm_irqchip_in_kernel()) {
>> -        x86_cpu_change_kvm_default("x2apic", "off");
>> -    } else if (kvm_irqchip_is_split() && kvm_enable_x2apic()) {
>> -        x86_cpu_change_kvm_default("kvm-msi-ext-dest-id", "on");
>> -    }
>> -
>> -    /* Special cases not set in the X86CPUDefinition structs: */
>> +    if (xcc->model) {
>> +        /* only applies to builtin_x86_defs cpus */
>> +        if (!kvm_irqchip_in_kernel()) {
>> +            x86_cpu_change_kvm_default("x2apic", "off");
>> +        } else if (kvm_irqchip_is_split() && kvm_enable_x2apic()) {
>> +            x86_cpu_change_kvm_default("kvm-msi-ext-dest-id", "on");
>> +        }
>>  
>> -    x86_cpu_apply_props(cpu, kvm_default_props);
>> +        /* Special cases not set in the X86CPUDefinition structs: */
>> +        x86_cpu_apply_props(cpu, kvm_default_props);
>> +    }
>>  
> 
> I think this causes a regression in x2apic and kvm-msi-ext-dest-id
> support. If you start qemu thus:

If I recall correctly, this change just tries to restore the behavior prior to  
commit f5cc5a5c168674f84bf061cdb307c2d25fba5448 ,

fixing the issue introduced with the refactoring at that time.

Can you try bisecting prior to f5cc5a5c168674f84bf061cdb307c2d25fba5448 , to 
see if the actual breakage comes from somewhere else?

> 
> qemu-system-x86_64 -machine q35,accel=kvm,usb=off,kernel_irqchip=split -cpu 
> host -smp 288,sockets=9,cores=16,threads=2
> 
> The guest now sees those features, but we don't actually call
> kvm_enable_x2apic() so the APIC broadcast quirk doesn't get disabled,
> and interrupts targeted at APIC ID 255 are interpreted as broadcasts:
> 
> [ 73.198504] __common_interrupt: 0.34 No irq handler for vector
> [ 73.198515] __common_interrupt: 11.34 No irq handler for vector
> [ 73.198517] __common_interrupt: 12.34 No irq handler for vector
> [ 73.198521] __common_interrupt: 15.34 No irq handler for vector
> [ 73.198524] __common_interrupt: 17.34 No irq handler for vector
> [ 73.198528] __common_interrupt: 34.34 No irq handler for vector
> [ 73.198529] __common_interrupt: 20.34 No irq handler for vector
> [ 73.198533] __common_interrupt: 41.34 No irq handler for vector
> [ 73.198539] __common_interrupt: 27.34 No irq handler for vector
> [ 73.198542] __common_interrupt: 28.34 No irq handler for vector
> 
> 

Any image to specifically test out? Would an actual 9 sockets machine be 
required to reproduce this?

Thanks,

Claudio



reply via email to

[Prev in Thread] Current Thread [Next in Thread]