This commit is contained in:
parent
ef3323a4b5
commit
0c6232eec3
@ -10,7 +10,7 @@ Index: xen-3.3.1-testing/xen/common/domain.c
|
||||
===================================================================
|
||||
--- xen-3.3.1-testing.orig/xen/common/domain.c
|
||||
+++ xen-3.3.1-testing/xen/common/domain.c
|
||||
@@ -670,9 +670,11 @@ void vcpu_reset(struct vcpu *v)
|
||||
@@ -673,9 +673,11 @@ void vcpu_reset(struct vcpu *v)
|
||||
|
||||
set_bit(_VPF_down, &v->pause_flags);
|
||||
|
||||
|
@ -18,7 +18,7 @@ Index: xen-3.3.1-testing/xen/arch/x86/boot/wakeup.S
|
||||
===================================================================
|
||||
--- xen-3.3.1-testing.orig/xen/arch/x86/boot/wakeup.S
|
||||
+++ xen-3.3.1-testing/xen/arch/x86/boot/wakeup.S
|
||||
@@ -168,7 +168,7 @@ wakeup_32:
|
||||
@@ -167,7 +167,7 @@ wakeup_32:
|
||||
.word 0,0,0
|
||||
lgdt_descr:
|
||||
.word LAST_RESERVED_GDT_BYTE
|
||||
|
@ -10,8 +10,10 @@ to support hardware watchpoint.
|
||||
|
||||
Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
|
||||
|
||||
--- a/xen/arch/x86/domain.c
|
||||
+++ b/xen/arch/x86/domain.c
|
||||
Index: xen-3.3.1-testing/xen/arch/x86/domain.c
|
||||
===================================================================
|
||||
--- xen-3.3.1-testing.orig/xen/arch/x86/domain.c
|
||||
+++ xen-3.3.1-testing/xen/arch/x86/domain.c
|
||||
@@ -575,7 +575,10 @@ int arch_set_info_guest(
|
||||
v->arch.guest_context.user_regs.eflags |= 2;
|
||||
|
||||
@ -23,9 +25,11 @@ Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
|
||||
|
||||
/* Only CR0.TS is modifiable by guest or admin. */
|
||||
v->arch.guest_context.ctrlreg[0] &= X86_CR0_TS;
|
||||
--- a/xen/arch/x86/hvm/vmx/vmx.c
|
||||
+++ b/xen/arch/x86/hvm/vmx/vmx.c
|
||||
@@ -1184,6 +1184,13 @@ static void vmx_set_uc_mode(struct vcpu
|
||||
Index: xen-3.3.1-testing/xen/arch/x86/hvm/vmx/vmx.c
|
||||
===================================================================
|
||||
--- xen-3.3.1-testing.orig/xen/arch/x86/hvm/vmx/vmx.c
|
||||
+++ xen-3.3.1-testing/xen/arch/x86/hvm/vmx/vmx.c
|
||||
@@ -1165,6 +1165,13 @@ static void vmx_set_uc_mode(struct vcpu
|
||||
vpid_sync_all();
|
||||
}
|
||||
|
||||
@ -39,7 +43,7 @@ Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
|
||||
static struct hvm_function_table vmx_function_table = {
|
||||
.name = "VMX",
|
||||
.domain_initialise = vmx_domain_initialise,
|
||||
@@ -1214,7 +1221,8 @@ static struct hvm_function_table vmx_fun
|
||||
@@ -1195,7 +1202,8 @@ static struct hvm_function_table vmx_fun
|
||||
.msr_read_intercept = vmx_msr_read_intercept,
|
||||
.msr_write_intercept = vmx_msr_write_intercept,
|
||||
.invlpg_intercept = vmx_invlpg_intercept,
|
||||
@ -49,8 +53,10 @@ Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
|
||||
};
|
||||
|
||||
static unsigned long *vpid_bitmap;
|
||||
--- a/xen/include/asm-x86/hvm/hvm.h
|
||||
+++ b/xen/include/asm-x86/hvm/hvm.h
|
||||
Index: xen-3.3.1-testing/xen/include/asm-x86/hvm/hvm.h
|
||||
===================================================================
|
||||
--- xen-3.3.1-testing.orig/xen/include/asm-x86/hvm/hvm.h
|
||||
+++ xen-3.3.1-testing/xen/include/asm-x86/hvm/hvm.h
|
||||
@@ -128,6 +128,7 @@ struct hvm_function_table {
|
||||
int (*msr_write_intercept)(struct cpu_user_regs *regs);
|
||||
void (*invlpg_intercept)(unsigned long vaddr);
|
||||
|
@ -23,7 +23,7 @@ Index: xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
self._storeVmDetails()
|
||||
self._createChannels()
|
||||
self._createDevices()
|
||||
@@ -2123,6 +2124,64 @@ class XendDomainInfo:
|
||||
@@ -2131,6 +2132,64 @@ class XendDomainInfo:
|
||||
raise XendError(str(exn))
|
||||
|
||||
|
||||
@ -88,7 +88,7 @@ Index: xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
def _initDomain(self):
|
||||
log.debug('XendDomainInfo.initDomain: %s %s',
|
||||
self.domid,
|
||||
@@ -2142,58 +2201,7 @@ class XendDomainInfo:
|
||||
@@ -2150,58 +2209,7 @@ class XendDomainInfo:
|
||||
# repin domain vcpus if a restricted cpus list is provided
|
||||
# this is done prior to memory allocation to aide in memory
|
||||
# distribution for NUMA systems.
|
||||
|
@ -10,7 +10,7 @@ Index: xen-3.3.1-testing/tools/python/xen/xend/XendConfig.py
|
||||
===================================================================
|
||||
--- xen-3.3.1-testing.orig/tools/python/xen/xend/XendConfig.py
|
||||
+++ xen-3.3.1-testing/tools/python/xen/xend/XendConfig.py
|
||||
@@ -1026,8 +1026,6 @@ class XendConfig(dict):
|
||||
@@ -1030,8 +1030,6 @@ class XendConfig(dict):
|
||||
sxpr.append([name, s])
|
||||
|
||||
for xenapi, legacy in XENAPI_CFG_TO_LEGACY_CFG.items():
|
||||
|
@ -7,9 +7,11 @@ x86: secure ioapic_guest_write() against FREE_TO_ASSIGN irq values
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/x86/io_apic.c
|
||||
+++ b/xen/arch/x86/io_apic.c
|
||||
@@ -2198,7 +2198,7 @@ int ioapic_guest_write(unsigned long phy
|
||||
Index: xen-3.3.1-testing/xen/arch/x86/io_apic.c
|
||||
===================================================================
|
||||
--- xen-3.3.1-testing.orig/xen/arch/x86/io_apic.c
|
||||
+++ xen-3.3.1-testing/xen/arch/x86/io_apic.c
|
||||
@@ -2196,7 +2196,7 @@ int ioapic_guest_write(unsigned long phy
|
||||
if ( new_rte.vector >= FIRST_DYNAMIC_VECTOR )
|
||||
new_irq = vector_irq[new_rte.vector];
|
||||
|
||||
@ -18,7 +20,7 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
{
|
||||
if ( irq_desc[IO_APIC_VECTOR(old_irq)].action )
|
||||
{
|
||||
@@ -2210,7 +2210,7 @@ int ioapic_guest_write(unsigned long phy
|
||||
@@ -2208,7 +2208,7 @@ int ioapic_guest_write(unsigned long phy
|
||||
remove_pin_at_irq(old_irq, apic, pin);
|
||||
}
|
||||
|
||||
|
65
18805-pv-driver-build.patch
Normal file
65
18805-pv-driver-build.patch
Normal file
@ -0,0 +1,65 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir.fraser@citrix.com>
|
||||
# Date 1227525080 0
|
||||
# Node ID 0b8c6c91c5a408345e6ed650fb9f19e4fa9809b9
|
||||
# Parent cd45b5c9561250b999476227dbc7f7ede377d3d4
|
||||
pv-on-hvm drivers: build fixes for Linux 2.6.27+
|
||||
|
||||
Make the drivers build properly in a 2.6.27 environment as well as
|
||||
against a kernel with pv-ops Xen configured on (in the latter case
|
||||
more work would be needed to also make the drivers work, as there's a
|
||||
large number of duplicate exports).
|
||||
|
||||
Portions from Charles Arnold <carnold@novell.com>.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/unmodified_drivers/linux-2.6/balloon/Kbuild
|
||||
+++ b/unmodified_drivers/linux-2.6/balloon/Kbuild
|
||||
@@ -4,6 +4,5 @@ obj-m = xen-balloon.o
|
||||
|
||||
EXTRA_CFLAGS += -I$(M)/platform-pci
|
||||
|
||||
-xen-balloon-objs =
|
||||
-xen-balloon-objs += balloon.o
|
||||
-xen-balloon-objs += sysfs.o
|
||||
+xen-balloon-y := balloon.o sysfs.o
|
||||
+xen-balloon-$(CONFIG_XEN_SCRUB_PAGES) += scrub.o
|
||||
--- a/unmodified_drivers/linux-2.6/mkbuildtree
|
||||
+++ b/unmodified_drivers/linux-2.6/mkbuildtree
|
||||
@@ -53,6 +53,7 @@ i[34567]86|x86_64)
|
||||
ln -sf ${XL}/include/asm-x86/mach-xen/asm/synch_bitops*.h include/asm
|
||||
ln -sf ${XL}/include/asm-x86/mach-xen/asm/maddr*.h include/asm
|
||||
ln -sf ${XL}/include/asm-x86/mach-xen/asm/gnttab_dma.h include/asm
|
||||
+ ln -sf ${XL}/arch/x86/lib/scrub.c balloon
|
||||
else
|
||||
if [ $uname = x86_64 ]; then
|
||||
mkdir -p include/asm-i386
|
||||
--- a/unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c
|
||||
+++ b/unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c
|
||||
@@ -34,7 +34,11 @@ static void ap_suspend(void *_info)
|
||||
atomic_dec(&info->nr_spinning);
|
||||
}
|
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
|
||||
#define initiate_ap_suspend(i) smp_call_function(ap_suspend, i, 0, 0)
|
||||
+#else
|
||||
+#define initiate_ap_suspend(i) smp_call_function(ap_suspend, i, 0)
|
||||
+#endif
|
||||
|
||||
#else /* !defined(CONFIG_SMP) */
|
||||
|
||||
--- a/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c
|
||||
+++ b/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c
|
||||
@@ -14,7 +14,11 @@ EXPORT_SYMBOL(system_state);
|
||||
|
||||
void ctrl_alt_del(void)
|
||||
{
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
|
||||
kill_proc(1, SIGINT, 1); /* interrupt init */
|
||||
+#else
|
||||
+ kill_cad_pid(SIGINT, 1);
|
||||
+#endif
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,8)
|
42
18810-shadow-PAT.patch
Normal file
42
18810-shadow-PAT.patch
Normal file
@ -0,0 +1,42 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir.fraser@citrix.com>
|
||||
# Date 1227611877 0
|
||||
# Node ID c2a018cdb45d7419aa068c2dc4894e06ec5097e3
|
||||
# Parent e7c421510be96f456cd367d125d86f939d27d253
|
||||
Fix PSE PAT handling in guest walk.
|
||||
|
||||
Guest walk was currently checking for _PAGE_PSE_PAT flag in
|
||||
guest_l2e_get_flags(). The problem is that this function only checks
|
||||
for the first 12 bits of the PDE, while _PAGE_PSE_PAT is actually on bit
|
||||
12 (that is the 13th bit). This caused _PAGE_PAT bit to never been set on
|
||||
splintered L1s.
|
||||
|
||||
Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
|
||||
|
||||
--- a/xen/arch/x86/mm/shadow/multi.c
|
||||
+++ b/xen/arch/x86/mm/shadow/multi.c
|
||||
@@ -484,15 +484,15 @@ guest_walk_tables(struct vcpu *v, unsign
|
||||
* access controls are enforced in the shadow l2e. */
|
||||
int flags = (_PAGE_PRESENT|_PAGE_USER|_PAGE_RW|
|
||||
_PAGE_ACCESSED|_PAGE_DIRTY);
|
||||
- /* PSE level 2 entries use bit 12 for PAT; propagate it to bit 7
|
||||
- * of the level 1. */
|
||||
- if ( (guest_l2e_get_flags(gw->l2e) & _PAGE_PSE_PAT) )
|
||||
- flags |= _PAGE_PAT;
|
||||
- /* Copy the cache-control bits to the l1 as well, because we
|
||||
- * can't represent PAT in the (non-PSE) shadow l2e. :(
|
||||
- * This could cause problems if a guest ever maps an area of
|
||||
- * memory with superpages using more than one caching mode. */
|
||||
- flags |= guest_l2e_get_flags(gw->l2e) & (_PAGE_PWT|_PAGE_PCD);
|
||||
+ /* Import cache-control bits. Note that _PAGE_PAT is actually
|
||||
+ * _PAGE_PSE, and it is always set. We will clear it in case
|
||||
+ * _PAGE_PSE_PAT (bit 12, i.e. first bit of gfn) is clear. */
|
||||
+ flags |= (guest_l2e_get_flags(gw->l2e)
|
||||
+ & (_PAGE_PAT|_PAGE_PWT|_PAGE_PCD));
|
||||
+ if ( !(gfn_x(start) & 1) )
|
||||
+ /* _PAGE_PSE_PAT not set: remove _PAGE_PAT from flags. */
|
||||
+ flags &= ~_PAGE_PAT;
|
||||
+
|
||||
/* Increment the pfn by the right number of 4k pages.
|
||||
* The ~0x1 is to mask out the PAT bit mentioned above. */
|
||||
start = _gfn((gfn_x(start) & ~0x1) + guest_l1_table_offset(va));
|
312
18844-shared-page-EOI.patch
Normal file
312
18844-shared-page-EOI.patch
Normal file
@ -0,0 +1,312 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir.fraser@citrix.com>
|
||||
# Date 1227878852 0
|
||||
# Node ID c820bf73a914f643ab48864629c0559e68ceede1
|
||||
# Parent 8dbf23c89cc6a4fbd7b9063b14e706c065ba1678
|
||||
x86: add a shared page indicating the need for an EOI notification
|
||||
|
||||
To simplify the interface for the guest, when a guest uses this new
|
||||
(sub-)hypercall, PHYSDEVOP_eoi behavior changes to unmask the
|
||||
corresponding event channel at once, avoiding the eventual need for a
|
||||
second hypercall from the guest.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
||||
|
||||
18846:
|
||||
x86: Fix PHYSDEVOP_pirq_eoi_mfn, which I modified and broke.
|
||||
|
||||
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
||||
|
||||
18851:
|
||||
x86: Fix mfn_to_virt() to cast MFN to address size.
|
||||
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
||||
|
||||
Index: xen-3.3.1-testing/xen/arch/x86/domain.c
|
||||
===================================================================
|
||||
--- xen-3.3.1-testing.orig/xen/arch/x86/domain.c
|
||||
+++ xen-3.3.1-testing/xen/arch/x86/domain.c
|
||||
@@ -1812,6 +1812,13 @@ int domain_relinquish_resources(struct d
|
||||
unmap_vcpu_info(v);
|
||||
}
|
||||
|
||||
+ if ( d->arch.pirq_eoi_map != NULL )
|
||||
+ {
|
||||
+ unmap_domain_page_global(d->arch.pirq_eoi_map);
|
||||
+ put_page_and_type(mfn_to_page(d->arch.pirq_eoi_map_mfn));
|
||||
+ d->arch.pirq_eoi_map = NULL;
|
||||
+ }
|
||||
+
|
||||
d->arch.relmem = RELMEM_xen;
|
||||
/* fallthrough */
|
||||
|
||||
Index: xen-3.3.1-testing/xen/arch/x86/irq.c
|
||||
===================================================================
|
||||
--- xen-3.3.1-testing.orig/xen/arch/x86/irq.c
|
||||
+++ xen-3.3.1-testing/xen/arch/x86/irq.c
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <xen/iommu.h>
|
||||
#include <asm/msi.h>
|
||||
#include <asm/current.h>
|
||||
+#include <asm/flushtlb.h>
|
||||
#include <public/physdev.h>
|
||||
|
||||
/* opt_noirqbalance: If true, software IRQ balancing/affinity is disabled. */
|
||||
@@ -206,16 +207,42 @@ struct pending_eoi {
|
||||
static DEFINE_PER_CPU(struct pending_eoi, pending_eoi[NR_VECTORS]);
|
||||
#define pending_eoi_sp(p) ((p)[NR_VECTORS-1].vector)
|
||||
|
||||
+static inline void set_pirq_eoi(struct domain *d, unsigned int irq)
|
||||
+{
|
||||
+ if ( d->arch.pirq_eoi_map )
|
||||
+ set_bit(irq, d->arch.pirq_eoi_map);
|
||||
+}
|
||||
+
|
||||
+static inline void clear_pirq_eoi(struct domain *d, unsigned int irq)
|
||||
+{
|
||||
+ if ( d->arch.pirq_eoi_map )
|
||||
+ clear_bit(irq, d->arch.pirq_eoi_map);
|
||||
+}
|
||||
+
|
||||
+static void _irq_guest_eoi(irq_desc_t *desc)
|
||||
+{
|
||||
+ irq_guest_action_t *action = (irq_guest_action_t *)desc->action;
|
||||
+ unsigned int i, vector = desc - irq_desc;
|
||||
+
|
||||
+ if ( !(desc->status & IRQ_GUEST_EOI_PENDING) )
|
||||
+ return;
|
||||
+
|
||||
+ for ( i = 0; i < action->nr_guests; ++i )
|
||||
+ clear_pirq_eoi(action->guest[i],
|
||||
+ domain_vector_to_irq(action->guest[i], vector));
|
||||
+
|
||||
+ desc->status &= ~(IRQ_INPROGRESS|IRQ_GUEST_EOI_PENDING);
|
||||
+ desc->handler->enable(vector);
|
||||
+}
|
||||
+
|
||||
static struct timer irq_guest_eoi_timer[NR_IRQS];
|
||||
static void irq_guest_eoi_timer_fn(void *data)
|
||||
{
|
||||
irq_desc_t *desc = data;
|
||||
- unsigned vector = desc - irq_desc;
|
||||
unsigned long flags;
|
||||
|
||||
spin_lock_irqsave(&desc->lock, flags);
|
||||
- desc->status &= ~IRQ_INPROGRESS;
|
||||
- desc->handler->enable(vector);
|
||||
+ _irq_guest_eoi(desc);
|
||||
spin_unlock_irqrestore(&desc->lock, flags);
|
||||
}
|
||||
|
||||
@@ -272,8 +299,22 @@ static void __do_IRQ_guest(int vector)
|
||||
|
||||
if ( already_pending == action->nr_guests )
|
||||
{
|
||||
- desc->handler->disable(vector);
|
||||
stop_timer(&irq_guest_eoi_timer[vector]);
|
||||
+ desc->handler->disable(vector);
|
||||
+ desc->status |= IRQ_GUEST_EOI_PENDING;
|
||||
+ for ( i = 0; i < already_pending; ++i )
|
||||
+ {
|
||||
+ d = action->guest[i];
|
||||
+ set_pirq_eoi(d, domain_vector_to_irq(d, vector));
|
||||
+ /*
|
||||
+ * Could check here whether the guest unmasked the event by now
|
||||
+ * (or perhaps just re-issue the send_guest_pirq()), and if it
|
||||
+ * can now accept the event,
|
||||
+ * - clear all the pirq_eoi bits we already set,
|
||||
+ * - re-enable the vector, and
|
||||
+ * - skip the timer setup below.
|
||||
+ */
|
||||
+ }
|
||||
init_timer(&irq_guest_eoi_timer[vector],
|
||||
irq_guest_eoi_timer_fn, desc, smp_processor_id());
|
||||
set_timer(&irq_guest_eoi_timer[vector], NOW() + MILLISECS(1));
|
||||
@@ -382,8 +423,12 @@ static void __pirq_guest_eoi(struct doma
|
||||
action = (irq_guest_action_t *)desc->action;
|
||||
vector = desc - irq_desc;
|
||||
|
||||
- ASSERT(!test_bit(irq, d->pirq_mask) ||
|
||||
- (action->ack_type != ACKTYPE_NONE));
|
||||
+ if ( action->ack_type == ACKTYPE_NONE )
|
||||
+ {
|
||||
+ ASSERT(!test_bit(irq, d->pirq_mask));
|
||||
+ stop_timer(&irq_guest_eoi_timer[vector]);
|
||||
+ _irq_guest_eoi(desc);
|
||||
+ }
|
||||
|
||||
if ( unlikely(!test_and_clear_bit(irq, d->pirq_mask)) ||
|
||||
unlikely(--action->in_flight != 0) )
|
||||
@@ -604,6 +649,11 @@ int pirq_guest_bind(struct vcpu *v, int
|
||||
|
||||
action->guest[action->nr_guests++] = v->domain;
|
||||
|
||||
+ if ( action->ack_type != ACKTYPE_NONE )
|
||||
+ set_pirq_eoi(v->domain, irq);
|
||||
+ else
|
||||
+ clear_pirq_eoi(v->domain, irq);
|
||||
+
|
||||
unlock_out:
|
||||
spin_unlock_irq(&desc->lock);
|
||||
out:
|
||||
Index: xen-3.3.1-testing/xen/arch/x86/physdev.c
|
||||
===================================================================
|
||||
--- xen-3.3.1-testing.orig/xen/arch/x86/physdev.c
|
||||
+++ xen-3.3.1-testing/xen/arch/x86/physdev.c
|
||||
@@ -204,10 +204,50 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_H
|
||||
ret = -EFAULT;
|
||||
if ( copy_from_guest(&eoi, arg, 1) != 0 )
|
||||
break;
|
||||
+ ret = -EINVAL;
|
||||
+ if ( eoi.irq < 0 || eoi.irq >= NR_IRQS )
|
||||
+ break;
|
||||
+ if ( v->domain->arch.pirq_eoi_map )
|
||||
+ evtchn_unmask(v->domain->pirq_to_evtchn[eoi.irq]);
|
||||
ret = pirq_guest_eoi(v->domain, eoi.irq);
|
||||
break;
|
||||
}
|
||||
|
||||
+ case PHYSDEVOP_pirq_eoi_mfn: {
|
||||
+ struct physdev_pirq_eoi_mfn info;
|
||||
+
|
||||
+ BUILD_BUG_ON(NR_IRQS > (PAGE_SIZE * 8));
|
||||
+
|
||||
+ ret = -EFAULT;
|
||||
+ if ( copy_from_guest(&info, arg, 1) != 0 )
|
||||
+ break;
|
||||
+
|
||||
+ ret = -EINVAL;
|
||||
+ if ( !mfn_valid(info.mfn) ||
|
||||
+ !get_page_and_type(mfn_to_page(info.mfn), v->domain,
|
||||
+ PGT_writable_page) )
|
||||
+ break;
|
||||
+
|
||||
+ if ( cmpxchg(&v->domain->arch.pirq_eoi_map_mfn, 0, info.mfn) != 0 )
|
||||
+ {
|
||||
+ put_page_and_type(mfn_to_page(info.mfn));
|
||||
+ ret = -EBUSY;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ v->domain->arch.pirq_eoi_map = map_domain_page_global(info.mfn);
|
||||
+ if ( v->domain->arch.pirq_eoi_map == NULL )
|
||||
+ {
|
||||
+ v->domain->arch.pirq_eoi_map_mfn = 0;
|
||||
+ put_page_and_type(mfn_to_page(info.mfn));
|
||||
+ ret = -ENOSPC;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ ret = 0;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
/* Legacy since 0x00030202. */
|
||||
case PHYSDEVOP_IRQ_UNMASK_NOTIFY: {
|
||||
ret = pirq_guest_unmask(v->domain);
|
||||
Index: xen-3.3.1-testing/xen/arch/x86/x86_64/physdev.c
|
||||
===================================================================
|
||||
--- xen-3.3.1-testing.orig/xen/arch/x86/x86_64/physdev.c
|
||||
+++ xen-3.3.1-testing/xen/arch/x86/x86_64/physdev.c
|
||||
@@ -18,6 +18,9 @@
|
||||
#define physdev_eoi compat_physdev_eoi
|
||||
#define physdev_eoi_t physdev_eoi_compat_t
|
||||
|
||||
+#define physdev_pirq_eoi_mfn compat_physdev_pirq_eoi_mfn
|
||||
+#define physdev_pirq_eoi_mfn_t physdev_pirq_eoi_mfn_compat_t
|
||||
+
|
||||
#define physdev_set_iobitmap compat_physdev_set_iobitmap
|
||||
#define physdev_set_iobitmap_t physdev_set_iobitmap_compat_t
|
||||
|
||||
Index: xen-3.3.1-testing/xen/common/event_channel.c
|
||||
===================================================================
|
||||
--- xen-3.3.1-testing.orig/xen/common/event_channel.c
|
||||
+++ xen-3.3.1-testing/xen/common/event_channel.c
|
||||
@@ -762,10 +762,9 @@ long evtchn_bind_vcpu(unsigned int port,
|
||||
}
|
||||
|
||||
|
||||
-static long evtchn_unmask(evtchn_unmask_t *unmask)
|
||||
+int evtchn_unmask(unsigned int port)
|
||||
{
|
||||
struct domain *d = current->domain;
|
||||
- int port = unmask->port;
|
||||
struct vcpu *v;
|
||||
|
||||
spin_lock(&d->event_lock);
|
||||
@@ -916,7 +915,7 @@ long do_event_channel_op(int cmd, XEN_GU
|
||||
struct evtchn_unmask unmask;
|
||||
if ( copy_from_guest(&unmask, arg, 1) != 0 )
|
||||
return -EFAULT;
|
||||
- rc = evtchn_unmask(&unmask);
|
||||
+ rc = evtchn_unmask(unmask.port);
|
||||
break;
|
||||
}
|
||||
|
||||
Index: xen-3.3.1-testing/xen/include/asm-x86/domain.h
|
||||
===================================================================
|
||||
--- xen-3.3.1-testing.orig/xen/include/asm-x86/domain.h
|
||||
+++ xen-3.3.1-testing/xen/include/asm-x86/domain.h
|
||||
@@ -239,6 +239,10 @@ struct arch_domain
|
||||
int vector_pirq[NR_VECTORS];
|
||||
int pirq_vector[NR_PIRQS];
|
||||
|
||||
+ /* Shared page for notifying that explicit PIRQ EOI is required. */
|
||||
+ unsigned long *pirq_eoi_map;
|
||||
+ unsigned long pirq_eoi_map_mfn;
|
||||
+
|
||||
/* Pseudophysical e820 map (XENMEM_memory_map). */
|
||||
struct e820entry e820[3];
|
||||
unsigned int nr_e820;
|
||||
Index: xen-3.3.1-testing/xen/include/public/physdev.h
|
||||
===================================================================
|
||||
--- xen-3.3.1-testing.orig/xen/include/public/physdev.h
|
||||
+++ xen-3.3.1-testing/xen/include/public/physdev.h
|
||||
@@ -41,6 +41,21 @@ typedef struct physdev_eoi physdev_eoi_t
|
||||
DEFINE_XEN_GUEST_HANDLE(physdev_eoi_t);
|
||||
|
||||
/*
|
||||
+ * Register a shared page for the hypervisor to indicate whether the guest
|
||||
+ * must issue PHYSDEVOP_eoi. The semantics of PHYSDEVOP_eoi change slightly
|
||||
+ * once the guest used this function in that the associated event channel
|
||||
+ * will automatically get unmasked. The page registered is used as a bit
|
||||
+ * array indexed by Xen's PIRQ value.
|
||||
+ */
|
||||
+#define PHYSDEVOP_pirq_eoi_mfn 17
|
||||
+struct physdev_pirq_eoi_mfn {
|
||||
+ /* IN */
|
||||
+ xen_pfn_t mfn;
|
||||
+};
|
||||
+typedef struct physdev_pirq_eoi_mfn physdev_pirq_eoi_mfn_t;
|
||||
+DEFINE_XEN_GUEST_HANDLE(physdev_pirq_eoi_mfn_t);
|
||||
+
|
||||
+/*
|
||||
* Query the status of an IRQ line.
|
||||
* @arg == pointer to physdev_irq_status_query structure.
|
||||
*/
|
||||
Index: xen-3.3.1-testing/xen/include/xen/event.h
|
||||
===================================================================
|
||||
--- xen-3.3.1-testing.orig/xen/include/xen/event.h
|
||||
+++ xen-3.3.1-testing/xen/include/xen/event.h
|
||||
@@ -44,6 +44,9 @@ int evtchn_send(struct domain *d, unsign
|
||||
/* Bind a local event-channel port to the specified VCPU. */
|
||||
long evtchn_bind_vcpu(unsigned int port, unsigned int vcpu_id);
|
||||
|
||||
+/* Unmask a local event-channel port. */
|
||||
+int evtchn_unmask(unsigned int port);
|
||||
+
|
||||
/* Allocate/free a Xen-attached event channel port. */
|
||||
int alloc_unbound_xen_event_channel(
|
||||
struct vcpu *local_vcpu, domid_t remote_domid);
|
||||
Index: xen-3.3.1-testing/xen/include/xen/irq.h
|
||||
===================================================================
|
||||
--- xen-3.3.1-testing.orig/xen/include/xen/irq.h
|
||||
+++ xen-3.3.1-testing/xen/include/xen/irq.h
|
||||
@@ -22,6 +22,7 @@ struct irqaction
|
||||
#define IRQ_PENDING 4 /* IRQ pending - replay on enable */
|
||||
#define IRQ_REPLAY 8 /* IRQ has been replayed but not acked yet */
|
||||
#define IRQ_GUEST 16 /* IRQ is handled by guest OS(es) */
|
||||
+#define IRQ_GUEST_EOI_PENDING 32 /* IRQ was disabled, pending a guest EOI */
|
||||
#define IRQ_PER_CPU 256 /* IRQ is per CPU */
|
||||
|
||||
/*
|
102
18852-shared-page-EOI-gmfn.patch
Normal file
102
18852-shared-page-EOI-gmfn.patch
Normal file
@ -0,0 +1,102 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir.fraser@citrix.com>
|
||||
# Date 1228304687 0
|
||||
# Node ID cb526325927c0abac441588b4a69bccd0b99d7b3
|
||||
# Parent 9a6153a89d6642555c9ed4dc386d243c3df23eab
|
||||
physdev: make PHYSDEVOP_pirq_eoi_mfn use of gmfn instead of mfn.
|
||||
|
||||
To pass a page from a guest to hypervisor, gmfn should be used
|
||||
instead of mfn like grant table and other hypercalls. It's more
|
||||
consistent. So make use of gmfn instead of mfn for
|
||||
PHYSDEVOP_pirq_eoi_mfn hypercall.
|
||||
|
||||
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
|
||||
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
||||
|
||||
--- a/xen/arch/x86/physdev.c
|
||||
+++ b/xen/arch/x86/physdev.c
|
||||
@@ -14,6 +14,7 @@
|
||||
#include <public/xen.h>
|
||||
#include <public/physdev.h>
|
||||
#include <xsm/xsm.h>
|
||||
+#include <asm/p2m.h>
|
||||
|
||||
#ifndef COMPAT
|
||||
typedef long ret_t;
|
||||
@@ -213,8 +214,9 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_H
|
||||
break;
|
||||
}
|
||||
|
||||
- case PHYSDEVOP_pirq_eoi_mfn: {
|
||||
- struct physdev_pirq_eoi_mfn info;
|
||||
+ case PHYSDEVOP_pirq_eoi_gmfn: {
|
||||
+ struct physdev_pirq_eoi_gmfn info;
|
||||
+ unsigned long mfn;
|
||||
|
||||
BUILD_BUG_ON(NR_IRQS > (PAGE_SIZE * 8));
|
||||
|
||||
@@ -223,23 +225,24 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_H
|
||||
break;
|
||||
|
||||
ret = -EINVAL;
|
||||
- if ( !mfn_valid(info.mfn) ||
|
||||
- !get_page_and_type(mfn_to_page(info.mfn), v->domain,
|
||||
+ mfn = gmfn_to_mfn(current->domain, info.gmfn);
|
||||
+ if ( !mfn_valid(mfn) ||
|
||||
+ !get_page_and_type(mfn_to_page(mfn), v->domain,
|
||||
PGT_writable_page) )
|
||||
break;
|
||||
|
||||
- if ( cmpxchg(&v->domain->arch.pirq_eoi_map_mfn, 0, info.mfn) != 0 )
|
||||
+ if ( cmpxchg(&v->domain->arch.pirq_eoi_map_mfn, 0, mfn) != 0 )
|
||||
{
|
||||
- put_page_and_type(mfn_to_page(info.mfn));
|
||||
+ put_page_and_type(mfn_to_page(mfn));
|
||||
ret = -EBUSY;
|
||||
break;
|
||||
}
|
||||
|
||||
- v->domain->arch.pirq_eoi_map = map_domain_page_global(info.mfn);
|
||||
+ v->domain->arch.pirq_eoi_map = map_domain_page_global(mfn);
|
||||
if ( v->domain->arch.pirq_eoi_map == NULL )
|
||||
{
|
||||
v->domain->arch.pirq_eoi_map_mfn = 0;
|
||||
- put_page_and_type(mfn_to_page(info.mfn));
|
||||
+ put_page_and_type(mfn_to_page(mfn));
|
||||
ret = -ENOSPC;
|
||||
break;
|
||||
}
|
||||
--- a/xen/arch/x86/x86_64/physdev.c
|
||||
+++ b/xen/arch/x86/x86_64/physdev.c
|
||||
@@ -18,8 +18,8 @@
|
||||
#define physdev_eoi compat_physdev_eoi
|
||||
#define physdev_eoi_t physdev_eoi_compat_t
|
||||
|
||||
-#define physdev_pirq_eoi_mfn compat_physdev_pirq_eoi_mfn
|
||||
-#define physdev_pirq_eoi_mfn_t physdev_pirq_eoi_mfn_compat_t
|
||||
+#define physdev_pirq_eoi_gmfn compat_physdev_pirq_eoi_gmfn
|
||||
+#define physdev_pirq_eoi_gmfn_t physdev_pirq_eoi_gmfn_compat_t
|
||||
|
||||
#define physdev_set_iobitmap compat_physdev_set_iobitmap
|
||||
#define physdev_set_iobitmap_t physdev_set_iobitmap_compat_t
|
||||
--- a/xen/include/public/physdev.h
|
||||
+++ b/xen/include/public/physdev.h
|
||||
@@ -47,13 +47,13 @@ DEFINE_XEN_GUEST_HANDLE(physdev_eoi_t);
|
||||
* will automatically get unmasked. The page registered is used as a bit
|
||||
* array indexed by Xen's PIRQ value.
|
||||
*/
|
||||
-#define PHYSDEVOP_pirq_eoi_mfn 17
|
||||
-struct physdev_pirq_eoi_mfn {
|
||||
+#define PHYSDEVOP_pirq_eoi_gmfn 17
|
||||
+struct physdev_pirq_eoi_gmfn {
|
||||
/* IN */
|
||||
- xen_pfn_t mfn;
|
||||
+ xen_pfn_t gmfn;
|
||||
};
|
||||
-typedef struct physdev_pirq_eoi_mfn physdev_pirq_eoi_mfn_t;
|
||||
-DEFINE_XEN_GUEST_HANDLE(physdev_pirq_eoi_mfn_t);
|
||||
+typedef struct physdev_pirq_eoi_gmfn physdev_pirq_eoi_gmfn_t;
|
||||
+DEFINE_XEN_GUEST_HANDLE(physdev_pirq_eoi_gmfn_t);
|
||||
|
||||
/*
|
||||
* Query the status of an IRQ line.
|
25
18870-vtd-flush-per-device.patch
Normal file
25
18870-vtd-flush-per-device.patch
Normal file
@ -0,0 +1,25 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir.fraser@citrix.com>
|
||||
# Date 1228474781 0
|
||||
# Node ID 99f01b8184c7c16f612731e2a525687dc8d424dc
|
||||
# Parent 09160c3bd1797fdee111c2837f26a749e0bf9435
|
||||
VT-d code cleanup
|
||||
|
||||
This patch narrow context caching flush range from the
|
||||
domain-selective to the device-selective, when unmapping a device.
|
||||
|
||||
Signed-off-by: Yu Zhao <yu.zhao@intel.com>
|
||||
|
||||
--- a/xen/drivers/passthrough/vtd/iommu.c
|
||||
+++ b/xen/drivers/passthrough/vtd/iommu.c
|
||||
@@ -1323,7 +1323,9 @@ static int domain_context_unmap_one(
|
||||
context_clear_entry(*context);
|
||||
iommu_flush_cache_entry(context);
|
||||
|
||||
- if ( iommu_flush_context_domain(iommu, domain_iommu_domid(domain), 0) )
|
||||
+ if ( iommu_flush_context_device(iommu, domain_iommu_domid(domain),
|
||||
+ (((u16)bus) << 8) | devfn,
|
||||
+ DMA_CCMD_MASK_NOBIT, 0) )
|
||||
iommu_flush_write_buffer(iommu);
|
||||
else
|
||||
iommu_flush_iotlb_dsi(iommu, domain_iommu_domid(domain), 0);
|
33
18878-x86-cpufreq-less-verbose.patch
Normal file
33
18878-x86-cpufreq-less-verbose.patch
Normal file
@ -0,0 +1,33 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir.fraser@citrix.com>
|
||||
# Date 1228490563 0
|
||||
# Node ID 3905cbf523b2550f5025df6cc31ac60e48c1706f
|
||||
# Parent 3db54d2aa8bd7ec8c096fb4fafa068850ff0ff35
|
||||
x86/cpufreq: reduce verbosity
|
||||
|
||||
These messages don't exist in powernow's equivalent code, and are
|
||||
pretty useless anyway, hence just cluttering the logs.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/x86/acpi/cpufreq/cpufreq.c
|
||||
+++ b/xen/arch/x86/acpi/cpufreq/cpufreq.c
|
||||
@@ -339,16 +339,10 @@ static int acpi_cpufreq_target(struct cp
|
||||
|
||||
next_perf_state = data->freq_table[next_state].index;
|
||||
if (perf->state == next_perf_state) {
|
||||
- if (unlikely(policy->resume)) {
|
||||
- printk(KERN_INFO "Called after resume, resetting to P%d\n",
|
||||
- next_perf_state);
|
||||
+ if (unlikely(policy->resume))
|
||||
policy->resume = 0;
|
||||
- }
|
||||
- else {
|
||||
- printk(KERN_INFO "Already at target state (P%d)\n",
|
||||
- next_perf_state);
|
||||
+ else
|
||||
return 0;
|
||||
- }
|
||||
}
|
||||
|
||||
switch (data->cpu_feature) {
|
188
18879-cpufreq-params.patch
Normal file
188
18879-cpufreq-params.patch
Normal file
@ -0,0 +1,188 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir.fraser@citrix.com>
|
||||
# Date 1228490612 0
|
||||
# Node ID de7fd862ada2ed079d0a5c407508eb63bb936992
|
||||
# Parent 3905cbf523b2550f5025df6cc31ac60e48c1706f
|
||||
cpufreq: allow customization of some parameters
|
||||
|
||||
Short of having a way for powersaved to dynamically adjust these
|
||||
values, at least allow specifying them on the command line. In
|
||||
particular, always running at an up-threshold of 80% is perhaps nice
|
||||
for laptop use, but certainly not desirable on servers. On shell
|
||||
scripts invoking large numbers of short-lived processes I noticed a
|
||||
50% performance degradation on a dual-socket quad-core Barcelona just
|
||||
because of the load of an individual core never crossing the 80%
|
||||
boundary that would have resulted in increasing the frequency.
|
||||
|
||||
(Powersaved on SLE10 sets this on native kernels to 60% or 80%,
|
||||
depending on whether performance or power reduction is preferred,
|
||||
*divided* by the number of CPUs, but capped at the lower limit of
|
||||
20%.)
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/x86/acpi/cpufreq/cpufreq_ondemand.c
|
||||
+++ b/xen/arch/x86/acpi/cpufreq/cpufreq_ondemand.c
|
||||
@@ -22,15 +22,22 @@
|
||||
#include <acpi/cpufreq/cpufreq.h>
|
||||
|
||||
#define DEF_FREQUENCY_UP_THRESHOLD (80)
|
||||
+#define MIN_FREQUENCY_UP_THRESHOLD (11)
|
||||
+#define MAX_FREQUENCY_UP_THRESHOLD (100)
|
||||
|
||||
#define MIN_DBS_INTERVAL (MICROSECS(100))
|
||||
-#define MIN_SAMPLING_MILLISECS (20)
|
||||
-#define MIN_STAT_SAMPLING_RATE \
|
||||
+#define MIN_SAMPLING_RATE_RATIO (2)
|
||||
+#define MIN_SAMPLING_MILLISECS (MIN_SAMPLING_RATE_RATIO * 10)
|
||||
+#define MIN_STAT_SAMPLING_RATE \
|
||||
(MIN_SAMPLING_MILLISECS * MILLISECS(1))
|
||||
+#define MIN_SAMPLING_RATE \
|
||||
+ (def_sampling_rate / MIN_SAMPLING_RATE_RATIO)
|
||||
+#define MAX_SAMPLING_RATE (500 * def_sampling_rate)
|
||||
#define DEF_SAMPLING_RATE_LATENCY_MULTIPLIER (1000)
|
||||
#define TRANSITION_LATENCY_LIMIT (10 * 1000 )
|
||||
|
||||
static uint64_t def_sampling_rate;
|
||||
+static uint64_t usr_sampling_rate;
|
||||
|
||||
/* Sampling types */
|
||||
enum {DBS_NORMAL_SAMPLE, DBS_SUB_SAMPLE};
|
||||
@@ -42,11 +49,9 @@ static unsigned int dbs_enable; /* nu
|
||||
static struct dbs_tuners {
|
||||
uint64_t sampling_rate;
|
||||
unsigned int up_threshold;
|
||||
- unsigned int ignore_nice;
|
||||
unsigned int powersave_bias;
|
||||
} dbs_tuners_ins = {
|
||||
.up_threshold = DEF_FREQUENCY_UP_THRESHOLD,
|
||||
- .ignore_nice = 0,
|
||||
.powersave_bias = 0,
|
||||
};
|
||||
|
||||
@@ -216,7 +221,20 @@ int cpufreq_governor_dbs(struct cpufreq_
|
||||
if (def_sampling_rate < MIN_STAT_SAMPLING_RATE)
|
||||
def_sampling_rate = MIN_STAT_SAMPLING_RATE;
|
||||
|
||||
- dbs_tuners_ins.sampling_rate = def_sampling_rate;
|
||||
+ if (!usr_sampling_rate)
|
||||
+ dbs_tuners_ins.sampling_rate = def_sampling_rate;
|
||||
+ else if (usr_sampling_rate < MIN_SAMPLING_RATE) {
|
||||
+ printk(KERN_WARNING "cpufreq/ondemand: "
|
||||
+ "specified sampling rate too low, using %"PRIu64"\n",
|
||||
+ MIN_SAMPLING_RATE);
|
||||
+ dbs_tuners_ins.sampling_rate = MIN_SAMPLING_RATE;
|
||||
+ } else if (usr_sampling_rate > MAX_SAMPLING_RATE) {
|
||||
+ printk(KERN_WARNING "cpufreq/ondemand: "
|
||||
+ "specified sampling rate too high, using %"PRIu64"\n",
|
||||
+ MAX_SAMPLING_RATE);
|
||||
+ dbs_tuners_ins.sampling_rate = MAX_SAMPLING_RATE;
|
||||
+ } else
|
||||
+ dbs_tuners_ins.sampling_rate = usr_sampling_rate;
|
||||
}
|
||||
dbs_timer_init(this_dbs_info);
|
||||
|
||||
@@ -239,3 +257,55 @@ int cpufreq_governor_dbs(struct cpufreq_
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
+
|
||||
+void __init cpufreq_cmdline_parse(char *str)
|
||||
+{
|
||||
+ do {
|
||||
+ char *val, *end = strchr(str, ',');
|
||||
+
|
||||
+ if ( end )
|
||||
+ *end++ = '\0';
|
||||
+ val = strchr(str, '=');
|
||||
+ if ( val )
|
||||
+ *val = '\0';
|
||||
+
|
||||
+ if ( !strcmp(str, "rate") && val )
|
||||
+ {
|
||||
+ usr_sampling_rate = simple_strtoull(val, NULL, 0);
|
||||
+ }
|
||||
+ else if ( !strcmp(str, "threshold") && val )
|
||||
+ {
|
||||
+ unsigned long tmp = simple_strtoul(val, NULL, 0);
|
||||
+
|
||||
+ if ( tmp < MIN_FREQUENCY_UP_THRESHOLD )
|
||||
+ {
|
||||
+ printk(XENLOG_WARNING "cpufreq/ondemand: "
|
||||
+ "specified threshold too low, using %d\n",
|
||||
+ MIN_FREQUENCY_UP_THRESHOLD);
|
||||
+ tmp = MIN_FREQUENCY_UP_THRESHOLD;
|
||||
+ }
|
||||
+ else if ( tmp > MAX_FREQUENCY_UP_THRESHOLD )
|
||||
+ {
|
||||
+ printk(XENLOG_WARNING "cpufreq/ondemand: "
|
||||
+ "specified threshold too high, using %d\n",
|
||||
+ MAX_FREQUENCY_UP_THRESHOLD);
|
||||
+ tmp = MAX_FREQUENCY_UP_THRESHOLD;
|
||||
+ }
|
||||
+ dbs_tuners_ins.up_threshold = tmp;
|
||||
+ }
|
||||
+ else if ( !strcmp(str, "bias") && val )
|
||||
+ {
|
||||
+ unsigned long tmp = simple_strtoul(val, NULL, 0);
|
||||
+
|
||||
+ if ( tmp > 1000 )
|
||||
+ {
|
||||
+ printk(XENLOG_WARNING "cpufreq/ondemand: "
|
||||
+ "specified bias too high, using 1000\n");
|
||||
+ tmp = 1000;
|
||||
+ }
|
||||
+ dbs_tuners_ins.powersave_bias = tmp;
|
||||
+ }
|
||||
+
|
||||
+ str = end;
|
||||
+ } while ( str );
|
||||
+}
|
||||
--- a/xen/common/domain.c
|
||||
+++ b/xen/common/domain.c
|
||||
@@ -25,6 +25,7 @@
|
||||
#include <xen/percpu.h>
|
||||
#include <xen/multicall.h>
|
||||
#include <xen/rcupdate.h>
|
||||
+#include <acpi/cpufreq/cpufreq.h>
|
||||
#include <asm/debugger.h>
|
||||
#include <public/sched.h>
|
||||
#include <public/vcpu.h>
|
||||
@@ -41,16 +42,25 @@ boolean_param("dom0_vcpus_pin", opt_dom0
|
||||
enum cpufreq_controller cpufreq_controller;
|
||||
static void __init setup_cpufreq_option(char *str)
|
||||
{
|
||||
+ char *arg;
|
||||
+
|
||||
if ( !strcmp(str, "dom0-kernel") )
|
||||
{
|
||||
xen_processor_pmbits &= ~XEN_PROCESSOR_PM_PX;
|
||||
cpufreq_controller = FREQCTL_dom0_kernel;
|
||||
opt_dom0_vcpus_pin = 1;
|
||||
+ return;
|
||||
}
|
||||
- else if ( !strcmp(str, "xen") )
|
||||
+
|
||||
+ if ( (arg = strpbrk(str, ",:")) != NULL )
|
||||
+ *arg++ = '\0';
|
||||
+
|
||||
+ if ( !strcmp(str, "xen") )
|
||||
{
|
||||
xen_processor_pmbits |= XEN_PROCESSOR_PM_PX;
|
||||
cpufreq_controller = FREQCTL_xen;
|
||||
+ if ( arg && *arg )
|
||||
+ cpufreq_cmdline_parse(arg);
|
||||
}
|
||||
}
|
||||
custom_param("cpufreq", setup_cpufreq_option);
|
||||
--- a/xen/include/acpi/cpufreq/cpufreq.h
|
||||
+++ b/xen/include/acpi/cpufreq/cpufreq.h
|
||||
@@ -41,6 +41,8 @@ struct cpufreq_policy {
|
||||
};
|
||||
extern struct cpufreq_policy xen_px_policy[NR_CPUS];
|
||||
|
||||
+void cpufreq_cmdline_parse(char *);
|
||||
+
|
||||
#define CPUFREQ_SHARED_TYPE_NONE (0) /* None */
|
||||
#define CPUFREQ_SHARED_TYPE_HW (1) /* HW does needed coordination */
|
||||
#define CPUFREQ_SHARED_TYPE_ALL (2) /* All dependent CPUs should set freq */
|
29
18880-x86-pirq-guest-bind-msg.patch
Normal file
29
18880-x86-pirq-guest-bind-msg.patch
Normal file
@ -0,0 +1,29 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir.fraser@citrix.com>
|
||||
# Date 1228490652 0
|
||||
# Node ID d206692cbcbe33305afc4879a4b3ece44a8aba93
|
||||
# Parent de7fd862ada2ed079d0a5c407508eb63bb936992
|
||||
x86: make an error message more precise
|
||||
|
||||
... allowing to distinguish whether the to be added or the already
|
||||
existing PIRQ binding is causing the failure.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
--- a/xen/arch/x86/irq.c
|
||||
+++ b/xen/arch/x86/irq.c
|
||||
@@ -620,9 +620,11 @@ int pirq_guest_bind(struct vcpu *v, int
|
||||
}
|
||||
else if ( !will_share || !action->shareable )
|
||||
{
|
||||
- gdprintk(XENLOG_INFO, "Cannot bind IRQ %d to guest. "
|
||||
- "Will not share with others.\n",
|
||||
- irq);
|
||||
+ gdprintk(XENLOG_INFO, "Cannot bind IRQ %d to guest. %s.\n",
|
||||
+ irq,
|
||||
+ will_share ?
|
||||
+ "Others do not share" :
|
||||
+ "Will not share with others");
|
||||
rc = -EBUSY;
|
||||
goto unlock_out;
|
||||
}
|
@ -2,7 +2,7 @@ Index: xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
===================================================================
|
||||
--- xen-3.3.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||
+++ xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
@@ -2265,7 +2265,7 @@ class XendDomainInfo:
|
||||
@@ -2273,7 +2273,7 @@ class XendDomainInfo:
|
||||
vtd_mem = ((vtd_mem + 1023) / 1024) * 1024
|
||||
|
||||
# Make sure there's enough RAM available for the domain
|
||||
|
@ -5,7 +5,7 @@ Index: xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
===================================================================
|
||||
--- xen-3.3.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||
+++ xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
@@ -2610,7 +2610,7 @@ class XendDomainInfo:
|
||||
@@ -2618,7 +2618,7 @@ class XendDomainInfo:
|
||||
(fn, BOOTLOADER_LOOPBACK_DEVICE))
|
||||
|
||||
vbd = {
|
||||
|
@ -146,6 +146,10 @@ class Wholedisk:
|
||||
self.ldev = None
|
||||
break
|
||||
else:
|
||||
# Mappings may not have been deleted due to race
|
||||
# between udev and dm - see bnc#379032. Causes
|
||||
# loop devices to leak. Call kpartx -d again
|
||||
os.system("kpartx %s -d '%s'" % (kpartx_args, self.physdev()))
|
||||
time.sleep(0.1)
|
||||
retries -= 1
|
||||
|
||||
|
@ -2,7 +2,7 @@ Index: xen-3.3.1-testing/tools/python/xen/lowlevel/xc/xc.c
|
||||
===================================================================
|
||||
--- xen-3.3.1-testing.orig/tools/python/xen/lowlevel/xc/xc.c
|
||||
+++ xen-3.3.1-testing/tools/python/xen/lowlevel/xc/xc.c
|
||||
@@ -887,14 +887,14 @@ static PyObject *pyxc_hvm_build(XcObject
|
||||
@@ -890,14 +890,14 @@ static PyObject *pyxc_hvm_build(XcObject
|
||||
int i;
|
||||
#endif
|
||||
char *image;
|
||||
@ -21,7 +21,7 @@ Index: xen-3.3.1-testing/tools/python/xen/lowlevel/xc/xc.c
|
||||
return NULL;
|
||||
|
||||
if ( xc_hvm_build(self->xc_handle, dom, memsize, image) != 0 )
|
||||
@@ -919,6 +919,7 @@ static PyObject *pyxc_hvm_build(XcObject
|
||||
@@ -922,6 +922,7 @@ static PyObject *pyxc_hvm_build(XcObject
|
||||
va_hvm->checksum = -sum;
|
||||
munmap(va_map, XC_PAGE_SIZE);
|
||||
#endif
|
||||
|
@ -2,7 +2,7 @@
|
||||
Index: xen-3.3.1-testing/xen/include/asm-x86/hvm/hvm_extensions.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ xen-3.3.1-testing/xen/include/asm-x86/hvm/hvm_extensions.h 2008-11-21 10:02:05.000000000 -0700
|
||||
+++ xen-3.3.1-testing/xen/include/asm-x86/hvm/hvm_extensions.h 2008-12-08 13:58:31.000000000 -0700
|
||||
@@ -0,0 +1,165 @@
|
||||
+/****************************************************************************
|
||||
+ |
|
||||
@ -172,14 +172,14 @@ Index: xen-3.3.1-testing/xen/include/asm-x86/hvm/hvm_extensions.h
|
||||
Index: xen-3.3.1-testing/xen/arch/x86/hvm/hyperv/Makefile
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ xen-3.3.1-testing/xen/arch/x86/hvm/hyperv/Makefile 2008-11-21 10:02:05.000000000 -0700
|
||||
+++ xen-3.3.1-testing/xen/arch/x86/hvm/hyperv/Makefile 2008-12-08 13:58:31.000000000 -0700
|
||||
@@ -0,0 +1,2 @@
|
||||
+obj-y += hv_intercept.o
|
||||
+obj-y += hv_hypercall.o
|
||||
Index: xen-3.3.1-testing/xen/arch/x86/hvm/hyperv/hv_errno.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ xen-3.3.1-testing/xen/arch/x86/hvm/hyperv/hv_errno.h 2008-11-21 10:02:05.000000000 -0700
|
||||
+++ xen-3.3.1-testing/xen/arch/x86/hvm/hyperv/hv_errno.h 2008-12-08 13:58:31.000000000 -0700
|
||||
@@ -0,0 +1,62 @@
|
||||
+/****************************************************************************
|
||||
+ |
|
||||
@ -246,8 +246,8 @@ Index: xen-3.3.1-testing/xen/arch/x86/hvm/hyperv/hv_errno.h
|
||||
Index: xen-3.3.1-testing/xen/arch/x86/hvm/hyperv/hv_hypercall.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ xen-3.3.1-testing/xen/arch/x86/hvm/hyperv/hv_hypercall.c 2008-11-21 10:04:22.000000000 -0700
|
||||
@@ -0,0 +1,135 @@
|
||||
+++ xen-3.3.1-testing/xen/arch/x86/hvm/hyperv/hv_hypercall.c 2008-12-11 18:17:25.000000000 -0700
|
||||
@@ -0,0 +1,153 @@
|
||||
+/****************************************************************************
|
||||
+ |
|
||||
+ | Copyright (c) [2007, 2008] Novell, Inc.
|
||||
@ -311,8 +311,10 @@ Index: xen-3.3.1-testing/xen/arch/x86/hvm/hyperv/hv_hypercall.c
|
||||
+}
|
||||
+
|
||||
+static int
|
||||
+hv_switch_va(hv_vcpu_t *vcpup, paddr_t input)
|
||||
+hv_switch_va(hv_vcpu_t *vcpup, int fast, paddr_t input)
|
||||
+{
|
||||
+ paddr_t new_cr3;
|
||||
+ int ret_val = HV_STATUS_SUCCESS;
|
||||
+
|
||||
+ /*
|
||||
+ * XXXKYS: the spec sys the asID is passed via memory at offset 0 of
|
||||
@ -320,12 +322,26 @@ Index: xen-3.3.1-testing/xen/arch/x86/hvm/hyperv/hv_hypercall.c
|
||||
+ * the current build of longhorn (longhorn-2007-02-06-x86_64-fv-02)
|
||||
+ * passes the asID in the input register instead. Need to check if
|
||||
+ * future builds do this.
|
||||
+ * The fast bit defines how the parameter is passed.
|
||||
+ */
|
||||
+ hvm_set_cr3(input);
|
||||
+ if (fast)
|
||||
+ {
|
||||
+ hvm_set_cr3(input);
|
||||
+ } else
|
||||
+ {
|
||||
+ /*
|
||||
+ * Slow path; copy the new value.
|
||||
+ */
|
||||
+ if (!hvm_copy_from_guest_phys(&new_cr3, input, sizeof(paddr_t)))
|
||||
+ hvm_set_cr3(new_cr3);
|
||||
+ else
|
||||
+ ret_val = HV_STATUS_INVALID_PARAMETER;
|
||||
+ }
|
||||
+
|
||||
+#ifdef HV_STATS
|
||||
+ vcpup->stats.num_switches++;
|
||||
+#endif
|
||||
+ return (HV_STATUS_SUCCESS);
|
||||
+ return (ret_val);
|
||||
+}
|
||||
+
|
||||
+void
|
||||
@ -333,6 +349,7 @@ Index: xen-3.3.1-testing/xen/arch/x86/hvm/hyperv/hv_hypercall.c
|
||||
+ u64 *ret_val)
|
||||
+{
|
||||
+ unsigned short verb;
|
||||
+ int fast;
|
||||
+ unsigned short rep_count;
|
||||
+ unsigned short start_index;
|
||||
+ hv_partition_t *curp = hv_get_current_partition();
|
||||
@ -340,6 +357,7 @@ Index: xen-3.3.1-testing/xen/arch/x86/hvm/hyperv/hv_hypercall.c
|
||||
+ u64 partition_id;
|
||||
+
|
||||
+
|
||||
+ fast = (int)((opcode >>16) & 0x1);
|
||||
+ verb = (short)(opcode & 0xffff);
|
||||
+ rep_count = (short)((opcode >>32) & 0xfff);
|
||||
+ start_index = (short)((opcode >> 48) & 0xfff);
|
||||
@ -365,7 +383,7 @@ Index: xen-3.3.1-testing/xen/arch/x86/hvm/hyperv/hv_hypercall.c
|
||||
+ *ret_val = hv_build_hcall_retval(HV_STATUS_SUCCESS, 0);
|
||||
+ return;
|
||||
+ case HV_SWITCH_VA:
|
||||
+ *ret_val = hv_build_hcall_retval(hv_switch_va(vcpup, input), 0);
|
||||
+ *ret_val = hv_build_hcall_retval(hv_switch_va(vcpup, fast, input), 0);
|
||||
+ return;
|
||||
+
|
||||
+ case HV_NOTIFY_LONG_SPIN_WAIT:
|
||||
@ -386,7 +404,7 @@ Index: xen-3.3.1-testing/xen/arch/x86/hvm/hyperv/hv_hypercall.c
|
||||
Index: xen-3.3.1-testing/xen/arch/x86/hvm/hyperv/hv_hypercall.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ xen-3.3.1-testing/xen/arch/x86/hvm/hyperv/hv_hypercall.h 2008-11-21 10:02:05.000000000 -0700
|
||||
+++ xen-3.3.1-testing/xen/arch/x86/hvm/hyperv/hv_hypercall.h 2008-12-08 13:58:31.000000000 -0700
|
||||
@@ -0,0 +1,46 @@
|
||||
+/****************************************************************************
|
||||
+ |
|
||||
@ -437,8 +455,8 @@ Index: xen-3.3.1-testing/xen/arch/x86/hvm/hyperv/hv_hypercall.h
|
||||
Index: xen-3.3.1-testing/xen/arch/x86/hvm/hyperv/hv_intercept.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ xen-3.3.1-testing/xen/arch/x86/hvm/hyperv/hv_intercept.c 2008-11-21 10:06:15.000000000 -0700
|
||||
@@ -0,0 +1,990 @@
|
||||
+++ xen-3.3.1-testing/xen/arch/x86/hvm/hyperv/hv_intercept.c 2008-12-09 12:42:50.000000000 -0700
|
||||
@@ -0,0 +1,1002 @@
|
||||
+/****************************************************************************
|
||||
+ |
|
||||
+ | Copyright (c) [2007, 2008] Novell, Inc.
|
||||
@ -1296,6 +1314,13 @@ Index: xen-3.3.1-testing/xen/arch/x86/hvm/hyperv/hv_intercept.c
|
||||
+ regs->eax = 0;
|
||||
+ regs->edx = 0;
|
||||
+ break;
|
||||
+ case HV_MSR_APIC_ASSIST_PAGE:
|
||||
+ /*
|
||||
+ * For now ignore this.
|
||||
+ */
|
||||
+ regs->eax = 0;
|
||||
+ regs->edx = 0;
|
||||
+ break;
|
||||
+ default:
|
||||
+ /*
|
||||
+ * We did not handle the MSR address specified;
|
||||
@ -1408,11 +1433,16 @@ Index: xen-3.3.1-testing/xen/arch/x86/hvm/hyperv/hv_intercept.c
|
||||
+ case HV_MSR_SYSTEM_RESET:
|
||||
+ /*
|
||||
+ * Shutdown the domain/partition.
|
||||
+ */
|
||||
+ */
|
||||
+ if (msr_content & 0x1) {
|
||||
+ domain_shutdown(d, SHUTDOWN_reboot);
|
||||
+ }
|
||||
+ break;
|
||||
+ case HV_MSR_APIC_ASSIST_PAGE:
|
||||
+ /*
|
||||
+ * For now ignore this.
|
||||
+ */
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ /*
|
||||
@ -1432,8 +1462,8 @@ Index: xen-3.3.1-testing/xen/arch/x86/hvm/hyperv/hv_intercept.c
|
||||
Index: xen-3.3.1-testing/xen/arch/x86/hvm/hyperv/hv_shim.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ xen-3.3.1-testing/xen/arch/x86/hvm/hyperv/hv_shim.h 2008-11-21 10:02:05.000000000 -0700
|
||||
@@ -0,0 +1,284 @@
|
||||
+++ xen-3.3.1-testing/xen/arch/x86/hvm/hyperv/hv_shim.h 2008-12-09 14:50:19.000000000 -0700
|
||||
@@ -0,0 +1,285 @@
|
||||
+/****************************************************************************
|
||||
+ |
|
||||
+ | Copyright (c) [2007, 2008] Novell, Inc.
|
||||
@ -1487,6 +1517,7 @@ Index: xen-3.3.1-testing/xen/arch/x86/hvm/hyperv/hv_shim.h
|
||||
+#define HV_MSR_EOI 0x40000070
|
||||
+#define HV_MSR_ICR 0x40000071
|
||||
+#define HV_MSR_TPR 0x40000072
|
||||
+#define HV_MSR_APIC_ASSIST_PAGE 0x40000073
|
||||
+
|
||||
+#define HV_MSR_SCONTROL 0x40000080
|
||||
+#define HV_MSR_SVERSION 0x40000081
|
||||
|
@ -94,7 +94,7 @@ Index: xen-3.3.1-testing/tools/ioemu-remote/vl.c
|
||||
===================================================================
|
||||
--- xen-3.3.1-testing.orig/tools/ioemu-remote/vl.c
|
||||
+++ xen-3.3.1-testing/tools/ioemu-remote/vl.c
|
||||
@@ -5414,6 +5414,9 @@ static int drive_init(struct drive_opt *
|
||||
@@ -5416,6 +5416,9 @@ static int drive_init(struct drive_opt *
|
||||
case IF_PFLASH:
|
||||
case IF_MTD:
|
||||
break;
|
||||
|
@ -1,5 +1,7 @@
|
||||
--- a/xen/arch/x86/io_apic.c
|
||||
+++ b/xen/arch/x86/io_apic.c
|
||||
Index: xen-3.3.1-testing/xen/arch/x86/io_apic.c
|
||||
===================================================================
|
||||
--- xen-3.3.1-testing.orig/xen/arch/x86/io_apic.c
|
||||
+++ xen-3.3.1-testing/xen/arch/x86/io_apic.c
|
||||
@@ -45,7 +45,7 @@
|
||||
int (*ioapic_renumber_irq)(int ioapic, int irq);
|
||||
atomic_t irq_mis_count;
|
||||
|
@ -1,14 +1,3 @@
|
||||
--- a/unmodified_drivers/linux-2.6/balloon/Kbuild
|
||||
+++ b/unmodified_drivers/linux-2.6/balloon/Kbuild
|
||||
@@ -4,6 +4,5 @@ obj-m = xen-balloon.o
|
||||
|
||||
EXTRA_CFLAGS += -I$(M)/platform-pci
|
||||
|
||||
-xen-balloon-objs =
|
||||
-xen-balloon-objs += balloon.o
|
||||
-xen-balloon-objs += sysfs.o
|
||||
+xen-balloon-y := balloon.o sysfs.o
|
||||
+xen-balloon-$(CONFIG_XEN_SCRUB_PAGES) += scrub.o
|
||||
--- a/unmodified_drivers/linux-2.6/blkfront/Kbuild
|
||||
+++ b/unmodified_drivers/linux-2.6/blkfront/Kbuild
|
||||
@@ -3,3 +3,4 @@ include $(M)/overrides.mk
|
||||
@ -16,41 +5,3 @@
|
||||
|
||||
xen-vbd-objs := blkfront.o vbd.o
|
||||
+xen-vbd-objs += $(patsubst %.c,%.o,$(notdir $(wildcard $(src)/vcd.c)))
|
||||
--- a/unmodified_drivers/linux-2.6/mkbuildtree
|
||||
+++ b/unmodified_drivers/linux-2.6/mkbuildtree
|
||||
@@ -53,6 +53,7 @@ i[34567]86|x86_64)
|
||||
ln -sf ${XL}/include/asm-x86/mach-xen/asm/synch_bitops*.h include/asm
|
||||
ln -sf ${XL}/include/asm-x86/mach-xen/asm/maddr*.h include/asm
|
||||
ln -sf ${XL}/include/asm-x86/mach-xen/asm/gnttab_dma.h include/asm
|
||||
+ ln -sf ${XL}/arch/x86/lib/scrub.c balloon
|
||||
else
|
||||
if [ $uname = x86_64 ]; then
|
||||
mkdir -p include/asm-i386
|
||||
--- a/unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c
|
||||
+++ b/unmodified_drivers/linux-2.6/platform-pci/machine_reboot.c
|
||||
@@ -34,7 +34,11 @@ static void ap_suspend(void *_info)
|
||||
atomic_dec(&info->nr_spinning);
|
||||
}
|
||||
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
|
||||
#define initiate_ap_suspend(i) smp_call_function(ap_suspend, i, 0, 0)
|
||||
+#else
|
||||
+#define initiate_ap_suspend(i) smp_call_function(ap_suspend, i, 0)
|
||||
+#endif
|
||||
|
||||
#else /* !defined(CONFIG_SMP) */
|
||||
|
||||
--- a/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c
|
||||
+++ b/unmodified_drivers/linux-2.6/platform-pci/platform-compat.c
|
||||
@@ -14,7 +14,11 @@ EXPORT_SYMBOL(system_state);
|
||||
|
||||
void ctrl_alt_del(void)
|
||||
{
|
||||
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
|
||||
kill_proc(1, SIGINT, 1); /* interrupt init */
|
||||
+#else
|
||||
+ kill_cad_pid(SIGINT, 1);
|
||||
+#endif
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,8)
|
||||
|
39
reenable-block-protocols.patch
Normal file
39
reenable-block-protocols.patch
Normal file
@ -0,0 +1,39 @@
|
||||
Index: xen-3.3.1-testing/tools/python/xen/xend/server/blkif.py
|
||||
===================================================================
|
||||
--- xen-3.3.1-testing.orig/tools/python/xen/xend/server/blkif.py
|
||||
+++ xen-3.3.1-testing/tools/python/xen/xend/server/blkif.py
|
||||
@@ -18,6 +18,7 @@
|
||||
|
||||
import re
|
||||
import string
|
||||
+import os
|
||||
|
||||
from xen.util import blkif
|
||||
import xen.util.xsm.xsm as security
|
||||
@@ -35,6 +36,13 @@ class BlkifController(DevController):
|
||||
"""
|
||||
DevController.__init__(self, vm)
|
||||
|
||||
+ def _isValidProtocol(self, protocol):
|
||||
+ if protocol in ('phy', 'file', 'tap'):
|
||||
+ return True
|
||||
+
|
||||
+ return os.access('/etc/xen/scripts/block-%s' % protocol, os.X_OK)
|
||||
+
|
||||
+
|
||||
def getDeviceDetails(self, config):
|
||||
"""@see DevController.getDeviceDetails"""
|
||||
uname = config.get('uname', '')
|
||||
@@ -56,10 +64,8 @@ class BlkifController(DevController):
|
||||
else:
|
||||
try:
|
||||
(typ, params) = string.split(uname, ':', 1)
|
||||
- if typ not in ('phy', 'file', 'tap'):
|
||||
- raise VmError(
|
||||
- 'Block device must have "phy", "file" or "tap" '
|
||||
- 'specified to type')
|
||||
+ if not self._isValidProtocol(typ):
|
||||
+ raise VmError('Block device type "%s" is invalid.' % typ)
|
||||
except ValueError:
|
||||
raise VmError(
|
||||
'Block device must have physical details specified')
|
@ -30,7 +30,7 @@ Index: xen-3.3.1-testing/tools/python/xen/xend/server/blkif.py
|
||||
===================================================================
|
||||
--- xen-3.3.1-testing.orig/tools/python/xen/xend/server/blkif.py
|
||||
+++ xen-3.3.1-testing/tools/python/xen/xend/server/blkif.py
|
||||
@@ -78,6 +78,9 @@ class BlkifController(DevController):
|
||||
@@ -84,6 +84,9 @@ class BlkifController(DevController):
|
||||
if uuid:
|
||||
back['uuid'] = uuid
|
||||
|
||||
|
63
vtd-error-handling.patch
Normal file
63
vtd-error-handling.patch
Normal file
@ -0,0 +1,63 @@
|
||||
--- a/xen/drivers/passthrough/io.c
|
||||
+++ b/xen/drivers/passthrough/io.c
|
||||
@@ -57,7 +57,7 @@ int pt_irq_create_bind_vtd(
|
||||
uint32_t machine_gsi, guest_gsi;
|
||||
uint32_t device, intx, link;
|
||||
struct dev_intx_gsi_link *digl;
|
||||
- int pirq = pt_irq_bind->machine_irq;
|
||||
+ int rc, pirq = pt_irq_bind->machine_irq;
|
||||
|
||||
if ( pirq < 0 || pirq >= NR_PIRQS )
|
||||
return -EINVAL;
|
||||
@@ -95,7 +95,17 @@ int pt_irq_create_bind_vtd(
|
||||
hvm_irq_dpci->mirq[pirq].gmsi.gflags = pt_irq_bind->u.msi.gflags;
|
||||
hvm_irq_dpci->msi_gvec_pirq[pt_irq_bind->u.msi.gvec] = pirq;
|
||||
/* bind after hvm_irq_dpci is setup to avoid race with irq handler*/
|
||||
- pirq_guest_bind(d->vcpu[0], pirq, 0);
|
||||
+ rc = pirq_guest_bind(d->vcpu[0], pirq, 0);
|
||||
+ if ( unlikely(rc) )
|
||||
+ {
|
||||
+ hvm_irq_dpci->msi_gvec_pirq[pt_irq_bind->u.msi.gvec] = 0;
|
||||
+ hvm_irq_dpci->mirq[pirq].gmsi.gflags = 0;
|
||||
+ hvm_irq_dpci->mirq[pirq].gmsi.gvec = 0;
|
||||
+ clear_bit(_HVM_IRQ_DPCI_MSI, &hvm_irq_dpci->mirq[pirq].flags);
|
||||
+ clear_bit(pirq, hvm_irq_dpci->mapping);
|
||||
+ spin_unlock(&d->event_lock);
|
||||
+ return rc;
|
||||
+ }
|
||||
}
|
||||
else if (hvm_irq_dpci->mirq[pirq].gmsi.gvec != pt_irq_bind->u.msi.gvec
|
||||
||hvm_irq_dpci->msi_gvec_pirq[pt_irq_bind->u.msi.gvec] != pirq)
|
||||
@@ -136,13 +146,30 @@ int pt_irq_create_bind_vtd(
|
||||
/* Bind the same mirq once in the same domain */
|
||||
if ( !test_and_set_bit(machine_gsi, hvm_irq_dpci->mapping))
|
||||
{
|
||||
+ unsigned int vector = domain_irq_to_vector(d, machine_gsi);
|
||||
+
|
||||
hvm_irq_dpci->mirq[machine_gsi].dom = d;
|
||||
|
||||
/* Init timer before binding */
|
||||
- init_timer(&hvm_irq_dpci->hvm_timer[domain_irq_to_vector(d, machine_gsi)],
|
||||
+ init_timer(&hvm_irq_dpci->hvm_timer[vector],
|
||||
pt_irq_time_out, &hvm_irq_dpci->mirq[machine_gsi], 0);
|
||||
/* Deal with gsi for legacy devices */
|
||||
- pirq_guest_bind(d->vcpu[0], machine_gsi, BIND_PIRQ__WILL_SHARE);
|
||||
+ rc = pirq_guest_bind(d->vcpu[0], machine_gsi, BIND_PIRQ__WILL_SHARE);
|
||||
+ if ( unlikely(rc) )
|
||||
+ {
|
||||
+ kill_timer(&hvm_irq_dpci->hvm_timer[vector]);
|
||||
+ hvm_irq_dpci->mirq[machine_gsi].dom = NULL;
|
||||
+ clear_bit(machine_gsi, hvm_irq_dpci->mapping);
|
||||
+ hvm_irq_dpci->girq[guest_gsi].machine_gsi = 0;
|
||||
+ hvm_irq_dpci->girq[guest_gsi].intx = 0;
|
||||
+ hvm_irq_dpci->girq[guest_gsi].device = 0;
|
||||
+ hvm_irq_dpci->girq[guest_gsi].valid = 0;
|
||||
+ list_del(&digl->list);
|
||||
+ hvm_irq_dpci->link_cnt[link]--;
|
||||
+ spin_unlock(&d->event_lock);
|
||||
+ xfree(digl);
|
||||
+ return rc;
|
||||
+ }
|
||||
}
|
||||
|
||||
gdprintk(XENLOG_INFO VTDPREFIX,
|
@ -11,7 +11,7 @@ Index: xen-3.3.1-testing/xen/arch/x86/acpi/cpufreq/cpufreq.c
|
||||
struct cpufreq_policy xen_px_policy[NR_CPUS];
|
||||
|
||||
static cpumask_t *cpufreq_dom_pt;
|
||||
@@ -436,7 +436,7 @@ acpi_cpufreq_cpu_init(struct cpufreq_pol
|
||||
@@ -430,7 +430,7 @@ acpi_cpufreq_cpu_init(struct cpufreq_pol
|
||||
|
||||
drv_data[cpu] = data;
|
||||
|
||||
@ -20,7 +20,7 @@ Index: xen-3.3.1-testing/xen/arch/x86/acpi/cpufreq/cpufreq.c
|
||||
|
||||
perf = data->acpi_data;
|
||||
policy->shared_type = perf->shared_type;
|
||||
@@ -575,8 +575,8 @@ int cpufreq_dom_init(void)
|
||||
@@ -569,8 +569,8 @@ int cpufreq_dom_init(void)
|
||||
cpufreq_dom_max = 0;
|
||||
|
||||
for_each_online_cpu(i) {
|
||||
@ -31,7 +31,7 @@ Index: xen-3.3.1-testing/xen/arch/x86/acpi/cpufreq/cpufreq.c
|
||||
}
|
||||
cpufreq_dom_max++;
|
||||
|
||||
@@ -592,13 +592,13 @@ int cpufreq_dom_init(void)
|
||||
@@ -586,13 +586,13 @@ int cpufreq_dom_init(void)
|
||||
memset(cpufreq_dom_pt, 0, cpufreq_dom_max * sizeof(cpumask_t));
|
||||
|
||||
for_each_online_cpu(i) {
|
||||
@ -277,7 +277,7 @@ Index: xen-3.3.1-testing/xen/arch/x86/acpi/cpu_idle.c
|
||||
if ( !cx )
|
||||
{
|
||||
if ( pm_idle_save )
|
||||
@@ -949,7 +950,15 @@ long set_cx_pminfo(uint32_t cpu, struct
|
||||
@@ -947,7 +948,15 @@ long set_cx_pminfo(uint32_t cpu, struct
|
||||
return -EFAULT;
|
||||
}
|
||||
|
||||
@ -294,7 +294,7 @@ Index: xen-3.3.1-testing/xen/arch/x86/acpi/cpu_idle.c
|
||||
|
||||
init_cx_pminfo(acpi_power);
|
||||
|
||||
@@ -985,18 +994,25 @@ long set_cx_pminfo(uint32_t cpu, struct
|
||||
@@ -983,18 +992,25 @@ long set_cx_pminfo(uint32_t cpu, struct
|
||||
|
||||
uint32_t pmstat_get_cx_nr(uint32_t cpuid)
|
||||
{
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:b9e84016ef0445bc87420696ade8fcdc52d474eb61b8b2a9aadb4ee0f31c1980
|
||||
size 22694606
|
||||
oid sha256:97656ffb4d7ee1fea386c749238ddf9262688639758e3f7a6b3cf16b2f6e9a73
|
||||
size 22695855
|
||||
|
@ -2,7 +2,7 @@ Index: xen-3.3.1-testing/Config.mk
|
||||
===================================================================
|
||||
--- xen-3.3.1-testing.orig/Config.mk
|
||||
+++ xen-3.3.1-testing/Config.mk
|
||||
@@ -84,20 +84,20 @@ QEMU_REMOTE=http://xenbits.xensource.com
|
||||
@@ -85,20 +85,20 @@ QEMU_REMOTE=http://xenbits.xensource.com
|
||||
|
||||
# Specify which qemu-dm to use. This may be `ioemu' to use the old
|
||||
# Mercurial in-tree version, or a local directory, or a git URL.
|
||||
|
@ -159,7 +159,7 @@ Index: xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
def _waitForDevice_destroy(self, deviceClass, devid, backpath):
|
||||
return self.getDeviceController(deviceClass).waitForDevice_destroy(
|
||||
devid, backpath)
|
||||
@@ -2561,8 +2565,11 @@ class XendDomainInfo:
|
||||
@@ -2569,8 +2573,11 @@ class XendDomainInfo:
|
||||
blexec = osdep.pygrub_path
|
||||
|
||||
blcfg = None
|
||||
@ -173,7 +173,7 @@ Index: xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
|
||||
if not disks:
|
||||
msg = "Had a bootloader specified, but no disks are bootable"
|
||||
@@ -2573,13 +2580,10 @@ class XendDomainInfo:
|
||||
@@ -2581,13 +2588,10 @@ class XendDomainInfo:
|
||||
devtype = devinfo[0]
|
||||
disk = devinfo[1]['uname']
|
||||
|
||||
@ -190,7 +190,7 @@ Index: xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
|
||||
log.info("Mounting %s on %s." %
|
||||
(fn, BOOTLOADER_LOOPBACK_DEVICE))
|
||||
@@ -2591,7 +2595,9 @@ class XendDomainInfo:
|
||||
@@ -2599,7 +2603,9 @@ class XendDomainInfo:
|
||||
|
||||
from xen.xend import XendDomain
|
||||
dom0 = XendDomain.instance().privilegedDomain()
|
||||
@ -201,7 +201,7 @@ Index: xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
fn = BOOTLOADER_LOOPBACK_DEVICE
|
||||
|
||||
try:
|
||||
@@ -2602,7 +2608,7 @@ class XendDomainInfo:
|
||||
@@ -2610,7 +2616,7 @@ class XendDomainInfo:
|
||||
log.info("Unmounting %s from %s." %
|
||||
(fn, BOOTLOADER_LOOPBACK_DEVICE))
|
||||
|
||||
|
@ -14,7 +14,7 @@ Index: xen-3.3.1-testing/xen/arch/x86/io_apic.c
|
||||
static void setup_ioapic_ack(char *s)
|
||||
{
|
||||
if ( !strcmp(s, "old") )
|
||||
@@ -1846,6 +1846,8 @@ void __init setup_IO_APIC(void)
|
||||
@@ -1844,6 +1844,8 @@ void __init setup_IO_APIC(void)
|
||||
else
|
||||
io_apic_irqs = ~PIC_IRQS;
|
||||
|
||||
|
@ -241,7 +241,7 @@ Index: xen-3.3.1-testing/tools/ioemu-remote/vl.c
|
||||
qemu_set_fd_handler(s->fd, tap_send, NULL, s);
|
||||
snprintf(s->vc->info_str, sizeof(s->vc->info_str), "tap: fd=%d", fd);
|
||||
return s;
|
||||
@@ -5672,20 +5719,6 @@ static void dumb_display_init(DisplaySta
|
||||
@@ -5674,20 +5721,6 @@ static void dumb_display_init(DisplaySta
|
||||
|
||||
#define MAX_IO_HANDLERS 64
|
||||
|
||||
|
31
xen.changes
31
xen.changes
@ -1,3 +1,34 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 22 14:18:15 MST 2008 - carnold@novell.com
|
||||
|
||||
- bnc#461596 - Failue to load 64-bit HVM Solaris 10U6 DomU with 2
|
||||
vcpus. Update to RC4 contains fix in c/s 18538.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 22 11:27:38 MST 2008 - jfehlig@novell.com
|
||||
|
||||
- bnc#379032 and bnc#404014 - Fix loop device leak in domUloader
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 17 16:32:12 CET 2008 - kwolf@suse.de
|
||||
|
||||
- bnc#456758 - Allow all block device types for which a script
|
||||
exists in /etc/xen/scripts besides file, tap and phy.
|
||||
reenable-block-protocols.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 15 10:30:25 MST 2008 - carnold@novell.com
|
||||
|
||||
- Patch cleanup. Updated tarball with several of our stand-alone
|
||||
but now upstream patches (c/s 18536).
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 5 15:47:31 CET 2008 - kwolf@suse.de
|
||||
|
||||
- bnc#404014 - Fix memory leak in libxenguest during domain
|
||||
creation
|
||||
libxc-zlib-memleak.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 4 11:45:55 MST 2008 - jfehlig@novell.com
|
||||
|
||||
|
44
xen.spec
44
xen.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package xen (Version 3.3.1_18511_02)
|
||||
# spec file for package xen (Version 3.3.1_18544_01)
|
||||
#
|
||||
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -22,7 +22,7 @@ Name: xen
|
||||
ExclusiveArch: %ix86 x86_64
|
||||
%define xvers 3.3
|
||||
%define xvermaj 3
|
||||
%define changeset 18511
|
||||
%define changeset 18544
|
||||
%define xen_build_dir xen-3.3.1-testing
|
||||
%define with_kmp 1
|
||||
BuildRequires: LibVNCServer-devel SDL-devel automake bin86 curl-devel dev86 graphviz latex2html libjpeg-devel libxml2-devel ncurses-devel openssl openssl-devel pciutils-devel python-devel transfig
|
||||
@ -37,7 +37,7 @@ BuildRequires: glibc-32bit glibc-devel-32bit
|
||||
%if %{?with_kmp}0
|
||||
BuildRequires: kernel-source kernel-syms module-init-tools xorg-x11
|
||||
%endif
|
||||
Version: 3.3.1_18511_02
|
||||
Version: 3.3.1_18544_01
|
||||
Release: 1
|
||||
License: GPL v2 only
|
||||
Group: System/Kernel
|
||||
@ -118,6 +118,14 @@ Patch48: 18785-vlapic-lowest-prio.patch
|
||||
Patch49: 18788-vlapic-accel-dom-restore.patch
|
||||
Patch50: 18795-x86-ioapic-guest-write.patch
|
||||
Patch51: 18799-cpu-affinity.patch
|
||||
Patch52: 18805-pv-driver-build.patch
|
||||
Patch53: 18810-shadow-PAT.patch
|
||||
Patch54: 18844-shared-page-EOI.patch
|
||||
Patch55: 18852-shared-page-EOI-gmfn.patch
|
||||
Patch56: 18870-vtd-flush-per-device.patch
|
||||
Patch57: 18878-x86-cpufreq-less-verbose.patch
|
||||
Patch58: 18879-cpufreq-params.patch
|
||||
Patch59: 18880-x86-pirq-guest-bind-msg.patch
|
||||
# Our patches
|
||||
Patch100: xen-config.diff
|
||||
Patch101: xend-config.diff
|
||||
@ -169,6 +177,7 @@ Patch162: udev-rules.patch
|
||||
Patch163: ioemu-vnc-resize.patch
|
||||
# Needs to go upstream
|
||||
Patch164: checkpoint-rename.patch
|
||||
Patch165: reenable-block-protocols.patch
|
||||
# Patches for snapshot support
|
||||
Patch170: qemu-img-snapshot.patch
|
||||
Patch171: ioemu-blktap-fix-open.patch
|
||||
@ -200,6 +209,7 @@ Patch352: pvdrv_emulation_control.patch
|
||||
Patch353: blktap-pv-cdrom.patch
|
||||
Patch354: x86-cpufreq-report.patch
|
||||
Patch355: dom-print.patch
|
||||
Patch356: vtd-error-handling.patch
|
||||
# novell_shim patches
|
||||
Patch400: hv_tools.patch
|
||||
Patch401: hv_xen_base.patch
|
||||
@ -588,6 +598,14 @@ Authors:
|
||||
%patch49 -p1
|
||||
%patch50 -p1
|
||||
%patch51 -p1
|
||||
%patch52 -p1
|
||||
%patch53 -p1
|
||||
%patch54 -p1
|
||||
%patch55 -p1
|
||||
%patch56 -p1
|
||||
%patch57 -p1
|
||||
%patch58 -p1
|
||||
%patch59 -p1
|
||||
%patch100 -p1
|
||||
%patch101 -p1
|
||||
%patch102 -p1
|
||||
@ -636,6 +654,7 @@ Authors:
|
||||
%patch162 -p1
|
||||
%patch163 -p1
|
||||
%patch164 -p1
|
||||
%patch165 -p1
|
||||
%patch170 -p1
|
||||
%patch171 -p1
|
||||
%patch172 -p1
|
||||
@ -663,6 +682,7 @@ Authors:
|
||||
%patch353 -p1
|
||||
%patch354 -p1
|
||||
%patch355 -p1
|
||||
%patch356 -p1
|
||||
# Don't use shim for now
|
||||
%ifarch x86_64
|
||||
%patch400 -p1
|
||||
@ -1013,6 +1033,22 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/xen/bin/qemu-dm.debug
|
||||
/sbin/ldconfig
|
||||
|
||||
%changelog
|
||||
* Mon Dec 22 2008 carnold@novell.com
|
||||
- bnc#461596 - Failue to load 64-bit HVM Solaris 10U6 DomU with 2
|
||||
vcpus. Update to RC4 contains fix in c/s 18538.
|
||||
* Mon Dec 22 2008 jfehlig@novell.com
|
||||
- bnc#379032 and bnc#404014 - Fix loop device leak in domUloader
|
||||
* Wed Dec 17 2008 kwolf@suse.de
|
||||
- bnc#456758 - Allow all block device types for which a script
|
||||
exists in /etc/xen/scripts besides file, tap and phy.
|
||||
reenable-block-protocols.patch
|
||||
* Mon Dec 15 2008 carnold@novell.com
|
||||
- Patch cleanup. Updated tarball with several of our stand-alone
|
||||
but now upstream patches (c/s 18536).
|
||||
* Fri Dec 05 2008 kwolf@suse.de
|
||||
- bnc#404014 - Fix memory leak in libxenguest during domain
|
||||
creation
|
||||
libxc-zlib-memleak.patch
|
||||
* Thu Dec 04 2008 jfehlig@novell.com
|
||||
- bnc#456511 - Fix domain name change after checkpoint/shutdown
|
||||
events.
|
||||
|
@ -2,7 +2,7 @@ Index: xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
===================================================================
|
||||
--- xen-3.3.1-testing.orig/tools/python/xen/xend/XendDomainInfo.py
|
||||
+++ xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
@@ -3239,6 +3239,14 @@ class XendDomainInfo:
|
||||
@@ -3247,6 +3247,14 @@ class XendDomainInfo:
|
||||
if not config.has_key('backend'):
|
||||
config['backend'] = "00000000-0000-0000-0000-000000000000"
|
||||
|
||||
|
@ -172,7 +172,7 @@ Index: xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
self._constructDomain()
|
||||
|
||||
try:
|
||||
@@ -2331,6 +2335,11 @@ class XendDomainInfo:
|
||||
@@ -2339,6 +2343,11 @@ class XendDomainInfo:
|
||||
|
||||
self._stateSet(DOM_STATE_HALTED)
|
||||
self.domid = None # Do not push into _stateSet()!
|
||||
@ -184,7 +184,7 @@ Index: xen-3.3.1-testing/tools/python/xen/xend/XendDomainInfo.py
|
||||
finally:
|
||||
self.refresh_shutdown_lock.release()
|
||||
|
||||
@@ -3552,6 +3561,74 @@ class XendDomainInfo:
|
||||
@@ -3560,6 +3569,74 @@ class XendDomainInfo:
|
||||
def has_device(self, dev_class, dev_uuid):
|
||||
return (dev_uuid in self.info['%s_refs' % dev_class.lower()])
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user