[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2] hvm/svm: Implement Debug events
>>> On 20.03.18 at 17:14, <andrew.cooper3@xxxxxxxxxx> wrote: > On 20/03/18 16:05, Jan Beulich wrote: >>>>> On 20.03.18 at 16:53, <andrew.cooper3@xxxxxxxxxx> wrote: >>> Please could you delete this function and use: >>> >>> diff --git a/xen/include/asm-x86/hvm/hvm.h b/xen/include/asm-x86/hvm/hvm.h >>> index 2376ed6..843dafe 100644 >>> --- a/xen/include/asm-x86/hvm/hvm.h >>> +++ b/xen/include/asm-x86/hvm/hvm.h >>> @@ -407,6 +407,19 @@ void hvm_migrate_pirqs(struct vcpu *v); >>> >>> void hvm_inject_event(const struct x86_event *event); >>> >>> +static inline void hvm_inject_exception( >>> + unsigned int vector, unsigned int type, unsigned int insn_len) >>> +{ >>> + struct x86_event event = { >>> + .vector = vector, >>> + .type = type, >>> + .insn_len = insn_len, >>> + .error_code = X86_EVENT_NO_EC, >>> + }; >>> + >>> + hvm_inject_event(&event); >>> +} >>> + >>> static inline void hvm_inject_hw_exception(unsigned int vector, int >>> errcode) >>> { >>> struct x86_event event = { >>> >>> as a new common helper. (I'm not terribly happy with the name, but I >>> can't think of a better alternative, seeing as it is needed for both >>> software and hardware exceptions.) >> We'll need some better name though - "exception" together with >> an unconditional X86_EVENT_NO_EC is not really a reasonable >> combination. > > Alternatively, keep the current name, extend the parameter list with an > "int error_code" and have the new callers pass X86_EVENT_NO_EC in? Fine with me. 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 |