* Lguest
@ 2007-06-28 17:03 Matias Zabaljauregui
2007-06-29 12:11 ` Lguest Rusty Russell
0 siblings, 1 reply; 2+ messages in thread
From: Matias Zabaljauregui @ 2007-06-28 17:03 UTC (permalink / raw)
To: virtualization
[-- Attachment #1.1: Type: text/plain, Size: 518 bytes --]
Hello Rusty,
I'have just started to read the code (and I'm not an expert kernel
programmer), but is this condition ok ?
(function setup_pagetables(), on file Documentation/lguest.c )
/* Ideally we map all physical memory starting at page_offset.
* However, if page_offset is 0xC0000000 we can only map 1G of physical
* (0xC0000000 + 1G overflows). */
if (mem > -page_offset)
mapped_pages = mem/getpagesize();
else
mapped_pages = -page_offset/getpagesize();
Cheers
Matias
[-- Attachment #1.2: Type: text/html, Size: 741 bytes --]
[-- Attachment #2: Type: text/plain, Size: 184 bytes --]
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/virtualization
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: Lguest
2007-06-28 17:03 Lguest Matias Zabaljauregui
@ 2007-06-29 12:11 ` Rusty Russell
0 siblings, 0 replies; 2+ messages in thread
From: Rusty Russell @ 2007-06-29 12:11 UTC (permalink / raw)
To: Matias Zabaljauregui; +Cc: virtualization
On Thu, 2007-06-28 at 19:03 +0200, Matias Zabaljauregui wrote:
> Hello Rusty,
>
> I'have just started to read the code (and I'm not an expert kernel
> programmer), but is this condition ok ?
>
>
> (function setup_pagetables(), on file Documentation/lguest.c )
>
> /* Ideally we map all physical memory starting at page_offset.
> * However, if page_offset is 0xC0000000 we can only map 1G of
> physical
> * (0xC0000000 + 1G overflows). */
>
> if (mem > -page_offset)
> mapped_pages = mem/getpagesize();
> else
> mapped_pages = -page_offset/getpagesize();
Hi Matias,
I think so: these are unsigned values, so "-page_offset" is the address
space available for kernel memory (usually 1G). It's a little
strange-looking, I admit.
Hope that helps,
Rusty.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-06-29 12:11 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-06-28 17:03 Lguest Matias Zabaljauregui
2007-06-29 12:11 ` Lguest Rusty Russell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox