[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH RFC V5 4/5] xen, libxc: Request page fault injection via libxc


  • To: Jan Beulich <JBeulich@xxxxxxxx>
  • From: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>
  • Date: Fri, 08 Aug 2014 17:55:03 +0300
  • Cc: kevin.tian@xxxxxxxxx, ian.campbell@xxxxxxxxxx, stefano.stabellini@xxxxxxxxxxxxx, andrew.cooper3@xxxxxxxxxx, eddie.dong@xxxxxxxxx, xen-devel@xxxxxxxxxxxxx, jun.nakajima@xxxxxxxxx, ian.jackson@xxxxxxxxxxxxx
  • Comment: DomainKeys? See http://domainkeys.sourceforge.net/
  • Delivery-date: Fri, 08 Aug 2014 14:55:04 +0000
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=bitdefender.com; b=kq49WoxeS+889ywdIdQDgEvUIm445rGuCqX2yIWqyIiehLB8H6w05tpONVtDxwsd55Qqmw1P6SqLOBJyYpw2Baiz7pA4jWFmXoQkcx8KSZZDcTjP+2CJosff3iRcniFy47AucUSqMfvUN0etgDQa+I2aMOMEyKskfUnyhvIe6u2QdlyPBUkis8JLzn5ccy/gsjwfJaIRRDJdpN+IImFZ4WG4HJtdQajhNB7tBbaeVAShK3aDI45dBy/uajLaeb7AP2SxpleaB3i5gOW3CSNpFlXATY/dnfv2SgdFexWebL70l31Nbi8TUclbg2YCHTfsBqBr+fFOXJeQVrD08fWf8g==; h=Received:Received:Received:Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding:X-BitDefender-Scanner:X-BitDefender-Spam:X-BitDefender-SpamStamp:X-BitDefender-CF-Stamp;
  • List-id: Xen developer discussion <xen-devel.lists.xen.org>

On 08/08/2014 05:48 PM, Jan Beulich wrote:
>> +    if ( seg.attr.fields.dpl != 3 ) /* Guest is not in user mode */
>> +        return 0;
>> +
>> +
> 
> Double blank line.Didn't I ask you to clean up your patches in this
> regard already?

Not me, but point taken. :)

>> +    if ( curr->arch.hvm_vcpu.guest_cr[3]
>> +         != d->arch.hvm_domain.fault_info.address_space )
> 
> Do you really mean to compare the full CR3 value here, rather than
> just bits 12...51? In which case the address_space field likely would
> better be a GPFN.

You're right, I'll compare the values shifted by PAGE_SHIFT.

>> +}
>> +
>> +static void vmx_inject_pf(void)
>> +{
>> +    struct vcpu *curr = current;
>> +    struct domain *d = curr->domain;
>> +    int errcode = PFEC_user_mode;
>> +    uint64_t virtual_address = 
>> d->arch.hvm_domain.fault_info.virtual_address;
>> +    uint32_t write_access = d->arch.hvm_domain.fault_info.write_access;
>> +
>> +    d->arch.hvm_domain.fault_info.address_space = 0;
>> +    d->arch.hvm_domain.fault_info.virtual_address = 0;
>> +    d->arch.hvm_domain.fault_info.write_access = 0;
> 
> Are these necessary? Because ...
> 
>> +    d->arch.hvm_domain.fault_info.valid = 0;
> 
> ... I would hope that this one is properly guarding all uses of the
> other fields.

No, they're not necessary anymore. Thank you for pointing that out.


Thanks,
Razvan Cojocaru

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.