From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 13/13] arm64: kvm: Use common Set/Way sys definitions
Date: Tue, 31 Jan 2017 18:05:51 +0000 [thread overview]
Message-ID: <1485885951-2747-14-git-send-email-mark.rutland@arm.com> (raw)
In-Reply-To: <1485885951-2747-1-git-send-email-mark.rutland@arm.com>
Now that we have common definitions for the encoding of Set/Way cache
maintenance operations, make the KVM code use these, simplifying the
sys_reg_descs table.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Cc: Christoffer Dall <christoffer.dall@linaro.org>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Cc: kvmarm at lists.cs.columbia.edu
---
arch/arm64/kvm/sys_regs.c | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/arch/arm64/kvm/sys_regs.c b/arch/arm64/kvm/sys_regs.c
index 2b0b5fc..0d81bd4 100644
--- a/arch/arm64/kvm/sys_regs.c
+++ b/arch/arm64/kvm/sys_regs.c
@@ -824,15 +824,9 @@ static bool access_pmuserenr(struct kvm_vcpu *vcpu, struct sys_reg_params *p,
* more demanding guest...
*/
static const struct sys_reg_desc sys_reg_descs[] = {
- /* DC ISW */
- { Op0(0b01), Op1(0b000), CRn(0b0111), CRm(0b0110), Op2(0b010),
- access_dcsw },
- /* DC CSW */
- { Op0(0b01), Op1(0b000), CRn(0b0111), CRm(0b1010), Op2(0b010),
- access_dcsw },
- /* DC CISW */
- { Op0(0b01), Op1(0b000), CRn(0b0111), CRm(0b1110), Op2(0b010),
- access_dcsw },
+ { SYS_DESC(SYS_DC_ISW), access_dcsw },
+ { SYS_DESC(SYS_DC_CSW), access_dcsw },
+ { SYS_DESC(SYS_DC_CISW), access_dcsw },
DBG_BCR_BVR_WCR_WVR_EL1(0),
DBG_BCR_BVR_WCR_WVR_EL1(1),
--
1.9.1
next prev parent reply other threads:[~2017-01-31 18:05 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-31 18:05 [RFC PATCH 00/13] arm64/kvm: use common sysreg definitions Mark Rutland
2017-01-31 18:05 ` [RFC PATCH 01/13] arm64: sysreg: sort by encoding Mark Rutland
2017-01-31 18:05 ` [RFC PATCH 02/13] arm64: sysreg: add debug system registers Mark Rutland
2017-01-31 18:05 ` [RFC PATCH 03/13] arm64: sysreg: add performance monitor registers Mark Rutland
2017-01-31 18:05 ` [RFC PATCH 04/13] arm64: sysreg: subsume GICv3 sysreg definitions Mark Rutland
2017-01-31 18:05 ` [RFC PATCH 05/13] arm64: sysreg: add register encodings used by KVM Mark Rutland
2017-01-31 18:05 ` [RFC PATCH 06/13] arm64: sysreg: add Set/Way sys encodings Mark Rutland
2017-01-31 18:05 ` [RFC PATCH 07/13] arm64: kvm: add SYS_DESC() Mark Rutland
2017-01-31 18:05 ` [RFC PATCH 08/13] arm64: kvm: Use common debug sysreg definitions Mark Rutland
2017-01-31 18:05 ` [RFC PATCH 09/13] arm64: kvm: Use common performance monitor " Mark Rutland
2017-01-31 18:05 ` [RFC PATCH 10/13] arm64: kvm: Use common GICv3 " Mark Rutland
2017-01-31 18:05 ` [RFC PATCH 11/13] arm64: kvm: use common invariant " Mark Rutland
2017-01-31 18:05 ` [RFC PATCH 12/13] arm64: kvm: Use common " Mark Rutland
2017-01-31 18:05 ` Mark Rutland [this message]
2017-02-24 10:16 ` [RFC PATCH 00/13] arm64/kvm: use " Christoffer Dall
2017-02-24 12:16 ` Mark Rutland
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=1485885951-2747-14-git-send-email-mark.rutland@arm.com \
--to=mark.rutland@arm.com \
--cc=linux-arm-kernel@lists.infradead.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).