summaryrefslogtreecommitdiffstats
path: root/include/hw/ppc
diff options
context:
space:
mode:
authorSam Bobroff2017-08-18 07:50:22 +0200
committerDavid Gibson2017-09-08 01:30:55 +0200
commitfa98fbfcdfcb980b4a690b8bc93ab597935087b1 (patch)
treedf06da704c52b1e04a645f9104dd03e00ad97b64 /include/hw/ppc
parentspapr: fallback to raw mode if best compat mode cannot be set during CAS (diff)
downloadqemu-fa98fbfcdfcb980b4a690b8bc93ab597935087b1.tar.gz
qemu-fa98fbfcdfcb980b4a690b8bc93ab597935087b1.tar.xz
qemu-fa98fbfcdfcb980b4a690b8bc93ab597935087b1.zip
PPC: KVM: Support machine option to set VSMT mode
KVM now allows writing to KVM_CAP_PPC_SMT which has previously been read only. Doing so causes KVM to act, for that VM, as if the host's SMT mode was the given value. This is particularly important on Power 9 systems because their default value is 1, but they are able to support values up to 8. This patch introduces a way to control this capability via a new machine property called VSMT ("Virtual SMT"). If the value is not set on the command line a default is chosen that is, when possible, compatible with legacy systems. Note that the intialization of KVM_CAP_PPC_SMT has changed slightly because it has changed (in KVM) from a global capability to a VM-specific one. This won't cause a problem on older KVMs because VM capabilities fall back to global ones. Signed-off-by: Sam Bobroff <sam.bobroff@au1.ibm.com> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'include/hw/ppc')
-rw-r--r--include/hw/ppc/spapr.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/hw/ppc/spapr.h b/include/hw/ppc/spapr.h
index 91617e3277..c1b365f564 100644
--- a/include/hw/ppc/spapr.h
+++ b/include/hw/ppc/spapr.h
@@ -99,6 +99,7 @@ struct sPAPRMachineState {
uint64_t rtc_offset; /* Now used only during incoming migration */
struct PPCTimebase tb;
bool has_graphics;
+ uint32_t vsmt; /* Virtual SMT mode (KVM's "core stride") */
Notifier epow_notifier;
QTAILQ_HEAD(, sPAPREventLogEntry) pending_events;