[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
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
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |