From mboxrd@z Thu Jan 1 00:00:00 1970 From: Juergen Gross Subject: Debug-Registers in HVM domain destroyed Date: Fri, 14 Feb 2014 10:33:33 +0100 Message-ID: <52FDE2ED.4030008@ts.fujitsu.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WEF9M-0006RD-5c for xen-devel@lists.xenproject.org; Fri, 14 Feb 2014 09:33:36 +0000 List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: xen-devel List-Id: xen-devel@lists.xenproject.org Hi, we've found a problem with debug registers in HVM domains with Xen (we are running 4.2, but the code in the hypervisor seems to be unchanged in unstable) on INTEL processors: Debug registers are restored on vcpu switch only if db7 has any debug events activated. This leads to problems in the following cases: - db0-3 are changed by the guest before events are set "active" in db7. In case of a vcpu switch between setting db0-3 and db7, db0-3 are lost. BTW: setting db7 before db0-3 is no option, as this could trigger debug interrupts due to stale db0-3 contents. - single stepping is used and vcpu switch occurs between the single step trap and reading of db6 in the guest. db6 contents (single step indicator) are lost in this case. Any thoughts? Juergen -- Juergen Gross Principal Developer Operating Systems PBG PDG ES&S SWE OS6 Telephone: +49 (0) 89 62060 2932 Fujitsu e-mail: juergen.gross@ts.fujitsu.com Mies-van-der-Rohe-Str. 8 Internet: ts.fujitsu.com D-80807 Muenchen Company details: ts.fujitsu.com/imprint.html