08a77ed8c4
xenpaging.tools_xenpaging_cleanup.patch - fate#310510 - fix xenpaging xenpaging.mem_event_check_ring-free_requests.patch - install /etc/xen/examples/xentrace_formats.txt to get human readable tracedata if xenalyze is not used - fate#310510 - fix xenpaging xenpaging.autostart_delay.patch xenpaging.blacklist.patch xenpaging.MRU_SIZE.patch remove xenpaging.hacks.patch, realmode works - Upstream patches from Jan including fixes for the following bugs bnc#583568 - Xen kernel is not booting bnc#615206 - Xen kernel fails to boot with IO-APIC problem bnc#640773 - Xen kernel crashing right after grub bnc#643477 - issues with PCI hotplug/hotunplug to Xen driver domain 22223-vtd-igd-workaround.patch 22222-x86-timer-extint.patch 22214-x86-msr-misc-enable.patch 22213-x86-xsave-cpuid-check.patch 22194-tmem-check-pv-mfn.patch 22177-i386-irq-safe-map_domain_page.patch 22175-x86-irq-enter-exit.patch 22174-x86-pmtimer-accuracy.patch 22160-Intel-C6-EOI.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=76
93 lines
2.6 KiB
Diff
93 lines
2.6 KiB
Diff
# HG changeset patch
|
|
# User Keir Fraser <keir.fraser@citrix.com>
|
|
# Date 1284796635 -3600
|
|
# Node ID 7405e0ddb912a993982e4e4122856965b7c706dd
|
|
# Parent 0da4bfd2bc23937d2e1a8bfa6d259be0d9e482ad
|
|
x86_32: [un]map_domain_page() is now IRQ safe.
|
|
|
|
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
|
|
|
--- a/xen/arch/x86/x86_32/domain_page.c
|
|
+++ b/xen/arch/x86/x86_32/domain_page.c
|
|
@@ -42,15 +42,13 @@ static inline struct vcpu *mapcache_curr
|
|
|
|
void *map_domain_page(unsigned long mfn)
|
|
{
|
|
- unsigned long va;
|
|
- unsigned int idx, i, flags;
|
|
+ unsigned long va, flags;
|
|
+ unsigned int idx, i;
|
|
struct vcpu *v;
|
|
struct mapcache_domain *dcache;
|
|
struct mapcache_vcpu *vcache;
|
|
struct vcpu_maphash_entry *hashent;
|
|
|
|
- ASSERT(!in_irq());
|
|
-
|
|
perfc_incr(map_domain_page_count);
|
|
|
|
v = mapcache_current_vcpu();
|
|
@@ -58,6 +56,8 @@ void *map_domain_page(unsigned long mfn)
|
|
dcache = &v->domain->arch.mapcache;
|
|
vcache = &v->arch.mapcache;
|
|
|
|
+ local_irq_save(flags);
|
|
+
|
|
hashent = &vcache->hash[MAPHASH_HASHFN(mfn)];
|
|
if ( hashent->mfn == mfn )
|
|
{
|
|
@@ -69,7 +69,7 @@ void *map_domain_page(unsigned long mfn)
|
|
goto out;
|
|
}
|
|
|
|
- spin_lock_irqsave(&dcache->lock, flags);
|
|
+ spin_lock(&dcache->lock);
|
|
|
|
/* Has some other CPU caused a wrap? We must flush if so. */
|
|
if ( unlikely(dcache->epoch != vcache->shadow_epoch) )
|
|
@@ -105,11 +105,12 @@ void *map_domain_page(unsigned long mfn)
|
|
set_bit(idx, dcache->inuse);
|
|
dcache->cursor = idx + 1;
|
|
|
|
- spin_unlock_irqrestore(&dcache->lock, flags);
|
|
+ spin_unlock(&dcache->lock);
|
|
|
|
l1e_write(&dcache->l1tab[idx], l1e_from_pfn(mfn, __PAGE_HYPERVISOR));
|
|
|
|
out:
|
|
+ local_irq_restore(flags);
|
|
va = MAPCACHE_VIRT_START + (idx << PAGE_SHIFT);
|
|
return (void *)va;
|
|
}
|
|
@@ -119,11 +120,9 @@ void unmap_domain_page(const void *va)
|
|
unsigned int idx;
|
|
struct vcpu *v;
|
|
struct mapcache_domain *dcache;
|
|
- unsigned long mfn;
|
|
+ unsigned long mfn, flags;
|
|
struct vcpu_maphash_entry *hashent;
|
|
|
|
- ASSERT(!in_irq());
|
|
-
|
|
ASSERT((void *)MAPCACHE_VIRT_START <= va);
|
|
ASSERT(va < (void *)MAPCACHE_VIRT_END);
|
|
|
|
@@ -135,6 +134,8 @@ void unmap_domain_page(const void *va)
|
|
mfn = l1e_get_pfn(dcache->l1tab[idx]);
|
|
hashent = &v->arch.mapcache.hash[MAPHASH_HASHFN(mfn)];
|
|
|
|
+ local_irq_save(flags);
|
|
+
|
|
if ( hashent->idx == idx )
|
|
{
|
|
ASSERT(hashent->mfn == mfn);
|
|
@@ -163,6 +164,8 @@ void unmap_domain_page(const void *va)
|
|
/* /Second/, mark as garbage. */
|
|
set_bit(idx, dcache->garbage);
|
|
}
|
|
+
|
|
+ local_irq_restore(flags);
|
|
}
|
|
|
|
void mapcache_domain_init(struct domain *d)
|