All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shannon Zhao <zhaoshenglong@huawei.com>
To: Marc Zyngier <marc.zyngier@arm.com>,
	kvmarm@lists.cs.columbia.edu, christoffer.dall@linaro.org
Subject: Re: [PATCH 2/2] KVM: arm/arm64: vgic-v2: Add the missing resetting LRs at boot time
Date: Thu, 15 Dec 2016 17:09:13 +0800	[thread overview]
Message-ID: <58525DB9.40806@huawei.com> (raw)
In-Reply-To: <7f920e65-a82c-e05d-1d19-8b71e06ac770@arm.com>

Hi Marc,

On 2016/12/6 19:39, Marc Zyngier wrote:
> On 06/12/16 06:41, Shannon Zhao wrote:
>> From: Shannon Zhao <shannon.zhao@linaro.org>
>>
>> This is the corresponding part of commit d6400d7(KVM: arm/arm64:
>> vgic-v2: Reset LRs at boot time) which is missed for new-vgic.
>>
>> Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
>> ---
>>  virt/kvm/arm/vgic/vgic-v2.c | 11 +++++++++++
>>  1 file changed, 11 insertions(+)
>>
>> diff --git a/virt/kvm/arm/vgic/vgic-v2.c b/virt/kvm/arm/vgic/vgic-v2.c
>> index 9bab867..c636a19 100644
>> --- a/virt/kvm/arm/vgic/vgic-v2.c
>> +++ b/virt/kvm/arm/vgic/vgic-v2.c
>> @@ -300,6 +300,15 @@ int vgic_v2_map_resources(struct kvm *kvm)
>>  
>>  DEFINE_STATIC_KEY_FALSE(vgic_v2_cpuif_trap);
>>  
>> +static void vgic_cpu_init_lrs(void *params)
>> +{
>> +	int i;
>> +
>> +	for (i = 0; i < kvm_vgic_global_state.nr_lr; i++)
>> +		writel_relaxed(0, kvm_vgic_global_state.vctrl_base +
>> +				  GICH_LR0 + (i * 4));
>> +}
Since this function will use kvm_vgic_global_state which is initialized
by kvm_vgic_hyp_init, if we call it in cpu_hyp_reinit/cpu_init_hyp_mode,
the kvm_vgic_global_state is not initialized for now. Is that fine to
move kvm_vgic_hyp_init to the first place in init_subsystems?

Thanks,
-- 
Shannon

  reply	other threads:[~2016-12-15  9:09 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-06  6:41 [PATCH 0/2] Add the missing resetting LRs at boot time for new-vgic Shannon Zhao
2016-12-06  6:41 ` [PATCH 1/2] arm64: KVM: vgic-v3: Add the missing resetting LRs at boot time Shannon Zhao
2016-12-06 11:38   ` Marc Zyngier
2016-12-06  6:41 ` [PATCH 2/2] KVM: arm/arm64: vgic-v2: " Shannon Zhao
2016-12-06 11:39   ` Marc Zyngier
2016-12-15  9:09     ` Shannon Zhao [this message]
2016-12-06 11:47 ` [PATCH 0/2] Add the missing resetting LRs at boot time for new-vgic Marc Zyngier
2016-12-07  7:45   ` Shannon Zhao
2016-12-07  8:10     ` Marc Zyngier
2016-12-07 11:00       ` Shannon Zhao
2016-12-08 12:32         ` Christoffer Dall

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=58525DB9.40806@huawei.com \
    --to=zhaoshenglong@huawei.com \
    --cc=christoffer.dall@linaro.org \
    --cc=kvmarm@lists.cs.columbia.edu \
    --cc=marc.zyngier@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.