From: zichao <zhichao.huang@linaro.org>
To: "Alex Bennée" <alex.bennee@linaro.org>
Cc: kvm@vger.kernel.org, marc.zyngier@arm.com, will.deacon@arm.com,
huangzhichao@huawei.com, linux-arm-kernel@lists.infradead.org,
kvmarm@lists.cs.columbia.edu
Subject: Re: [PATCH v2 04/11] KVM: arm: common infrastructure for handling AArch32 CP14/CP15
Date: Mon, 15 Jun 2015 00:17:23 +0800 [thread overview]
Message-ID: <557DA913.5030205@linaro.org> (raw)
In-Reply-To: <87y4jt6tyw.fsf@linaro.org>
On 2015/6/9 18:45, Alex Bennée wrote:
>
> Zhichao Huang <zhichao.huang@linaro.org> writes:
>
>> As we're about to trap a bunch of CP14 registers, let's rework
>> the CP15 handling so it can be generalized and work with multiple
>> tables.
>>
>> Signed-off-by: Zhichao Huang <zhichao.huang@linaro.org>
>> ---
>> arch/arm/kvm/coproc.c | 176 ++++++++++++++++++++++++++---------------
>> arch/arm/kvm/interrupts_head.S | 2 +-
>> 2 files changed, 112 insertions(+), 66 deletions(-)
>>
>> diff --git a/arch/arm/kvm/coproc.c b/arch/arm/kvm/coproc.c
>> index 9d283d9..d23395b 100644
>> --- a/arch/arm/kvm/coproc.c
>> +++ b/arch/arm/kvm/coproc.c
>> @@ -375,6 +375,9 @@ static const struct coproc_reg cp15_regs[] = {
>> { CRn(15), CRm( 0), Op1( 4), Op2( 0), is32, access_cbar},
>> };
>>
>> +static const struct coproc_reg cp14_regs[] = {
>> +};
>> +
>> /* Target specific emulation tables */
>> static struct kvm_coproc_target_table *target_tables[KVM_ARM_NUM_TARGETS];
>>
>> @@ -424,47 +427,75 @@ static const struct coproc_reg *find_reg(const struct coproc_params *params,
>> return NULL;
>> }
>>
>> -static int emulate_cp15(struct kvm_vcpu *vcpu,
>> - const struct coproc_params *params)
>> +/*
>> + * emulate_cp -- tries to match a cp14/cp15 access in a handling table,
>> + * and call the corresponding trap handler.
>> + *
>> + * @params: pointer to the descriptor of the access
>> + * @table: array of trap descriptors
>> + * @num: size of the trap descriptor array
>> + *
>> + * Return 0 if the access has been handled, and -1 if not.
>> + */
>> +static int emulate_cp(struct kvm_vcpu *vcpu,
>> + const struct coproc_params *params,
>> + const struct coproc_reg *table,
>> + size_t num)
>> {
>> - size_t num;
>> - const struct coproc_reg *table, *r;
>> -
>> - trace_kvm_emulate_cp15_imp(params->Op1, params->Rt1, params->CRn,
>> - params->CRm, params->Op2,
>> params->is_write);
>
> Where has this trace gone? We still want to be able to view register
> traps when debugging.
>
OK, I will add it in v3 patches.
>
_______________________________________________
kvmarm mailing list
kvmarm@lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm
next prev parent reply other threads:[~2015-06-14 16:17 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-31 4:27 [PATCH v2 00/11] KVM: arm: debug infrastructure support Zhichao Huang
2015-05-31 4:27 ` [PATCH v2 01/11] KVM: arm: plug guest debug exploit Zhichao Huang
2015-06-01 10:56 ` Marc Zyngier
2015-06-07 13:40 ` zichao
2015-06-09 10:29 ` Marc Zyngier
2015-06-14 16:08 ` zichao
2015-06-14 16:13 ` zichao
2015-06-16 16:49 ` Will Deacon
2015-05-31 4:27 ` [PATCH v2 02/11] KVM: arm: rename pm_fake handler to trap_raz_wi Zhichao Huang
2015-06-09 10:42 ` Alex Bennée
2015-05-31 4:27 ` [PATCH v2 03/11] KVM: arm: enable to use the ARM_DSCR_MDBGEN macro from KVM assembly code Zhichao Huang
2015-06-09 13:42 ` Alex Bennée
2015-05-31 4:27 ` [PATCH v2 04/11] KVM: arm: common infrastructure for handling AArch32 CP14/CP15 Zhichao Huang
2015-06-09 10:45 ` Alex Bennée
2015-06-14 16:17 ` zichao [this message]
2015-05-31 4:27 ` [PATCH v2 05/11] KVM: arm: check ordering of all system register tables Zhichao Huang
2015-06-10 13:52 ` Alex Bennée
2015-06-14 16:18 ` zichao
2015-05-31 4:27 ` [PATCH v2 06/11] KVM: arm: add trap handlers for 32-bit debug registers Zhichao Huang
2015-05-31 4:27 ` [PATCH v2 07/11] KVM: arm: add trap handlers for 64-bit " Zhichao Huang
2015-05-31 4:27 ` [PATCH v2 08/11] KVM: arm: implement dirty bit mechanism for " Zhichao Huang
2015-05-31 4:27 ` [PATCH v2 09/11] KVM: arm: disable debug mode if we don't actually need it Zhichao Huang
2015-06-01 10:16 ` Will Deacon
2015-06-07 14:08 ` zichao
2015-05-31 4:27 ` [PATCH v2 10/11] KVM: arm: implement lazy world switch for debug registers Zhichao Huang
2015-05-31 4:27 ` [PATCH v2 11/11] KVM: arm: enable trapping of all " Zhichao Huang
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=557DA913.5030205@linaro.org \
--to=zhichao.huang@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=huangzhichao@huawei.com \
--cc=kvm@vger.kernel.org \
--cc=kvmarm@lists.cs.columbia.edu \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=marc.zyngier@arm.com \
--cc=will.deacon@arm.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).