Skip to content

Commit

Permalink
runtime: constify splitIrqChipMachineOptions
Browse files Browse the repository at this point in the history
A simple cleanup.

Signed-off-by: Peng Tao <bergwolf@hyper.sh>
  • Loading branch information
bergwolf committed Aug 18, 2022
1 parent 2b0587d commit f508c29
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/runtime/virtcontainers/qemu_amd64.go
Expand Up @@ -38,6 +38,8 @@ const (

defaultQemuMachineOptions = "accel=kvm,kernel_irqchip=on"

splitIrqChipMachineOptions = "accel=kvm,kernel_irqchip=split"

qmpMigrationWaitTimeout = 5 * time.Second
)

Expand Down Expand Up @@ -96,7 +98,7 @@ func newQemuArch(config HypervisorConfig) (qemuArch, error) {
// IOMMU and Guest Protection require a split IRQ controller for handling interrupts
// otherwise QEMU won't be able to create the kernel irqchip
if config.IOMMU || config.ConfidentialGuest {
mp.Options = "accel=kvm,kernel_irqchip=split"
mp.Options = splitIrqChipMachineOptions
}

if config.IOMMU {
Expand Down

0 comments on commit f508c29

Please sign in to comment.