mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-23 20:53:53 +08:00
0f9bdfe3c7
The H_CPU_BEHAV_* flags should be checked for in the 'behaviour' field
of 'struct h_cpu_char_result' -- 'character' is for H_CPU_CHAR_*
flags.
Found by playing around with QEMU's implementation of the hypercall:
H_CPU_CHAR=0xf000000000000000
H_CPU_BEHAV=0x0000000000000000
This clears H_CPU_BEHAV_FAVOUR_SECURITY and H_CPU_BEHAV_L1D_FLUSH_PR
so pseries_setup_rfi_flush() disables 'rfi_flush'; and it also
clears H_CPU_CHAR_L1D_THREAD_PRIV flag. So there is no RFI flush
mitigation at all for cpu_show_meltdown() to report; but currently
it does:
Original kernel:
# cat /sys/devices/system/cpu/vulnerabilities/meltdown
Mitigation: RFI Flush
Patched kernel:
# cat /sys/devices/system/cpu/vulnerabilities/meltdown
Not affected
H_CPU_CHAR=0x0000000000000000
H_CPU_BEHAV=0xf000000000000000
This sets H_CPU_BEHAV_BNDS_CHK_SPEC_BAR so cpu_show_spectre_v1() should
report vulnerable; but currently it doesn't:
Original kernel:
# cat /sys/devices/system/cpu/vulnerabilities/spectre_v1
Not affected
Patched kernel:
# cat /sys/devices/system/cpu/vulnerabilities/spectre_v1
Vulnerable
Brown-paper-bag-by: Michael Ellerman <mpe@ellerman.id.au>
Fixes:
|
||
---|---|---|
.. | ||
cmm.c | ||
dlpar.c | ||
dtl.c | ||
eeh_pseries.c | ||
event_sources.c | ||
firmware.c | ||
hotplug-cpu.c | ||
hotplug-memory.c | ||
hvCall_inst.c | ||
hvCall.S | ||
hvconsole.c | ||
hvcserver.c | ||
ibmebus.c | ||
io_event_irq.c | ||
iommu.c | ||
Kconfig | ||
kexec.c | ||
lpar.c | ||
lparcfg.c | ||
Makefile | ||
mobility.c | ||
msi.c | ||
nvram.c | ||
of_helpers.c | ||
of_helpers.h | ||
offline_states.h | ||
pci_dlpar.c | ||
pci.c | ||
power.c | ||
pseries_energy.c | ||
pseries.h | ||
ras.c | ||
reconfig.c | ||
rng.c | ||
scanlog.c | ||
setup.c | ||
smp.c | ||
suspend.c | ||
vio.c |