On 29/11/24 11:29, Philippe Mathieu-Daudé wrote:
On 14/11/24 12:45, Sairaj Kodilkar wrote:
Commit b12cb3819 (amd_iommu: Check APIC ID > 255 for XTSup) throws
linking error for the `kvm_enable_x2apic` when kvm is disabled
and Clang is used for compilation.
This issue comes up because Clang does not remove the function callsite
(kvm_enable_x2apic in this case) during optimization when if condition
have variable. Intel IOMMU driver solves this issue by creating separate
if condition for checking variables, which causes call site being
optimized away by virtue of `kvm_irqchip_is_split()` being defined as 0.
Implement same solution for the AMD driver.
Fixes: b12cb3819baf (amd_iommu: Check APIC ID > 255 for XTSup)
Signed-off-by: Sairaj Kodilkar <sarun...@amd.com>
Signed-off-by: Santosh Shukla <santosh.shu...@amd.com>
Tested-by: Phil Dennis-Jordan <p...@philjordan.eu>
---
hw/i386/amd_iommu.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
Tested-by: Philippe Mathieu-Daudé <phi...@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <phi...@linaro.org>
And queued, thanks.
Already merged by Paolo as commit 0266aef8cd6. Noticing that
earlier would have saved me some time.