From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A8758C2D0C8 for ; Thu, 26 Dec 2019 02:31:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 86BEF2075E for ; Thu, 26 Dec 2019 02:31:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727007AbfLZCba convert rfc822-to-8bit (ORCPT ); Wed, 25 Dec 2019 21:31:30 -0500 Received: from szxga02-in.huawei.com ([45.249.212.188]:2539 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726899AbfLZCba (ORCPT ); Wed, 25 Dec 2019 21:31:30 -0500 Received: from DGGEMM403-HUB.china.huawei.com (unknown [172.30.72.57]) by Forcepoint Email with ESMTP id 03246CF25FAB54CE2B2F; Thu, 26 Dec 2019 10:31:28 +0800 (CST) Received: from dggeme715-chm.china.huawei.com (10.1.199.111) by DGGEMM403-HUB.china.huawei.com (10.3.20.211) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 26 Dec 2019 10:31:27 +0800 Received: from dggeme763-chm.china.huawei.com (10.3.19.109) by dggeme715-chm.china.huawei.com (10.1.199.111) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Thu, 26 Dec 2019 10:31:27 +0800 Received: from dggeme763-chm.china.huawei.com ([10.6.66.36]) by dggeme763-chm.china.huawei.com ([10.6.66.36]) with mapi id 15.01.1713.004; Thu, 26 Dec 2019 10:31:27 +0800 From: linmiaohe To: Liran Alon CC: "pbonzini@redhat.com" , "rkrcmar@redhat.com" , "sean.j.christopherson@intel.com" , "vkuznets@redhat.com" , "wanpengli@tencent.com" , "jmattson@google.com" , "joro@8bytes.org" , "tglx@linutronix.de" , "mingo@redhat.com" , "bp@alien8.de" , "hpa@zytor.com" , "kvm@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "x86@kernel.org" Subject: Re: [PATCH] KVM: nvmx: retry writing guest memory after page fault injected Thread-Topic: [PATCH] KVM: nvmx: retry writing guest memory after page fault injected Thread-Index: AdW7k0w0WbRQrxXDT82zueNPzgGwWg== Date: Thu, 26 Dec 2019 02:31:27 +0000 Message-ID: <5744632b88b44369a68c0b0704bfb48e@huawei.com> Accept-Language: en-US Content-Language: zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.173.221.158] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Liran Alon wrote: >> On 25 Dec 2019, at 4:21, linmiaohe wrote: >> >> From: Miaohe Lin >> >> We should retry writing guest memory when >> kvm_write_guest_virt_system() failed and page fault is injected in handle_vmread(). >> >> Signed-off-by: Miaohe Lin > >Patch fix seems correct to me: >Reviewed-by: Liran Alon Thanks for your review. >However, I suggest to rephrase commit title & message as follows: > >""" >KVM: nVMX: vmread should not set rflags to specify success in case of #PF > >In case writing to vmread destination operand result in a #PF, vmread should not call nested_vmx_succeed() to set rflags to specify success. Similar to as done in for VMPTRST (See handle_vmptrst()). >""" Thanks for your sueestion, I would rephrase commit title & message accordingly. > >In addition, it will be appreciated if you would also submit kvm-unit-test that verifies this condition. I'd like to submit kvm-unit-test that verifies this condition, but I am not familiar with the kvm-unit-test code yet and also not in my recent todo list. So such a patch may come late. It would be appreciated too if you could submit this kvm-unit-test patch. :) Thanks again.