qemu: add DisableModern to SCSIController

DisableModern prevents qemu from relying on fast MMIO.

Signed-off-by: Julio Montes <julio.montes@intel.com>
This commit is contained in:
Julio Montes
2018-03-06 11:55:15 -06:00
parent d60256118f
commit 68f3071806
2 changed files with 8 additions and 1 deletions

View File

@@ -838,6 +838,9 @@ type SCSIController struct {
// Addr is the PCI address offset, this is optional
Addr string
// DisableModern prevents qemu from relying on fast MMIO.
DisableModern bool
}
// Valid returns true if the SCSIController structure is valid and complete.
@@ -861,6 +864,9 @@ func (scsiCon SCSIController) QemuParams(config *Config) []string {
if scsiCon.Addr != "" {
devParams = append(devParams, fmt.Sprintf("addr=%s", scsiCon.Addr))
}
if scsiCon.DisableModern {
devParams = append(devParams, fmt.Sprintf("disable-modern=true"))
}
qemuParams = append(qemuParams, "-device")
qemuParams = append(qemuParams, strings.Join(devParams, ","))