Skip to content

Commit

Permalink
Merge pull request kata-containers#1914 from devimc/topic/virtcontain…
Browse files Browse the repository at this point in the history
…ers/supportSMPDie

virtcontainers: support SMP die
  • Loading branch information
Julio Montes authored Jul 26, 2019
2 parents 4bd3ea8 + 7668aeb commit 3255640
Showing 4 changed files with 40 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
@@ -48,7 +48,7 @@

[[constraint]]
name = "github.com/intel/govmm"
revision = "52b2309a558fe89b3e81b85440144b535288ce4f"
revision = "e0505242c0670f1a522f5b2d827e4a7e4062a14d"

[[constraint]]
name = "github.com/kata-containers/agent"
37 changes: 34 additions & 3 deletions vendor/github.com/intel/govmm/qemu/qmp.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion virtcontainers/qemu.go
Original file line number Diff line number Diff line change
@@ -1307,16 +1307,18 @@ func (q *qemu) hotplugAddCPUs(amount uint32) (uint32, error) {
driver := hc.Type
cpuID := fmt.Sprintf("cpu-%d", len(q.state.HotpluggedVCPUs))
socketID := fmt.Sprintf("%d", hc.Properties.Socket)
dieID := fmt.Sprintf("%d", hc.Properties.Die)
coreID := fmt.Sprintf("%d", hc.Properties.Core)
threadID := fmt.Sprintf("%d", hc.Properties.Thread)

// If CPU type is IBM pSeries or Z, we do not set socketID and threadID
if machine.Type == "pseries" || machine.Type == "s390-ccw-virtio" {
socketID = ""
threadID = ""
dieID = ""
}

if err := q.qmpMonitorCh.qmp.ExecuteCPUDeviceAdd(q.qmpMonitorCh.ctx, driver, cpuID, socketID, coreID, threadID, romFile); err != nil {
if err := q.qmpMonitorCh.qmp.ExecuteCPUDeviceAdd(q.qmpMonitorCh.ctx, driver, cpuID, socketID, dieID, coreID, threadID, romFile); err != nil {
// don't fail, let's try with other CPU
continue
}

0 comments on commit 3255640

Please sign in to comment.