target/ppc: add MMCR0 PMCC bits to hflags
commitf7460df27162d1643f74677d53fad4328142c6a9
authorDaniel Henrique Barboza <danielhb413@gmail.com>
Mon, 18 Oct 2021 01:01:19 +0000 (17 22:01 -0300)
committerDavid Gibson <david@gibson.dropbear.id.au>
Thu, 21 Oct 2021 00:42:47 +0000 (21 11:42 +1100)
tree4ad9ae258c42aad2432137ca098fff234a63c8e3
parent6fa5726be6a52b246335cb86a3c118cdfd40c677
target/ppc: add MMCR0 PMCC bits to hflags

We're going to add PMU support for TCG PPC64 chips, based on IBM POWER8+
emulation and following PowerISA v3.1. This requires several PMU related
registers to be exposed to userspace (problem state). PowerISA v3.1
dictates that the PMCC bits of the MMCR0 register controls the level of
access of the PMU registers to problem state.

This patch start things off by exposing both PMCC bits to hflags,
allowing us to access them via DisasContext in the read/write callbacks
that we're going to add next.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Message-Id: <20211018010133.315842-2-danielhb413@gmail.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
target/ppc/cpu.h
target/ppc/helper_regs.c
target/ppc/translate.c