Skip to content

Commit b5a5365

Browse files
ayushr2gvisor-bot
authored andcommitted
nvproxy: Add 535.261.03 and 570.172.08 drivers.
Also fix the `tools/gpu:main checksum` command to output the checksum of both architectures. PiperOrigin-RevId: 792488148
1 parent a0085d9 commit b5a5365

File tree

3 files changed

+14
-5
lines changed

3 files changed

+14
-5
lines changed

pkg/sentry/devices/nvproxy/version.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,7 +707,8 @@ func Init() {
707707
v535_183_06 := addDriverABI(535, 183, 06, "c7bb0a0569c5347845479ed4e3e4d885c6ee3b8adf068c3401cdf754d5ba3d3b", ChecksumNoDriver, v535_183_01)
708708
v535_216_01 := addDriverABI(535, 216, 01, "5ddea1147810012e33967c3181341bcd6624bd3d654c63f845df833b4ece6af7", "4869ae0345b5892b2a50aed566c8226d3e07813d1190aa466feba5e9e21b33b9", v535_183_06)
709709
v535_230_02 := addDriverABI(535, 230, 02, "20cca9118083fcc8083158466e9cb2b616a7922206bcb7296b1fa5cc9af2e0fd", "ea000e6ff481f55e9bfedbea93b739368c635fe4be6156fdad560524ac7f363b", v535_216_01)
710-
_ = addDriverABI(535, 247, 01, "c250e686494cb0c1b5eeea58ba2003707510b2766df05b06ba20b11b3445466b", "bd8ea5c3747a588ff1a29b4f59300d2eba69402a605cb95fce10a30f535993d0", v535_230_02)
710+
v535_247_01 := addDriverABI(535, 247, 01, "c250e686494cb0c1b5eeea58ba2003707510b2766df05b06ba20b11b3445466b", "bd8ea5c3747a588ff1a29b4f59300d2eba69402a605cb95fce10a30f535993d0", v535_230_02)
711+
_ = addDriverABI(535, 261, 03, "d74b61d11e9c9b9052f4042d6ec4437f13d1def30e964e232d47e5d659d11d68", "9a412d3ac01c99d2ca02100a7139597fce8804c52bf533d11b60437286834a93", v535_247_01)
711712

712713
// 545.23.06 is an intermediate unqualified version from the main branch.
713714
v545_23_06 := func() *driverABI {
@@ -892,6 +893,10 @@ func Init() {
892893
v570_124_06 := addDriverABI(570, 124, 06, "1818c90657d17e510de9fa032385ff7e99063e848e901cb4636ee71c8b339313", ChecksumNoDriver, v570_86_15)
893894
v570_133_20 := addDriverABI(570, 133, 20, "1253d17b1528e8a24bf1f34a8ac6591c924b98ad7a32344bde253aa622ac1605", ChecksumNoDriver, v570_124_06)
894895

896+
// The following exist on the "570" branch. They branched off the main
897+
// branch at 570.133.20.
898+
_ = addDriverABI(570, 172, 8, "0256867e082caf93d7b25fa7c8e69b316062a9c6c72c6e228fad7b238c6fa17d", "15547216f2b514ace7724a5ab4c3327669904a41cafb8d4d9048d3c9b60963d8", v570_133_20)
899+
895900
// 575.51.02 is an intermediate unqualified version from the main branch.
896901
v575_51_02 := func() *driverABI {
897902
abi := v570_133_20()

tools/gpu/drivers/install_driver.go

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ const (
3838
nvidiaBaseURLX86_64 = "https://us.download.nvidia.com/tesla/%s/NVIDIA-Linux-x86_64-%s.run"
3939
nvidiaARM64BaseURL = "https://us.download.nvidia.com/XFree86/aarch64/%s/NVIDIA-Linux-aarch64-%s.run"
4040

41+
archAMD64 = "amd64"
4142
archARM64 = "arm64"
4243
)
4344

@@ -46,10 +47,13 @@ func init() {
4647
}
4748

4849
func getNvidiaBaseURL(driverVersion, arch string) string {
49-
if arch == archARM64 {
50+
switch arch {
51+
case archARM64:
5052
return fmt.Sprintf(nvidiaARM64BaseURL, driverVersion, driverVersion)
53+
case archAMD64:
54+
return fmt.Sprintf(nvidiaBaseURLX86_64, driverVersion, driverVersion)
5155
}
52-
return fmt.Sprintf(nvidiaBaseURLX86_64, driverVersion, driverVersion)
56+
panic(fmt.Sprintf("unsupported arch: %q", arch))
5357
}
5458

5559
// Installer handles the logic to install drivers.
@@ -337,7 +341,7 @@ func tryToPrintFailureLogs() {
337341

338342
// ValidateChecksum validates the checksum of the driver.
339343
func ValidateChecksum(ctx context.Context, version string, checksums nvproxy.Checksums) error {
340-
for _, arch := range []string{"x86_64", archARM64} {
344+
for _, arch := range []string{archAMD64, archARM64} {
341345
wantChecksum := checksums.X86_64()
342346
if arch == archARM64 {
343347
wantChecksum = checksums.Arm64()

tools/gpu/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ func main() {
105105
}
106106

107107
var eg errgroup.Group
108-
for _, arch := range []string{"amd64", "amd64"} {
108+
for _, arch := range []string{"amd64", "arm64"} {
109109
eg.Go(func() error {
110110
installer, err := drivers.NewInstaller(*checksumVersion, false)
111111
if err != nil {

0 commit comments

Comments
 (0)