Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1610508 > unrolled thread
| Started by | gengdongjiu <gengdongjiu@huawei.com> |
|---|---|
| First post | 2017-03-28 12:00 +0200 |
| Last post | 2017-03-28 18:50 +0200 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH V13 10/10] arm/arm64: KVM: add guest SEA support gengdongjiu <gengdongjiu@huawei.com> - 2017-03-28 12:00 +0200
Re: [PATCH V13 10/10] arm/arm64: KVM: add guest SEA support "Baicar, Tyler" <tbaicar@codeaurora.org> - 2017-03-28 18:50 +0200
| From | gengdongjiu <gengdongjiu@huawei.com> |
|---|---|
| Date | 2017-03-28 12:00 +0200 |
| Subject | Re: [PATCH V13 10/10] arm/arm64: KVM: add guest SEA support |
| Message-ID | <tpW4W-5IO-21@gated-at.bofh.it> |
Hi,
On 2017/3/22 6:47, Tyler Baicar wrote:
> + fault_ipa = kvm_vcpu_get_fault_ipa(vcpu);
> +
> + /* The host kernel will handle the synchronous external abort. There
> + * is no need to pass the error into the guest.
> + */
> + if (is_abort_synchronous(fault_status))
> + sea_status = handle_guest_sea((unsigned long)fault_ipa,
> + kvm_vcpu_get_hsr(vcpu));
>
> is_iabt = kvm_vcpu_trap_is_iabt(vcpu);
> - if (unlikely(!is_iabt && kvm_vcpu_dabt_isextabt(vcpu))) {
> + if (unlikely(!is_iabt && kvm_vcpu_dabt_isextabt(vcpu)) && sea_status) {
> kvm_inject_vabt(vcpu);
> return 1;
> }
After the host kernel correctly handle the synchronous external abort, the sea_status
will return 0, so the code logical will be continue go-no, whether it is better directly return
after correctly handle the SEA? such as below.
if (unlikely(!is_iabt && kvm_vcpu_dabt_isextabt(vcpu)) && sea_status) {
kvm_inject_vabt(vcpu);
return 1;
} else
return 1;
>
> - fault_ipa = kvm_vcpu_get_fault_ipa(vcpu);
> -
> trace_kvm_guest_fault(*vcpu_pc(vcpu), kvm_vcpu_get_hsr(vcpu),
> kvm_vcpu_get_hfar(vcpu), fault_ipa);
>
> - /* Check the stage-2 fault is trans. fault or write fault */
> - fault_status = kvm_vcpu_trap_get_fault_type(vcpu);
> if (fault_status != FSC_FAULT && fault_status != FSC_PERM &&
[toc] | [next] | [standalone]
| From | "Baicar, Tyler" <tbaicar@codeaurora.org> |
|---|---|
| Date | 2017-03-28 18:50 +0200 |
| Message-ID | <tq2tH-1Yg-13@gated-at.bofh.it> |
| In reply to | #1610508 |
Hello,
On 3/28/2017 3:53 AM, gengdongjiu wrote:
> Hi,
>
> On 2017/3/22 6:47, Tyler Baicar wrote:
>> + fault_ipa = kvm_vcpu_get_fault_ipa(vcpu);
>> +
>> + /* The host kernel will handle the synchronous external abort. There
>> + * is no need to pass the error into the guest.
>> + */
>> + if (is_abort_synchronous(fault_status))
>> + sea_status = handle_guest_sea((unsigned long)fault_ipa,
>> + kvm_vcpu_get_hsr(vcpu));
>>
>> is_iabt = kvm_vcpu_trap_is_iabt(vcpu);
>> - if (unlikely(!is_iabt && kvm_vcpu_dabt_isextabt(vcpu))) {
>> + if (unlikely(!is_iabt && kvm_vcpu_dabt_isextabt(vcpu)) && sea_status) {
>> kvm_inject_vabt(vcpu);
>> return 1;
>> }
> After the host kernel correctly handle the synchronous external abort, the sea_status
> will return 0, so the code logical will be continue go-no, whether it is better directly return
> after correctly handle the SEA? such as below.
>
> if (unlikely(!is_iabt && kvm_vcpu_dabt_isextabt(vcpu)) && sea_status) {
> kvm_inject_vabt(vcpu);
> return 1;
> } else
> return 1;
Yes, I will return after successful SEA handling in the next patch set.
Thanks,
Tyler
>
>>
>> - fault_ipa = kvm_vcpu_get_fault_ipa(vcpu);
>> -
>> trace_kvm_guest_fault(*vcpu_pc(vcpu), kvm_vcpu_get_hsr(vcpu),
>> kvm_vcpu_get_hfar(vcpu), fault_ipa);
>>
>> - /* Check the stage-2 fault is trans. fault or write fault */
>> - fault_status = kvm_vcpu_trap_get_fault_type(vcpu);
>> if (fault_status != FSC_FAULT && fault_status != FSC_PERM &&
--
Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc.
Qualcomm Technologies, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web