xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xenaccess: minor fixes and extra printouts
@ 2016-04-21  0:39 Tamas K Lengyel
  2016-04-21  4:22 ` Razvan Cojocaru
  0 siblings, 1 reply; 4+ messages in thread
From: Tamas K Lengyel @ 2016-04-21  0:39 UTC (permalink / raw)
  To: xen-devel; +Cc: Wei Liu, Tamas K Lengyel, Ian Jackson, Razvan Cojocaru

Without specifying the altp2m flag on the response the view never got switched.
Also, add extra information printouts that can be useful during debugging.

Signed-off-by: Tamas K Lengyel <tamas@tklengyel.com>
---
Cc: Razvan Cojocaru <rcojocaru@bitdefender.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>
---
 tools/tests/xen-access/xen-access.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/tools/tests/xen-access/xen-access.c b/tools/tests/xen-access/xen-access.c
index ef89246..f26e723 100644
--- a/tools/tests/xen-access/xen-access.c
+++ b/tools/tests/xen-access/xen-access.c
@@ -598,7 +598,7 @@ int main(int argc, char *argv[])
                 }
 
                 printf("PAGE ACCESS: %c%c%c for GFN %"PRIx64" (offset %06"
-                       PRIx64") gla %016"PRIx64" (valid: %c; fault in gpt: %c; fault with gla: %c) (vcpu %u, altp2m view %u)\n",
+                       PRIx64") gla %016"PRIx64" (valid: %c; fault in gpt: %c; fault with gla: %c) (vcpu %u [%c], altp2m view %u)\n",
                        (req.u.mem_access.flags & MEM_ACCESS_R) ? 'r' : '-',
                        (req.u.mem_access.flags & MEM_ACCESS_W) ? 'w' : '-',
                        (req.u.mem_access.flags & MEM_ACCESS_X) ? 'x' : '-',
@@ -609,13 +609,14 @@ int main(int argc, char *argv[])
                        (req.u.mem_access.flags & MEM_ACCESS_FAULT_IN_GPT) ? 'y' : 'n',
                        (req.u.mem_access.flags & MEM_ACCESS_FAULT_WITH_GLA) ? 'y': 'n',
                        req.vcpu_id,
+                       (req.flags & VM_EVENT_FLAG_VCPU_PAUSED) ? 'p' : 'r',
                        req.altp2m_idx);
 
                 if ( altp2m && req.flags & VM_EVENT_FLAG_ALTERNATE_P2M)
                 {
                     DPRINTF("\tSwitching back to default view!\n");
 
-                    rsp.flags |= VM_EVENT_FLAG_TOGGLE_SINGLESTEP;
+                    rsp.flags |= (VM_EVENT_FLAG_ALTERNATE_P2M | VM_EVENT_FLAG_TOGGLE_SINGLESTEP);
                     rsp.altp2m_idx = 0;
                 }
                 else if ( default_access != after_first_access )
@@ -652,9 +653,10 @@ int main(int argc, char *argv[])
 
                 break;
             case VM_EVENT_REASON_SINGLESTEP:
-                printf("Singlestep: rip=%016"PRIx64", vcpu %d\n",
+                printf("Singlestep: rip=%016"PRIx64", vcpu %d, altp2m %u\n",
                        req.data.regs.x86.rip,
-                       req.vcpu_id);
+                       req.vcpu_id,
+                       req.altp2m_idx);
 
                 if ( altp2m )
                 {
-- 
2.1.4


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] xenaccess: minor fixes and extra printouts
  2016-04-21  0:39 [PATCH] xenaccess: minor fixes and extra printouts Tamas K Lengyel
@ 2016-04-21  4:22 ` Razvan Cojocaru
  2016-04-21 13:55   ` Wei Liu
  0 siblings, 1 reply; 4+ messages in thread
From: Razvan Cojocaru @ 2016-04-21  4:22 UTC (permalink / raw)
  To: Tamas K Lengyel, xen-devel; +Cc: Wei Liu, Ian Jackson

On 04/21/16 03:39, Tamas K Lengyel wrote:
> Without specifying the altp2m flag on the response the view never got switched.
> Also, add extra information printouts that can be useful during debugging.
> 
> Signed-off-by: Tamas K Lengyel <tamas@tklengyel.com>
> ---
> Cc: Razvan Cojocaru <rcojocaru@bitdefender.com>
> Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> Cc: Wei Liu <wei.liu2@citrix.com>
> ---
>  tools/tests/xen-access/xen-access.c | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)

Acked-by: Razvan Cojocaru <rcojocaru@bitdefender.com>


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] xenaccess: minor fixes and extra printouts
  2016-04-21  4:22 ` Razvan Cojocaru
@ 2016-04-21 13:55   ` Wei Liu
  2016-04-22 16:49     ` Ian Jackson
  0 siblings, 1 reply; 4+ messages in thread
From: Wei Liu @ 2016-04-21 13:55 UTC (permalink / raw)
  To: Razvan Cojocaru; +Cc: xen-devel, Tamas K Lengyel, Ian Jackson, Wei Liu

On Thu, Apr 21, 2016 at 07:22:25AM +0300, Razvan Cojocaru wrote:
> On 04/21/16 03:39, Tamas K Lengyel wrote:
> > Without specifying the altp2m flag on the response the view never got switched.
> > Also, add extra information printouts that can be useful during debugging.
> > 
> > Signed-off-by: Tamas K Lengyel <tamas@tklengyel.com>
> > ---
> > Cc: Razvan Cojocaru <rcojocaru@bitdefender.com>
> > Cc: Ian Jackson <ian.jackson@eu.citrix.com>
> > Cc: Wei Liu <wei.liu2@citrix.com>
> > ---
> >  tools/tests/xen-access/xen-access.c | 10 ++++++----
> >  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> Acked-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
> 

Release-acked-by: Wei Liu <wei.liu2@citrix.com>

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] xenaccess: minor fixes and extra printouts
  2016-04-21 13:55   ` Wei Liu
@ 2016-04-22 16:49     ` Ian Jackson
  0 siblings, 0 replies; 4+ messages in thread
From: Ian Jackson @ 2016-04-22 16:49 UTC (permalink / raw)
  To: Wei Liu; +Cc: xen-devel, Tamas K Lengyel, Razvan Cojocaru

Wei Liu writes ("Re: [PATCH] xenaccess: minor fixes and extra printouts"):
> On Thu, Apr 21, 2016 at 07:22:25AM +0300, Razvan Cojocaru wrote:
> > Acked-by: Razvan Cojocaru <rcojocaru@bitdefender.com>
> > 
> 
> Release-acked-by: Wei Liu <wei.liu2@citrix.com>

Queued for commit, thanks.

Ian.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-04-22 16:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-21  0:39 [PATCH] xenaccess: minor fixes and extra printouts Tamas K Lengyel
2016-04-21  4:22 ` Razvan Cojocaru
2016-04-21 13:55   ` Wei Liu
2016-04-22 16:49     ` Ian Jackson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).