Skip to content

Commit 4d29425

Browse files
authored
Merge pull request #971 from ashokpariya0/s390x-detection-cpu-vendor-support
Fix CPU vendor detection on s390x to prevent fallback to Intel.
2 parents 777a986 + 9dfa31b commit 4d29425

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

pkg/host/internal/cpu/cpu.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ func (c *cpuInfoProvider) GetCPUVendor() (types.CPUVendor, error) {
3434
return types.CPUVendorAMD, nil
3535
case "ARM":
3636
return types.CPUVendorARM, nil
37+
case "IBM/S390":
38+
return types.CPUVendorS390X, nil
3739
}
3840

3941
return -1, fmt.Errorf("unknown CPU vendor: %s", cpuInfo.Processors[0].Vendor)

pkg/host/types/interfaces.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ const (
201201
CPUVendorIntel CPUVendor = iota
202202
CPUVendorAMD
203203
CPUVendorARM
204+
CPUVendorS390X
204205
)
205206

206207
type CPUInfoProviderInterface interface {

0 commit comments

Comments
 (0)