From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: Correct way of tracking reads on given gfn ? Date: Mon, 09 Sep 2013 12:53:02 +0200 Message-ID: <522DA88E.6060906@redhat.com> References: <522D9E00.3090806@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "kvm@vger.kernel.org" To: SPA Return-path: Received: from mx1.redhat.com ([209.132.183.28]:50370 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751252Ab3IIKw5 (ORCPT ); Mon, 9 Sep 2013 06:52:57 -0400 In-Reply-To: Sender: kvm-owner@vger.kernel.org List-ID: Il 09/09/2013 12:22, SPA ha scritto: > Thanks Paolo. > > Is there a way where reads would trap ? > > I explored a bit on PM_PRESENT_MASK. Though its not READ bit, but a > PRESENT bit, it looks like it should generate traps on reads if this > bit is reset. From code, looks like rmap_write_protect() like function > I stated in previous mail should do. Would this approach work ? Are > there any glaring problems with this approach ? I cannot say right away. Another way could be to set reserved bits to generate EPT misconfigurations. See ept_set_mmio_spte_mask and is_mmio_spte. This would trap both reads and writes. Paolo