diff options
Diffstat (limited to 'arch/x86/xen')
| -rw-r--r-- | arch/x86/xen/enlighten.c | 4 | ||||
| -rw-r--r-- | arch/x86/xen/p2m.c | 27 | ||||
| -rw-r--r-- | arch/x86/xen/setup.c | 4 |
3 files changed, 19 insertions, 16 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 9642d4a38602..1fbe75a95f15 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
| @@ -1452,6 +1452,10 @@ asmlinkage void __init xen_start_kernel(void) | |||
| 1452 | pci_request_acs(); | 1452 | pci_request_acs(); |
| 1453 | 1453 | ||
| 1454 | xen_acpi_sleep_register(); | 1454 | xen_acpi_sleep_register(); |
| 1455 | |||
| 1456 | /* Avoid searching for BIOS MP tables */ | ||
| 1457 | x86_init.mpparse.find_smp_config = x86_init_noop; | ||
| 1458 | x86_init.mpparse.get_smp_config = x86_init_uint_noop; | ||
| 1455 | } | 1459 | } |
| 1456 | #ifdef CONFIG_PCI | 1460 | #ifdef CONFIG_PCI |
| 1457 | /* PCI BIOS service won't work from a PV guest. */ | 1461 | /* PCI BIOS service won't work from a PV guest. */ |
diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c index 76ba0e97e530..72213da605f5 100644 --- a/arch/x86/xen/p2m.c +++ b/arch/x86/xen/p2m.c | |||
| @@ -828,9 +828,6 @@ int m2p_add_override(unsigned long mfn, struct page *page, | |||
| 828 | 828 | ||
| 829 | xen_mc_issue(PARAVIRT_LAZY_MMU); | 829 | xen_mc_issue(PARAVIRT_LAZY_MMU); |
| 830 | } | 830 | } |
| 831 | /* let's use dev_bus_addr to record the old mfn instead */ | ||
| 832 | kmap_op->dev_bus_addr = page->index; | ||
| 833 | page->index = (unsigned long) kmap_op; | ||
| 834 | } | 831 | } |
| 835 | spin_lock_irqsave(&m2p_override_lock, flags); | 832 | spin_lock_irqsave(&m2p_override_lock, flags); |
| 836 | list_add(&page->lru, &m2p_overrides[mfn_hash(mfn)]); | 833 | list_add(&page->lru, &m2p_overrides[mfn_hash(mfn)]); |
| @@ -857,7 +854,8 @@ int m2p_add_override(unsigned long mfn, struct page *page, | |||
| 857 | return 0; | 854 | return 0; |
| 858 | } | 855 | } |
| 859 | EXPORT_SYMBOL_GPL(m2p_add_override); | 856 | EXPORT_SYMBOL_GPL(m2p_add_override); |
| 860 | int m2p_remove_override(struct page *page, bool clear_pte) | 857 | int m2p_remove_override(struct page *page, |
| 858 | struct gnttab_map_grant_ref *kmap_op) | ||
| 861 | { | 859 | { |
| 862 | unsigned long flags; | 860 | unsigned long flags; |
| 863 | unsigned long mfn; | 861 | unsigned long mfn; |
| @@ -887,10 +885,8 @@ int m2p_remove_override(struct page *page, bool clear_pte) | |||
| 887 | WARN_ON(!PagePrivate(page)); | 885 | WARN_ON(!PagePrivate(page)); |
| 888 | ClearPagePrivate(page); | 886 | ClearPagePrivate(page); |
| 889 | 887 | ||
| 890 | if (clear_pte) { | 888 | set_phys_to_machine(pfn, page->index); |
| 891 | struct gnttab_map_grant_ref *map_op = | 889 | if (kmap_op != NULL) { |
| 892 | (struct gnttab_map_grant_ref *) page->index; | ||
| 893 | set_phys_to_machine(pfn, map_op->dev_bus_addr); | ||
| 894 | if (!PageHighMem(page)) { | 890 | if (!PageHighMem(page)) { |
| 895 | struct multicall_space mcs; | 891 | struct multicall_space mcs; |
| 896 | struct gnttab_unmap_grant_ref *unmap_op; | 892 | struct gnttab_unmap_grant_ref *unmap_op; |
| @@ -902,13 +898,13 @@ int m2p_remove_override(struct page *page, bool clear_pte) | |||
| 902 | * issued. In this case handle is going to -1 because | 898 | * issued. In this case handle is going to -1 because |
| 903 | * it hasn't been modified yet. | 899 | * it hasn't been modified yet. |
| 904 | */ | 900 | */ |
| 905 | if (map_op->handle == -1) | 901 | if (kmap_op->handle == -1) |
| 906 | xen_mc_flush(); | 902 | xen_mc_flush(); |
| 907 | /* | 903 | /* |
| 908 | * Now if map_op->handle is negative it means that the | 904 | * Now if kmap_op->handle is negative it means that the |
| 909 | * hypercall actually returned an error. | 905 | * hypercall actually returned an error. |
| 910 | */ | 906 | */ |
| 911 | if (map_op->handle == GNTST_general_error) { | 907 | if (kmap_op->handle == GNTST_general_error) { |
| 912 | printk(KERN_WARNING "m2p_remove_override: " | 908 | printk(KERN_WARNING "m2p_remove_override: " |
| 913 | "pfn %lx mfn %lx, failed to modify kernel mappings", | 909 | "pfn %lx mfn %lx, failed to modify kernel mappings", |
| 914 | pfn, mfn); | 910 | pfn, mfn); |
| @@ -918,8 +914,8 @@ int m2p_remove_override(struct page *page, bool clear_pte) | |||
| 918 | mcs = xen_mc_entry( | 914 | mcs = xen_mc_entry( |
| 919 | sizeof(struct gnttab_unmap_grant_ref)); | 915 | sizeof(struct gnttab_unmap_grant_ref)); |
| 920 | unmap_op = mcs.args; | 916 | unmap_op = mcs.args; |
| 921 | unmap_op->host_addr = map_op->host_addr; | 917 | unmap_op->host_addr = kmap_op->host_addr; |
| 922 | unmap_op->handle = map_op->handle; | 918 | unmap_op->handle = kmap_op->handle; |
| 923 | unmap_op->dev_bus_addr = 0; | 919 | unmap_op->dev_bus_addr = 0; |
| 924 | 920 | ||
| 925 | MULTI_grant_table_op(mcs.mc, | 921 | MULTI_grant_table_op(mcs.mc, |
| @@ -930,10 +926,9 @@ int m2p_remove_override(struct page *page, bool clear_pte) | |||
| 930 | set_pte_at(&init_mm, address, ptep, | 926 | set_pte_at(&init_mm, address, ptep, |
| 931 | pfn_pte(pfn, PAGE_KERNEL)); | 927 | pfn_pte(pfn, PAGE_KERNEL)); |
| 932 | __flush_tlb_single(address); | 928 | __flush_tlb_single(address); |
| 933 | map_op->host_addr = 0; | 929 | kmap_op->host_addr = 0; |
| 934 | } | 930 | } |
| 935 | } else | 931 | } |
| 936 | set_phys_to_machine(pfn, page->index); | ||
| 937 | 932 | ||
| 938 | /* p2m(m2p(mfn)) == FOREIGN_FRAME(mfn): the mfn is already present | 933 | /* p2m(m2p(mfn)) == FOREIGN_FRAME(mfn): the mfn is already present |
| 939 | * somewhere in this domain, even before being added to the | 934 | * somewhere in this domain, even before being added to the |
diff --git a/arch/x86/xen/setup.c b/arch/x86/xen/setup.c index d11ca11d14fc..e2d62d697b5d 100644 --- a/arch/x86/xen/setup.c +++ b/arch/x86/xen/setup.c | |||
| @@ -17,6 +17,7 @@ | |||
| 17 | #include <asm/e820.h> | 17 | #include <asm/e820.h> |
| 18 | #include <asm/setup.h> | 18 | #include <asm/setup.h> |
| 19 | #include <asm/acpi.h> | 19 | #include <asm/acpi.h> |
| 20 | #include <asm/numa.h> | ||
| 20 | #include <asm/xen/hypervisor.h> | 21 | #include <asm/xen/hypervisor.h> |
| 21 | #include <asm/xen/hypercall.h> | 22 | #include <asm/xen/hypercall.h> |
| 22 | 23 | ||
| @@ -544,4 +545,7 @@ void __init xen_arch_setup(void) | |||
| 544 | disable_cpufreq(); | 545 | disable_cpufreq(); |
| 545 | WARN_ON(set_pm_idle_to_default()); | 546 | WARN_ON(set_pm_idle_to_default()); |
| 546 | fiddle_vdso(); | 547 | fiddle_vdso(); |
| 548 | #ifdef CONFIG_NUMA | ||
| 549 | numa_off = 1; | ||
| 550 | #endif | ||
| 547 | } | 551 | } |
