[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e9469628-dc2c-c738-5589-2ac19c01109c@redhat.com>
Date: Thu, 5 Dec 2019 11:19:33 +0100
From: Paolo Bonzini <pbonzini@...hat.com>
To: linmiaohe <linmiaohe@...wei.com>, rkrcmar@...hat.com,
sean.j.christopherson@...el.com, vkuznets@...hat.com,
wanpengli@...cent.com, jmattson@...gle.com, joro@...tes.org,
tglx@...utronix.de, mingo@...hat.com, bp@...en8.de, hpa@...or.com
Cc: kvm@...r.kernel.org, linux-kernel@...r.kernel.org, x86@...nel.org
Subject: Re: [PATCH] KVM: explicitly set rmap_head->val to 0 in
pte_list_desc_remove_entry()
On 05/12/19 04:40, linmiaohe wrote:
> From: Miaohe Lin <linmiaohe@...wei.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@...wei.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
Powered by blists - more mailing lists