From: "Jan Beulich" Subject: Re: [PATCH RFC V6 4/5] xen, libxc: Request page fault injection via libxc Date: Tue, 12 Aug 2014 17:03:32 +0100 Message-ID: <53EA56F4020000780002BC1F@mail.emea.novell.com> References: <1407769686-7918-1-git-send-email-rcojocaru@bitdefender.com> <1407769686-7918-4-git-send-email-rcojocaru@bitdefender.com> <53EA4C04020000780002BB71@mail.emea.novell.com> <53EA35DB.9070507@bitdefender.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53EA35DB.9070507@bitdefender.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Razvan Cojocaru Cc: kevin.tian@intel.com, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, eddie.dong@intel.com, xen-devel@lists.xen.org, jun.nakajima@intel.com, ian.jackson@eu.citrix.com List-Id: xen-devel@lists.xenproject.org >>> On 12.08.14 at 17:42, wrote: > On 08/12/2014 06:16 PM, Jan Beulich wrote: >>>>> On 11.08.14 at 17:08, wrote: >>> + uint64_t virtual_address = currd->arch.hvm_domain.fault_info.virtual_address; >>> + >>> + currd->arch.hvm_domain.fault_info.valid = 0; >>> + >>> + if ( currd->arch.hvm_domain.fault_info.write_access ) >>> + errcode |= PFEC_write_access; >> >> Isn't this pretty limited a set of error codes you're able to generate >> here? > > For the purpose of simply bringing in pages that the guest OS has > swapped out for inspection it's been enough. > > I've thought about making this a parameter to the new libxc function, > but it seems that the PFEC_... codes didn't make it into the public Xen > headers. But they're architectural values, so passing just numbers (and referring to the SDM/PM) would seem fine to me. In which case you probably wouldn't even need the write_access fields. Jan