mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-18 23:04:20 +01:00
qemu: Fix kernel_irqchip=split option for IOMMU enabled sandbox
When an x86 sandbox has a vIOMMU (needed for VFIO), it needs the 'kernel_irqchip=split' option or it can't start. fdcd1f3a2 attempts to set that, but ends up just writing it to a temporary (looks like Go for range loops pass by value). Fixes: #2694 Signed-off-by: David Gibson <david@gibson.dropbear.id.au> Signed-off-by: Fabiano Fidêncio <fidencio@redhat.com>
This commit is contained in:
committed by
Fabiano Fidêncio
parent
b97287090b
commit
53473eb2fa
@@ -239,3 +239,19 @@ func TestQemuAmd64WithInitrd(t *testing.T) {
|
||||
assert.NotContains(m.Options, qemuNvdimmOption)
|
||||
}
|
||||
}
|
||||
|
||||
func TestQemuAmd64Iommu(t *testing.T) {
|
||||
assert := assert.New(t)
|
||||
|
||||
config := qemuConfig(QemuQ35)
|
||||
config.IOMMU = true
|
||||
qemu := newQemuArch(config)
|
||||
|
||||
p := qemu.kernelParameters(false)
|
||||
assert.Contains(p, Param{"intel_iommu", "on"})
|
||||
|
||||
m, err := qemu.machine()
|
||||
|
||||
assert.NoError(err)
|
||||
assert.Contains(m.Options, "kernel_irqchip=split")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user