From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v2 02/12] KVM: x86: tag the instructions which are used to write page table Date: Tue, 02 Aug 2011 15:20:30 +0300 Message-ID: <4E37EB8E.6080207@redhat.com> References: <4E37DA49.1040000@cn.fujitsu.com> <4E37DA73.7010908@cn.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Marcelo Tosatti , LKML , KVM To: Xiao Guangrong Return-path: Received: from mx1.redhat.com ([209.132.183.28]:33640 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754210Ab1HBMUg (ORCPT ); Tue, 2 Aug 2011 08:20:36 -0400 In-Reply-To: <4E37DA73.7010908@cn.fujitsu.com> Sender: kvm-owner@vger.kernel.org List-ID: On 08/02/2011 02:07 PM, Xiao Guangrong wrote: > The idea is from Avi: > | tag instructions that are typically used to modify the page tables, and drop > | shadow if any other instruction is used > | The list would include, I'd guess, and, or, bts, btc, mov, xchg, cmpxchg, and > | cmpxchg8b > > This patch is used to tag the instructions and in the later path, shadow page > is dropped if it is written by other instructions We already have a mechanism for this, the decode tables. Why not add a new flag, PageTable, and set it on all relevant instructions? Note we don't need to actually emulate, just decode, since page_fault can tell us whether a write failed due to page tables or mmio. -- error compiling committee.c: too many arguments to function