aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/xen/xenbus
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-28 20:11:17 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-28 20:11:17 -0400
commit18cb657ca1bafe635f368346a1676fb04c512edf (patch)
treeb0eb6a4ceddf98e7bf820be7ff24bf131ff56b0c /drivers/xen/xenbus
parent2301b65b86df8b80e6779ce9885ad62a5c4adc38 (diff)
parente28c31a96b1570f17731b18e8efabb7308d0c22c (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 'drivers/xen/xenbus')
-rw-r--r--drivers/xen/xenbus/xenbus_client.c2
-rw-r--r--drivers/xen/xenbus/xenbus_probe.c29
2 files changed, 30 insertions, 1 deletions
diff --git a/drivers/xen/xenbus/xenbus_client.c b/drivers/xen/xenbus/xenbus_client.c
index 7e49527189b6..cdacf923e073 100644
--- a/drivers/xen/xenbus/xenbus_client.c
+++ b/drivers/xen/xenbus/xenbus_client.c
@@ -50,6 +50,8 @@ const char *xenbus_strstate(enum xenbus_state state)
50 [ XenbusStateConnected ] = "Connected", 50 [ XenbusStateConnected ] = "Connected",
51 [ XenbusStateClosing ] = "Closing", 51 [ XenbusStateClosing ] = "Closing",
52 [ XenbusStateClosed ] = "Closed", 52 [ XenbusStateClosed ] = "Closed",
53 [XenbusStateReconfiguring] = "Reconfiguring",
54 [XenbusStateReconfigured] = "Reconfigured",
53 }; 55 };
54 return (state < ARRAY_SIZE(name)) ? name[state] : "INVALID"; 56 return (state < ARRAY_SIZE(name)) ? name[state] : "INVALID";
55} 57}
diff --git a/drivers/xen/xenbus/xenbus_probe.c b/drivers/xen/xenbus/xenbus_probe.c
index 132939f36020..deb9c4ba3a93 100644
--- a/drivers/xen/xenbus/xenbus_probe.c
+++ b/drivers/xen/xenbus/xenbus_probe.c
@@ -803,6 +803,7 @@ device_initcall(xenbus_probe_initcall);
803static int __init xenbus_init(void) 803static int __init xenbus_init(void)
804{ 804{
805 int err = 0; 805 int err = 0;
806 unsigned long page = 0;
806 807
807 DPRINTK(""); 808 DPRINTK("");
808 809
@@ -823,7 +824,31 @@ static int __init xenbus_init(void)
823 * Domain0 doesn't have a store_evtchn or store_mfn yet. 824 * Domain0 doesn't have a store_evtchn or store_mfn yet.
824 */ 825 */
825 if (xen_initial_domain()) { 826 if (xen_initial_domain()) {
826 /* dom0 not yet supported */ 827 struct evtchn_alloc_unbound alloc_unbound;
828
829 /* Allocate Xenstore page */
830 page = get_zeroed_page(GFP_KERNEL);
831 if (!page)
832 goto out_error;
833
834 xen_store_mfn = xen_start_info->store_mfn =
835 pfn_to_mfn(virt_to_phys((void *)page) >>
836 PAGE_SHIFT);
837
838 /* Next allocate a local port which xenstored can bind to */
839 alloc_unbound.dom = DOMID_SELF;
840 alloc_unbound.remote_dom = 0;
841
842 err = HYPERVISOR_event_channel_op(EVTCHNOP_alloc_unbound,
843 &alloc_unbound);
844 if (err == -ENOSYS)
845 goto out_error;
846
847 BUG_ON(err);
848 xen_store_evtchn = xen_start_info->store_evtchn =
849 alloc_unbound.port;
850
851 xen_store_interface = mfn_to_virt(xen_store_mfn);
827 } else { 852 } else {
828 if (xen_hvm_domain()) { 853 if (xen_hvm_domain()) {
829 uint64_t v = 0; 854 uint64_t v = 0;
@@ -869,6 +894,8 @@ static int __init xenbus_init(void)
869 bus_unregister(&xenbus_frontend.bus); 894 bus_unregister(&xenbus_frontend.bus);
870 895
871 out_error: 896 out_error:
897 if (page != 0)
898 free_page(page);
872 return err; 899 return err;
873} 900}
874 901