summaryrefslogtreecommitdiffstats
path: root/gitlab/issues/target_ppc/host_missing/accel_missing/1535.toml
diff options
context:
space:
mode:
Diffstat (limited to 'gitlab/issues/target_ppc/host_missing/accel_missing/1535.toml')
-rw-r--r--gitlab/issues/target_ppc/host_missing/accel_missing/1535.toml99
1 files changed, 99 insertions, 0 deletions
diff --git a/gitlab/issues/target_ppc/host_missing/accel_missing/1535.toml b/gitlab/issues/target_ppc/host_missing/accel_missing/1535.toml
new file mode 100644
index 00000000..58b2080f
--- /dev/null
+++ b/gitlab/issues/target_ppc/host_missing/accel_missing/1535.toml
@@ -0,0 +1,99 @@
+id = 1535
+title = "spapr set host serial number visible to AIX from -M pseries,host-serial and not -uuid"
+state = "opened"
+created_at = "2023-03-07T03:13:30.604Z"
+closed_at = "n/a"
+labels = ["guest: AIX", "target: ppc"]
+url = "https://gitlab.com/qemu-project/qemu/-/issues/1535"
+host-os = "Fedora 36"
+host-arch = "x86"
+qemu-version = "7.1.0"
+guest-os = "AIX"
+guest-arch = "ppc64"
+description = """-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`."""
+reproduce = """1. Set -uuid and -M pseries,host-serial
+2. Execute `uname -u` and `nmon` in guest"""
+additional = """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")"""