From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37057) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1dMW-0007Xj-Eb for qemu-devel@nongnu.org; Wed, 25 Nov 2015 11:56:09 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a1dMT-0000Bz-9E for qemu-devel@nongnu.org; Wed, 25 Nov 2015 11:56:08 -0500 Received: from relay.parallels.com ([195.214.232.42]:50766) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a1dMT-0000Au-1C for qemu-devel@nongnu.org; Wed, 25 Nov 2015 11:56:05 -0500 References: <1448464821-8199-1-git-send-email-asmetanin@virtuozzo.com> <1448464821-8199-7-git-send-email-asmetanin@virtuozzo.com> <5655E748.4080503@redhat.com> From: Andrey Smetanin Message-ID: <5655E800.5030309@virtuozzo.com> Date: Wed, 25 Nov 2015 19:55:28 +0300 MIME-Version: 1.0 In-Reply-To: <5655E748.4080503@redhat.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v1 6/7] kvm/x86: Hyper-V SynIC message slot pending clearing at SINT ack Reply-To: asmetanin@virtuozzo.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini , kvm@vger.kernel.org Cc: Gleb Natapov , Haiyang Zhang , qemu-devel@nongnu.org, Roman Kagan , "Denis V. Lunev" , Vitaly Kuznetsov , "K. Y. Srinivasan" On 11/25/2015 07:52 PM, Paolo Bonzini wrote: > > > On 25/11/2015 16:20, Andrey Smetanin wrote: >> +static void synic_clear_sint_msg_pending(struct kvm_vcpu_hv_synic *synic, >> + u32 sint) >> +{ >> + struct kvm_vcpu *vcpu = synic_to_vcpu(synic); >> + struct page *page; >> + gpa_t gpa; >> + struct hv_message *msg; >> + struct hv_message_page *msg_page; >> + >> + gpa = synic->msg_page & PAGE_MASK; >> + page = kvm_vcpu_gfn_to_page(vcpu, gpa >> PAGE_SHIFT); >> + if (is_error_page(page)) { >> + vcpu_err(vcpu, "Hyper-V SynIC can't get msg page, gpa 0x%llx\n", >> + gpa); >> + return; >> + } >> + msg_page = kmap_atomic(page); > > But the message page is not being pinned, is it? > Actually I don't know anything about pinning. Is it pinning against page swapping ? Could you please clarify and provide an API to use in this case ? > Paolo > >> + msg = &msg_page->sint_message[sint]; >> + msg->header.message_flags.msg_pending = 0; >> + >> + kunmap_atomic(msg_page); >> + kvm_release_page_dirty(page); >> + kvm_vcpu_mark_page_dirty(vcpu, gpa >> PAGE_SHIFT); >> +} >> +