* [PATCH] KVM: explicitly set rmap_head->val to 0 in pte_list_desc_remove_entry()
@ 2019-12-05 3:40 linmiaohe
2019-12-05 10:19 ` Paolo Bonzini
0 siblings, 1 reply; 2+ messages in thread
From: linmiaohe @ 2019-12-05 3:40 UTC (permalink / raw)
To: pbonzini, rkrcmar, sean.j.christopherson, vkuznets, wanpengli,
jmattson, joro, tglx, mingo, bp, hpa
Cc: linmiaohe, kvm, linux-kernel, x86
From: Miaohe Lin <linmiaohe@huawei.com>
When we reach here, we have desc->sptes[j] = NULL with j = 0.
So we can replace desc->sptes[0] with 0 to make it more clear.
Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
arch/x86/kvm/mmu/mmu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
index 6f92b40d798c..a81c605abbba 100644
--- a/arch/x86/kvm/mmu/mmu.c
+++ b/arch/x86/kvm/mmu/mmu.c
@@ -1410,7 +1410,7 @@ pte_list_desc_remove_entry(struct kvm_rmap_head *rmap_head,
if (j != 0)
return;
if (!prev_desc && !desc->more)
- rmap_head->val = (unsigned long)desc->sptes[0];
+ rmap_head->val = 0;
else
if (prev_desc)
prev_desc->more = desc->more;
--
2.19.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] KVM: explicitly set rmap_head->val to 0 in pte_list_desc_remove_entry()
2019-12-05 3:40 [PATCH] KVM: explicitly set rmap_head->val to 0 in pte_list_desc_remove_entry() linmiaohe
@ 2019-12-05 10:19 ` Paolo Bonzini
0 siblings, 0 replies; 2+ messages in thread
From: Paolo Bonzini @ 2019-12-05 10:19 UTC (permalink / raw)
To: linmiaohe, rkrcmar, sean.j.christopherson, vkuznets, wanpengli,
jmattson, joro, tglx, mingo, bp, hpa
Cc: kvm, linux-kernel, x86
On 05/12/19 04:40, linmiaohe wrote:
> From: Miaohe Lin <linmiaohe@huawei.com>
>
> When we reach here, we have desc->sptes[j] = NULL with j = 0.
> So we can replace desc->sptes[0] with 0 to make it more clear.
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> ---
> arch/x86/kvm/mmu/mmu.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/kvm/mmu/mmu.c b/arch/x86/kvm/mmu/mmu.c
> index 6f92b40d798c..a81c605abbba 100644
> --- a/arch/x86/kvm/mmu/mmu.c
> +++ b/arch/x86/kvm/mmu/mmu.c
> @@ -1410,7 +1410,7 @@ pte_list_desc_remove_entry(struct kvm_rmap_head *rmap_head,
> if (j != 0)
> return;
> if (!prev_desc && !desc->more)
> - rmap_head->val = (unsigned long)desc->sptes[0];
> + rmap_head->val = 0;
> else
> if (prev_desc)
> prev_desc->more = desc->more;
>
Queued, thanks.
Paolo
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-12-05 10:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-12-05 3:40 [PATCH] KVM: explicitly set rmap_head->val to 0 in pte_list_desc_remove_entry() linmiaohe
2019-12-05 10:19 ` Paolo Bonzini
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).