From mboxrd@z Thu Jan 1 00:00:00 1970 From: Razvan Cojocaru Subject: Re: [PATCH RFC V2 5/6] xen, libxc: Request page fault injection via libxc Date: Thu, 17 Jul 2014 15:22:02 +0300 Message-ID: <53C7BFEA.8040002@bitdefender.com> References: <1405093418-23481-1-git-send-email-rcojocaru@bitdefender.com> <1405093418-23481-5-git-send-email-rcojocaru@bitdefender.com> <53C027BF.1090902@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53C027BF.1090902@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper , xen-devel@lists.xen.org Cc: mdontu@bitdefender.com, tim@xen.org, JBeulich@suse.com List-Id: xen-devel@lists.xenproject.org On 07/11/2014 09:06 PM, Andrew Cooper wrote: > On 11/07/14 16:43, Razvan Cojocaru wrote: >> + && !ctxt.pending_event >> + && ctxt.cr3 == d->fault_info.address_space ) >> + { >> + /* Cache */ >> + uint64_t virtual_address = d->fault_info.virtual_address; >> + uint32_t write_access = d->fault_info.write_access; >> + >> + /* Reset */ >> + d->fault_info.address_space = 0; >> + d->fault_info.virtual_address = 0; >> + d->fault_info.write_access = 0; >> + >> + hvm_inject_page_fault((write_access << 1) | PFEC_user_mode, > > It is sensible in the slightest to have write_access shifted by 1 with > respect to a real pagefault error code? I'm not sure I follow this comment. Could you please elaborate a bit more? Thanks, Razvan Cojocaru