[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH RFC v1] x86/emulate: Send vm_event form emulate
>>> On 09.01.19 at 16:47, <royger@xxxxxxxxxxx> wrote: > On Mon, Jan 7, 2019 at 2:11 PM Alexandru Stefan ISAILA > <aisaila@xxxxxxxxxxxxxxx> wrote: >> + >> + req.reason = VM_EVENT_REASON_MEM_ACCESS; >> + req.u.mem_access.gfn = gfn_x(gfn); >> + req.u.mem_access.flags |= MEM_ACCESS_FAULT_WITH_GLA | >> MEM_ACCESS_GLA_VALID; >> + req.u.mem_access.gla = gla; >> + req.u.mem_access.offset = gpa & ((1 << PAGE_SHIFT) - 1); >> + >> + if ( monitor_traps(current, true, &req) < 0 ) >> + return false; >> + >> + return true; > > I think you can simplify this to: > > return monitor_traps(current, true, &req) < 0 ? false : true; return monitor_traps(current, true, &req) >= 0; Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |