[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 16:05, Jan Beulich wrote: >>>> On 20.03.18 at 16:53, <andrew.cooper3@xxxxxxxxxx> wrote: >> On 20/03/18 09:40, Alexandru Isaila wrote: >>> @@ -2438,16 +2439,15 @@ static bool svm_get_pending_event(struct vcpu *v, >>> struct x86_event *info) >>> return true; >>> } >>> >>> -static void svm_propagate_intr(struct vcpu *v, unsigned long insn_len) >>> +static void svm_propagate_intr(unsigned long insn_len, int16_t vector, >> uint8_t type) >> >> Hmm - not sure where the old unsigned long came from, but it isn't >> really correct. Also, as this function no longer propagates the >> contents of the vmcb, it is now mis-named. >> >> 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? ~Andrew _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |