Accepting request 65559 from Virtualization

Accepted submit request 65559 from user licensedigger

OBS-URL: https://build.opensuse.org/request/show/65559
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/xen?expand=0&rev=125
This commit is contained in:
Sascha Peilicke 2011-03-31 08:51:41 +00:00 committed by Git OBS Bridge
commit 22c63bf7c1
5 changed files with 108 additions and 101 deletions

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:1d28ba8e9a3621a7d8537eb1741e756b4996dbfcd068c5eabcd05907d68f46e0
size 10778639
oid sha256:a6043ae8ab78ecf1e75ff2014cd6a7bde3319341fe1bd7a8df335a0764355b70
size 10778444

View File

@ -9,9 +9,9 @@ Index: xen-4.1.0-testing/Config.mk
-CONFIG_QEMU ?= $(QEMU_REMOTE)
+CONFIG_QEMU ?= ioemu-qemu-xen
QEMU_TAG := xen-4.1.0-rc8
QEMU_TAG := xen-4.1.0
#QEMU_TAG ?= e073e69457b4d99b6da0b6536296e3498f7f6599
@@ -193,7 +193,7 @@ QEMU_TAG := xen-4.1.0-rc8
@@ -193,7 +193,7 @@ QEMU_TAG := xen-4.1.0
# Optional components
XENSTAT_XENTOP ?= y
VTPM_TOOLS ?= n

View File

@ -1,3 +1,19 @@
-------------------------------------------------------------------
Tue Mar 29 10:18:09 MDT 2011 - carnold@novell.com
- Remus support is enabled for now.
-------------------------------------------------------------------
Fri Mar 25 09:48:04 MDT 2011 - carnold@novell.com
- Update to Xen 4.1 FCS
-------------------------------------------------------------------
Thu Mar 24 11:44:17 CET 2011 - ohering@suse.de
- fix xentrace.dynamic_sized_tbuf.patch
the default case did not work, correct size calculation
-------------------------------------------------------------------
Tue Mar 22 15:13:08 MDT 2011 - carnold@novell.com

136
xen.spec
View File

@ -1,5 +1,5 @@
#
# spec file for package xen
# spec file for package xen (Version 4.1.0_01)
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
@ -22,43 +22,43 @@ Name: xen
ExclusiveArch: %ix86 x86_64
%define xvers 4.1
%define xvermaj 4
%define changeset 23010
%define changeset 23013
%define xen_build_dir xen-4.1.0-testing
%define with_kmp 1
%define with_stubdom 0
BuildRequires: LibVNCServer-devel
BuildRequires: SDL-devel
BuildRequires: automake
BuildRequires: bin86
BuildRequires: curl-devel
BuildRequires: dev86
BuildRequires: graphviz
BuildRequires: latex2html
BuildRequires: libjpeg-devel
BuildRequires: libxml2-devel
BuildRequires: ncurses-devel
BuildRequires: openssl
BuildRequires: openssl-devel
BuildRequires: pciutils-devel
BuildRequires: python-devel
BuildRequires: texinfo
BuildRequires: transfig
BuildRequires: libbz2-devel
BuildRequires: LibVNCServer-devel
BuildRequires: SDL-devel
BuildRequires: automake
BuildRequires: bin86
BuildRequires: curl-devel
BuildRequires: dev86
BuildRequires: graphviz
BuildRequires: latex2html
BuildRequires: libjpeg-devel
BuildRequires: libxml2-devel
BuildRequires: ncurses-devel
BuildRequires: openssl
BuildRequires: openssl-devel
BuildRequires: pciutils-devel
BuildRequires: python-devel
BuildRequires: texinfo
BuildRequires: transfig
BuildRequires: libbz2-devel
%if %suse_version >= 1120
BuildRequires: xz-devel
BuildRequires: xz-devel
%endif
%if %suse_version <= 1110
BuildRequires: pmtools
BuildRequires: pmtools
%else
BuildRequires: acpica
BuildRequires: acpica
%endif
%if %suse_version >= 1030
BuildRequires: texlive
BuildRequires: texlive-latex
BuildRequires: texlive
BuildRequires: texlive-latex
%else
BuildRequires: te_ams
BuildRequires: te_latex
BuildRequires: tetex
BuildRequires: te_ams
BuildRequires: te_latex
BuildRequires: tetex
%endif
%ifarch x86_64
BuildRequires: glibc-32bit glibc-devel-32bit
@ -166,7 +166,7 @@ Patch370: xend-sysconfig.patch
Patch371: domu-usb-controller.patch
Patch372: usb-list.patch
Patch373: xend-devid-or-name.patch
Patch374: suspend_evtchn_lock.patch
Patch374: suspend_evtchn_lock.patch
# Patches for snapshot support
Patch400: snapshot-ioemu-save.patch
Patch401: snapshot-ioemu-restore.patch
@ -221,37 +221,37 @@ Patch650: disable_emulated_device.diff
Patch651: ioemu-disable-scsi.patch
Patch652: ioemu-disable-emulated-ide-if-pv.patch
Patch700: hv_extid_compatibility.patch
# Build patch
Patch999: tmp_build.patch
# FATE 310510
Patch10001: xenpaging.tools_xenpaging_cleanup.patch
Patch10002: xenpaging.pageout_policy.patch
Patch10003: xenpaging.get_paged_frame.patch
Patch10004: xenpaging.makefile.patch
Patch10010: xenpaging.policy_linear.patch
Patch10011: xenpaging.pagefile.patch
Patch10012: xenpaging.xenpaging_init.patch
Patch10013: xenpaging.mem_paging_tool_qemu_flush_cache.patch
Patch10014: xenpaging.machine_to_phys_mapping.patch
Patch10015: xenpaging.populate_only_if_paged.patch
Patch10017: xenpaging.autostart.patch
Patch10018: xenpaging.signal_handling.patch
Patch10019: xenpaging.MRU_SIZE.patch
Patch10020: xenpaging.guest_remove_page.patch
Patch10021: xenpaging.mem_event_check_ring-free_requests.patch
Patch10022: xenpaging.blacklist.patch
Patch10023: xenpaging.autostart_delay.patch
Patch10024: xenpaging.page_already_populated.patch
Patch10025: xenpaging.notify_policy_only_once.patch
Patch10026: xenpaging.num_pages_equal_max_pages.patch
Patch10027: xenpaging.p2m_mem_paging_populate_if_p2m_ram_paged.patch
Patch10028: xenpaging.HVMCOPY_gfn_paged_out.patch
Patch10029: xenpaging.optimize_p2m_mem_paging_populate.patch
Patch10030: xenpaging.paging_prep_enomem.patch
Patch10031: xenpaging.print-arguments.patch
Patch10032: xenpaging.no_domain_id.patch
Patch10033: xenpaging.runtime_mru_size.patch
Patch10040: xenpaging.doc.patch
Patch10001: xenpaging.tools_xenpaging_cleanup.patch
Patch10002: xenpaging.pageout_policy.patch
Patch10003: xenpaging.get_paged_frame.patch
Patch10004: xenpaging.makefile.patch
Patch10010: xenpaging.policy_linear.patch
Patch10011: xenpaging.pagefile.patch
Patch10012: xenpaging.xenpaging_init.patch
Patch10013: xenpaging.mem_paging_tool_qemu_flush_cache.patch
Patch10014: xenpaging.machine_to_phys_mapping.patch
Patch10015: xenpaging.populate_only_if_paged.patch
Patch10017: xenpaging.autostart.patch
Patch10018: xenpaging.signal_handling.patch
Patch10019: xenpaging.MRU_SIZE.patch
Patch10020: xenpaging.guest_remove_page.patch
Patch10021: xenpaging.mem_event_check_ring-free_requests.patch
Patch10022: xenpaging.blacklist.patch
Patch10023: xenpaging.autostart_delay.patch
Patch10024: xenpaging.page_already_populated.patch
Patch10025: xenpaging.notify_policy_only_once.patch
Patch10026: xenpaging.num_pages_equal_max_pages.patch
Patch10027: xenpaging.p2m_mem_paging_populate_if_p2m_ram_paged.patch
Patch10028: xenpaging.HVMCOPY_gfn_paged_out.patch
Patch10029: xenpaging.optimize_p2m_mem_paging_populate.patch
Patch10030: xenpaging.paging_prep_enomem.patch
Patch10031: xenpaging.print-arguments.patch
Patch10032: xenpaging.no_domain_id.patch
Patch10033: xenpaging.runtime_mru_size.patch
Patch10040: xenpaging.doc.patch
# Build patch
Patch99999: tmp_build.patch
Url: http://www.cl.cam.ac.uk/Research/SRG/netos/xen/
BuildRoot: %{_tmppath}/%{name}-%{version}-build
#%define pysite %(python -c "import distutils.sysconfig; print distutils.sysconfig.get_python_lib()")
@ -370,7 +370,6 @@ Summary: Xen Virtualization: Control tools for domain 0
Group: System/Kernel
Requires: xen-libs = %{version}
Requires: bridge-utils multipath-tools python python-curses python-openssl python-pam python-xml python-lxml
#Requires: ipcalc
# subpackage existed in 10.3
Provides: xen-tools-ioemu = 3.2
Obsoletes: xen-tools-ioemu <= 3.2
@ -684,7 +683,6 @@ tar xfj %{SOURCE2} -C $RPM_BUILD_DIR/%{xen_build_dir}/tools
%patch651 -p1
%patch652 -p1
%patch700 -p1
%patch999 -p1
#%patch10001 -p1
#%patch10002 -p1
#%patch10003 -p1
@ -713,6 +711,8 @@ tar xfj %{SOURCE2} -C $RPM_BUILD_DIR/%{xen_build_dir}/tools
#%patch10032 -p1
#%patch10033 -p1
#%patch10040 -p1
%patch99999 -p1
%build
XEN_EXTRAVERSION=%version-%release
@ -897,9 +897,6 @@ rm -rf $RPM_BUILD_ROOT/usr/share/doc/xen/README.*
rm -f $RPM_BUILD_ROOT/%{_libdir}/xen/bin/qemu-dm.debug
rm -f $RPM_BUILD_ROOT/%{_bindir}/qemu-img-xen
rm -f $RPM_BUILD_ROOT/%{_bindir}/qemu-nbd-xen
# FATE feature for remus rejected
rm -f $RPM_BUILD_ROOT/%{_bindir}/remus
rm -rf $RPM_BUILD_ROOT/%{_libdir}/python%{pyver}/site-packages/xen/remus
# This is necessary because of the build of libconfig for libxl
#rm -rf $RPM_BUILD_ROOT/$RPM_BUILD_ROOT
rm -rf $RPM_BUILD_ROOT/%{_libdir}/debug
@ -932,18 +929,14 @@ rm -rf $RPM_BUILD_ROOT/%{_libdir}/debug
%files tools
%defattr(-,root,root)
#/usr/bin/lomount
/usr/bin/xenalyze
/usr/bin/xenalyze.dump-raw
/usr/bin/xencons
/usr/bin/xenstore*
/usr/bin/xentrace*
/usr/bin/pygrub
#/usr/bin/qemu-img-xen
#/usr/bin/qemu-nbd-xen
/usr/bin/tapdisk-ioemu
#/usr/bin/gdbserver-xen
#/usr/bin/remus
/usr/bin/remus
/usr/sbin/blktapctrl
/usr/sbin/flask-loadpolicy
/usr/sbin/flask-getenforce
@ -954,7 +947,6 @@ rm -rf $RPM_BUILD_ROOT/%{_libdir}/debug
/usr/sbin/xen*
/usr/sbin/xm
/usr/sbin/xsview
#/usr/sbin/fs-backend
/usr/sbin/gtracestat
/usr/sbin/gtraceview
/usr/sbin/lock-util
@ -983,7 +975,6 @@ rm -rf $RPM_BUILD_ROOT/%{_libdir}/debug
%{_libdir}/xen/bin/xenconsole
%{_libdir}/xen/bin/xenctx
%{_libdir}/xen/bin/lsevtchn
#%{_libdir}/xen/bin/imqebt
%{_mandir}/man1/*.1.gz
%{_mandir}/man5/*.5.gz
%{_mandir}/man8/*.8.gz
@ -1034,11 +1025,8 @@ rm -rf $RPM_BUILD_ROOT/%{_libdir}/debug
%{_defaultdocdir}/xen/boot.local.xenU
%{_defaultdocdir}/xen/boot.xen
%{_defaultdocdir}/xen/misc
#%dir %pysite/xen
%dir %{_libdir}/python%{pyver}/site-packages/xen
#%dir %pysite/grub
%dir %{_libdir}/python%{pyver}/site-packages/grub
# formerly tools-ioemu
%dir %{_datadir}/xen
%dir %{_datadir}/xen/man
%dir %{_datadir}/xen/man/man1

View File

@ -1,17 +1,21 @@
---
xen/common/trace.c | 215 ++++++++++++++++++++---------------------------------
1 file changed, 83 insertions(+), 132 deletions(-)
xen/common/trace.c | 234 +++++++++++++++++++----------------------------------
1 file changed, 88 insertions(+), 146 deletions(-)
Index: xen-4.1.0-testing/xen/common/trace.c
===================================================================
--- xen-4.1.0-testing.orig/xen/common/trace.c
+++ xen-4.1.0-testing/xen/common/trace.c
@@ -42,14 +42,14 @@ CHECK_t_buf;
@@ -42,14 +42,18 @@ CHECK_t_buf;
#define compat_t_rec t_rec
#endif
-/* opt_tbuf_size: trace buffer size (in pages) */
-static unsigned int opt_tbuf_size = 0;
+#ifndef PFN_UP
+#define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT)
+#endif
+
+/* opt_tbuf_size: trace buffer size (in pages) for each cpu */
+static unsigned int opt_tbuf_size;
integer_param("tbuf_size", opt_tbuf_size);
@ -25,7 +29,7 @@ Index: xen-4.1.0-testing/xen/common/trace.c
static DEFINE_PER_CPU_READ_MOSTLY(struct t_buf *, t_bufs);
static DEFINE_PER_CPU_READ_MOSTLY(unsigned char *, t_data);
static DEFINE_PER_CPU_READ_MOSTLY(spinlock_t, t_lock);
@@ -85,20 +85,30 @@ static void calc_tinfo_first_offset(void
@@ -85,20 +89,29 @@ static void calc_tinfo_first_offset(void
}
/**
@ -46,6 +50,7 @@ Index: xen-4.1.0-testing/xen/common/trace.c
- || (size + size < size)
- || (num_online_cpus() * pages + t_info_first_offset > T_INFO_SIZE / sizeof(uint32_t));
+ typeof(dummy.prod) size = -1;
+ unsigned int t_info_bytes;
+
+ /* max size holds up to n pages */
+ size /= PAGE_SIZE;
@ -56,16 +61,14 @@ Index: xen-4.1.0-testing/xen/common/trace.c
+ pages = size;
+ }
+
+ t_info_pages = num_online_cpus() * pages + t_info_first_offset;
+ t_info_pages *= sizeof(uint32_t);
+ t_info_pages /= PAGE_SIZE;
+ if ( t_info_pages % PAGE_SIZE )
+ t_info_pages++;
+ t_info_bytes = num_online_cpus() * pages + t_info_first_offset;
+ t_info_bytes *= sizeof(uint32_t);
+ t_info_pages = PFN_UP(t_info_bytes);
+ return pages;
}
/**
@@ -111,47 +121,28 @@ static int check_tbuf_size(u32 pages)
@@ -111,47 +124,28 @@ static int check_tbuf_size(u32 pages)
* This function may also be called later when enabling trace buffers
* via the SET_SIZE hypercall.
*/
@ -92,7 +95,7 @@ Index: xen-4.1.0-testing/xen/common/trace.c
+ if ( pages == 0 )
return -EINVAL;
- }
-
- /* t_info size is fixed for now. Currently this works great, so there
- * seems to be no need to make it dynamic. */
- t_info = alloc_xenheap_pages(get_order_from_pages(T_INFO_PAGES), 0);
@ -102,7 +105,7 @@ Index: xen-4.1.0-testing/xen/common/trace.c
- "Tracing disabled.\n");
- return -ENOMEM;
- }
-
- for ( i = 0; i < T_INFO_PAGES; i++ )
- share_xen_page_with_privileged_guests(
- virt_to_page(t_info) + i, XENSHARE_readonly);
@ -125,7 +128,7 @@ Index: xen-4.1.0-testing/xen/common/trace.c
/*
* First, allocate buffers for all of the cpus. If any
@@ -159,27 +150,29 @@ static int alloc_trace_bufs(void)
@@ -159,27 +153,29 @@ static int alloc_trace_bufs(void)
*/
for_each_online_cpu(cpu)
{
@ -164,7 +167,7 @@ Index: xen-4.1.0-testing/xen/common/trace.c
/*
* Now share the pages to xentrace can map them, and write them in
@@ -188,89 +181,74 @@ static int alloc_trace_bufs(void)
@@ -188,89 +184,74 @@ static int alloc_trace_bufs(void)
for_each_online_cpu(cpu)
{
/* Share pages so that xentrace can map them. */
@ -265,13 +268,13 @@ Index: xen-4.1.0-testing/xen/common/trace.c
- if ( size != opt_tbuf_size )
- gdprintk(XENLOG_INFO, "tb_set_size from %d to %d not implemented\n",
- opt_tbuf_size, size);
- return -EINVAL;
- }
-
- if ( size <= 0 )
+ gdprintk(XENLOG_INFO, "tb_set_size from %d to %d not implemented\n",
+ opt_tbuf_size, pages);
return -EINVAL;
}
- if ( size <= 0 )
- return -EINVAL;
-
- opt_tbuf_size = size;
-
@ -279,15 +282,15 @@ Index: xen-4.1.0-testing/xen/common/trace.c
- {
- opt_tbuf_size = 0;
- return ret;
- }
-
}
- printk("Xen trace buffers: initialized\n");
- return 0;
+ return alloc_trace_bufs(pages);
}
int trace_will_trace_event(u32 event)
@@ -299,21 +277,6 @@ int trace_will_trace_event(u32 event)
@@ -299,21 +280,6 @@ int trace_will_trace_event(u32 event)
return 1;
}
@ -309,7 +312,7 @@ Index: xen-4.1.0-testing/xen/common/trace.c
/**
* init_trace_bufs - performs initialization of the per-cpu trace buffers.
*
@@ -323,37 +286,13 @@ static struct notifier_block cpu_nfb = {
@@ -323,37 +289,13 @@ static struct notifier_block cpu_nfb = {
*/
void __init init_trace_bufs(void)
{
@ -352,7 +355,7 @@ Index: xen-4.1.0-testing/xen/common/trace.c
}
/**
@@ -372,7 +311,7 @@ int tb_control(xen_sysctl_tbuf_op_t *tbc
@@ -372,7 +314,7 @@ int tb_control(xen_sysctl_tbuf_op_t *tbc
case XEN_SYSCTL_TBUFOP_get_info:
tbc->evt_mask = tb_event_mask;
tbc->buffer_mfn = t_info ? virt_to_mfn(t_info) : 0;