[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <40f67a70-5076-3806-1ec7-a4ac50d13774@redhat.com>
Date: Thu, 23 Sep 2021 16:36:24 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Lai Jiangshan <jiangshanlai@...il.com>,
linux-kernel@...r.kernel.org
Cc: Lai Jiangshan <laijs@...ux.alibaba.com>,
Sean Christopherson <seanjc@...gle.com>,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>,
Thomas Gleixner <tglx@...utronix.de>,
Ingo Molnar <mingo@...hat.com>, Borislav Petkov <bp@...en8.de>,
x86@...nel.org, "H. Peter Anvin" <hpa@...or.com>,
Marcelo Tosatti <mtosatti@...hat.com>,
Avi Kivity <avi@...hat.com>, kvm@...r.kernel.org
Subject: Re: [PATCH V2 02/10] KVM: X86: Synchronize the shadow pagetable
before link it
On 18/09/21 02:56, Lai Jiangshan wrote:
> + * It also makes KVM_REQ_MMU_SYNC request if the @sp
> + * is linked on a different addr to expedite it.
> + */
> + if (sp->unsync_children &&
> + mmu_sync_children(vcpu, sp, false)) {
> + kvm_make_request(KVM_REQ_MMU_SYNC, vcpu);
> + return RET_PF_RETRY;
> + }
> }
I think we can put the sync in mmu_sync_children:
- if (!can_yield)
+ if (!can_yield) {
+ /*
+ * Some progress has been made so the caller
+ * can simply retry, but we can expedite the
+ * process by forcing a sync to happen.
+ */
+ kvm_make_request(KVM_REQ_MMU_SYNC, vcpu);
return -EINTR;
+ }
Paolo
Powered by blists - more mailing lists