From mboxrd@z Thu Jan 1 00:00:00 1970 From: Razvan Cojocaru Subject: Re: [PATCH RFC V4 4/5] xen, libxc: Request page fault injection via libxc Date: Mon, 04 Aug 2014 18:11:14 +0300 Message-ID: <53DFA292.1030608@bitdefender.com> References: <1407151825-3843-1-git-send-email-rcojocaru@bitdefender.com> <1407151825-3843-4-git-send-email-rcojocaru@bitdefender.com> <53DFB4270200007800029147@mail.emea.novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <53DFB4270200007800029147@mail.emea.novell.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: Jan Beulich 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 08/04/2014 05:26 PM, Jan Beulich wrote: >>>> On 04.08.14 at 13:30, wrote: >> +static bool_t vmx_check_pf_injection(void) >> +{ >> + struct vcpu *curr = current; >> + struct domain *d = curr->domain; >> + struct segment_register seg; >> + unsigned long ev; >> + uint32_t pending_event = 0; >> + >> + if ( likely(d->arch.hvm_domain.fault_info.virtual_address == 0 ) > > Bad space before ). And my question stands: Why is VA zero > special? It's special because for our purposes (mostly Windows HVM guests, but I think the same applies to Linux), that page is reserved and it's never swapped out, so there would be no point in asking for a page fault injection there. If you think that a code comment is not enough here and that in the future somebody might legitimately want to use 0 as a proper value, I'll add a "valid" member and use that explicitly. Thanks, Razvan Cojocaru