From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: KVM x86: Infinite loop on updating accessed bit in r/o page table Date: Tue, 25 Feb 2014 15:11:37 +0100 Message-ID: <530CA499.9070401@redhat.com> References: <530B8F92.50202@siemens.com> <530C7711.1050102@redhat.com> <530C7D19.2000409@siemens.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit To: Jan Kiszka , kvm Return-path: Received: from mail-qa0-f44.google.com ([209.85.216.44]:47306 "EHLO mail-qa0-f44.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752439AbaBYOLl (ORCPT ); Tue, 25 Feb 2014 09:11:41 -0500 Received: by mail-qa0-f44.google.com with SMTP id f11so310874qae.3 for ; Tue, 25 Feb 2014 06:11:40 -0800 (PST) In-Reply-To: <530C7D19.2000409@siemens.com> Sender: kvm-owner@vger.kernel.org List-ID: Il 25/02/2014 12:23, Jan Kiszka ha scritto: >> > even though OVMF sets the accessed/dirty bits so it's not exactly the same >> > scenario. >> > >> > Note that NPT simply does not support this. Page tables must be writable >> > in the NPT page tables, according to the AMD manual. > We could still emulate the instruction in such a case to get beyond the > write fault. Slow but more correct, I suppose. They must be writable always, even if A=D=1. So the only solution would be to emulate everything that puts page tables in ROMs, which is really too slow to be viable. We're really talking 50-100 times slower than bare metal. Paolo