From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Michael Ellerman <mpe@ellerman.id.au>, linuxppc-dev@ozlabs.org
Cc: stewart@linux.vnet.ibm.com, mikey@neuling.org, paulus@samba.org,
cyrilbur@gmail.com
Subject: Re: [5/4] KVM: PPC: Tie KVM_CAP_PPC_HTM to the user-visible TM feature
Date: Tue, 24 Oct 2017 19:08:47 +1100 (AEDT) [thread overview]
Message-ID: <3yLmB80ZYDz9s76@ozlabs.org> (raw)
In-Reply-To: <1507809534-10721-1-git-send-email-mpe@ellerman.id.au>
On Thu, 2017-10-12 at 11:58:54 UTC, Michael Ellerman wrote:
> Currently we use CPU_FTR_TM to decide if the CPU/kernel can support
> TM (Transactional Memory), and if it's true we advertise that to
> Qemu (or similar) via KVM_CAP_PPC_HTM.
>
> PPC_FEATURE2_HTM is the user-visible feature bit, which indicates that
> the CPU and kernel can support TM. Currently CPU_FTR_TM and
> PPC_FEATURE2_HTM always have the same value, either true or false, so
> using the former for KVM_CAP_PPC_HTM is correct.
>
> However some Power9 CPUs can operate in a mode where TM is enabled but
> TM suspended state is disabled. In this mode CPU_FTR_TM is true, but
> PPC_FEATURE2_HTM is false. Instead a different PPC_FEATURE2 bit is
> set, to indicate that this different mode of TM is available.
>
> It is not safe to let guests use TM as-is, when the CPU is in this
> mode. So to prevent that from happening, use PPC_FEATURE2_HTM to
> determine the value of KVM_CAP_PPC_HTM.
>
> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Applied to powerpc next.
https://git.kernel.org/powerpc/c/2a3d6553cbd791da4fb624c2500b45
cheers
next prev parent reply other threads:[~2017-10-24 8:08 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-12 10:17 [PATCH 1/4] powerpc/tm: Add commandline option to disable hardware transactional memory Michael Ellerman
2017-10-12 10:17 ` [PATCH 2/4] powerpc: Add PPC_FEATURE2_HTM_NO_SUSPEND Michael Ellerman
2017-10-12 10:17 ` [PATCH 3/4] powerpc/powernv: Enable TM without suspend if possible Michael Ellerman
2017-10-19 10:07 ` Florian Weimer
2017-10-19 12:04 ` Tulio Magno Quites Machado Filho
2017-10-19 12:45 ` Florian Weimer
2017-10-19 13:34 ` Tulio Magno Quites Machado Filho
2017-10-19 15:13 ` Adhemerval Zanella
2017-10-22 9:59 ` Michael Ellerman
2017-10-20 2:47 ` Michael Neuling
2017-10-22 9:48 ` Michael Ellerman
2017-10-22 9:54 ` Michael Ellerman
2017-10-12 10:17 ` [PATCH 4/4] powerpc/tm: P9 disable transactionally suspended sigcontexts Michael Ellerman
2017-10-12 11:58 ` [PATCH 5/4] KVM: PPC: Tie KVM_CAP_PPC_HTM to the user-visible TM feature Michael Ellerman
2017-10-24 8:08 ` Michael Ellerman [this message]
2017-10-20 11:45 ` [PATCH 1/4] powerpc/tm: Add commandline option to disable hardware transactional memory Breno Leitao
2017-10-20 12:58 ` David Laight
2017-10-21 1:00 ` Michael Neuling
2017-10-23 9:01 ` David Laight
2017-10-23 9:15 ` Michael Neuling
2017-10-21 0:58 ` Michael Neuling
2017-10-23 12:56 ` Breno Leitao
2017-10-24 8:12 ` Michael Ellerman
2017-10-24 8:08 ` [1/4] " Michael Ellerman
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=3yLmB80ZYDz9s76@ozlabs.org \
--to=patch-notifications@ellerman.id.au \
--cc=cyrilbur@gmail.com \
--cc=linuxppc-dev@ozlabs.org \
--cc=mikey@neuling.org \
--cc=mpe@ellerman.id.au \
--cc=paulus@samba.org \
--cc=stewart@linux.vnet.ibm.com \
/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).