From: Glauber de Oliveira Costa <gcosta@redhat.com>
To: lguest@ozlabs.org
Cc: glommer@gmail.com, linux-kernel@vger.kernel.org,
virtualization@lists.linux-foundation.org, rusty@rustcorp.com.au,
rostedt@goodmis.org
Subject: [PATCH 0/7] More lguest massage.
Date: Thu, 17 Jan 2008 22:35:48 -0200 [thread overview]
Message-ID: <12006165743557-git-send-email-gcosta@redhat.com> (raw)
In-Reply-To: <12006165701019-git-send-email-gcosta@redhat.com>
gpte_addr()does not depend on any guest information. So we wipe out
thelg parameter from it completely.
Signed-off-by:Glauber de Oliveira Costa <gcosta@redhat.com>
---
drivers/lguest/page_tables.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff--git a/drivers/lguest/page_tables.c b/drivers/lguest/page_tables.c
indexc4b8eaf..c9acafc 100644
---a/drivers/lguest/page_tables.c
+++b/drivers/lguest/page_tables.c
@@-100,8 +100,7 @@ static unsigned long gpgd_addr(struct lg_cpu *cpu, unsigned long vaddr)
return cpu->lg->pgdirs[cpu->cpu_pgd].gpgdir + index * sizeof(pgd_t);
}
-staticunsigned long gpte_addr(struct lguest *lg,
- pgd_t gpgd, unsigned long vaddr)
+staticunsigned long gpte_addr(pgd_t gpgd, unsigned long vaddr)
{
unsigned long gpage = pgd_pfn(gpgd) << PAGE_SHIFT;
BUG_ON(!(pgd_flags(gpgd) & _PAGE_PRESENT));
@@-235,7 +234,7 @@ int demand_page(struct lg_cpu *cpu, unsigned long vaddr, int errcode)
/* OK, now we look at the lower level in the Guest page table: keep its
* address, because we might update it later. */
- gpte_ptr= gpte_addr(lg, gpgd, vaddr);
+ gpte_ptr= gpte_addr(gpgd, vaddr);
gpte = lgread(lg, gpte_ptr, pte_t);
/* If this page isn't in the Guest page tables, we can't page it in. */
@@-378,7 +377,7 @@ unsigned long guest_pa(struct lg_cpu *cpu, unsigned long vaddr)
if (!(pgd_flags(gpgd) & _PAGE_PRESENT))
kill_guest(cpu->lg, "Bad address %#lx", vaddr);
- gpte= lgread(cpu->lg, gpte_addr(cpu->lg, gpgd, vaddr), pte_t);
+ gpte= lgread(cpu->lg, gpte_addr(gpgd, vaddr), pte_t);
if (!(pte_flags(gpte) & _PAGE_PRESENT))
kill_guest(cpu->lg, "Bad address %#lx", vaddr);
--
1.5.0.6
next prev parent reply other threads:[~2008-01-18 0:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-18 0:35 Glauber de Oliveira Costa
2008-01-18 0:35 ` Glauber de Oliveira Costa
2008-01-18 0:35 ` Glauber de Oliveira Costa
2008-01-18 0:35 ` Glauber de Oliveira Costa
2008-01-18 0:35 ` Glauber de Oliveira Costa
2008-01-18 0:35 ` Glauber de Oliveira Costa [this message]
2008-01-18 0:35 ` Glauber de Oliveira Costa
2008-01-18 0:35 ` Glauber de Oliveira Costa
2008-01-18 1:02 ` Glauber de Oliveira Costa
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=12006165743557-git-send-email-gcosta@redhat.com \
--to=gcosta@redhat.com \
--cc=glommer@gmail.com \
--cc=lguest@ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
--cc=rusty@rustcorp.com.au \
--cc=virtualization@lists.linux-foundation.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®