Various bug fixes, tidy ups and startup script tweaks
This commit is contained in:
parent
77e08f365f
commit
fbce2febeb
6 changed files with 129 additions and 23 deletions
15
blktapctrl.service
Normal file
15
blktapctrl.service
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
[Unit]
|
||||
Description=blktapctrl daemon
|
||||
Requires=proc-xen.mount
|
||||
After=proc-xen.mount
|
||||
RefuseManualStop=true
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
Environment=BLKTAPCTRL_ARGS=
|
||||
EnvironmentFile=-/etc/sysconfig/blktapctrl
|
||||
ExecStartPre=/bin/grep -q control_d /proc/xen/capabilities
|
||||
ExecStart=/usr/sbin/blktapctrl $BLKTAPCTRL_ARGS
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
[dom0-kernel]
|
||||
name=Experimental pv_ops/dom0 kernels for Fedora - $basearch
|
||||
baseurl=http://repos.fedorapeople.org/repos/myoung/dom0-kernel/fedora-12/$basearch/
|
||||
enabled=0
|
||||
gpgcheck=0
|
||||
|
||||
[dom0-kernel-source]
|
||||
name=Experimental pv_ops/dom0 kernels for Fedora - Source
|
||||
baseurl=http://repos.fedorapeople.org/repos/myoung/dom0-kernel/fedora-12/SRPMS/
|
||||
enabled=0
|
||||
gpgcheck=0
|
||||
64
xen-4.1-testing.23190.patch
Normal file
64
xen-4.1-testing.23190.patch
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
|
||||
# HG changeset patch
|
||||
# User Stefano Stabellini <stefano.stabellini@eu.citrix.com>
|
||||
# Date 1321623485 0
|
||||
# Node ID 5a00ccfc63915650b8e1a262c2cad8e8d8670612
|
||||
# Parent e73ada19a69daf821aa7d80323f1bd76239b9bae
|
||||
x86: re-inject emulated level pirqs in PV on HVM guests if still asserted
|
||||
|
||||
PV on HVM guests can loose level interrupts coming from emulated
|
||||
devices if they have been remapped onto event channels. The reason is
|
||||
that we are missing the code to inject a pirq again in the guest when
|
||||
the guest EOIs it, if it corresponds to an emulated level interrupt
|
||||
and the interrupt is still asserted.
|
||||
|
||||
Fix this issue and also return error when the guest tries to get the
|
||||
irq_status of a non-existing pirq.
|
||||
|
||||
|
||||
Changes in this backport:
|
||||
- move the spinlock afterward to cover the new code only.
|
||||
|
||||
Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
|
||||
Committed-by: Keir Fraser <keir@xen.org>
|
||||
xen-unstable changeset: 24007:0526644ad2a6
|
||||
xen-unstable date: Thu Oct 27 16:07:18 2011 +0100
|
||||
|
||||
diff -r e73ada19a69d -r 5a00ccfc6391 xen/arch/x86/physdev.c
|
||||
--- a/xen/arch/x86/physdev.c Thu Nov 17 09:13:25 2011 +0000
|
||||
+++ b/xen/arch/x86/physdev.c Fri Nov 18 13:38:05 2011 +0000
|
||||
@@ -268,6 +268,20 @@
|
||||
ret = pirq_guest_eoi(v->domain, eoi.irq);
|
||||
else
|
||||
ret = 0;
|
||||
+ spin_lock(&v->domain->event_lock);
|
||||
+ if ( is_hvm_domain(v->domain) &&
|
||||
+ domain_pirq_to_emuirq(v->domain, eoi.irq) > 0 )
|
||||
+ {
|
||||
+ struct hvm_irq *hvm_irq = &v->domain->arch.hvm_domain.irq;
|
||||
+ int gsi = domain_pirq_to_emuirq(v->domain, eoi.irq);
|
||||
+
|
||||
+ /* if this is a level irq and count > 0, send another
|
||||
+ * notification */
|
||||
+ if ( gsi >= NR_ISAIRQS /* ISA irqs are edge triggered */
|
||||
+ && hvm_irq->gsi_assert_count[gsi] )
|
||||
+ send_guest_pirq(v->domain, eoi.irq);
|
||||
+ }
|
||||
+ spin_unlock(&v->domain->event_lock);
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -323,9 +337,10 @@
|
||||
break;
|
||||
irq_status_query.flags = 0;
|
||||
if ( is_hvm_domain(v->domain) &&
|
||||
- domain_pirq_to_irq(v->domain, irq) <= 0 )
|
||||
+ domain_pirq_to_irq(v->domain, irq) <= 0 &&
|
||||
+ domain_pirq_to_emuirq(v->domain, irq) == IRQ_UNBOUND )
|
||||
{
|
||||
- ret = copy_to_guest(arg, &irq_status_query, 1) ? -EFAULT : 0;
|
||||
+ ret = -EINVAL;
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
32
xen.spec
32
xen.spec
|
|
@ -6,14 +6,13 @@
|
|||
Summary: Xen is a virtual machine monitor
|
||||
Name: xen
|
||||
Version: 4.1.2
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Group: Development/Libraries
|
||||
License: GPLv2+ and LGPLv2+ and BSD
|
||||
URL: http://xen.org/
|
||||
Source0: http://bits.xensource.com/oss-xen/release/%{version}/xen-%{version}.tar.gz
|
||||
Source1: %{name}.modules
|
||||
Source2: %{name}.logrotate
|
||||
Source3: dom0-kernel.repo
|
||||
# used by stubdoms
|
||||
Source10: lwip-1.3.0.tar.gz
|
||||
Source11: newlib-1.16.0.tar.gz
|
||||
|
|
@ -34,6 +33,7 @@ Source32: sysconfig.blktapctrl
|
|||
Source40: proc-xen.mount
|
||||
Source41: var-lib-xenstored.mount
|
||||
Source42: xenstored.service
|
||||
Source43: blktapctrl.service
|
||||
|
||||
Patch1: xen-initscript.patch
|
||||
Patch4: xen-dumpdir.patch
|
||||
|
|
@ -47,6 +47,9 @@ Patch23: grub-ext4-support.patch
|
|||
Patch26: localgcc46fix.patch
|
||||
Patch28: pygrubfix.patch
|
||||
Patch31: pygrubfix2.patch
|
||||
Patch32: xen-4.1-testing.23190.patch
|
||||
Patch33: xend.empty.xml.patch
|
||||
Patch34: xend.catchbt.patch
|
||||
|
||||
Patch100: xen-configure-xend.patch
|
||||
|
||||
|
|
@ -173,6 +176,9 @@ to build the xen packages.
|
|||
%patch26 -p1
|
||||
%patch28 -p1
|
||||
%patch31 -p1
|
||||
%patch32 -p1
|
||||
%patch33 -p1
|
||||
%patch34 -p1
|
||||
|
||||
%patch100 -p1
|
||||
|
||||
|
|
@ -274,6 +280,7 @@ mkdir -p %{buildroot}/lib/systemd/system
|
|||
install -m 644 %{SOURCE40} %{buildroot}/lib/systemd/system/proc-xen.mount
|
||||
install -m 644 %{SOURCE41} %{buildroot}/lib/systemd/system/var-lib-xenstored.mount
|
||||
install -m 644 %{SOURCE42} %{buildroot}/lib/systemd/system/xenstored.service
|
||||
install -m 644 %{SOURCE43} %{buildroot}/lib/systemd/system/blktapctrl.service
|
||||
|
||||
# config file only used for hotplug, Fedora uses udev instead
|
||||
rm -f %{buildroot}/%{_sysconfdir}/sysconfig/xend
|
||||
|
|
@ -286,11 +293,6 @@ mkdir -p %{buildroot}%{_localstatedir}/lib/xen/xend-db/migrate
|
|||
mkdir -p %{buildroot}%{_localstatedir}/lib/xen/images
|
||||
mkdir -p %{buildroot}%{_localstatedir}/log/xen/console
|
||||
|
||||
############ add pointer to kernels ############
|
||||
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/yum.repos.d
|
||||
cp %{SOURCE3} %{buildroot}%{_sysconfdir}/yum.repos.d
|
||||
|
||||
############ create symlink for x86_64 for compatibility with 3.4 ############
|
||||
|
||||
%if "%{_libdir}" != "/usr/lib"
|
||||
|
|
@ -351,12 +353,12 @@ fi
|
|||
%postun libs -p /sbin/ldconfig
|
||||
|
||||
%post hypervisor
|
||||
if [ -f /sbin/grub2-mkconfig -a -f /boot/grub2/grub.cfg ]; then
|
||||
if [ $1 = 1 -a -f /sbin/grub2-mkconfig -a -f /boot/grub2/grub.cfg ]; then
|
||||
/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
|
||||
fi
|
||||
|
||||
%postun hypervisor
|
||||
if [ $1 = 0 -a -f /sbin/grub2-mkconfig -a -f /boot/grub2/grub.cfg ]; then
|
||||
if [ -f /sbin/grub2-mkconfig -a -f /boot/grub2/grub.cfg ]; then
|
||||
/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
|
||||
fi
|
||||
|
||||
|
|
@ -398,9 +400,6 @@ rm -rf %{buildroot}
|
|||
%dir %{_localstatedir}/lib/%{name}/xend-db/migrate
|
||||
%dir %{_localstatedir}/lib/%{name}/xend-db/vnet
|
||||
|
||||
# pointer to dom0 kernel
|
||||
%config(noreplace) %{_sysconfdir}/yum.repos.d/dom0-kernel.repo
|
||||
|
||||
%files libs
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/*.so.*
|
||||
|
|
@ -426,6 +425,7 @@ rm -rf %{buildroot}
|
|||
/lib/systemd/system/proc-xen.mount
|
||||
/lib/systemd/system/var-lib-xenstored.mount
|
||||
/lib/systemd/system/xenstored.service
|
||||
/lib/systemd/system/blktapctrl.service
|
||||
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/xenstored
|
||||
%config(noreplace) %{_sysconfdir}/sysconfig/xenconsoled
|
||||
|
|
@ -560,6 +560,14 @@ rm -rf %{buildroot}
|
|||
%doc licensedir/*
|
||||
|
||||
%changelog
|
||||
* Mon Nov 21 2011 Michael Young <m.a.young@durham.ac.uk> - 4.1.2-2
|
||||
- Fix lost interrupts on emulated devices
|
||||
- stop xend crashing if its state files are empty at start up
|
||||
- avoid a python backtrace if xend is run on bare metal
|
||||
- update grub2 configuration after the old hypervisor has gone
|
||||
- move blktapctrl to systemd
|
||||
- Drop obsolete dom0-kernel.repo file
|
||||
|
||||
* Fri Oct 21 2011 Michael Young <m.a.young@durham.ac.uk> - 4.1.2-1
|
||||
- update to 4.1.2
|
||||
remove upstream patches xen-4.1-testing.23104 and xen-4.1-testing.23112
|
||||
|
|
|
|||
15
xend.catchbt.patch
Normal file
15
xend.catchbt.patch
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
--- xen-4.1.2/tools/python/xen/xend/image.py.orig 2011-10-20 18:05:44.000000000 +0100
|
||||
+++ xen-4.1.2/tools/python/xen/xend/image.py 2011-11-20 20:41:10.730905790 +0000
|
||||
@@ -43,7 +43,11 @@
|
||||
from xen.util import utils
|
||||
from xen.xend import osdep
|
||||
|
||||
-xc = xen.lowlevel.xc.xc()
|
||||
+try:
|
||||
+ xc = xen.lowlevel.xc.xc()
|
||||
+except Exception:
|
||||
+ print >>sys.stderr, ('xend/image.py: Error connecting to hypervisor')
|
||||
+ os._exit(1)
|
||||
|
||||
MAX_GUEST_CMDLINE = 1024
|
||||
|
||||
15
xend.empty.xml.patch
Normal file
15
xend.empty.xml.patch
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
http://lists.xensource.com/archives/html/xen-devel/2011-11/msg00218.html
|
||||
|
||||
diff -r 54a5e994a241 -r 76391f599433 tools/python/xen/xend/XendStateStore.py
|
||||
--- a/tools/python/xen/xend/XendStateStore.py Wed Nov 02 17:09:09 2011 +0000
|
||||
+++ b/tools/python/xen/xend/XendStateStore.py Thu Nov 03 12:02:44 2011 -0400
|
||||
@@ -101,6 +101,9 @@ class XendStateStore:
|
||||
if not os.path.exists(xml_path):
|
||||
return {}
|
||||
|
||||
+ if not os.path.getsize(xml_path) == 0:
|
||||
+ return {}
|
||||
+
|
||||
dom = minidom.parse(xml_path)
|
||||
root = dom.documentElement
|
||||
state = {}
|
||||
Loading…
Add table
Add a link
Reference in a new issue