OBS User unknown 2008-10-13 21:48:54 +00:00 committed by Git OBS Bridge
parent 71babd6d75
commit 54963fbc09
9 changed files with 145 additions and 24 deletions

View File

@ -0,0 +1,39 @@
# HG changeset patch
# User Keir Fraser <keir.fraser@citrix.com>
# Date 1223629254 -3600
# Node ID a175b2c039ed2481e4064a8256bd29f15c98d0d1
# Parent 8f5a67f466e297535f84cc88eaaa2e71f37f2963
acpi/pmstat.c: refer to the array after range check.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Index: xen-3.3.1-testing/xen/arch/x86/acpi/pmstat.c
===================================================================
--- xen-3.3.1-testing.orig/xen/arch/x86/acpi/pmstat.c
+++ xen-3.3.1-testing/xen/arch/x86/acpi/pmstat.c
@@ -49,17 +49,20 @@ extern int pmstat_reset_cx_stat(uint32_t
int do_get_pm_info(struct xen_sysctl_get_pmstat *op)
{
int ret = 0;
- struct pm_px *pxpt = &px_statistic_data[op->cpuid];
- struct processor_pminfo *pmpt = &processor_pminfo[op->cpuid];
+ struct pm_px *pxpt;
+ const struct processor_pminfo *pmpt;
+
+ if ( (op->cpuid >= NR_CPUS) || !cpu_online(op->cpuid) )
+ return -EINVAL;
+
+ pmpt = processor_pminfo[op->cpuid];
+ pxpt = &px_statistic_data[op->cpuid];
/* to protect the case when Px was not controlled by xen */
if ( (!(pmpt->perf.init & XEN_PX_INIT)) &&
(op->type & PMSTAT_CATEGORY_MASK) == PMSTAT_PX )
return -EINVAL;
- if ( !cpu_online(op->cpuid) )
- return -EINVAL;
-
switch( op->type )
{
case PMSTAT_get_max_px:

View File

@ -0,0 +1,21 @@
Index: xen-3.3.1-testing/tools/blktap/drivers/blktapctrl.c
===================================================================
--- xen-3.3.1-testing.orig/tools/blktap/drivers/blktapctrl.c
+++ xen-3.3.1-testing/tools/blktap/drivers/blktapctrl.c
@@ -245,8 +245,15 @@ static int del_disktype(blkif_t *blkif)
DPRINTF("DEL_DISKTYPE: Freeing entry\n");
free(entry);
+#ifdef ALWAYS_USE_IOEMU
+ return 0;
+#else
/* Caller should close() if no single controller, or list is empty. */
- return (!dtypes[type]->single_handler || (active_disks[type] == NULL));
+ /* tapdisk-ioemu is a single controller regardless of single_hander
+ (TODO: This needs to be per-domain in fact) */
+ return ((!dtypes[type]->single_handler && !dtypes[type]->use_ioemu)
+ || (active_disks[type] == NULL));
+#endif
}
static int write_msg(int fd, int msgtype, void *ptr, void *ptr2)

View File

@ -53,7 +53,17 @@ Index: xen-3.3.1-testing/tools/blktap/drivers/blktapctrl.c
static int launch_tapdisk_ioemu(void) static int launch_tapdisk_ioemu(void)
{ {
@@ -524,7 +531,7 @@ static int connect_qemu(blkif_t *blkif, @@ -505,7 +512,8 @@ static int connect_qemu(blkif_t *blkif,
static int tapdisk_ioemu_pid = 0;
static int dom0_readfd = 0;
static int dom0_writefd = 0;
-
+ int refresh_pid = 0;
+
if (asprintf(&rdctldev, BLKTAP_CTRL_DIR "/qemu-read-%d", domid) < 0)
return -1;
@@ -524,15 +532,23 @@ static int connect_qemu(blkif_t *blkif,
if (tapdisk_ioemu_pid == 0 || kill(tapdisk_ioemu_pid, 0)) { if (tapdisk_ioemu_pid == 0 || kill(tapdisk_ioemu_pid, 0)) {
/* No device model and tapdisk-ioemu doesn't run yet */ /* No device model and tapdisk-ioemu doesn't run yet */
DPRINTF("Launching tapdisk-ioemu\n"); DPRINTF("Launching tapdisk-ioemu\n");
@ -62,12 +72,15 @@ Index: xen-3.3.1-testing/tools/blktap/drivers/blktapctrl.c
dom0_readfd = open_ctrl_socket(wrctldev); dom0_readfd = open_ctrl_socket(wrctldev);
dom0_writefd = open_ctrl_socket(rdctldev); dom0_writefd = open_ctrl_socket(rdctldev);
@@ -533,6 +540,12 @@ static int connect_qemu(blkif_t *blkif, +
+ refresh_pid = 1;
}
DPRINTF("Using tapdisk-ioemu connection\n"); DPRINTF("Using tapdisk-ioemu connection\n");
blkif->fds[READ] = dom0_readfd; blkif->fds[READ] = dom0_readfd;
blkif->fds[WRITE] = dom0_writefd; blkif->fds[WRITE] = dom0_writefd;
+ +
+ if (tapdisk_ioemu_pid == 0) { + if (refresh_pid) {
+ get_tapdisk_pid(blkif); + get_tapdisk_pid(blkif);
+ tapdisk_ioemu_pid = blkif->tappid; + tapdisk_ioemu_pid = blkif->tappid;
+ } + }
@ -75,7 +88,7 @@ Index: xen-3.3.1-testing/tools/blktap/drivers/blktapctrl.c
} else if (access(rdctldev, R_OK | W_OK) == 0) { } else if (access(rdctldev, R_OK | W_OK) == 0) {
/* Use existing pipe to the device model */ /* Use existing pipe to the device model */
DPRINTF("Using qemu-dm connection\n"); DPRINTF("Using qemu-dm connection\n");
@@ -554,6 +567,7 @@ static int connect_qemu(blkif_t *blkif, @@ -554,6 +570,7 @@ static int connect_qemu(blkif_t *blkif,
return 0; return 0;
} }
@ -83,7 +96,7 @@ Index: xen-3.3.1-testing/tools/blktap/drivers/blktapctrl.c
/* Launch tapdisk instance */ /* Launch tapdisk instance */
static int connect_tapdisk(blkif_t *blkif, int minor) static int connect_tapdisk(blkif_t *blkif, int minor)
{ {
@@ -597,6 +611,7 @@ fail: @@ -597,6 +614,7 @@ fail:
return ret; return ret;
} }
@ -91,7 +104,7 @@ Index: xen-3.3.1-testing/tools/blktap/drivers/blktapctrl.c
static int blktapctrl_new_blkif(blkif_t *blkif) static int blktapctrl_new_blkif(blkif_t *blkif)
{ {
@@ -606,13 +621,14 @@ static int blktapctrl_new_blkif(blkif_t @@ -606,13 +624,14 @@ static int blktapctrl_new_blkif(blkif_t
image_t *image; image_t *image;
blkif_t *exist = NULL; blkif_t *exist = NULL;
static uint16_t next_cookie = 0; static uint16_t next_cookie = 0;
@ -107,7 +120,7 @@ Index: xen-3.3.1-testing/tools/blktap/drivers/blktapctrl.c
DPRINTF("Error in blktap device string(%s).\n", DPRINTF("Error in blktap device string(%s).\n",
blk->params); blk->params);
goto fail; goto fail;
@@ -621,13 +637,18 @@ static int blktapctrl_new_blkif(blkif_t @@ -621,13 +640,18 @@ static int blktapctrl_new_blkif(blkif_t
blkif->cookie = next_cookie++; blkif->cookie = next_cookie++;
if (!exist) { if (!exist) {

View File

@ -2,7 +2,7 @@ Index: xen-3.3.1-testing/tools/ioemu-remote/tapdisk-ioemu.c
=================================================================== ===================================================================
--- xen-3.3.1-testing.orig/tools/ioemu-remote/tapdisk-ioemu.c --- xen-3.3.1-testing.orig/tools/ioemu-remote/tapdisk-ioemu.c
+++ xen-3.3.1-testing/tools/ioemu-remote/tapdisk-ioemu.c +++ xen-3.3.1-testing/tools/ioemu-remote/tapdisk-ioemu.c
@@ -100,16 +100,22 @@ int main(void) @@ -100,16 +100,23 @@ int main(void)
struct timeval tv; struct timeval tv;
void *old_fd_start = NULL; void *old_fd_start = NULL;
@ -22,6 +22,7 @@ Index: xen-3.3.1-testing/tools/ioemu-remote/tapdisk-ioemu.c
- -
+ logfile = fopen("/var/log/xen/tapdisk-ioemu.log", "a"); + logfile = fopen("/var/log/xen/tapdisk-ioemu.log", "a");
+ if (logfile) { + if (logfile) {
+ setbuf(logfile, NULL);
+ fclose(stderr); + fclose(stderr);
+ stderr = logfile; + stderr = logfile;
+ } else { + } else {

View File

@ -336,13 +336,18 @@ Index: xen-3.3.1-testing/xen/arch/x86/acpi/pmstat.c
extern uint32_t pmstat_get_cx_nr(uint32_t cpuid); extern uint32_t pmstat_get_cx_nr(uint32_t cpuid);
extern int pmstat_get_cx_stat(uint32_t cpuid, struct pm_cx_stat *stat); extern int pmstat_get_cx_stat(uint32_t cpuid, struct pm_cx_stat *stat);
@@ -49,15 +49,14 @@ extern int pmstat_reset_cx_stat(uint32_t @@ -49,17 +49,15 @@ extern int pmstat_reset_cx_stat(uint32_t
int do_get_pm_info(struct xen_sysctl_get_pmstat *op) int do_get_pm_info(struct xen_sysctl_get_pmstat *op)
{ {
int ret = 0; int ret = 0;
- struct pm_px *pxpt = &px_statistic_data[op->cpuid]; - struct pm_px *pxpt;
- struct processor_pminfo *pmpt = &processor_pminfo[op->cpuid]; const struct processor_pminfo *pmpt;
+ const struct processor_pminfo *pmpt = processor_pminfo[op->cpuid];
if ( (op->cpuid >= NR_CPUS) || !cpu_online(op->cpuid) )
return -EINVAL;
pmpt = processor_pminfo[op->cpuid];
- pxpt = &px_statistic_data[op->cpuid];
/* to protect the case when Px was not controlled by xen */ /* to protect the case when Px was not controlled by xen */
- if ( (!(pmpt->perf.init & XEN_PX_INIT)) && - if ( (!(pmpt->perf.init & XEN_PX_INIT)) &&
@ -350,12 +355,7 @@ Index: xen-3.3.1-testing/xen/arch/x86/acpi/pmstat.c
(op->type & PMSTAT_CATEGORY_MASK) == PMSTAT_PX ) (op->type & PMSTAT_CATEGORY_MASK) == PMSTAT_PX )
return -EINVAL; return -EINVAL;
- if ( !cpu_online(op->cpuid) ) @@ -76,6 +74,10 @@ int do_get_pm_info(struct xen_sysctl_get
+ if ( op->cpuid >= NR_CPUS || !cpu_online(op->cpuid) )
return -EINVAL;
switch( op->type )
@@ -73,6 +72,10 @@ int do_get_pm_info(struct xen_sysctl_get
uint64_t now, ct; uint64_t now, ct;
uint64_t total_idle_ns; uint64_t total_idle_ns;
uint64_t tmp_idle_ns; uint64_t tmp_idle_ns;

View File

@ -0,0 +1,19 @@
A blatant mistake of mine resulted in the return value of alloc_l1_table to
be ignored with the preemptable page table update changes.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Index: 2008-09-19/xen/arch/x86/mm.c
===================================================================
--- 2008-09-19.orig/xen/arch/x86/mm.c 2008-09-19 14:00:01.000000000 +0200
+++ 2008-09-19/xen/arch/x86/mm.c 2008-10-13 12:07:13.000000000 +0200
@@ -1883,8 +1883,7 @@ static int alloc_page_type(struct page_i
switch ( type & PGT_type_mask )
{
case PGT_l1_page_table:
- alloc_l1_table(page);
- rc = 0;
+ rc = alloc_l1_table(page);
break;
case PGT_l2_page_table:
rc = alloc_l2_table(page, type, preemptible);

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:ad242249f77ef42e323e81cbd61afcac37eaa93749a8fe7d5aec2cf4048768ba oid sha256:bbc40412e65f50bdfae0f38d8ea3f51b8df773ffea6cd105988729fe470b4a67
size 22688600 size 22689575

View File

@ -1,3 +1,17 @@
-------------------------------------------------------------------
Mon Oct 13 10:51:51 MDT 2008 - carnold@novell.com
- bnc#431324 - Cannot boot from XEN kernel
-------------------------------------------------------------------
Mon Oct 13 14:27:35 CEST 2008 - kwolf@suse.de
- blktapctrl: Close connection to tapdisk-ioemu only if there are
no more attached disks
blktap-ioemu-close-fix.patch
- blktapctrl: If tapdisk-ioemu has been shut down and a new
instance is needed, fix saving the PID of the new instance
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Oct 2 16:23:15 MDT 2008 - jfehlig@novell.com Thu Oct 2 16:23:15 MDT 2008 - jfehlig@novell.com

View File

@ -1,5 +1,5 @@
# #
# spec file for package xen (Version 3.3.1_18442_01) # spec file for package xen (Version 3.3.1_18447_01)
# #
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# #
@ -21,7 +21,7 @@
Name: xen Name: xen
%define xvers 3.3 %define xvers 3.3
%define xvermaj 3 %define xvermaj 3
%define changeset 18442 %define changeset 18447
%define xen_build_dir xen-3.3.1-testing %define xen_build_dir xen-3.3.1-testing
%if %sles_version %if %sles_version
%define with_kmp 1 %define with_kmp 1
@ -40,7 +40,7 @@ BuildRequires: glibc-32bit glibc-devel-32bit
%if %{?with_kmp}0 %if %{?with_kmp}0
BuildRequires: kernel-source kernel-syms module-init-tools xorg-x11 BuildRequires: kernel-source kernel-syms module-init-tools xorg-x11
%endif %endif
Version: 3.3.1_18442_01 Version: 3.3.1_18447_01
Release: 1 Release: 1
License: GPL v2 only License: GPL v2 only
Group: System/Kernel Group: System/Kernel
@ -85,7 +85,8 @@ Patch12: 18509-continue-hypercall-on-cpu.patch
Patch13: 18520-per-CPU-GDT.patch Patch13: 18520-per-CPU-GDT.patch
Patch14: 18521-per-CPU-TSS.patch Patch14: 18521-per-CPU-TSS.patch
Patch15: 18523-per-CPU-misc.patch Patch15: 18523-per-CPU-misc.patch
Patch16: xenstore-leak.patch Patch16: 18588-do-get-pm-info.patch
Patch17: xenstore-leak.patch
# Our patches # Our patches
Patch100: xen-config.diff Patch100: xen-config.diff
Patch101: xend-config.diff Patch101: xend-config.diff
@ -146,6 +147,7 @@ Patch182: build-tapdisk-ioemu.patch
Patch183: blktapctrl-default-to-ioemu.patch Patch183: blktapctrl-default-to-ioemu.patch
Patch184: ioemu-blktap-barriers.patch Patch184: ioemu-blktap-barriers.patch
Patch185: tapdisk-ioemu-logfile.patch Patch185: tapdisk-ioemu-logfile.patch
Patch186: blktap-ioemu-close-fix.patch
# Jim's domain lock patch # Jim's domain lock patch
Patch190: xend-domain-lock.patch Patch190: xend-domain-lock.patch
# Patches from Jan # Patches from Jan
@ -154,6 +156,7 @@ Patch241: x86-show-page-walk-early.patch
Patch242: svm-lmsl.patch Patch242: svm-lmsl.patch
Patch243: x86-extra-trap-info.patch Patch243: x86-extra-trap-info.patch
Patch244: x86-alloc-cpu-structs.patch Patch244: x86-alloc-cpu-structs.patch
Patch245: x86-page-table-return-fix.patch
Patch250: 32on64-extra-mem.patch Patch250: 32on64-extra-mem.patch
Patch251: msi-enable.patch Patch251: msi-enable.patch
# PV Driver Patches # PV Driver Patches
@ -513,6 +516,7 @@ Authors:
%patch14 -p1 %patch14 -p1
%patch15 -p1 %patch15 -p1
%patch16 -p1 %patch16 -p1
%patch17 -p1
%patch100 -p1 %patch100 -p1
%patch101 -p1 %patch101 -p1
%patch102 -p1 %patch102 -p1
@ -570,12 +574,14 @@ Authors:
%patch183 -p1 %patch183 -p1
%patch184 -p1 %patch184 -p1
%patch185 -p1 %patch185 -p1
%patch186 -p1
%patch190 -p1 %patch190 -p1
%patch240 -p1 %patch240 -p1
%patch241 -p1 %patch241 -p1
%patch242 -p1 %patch242 -p1
%patch243 -p1 %patch243 -p1
%patch244 -p1 %patch244 -p1
%patch245 -p1
%patch250 -p1 %patch250 -p1
%patch251 -p1 %patch251 -p1
%patch350 -p1 %patch350 -p1
@ -932,6 +938,14 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/xen/bin/qemu-dm.debug
/sbin/ldconfig /sbin/ldconfig
%changelog %changelog
* Mon Oct 13 2008 carnold@novell.com
- bnc#431324 - Cannot boot from XEN kernel
* Mon Oct 13 2008 kwolf@suse.de
- blktapctrl: Close connection to tapdisk-ioemu only if there are
no more attached disks
blktap-ioemu-close-fix.patch
- blktapctrl: If tapdisk-ioemu has been shut down and a new
instance is needed, fix saving the PID of the new instance
* Thu Oct 02 2008 jfehlig@novell.com * Thu Oct 02 2008 jfehlig@novell.com
- bnc#431737 - Fix use of deprecated python constructs in xend - bnc#431737 - Fix use of deprecated python constructs in xend
* Mon Sep 29 2008 carnold@novell.com * Mon Sep 29 2008 carnold@novell.com