WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Trap flags, debug and emulation - xen 4.1.1

To: Tim Deegan <tim@xxxxxxx>
Subject: Re: [Xen-devel] Trap flags, debug and emulation - xen 4.1.1
From: Balbir Singh <bsingharora@xxxxxxxxx>
Date: Tue, 11 Oct 2011 22:22:14 +0530
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 11 Oct 2011 09:53:12 -0700
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=a3+8I6pPozrRGAy+RzqGrC8arvx2MPGj2m9K50M2H54=; b=NL9F37Qzkh7t/G3Y1nO1b0vGwYNKYgjpQBIKKeGTRM8WXhUVZZCtnKnCtm+nGiEQcn SAjmuEdG3vpfNS5GLXdkHCH6x8/8i6ptLbb5xnuM+j4PMb8HnMeJLFCIjE+W8jCfjZmp 1cSJFnAooWnxiSvoVTzIagD4fg9YUOPKoO9B8=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20111011082618.GC88076@xxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <CAKTCnzkyYASOH_gaf+4pQoGqM4q=1r=mfLHcoP-5oy59yyHbXw@xxxxxxxxxxxxxx> <20111011082618.GC88076@xxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Tue, Oct 11, 2011 at 1:56 PM, Tim Deegan <tim@xxxxxxx> wrote:
> Hi,
>
> At 08:39 +0530 on 11 Oct (1318322368), Balbir Singh wrote:
>>  I am doing something very similar. I do get the fault and I can set
>>  the trap, but I don't see any form of single stepping take place as I
>>  do not get the TRAP_debug exception back. My exception_bitmap has
>>  TRAP_no_device, TRAP_page_fault, TRAP_debug and TRAP_int3 set.
>>
>>  I've tried debugging the issue with xentrace and printks, but sadly I
>>  could not track down the issue. The CPU does have
>>  cpu_has_monitor_trap_flag set to true.
>>
>>  Could anyone give me clues on how to track down why I did not get a
>>  TRAP_debug exception via a VMEXIT?
>
> It sounds like you're doing the right thing - just a question of looking
> for the bug. :)  I would try checking for the TF flag as close as
> possible to the vmenter (maybe even in the assembly - you could call out
> to a special C function if it's set), and for the debug vmexit right at the
> top of the vmexit handler to make sure that some other clever debugging
> code isn't consuming it.   Probably also worth double-chjecking that
> nothing else ois overwriting the exception bitmap before the vmenter.
>

Hi, Tim,

Thanks, I am taking the debugging to entry.S, I can see the flags
(UREGS_eflags) have the bit set on VMENTRY, but mostly disabled on
VMEXIT. I wonder if the guest operating system is playing with the
bit, I doubt it though. I'll continue debugging

Balbir Singh

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

<Prev in Thread] Current Thread [Next in Thread>