|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v4] x86/monitor: Notify monitor if an emulation fails.
>>> On 12.07.17 at 19:21, <ppircalabu@xxxxxxxxxxxxxxx> wrote:
> ---
> tools/libxc/include/xenctrl.h | 2 ++
> tools/libxc/xc_monitor.c | 14 ++++++++++++++
> xen/arch/x86/hvm/emulate.c | 5 ++++-
> xen/arch/x86/hvm/monitor.c | 18 ++++++++++++++++++
> xen/arch/x86/monitor.c | 12 ++++++++++++
> xen/include/asm-x86/domain.h | 1 +
> xen/include/asm-x86/hvm/monitor.h | 1 +
> xen/include/asm-x86/monitor.h | 3 ++-
> xen/include/public/domctl.h | 1 +
> xen/include/public/vm_event.h | 2 ++
> 10 files changed, 57 insertions(+), 2 deletions(-)
Please be sure to Cc maintainers of all files you modify.
> --- a/xen/arch/x86/hvm/monitor.c
> +++ b/xen/arch/x86/hvm/monitor.c
> @@ -57,6 +57,24 @@ bool_t hvm_monitor_cr(unsigned int index, unsigned long
> value, unsigned long old
> return 0;
> }
>
> +bool hvm_monitor_emul_unhandleable(void)
> +{
> + struct vcpu *curr = current;
> + struct domain *d = curr->domain;
currd, but the variable is used just once, so perhaps best to omit
it altogether.
> + /*
> + * Send a vm_event to the monitor to signal that the current
> + * instruction couldn't be emulated.
> + */
> + vm_event_request_t req = {
> + .reason = VM_EVENT_REASON_EMUL_UNHANDLEABLE,
> + .vcpu_id = curr->vcpu_id,
> + };
> +
> + return ( d->arch.monitor.emul_unhandleable_enabled &&
> + monitor_traps(curr, true, &req) );
Just in case Tamas'es request isn't going to be picked up: Stray
parentheses and blanks.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |