SHA256
1
0
forked from pool/xen
OBS User unknown 2009-01-12 01:18:05 +00:00 committed by Git OBS Bridge
parent 0c6232eec3
commit b32658940a
15 changed files with 484 additions and 249 deletions

View File

@ -96,7 +96,7 @@ Signed-off-by: Jan Beulich <jbeulich@novell.com>
+ *end++ = '\0';
+ val = strchr(str, '=');
+ if ( val )
+ *val = '\0';
+ *val++ = '\0';
+
+ if ( !strcmp(str, "rate") && val )
+ {

95
18904-x86-local-irq.patch Normal file
View File

@ -0,0 +1,95 @@
# HG changeset patch
# User Keir Fraser <keir.fraser@citrix.com>
# Date 1228995360 0
# Node ID f4c1a347311bbdc7dbf3b1b213719929cf03ede3
# Parent 68555b9a7d98a6e91b55766e54d8e6d08589b3ac
x86: unify local_irq_XXX()
This also removes an inconsistency in that x86-64's __save_flags() had
a memory clobber, while x86_32's didn't.
It further adds type checking since blindly using {pop,push}{l,q} on a
memory operand of unknown size bares the risk of corrupting other
data.
Finally, it eliminates the redundant (with local_irq_restore())
__restore_flags() macro and renames __save_flags() to
local_save_flags(), making the naming consistent with Linux (again?).
Signed-off-by: Jan Beulich <jbeulich@novell.com>
--- a/xen/include/asm-x86/system.h
+++ b/xen/include/asm-x86/system.h
@@ -1,8 +1,7 @@
#ifndef __ASM_SYSTEM_H
#define __ASM_SYSTEM_H
-#include <xen/config.h>
-#include <xen/types.h>
+#include <xen/lib.h>
#include <asm/bitops.h>
#define read_segment_register(name) \
@@ -171,10 +170,27 @@ static always_inline unsigned long __cmp
/* used when interrupts are already enabled or to shutdown the processor */
#define halt() asm volatile ( "hlt" : : : "memory" )
+#define local_save_flags(x) \
+({ \
+ BUILD_BUG_ON(sizeof(x) != sizeof(long)); \
+ asm volatile ( "pushf" __OS " ; pop" __OS " %0" : "=g" (x)); \
+})
+#define local_irq_save(x) \
+({ \
+ local_save_flags(x); \
+ local_irq_disable(); \
+})
+#define local_irq_restore(x) \
+({ \
+ BUILD_BUG_ON(sizeof(x) != sizeof(long)); \
+ asm volatile ( "push" __OS " %0 ; popf" __OS \
+ : : "g" (x) : "memory", "cc" ); \
+})
+
static inline int local_irq_is_enabled(void)
{
unsigned long flags;
- __save_flags(flags);
+ local_save_flags(flags);
return !!(flags & (1<<9)); /* EFLAGS_IF */
}
--- a/xen/include/asm-x86/x86_32/system.h
+++ b/xen/include/asm-x86/x86_32/system.h
@@ -101,14 +101,4 @@ static inline void atomic_write64(uint64
#define mb() \
asm volatile ( "lock; addl $0,0(%%esp)" : : : "memory" )
-#define __save_flags(x) \
- asm volatile ( "pushfl ; popl %0" : "=g" (x) : )
-#define __restore_flags(x) \
- asm volatile ( "pushl %0 ; popfl" : : "g" (x) : "memory", "cc" )
-
-#define local_irq_save(x) \
- asm volatile ( "pushfl ; popl %0 ; cli" : "=g" (x) : : "memory" )
-#define local_irq_restore(x) \
- __restore_flags(x)
-
#endif /* __X86_32_SYSTEM_H__ */
--- a/xen/include/asm-x86/x86_64/system.h
+++ b/xen/include/asm-x86/x86_64/system.h
@@ -55,14 +55,4 @@ static inline void atomic_write64(uint64
#define mb() \
asm volatile ( "mfence" : : : "memory" )
-#define __save_flags(x) \
- asm volatile ( "pushfq ; popq %q0" : "=g" (x) : :"memory" )
-#define __restore_flags(x) \
- asm volatile ( "pushq %0 ; popfq" : : "g" (x) : "memory", "cc" )
-
-#define local_irq_save(x) \
- asm volatile ( "pushfq ; popq %0 ; cli" : "=g" (x) : : "memory" )
-#define local_irq_restore(x) \
- __restore_flags(x)
-
#endif /* __X86_64_SYSTEM_H__ */

View File

@ -0,0 +1,94 @@
# HG changeset patch
# User Keir Fraser <keir.fraser@citrix.com>
# Date 1228995610 0
# Node ID c15244125a693d2a1ae5e5745a649467394d8dac
# Parent f4c1a347311bbdc7dbf3b1b213719929cf03ede3
x86: fix the potential of encountering panic "IO-APIC + timer doesn't work! ..."
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Linux commit:
http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commitdiff;h=4aae07025265151e3f7041dfbf0f529e122de1d8
x86: fix "Kernel panic - not syncing: IO-APIC + timer doesn't work!"
Under rare circumstances we found we could have an IRQ0 entry while we
are in the middle of setting up the local APIC, the i8259A and the
PIT. That is certainly not how it's supposed to work! check_timer()
was supposed to be called with irqs turned off - but this eroded away
sometime in the past. This code would still work most of the time
because this code runs very quickly, but just the right timing
conditions are present and IRQ0 hits in this small, ~30 usecs window,
timer irqs stop and the system does not boot up. Also, given how early
this is during bootup, the hang is very deterministic - but it would
only occur on certain machines (and certain configs).
The fix was quite simple: disable/restore interrupts properly in this
function. With that in place the test-system now boots up just fine.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
--- a/xen/arch/x86/io_apic.c
+++ b/xen/arch/x86/io_apic.c
@@ -1259,14 +1259,16 @@ static void __init setup_ioapic_ids_from
static int __init timer_irq_works(void)
{
extern unsigned long pit0_ticks;
- unsigned long t1;
+ unsigned long t1, flags;
t1 = pit0_ticks;
mb();
+ local_save_flags(flags);
local_irq_enable();
/* Let ten ticks pass... */
mdelay((10 * 1000) / HZ);
+ local_irq_restore(flags);
/*
* Expect a few ticks at least, to be sure some possible
@@ -1717,6 +1719,9 @@ static inline void check_timer(void)
{
int apic1, pin1, apic2, pin2;
int vector;
+ unsigned long flags;
+
+ local_irq_save(flags);
/*
* get/set the timer IRQ vector:
@@ -1758,6 +1763,7 @@ static inline void check_timer(void)
*/
unmask_IO_APIC_irq(0);
if (timer_irq_works()) {
+ local_irq_restore(flags);
if (disable_timer_pin_1 > 0)
clear_IO_APIC_pin(apic1, pin1);
return;
@@ -1775,6 +1781,7 @@ static inline void check_timer(void)
*/
setup_ExtINT_IRQ0_pin(apic2, pin2, vector);
if (timer_irq_works()) {
+ local_irq_restore(flags);
printk("works.\n");
if (pin1 != -1)
replace_pin_at_irq(0, apic1, pin1, apic2, pin2);
@@ -1802,6 +1809,7 @@ static inline void check_timer(void)
enable_8259A_irq(0);
if (timer_irq_works()) {
+ local_irq_restore(flags);
printk(" works.\n");
return;
}
@@ -1817,6 +1825,8 @@ static inline void check_timer(void)
unlock_ExtINT_logic();
+ local_irq_restore(flags);
+
if (timer_irq_works()) {
printk(" works.\n");
return;

View File

@ -0,0 +1,29 @@
# HG changeset patch
# User Keir Fraser <keir.fraser@citrix.com>
# Date 1229599705 0
# Node ID c2dad16819b54c2c4b2bb0e9e89f71c279eaf156
# Parent b33b745cd5ec3213feeb1d99e421e79cc5f12370
x86, shadow: Avoid duplicates in fixup tables.
Avoid entering duplicates in fixup tables, reducing fixup evictions.
Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
--- a/xen/arch/x86/mm/shadow/common.c
+++ b/xen/arch/x86/mm/shadow/common.c
@@ -626,6 +626,15 @@ void oos_fixup_add(struct vcpu *v, mfn_t
idx = (idx + 1) % SHADOW_OOS_PAGES;
if ( mfn_x(oos[idx]) == mfn_x(gmfn) )
{
+ int i;
+ for ( i = 0; i < SHADOW_OOS_FIXUPS; i++ )
+ {
+ if ( mfn_valid(oos_fixup[idx].smfn[i])
+ && (mfn_x(oos_fixup[idx].smfn[i]) == mfn_x(smfn))
+ && (oos_fixup[idx].off[i] == off) )
+ return;
+ }
+
next = oos_fixup[idx].next;
if ( mfn_x(oos_fixup[idx].smfn[next]) != INVALID_MFN )

View File

@ -0,0 +1,27 @@
# HG changeset patch
# User Keir Fraser <keir.fraser@citrix.com>
# Date 1229599773 0
# Node ID 768759d4e319f8c46a8558782a9bf1c7982e662d
# Parent c2dad16819b54c2c4b2bb0e9e89f71c279eaf156
xenoprof: Add support for Intel Dunnington cores.
Signed-off-by: Xiaowei Yang <Xiaowei.yang@intel.com>
Signed-off-by: Ting Zhou <ting.g.zhou@intel.com>
--- a/xen/arch/x86/oprofile/nmi_int.c
+++ b/xen/arch/x86/oprofile/nmi_int.c
@@ -315,11 +315,10 @@ static int __init ppro_init(char ** cpu_
case 14:
*cpu_type = "i386/core";
break;
- case 15: case 23:
- *cpu_type = "i386/core_2";
- ppro_has_global_ctrl = 1;
- break;
+ case 15:
+ case 23:
case 26:
+ case 29:
*cpu_type = "i386/core_2";
ppro_has_global_ctrl = 1;
break;

112
18937-S3-MSI.patch Normal file
View File

@ -0,0 +1,112 @@
# HG changeset patch
# User Keir Fraser <keir.fraser@citrix.com>
# Date 1229698596 0
# Node ID 2dffa6ceb0af954e7f3a9ad7e993b8aee7b7de65
# Parent 738513b106fa262a11cc3254cd6dd67afb3a63e7
Support S3 for MSI interrupt
From: "Jiang, Yunhong" <yunhong.jiang@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
--- a/xen/arch/x86/msi.c
+++ b/xen/arch/x86/msi.c
@@ -771,3 +771,41 @@ void pci_cleanup_msi(struct pci_dev *pde
msi_free_vectors(pdev);
}
+int pci_restore_msi_state(struct pci_dev *pdev)
+{
+ unsigned long flags;
+ int vector;
+ struct msi_desc *entry, *tmp;
+ irq_desc_t *desc;
+
+ if (!pdev)
+ return -EINVAL;
+
+ list_for_each_entry_safe( entry, tmp, &pdev->msi_list, list )
+ {
+ vector = entry->vector;
+ desc = &irq_desc[vector];
+
+ spin_lock_irqsave(&desc->lock, flags);
+
+ ASSERT(desc->msi_desc == entry);
+
+ if (desc->msi_desc != entry)
+ {
+ dprintk(XENLOG_ERR, "Restore MSI for dev %x:%x not set before?\n",
+ pdev->bus, pdev->devfn);
+ spin_unlock_irqrestore(&desc->lock, flags);
+ return -EINVAL;
+ }
+
+ msi_set_enable(pdev, 0);
+ write_msi_msg(entry, &entry->msg);
+
+ msi_set_enable(pdev, 1);
+ msi_set_mask_bit(vector, entry->msi_attrib.masked);
+ spin_unlock_irqrestore(&desc->lock, flags);
+ }
+
+ return 0;
+}
+
--- a/xen/arch/x86/physdev.c
+++ b/xen/arch/x86/physdev.c
@@ -427,6 +427,27 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_H
break;
}
+ case PHYSDEVOP_restore_msi: {
+ struct physdev_restore_msi restore_msi;
+ struct pci_dev *pdev;
+
+ ret = -EPERM;
+ if ( !IS_PRIV(v->domain) )
+ break;
+
+ ret = -EFAULT;
+ if ( copy_from_guest(&restore_msi, arg, 1) != 0 )
+ break;
+
+ pdev = pci_lock_pdev(restore_msi.bus, restore_msi.devfn);
+ ret = -ENODEV;
+ if ( !pdev )
+ break;
+
+ ret = pci_restore_msi_state(pdev);
+ spin_unlock(&pdev->lock);
+ break;
+ }
default:
ret = -ENOSYS;
break;
--- a/xen/include/asm-x86/msi.h
+++ b/xen/include/asm-x86/msi.h
@@ -75,6 +75,7 @@ extern void set_msi_irq_affinity(unsigne
extern int pci_enable_msi(struct msi_info *msi);
extern void pci_disable_msi(int vector);
extern void pci_cleanup_msi(struct pci_dev *pdev);
+extern int pci_restore_msi_state(struct pci_dev *pdev);
struct msi_desc {
struct {
--- a/xen/include/public/physdev.h
+++ b/xen/include/public/physdev.h
@@ -183,6 +183,15 @@ struct physdev_manage_pci {
typedef struct physdev_manage_pci physdev_manage_pci_t;
DEFINE_XEN_GUEST_HANDLE(physdev_manage_pci_t);
+#define PHYSDEVOP_restore_msi 19
+struct physdev_restore_msi {
+ /* IN */
+ uint8_t bus;
+ uint8_t devfn;
+};
+typedef struct physdev_restore_msi physdev_restore_msi_t;
+DEFINE_XEN_GUEST_HANDLE(physdev_restore_msi_t);
+
/*
* Argument to physdev_op_compat() hypercall. Superceded by new physdev_op()
* hypercall since 0x00030202.

View File

@ -0,0 +1,28 @@
# HG changeset patch
# User Keir Fraser <keir.fraser@citrix.com>
# Date 1230557552 0
# Node ID 0af9fbf3f05306d4972cf05e4b6d7be2199a41cb
# Parent c54d6f871de8f271aaeb571c3b87eae9165e3183
x86: Do not restrict 32-bit EPT to 4GB.
Signed-off-by: Xin, Xiaohui <xiaohui.xin@intel.com>
Index: xen-3.3.1-testing/xen/arch/x86/mm/p2m.c
===================================================================
--- xen-3.3.1-testing.orig/xen/arch/x86/mm/p2m.c
+++ xen-3.3.1-testing/xen/arch/x86/mm/p2m.c
@@ -935,11 +935,12 @@ guest_physmap_add_entry(struct domain *d
#if CONFIG_PAGING_LEVELS == 3
/*
- * 32bit PAE nested paging does not support over 4GB guest due to
+ * 32bit AMD nested paging does not support over 4GB guest due to
* hardware translation limit. This limitation is checked by comparing
* gfn with 0xfffffUL.
*/
- if ( paging_mode_hap(d) && (gfn > 0xfffffUL) )
+ if ( paging_mode_hap(d) && (gfn > 0xfffffUL) &&
+ (boot_cpu_data.x86_vendor == X86_VENDOR_AMD) )
{
if ( !test_and_set_bool(d->arch.hvm_domain.svm.npt_4gb_warning) )
dprintk(XENLOG_WARNING, "Dom%d failed to populate memory beyond"

View File

@ -99,8 +99,8 @@ separate privileged and unprivileged kernels. As most of the hardware drivers
are modules anyway, using this kernel as an unprivileged kernel has very
little extra overhead.
The kernel is contained in the kernel-xen package (or kernel-xenpae for 32 bit
hardware with > 4G of RAM), which you need to install to use Xen.
The kernel is contained in the kernel-xen package, which you need to install to
use Xen.
Booting
@ -138,15 +138,13 @@ Xen Boot Parameters
Normally, xen.gz requires no parameters. However, in special cases (such as
debugging or a dedicated VM server) you may wish to pass it parameters.
We have added the following parameters (as compared to upstream Xen):
reboot=option1[,option2,...]
Options are:
warm Reboots will be warm (no memory testing, etc.)
cold Reboots will be cold (with memory testing, etc.)
no No reboots allowed
bios Reboot by calling the BIOS
hard Reboot by toggling RESET and/or crashing the CPU
In particular in case of problems you may want to attach a serial terminal and
direct Xen to send its output not only to the screen, but also to that
terminal. In order to do so, add "console=vga,com<n> com<n>=<baud>" (without
the quotes and with <n> replaced by the serial port number - generally 1 or 2 -
and with <baud> replaced by the baud rate the serial terminal is configured
for) to the xen.gz line.
For a more complete discussion of possible parameters, see the user
documentation in the xen-doc-* packages.
@ -188,11 +186,6 @@ from _all_ VMs. Never try to share a filesystem that is mounted read-write;
filesystem corruption will result. For sharing writable data between VMs, use
NFS or other networked or cluster filesystems.
Xen does not yet properly support removable media in paravirtual VMs, so
installing such an operating system from CDs can be difficult. Consult the
online documentation for some detailed work-arounds. We recommend using a
network installation source, a DVD, or a DVD ISO.
When defining the virtual network adapter(s), we recommend using a static MAC
for the VM rather than allowing Xen to randomly select one each time the VM
boots. (See "Network Troubleshooting" below.) XenSource has been allocated a
@ -336,14 +329,25 @@ documentation for workarounds.
Networking
----------
Your virtual machines become much more useful if your can reach them via the
network. The default Xen setup creates a virtual bridge (xenbr0) in domain 0
when you start xend. Your eth0 device is enslaved to it. The slave VMs get a
virtual network interface eth0, which is visible to domain 0 as vifN.0 and
connected to the bridge. This means that if you set up an IP address in the
slave VMs belonging to the same subnet as eth0 from your domain 0, you'll be
able to communicate not only with the other slave VMs, but also with domain 0
and with the external network. If you have a DHCP server running in your
network, your slave VMs should succeed in getting an IP address.
network. Starting with openSUSE11.1 and SLE11, networking in domain 0 is
configured and managed via YaST. The yast2-networking module can be used
to create and manage bridged networks. During initial installation, a bridged
networking proposal will be presented if the "Xen Virtual Machine Host Server"
pattern is selected. The proposal will also be presented if you install Xen
after initial installation using the "Install Hypervisor and Tools" module in
YaST.
The default proposal creates a virtual bridge in domain 0 for each active
ethernet device, enslaving the device to the bridge. Consider a machine
containing two ethernet devices (eth0 and eth1), both with active carriers.
YaST will create br0 and br1, enslaving the eth0 and eth1 devices repectively.
VMs get a virtual network interface (e.g. eth0), which is visible in domain 0
as vifN.0 and connected to the bridge. This means that if you set up an IP
address in the VMs belonging to the same subnet as br0 from your domain 0,
you'll be able to communicate not only with the other slave VMs, but also with
domain 0 and with the external network. If you have a DHCP server running in
your network, your VMs should succeed in getting an IP address.
Be aware that this may have unwanted security implications. You may want to
opt for routing instead of bridging, so you can set up firewalling rules in
@ -352,47 +356,13 @@ domain 0.
Please read about the network configuration in the Xen manual. You can set up
bridging or routing for other interfaces also.
The network setup is done via the scripts in /etc/xen/scripts. They do not
support ipv6 at this moment, but this is just a limitation of the scripts.
When using SuSEfirewall2 and Xen network bridging, ensure that the Xen
bridges being used (xenbr0, xenbr1, etc.) are listed in
FW_FORWARD_ALWAYS_INOUT_DEV in the SuSEfirewall2 file. The format for
FW_FORWARD_ALWAYS_INOUT_DEV is a list of interfaces separated by a space.
For example, if the Xen bridge xenbr0 is being used, the line should be:
FW_FORWARD_ALWAYS_INOUT_DEV="xenbr0".
If xenbr0 and xenbr1 are being used, the line should be:
FW_FORWARD_ALWAYS_INOUT_DEV="xenbr0 xenbr1".
When using bridging, the eth0 in domain 0 device will be renamed to peth0 and
its MAC address will be set to fe:ff:ff:ff:ff:ff and ARP will be disabled.
veth0 will take over the old MAC address, be renamed to eth0, and be enabled
(ifup'ed). vif0.0 and peth0 are then enslaved to xenbr0. veth0 is connected
to vif0.0 behind the scenes.
Configuring network interfaces when using Xen bridging:
Due to the renaming of network interfaces by the network-bridge script
(e.g. eth0 to peth0), network interfaces should not be configured or restarted
while they are enslaved to a Xen bridge. Before configuring a network
interface enslaved to a Xen bridge, shutdown all VMs using the interface.
Then use the network-bridge script to remove the Xen bridge and to restore the
network interface back to normal (put peth0 back to eth0). For example, to
remove the Xen bridge and restore eth0 back to normal do the following:
/etc/xen/scripts/network-bridge stop netdev=eth0
With the Xen bridge removed and eth0 put back to normal, eth0 can then be
configured or restarted. Once the configuration is complete, Xen bridging can
be started back up again (creating the Xen bridge and renaming eth0 to peth0)
by doing the following:
/etc/xen/scripts/network-bridge start netdev=eth0
The VMs can then be started again.
For debugging, here's what happens on bootup of a domU:
- xenstored saves the device setup in xenstore
- domU is created
- vifX.1 shows up in domain 0 and a hotplug event is triggered
- vifN.0 shows up in domain 0 and a hotplug event is triggered
- hotplug is /sbin/udev; udev looks at /etc/udev/rules.d/40-xen.rules and
calls /etc/xen/scripts/vif-bridge online
- vif-bridge set the vifX.1 device up and enslaves it to the bridge
- vif-bridge set the vifN.0 device up and enslaves it to the bridge
- eth0 shows up in domU (hotplug event triggered)
Similar things happen for block devices, except that /etc/xen/scripts/block is
called.
@ -457,16 +427,11 @@ what the kernel has been booted with. But you can trick domU Linux to prepare
for a larger amount of RAM by passing the mem= boot parameter.
The export of virtual hard disks from files in Xen can be handled via the
loopback driver (although in Xen 3.0.4, this is can be replaced by the
"blktap" user-space driver.) If you are still using loopback, you can easily
run out of loopback devices, as by default only 8 are supported. You can
change this by inserting:
options loop max_loop=64
into /etc/modprobe.conf.local in domain 0.
Similarly, the netback driver comes up with 4 virtual network device pairs
(vif0.X - vethX). You can change this by inserting:
options netloop nloopbacks=64
loopback driver (although in Xen >= 3.0.4, this is can be replaced by the
"blktap" user-space driver.) If you are still using loopback, it may be
possible to run out of loopback devices, as by default only 64 are supported.
You can change this by inserting:
options loop max_loop=128
into /etc/modprobe.conf.local in domain 0.
@ -474,13 +439,7 @@ Network Troubleshooting
-----------------------
First ensure the VM server is configured correctly and can access the network.
For starting it's easiest to disable any firewall on the VM server, but enable
IP_FORWARD in /etc/sysconfig/sysctl (/proc/sys/net/ipv4/ip_forward). If you
want to enable SuSEfirewall2 with bridging, add xenbr0 to a device class, set
FW_ROUTE and FW_ALLOW_CLASS_ROUTING. Watch the kernel reject messages ...
Switch off ifplugd and NetworkManager. These can interfere with the changes
xend makes to the network setup.
Do not use ifplugd or NetworkManager, neither are bridge aware.
Specify a static virtual MAC in the VM's configuration file. Random MACs can
be problematic, since with each boot of the VM it appears that some hardware
@ -510,7 +469,8 @@ PCI-DMA: Using software bounce buffering for IO (SWIOTLB)
...
Kernel panic - not syncing: PCI-DMA: Memory would be corrupted
Fix this by adding "swiotlb=16" to the Linux kernel command line, which
reserves additional memory for the swiotlb.
reserves additional memory for the swiotlb (the actual number to be used here
of course depends on the system configuration).
If you have trouble early in the boot, try passing pnpacpi=off to the Linux
kernel. If you have trouble with interrupts or timers, passing lapic to Xen
@ -524,7 +484,7 @@ consult chapter 11.3 of the Xen users' manual.
If domain 0 Linux crashes on X11 startup, please try to boot into runlevel 3.
To debug Xen or domain 0 Linux crashes or hangs, it may be useful to use the
debug-enabled hypervisor, and to prevent automatic rebooting. Change your
debug-enabled hypervisor, and/or to prevent automatic rebooting. Change your
Grub configuration from something like this:
kernel (hd0,5)/xen.gz
To something like this:

View File

@ -1,44 +0,0 @@
Fix 32bit xen-tools build.
This fixes building 32bit xen-tools on a amd64 machine, i.e.
"XEN_TARGET_ARCH=x86_32 make".
For ioemu I've taken the lazy path and just disabled them for
cross-builds, I'll leave that to fix to someone who knows the
qemu makefiles better than I do ;)
Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
---
config/x86_32.mk | 6 ++++--
tools/Makefile | 2 +-
2 files changed, 5 insertions(+), 3 deletions(-)
Index: xen-3.3.0-testing/config/x86_32.mk
===================================================================
--- xen-3.3.0-testing.orig/config/x86_32.mk
+++ xen-3.3.0-testing/config/x86_32.mk
@@ -7,7 +7,10 @@ CONFIG_MIGRATE := y
CONFIG_XCUTILS := y
CONFIG_IOEMU := y
-CFLAGS += -m32 -march=i686
+CFLAGS += -m32 -march=i686
+LDFLAGS += -m32
+ASFLAGS += -m32
+LIBDIR := lib
# Use only if calling $(LD) directly.
LDFLAGS_DIRECT_OpenBSD = _obsd
Index: xen-3.3.0-testing/tools/Makefile
===================================================================
--- xen-3.3.0-testing.orig/tools/Makefile
+++ xen-3.3.0-testing/tools/Makefile
@@ -24,7 +24,7 @@ SUBDIRS-y += libfsimage
SUBDIRS-$(LIBXENAPI_BINDINGS) += libxen
SUBDIRS-y += fs-back
-ifeq (ioemu,$(CONFIG_QEMU))
+ifeq ($(XEN_COMPILE_ARCH)$(CONFIG_IOEMU),$(XEN_TARGET_ARCH)y)
SUBDIRS-$(CONFIG_IOEMU) += ioemu
else
SUBDIRS-$(CONFIG_IOEMU) += ioemu-dir

View File

@ -1,7 +1,5 @@
Index: xen-3.3.1-testing/xen/arch/x86/traps.c
===================================================================
--- xen-3.3.1-testing.orig/xen/arch/x86/traps.c
+++ xen-3.3.1-testing/xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c
+++ b/xen/arch/x86/traps.c
@@ -1267,6 +1267,7 @@ asmlinkage void do_early_page_fault(stru
unsigned long *stk = (unsigned long *)regs;
printk("Early fatal page fault at %04x:%p (cr2=%p, ec=%04x)\n",
@ -10,10 +8,8 @@ Index: xen-3.3.1-testing/xen/arch/x86/traps.c
printk("Stack dump: ");
while ( ((long)stk & ((PAGE_SIZE - 1) & ~(BYTES_PER_LONG - 1))) != 0 )
printk("%p ", _p(*stk++));
Index: xen-3.3.1-testing/xen/arch/x86/x86_32/mm.c
===================================================================
--- xen-3.3.1-testing.orig/xen/arch/x86/x86_32/mm.c
+++ xen-3.3.1-testing/xen/arch/x86/x86_32/mm.c
--- a/xen/arch/x86/x86_32/mm.c
+++ b/xen/arch/x86/x86_32/mm.c
@@ -38,6 +38,7 @@ extern l1_pgentry_t l1_identmap[L1_PAGET
unsigned int PAGE_HYPERVISOR = __PAGE_HYPERVISOR;
unsigned int PAGE_HYPERVISOR_NOCACHE = __PAGE_HYPERVISOR_NOCACHE;
@ -22,7 +18,7 @@ Index: xen-3.3.1-testing/xen/arch/x86/x86_32/mm.c
static unsigned long mpt_size;
void *alloc_xen_pagetable(void)
@@ -105,6 +106,8 @@ void __init paging_init(void)
@@ -103,6 +104,8 @@ void __init paging_init(void)
pg, (__PAGE_HYPERVISOR | _PAGE_PSE) & ~_PAGE_RW));
}
@ -31,10 +27,8 @@ Index: xen-3.3.1-testing/xen/arch/x86/x86_32/mm.c
/* Fill with an obvious debug pattern. */
for ( i = 0; i < (mpt_size / BYTES_PER_LONG); i++)
set_gpfn_from_mfn(i, 0x55555555);
Index: xen-3.3.1-testing/xen/arch/x86/x86_32/traps.c
===================================================================
--- xen-3.3.1-testing.orig/xen/arch/x86/x86_32/traps.c
+++ xen-3.3.1-testing/xen/arch/x86/x86_32/traps.c
--- a/xen/arch/x86/x86_32/traps.c
+++ b/xen/arch/x86/x86_32/traps.c
@@ -160,7 +160,8 @@ void show_page_walk(unsigned long addr)
l3t += (cr3 & 0xFE0UL) >> 3;
l3e = l3t[l3_table_offset(addr)];
@ -65,10 +59,8 @@ Index: xen-3.3.1-testing/xen/arch/x86/x86_32/traps.c
printk(" L1[0x%03lx] = %"PRIpte" %08lx\n",
l1_table_offset(addr), l1e_get_intpte(l1e), pfn);
unmap_domain_page(l1t);
Index: xen-3.3.1-testing/xen/arch/x86/x86_64/mm.c
===================================================================
--- xen-3.3.1-testing.orig/xen/arch/x86/x86_64/mm.c
+++ xen-3.3.1-testing/xen/arch/x86/x86_64/mm.c
--- a/xen/arch/x86/x86_64/mm.c
+++ b/xen/arch/x86/x86_64/mm.c
@@ -32,6 +32,7 @@
#include <asm/msr.h>
#include <public/memory.h>
@ -86,10 +78,8 @@ Index: xen-3.3.1-testing/xen/arch/x86/x86_64/mm.c
/* Create user-accessible L2 directory to map the MPT for compat guests. */
BUILD_BUG_ON(l4_table_offset(RDWR_MPT_VIRT_START) !=
l4_table_offset(HIRO_COMPAT_MPT_VIRT_START));
Index: xen-3.3.1-testing/xen/arch/x86/x86_64/traps.c
===================================================================
--- xen-3.3.1-testing.orig/xen/arch/x86/x86_64/traps.c
+++ xen-3.3.1-testing/xen/arch/x86/x86_64/traps.c
--- a/xen/arch/x86/x86_64/traps.c
+++ b/xen/arch/x86/x86_64/traps.c
@@ -174,7 +174,8 @@ void show_page_walk(unsigned long addr)
l4t = mfn_to_virt(mfn);
l4e = l4t[l4_table_offset(addr)];
@ -130,10 +120,8 @@ Index: xen-3.3.1-testing/xen/arch/x86/x86_64/traps.c
printk(" L1[0x%03lx] = %"PRIpte" %016lx\n",
l1_table_offset(addr), l1e_get_intpte(l1e), pfn);
}
Index: xen-3.3.1-testing/xen/include/asm-x86/mm.h
===================================================================
--- xen-3.3.1-testing.orig/xen/include/asm-x86/mm.h
+++ xen-3.3.1-testing/xen/include/asm-x86/mm.h
--- a/xen/include/asm-x86/mm.h
+++ b/xen/include/asm-x86/mm.h
@@ -331,6 +331,7 @@ TYPE_SAFE(unsigned long,mfn);
#define machine_to_phys_mapping ((unsigned long *)RDWR_MPT_VIRT_START)
#define INVALID_M2P_ENTRY (~0UL)

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:97656ffb4d7ee1fea386c749238ddf9262688639758e3f7a6b3cf16b2f6e9a73
size 22695855
oid sha256:1f543d1d4edba442dad168fc9e042120f41a34583bc4689cab18e57537f92807
size 22695135

View File

@ -1,25 +0,0 @@
Change default IO-APIC ack mode for single IO-APIC systems to old-style. Jan
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
@@ -1355,7 +1355,7 @@ static unsigned int startup_level_ioapic
return 0; /* don't check for pending */
}
-int ioapic_ack_new = 1;
+int ioapic_ack_new = -1;
static void setup_ioapic_ack(char *s)
{
if ( !strcmp(s, "old") )
@@ -1844,6 +1844,8 @@ void __init setup_IO_APIC(void)
else
io_apic_irqs = ~PIC_IRQS;
+ if (ioapic_ack_new < 0)
+ ioapic_ack_new = (nr_ioapics > 1);
printk("ENABLING IO-APIC IRQs\n");
printk(" -> Using %s ACK method\n", ioapic_ack_new ? "new" : "old");

View File

@ -1,59 +0,0 @@
Index: xen-3.3.1-testing/xen/arch/x86/x86_32/mm.c
===================================================================
--- xen-3.3.1-testing.orig/xen/arch/x86/x86_32/mm.c
+++ xen-3.3.1-testing/xen/arch/x86/x86_32/mm.c
@@ -63,6 +63,8 @@ l2_pgentry_t *virt_to_xen_l2e(unsigned l
return &idle_pg_table_l2[l2_linear_offset(v)];
}
+extern unsigned long lowmem_emergency_pool_pages;
+
void __init paging_init(void)
{
unsigned long v;
@@ -130,6 +132,20 @@ void __init setup_idle_pagetable(void)
l2e_from_page(virt_to_page(idle_vcpu[0]->domain->
arch.mm_perdomain_pt) + i,
__PAGE_HYPERVISOR));
+
+ /*
+ * Size the lowmem_emergency_pool based on the total memory on the box
+ * This pool is needed only on 32 bit PAE configurations (4g to 16g).
+ */
+ if (lowmem_emergency_pool_pages)
+ return;
+
+ if (total_pages > (4 * 1024 * 1024))
+ lowmem_emergency_pool_pages = 12000;
+ else if (total_pages > (2 * 1024 * 1024))
+ lowmem_emergency_pool_pages = 8000;
+ else if (total_pages > (1 * 1024 * 1024) || max_page >= (1 * 1024 * 1024))
+ lowmem_emergency_pool_pages = 4000;
}
void __init zap_low_mappings(l2_pgentry_t *dom0_l2)
Index: xen-3.3.1-testing/xen/common/page_alloc.c
===================================================================
--- xen-3.3.1-testing.orig/xen/common/page_alloc.c
+++ xen-3.3.1-testing/xen/common/page_alloc.c
@@ -53,6 +53,20 @@ static int opt_bootscrub __initdata = 1;
boolean_param("bootscrub", opt_bootscrub);
/*
+ * Amount of memory to reserve in a low-memory (<4GB) pool for specific
+ * allocation requests. Ordinary requests will not fall back to the
+ * lowmem emergency pool.
+ */
+unsigned long lowmem_emergency_pool_pages;
+static void parse_lowmem_emergency_pool(char *s)
+{
+ unsigned long long bytes;
+ bytes = parse_size_and_unit(s, NULL);
+ lowmem_emergency_pool_pages = bytes >> PAGE_SHIFT;
+}
+custom_param("lowmem_emergency_pool", parse_lowmem_emergency_pool);
+
+/*
* Bit width of the DMA heap -- used to override NUMA-node-first.
* allocation strategy, which can otherwise exhaust low memory.
*/

View File

@ -1,3 +1,18 @@
-------------------------------------------------------------------
Mon Jan 5 10:14:41 MST 2009 - carnold@novell.com
- bnc#435596 - dom0 S3 resume fails if disk drive is set as AHCI
mode.
18937-S3-MSI.patch
- Final Xen 3.3.1 FCS changeset 18546
-------------------------------------------------------------------
Mon Dec 29 09:16:20 MST 2008 - carnold@novell.com
- bnc#436021 - On PAE host with EPT enabled, booting a HVM guest
with 4G memory will cause Xen hang.
18943-amd-32bit-paging-limit.patch
-------------------------------------------------------------------
Mon Dec 22 14:18:15 MST 2008 - carnold@novell.com

View File

@ -1,5 +1,5 @@
#
# spec file for package xen (Version 3.3.1_18544_01)
# spec file for package xen (Version 3.3.1_18546_02)
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -22,7 +22,7 @@ Name: xen
ExclusiveArch: %ix86 x86_64
%define xvers 3.3
%define xvermaj 3
%define changeset 18544
%define changeset 18546
%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_18544_01
Version: 3.3.1_18546_02
Release: 1
License: GPL v2 only
Group: System/Kernel
@ -126,6 +126,12 @@ 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
Patch60: 18943-amd-32bit-paging-limit.patch
Patch61: 18904-x86-local-irq.patch
Patch62: 18905-x86-ioapic-boot-panic.patch
Patch63: 18929-shadow-no-duplicates.patch
Patch64: 18930-xenoprof-dunnington.patch
Patch65: 18937-S3-MSI.patch
# Our patches
Patch100: xen-config.diff
Patch101: xend-config.diff
@ -143,14 +149,11 @@ Patch113: serial-split.patch
Patch114: xen-xm-top-needs-root.diff
Patch115: xen-tightvnc-args.diff
Patch116: xen-max-free-mem.diff
Patch120: xen-ioapic-ack-default.diff
Patch121: xen-lowmem-emergency-pool.diff
Patch122: block-losetup-retry.diff
Patch123: block-flags.diff
Patch124: xen-hvm-default-bridge.diff
Patch125: xen-hvm-default-pae.diff
Patch126: xm-test-cleanup.diff
Patch127: cross-build-fix.diff
Patch120: block-losetup-retry.diff
Patch121: block-flags.diff
Patch122: xen-hvm-default-bridge.diff
Patch123: xen-hvm-default-pae.diff
Patch124: xm-test-cleanup.diff
Patch130: tools-xc_kexec.diff
Patch131: tools-kboot.diff
Patch132: libxen_permissive.patch
@ -606,6 +609,12 @@ Authors:
%patch57 -p1
%patch58 -p1
%patch59 -p1
%patch60 -p1
%patch61 -p1
%patch62 -p1
%patch63 -p1
%patch64 -p1
%patch65 -p1
%patch100 -p1
%patch101 -p1
%patch102 -p1
@ -627,9 +636,6 @@ Authors:
%patch122 -p1
%patch123 -p1
%patch124 -p1
%patch125 -p1
%patch126 -p1
#%patch127 -p1
%patch130 -p1
%patch131 -p1
%patch132 -p1
@ -1033,6 +1039,15 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/xen/bin/qemu-dm.debug
/sbin/ldconfig
%changelog
* Mon Jan 05 2009 carnold@novell.com
- bnc#435596 - dom0 S3 resume fails if disk drive is set as AHCI
mode.
18937-S3-MSI.patch
- Final Xen 3.3.1 FCS changeset 18546
* Mon Dec 29 2008 carnold@novell.com
- bnc#436021 - On PAE host with EPT enabled, booting a HVM guest
with 4G memory will cause Xen hang.
18943-amd-32bit-paging-limit.patch
* 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.