diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-28 20:11:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-28 20:11:17 -0400 |
commit | 18cb657ca1bafe635f368346a1676fb04c512edf (patch) | |
tree | b0eb6a4ceddf98e7bf820be7ff24bf131ff56b0c /arch/x86/xen/smp.c | |
parent | 2301b65b86df8b80e6779ce9885ad62a5c4adc38 (diff) | |
parent | e28c31a96b1570f17731b18e8efabb7308d0c22c (diff) |
Merge branch 'stable/xen-pcifront-0.8.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen
and branch 'for-linus' of git://xenbits.xen.org/people/sstabellini/linux-pvhvm
* 'for-linus' of git://xenbits.xen.org/people/sstabellini/linux-pvhvm:
xen: register xen pci notifier
xen: initialize cpu masks for pv guests in xen_smp_init
xen: add a missing #include to arch/x86/pci/xen.c
xen: mask the MTRR feature from the cpuid
xen: make hvc_xen console work for dom0.
xen: add the direct mapping area for ISA bus access
xen: Initialize xenbus for dom0.
xen: use vcpu_ops to setup cpu masks
xen: map a dummy page for local apic and ioapic in xen_set_fixmap
xen: remap MSIs into pirqs when running as initial domain
xen: remap GSIs as pirqs when running as initial domain
xen: introduce XEN_DOM0 as a silent option
xen: map MSIs into pirqs
xen: support GSI -> pirq remapping in PV on HVM guests
xen: add xen hvm acpi_register_gsi variant
acpi: use indirect call to register gsi in different modes
xen: implement xen_hvm_register_pirq
xen: get the maximum number of pirqs from xen
xen: support pirq != irq
* 'stable/xen-pcifront-0.8.2' of git://git.kernel.org/pub/scm/linux/kernel/git/konrad/xen: (27 commits)
X86/PCI: Remove the dependency on isapnp_disable.
xen: Update Makefile with CONFIG_BLOCK dependency for biomerge.c
MAINTAINERS: Add myself to the Xen Hypervisor Interface and remove Chris Wright.
x86: xen: Sanitse irq handling (part two)
swiotlb-xen: On x86-32 builts, select SWIOTLB instead of depending on it.
MAINTAINERS: Add myself for Xen PCI and Xen SWIOTLB maintainer.
xen/pci: Request ACS when Xen-SWIOTLB is activated.
xen-pcifront: Xen PCI frontend driver.
xenbus: prevent warnings on unhandled enumeration values
xenbus: Xen paravirtualised PCI hotplug support.
xen/x86/PCI: Add support for the Xen PCI subsystem
x86: Introduce x86_msi_ops
msi: Introduce default_[teardown|setup]_msi_irqs with fallback.
x86/PCI: Export pci_walk_bus function.
x86/PCI: make sure _PAGE_IOMAP it set on pci mappings
x86/PCI: Clean up pci_cache_line_size
xen: fix shared irq device passthrough
xen: Provide a variant of xen_poll_irq with timeout.
xen: Find an unbound irq number in reverse order (high to low).
xen: statically initialize cpu_evtchn_mask_p
...
Fix up trivial conflicts in drivers/pci/Makefile
Diffstat (limited to 'arch/x86/xen/smp.c')
-rw-r--r-- | arch/x86/xen/smp.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/x86/xen/smp.c b/arch/x86/xen/smp.c index f4d010031465..72a4c7959045 100644 --- a/arch/x86/xen/smp.c +++ b/arch/x86/xen/smp.c | |||
@@ -28,6 +28,7 @@ | |||
28 | #include <asm/xen/interface.h> | 28 | #include <asm/xen/interface.h> |
29 | #include <asm/xen/hypercall.h> | 29 | #include <asm/xen/hypercall.h> |
30 | 30 | ||
31 | #include <xen/xen.h> | ||
31 | #include <xen/page.h> | 32 | #include <xen/page.h> |
32 | #include <xen/events.h> | 33 | #include <xen/events.h> |
33 | 34 | ||
@@ -156,11 +157,35 @@ static void __init xen_fill_possible_map(void) | |||
156 | { | 157 | { |
157 | int i, rc; | 158 | int i, rc; |
158 | 159 | ||
160 | if (xen_initial_domain()) | ||
161 | return; | ||
162 | |||
163 | for (i = 0; i < nr_cpu_ids; i++) { | ||
164 | rc = HYPERVISOR_vcpu_op(VCPUOP_is_up, i, NULL); | ||
165 | if (rc >= 0) { | ||
166 | num_processors++; | ||
167 | set_cpu_possible(i, true); | ||
168 | } | ||
169 | } | ||
170 | } | ||
171 | |||
172 | static void __init xen_filter_cpu_maps(void) | ||
173 | { | ||
174 | int i, rc; | ||
175 | |||
176 | if (!xen_initial_domain()) | ||
177 | return; | ||
178 | |||
179 | num_processors = 0; | ||
180 | disabled_cpus = 0; | ||
159 | for (i = 0; i < nr_cpu_ids; i++) { | 181 | for (i = 0; i < nr_cpu_ids; i++) { |
160 | rc = HYPERVISOR_vcpu_op(VCPUOP_is_up, i, NULL); | 182 | rc = HYPERVISOR_vcpu_op(VCPUOP_is_up, i, NULL); |
161 | if (rc >= 0) { | 183 | if (rc >= 0) { |
162 | num_processors++; | 184 | num_processors++; |
163 | set_cpu_possible(i, true); | 185 | set_cpu_possible(i, true); |
186 | } else { | ||
187 | set_cpu_possible(i, false); | ||
188 | set_cpu_present(i, false); | ||
164 | } | 189 | } |
165 | } | 190 | } |
166 | } | 191 | } |
@@ -174,6 +199,7 @@ static void __init xen_smp_prepare_boot_cpu(void) | |||
174 | old memory can be recycled */ | 199 | old memory can be recycled */ |
175 | make_lowmem_page_readwrite(xen_initial_gdt); | 200 | make_lowmem_page_readwrite(xen_initial_gdt); |
176 | 201 | ||
202 | xen_filter_cpu_maps(); | ||
177 | xen_setup_vcpu_info_placement(); | 203 | xen_setup_vcpu_info_placement(); |
178 | } | 204 | } |
179 | 205 | ||