From: Paul Mackerras <paulus@ozlabs.org>
To: linuxppc-dev@ozlabs.org, kvm@vger.kernel.org
Cc: kvm-ppc@vger.kernel.org
Subject: [PATCH V2 0/2] KVM: PPC: Book3S HV: Support POWER9's large decrementer mode
Date: Mon, 29 May 2017 10:07:46 +1000 [thread overview]
Message-ID: <20170529000746.GA8570@fergus.ozlabs.ibm.com> (raw)
One of the new features of POWER9 is that the decrementer (the
facility that provides an interrupt after a programmable length of
time) has been increased in size from 32 bits to 56 bits, allowing
time intervals of up to about 814 days, compared to 4 seconds
previously. This patch series adds support for the large decrementer
mode to HV KVM. There is already code in the host kernel to enable
large decrementer mode for the host, which means that some of the KVM
entry/exit code is currently incorrect; the first patch fixes that.
The second patch allows userspace to enable large decrementer mode for
the guest, by setting the appropriate bit in the guest LPCR value.
Changes in v2: use the presence of the ibm,dec-bits property to set
the CPU_FTR_LARGE_DEC bit rather than the ibm,pa-features property,
because QEMU already sets the large decrementer bit in the
ibm,pa-features property (correctly, since ibm,pa-features describes
the capabilities of the CPU hardware, not the settings established by
the host) but does not currently enable large decrementer mode for the
guest.
Paul.
---
arch/powerpc/include/asm/cputable.h | 4 ++-
arch/powerpc/include/asm/kvm_host.h | 2 +-
arch/powerpc/kernel/prom.c | 1 +
arch/powerpc/kernel/time.c | 7 ++---
arch/powerpc/kvm/book3s_hv.c | 2 ++
arch/powerpc/kvm/book3s_hv_interrupts.S | 2 ++
arch/powerpc/kvm/book3s_hv_rmhandlers.S | 51 ++++++++++++++++++++++++++-------
arch/powerpc/kvm/emulate.c | 4 +--
8 files changed, 54 insertions(+), 19 deletions(-)
next reply other threads:[~2017-05-29 0:09 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-29 0:07 Paul Mackerras [this message]
2017-05-29 0:08 ` [PATCH V2 1/2] KVM: PPC: Book3S HV: Cope with host using large decrementer mode Paul Mackerras
2017-05-29 0:09 ` [PATCH V2 2/2] KVM: PPC: Book3S HV: Enable guests to use large decrementer mode on POWER9 Paul Mackerras
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170529000746.GA8570@fergus.ozlabs.ibm.com \
--to=paulus@ozlabs.org \
--cc=kvm-ppc@vger.kernel.org \
--cc=kvm@vger.kernel.org \
--cc=linuxppc-dev@ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).