[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] xc_hvm_inject_trap() races
On 11/07/2016 03:20 PM, Jan Beulich wrote: >>>> On 07.11.16 at 13:27, <rcojocaru@xxxxxxxxxxxxxxx> wrote: >> On 11/07/2016 02:23 PM, Jan Beulich wrote: >>>> At this point it looks like the best solution is to simply discard the >>>>> non-architectural event if there's a pending architectural one, and add >>>>> a new vm_event, as suggested by Tamas, that notifies the application >>>>> that a trap has failed, or succeeded, and let it do the best it can with >>>>> that information. >>> Well, if the two of you think this is something which fits into the VM >>> event model, then I guess that's an option. I, for one, am not >>> convinced: It simply seems too special purpose. If this was a more >>> generic event ("interruption delivered", perhaps with a type or >>> vector qualifier) that can be subscribed to, and the app did that >>> only for such transient periods of time, this would look more >>> reasonable to me. >> >> Indeed, that's the way I think of it: the user is free to subscribe to >> the event or not, and the event is: >> >> struct vm_event_injection_result { >> uint32_t vector; >> uint32_t type; >> uint32_t error_code; >> uint64_t cr2; >> uint32_t injected; >> }; >> >> with injected 0 for failure and 1 for success. It's as generic as possible. > > Wait, no, that's not what I did describe. I'm not talking about the > "result" of an injection (through hypercall), but about delivering of > events (of any origin). Hence there can't be any "failure" here. > IOW what I'm proposing is a "VM is about to see this interruption" > event. But a a success-only event is hard to interpret with regards to failure, which is what we're really interested in (specifically, failure to inject via hypercall). Do we count it as a failure if we don't receive a "VM is about to see this interruption" event immediately after the vm_event that caused the injection, on the same processor, with the same trap vector? That's a tricky commitment to make. That would also decrease performance, likely noticeably, for a vm_event-based application, as we'd get many such events (most of which we're not interested in at all) which would require treatment while the respective VCPU is paused. Tamas, any thoughts on this? Thanks, Razvan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |