From mboxrd@z Thu Jan 1 00:00:00 1970 From: Sean Christopherson Date: Thu, 06 Feb 2020 23:11:27 +0000 Subject: Re: [PATCH v5 19/19] KVM: selftests: Add test for KVM_SET_USER_MEMORY_REGION Message-Id: <20200206231127.GB24556@linux.intel.com> List-Id: References: <20200121223157.15263-1-sean.j.christopherson@intel.com> <20200121223157.15263-20-sean.j.christopherson@intel.com> <20200206223001.GJ700495@xz-x1> In-Reply-To: <20200206223001.GJ700495@xz-x1> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Peter Xu Cc: Paolo Bonzini , Paul Mackerras , Christian Borntraeger , Janosch Frank , David Hildenbrand , Cornelia Huck , Vitaly Kuznetsov , Wanpeng Li , Jim Mattson , Joerg Roedel , Marc Zyngier , James Morse , Julien Thierry , Suzuki K Poulose , linux-mips@vger.kernel.org, kvm@vger.kernel.org, kvm-ppc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, linux-kernel@vger.kernel.org, Christoffer Dall , Philippe =?iso-8859-1?Q?Mathieu-Daud=E9?= On Thu, Feb 06, 2020 at 05:30:01PM -0500, Peter Xu wrote: > On Tue, Jan 21, 2020 at 02:31:57PM -0800, Sean Christopherson wrote: > > Add a KVM selftest to test moving the base gfn of a userspace memory > > region. Although the basic concept of moving memory regions is not x86 > > specific, the assumptions regarding large pages and MMIO shenanigans > > used to verify the correctness make this x86_64 only for the time being. > > > > Signed-off-by: Sean Christopherson > > (I'm a bit curious why write 2 first before 1...) To verify KVM actually relocated the memslot and didn't leave anything in the TLB. If "2" isn't written, KVM could completely botch the MOVE but the guest_code() would still signal pass because it would eventually see the 0-> transitions. > Reviewed-by: Peter Xu > > -- > Peter Xu >