summary refs log tree commit diff stats
path: root/hw/misc/mst_fpga.c
diff options
context:
space:
mode:
authorVaibhav Jain <vaibhav@linux.ibm.com>2021-04-02 15:51:28 +0530
committerDavid Gibson <david@gibson.dropbear.id.au>2021-05-04 11:41:25 +1000
commit53d7d7e2b164f97ae36bca3cb3b3cf1ba2abe4c0 (patch)
treeb0c9486192feade63f1f1269058fe61ca979fd64 /hw/misc/mst_fpga.c
parent4b98e72d973f8612d3f65fd1dbcdd232a62bd6d6 (diff)
downloadfocaccia-qemu-53d7d7e2b164f97ae36bca3cb3b3cf1ba2abe4c0.tar.gz
focaccia-qemu-53d7d7e2b164f97ae36bca3cb3b3cf1ba2abe4c0.zip
ppc/spapr: Add support for implement support for H_SCM_HEALTH
Add support for H_SCM_HEALTH hcall described at [1] for spapr
nvdimms. This enables guest to detect the 'unarmed' status of a
specific spapr nvdimm identified by its DRC and if its unarmed, mark
the region backed by the nvdimm as read-only.

The patch adds h_scm_health() to handle the H_SCM_HEALTH hcall which
returns two 64-bit bitmaps (health bitmap, health bitmap mask) derived
from 'struct nvdimm->unarmed' member.

Linux kernel side changes to enable handling of 'unarmed' nvdimms for
ppc64 are proposed at [2].

References:
[1] "Hypercall Op-codes (hcalls)"
    https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/powerpc/papr_hcalls.rst#n220
[2] "powerpc/papr_scm: Mark nvdimm as unarmed if needed during probe"
    https://lore.kernel.org/linux-nvdimm/20210329113103.476760-1-vaibhav@linux.ibm.com/

Signed-off-by: Vaibhav Jain <vaibhav@linux.ibm.com>
Message-Id: <20210402102128.213943-1-vaibhav@linux.ibm.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/misc/mst_fpga.c')
0 files changed, 0 insertions, 0 deletions