search for: page_offset

Displaying 20 results from an estimated 292 matches for "page_offset".

2007 Apr 18
1
[PATCH 0/2] Use a single loader for i386 and x86_64
...; + +typedef uint64_t u64; typedef uint32_t u32; typedef uint16_t u16; typedef uint8_t u8; -#include "../../../include/asm/lguest_user.h" +#include "../../include/asm/lguest_user.h" +#include <lguest_defs.h> + +unsigned long (*finish)(unsigned long mem, unsigned long *page_offset, + const char *initrd, unsigned long *ird_size); + +typedef unsigned long (*load_function)(int, void *, unsigned long, + unsigned long *, const char *, unsigned long *, + unsigned long *); + #define PAGE_PRESENT 0x7 /* Present, RW, Execute */ #define NET_PEERNUM 1 @@ -63,8 +74,...
2007 Apr 18
1
[PATCH 0/2] Use a single loader for i386 and x86_64
...; + +typedef uint64_t u64; typedef uint32_t u32; typedef uint16_t u16; typedef uint8_t u8; -#include "../../../include/asm/lguest_user.h" +#include "../../include/asm/lguest_user.h" +#include <lguest_defs.h> + +unsigned long (*finish)(unsigned long mem, unsigned long *page_offset, + const char *initrd, unsigned long *ird_size); + +typedef unsigned long (*load_function)(int, void *, unsigned long, + unsigned long *, const char *, unsigned long *, + unsigned long *); + #define PAGE_PRESENT 0x7 /* Present, RW, Execute */ #define NET_PEERNUM 1 @@ -63,8 +74,...
2007 Jun 28
1
Lguest
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 =3D mem/getpagesize(); else mapped_pages =3D -page_offset/getpagesize(); Cheers Matias -------------- next part --...
2007 Jun 28
1
Lguest
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 =3D mem/getpagesize(); else mapped_pages =3D -page_offset/getpagesize(); Cheers Matias -------------- next part --...
2007 May 06
1
[PATCH 1/3] lguest: 2.6.21-mm1 update: lguest-remove-unnecessary-gdt-load.patch
Andrew did a great job of merging in the PDA->percpu changes and lguest code for 2.6.21-mm1, but the load_gdt is now unnecessary. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> --- drivers/lguest/lguest.c | 4 ---- 1 file changed, 4 deletions(-) =================================================================== --- a/drivers/lguest/lguest.c +++ b/drivers/lguest/lguest.c @@
2007 May 06
1
[PATCH 1/3] lguest: 2.6.21-mm1 update: lguest-remove-unnecessary-gdt-load.patch
Andrew did a great job of merging in the PDA->percpu changes and lguest code for 2.6.21-mm1, but the load_gdt is now unnecessary. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> --- drivers/lguest/lguest.c | 4 ---- 1 file changed, 4 deletions(-) =================================================================== --- a/drivers/lguest/lguest.c +++ b/drivers/lguest/lguest.c @@
2009 Sep 21
0
[PATCH 3/5] lguest: use PGDIR_SHIFT for PAE code to allow different PAGE_OFFSET
We still assume the Guest and Host have the same PAGE_OFFSET settings, but now we don't assume 0xC0000000. Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> Cc: Matias Zabaljauregui <zabaljauregui at gmail.com> --- drivers/lguest/page_tables.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/lguest/...
2009 Sep 24
0
[Lguest] [PATCH 3/5] lguest: use PGDIR_SHIFT for PAE code to allow different PAGE_OFFSET
On Mon, Sep 21, 2009 at 04:52:21PM +0930, Rusty Russell wrote: > > We still assume the Guest and Host have the same PAGE_OFFSET settings, > but now we don't assume 0xC0000000. > > Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> > Cc: Matias Zabaljauregui <zabaljauregui at gmail.com> > --- > drivers/lguest/page_tables.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletio...
2009 Sep 21
0
[PATCH 3/5] lguest: use PGDIR_SHIFT for PAE code to allow different PAGE_OFFSET
We still assume the Guest and Host have the same PAGE_OFFSET settings, but now we don't assume 0xC0000000. Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> Cc: Matias Zabaljauregui <zabaljauregui at gmail.com> --- drivers/lguest/page_tables.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/lguest/...
2009 Sep 24
0
[Lguest] [PATCH 3/5] lguest: use PGDIR_SHIFT for PAE code to allow different PAGE_OFFSET
On Mon, Sep 21, 2009 at 04:52:21PM +0930, Rusty Russell wrote: > > We still assume the Guest and Host have the same PAGE_OFFSET settings, > but now we don't assume 0xC0000000. > > Signed-off-by: Rusty Russell <rusty at rustcorp.com.au> > Cc: Matias Zabaljauregui <zabaljauregui at gmail.com> > --- > drivers/lguest/page_tables.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletio...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 07/13] lguest64 loader
...work-pv/Documentation/lguest/i386/Makefile =================================================================== --- /dev/null +++ work-pv/Documentation/lguest/i386/Makefile @@ -0,0 +1,21 @@ +# This creates the demonstration utility "lguest" which runs a Linux guest. + +# We rely on CONFIG_PAGE_OFFSET to know where to put lguest binary. +# Some shells (dash - ubunu) can't handle numbers that big so we cheat. +include ../../../.config +LGUEST_GUEST_TOP := ($(CONFIG_PAGE_OFFSET) - 0x08000000) + +CFLAGS:=-Wall -Wmissing-declarations -Wmissing-prototypes -O3 \ + -static -DLGUEST_GUEST_TOP="...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 07/13] lguest64 loader
...work-pv/Documentation/lguest/i386/Makefile =================================================================== --- /dev/null +++ work-pv/Documentation/lguest/i386/Makefile @@ -0,0 +1,21 @@ +# This creates the demonstration utility "lguest" which runs a Linux guest. + +# We rely on CONFIG_PAGE_OFFSET to know where to put lguest binary. +# Some shells (dash - ubunu) can't handle numbers that big so we cheat. +include ../../../.config +LGUEST_GUEST_TOP := ($(CONFIG_PAGE_OFFSET) - 0x08000000) + +CFLAGS:=-Wall -Wmissing-declarations -Wmissing-prototypes -O3 \ + -static -DLGUEST_GUEST_TOP="...
2007 May 09
0
[patch 9/9] lguest: the documentation, example launcher
...monstration utility "lguest" which runs a Linux guest. + +# For those people that have a separate object dir, look there for .config +KBUILD_OUTPUT := ../.. +ifdef O + ifeq ("$(origin O)", "command line") + KBUILD_OUTPUT := $(O) + endif +endif +# We rely on CONFIG_PAGE_OFFSET to know where to put lguest binary. +include $(KBUILD_OUTPUT)/.config +LGUEST_GUEST_TOP := ($(CONFIG_PAGE_OFFSET) - 0x08000000) + +CFLAGS:=-Wall -Wmissing-declarations -Wmissing-prototypes -O3 \ + -static -DLGUEST_GUEST_TOP="$(LGUEST_GUEST_TOP)" -Wl,-T,lguest.lds +LDLIBS:=-lz + +all: lgue...
2007 May 09
0
[patch 9/9] lguest: the documentation, example launcher
...monstration utility "lguest" which runs a Linux guest. + +# For those people that have a separate object dir, look there for .config +KBUILD_OUTPUT := ../.. +ifdef O + ifeq ("$(origin O)", "command line") + KBUILD_OUTPUT := $(O) + endif +endif +# We rely on CONFIG_PAGE_OFFSET to know where to put lguest binary. +include $(KBUILD_OUTPUT)/.config +LGUEST_GUEST_TOP := ($(CONFIG_PAGE_OFFSET) - 0x08000000) + +CFLAGS:=-Wall -Wmissing-declarations -Wmissing-prototypes -O3 \ + -static -DLGUEST_GUEST_TOP="$(LGUEST_GUEST_TOP)" -Wl,-T,lguest.lds +LDLIBS:=-lz + +all: lgue...
2017 Feb 15
2
Re: [PATCH v2 1/2] lib: change how hbin sections are read.
...as well. That's why I put "hbin" offset validation > check couple of lines below to make sure that the "hbin" we found by > searching is a proper one. The offset check I'm referring to is: > > /* get "stated" hbin offset from header */ > size_t page_offset = le32to(page->offset_first) + 0x1000; > > /* if that does not match our current file offset, > then exit with error */ > if (page_offset != off) { > SET_ERRNO... > } Still, what kind of corruption would move a genuine hbin to a non-page-sized offset in the file? It se...
2007 Jul 20
2
[PATCH] Remove -static from Documentation/lguest/Makefile
...iff -r d9973bf15010 Documentation/lguest/Makefile --- a/Documentation/lguest/Makefile Fri Jul 20 21:40:49 2007 +1000 +++ b/Documentation/lguest/Makefile Fri Jul 20 21:41:44 2007 +1000 @@ -11,8 +11,7 @@ include $(KBUILD_OUTPUT)/.config include $(KBUILD_OUTPUT)/.config LGUEST_GUEST_TOP := ($(CONFIG_PAGE_OFFSET) - 0x08000000) -CFLAGS:=-Wall -Wmissing-declarations -Wmissing-prototypes -O3 \ - -static -DLGUEST_GUEST_TOP="$(LGUEST_GUEST_TOP)" -Wl,-T,lguest.lds +CFLAGS:=-Wall -Wmissing-declarations -Wmissing-prototypes -O3 -Wl,-T,lguest.lds LDLIBS:=-lz all: lguest.lds lguest diff -r d9973bf150...
2007 Jul 20
2
[PATCH] Remove -static from Documentation/lguest/Makefile
...iff -r d9973bf15010 Documentation/lguest/Makefile --- a/Documentation/lguest/Makefile Fri Jul 20 21:40:49 2007 +1000 +++ b/Documentation/lguest/Makefile Fri Jul 20 21:41:44 2007 +1000 @@ -11,8 +11,7 @@ include $(KBUILD_OUTPUT)/.config include $(KBUILD_OUTPUT)/.config LGUEST_GUEST_TOP := ($(CONFIG_PAGE_OFFSET) - 0x08000000) -CFLAGS:=-Wall -Wmissing-declarations -Wmissing-prototypes -O3 \ - -static -DLGUEST_GUEST_TOP="$(LGUEST_GUEST_TOP)" -Wl,-T,lguest.lds +CFLAGS:=-Wall -Wmissing-declarations -Wmissing-prototypes -O3 -Wl,-T,lguest.lds LDLIBS:=-lz all: lguest.lds lguest diff -r d9973bf150...
2005 Jun 13
2
[PATCH] fix x86_64 initrd support
...if (LOADER_TYPE && INITRD_START) { - if (INITRD_START + INITRD_SIZE <= (end_pfn << PAGE_SHIFT)) { - /* reserve_bootmem_generic(INITRD_START, INITRD_SIZE); */ - initrd_start = INITRD_START + PAGE_OFFSET; - initrd_end = initrd_start+INITRD_SIZE; - initrd_below_start_ok = 1; - } - else { - printk(KERN_ERR "initrd extends beyond end of memory " -...
2013 Aug 23
0
[PATCH 2/2] VMCI: Add support for virtual IOMMU
...il: - qp_free_queue(queue, i * PAGE_SIZE); - return NULL; + return queue; } /* @@ -334,13 +349,18 @@ static int __qp_memcpy_to_queue(struct vmci_queue *queue, size_t bytes_copied = 0; while (bytes_copied < size) { - u64 page_index = (queue_offset + bytes_copied) / PAGE_SIZE; - size_t page_offset = + const u64 page_index = + (queue_offset + bytes_copied) / PAGE_SIZE; + const size_t page_offset = (queue_offset + bytes_copied) & (PAGE_SIZE - 1); void *va; size_t to_copy; - va = kmap(kernel_if->page[page_index]); + if (kernel_if->host) + va = kmap(kernel_if-&gt...
2017 Feb 15
2
Re: [PATCH v2 1/2] lib: change how hbin sections are read.
...> > > check couple of lines below to make sure that the "hbin" we found > > > by > > > searching is a proper one. The offset check I'm referring to is: > > > > > > /* get "stated" hbin offset from header */ > > > size_t page_offset = le32to(page->offset_first) + 0x1000; > > > > > > /* if that does not match our current file offset, > > >    then exit with error */ > > > if (page_offset != off) {  > > >   SET_ERRNO... > > > } > > > > Still, what kind of cor...