search for: _page_nx

Displaying 20 results from an estimated 31 matches for "_page_nx".

2008 May 23
0
[PATCH] x86/paravirt: add pte_flags to just get pte flags
...pte) { - return pte_val(pte) & _PAGE_PSE; + return pte_flags(pte) & _PAGE_PSE; } static inline int pte_global(pte_t pte) { - return pte_val(pte) & _PAGE_GLOBAL; + return pte_flags(pte) & _PAGE_GLOBAL; } static inline int pte_exec(pte_t pte) { - return !(pte_val(pte) & _PAGE_NX); + return !(pte_flags(pte) & _PAGE_NX); } static inline int pte_special(pte_t pte) @@ -304,7 +304,7 @@ return __pgprot(preservebits | addbits); } -#define pte_pgprot(x) __pgprot(pte_val(x) & ~PTE_MASK) +#define pte_pgprot(x) __pgprot(pte_flags(x) & ~PTE_MASK) #define canon_...
2008 May 23
0
[PATCH] x86/paravirt: add pte_flags to just get pte flags
...pte) { - return pte_val(pte) & _PAGE_PSE; + return pte_flags(pte) & _PAGE_PSE; } static inline int pte_global(pte_t pte) { - return pte_val(pte) & _PAGE_GLOBAL; + return pte_flags(pte) & _PAGE_GLOBAL; } static inline int pte_exec(pte_t pte) { - return !(pte_val(pte) & _PAGE_NX); + return !(pte_flags(pte) & _PAGE_NX); } static inline int pte_special(pte_t pte) @@ -304,7 +304,7 @@ return __pgprot(preservebits | addbits); } -#define pte_pgprot(x) __pgprot(pte_val(x) & ~PTE_MASK) +#define pte_pgprot(x) __pgprot(pte_flags(x) & ~PTE_MASK) #define canon_...
2011 Feb 11
1
[PATCH 1/3]: Staging: hv: Use native page allocation/free functions
...* Allocate the hypercall page memory * virtaddr = osd_page_alloc(1); */ - virtaddr = osd_virtual_alloc_exec(PAGE_SIZE); +#ifdef __x86_64__ + virtaddr = __vmalloc(PAGE_SIZE, GFP_KERNEL, PAGE_KERNEL_EXEC); +#else + virtaddr = __vmalloc(PAGE_SIZE, GFP_KERNEL, + __pgprot(__PAGE_KERNEL & (~_PAGE_NX))); +#endif if (!virtaddr) { DPRINT_ERR(VMBUS, @@ -462,10 +467,10 @@ void hv_synic_init(void *irqarg) Cleanup: if (hv_context.synic_event_page[cpu]) - osd_page_free(hv_context.synic_event_page[cpu], 1); + free_page((unsigned long)hv_context.synic_event_page[cpu]); if (hv_context.s...
2011 Feb 11
1
[PATCH 1/3]: Staging: hv: Use native page allocation/free functions
...* Allocate the hypercall page memory * virtaddr = osd_page_alloc(1); */ - virtaddr = osd_virtual_alloc_exec(PAGE_SIZE); +#ifdef __x86_64__ + virtaddr = __vmalloc(PAGE_SIZE, GFP_KERNEL, PAGE_KERNEL_EXEC); +#else + virtaddr = __vmalloc(PAGE_SIZE, GFP_KERNEL, + __pgprot(__PAGE_KERNEL & (~_PAGE_NX))); +#endif if (!virtaddr) { DPRINT_ERR(VMBUS, @@ -462,10 +467,10 @@ void hv_synic_init(void *irqarg) Cleanup: if (hv_context.synic_event_page[cpu]) - osd_page_free(hv_context.synic_event_page[cpu], 1); + free_page((unsigned long)hv_context.synic_event_page[cpu]); if (hv_context.s...
2011 Feb 11
1
[PATCH]: Staging: hv: Cleanup vmalloc calls
...g/hv/hv.c @@ -230,12 +230,7 @@ int hv_init(void) * Allocate the hypercall page memory * virtaddr = osd_page_alloc(1); */ -#ifdef __x86_64__ virtaddr = __vmalloc(PAGE_SIZE, GFP_KERNEL, PAGE_KERNEL_EXEC); -#else - virtaddr = __vmalloc(PAGE_SIZE, GFP_KERNEL, - __pgprot(__PAGE_KERNEL & (~_PAGE_NX))); -#endif if (!virtaddr) { DPRINT_ERR(VMBUS, -- 1.5.5.6
2011 Feb 11
1
[PATCH]: Staging: hv: Cleanup vmalloc calls
...g/hv/hv.c @@ -230,12 +230,7 @@ int hv_init(void) * Allocate the hypercall page memory * virtaddr = osd_page_alloc(1); */ -#ifdef __x86_64__ virtaddr = __vmalloc(PAGE_SIZE, GFP_KERNEL, PAGE_KERNEL_EXEC); -#else - virtaddr = __vmalloc(PAGE_SIZE, GFP_KERNEL, - __pgprot(__PAGE_KERNEL & (~_PAGE_NX))); -#endif if (!virtaddr) { DPRINT_ERR(VMBUS, -- 1.5.5.6
2020 Apr 28
0
[PATCH v3 75/75] x86/efi: Add GHCB mappings when SEV-ES is active
.../sev-es.c @@ -422,6 +422,31 @@ int sev_es_setup_ap_jump_table(struct real_mode_header *rmh) return 0; } +int __init sev_es_efi_map_ghcbs(pgd_t *pgd) +{ + struct sev_es_runtime_data *data; + unsigned long address, pflags; + int cpu; + u64 pfn; + + if (!sev_es_active()) + return 0; + + pflags = _PAGE_NX | _PAGE_RW; + + for_each_possible_cpu(cpu) { + data = per_cpu(runtime_data, cpu); + + address = __pa(&data->ghcb_page); + pfn = address >> PAGE_SHIFT; + + if (kernel_map_pages_in_pgd(pgd, pfn, address, 1, pflags)) + return 1; + } + + return 0; +} + static enum es_result vc_handl...
2020 Sep 07
0
[PATCH v7 71/72] x86/efi: Add GHCB mappings when SEV-ES is active
...r. So make sure the per-cpu + * runtime GHCBs used by the kernel are also mapped in the EFI page-table. + */ +int __init sev_es_efi_map_ghcbs(pgd_t *pgd) +{ + struct sev_es_runtime_data *data; + unsigned long address, pflags; + int cpu; + u64 pfn; + + if (!sev_es_active()) + return 0; + + pflags = _PAGE_NX | _PAGE_RW; + + for_each_possible_cpu(cpu) { + data = per_cpu(runtime_data, cpu); + + address = __pa(&data->ghcb_page); + pfn = address >> PAGE_SHIFT; + + if (kernel_map_pages_in_pgd(pgd, pfn, address, 1, pflags)) + return 1; + } + + return 0; +} + static enum es_result vc_handl...
2008 Nov 04
7
[PATCH 1/1] Xen PV support for hugepages
...get confusing. --- xen-unstable//./xen/include/asm-x86/x86_32/page.h 2008-07-17 09:49:27.000000000 -0500 +++ xen-hpage/./xen/include/asm-x86/x86_32/page.h 2008-11-04 08:24:35.000000000 -0600 @@ -115,7 +115,7 @@ extern unsigned int PAGE_HYPERVISOR_NOCA #define BASE_DISALLOW_MASK (0xFFFFF198U & ~_PAGE_NX) #define L1_DISALLOW_MASK (BASE_DISALLOW_MASK | _PAGE_GNTTAB) -#define L2_DISALLOW_MASK (BASE_DISALLOW_MASK) +#define L2_DISALLOW_MASK (BASE_DISALLOW_MASK & ~_PAGE_PSE) #define L3_DISALLOW_MASK 0xFFFFF1FEU /* must-be-zero */ #endif /* __X86_32_PAGE_H__ */ --- xen-unstable//./xen/include/...
2005 Jun 15
2
x86_64 - Dom0 will not boot on EMT64
I am unable to boot Dom0 on my IBM eServer BladeCenter HS20, type 8843, EMT64 blades. I have read reports that Dom0 boots on Opteron boxes, but on my EMT64 blades, it does not. Has anyone else encountered this problem on EMT64 hardware? Here are the errors I am getting: This is on a SLES 9 box, gcc version 3.3.3 (SuSE Linux): kernel (hd0,0)/boot/xen.gz dom0_mem=256000 com2=19200,8n1
2011 Mar 28
0
[xen-unstable test] 6714: regressions - FAIL
...http://xenbits.xensource.com/gitweb?p=osstest.git;a=summary Not pushing. ------------------------------------------------------------ changeset: 23107:9549c04a8384 tag: tip user: Keir Fraser <keir@xen.org> date: Mon Mar 28 13:44:08 2011 +0100 x86: Remove _PAGE_NX defintiion (with implicit use of cpu_has_nx). Most users can use _PAGE_NX_BIT directly. The few genuine users in mm.c can do the cpu_has_nx check more clearly in other ways. Signed-off-by: Keir Fraser <keir@xen.org> changeset: 23106:bbf4b6dd9c32 user...
2020 Sep 09
0
[PATCH v7 71/72] x86/efi: Add GHCB mappings when SEV-ES is active
...; +{ >>> + struct sev_es_runtime_data *data; >>> + unsigned long address, pflags; >>> + int cpu; >>> + u64 pfn; >>> + >>> + if (!sev_es_active()) >>> + return 0; >>> + >>> + pflags = _PAGE_NX | _PAGE_RW; >>> + >>> + for_each_possible_cpu(cpu) { >>> + data = per_cpu(runtime_data, cpu); >>> + >>> + address = __pa(&data->ghcb_page); >>> + pfn = address >> PAGE_SHIFT; >>> + &g...
2011 Feb 11
0
[PATCH 3/3]:Staging: hv: Remove osd layer
...#include <linux/bitops.h> -#include <linux/slab.h> -#include "osd.h" - -void *osd_virtual_alloc_exec(unsigned int size) -{ -#ifdef __x86_64__ - return __vmalloc(size, GFP_KERNEL, PAGE_KERNEL_EXEC); -#else - return __vmalloc(size, GFP_KERNEL, - __pgprot(__PAGE_KERNEL & (~_PAGE_NX))); -#endif -} - -/** - * osd_page_alloc() - Allocate pages - * @count: Total number of Kernel pages you want to allocate - * - * Tries to allocate @count number of consecutive free kernel pages. - * And if successful, it will set the pages to 0 before returning. - * If successfull it will ret...
2011 Feb 11
0
[PATCH 3/3]:Staging: hv: Remove osd layer
...#include <linux/bitops.h> -#include <linux/slab.h> -#include "osd.h" - -void *osd_virtual_alloc_exec(unsigned int size) -{ -#ifdef __x86_64__ - return __vmalloc(size, GFP_KERNEL, PAGE_KERNEL_EXEC); -#else - return __vmalloc(size, GFP_KERNEL, - __pgprot(__PAGE_KERNEL & (~_PAGE_NX))); -#endif -} - -/** - * osd_page_alloc() - Allocate pages - * @count: Total number of Kernel pages you want to allocate - * - * Tries to allocate @count number of consecutive free kernel pages. - * And if successful, it will set the pages to 0 before returning. - * If successfull it will ret...
2008 Mar 28
12
[PATCH 00/12] Xen arch portability patches (take 4)
Hi Jeremy. According to your suggestion, I recreated patches for Ingo's x86.git tree. And this patch series includes Eddie's modification. Please review and forward them. (or push back to respin.) Recently the xen-ia64 community started to make efforts to merge xen/ia64 Linux to upstream. The first step is to merge up domU portion. This patchset is preliminary for xen/ia64 domU linux
2008 Mar 28
12
[PATCH 00/12] Xen arch portability patches (take 4)
Hi Jeremy. According to your suggestion, I recreated patches for Ingo's x86.git tree. And this patch series includes Eddie's modification. Please review and forward them. (or push back to respin.) Recently the xen-ia64 community started to make efforts to merge xen/ia64 Linux to upstream. The first step is to merge up domU portion. This patchset is preliminary for xen/ia64 domU linux
2020 Sep 07
84
[PATCH v7 00/72] x86: SEV-ES Guest Support
From: Joerg Roedel <jroedel at suse.de> Hi, here is a new version of the SEV-ES Guest Support patches for x86. The previous versions can be found as a linked list starting here: https://lore.kernel.org/lkml/20200824085511.7553-1-joro at 8bytes.org/ I updated the patch-set based on ther review comments I got and the discussions around it. Another important change is that the early IDT
2020 Sep 07
84
[PATCH v7 00/72] x86: SEV-ES Guest Support
From: Joerg Roedel <jroedel at suse.de> Hi, here is a new version of the SEV-ES Guest Support patches for x86. The previous versions can be found as a linked list starting here: https://lore.kernel.org/lkml/20200824085511.7553-1-joro at 8bytes.org/ I updated the patch-set based on ther review comments I got and the discussions around it. Another important change is that the early IDT
2017 Oct 04
28
x86: PIE support and option to extend KASLR randomization
These patches make the changes necessary to build the kernel as Position Independent Executable (PIE) on x86_64. A PIE kernel can be relocated below the top 2G of the virtual address space. It allows to optionally extend the KASLR randomization range from 1G to 3G. Thanks a lot to Ard Biesheuvel & Kees Cook on their feedback on compiler changes, PIE support and KASLR in general. Thanks to
2017 Oct 04
28
x86: PIE support and option to extend KASLR randomization
These patches make the changes necessary to build the kernel as Position Independent Executable (PIE) on x86_64. A PIE kernel can be relocated below the top 2G of the virtual address space. It allows to optionally extend the KASLR randomization range from 1G to 3G. Thanks a lot to Ard Biesheuvel & Kees Cook on their feedback on compiler changes, PIE support and KASLR in general. Thanks to