On Tue, 2019-12-03 at 17:10 +0000, Andrew Cooper wrote:
> Like %cr2 for pagefaults, %dr6 contains ancillary information for
> debug
> exceptions, and needs similar handling.
> 
> For xendevicemodel_inject_event(), no ABI change is needed (although
> an API
> one would be ideal).  Switch from 'cr2' to 'extra' in variable names
> which
> don't constitute an API change, and update the documentation to
> match.
> 
> For the monitor interface, vm_event_debug needs extending with a
> pending_dbg
> field.  Extend hvm_monitor_debug() and for now, always pass in 0 -
> this will
> be fixed eventually, when other hypervisor bugfixes are complete.
> 
> While modifying hvm_monitor_debug(), take the opportunity to correct
> trap type
> and instruction length from unsigned long to unsigned int, as they
> are both
> tiny values.
> 
> Finally, adjust xen-access.c to the new expectations.  Introspection
> tools
> intercepting debug exceptions should mirror the new pending_dbg field
> into
> xendevicemodel_inject_event() for %dr6 to be processed correctly for
> the
> guest.
> 
> Signed-off-by: Andrew Cooper <andrew.coop...@citrix.com>
> ---
> CC: Jan Beulich <jbeul...@suse.com>
> CC: Wei Liu <w...@xen.org>
> CC: Roger Pau Monné <roger....@citrix.com>
> CC: Razvan Cojocaru <rcojoc...@bitdefender.com>
> CC: Tamas K Lengyel <ta...@tklengyel.com>
> CC: Alexandru Isaila <aisa...@bitdefender.com>
> CC: Petre Pircalabu <ppircal...@bitdefender.com>
> CC: Ian Jackson <ian.jack...@citrix.com>
> 
> I'm expecting to commit this alongside "x86/svm: Correct vm_event API
> for
> descriptor accesses" which covers the bump of the VM_EVENT interface
> version.
> ---
>  tools/libs/devicemodel/core.c                   | 4 ++--
>  tools/libs/devicemodel/include/xendevicemodel.h | 4 ++--
>  tools/tests/xen-access/xen-access.c             | 7 ++++---
>  xen/arch/x86/hvm/monitor.c                      | 4 +++-
>  xen/arch/x86/hvm/svm/svm.c                      | 4 ++--
>  xen/arch/x86/hvm/vmx/vmx.c                      | 6 +++---
>  xen/include/asm-x86/hvm/monitor.h               | 3 ++-
>  xen/include/public/hvm/dm_op.h                  | 2 +-
>  xen/include/public/vm_event.h                   | 1 +
>  9 files changed, 20 insertions(+), 15 deletions(-)
Reviewed-by: Petre Pircalabu <ppircal...@bitdefender.com>


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

Reply via email to