diff options
author | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-01-27 11:14:02 -0500 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-01-27 11:14:02 -0500 |
commit | 6c02b7b1610f873888af20f291c07730889ff0f9 (patch) | |
tree | 1b33e6642cc81605b8d37c0bda0abff0ba64fa2d /arch/x86/xen | |
parent | 7a7546b377bdaa25ac77f33d9433c59f259b9688 (diff) | |
parent | dcd6c92267155e70a94b3927bce681ce74b80d1f (diff) |
Merge commit 'v3.3-rc1' into stable/for-linus-fixes-3.3
* commit 'v3.3-rc1': (9775 commits)
Linux 3.3-rc1
x86, syscall: Need __ARCH_WANT_SYS_IPC for 32 bits
qnx4: don't leak ->BitMap on late failure exits
qnx4: reduce the insane nesting in qnx4_checkroot()
qnx4: di_fname is an array, for crying out loud...
KEYS: Permit key_serial() to be called with a const key pointer
keys: fix user_defined key sparse messages
ima: fix cred sparse warning
uml: fix compile for x86-64
MPILIB: Add a missing ENOMEM check
tpm: fix (ACPI S3) suspend regression
nvme: fix merge error due to change of 'make_request_fn' fn type
xen: using EXPORT_SYMBOL requires including export.h
gpio: tps65910: Use correct offset for gpio initialization
acpi/apei/einj: Add extensions to EINJ from rev 5.0 of acpi spec
intel_idle: Split up and provide per CPU initialization func
ACPI processor: Remove unneeded variable passed by acpi_processor_hotadd_init V2
tg3: Fix single-vector MSI-X code
openvswitch: Fix multipart datapath dumps.
ipv6: fix per device IP snmp counters
...
Diffstat (limited to 'arch/x86/xen')
-rw-r--r-- | arch/x86/xen/Kconfig | 4 | ||||
-rw-r--r-- | arch/x86/xen/debugfs.c | 2 | ||||
-rw-r--r-- | arch/x86/xen/debugfs.h | 2 | ||||
-rw-r--r-- | arch/x86/xen/enlighten.c | 2 | ||||
-rw-r--r-- | arch/x86/xen/grant-table.c | 44 | ||||
-rw-r--r-- | arch/x86/xen/setup.c | 20 |
6 files changed, 61 insertions, 13 deletions
diff --git a/arch/x86/xen/Kconfig b/arch/x86/xen/Kconfig index 26c731a106af..fdce49c7aff6 100644 --- a/arch/x86/xen/Kconfig +++ b/arch/x86/xen/Kconfig | |||
@@ -29,7 +29,8 @@ config XEN_PVHVM | |||
29 | 29 | ||
30 | config XEN_MAX_DOMAIN_MEMORY | 30 | config XEN_MAX_DOMAIN_MEMORY |
31 | int | 31 | int |
32 | default 128 | 32 | default 500 if X86_64 |
33 | default 64 if X86_32 | ||
33 | depends on XEN | 34 | depends on XEN |
34 | help | 35 | help |
35 | This only affects the sizing of some bss arrays, the unused | 36 | This only affects the sizing of some bss arrays, the unused |
@@ -48,3 +49,4 @@ config XEN_DEBUG_FS | |||
48 | help | 49 | help |
49 | Enable statistics output and various tuning options in debugfs. | 50 | Enable statistics output and various tuning options in debugfs. |
50 | Enabling this option may incur a significant performance overhead. | 51 | Enabling this option may incur a significant performance overhead. |
52 | |||
diff --git a/arch/x86/xen/debugfs.c b/arch/x86/xen/debugfs.c index 7c0fedd98ea0..ef1db1900d86 100644 --- a/arch/x86/xen/debugfs.c +++ b/arch/x86/xen/debugfs.c | |||
@@ -109,7 +109,7 @@ static const struct file_operations u32_array_fops = { | |||
109 | .llseek = no_llseek, | 109 | .llseek = no_llseek, |
110 | }; | 110 | }; |
111 | 111 | ||
112 | struct dentry *xen_debugfs_create_u32_array(const char *name, mode_t mode, | 112 | struct dentry *xen_debugfs_create_u32_array(const char *name, umode_t mode, |
113 | struct dentry *parent, | 113 | struct dentry *parent, |
114 | u32 *array, unsigned elements) | 114 | u32 *array, unsigned elements) |
115 | { | 115 | { |
diff --git a/arch/x86/xen/debugfs.h b/arch/x86/xen/debugfs.h index e28132084832..78d25499be5b 100644 --- a/arch/x86/xen/debugfs.h +++ b/arch/x86/xen/debugfs.h | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | struct dentry * __init xen_init_debugfs(void); | 4 | struct dentry * __init xen_init_debugfs(void); |
5 | 5 | ||
6 | struct dentry *xen_debugfs_create_u32_array(const char *name, mode_t mode, | 6 | struct dentry *xen_debugfs_create_u32_array(const char *name, umode_t mode, |
7 | struct dentry *parent, | 7 | struct dentry *parent, |
8 | u32 *array, unsigned elements); | 8 | u32 *array, unsigned elements); |
9 | 9 | ||
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 1f928659c338..12eb07bfb267 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -1215,8 +1215,6 @@ asmlinkage void __init xen_start_kernel(void) | |||
1215 | local_irq_disable(); | 1215 | local_irq_disable(); |
1216 | early_boot_irqs_disabled = true; | 1216 | early_boot_irqs_disabled = true; |
1217 | 1217 | ||
1218 | memblock_init(); | ||
1219 | |||
1220 | xen_raw_console_write("mapping kernel into physical memory\n"); | 1218 | xen_raw_console_write("mapping kernel into physical memory\n"); |
1221 | pgd = xen_setup_kernel_pagetable(pgd, xen_start_info->nr_pages); | 1219 | pgd = xen_setup_kernel_pagetable(pgd, xen_start_info->nr_pages); |
1222 | xen_ident_map_ISA(); | 1220 | xen_ident_map_ISA(); |
diff --git a/arch/x86/xen/grant-table.c b/arch/x86/xen/grant-table.c index 5a40d24ba331..3a5f55d51907 100644 --- a/arch/x86/xen/grant-table.c +++ b/arch/x86/xen/grant-table.c | |||
@@ -54,6 +54,20 @@ static int map_pte_fn(pte_t *pte, struct page *pmd_page, | |||
54 | return 0; | 54 | return 0; |
55 | } | 55 | } |
56 | 56 | ||
57 | /* | ||
58 | * This function is used to map shared frames to store grant status. It is | ||
59 | * different from map_pte_fn above, the frames type here is uint64_t. | ||
60 | */ | ||
61 | static int map_pte_fn_status(pte_t *pte, struct page *pmd_page, | ||
62 | unsigned long addr, void *data) | ||
63 | { | ||
64 | uint64_t **frames = (uint64_t **)data; | ||
65 | |||
66 | set_pte_at(&init_mm, addr, pte, mfn_pte((*frames)[0], PAGE_KERNEL)); | ||
67 | (*frames)++; | ||
68 | return 0; | ||
69 | } | ||
70 | |||
57 | static int unmap_pte_fn(pte_t *pte, struct page *pmd_page, | 71 | static int unmap_pte_fn(pte_t *pte, struct page *pmd_page, |
58 | unsigned long addr, void *data) | 72 | unsigned long addr, void *data) |
59 | { | 73 | { |
@@ -64,10 +78,10 @@ static int unmap_pte_fn(pte_t *pte, struct page *pmd_page, | |||
64 | 78 | ||
65 | int arch_gnttab_map_shared(unsigned long *frames, unsigned long nr_gframes, | 79 | int arch_gnttab_map_shared(unsigned long *frames, unsigned long nr_gframes, |
66 | unsigned long max_nr_gframes, | 80 | unsigned long max_nr_gframes, |
67 | struct grant_entry **__shared) | 81 | void **__shared) |
68 | { | 82 | { |
69 | int rc; | 83 | int rc; |
70 | struct grant_entry *shared = *__shared; | 84 | void *shared = *__shared; |
71 | 85 | ||
72 | if (shared == NULL) { | 86 | if (shared == NULL) { |
73 | struct vm_struct *area = | 87 | struct vm_struct *area = |
@@ -83,8 +97,30 @@ int arch_gnttab_map_shared(unsigned long *frames, unsigned long nr_gframes, | |||
83 | return rc; | 97 | return rc; |
84 | } | 98 | } |
85 | 99 | ||
86 | void arch_gnttab_unmap_shared(struct grant_entry *shared, | 100 | int arch_gnttab_map_status(uint64_t *frames, unsigned long nr_gframes, |
87 | unsigned long nr_gframes) | 101 | unsigned long max_nr_gframes, |
102 | grant_status_t **__shared) | ||
103 | { | ||
104 | int rc; | ||
105 | grant_status_t *shared = *__shared; | ||
106 | |||
107 | if (shared == NULL) { | ||
108 | /* No need to pass in PTE as we are going to do it | ||
109 | * in apply_to_page_range anyhow. */ | ||
110 | struct vm_struct *area = | ||
111 | alloc_vm_area(PAGE_SIZE * max_nr_gframes, NULL); | ||
112 | BUG_ON(area == NULL); | ||
113 | shared = area->addr; | ||
114 | *__shared = shared; | ||
115 | } | ||
116 | |||
117 | rc = apply_to_page_range(&init_mm, (unsigned long)shared, | ||
118 | PAGE_SIZE * nr_gframes, | ||
119 | map_pte_fn_status, &frames); | ||
120 | return rc; | ||
121 | } | ||
122 | |||
123 | void arch_gnttab_unmap(void *shared, unsigned long nr_gframes) | ||
88 | { | 124 | { |
89 | apply_to_page_range(&init_mm, (unsigned long)shared, | 125 | apply_to_page_range(&init_mm, (unsigned long)shared, |
90 | PAGE_SIZE * nr_gframes, unmap_pte_fn, NULL); | 126 | PAGE_SIZE * nr_gframes, unmap_pte_fn, NULL); |
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c index f5e1362550e7..e03c63692176 100644 --- a/arch/x86/xen/setup.c +++ b/arch/x86/xen/setup.c | |||
@@ -173,9 +173,21 @@ static unsigned long __init xen_get_max_pages(void) | |||
173 | domid_t domid = DOMID_SELF; | 173 | domid_t domid = DOMID_SELF; |
174 | int ret; | 174 | int ret; |
175 | 175 | ||
176 | ret = HYPERVISOR_memory_op(XENMEM_maximum_reservation, &domid); | 176 | /* |
177 | if (ret > 0) | 177 | * For the initial domain we use the maximum reservation as |
178 | max_pages = ret; | 178 | * the maximum page. |
179 | * | ||
180 | * For guest domains the current maximum reservation reflects | ||
181 | * the current maximum rather than the static maximum. In this | ||
182 | * case the e820 map provided to us will cover the static | ||
183 | * maximum region. | ||
184 | */ | ||
185 | if (xen_initial_domain()) { | ||
186 | ret = HYPERVISOR_memory_op(XENMEM_maximum_reservation, &domid); | ||
187 | if (ret > 0) | ||
188 | max_pages = ret; | ||
189 | } | ||
190 | |||
179 | return min(max_pages, MAX_DOMAIN_PAGES); | 191 | return min(max_pages, MAX_DOMAIN_PAGES); |
180 | } | 192 | } |
181 | 193 | ||
@@ -409,6 +421,6 @@ void __init xen_arch_setup(void) | |||
409 | #endif | 421 | #endif |
410 | disable_cpuidle(); | 422 | disable_cpuidle(); |
411 | boot_option_idle_override = IDLE_HALT; | 423 | boot_option_idle_override = IDLE_HALT; |
412 | 424 | WARN_ON(set_pm_idle_to_default()); | |
413 | fiddle_vdso(); | 425 | fiddle_vdso(); |
414 | } | 426 | } |