scsi: Allow scsi controller to associate with an IO thread.

This enable data-plane for scsi. All drives attached to the
scsi controller will have their IO processed in a single separate
IO thread instead of qemu's main event loop.

Signed-off-by: Archana Shinde <archana.m.shinde@intel.com>
This commit is contained in:
Archana Shinde
2018-03-28 16:15:52 -07:00
parent a54de1835b
commit 9130f37516
2 changed files with 8 additions and 1 deletions

View File

@@ -841,6 +841,9 @@ type SCSIController struct {
// DisableModern prevents qemu from relying on fast MMIO.
DisableModern bool
// IOThread is the IO thread on which IO will be handled
IOThread string
}
// Valid returns true if the SCSIController structure is valid and complete.
@@ -867,6 +870,9 @@ func (scsiCon SCSIController) QemuParams(config *Config) []string {
if scsiCon.DisableModern {
devParams = append(devParams, fmt.Sprintf("disable-modern=true"))
}
if scsiCon.IOThread != "" {
devParams = append(devParams, fmt.Sprintf("iothread=%s", scsiCon.IOThread))
}
qemuParams = append(qemuParams, "-device")
qemuParams = append(qemuParams, strings.Join(devParams, ","))