summary refs log tree commit diff stats
path: root/results/classifier/gemma3:12b/hypervisor/1535
blob: 39e379e30e30b353ec3c4f94c10d2ced4474cb27 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
spapr set host serial number visible to AIX from -M pseries,host-serial and not -uuid
Description of problem:
-M pseries,host-serial populates "/host-serial" which is not used in AIX and populates "/system-id" with UUID instead of serial number. Patch to write host-serial passed to -M as "/system-id" prefixed with IBM,06 visible from `uname -u` and `nmon`.
Steps to reproduce:
1. Set -uuid and -M pseries,host-serial
2. Execute `uname -u` and `nmon` in guest
Additional information:
Patch:
```
diff -ru a/hw/ppc/spapr.c b/hw/ppc/spapr.c
--- a/hw/ppc/spapr.c    2023-03-06 13:59:32.942881783 -0500
+++ b/hw/ppc/spapr.c    2023-03-06 21:37:32.504570961 -0500
@@ -1163,7 +1163,10 @@
     }

     if (spapr->host_serial) {
-        _FDT(fdt_setprop_string(fdt, 0, "host-serial", spapr->host_serial));
+        /* plus 1 byte for null character */
+        char result[sizeof("IBM,06") + sizeof(spapr->host_serial) + 1];
+        snprintf(result, sizeof(result), "%s%s", "IBM,06", spapr->host_serial);
+        _FDT(fdt_setprop_string(fdt, 0, "system-id", result));
     } else if (smc->broken_host_serial_model && kvmppc_get_host_serial(&buf)) {
         _FDT(fdt_setprop_string(fdt, 0, "host-serial", buf));
         g_free(buf);
```

Before patch:
```
$ uname -u
2d861abf-5cb7-434a-86d5-65167d85e5af

$ nmon
┌──────────────────────────────────────────────────────────────────────────────────┐
│  ------------------------------                                                  │
│  N    N  M    M   OOOO   N    N   For online help type: h                        │
│  NN   N  MM  MM  O    O  NN   N   For command line option help:                  │
│  N N  N  M MM M  O    O  N N  N      quick-hint  nmon -?                         │
│  N  N N  M    M  O    O  N  N N    full-details  nmon -h                         │
│  N   NN  M    M  O    O  N   NN   To start nmon the same way every time?         │
│  N    N  M    M   OOOO   N    N    set NMON ksh variable, for example:           │
│  ------------------------------    export NMON=cmt                               │
│    TOPAS_NMON                                                                    │
│                               8 - CPUs currently                                 │
│                               8 - CPUs configured                                │
│                            1000 - MHz CPU clock rate (press 'r' for current MHz) │
│                 PowerPC_POWER10 - Processor                                      │
│                          64 bit - Hardware                                       │
│                          64 bit - Kernel                                         │
│         0,IBM AIX - IBM POWER10 - Logical Partition                              │
│                  7.2.5.200 TL05 - AIX Kernel Version                             │
│                       aix-ppc64 - Hostname                                       │
│                       aix-ppc64 - Node/WPAR Name                                 │
│                         bf-5cb7 - Serial Number                                  │
│                    IBM,9080-HEX - Machine Type                                   │
│                                                                                  │
│                                                                                  │
└──────────────────────────────────────────────────────────────────────────────────
```
After patch:
```
$ uname -u
IBM,0678AB123

$ nmon
┌──────────────────────────────────────────────────────────────────────────────────┐
│  ------------------------------                                                  │
│  N    N  M    M   OOOO   N    N   For online help type: h                        │
│  NN   N  MM  MM  O    O  NN   N   For command line option help:                  │
│  N N  N  M MM M  O    O  N N  N      quick-hint  nmon -?                         │
│  N  N N  M    M  O    O  N  N N    full-details  nmon -h                         │
│  N   NN  M    M  O    O  N   NN   To start nmon the same way every time?         │
│  N    N  M    M   OOOO   N    N    set NMON ksh variable, for example:           │
│  ------------------------------    export NMON=cmt                               │
│    TOPAS_NMON                                                                    │
│                               8 - CPUs currently                                 │
│                               8 - CPUs configured                                │
│                            1000 - MHz CPU clock rate (press 'r' for current MHz) │
│                 PowerPC_POWER10 - Processor                                      │
│                          64 bit - Hardware                                       │
│                          64 bit - Kernel                                         │
│         0,IBM AIX - IBM POWER10 - Logical Partition                              │
│                  7.2.5.200 TL05 - AIX Kernel Version                             │
│                       aix-ppc64 - Hostname                                       │
│                       aix-ppc64 - Node/WPAR Name                                 │
│                         78AB123 - Serial Number                                  │
│                    IBM,9080-HEX - Machine Type                                   │
│                                                                                  │
│                                                                                  │
└──────────────────────────────────────────────────────────────────────────────────
```
Note first 6 characters of serial number are cropped by nmon ("IBM,06")