[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH] x86/debug: Plumb pending_dbg through the monitor and devicemodel interfaces


  • To: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>, Xen-devel <xen-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Petre Ovidiu PIRCALABU <ppircalabu@xxxxxxxxxxxxxxx>
  • Date: Wed, 4 Dec 2019 16:42:00 +0000
  • Accept-language: ro-RO, en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=bitdefender.com; dmarc=pass action=none header.from=bitdefender.com; dkim=pass header.d=bitdefender.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=MvJ5PeUEmt24G9bqHyMjo7Rdoi8FueaowThM208g6QI=; b=NhXCTZAyxam9ZqemVPu2Gb/DZqt/a25TeTcTMq+id2asns5c7EmEWwu/loLO1Bn3f7SB+Z3oSEVJVL7fYvv5dPs+GWMrVv0lBo844P9VJG9A0pB6cnV5wlATBzGEv4H+ZD3nXXFQ8any2aCLfoGeQIk68JO8C5PUK4hBHF2Svr3QTaQoQmj2YS8kMAWkdPnGwG38EMmuSEraayw2SMzPLt2PLzv7LKSClZuabh7EobjOi86fcX1NKnXHaYmbc/b9hG1TGpmcAsHUB8xh7JwLiNxT+pmb9o3iWnDfZWPtVR3a0g0km+KpcTCFyWaTtT5wNt9ncsDLfcx4fHjqqu4Iig==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=KFa0N6KcFs9qrNVB6KBgwpA3YakmAvAm6C0vCkSQmGHpgiAnH2DWV8+mvPBOKeKRZ9Qtab1zC1OCivAM4ZBfOYkOlqQLQ7OYYdLTQmZgtBMJmMOao/6WBLAVvR53oOTqPyLh1Gfx3tWsYo5xiCsCdq3ovjuCdTINyo786J+71ARXHgB6MiBUTAd9aRL+c9Tj4CkfUGfZ/pug8VB7i12/50nUfeCksJ6ghT/m29TY/gUDX8jkNaVfe/2LQBs4hNrLF3f/2uaoMkPlwSoX24YL0zWdTeSRswIWovKcLU4/hdjSFoVKX49XEuykz6s1KzcF6SLwxdpgSPQ0W72tXbDlzw==
  • Authentication-results: spf=none (sender IP is ) smtp.mailfrom=ppircalabu@xxxxxxxxxxxxxxx;
  • Cc: Tamas K Lengyel <tamas@xxxxxxxxxxxxx>, Wei Liu <wl@xxxxxxx>, Razvan COJOCARU <rcojocaru@xxxxxxxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxx>, Alexandru Stefan ISAILA <aisaila@xxxxxxxxxxxxxxx>, Ian Jackson <Ian.Jackson@xxxxxxxxxx>, Roger Pau Monné <roger.pau@xxxxxxxxxx>
  • Delivery-date: Wed, 04 Dec 2019 16:42:05 +0000
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
  • Thread-index: AQHVqfyqJfL5ZJWFbkCmEracwCthr6eqL4WA
  • Thread-topic: [PATCH] x86/debug: Plumb pending_dbg through the monitor and devicemodel interfaces

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.cooper3@xxxxxxxxxx>
> ---
> CC: Jan Beulich <JBeulich@xxxxxxxx>
> CC: Wei Liu <wl@xxxxxxx>
> CC: Roger Pau Monné <roger.pau@xxxxxxxxxx>
> CC: Razvan Cojocaru <rcojocaru@xxxxxxxxxxxxxxx>
> CC: Tamas K Lengyel <tamas@xxxxxxxxxxxxx>
> CC: Alexandru Isaila <aisaila@xxxxxxxxxxxxxxx>
> CC: Petre Pircalabu <ppircalabu@xxxxxxxxxxxxxxx>
> CC: Ian Jackson <Ian.Jackson@xxxxxxxxxx>
> 
> 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 <ppircalabu@xxxxxxxxxxxxxxx>


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

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.