Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp9296459ybl; Wed, 25 Dec 2019 18:32:31 -0800 (PST) X-Google-Smtp-Source: APXvYqz37vDGs+iqxmOdt0+Bi94sSVeSYeEQV3zww896es8TxLyuAvHYYWLIc0j9we117SjSGlUT X-Received: by 2002:a05:6830:304c:: with SMTP id p12mr18091802otr.214.1577327551078; Wed, 25 Dec 2019 18:32:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1577327551; cv=none; d=google.com; s=arc-20160816; b=bwMaWbffOIHgH9uyPy926mc71AyD7Pxv8RLHmNMUgsGOJ2/zM94iG97+fstFm9aPZC CnoSp5YV68TJDb013WQczKfh66IBybFVW5hGT9y/7lZvqrO2cUKZ71K9jGcPkvemGCpZ 8RcLonbzfYKQVHvnc9lv2NAZoWtnHNCt0CH59vRuP+4sK+92Qpvd7ckY0bqpKdLdf9cj AvIm1DtBFe0Fqk2DVvpIGZcqFBSlTuV7Coxx/APuEHEkh3VzIu/pn8CtuSAFNzoPsSoi R694qovfgtsTfW/2pGA74ESr4Xl07WVQn7FsiRU94ZLbtzt1+6dK7oGzhLL/YuKQGnkx p41A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:message-id:date:thread-index :thread-topic:subject:cc:to:from; bh=5AFdpOmeIGi102aPnSy8dUKgtL4Y+rYK6gf0tFSkgQ8=; b=LJetnKa1IPDg/RLipVsjmVbR7KziiWYxEsG24qW+Jn8mkJEh55pzTPO14Jhp595Wg+ v4eCXnE/4VjOiRcObHz9DoncV8v0j/SXPFscbiI7/3d4rhuNLhTjUwxLtrri51l+p3CR RT+0MuN9zXGPRHKgqikZF3Jwef5mZhAK4rA5ZnKbAsuXoEL1FtBH0SRirnPt4SJwy1v2 vfCvVO74pQ133e6S2+5vYoGP/hBpc4nd+nsRTfGhxIH/GbY+7b7Z9it5gcjqxJ3Ot9j1 0MCV8QTbxfjgAwdTc6UR1DgMt2yHHH2smWsjZRZecVH1xaSC/dxk0j/nLMWa9TpIWVnd Y6dQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m20si8938899otk.279.2019.12.25.18.32.20; Wed, 25 Dec 2019 18:32:31 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726982AbfLZCba convert rfc822-to-8bit (ORCPT + 99 others); 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.