From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: xen panics when setting int3 traps Date: Fri, 18 Dec 2015 15:31:18 +0000 Message-ID: <567426C6.6030203@citrix.com> References: <20151211021701.GA10010@char.us.oracle.com> <20151211102037.GA22994@deinos.phlegethon.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1019281814781399212==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: quizyjones , Tim Deegan Cc: George Dunlap , Kevin Tian , Jun Nakajima , xen-devel List-Id: xen-devel@lists.xenproject.org --===============1019281814781399212== Content-Type: multipart/alternative; boundary="------------010507040903020808040903" --------------010507040903020808040903 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit On 17/12/15 01:35, quizyjones wrote: > Sorry for the late reply, there is something wrong in network which > makes the email not delivered successfully. > The inject method is by using xc_map_foreign_range to map the address > of the nested xen and memcpy the trap to the specific location. If > there is a problem, it should be the xc_map_foreign_range function, > can it map L1 xen's memory to dom0 of L0 xen? It might mapping the > memory of nested dom0 instead of the nested xen, as the error says > that the max physical address is 0xff000000 when I tried to operate on > memory space of xen > using > xc_map_foreign_range. You cannot simply put breakpoints in the domain, as they will be handled by the domain itself. As you observe, Xen gets rightfully unhappy when it finds breapoints in its own virtual range. You need to follow the same actions as `gdbsx` (as an example) which registers itself as a debugger of the domain, and hooks breakpoints, rather than letting the guest deal with them in an unexpected manor. ~Andrew --------------010507040903020808040903 Content-Type: text/html; charset="UTF-8" Content-Length: 2085 Content-Transfer-Encoding: quoted-printable
On 17/12/15 01:35, quizyjones wrote:
Sorry for the late reply, there is something wrong in network which makes the email not delivered successfully.
The inject method is by using xc_map_foreign_range to map the address of the nested xen and memcpy the trap to the specific location. If there is a problem, it should be the xc_map_foreign_range function, can it map L1 xen's memory to dom0 of L0 xen=3F It might =C2=A0mapping the memory of nested dom0 instead of the nested xen, as the error says that the max physical address is 0xff000000 when I tried to operate on memory space of xen=C2=A0using xc_map_foreign_range.

You cannot simply put breakpoints in the domain, as they will be handled by the domain itself.=C2=A0 As you observe, Xen gets rightfully unhappy when it finds breapoints in its own virtual range.

You need to follow the same actions as `gdbsx` (as an example) which registers itself as a debugger of the domain, and hooks breakpoints, rather than letting the guest deal with them in an unexpected manor.

~Andrew
--------------010507040903020808040903-- --===============1019281814781399212== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============1019281814781399212==--