Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752165AbdF1OSE (ORCPT ); Wed, 28 Jun 2017 10:18:04 -0400 Received: from mail-oi0-f41.google.com ([209.85.218.41]:33965 "EHLO mail-oi0-f41.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751575AbdF1ORz (ORCPT ); Wed, 28 Jun 2017 10:17:55 -0400 MIME-Version: 1.0 In-Reply-To: <810b3613-72e8-4f34-2757-e622f922ae03@redhat.com> References: <1498652712-10283-1-git-send-email-wanpeng.li@hotmail.com> <1498652712-10283-4-git-send-email-wanpeng.li@hotmail.com> <293c4524-5869-2d3f-e0a3-92bde4430b81@redhat.com> <20170628133852.GA3261@potion> <810b3613-72e8-4f34-2757-e622f922ae03@redhat.com> From: Wanpeng Li Date: Wed, 28 Jun 2017 22:17:54 +0800 Message-ID: Subject: Re: [PATCH v6 3/4] KVM: async_pf: Force a nested vmexit if the injected #PF is async_pf To: Paolo Bonzini Cc: =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= , "linux-kernel@vger.kernel.org" , kvm , Wanpeng Li Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 993 Lines: 25 2017-06-28 22:11 GMT+08:00 Paolo Bonzini : > > > On 28/06/2017 16:09, Wanpeng Li wrote: >>> Yes, this was my question essentially. I would still migrate >>> nested_apf_token (as part of nested virt state), and then clear it in >>> KVM when doing the async-pf broadcast. >> Do you mean I should save nested_apf_token by GET_VCPU_EVENTS and >> restore it by SET_VCPU_EVENTS? I utilize the place of "u8 pad" in >> kvm_vcpu_events to hold nested_apf, however nested_apf_token is >> unsigned long. > > If for now we can leave out the GET/SET_VCPU_EVENTS changes, that would > be best. nested_apf and nested_apf_token should be migrated together > with the rest of the nested virt state. Radim explains why we at least needs nested_apf here: > nested_apf is not #PF: if we didn't pass nested_apf, then the exception would be injected as #PF to L2 after migration. Do you mean we can ignore it here and depends on Jim's patches to completely handle it? Regards, Wanpeng Li