All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kip Macy <kip.macy@gmail.com>
To: xen-devel <xen-devel@lists.xensource.com>
Subject: xc_ptrace fix
Date: Thu, 28 Apr 2005 19:08:56 -0700	[thread overview]
Message-ID: <b1fa291705042819082aa11463@mail.gmail.com> (raw)

Make work for paravirtualized guest

# This is a BitKeeper generated diff -Nru style patch.
#
# ChangeSet
#   2005/04/28 15:22:26-07:00 kmacy@curly.lab.netapp.com 
#   Fix xc_ptrace
#   Signed-off-by: Kip Macy <kmacy@fsmware.com>
# 
# BitKeeper/etc/logging_ok
#   2005/04/28 15:22:26-07:00 kmacy@curly.lab.netapp.com +1 -0
#   Logging to logging@openlogging.org accepted
# 
# tools/libxc/xc_ptrace.c
#   2005/04/28 15:22:15-07:00 kmacy@curly.lab.netapp.com +4 -2
#   don't reference page_array in the paravirtualized case
# 
diff -Nru a/tools/libxc/xc_ptrace.c b/tools/libxc/xc_ptrace.c
--- a/tools/libxc/xc_ptrace.c   2005-04-27 19:11:24 -07:00
+++ b/tools/libxc/xc_ptrace.c   2005-04-27 19:11:24 -07:00
@@ -181,7 +181,8 @@
     } 
     if ((pde = cr3_virt[cpu][vtopdi(va)]) == 0) /* logical address */
        goto error_out;
-    pde = page_array[pde >> PAGE_SHIFT] << PAGE_SHIFT;
+    if (ctxt[cpu].flags & VGCF_VMX_GUEST)
+       pde = page_array[pde >> PAGE_SHIFT] << PAGE_SHIFT;
     if (pde != pde_phys[cpu]) 
     {
        pde_phys[cpu] = pde;
@@ -194,7 +195,8 @@
     }
     if ((page = pde_virt[cpu][vtopti(va)]) == 0) /* logical address */
        goto error_out;
-    page = page_array[page >> PAGE_SHIFT] << PAGE_SHIFT;
+    if (ctxt[cpu].flags & VGCF_VMX_GUEST)
+       page = page_array[page >> PAGE_SHIFT] << PAGE_SHIFT;
     if (page != page_phys[cpu] || perm != prev_perm[cpu]) 
     {
        page_phys[cpu] = page;

             reply	other threads:[~2005-04-29  2:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-29  2:08 Kip Macy [this message]
2005-04-30  0:04 ` resend Fwd: xc_ptrace fix Kip Macy
  -- strict thread matches above, loose matches on Subject: below --
2005-04-29  3:30 Leendert van Doorn
2005-04-29  4:24 ` Kip Macy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b1fa291705042819082aa11463@mail.gmail.com \
    --to=kip.macy@gmail.com \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.