[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 20:55:27 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 |
On 11/29/21 8:19 PM, David Woodhouse wrote:
> On Mon, 2021-11-29 at 20:10 +0100, Claudio Fontana wrote:
>>
>> Hmm I thought what you actually care for, for cpu "host", is just the
>> kvm_enable_x2apic() call, not the kvm_default_props.
>>
>>
>>
>> Do you also expect the kvm_default_prop "kvm-msi-ext-dest-id" to be switch
>> to "on" and applied?
>
> It's already on today. It just isn't *true* because QEMU never called
> kvm_enable_x2apic().
property should be on, but not by setting in kvm_default_prop / applied via
kvm_default_prop, that mechanism is for the versioned cpu models,
which use X86CPUModel / X86CPUDefinition , and "host" isn't one of them.
Out of curiosity, does my previous snippet actually work? Not that I am sure it
is the best solution,
just for my understanding. It would be surprising to me that the need to
actually manually apply "kvm-msi-ext-dest-id" to "on" there.
>
> So what I care about (in case ∃ APIC IDs >= 255) is two things:
>
> 1. Qemu needs to call kvm_enable_x2apic().
> 2. If that *fails* qemu needs to *stop* advertising X2APIC and ext-dest-id.
>
>
> That last patch snippet in pc_machine_done() should suffice to achieve
> that, I think. Because if kvm_enable_x2apic() fails and qemu has been
> asked for that many CPUs, it aborts completely. Which seems right.
>
seems right to abort if requesting > 255 APIC IDs cannot be satisfied, I agree.
So I think in the end, we want to:
1) make sure that when accel=kvm and smp > 255 for i386, using cpu "host",
kvm_enable_x2apic() is called and successful.
2) in addressing requirement 1), we do not break something else (other
machines, other cpu classes/models, TCG, ...).
3) as a plus we might want to cleanup and determine once and for all where
kvm_enable_x2apic() should be called:
we have calls in intel_iommu.c and in the kvm cpu class instance
initialization here in kvm-cpu.c today:
before adding a third call we should really ask ourselves where the proper
initialization of this should happen.
Let me know about the previous snippet, and I'd really look for other comments
from Eduardo or Paolo at this point, regarding the "what should be" question.
Ciao,
Claudio
- Re: [PATCH for-6.1 v2] i386: do not call cpudef-only models functions for max, host, base, Woodhouse, David, 2021/11/29
- Re: [PATCH for-6.1 v2] i386: do not call cpudef-only models functions for max, host, base, Claudio Fontana, 2021/11/29
- Re: [PATCH for-6.1 v2] i386: do not call cpudef-only models functions for max, host, base, David Woodhouse, 2021/11/29
- Re: [PATCH for-6.1 v2] i386: do not call cpudef-only models functions for max, host, base, Claudio Fontana, 2021/11/29
- Re: [PATCH for-6.1 v2] i386: do not call cpudef-only models functions for max, host, base, Claudio Fontana, 2021/11/29
- Re: [PATCH for-6.1 v2] i386: do not call cpudef-only models functions for max, host, base, David Woodhouse, 2021/11/29
- Re: [PATCH for-6.1 v2] i386: do not call cpudef-only models functions for max, host, base, Claudio Fontana, 2021/11/29
- Re: [PATCH for-6.1 v2] i386: do not call cpudef-only models functions for max, host, base, David Woodhouse, 2021/11/29
- Re: [PATCH for-6.1 v2] i386: do not call cpudef-only models functions for max, host, base,
Claudio Fontana <=
- Re: [PATCH for-6.1 v2] i386: do not call cpudef-only models functions for max, host, base, David Woodhouse, 2021/11/29
- Re: [PATCH for-6.1 v2] i386: do not call cpudef-only models functions for max, host, base, Claudio Fontana, 2021/11/30
- Re: [PATCH for-6.1 v2] i386: do not call cpudef-only models functions for max, host, base, David Woodhouse, 2021/11/30
- [PATCH 1/2] target/i386: Fix sanity check on max APIC ID / X2APIC enablement, David Woodhouse, 2021/11/30
- [PATCH 2/2] intel_iommu: Fix irqchip / X2APIC configuration checks, David Woodhouse, 2021/11/30
- Re: [PATCH 2/2] intel_iommu: Fix irqchip / X2APIC configuration checks, Claudio Fontana, 2021/11/30