This commit is contained in:
parent
9730d95e0c
commit
74768fb301
@ -1,3 +1,11 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir.fraser@citrix.com>
|
||||
# Date 1208871634 -3600
|
||||
# Node ID 5355726f01b66565a55ef2201bebd283c1f9a384
|
||||
# Parent 451ae3b8e5c82a9954f33c65bd4ba11337287e8d
|
||||
x86/hvm: fix copy-and-paste mistakes
|
||||
Signed-off-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
Index: xen-3.2.1-testing/xen/arch/x86/hvm/hvm.c
|
||||
===================================================================
|
||||
--- xen-3.2.1-testing.orig/xen/arch/x86/hvm/hvm.c
|
25
17505-shadow-l1e-table-fix.patch
Normal file
25
17505-shadow-l1e-table-fix.patch
Normal file
@ -0,0 +1,25 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir.fraser@citrix.com>
|
||||
# Date 1208953978 -3600
|
||||
# Node ID bc7ee2f93852b0ac1e644a5604dda223f12b8604
|
||||
# Parent 08321f572e37747dd3fd53403996314e3179d6bf
|
||||
x86: Fix a typo in shadow_get_and_create_l1e().
|
||||
|
||||
The typo is benign because sh_page_fault() gates the call to
|
||||
shadow_get_and_create_l1e() on an equivalent test.
|
||||
|
||||
Signed-off-by: Tim Deegan <tim.deegan@citrix.com>
|
||||
|
||||
Index: xen-3.2.1-testing/xen/arch/x86/mm/shadow/multi.c
|
||||
===================================================================
|
||||
--- xen-3.2.1-testing.orig/xen/arch/x86/mm/shadow/multi.c
|
||||
+++ xen-3.2.1-testing/xen/arch/x86/mm/shadow/multi.c
|
||||
@@ -2006,7 +2006,7 @@ static shadow_l1e_t * shadow_get_and_cre
|
||||
else
|
||||
{
|
||||
/* Shadowing an actual guest l1 table */
|
||||
- if ( !mfn_valid(gw->l2mfn) ) return NULL; /* No guest page. */
|
||||
+ if ( !mfn_valid(gw->l1mfn) ) return NULL; /* No guest page. */
|
||||
*sl1mfn = get_shadow_status(v, gw->l1mfn, SH_type_l1_shadow);
|
||||
if ( !mfn_valid(*sl1mfn) )
|
||||
{
|
52
17526-variable-delay-timestamps-fix.patch
Normal file
52
17526-variable-delay-timestamps-fix.patch
Normal file
@ -0,0 +1,52 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir.fraser@citrix.com>
|
||||
# Date 1209631544 -3600
|
||||
# Node ID 013a47065e8c4e815e3b1aba0883341c19238e82
|
||||
# Parent 483d006cc60765357dcdb66ab0fc43c955ecd8fe
|
||||
x86 time: Read platform time before locally-extrapolated time during
|
||||
calibration and frequency changes. This places the variable delay
|
||||
(acquiring the platform_timer_lock) safely as the very first thing we
|
||||
do, avoiding a variable delay /between/ computing the two timestamps.
|
||||
|
||||
Problem diagnosed by Dave Winchell <dwinchell@virtualiron.com>
|
||||
|
||||
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
|
||||
|
||||
Index: xen-3.2.1-testing/xen/arch/x86/time.c
|
||||
===================================================================
|
||||
--- xen-3.2.1-testing.orig/xen/arch/x86/time.c
|
||||
+++ xen-3.2.1-testing/xen/arch/x86/time.c
|
||||
@@ -738,12 +738,13 @@ int cpu_frequency_change(u64 freq)
|
||||
}
|
||||
|
||||
local_irq_disable();
|
||||
- rdtscll(curr_tsc);
|
||||
- t->local_tsc_stamp = curr_tsc;
|
||||
+ /* Platform time /first/, as we may be delayed by platform_timer_lock. */
|
||||
t->stime_master_stamp = read_platform_stime();
|
||||
/* TSC-extrapolated time may be bogus after frequency change. */
|
||||
/*t->stime_local_stamp = get_s_time();*/
|
||||
t->stime_local_stamp = t->stime_master_stamp;
|
||||
+ rdtscll(curr_tsc);
|
||||
+ t->local_tsc_stamp = curr_tsc;
|
||||
set_time_scale(&t->tsc_scale, freq);
|
||||
local_irq_enable();
|
||||
|
||||
@@ -813,11 +814,14 @@ static void local_time_calibration(void
|
||||
prev_local_stime = t->stime_local_stamp;
|
||||
prev_master_stime = t->stime_master_stamp;
|
||||
|
||||
- /* Disable IRQs to get 'instantaneous' current timestamps. */
|
||||
+ /*
|
||||
+ * Disable IRQs to get 'instantaneous' current timestamps. We read platform
|
||||
+ * time first, as we may be delayed when acquiring platform_timer_lock.
|
||||
+ */
|
||||
local_irq_disable();
|
||||
- rdtscll(curr_tsc);
|
||||
- curr_local_stime = get_s_time();
|
||||
curr_master_stime = read_platform_stime();
|
||||
+ curr_local_stime = get_s_time();
|
||||
+ rdtscll(curr_tsc);
|
||||
local_irq_enable();
|
||||
|
||||
#if 0
|
79
17532-xenstored-abort-fix.patch
Normal file
79
17532-xenstored-abort-fix.patch
Normal file
@ -0,0 +1,79 @@
|
||||
# HG changeset patch
|
||||
# User Keir Fraser <keir.fraser@citrix.com>
|
||||
# Date 1209632400 -3600
|
||||
# Node ID 5e5bc5b2bb6d4d71c0de97c15448f2f991f4271d
|
||||
# Parent 2cf9a8736babe63fe1783286f666c3d6fc9af58b
|
||||
xemnstored: Fix xenstored abort when connection dropped.
|
||||
|
||||
If a connection is dropped with pending input and output data then the
|
||||
connection will be dereferenced by both handle_input and handle_output
|
||||
resulting in a double free when the main loop dereferences the
|
||||
connection.
|
||||
|
||||
Fix this issue by taking/releasing a reference over the calls to
|
||||
handle_input and handle_output separately and checking the result of
|
||||
talloc_free to see if the connection went away.
|
||||
|
||||
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
|
||||
|
||||
Index: xen-3.2.1-testing/tools/xenstore/xenstored_core.c
|
||||
===================================================================
|
||||
--- xen-3.2.1-testing.orig/tools/xenstore/xenstored_core.c
|
||||
+++ xen-3.2.1-testing/tools/xenstore/xenstored_core.c
|
||||
@@ -1915,7 +1915,7 @@ int main(int argc, char *argv[])
|
||||
|
||||
/* Main loop. */
|
||||
for (;;) {
|
||||
- struct connection *conn, *old_conn;
|
||||
+ struct connection *conn, *next;
|
||||
|
||||
if (select(max+1, &inset, &outset, NULL, timeout) < 0) {
|
||||
if (errno == EINTR)
|
||||
@@ -1939,27 +1939,39 @@ int main(int argc, char *argv[])
|
||||
if (evtchn_fd != -1 && FD_ISSET(evtchn_fd, &inset))
|
||||
handle_event();
|
||||
|
||||
- conn = list_entry(connections.next, typeof(*conn), list);
|
||||
- while (&conn->list != &connections) {
|
||||
- talloc_increase_ref_count(conn);
|
||||
+ next = list_entry(connections.next, typeof(*conn), list);
|
||||
+ while (&next->list != &connections) {
|
||||
+ conn = next;
|
||||
+
|
||||
+ next = list_entry(conn->list.next,
|
||||
+ typeof(*conn), list);
|
||||
|
||||
if (conn->domain) {
|
||||
+ talloc_increase_ref_count(conn);
|
||||
if (domain_can_read(conn))
|
||||
handle_input(conn);
|
||||
+ if (talloc_free(conn) == 0)
|
||||
+ continue;
|
||||
+
|
||||
+ talloc_increase_ref_count(conn);
|
||||
if (domain_can_write(conn) &&
|
||||
!list_empty(&conn->out_list))
|
||||
handle_output(conn);
|
||||
+ if (talloc_free(conn) == 0)
|
||||
+ continue;
|
||||
} else {
|
||||
+ talloc_increase_ref_count(conn);
|
||||
if (FD_ISSET(conn->fd, &inset))
|
||||
handle_input(conn);
|
||||
+ if (talloc_free(conn) == 0)
|
||||
+ continue;
|
||||
+
|
||||
+ talloc_increase_ref_count(conn);
|
||||
if (FD_ISSET(conn->fd, &outset))
|
||||
handle_output(conn);
|
||||
+ if (talloc_free(conn) == 0)
|
||||
+ continue;
|
||||
}
|
||||
-
|
||||
- old_conn = conn;
|
||||
- conn = list_entry(old_conn->list.next,
|
||||
- typeof(*conn), list);
|
||||
- talloc_free(old_conn);
|
||||
}
|
||||
|
||||
max = initialize_set(&inset, &outset, *sock, *ro_sock,
|
@ -1,39 +0,0 @@
|
||||
diff -ru a/tools/examples/xen-network-common.sh b/tools/examples/xen-network-common.sh
|
||||
--- a/tools/examples/xen-network-common.sh 2008-04-10 15:24:08.000000000 -0600
|
||||
+++ b/tools/examples/xen-network-common.sh 2008-04-10 15:37:33.000000000 -0600
|
||||
@@ -27,26 +27,18 @@
|
||||
# that the virtual device will take once the physical device has
|
||||
# been renamed.
|
||||
|
||||
-if ! which ifup >/dev/null 2>/dev/null
|
||||
-then
|
||||
- preiftransfer()
|
||||
- {
|
||||
+preiftransfer()
|
||||
+{
|
||||
true
|
||||
- }
|
||||
- ifup()
|
||||
- {
|
||||
+}
|
||||
+ifup()
|
||||
+{
|
||||
false
|
||||
- }
|
||||
- ifdown()
|
||||
- {
|
||||
+}
|
||||
+ifdown()
|
||||
+{
|
||||
false
|
||||
- }
|
||||
-else
|
||||
- preiftransfer()
|
||||
- {
|
||||
- true
|
||||
- }
|
||||
-fi
|
||||
+}
|
||||
|
||||
|
||||
first_file()
|
31
bridge-opensuse.patch
Normal file
31
bridge-opensuse.patch
Normal file
@ -0,0 +1,31 @@
|
||||
Index: xen-3.2.1-testing/tools/examples/network-bridge
|
||||
===================================================================
|
||||
--- xen-3.2.1-testing.orig/tools/examples/network-bridge
|
||||
+++ xen-3.2.1-testing/tools/examples/network-bridge
|
||||
@@ -242,18 +242,18 @@ op_stop () {
|
||||
transfer_addrs ${bridge} ${pdev}
|
||||
if ! ifdown ${bridge}; then
|
||||
get_ip_info ${bridge}
|
||||
- fi
|
||||
- ip link set ${pdev} down
|
||||
- ip addr flush ${bridge}
|
||||
+ ip link set ${pdev} down
|
||||
+ ip addr flush ${bridge}
|
||||
|
||||
- brctl delif ${bridge} ${pdev}
|
||||
- ip link set ${bridge} down
|
||||
+ brctl delif ${bridge} ${pdev}
|
||||
+ ip link set ${bridge} down
|
||||
|
||||
- ip link set ${bridge} name ${tdev}
|
||||
+ ip link set ${bridge} name ${tdev}
|
||||
+ brctl delbr ${tdev}
|
||||
+ fi
|
||||
+ ip link set ${pdev} down
|
||||
ip link set ${pdev} name ${netdev}
|
||||
do_ifup ${netdev}
|
||||
-
|
||||
- brctl delbr ${tdev}
|
||||
}
|
||||
|
||||
# adds $dev to $bridge but waits for $dev to be in running state first
|
@ -1,7 +1,8 @@
|
||||
diff -ru a/tools/examples/network-bridge b/tools/examples/network-bridge
|
||||
--- a/tools/examples/network-bridge 2008-04-02 12:33:07.000000000 -0600
|
||||
+++ b/tools/examples/network-bridge 2008-04-02 15:04:59.000000000 -0600
|
||||
@@ -238,6 +238,11 @@
|
||||
Index: xen-3.2.1-testing/tools/examples/network-bridge
|
||||
===================================================================
|
||||
--- xen-3.2.1-testing.orig/tools/examples/network-bridge
|
||||
+++ xen-3.2.1-testing/tools/examples/network-bridge
|
||||
@@ -238,6 +238,11 @@ op_start () {
|
||||
|
||||
create_bridge ${tdev}
|
||||
|
||||
@ -13,9 +14,9 @@ diff -ru a/tools/examples/network-bridge b/tools/examples/network-bridge
|
||||
preiftransfer ${netdev}
|
||||
transfer_addrs ${netdev} ${tdev}
|
||||
if ! ifdown ${netdev}; then
|
||||
@@ -302,6 +307,13 @@
|
||||
|
||||
brctl delbr ${tdev}
|
||||
@@ -302,6 +307,13 @@ op_stop () {
|
||||
ip link set ${pdev} name ${netdev}
|
||||
do_ifup ${netdev}
|
||||
|
||||
+ # Remove record of bridge from /dev/shm/sysconfig/xenbridges ...
|
||||
+ rm -f /dev/shm/sysconfig/xenbridges/${bridge}
|
||||
|
@ -1,7 +1,7 @@
|
||||
Index: xen-3.2-testing/tools/examples/network-bridge
|
||||
Index: xen-3.2.1-testing/tools/examples/network-bridge
|
||||
===================================================================
|
||||
--- xen-3.2-testing.orig/tools/examples/network-bridge
|
||||
+++ xen-3.2-testing/tools/examples/network-bridge
|
||||
--- xen-3.2.1-testing.orig/tools/examples/network-bridge
|
||||
+++ xen-3.2.1-testing/tools/examples/network-bridge
|
||||
@@ -180,6 +180,28 @@ antispoofing () {
|
||||
iptables -A FORWARD -m physdev --physdev-in ${pdev} -j ACCEPT
|
||||
}
|
||||
@ -61,9 +61,9 @@ Index: xen-3.2-testing/tools/examples/network-bridge
|
||||
if ! ifdown ${bridge}; then
|
||||
get_ip_info ${bridge}
|
||||
@@ -254,6 +284,8 @@ op_stop () {
|
||||
ip link set ${pdev} down
|
||||
ip link set ${pdev} name ${netdev}
|
||||
do_ifup ${netdev}
|
||||
|
||||
brctl delbr ${tdev}
|
||||
+
|
||||
+ for vlan in $vlans ; do ifup $vlan ; done
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ Index: xen-3.2.1-testing/xen/arch/x86/mm.c
|
||||
===================================================================
|
||||
--- xen-3.2.1-testing.orig/xen/arch/x86/mm.c
|
||||
+++ xen-3.2.1-testing/xen/arch/x86/mm.c
|
||||
@@ -3370,7 +3370,7 @@ long arch_memory_op(int op, XEN_GUEST_HA
|
||||
@@ -3376,7 +3376,7 @@ long arch_memory_op(int op, XEN_GUEST_HA
|
||||
{
|
||||
if ( is_xen_heap_mfn(prev_mfn) )
|
||||
/* Xen heap frames are simply unhooked from this phys slot. */
|
||||
@ -127,7 +127,7 @@ Index: xen-3.2.1-testing/xen/arch/x86/mm.c
|
||||
else
|
||||
/* Normal domain memory is freed, to avoid leaking memory. */
|
||||
guest_remove_page(d, xatp.gpfn);
|
||||
@@ -3379,10 +3379,10 @@ long arch_memory_op(int op, XEN_GUEST_HA
|
||||
@@ -3385,10 +3385,10 @@ long arch_memory_op(int op, XEN_GUEST_HA
|
||||
/* Unmap from old location, if any. */
|
||||
gpfn = get_gpfn_from_mfn(mfn);
|
||||
if ( gpfn != INVALID_M2P_ENTRY )
|
||||
|
@ -2,7 +2,7 @@
|
||||
Index: xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/Makefile
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/Makefile 2008-04-15 11:09:10.000000000 -0400
|
||||
+++ xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/Makefile 2008-04-23 10:58:49.000000000 -0400
|
||||
@@ -0,0 +1,3 @@
|
||||
+subdir-y += novell
|
||||
+
|
||||
@ -10,7 +10,7 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/Makefile
|
||||
Index: xen-3.2-testing/xen/include/asm-x86/hvm/hvm_extensions.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ xen-3.2-testing/xen/include/asm-x86/hvm/hvm_extensions.h 2008-04-15 11:09:10.000000000 -0400
|
||||
+++ xen-3.2-testing/xen/include/asm-x86/hvm/hvm_extensions.h 2008-04-23 10:58:49.000000000 -0400
|
||||
@@ -0,0 +1,252 @@
|
||||
+/****************************************************************************
|
||||
+ |
|
||||
@ -267,7 +267,7 @@ Index: xen-3.2-testing/xen/include/asm-x86/hvm/hvm_extensions.h
|
||||
Index: xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/hvm_ext.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/hvm_ext.c 2008-04-15 11:09:10.000000000 -0400
|
||||
+++ xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/hvm_ext.c 2008-04-23 10:58:49.000000000 -0400
|
||||
@@ -0,0 +1,350 @@
|
||||
+/****************************************************************************
|
||||
+ |
|
||||
@ -622,14 +622,14 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/hvm_ext.c
|
||||
Index: xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/novell/Makefile
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/novell/Makefile 2008-04-15 11:09:10.000000000 -0400
|
||||
+++ xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/novell/Makefile 2008-04-23 10:58:49.000000000 -0400
|
||||
@@ -0,0 +1,2 @@
|
||||
+obj-y += nsintercept.o
|
||||
+obj-y += nshypercall.o
|
||||
Index: xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/novell/ns_errno.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/novell/ns_errno.h 2008-04-15 11:09:10.000000000 -0400
|
||||
+++ xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/novell/ns_errno.h 2008-04-23 10:58:49.000000000 -0400
|
||||
@@ -0,0 +1,62 @@
|
||||
+/****************************************************************************
|
||||
+ |
|
||||
@ -696,7 +696,7 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/novell/ns_errno.h
|
||||
Index: xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/novell/ns_shim.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/novell/ns_shim.h 2008-04-15 11:19:15.000000000 -0400
|
||||
+++ xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/novell/ns_shim.h 2008-04-23 10:58:49.000000000 -0400
|
||||
@@ -0,0 +1,481 @@
|
||||
+/****************************************************************************
|
||||
+ |
|
||||
@ -1182,7 +1182,7 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/novell/ns_shim.h
|
||||
Index: xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/novell/nshypercall.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/novell/nshypercall.c 2008-04-15 11:09:10.000000000 -0400
|
||||
+++ xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/novell/nshypercall.c 2008-04-23 10:58:49.000000000 -0400
|
||||
@@ -0,0 +1,1232 @@
|
||||
+/****************************************************************************
|
||||
+ |
|
||||
@ -2419,7 +2419,7 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/novell/nshypercall.c
|
||||
Index: xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/novell/nshypercall.h
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/novell/nshypercall.h 2008-04-15 11:09:10.000000000 -0400
|
||||
+++ xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/novell/nshypercall.h 2008-04-23 10:58:49.000000000 -0400
|
||||
@@ -0,0 +1,125 @@
|
||||
+/****************************************************************************
|
||||
+ |
|
||||
@ -2549,8 +2549,8 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/novell/nshypercall.h
|
||||
Index: xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/novell/nsintercept.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/novell/nsintercept.c 2008-04-15 11:25:52.000000000 -0400
|
||||
@@ -0,0 +1,2088 @@
|
||||
+++ xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/novell/nsintercept.c 2008-04-23 11:29:23.000000000 -0400
|
||||
@@ -0,0 +1,2100 @@
|
||||
+/****************************************************************************
|
||||
+ |
|
||||
+ | Copyright (c) [2007, 2008] Novell, Inc.
|
||||
@ -2582,6 +2582,8 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/novell/nsintercept.c
|
||||
+ */
|
||||
+
|
||||
+#include <asm/hvm/hvm_extensions.h>
|
||||
+#include <asm/hvm/vmx/vmcs.h>
|
||||
+#include <asm/hvm/svm/svm.h>
|
||||
+
|
||||
+
|
||||
+#include <asm/config.h>
|
||||
@ -2655,6 +2657,13 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/novell/nsintercept.c
|
||||
+
|
||||
+xen_call_vector_t nsXenVector;
|
||||
+
|
||||
+/*
|
||||
+ * Does the box support hap?
|
||||
+ */
|
||||
+
|
||||
+int nsHapSupported;
|
||||
+
|
||||
+
|
||||
+static inline void
|
||||
+nsInjectException(int trap);
|
||||
+
|
||||
@ -2982,9 +2991,9 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/novell/nsintercept.c
|
||||
+ /*
|
||||
+ *For now we recommend all the features. Need to validate.
|
||||
+ */
|
||||
+ if ( paging_mode_hap(current->domain)) {
|
||||
+ if (nsHapSupported) {
|
||||
+ /*
|
||||
+ * If HAP is enabled; the guest should not use TLB flush
|
||||
+ * If the box support HAP; the guest should not use TLB flush
|
||||
+ * related enlightenments.
|
||||
+ */
|
||||
+ return (0x19);
|
||||
@ -3208,6 +3217,7 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/novell/nsintercept.c
|
||||
+{
|
||||
+ char *p;
|
||||
+
|
||||
+ nsHapSupported = 0;
|
||||
+ if (nsXenVector.hvmFuncTable->guest_x86_mode(current) == 8) {
|
||||
+ curp->nsLongModeGuest = 1;
|
||||
+ } else {
|
||||
@ -3220,8 +3230,10 @@ Index: xen-3.2-testing/xen/arch/x86/hvm/hvm_ext/novell/nsintercept.c
|
||||
+ *(u8 *)(p + 1) = 0x01;
|
||||
+ if (nsXenVector.extCpuIsIntel()) {
|
||||
+ *(u8 *)(p + 2) = 0xc1;
|
||||
+ nsHapSupported = cpu_has_vmx_ept;
|
||||
+ } else {
|
||||
+ *(u8 *)(p + 2) = 0xd9;
|
||||
+ nsHapSupported = cpu_has_svm_npt;
|
||||
+ }
|
||||
+ *(u8 *)(p + 3) = 0xc3; /* ret */
|
||||
+}
|
||||
|
125
x86-compat-vcpu-op.patch
Normal file
125
x86-compat-vcpu-op.patch
Normal file
@ -0,0 +1,125 @@
|
||||
Index: xen-3.2.1-testing/xen/arch/x86/x86_64/domain.c
|
||||
===================================================================
|
||||
--- xen-3.2.1-testing.orig/xen/arch/x86/x86_64/domain.c
|
||||
+++ xen-3.2.1-testing/xen/arch/x86/x86_64/domain.c
|
||||
@@ -9,11 +9,23 @@
|
||||
#include <asm/hypercall.h>
|
||||
#include <compat/vcpu.h>
|
||||
|
||||
+#define xen_vcpu_info vcpu_info
|
||||
+CHECK_SIZE_(struct, vcpu_info);
|
||||
+#undef xen_vcpu_info
|
||||
+
|
||||
+#define xen_vcpu_register_vcpu_info vcpu_register_vcpu_info
|
||||
+CHECK_vcpu_register_vcpu_info;
|
||||
+#undef xen_vcpu_register_vcpu_info
|
||||
+
|
||||
+#define xen_vcpu_get_physid vcpu_get_physid
|
||||
+CHECK_vcpu_get_physid;
|
||||
+#undef xen_vcpu_get_physid
|
||||
+
|
||||
int
|
||||
arch_compat_vcpu_op(
|
||||
int cmd, struct vcpu *v, XEN_GUEST_HANDLE(void) arg)
|
||||
{
|
||||
- long rc = 0;
|
||||
+ int rc = -ENOSYS;
|
||||
|
||||
switch ( cmd )
|
||||
{
|
||||
@@ -51,8 +63,9 @@ arch_compat_vcpu_op(
|
||||
break;
|
||||
}
|
||||
|
||||
- default:
|
||||
- rc = -ENOSYS;
|
||||
+ case VCPUOP_register_vcpu_info:
|
||||
+ case VCPUOP_get_physid:
|
||||
+ rc = arch_do_vcpu_op(cmd, v, arg);
|
||||
break;
|
||||
}
|
||||
|
||||
Index: xen-3.2.1-testing/xen/common/compat/domain.c
|
||||
===================================================================
|
||||
--- xen-3.2.1-testing.orig/xen/common/compat/domain.c
|
||||
+++ xen-3.2.1-testing/xen/common/compat/domain.c
|
||||
@@ -11,11 +11,15 @@
|
||||
#include <xen/hypercall.h>
|
||||
#include <compat/vcpu.h>
|
||||
|
||||
+#define xen_vcpu_set_periodic_timer vcpu_set_periodic_timer
|
||||
+CHECK_vcpu_set_periodic_timer;
|
||||
+#undef xen_vcpu_set_periodic_timer
|
||||
+
|
||||
int compat_vcpu_op(int cmd, int vcpuid, XEN_GUEST_HANDLE(void) arg)
|
||||
{
|
||||
struct domain *d = current->domain;
|
||||
struct vcpu *v;
|
||||
- long rc = 0;
|
||||
+ int rc = 0;
|
||||
|
||||
if ( (vcpuid < 0) || (vcpuid >= MAX_VIRT_CPUS) )
|
||||
return -EINVAL;
|
||||
@@ -57,7 +61,6 @@ int compat_vcpu_op(int cmd, int vcpuid,
|
||||
case VCPUOP_is_up:
|
||||
case VCPUOP_set_periodic_timer:
|
||||
case VCPUOP_stop_periodic_timer:
|
||||
- case VCPUOP_set_singleshot_timer:
|
||||
case VCPUOP_stop_singleshot_timer:
|
||||
case VCPUOP_send_nmi:
|
||||
rc = do_vcpu_op(cmd, vcpuid, arg);
|
||||
@@ -77,6 +80,19 @@ int compat_vcpu_op(int cmd, int vcpuid,
|
||||
break;
|
||||
}
|
||||
|
||||
+ case VCPUOP_set_singleshot_timer:
|
||||
+ {
|
||||
+ struct compat_vcpu_set_singleshot_timer cmp;
|
||||
+ struct vcpu_set_singleshot_timer *nat;
|
||||
+
|
||||
+ if ( copy_from_guest(&cmp, arg, 1) )
|
||||
+ return -EFAULT;
|
||||
+ nat = (void *)COMPAT_ARG_XLAT_VIRT_START(current->vcpu_id);
|
||||
+ XLAT_vcpu_set_singleshot_timer(nat, &cmp);
|
||||
+ rc = do_vcpu_op(cmd, vcpuid, guest_handle_from_ptr(nat, void));
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
default:
|
||||
rc = arch_compat_vcpu_op(cmd, v, arg);
|
||||
break;
|
||||
Index: xen-3.2.1-testing/xen/include/xlat.lst
|
||||
===================================================================
|
||||
--- xen-3.2.1-testing.orig/xen/include/xlat.lst
|
||||
+++ xen-3.2.1-testing/xen/include/xlat.lst
|
||||
@@ -5,6 +5,7 @@
|
||||
? mmu_update xen.h
|
||||
! mmuext_op xen.h
|
||||
! start_info xen.h
|
||||
+? vcpu_info xen.h
|
||||
? vcpu_time_info xen.h
|
||||
! cpu_user_regs arch-x86/xen-@arch@.h
|
||||
! trap_info arch-x86/xen.h
|
||||
@@ -40,6 +41,10 @@
|
||||
? sched_remote_shutdown sched.h
|
||||
? sched_shutdown sched.h
|
||||
? t_buf trace.h
|
||||
+? vcpu_get_physid vcpu.h
|
||||
+? vcpu_register_vcpu_info vcpu.h
|
||||
! vcpu_runstate_info vcpu.h
|
||||
+? vcpu_set_periodic_timer vcpu.h
|
||||
+! vcpu_set_singleshot_timer vcpu.h
|
||||
? xenoprof_init xenoprof.h
|
||||
? xenoprof_passive xenoprof.h
|
||||
Index: xen-3.2.1-testing/xen/tools/get-fields.sh
|
||||
===================================================================
|
||||
--- xen-3.2.1-testing.orig/xen/tools/get-fields.sh
|
||||
+++ xen-3.2.1-testing/xen/tools/get-fields.sh
|
||||
@@ -310,7 +310,6 @@ build_body ()
|
||||
done
|
||||
echo " \\"
|
||||
echo "} while (0)"
|
||||
- echo ""
|
||||
}
|
||||
|
||||
check_field ()
|
70
x86-domain-shutdown-latency.patch
Normal file
70
x86-domain-shutdown-latency.patch
Normal file
@ -0,0 +1,70 @@
|
||||
Index: xen-3.2.1-testing/xen/arch/x86/domain.c
|
||||
===================================================================
|
||||
--- xen-3.2.1-testing.orig/xen/arch/x86/domain.c
|
||||
+++ xen-3.2.1-testing/xen/arch/x86/domain.c
|
||||
@@ -1709,6 +1709,23 @@ static int relinquish_memory(
|
||||
if ( test_and_clear_bit(_PGC_allocated, &page->count_info) )
|
||||
put_page(page);
|
||||
|
||||
+ y = page->u.inuse.type_info;
|
||||
+
|
||||
+ /*
|
||||
+ * Forcibly drop reference counts of page tables above top most (which
|
||||
+ * were skipped to prevent long latencies due to deep recursion - see
|
||||
+ * the special treatment in free_lX_table()).
|
||||
+ */
|
||||
+ if ( type < PGT_root_page_table &&
|
||||
+ unlikely(((y + PGT_type_mask) &
|
||||
+ (PGT_type_mask|PGT_validated)) == type) ) {
|
||||
+ BUG_ON((y & PGT_count_mask) >= (page->count_info & PGC_count_mask));
|
||||
+ while ( y & PGT_count_mask ) {
|
||||
+ put_page_and_type(page);
|
||||
+ y = page->u.inuse.type_info;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
/*
|
||||
* Forcibly invalidate top-most, still valid page tables at this point
|
||||
* to break circular 'linear page table' references. This is okay
|
||||
@@ -1716,7 +1733,6 @@ static int relinquish_memory(
|
||||
* is now dead. Thus top-most valid tables are not in use so a non-zero
|
||||
* count means circular reference.
|
||||
*/
|
||||
- y = page->u.inuse.type_info;
|
||||
for ( ; ; )
|
||||
{
|
||||
x = y;
|
||||
@@ -1880,6 +1896,9 @@ int domain_relinquish_resources(struct d
|
||||
/* fallthrough */
|
||||
|
||||
case RELMEM_done:
|
||||
+ ret = relinquish_memory(d, &d->page_list, PGT_l1_page_table);
|
||||
+ if ( ret )
|
||||
+ return ret;
|
||||
break;
|
||||
|
||||
default:
|
||||
Index: xen-3.2.1-testing/xen/arch/x86/mm.c
|
||||
===================================================================
|
||||
--- xen-3.2.1-testing.orig/xen/arch/x86/mm.c
|
||||
+++ xen-3.2.1-testing/xen/arch/x86/mm.c
|
||||
@@ -1305,6 +1305,9 @@ static void free_l3_table(struct page_in
|
||||
l3_pgentry_t *pl3e;
|
||||
int i;
|
||||
|
||||
+ if(d->arch.relmem == RELMEM_dom_l3)
|
||||
+ return;
|
||||
+
|
||||
pl3e = map_domain_page(pfn);
|
||||
|
||||
for ( i = 0; i < L3_PAGETABLE_ENTRIES; i++ )
|
||||
@@ -1328,6 +1331,9 @@ static void free_l4_table(struct page_in
|
||||
l4_pgentry_t *pl4e = page_to_virt(page);
|
||||
int i;
|
||||
|
||||
+ if(d->arch.relmem == RELMEM_dom_l4)
|
||||
+ return;
|
||||
+
|
||||
for ( i = 0; i < L4_PAGETABLE_ENTRIES; i++ )
|
||||
if ( is_guest_l4_slot(d, i) )
|
||||
put_page_from_l4e(pl4e[i], pfn);
|
92
xen-fixme-doc.diff
Normal file
92
xen-fixme-doc.diff
Normal file
@ -0,0 +1,92 @@
|
||||
Index: xen-3.2-testing/docs/man/xmdomain.cfg.pod.5
|
||||
===================================================================
|
||||
--- xen-3.2-testing.orig/docs/man/xmdomain.cfg.pod.5
|
||||
+++ xen-3.2-testing/docs/man/xmdomain.cfg.pod.5
|
||||
@@ -335,16 +335,10 @@ at hda1, which is the root filesystem.
|
||||
|
||||
=item I<NFS Root>
|
||||
|
||||
-FIXME: write me
|
||||
-
|
||||
=item I<LVM Root>
|
||||
|
||||
-FIXME: write me
|
||||
-
|
||||
=item I<Two Networks>
|
||||
|
||||
-FIXME: write me
|
||||
-
|
||||
=back
|
||||
|
||||
=head1 SEE ALSO
|
||||
Index: xen-3.2-testing/docs/man/xm.pod.1
|
||||
===================================================================
|
||||
--- xen-3.2-testing.orig/docs/man/xm.pod.1
|
||||
+++ xen-3.2-testing/docs/man/xm.pod.1
|
||||
@@ -188,7 +188,8 @@ scheduling by the Xen hypervisor.
|
||||
|
||||
=item B<s - shutdown>
|
||||
|
||||
-FIXME: Why would you ever see this state?
|
||||
+The guest has requested to be shutdown, rebooted or suspended, and the
|
||||
+domain is in the process of being destroyed in response.
|
||||
|
||||
=item B<c - crashed>
|
||||
|
||||
@@ -201,8 +202,6 @@ restart on crash. See L<xmdomain.cfg> f
|
||||
The domain is in process of dying, but hasn't completely shutdown or
|
||||
crashed.
|
||||
|
||||
-FIXME: Is this right?
|
||||
-
|
||||
=back
|
||||
|
||||
B<LONG OUTPUT>
|
||||
@@ -516,8 +515,6 @@ Xen ships with a number of domain schedu
|
||||
time with the B<sched=> parameter on the Xen command line. By
|
||||
default B<credit> is used for scheduling.
|
||||
|
||||
-FIXME: we really need a scheduler expert to write up this section.
|
||||
-
|
||||
=over 4
|
||||
|
||||
=item B<sched-credit> [ B<-d> I<domain-id> [ B<-w>[B<=>I<WEIGHT>] | B<-c>[B<=>I<CAP>] ] ]
|
||||
@@ -567,8 +564,6 @@ The normal EDF scheduling usage in nanos
|
||||
|
||||
The normal EDF scheduling usage in nanoseconds
|
||||
|
||||
-FIXME: these are lame, should explain more.
|
||||
-
|
||||
=item I<latency-hint>
|
||||
|
||||
Scaled period if domain is doing heavy I/O.
|
||||
@@ -712,9 +707,6 @@ the default setting in xend-config.sxp f
|
||||
|
||||
Passes the specified IP Address to the adapter on creation.
|
||||
|
||||
-FIXME: this currently appears to be B<broken>. I'm not sure under what
|
||||
-circumstances this should actually work.
|
||||
-
|
||||
=item B<mac=>I<macaddr>
|
||||
|
||||
The MAC address that the domain will see on its Ethernet device. If
|
||||
@@ -738,9 +730,6 @@ Removes the network device from the doma
|
||||
I<devid> is the virtual interface device number within the domain
|
||||
(i.e. the 3 in vif22.3).
|
||||
|
||||
-FIXME: this is currently B<broken>. Network devices aren't completely
|
||||
-removed from domain 0.
|
||||
-
|
||||
=item B<network-list> [B<-l>|B<--long>]> I<domain-id>
|
||||
|
||||
List virtual network interfaces for a domain. The returned output is
|
||||
@@ -759,9 +748,6 @@ formatted as a list or as an S-Expressio
|
||||
|
||||
The Virtual Network interfaces for Xen.
|
||||
|
||||
-FIXME: This needs a lot more explanation, or it needs to be ripped
|
||||
-out entirely.
|
||||
-
|
||||
=over 4
|
||||
|
||||
=item B<vnet-list> [B<-l>|B<--long>]
|
146
xen-pvfb-security.patch
Normal file
146
xen-pvfb-security.patch
Normal file
@ -0,0 +1,146 @@
|
||||
Index: xen-3.2-testing/tools/ioemu/hw/xenfb.c
|
||||
===================================================================
|
||||
--- xen-3.2-testing.orig/tools/ioemu/hw/xenfb.c 2008-04-29 08:52:06.000000000 -0600
|
||||
+++ xen-3.2-testing/tools/ioemu/hw/xenfb.c 2008-04-29 10:12:41.000000000 -0600
|
||||
@@ -23,8 +23,6 @@
|
||||
#define BTN_LEFT 0x110 /* from <linux/input.h> */
|
||||
#endif
|
||||
|
||||
-// FIXME defend against malicious frontend?
|
||||
-
|
||||
struct xenfb;
|
||||
|
||||
struct xenfb_device {
|
||||
@@ -50,6 +48,7 @@
|
||||
int depth; /* colour depth of guest framebuffer */
|
||||
int width; /* pixel width of guest framebuffer */
|
||||
int height; /* pixel height of guest framebuffer */
|
||||
+ int offset; /* offset of the framebuffer */
|
||||
int abs_pointer_wanted; /* Whether guest supports absolute pointer */
|
||||
int button_state; /* Last seen pointer button state */
|
||||
char protocol[64]; /* frontend protocol */
|
||||
@@ -476,6 +475,75 @@
|
||||
free(xenfb);
|
||||
}
|
||||
|
||||
+static int xenfb_configure_fb(struct xenfb *xenfb, size_t fb_len_lim,
|
||||
+ int width, int height, int depth,
|
||||
+ size_t fb_len, int offset, int row_stride)
|
||||
+{
|
||||
+ size_t mfn_sz = sizeof(*((struct xenfb_page *)0)->pd);
|
||||
+ size_t pd_len = sizeof(((struct xenfb_page *)0)->pd) / mfn_sz;
|
||||
+ size_t fb_pages = pd_len * XC_PAGE_SIZE / mfn_sz;
|
||||
+ size_t fb_len_max = fb_pages * XC_PAGE_SIZE;
|
||||
+ int max_width, max_height;
|
||||
+
|
||||
+ if (fb_len_lim == 0) {
|
||||
+ fprintf(stderr,
|
||||
+ "FB: No fb size limit, limit set to %zu\n",
|
||||
+ fb_len_max);
|
||||
+ fb_len_lim = fb_len_max;
|
||||
+ }
|
||||
+ if (fb_len_lim > fb_len_max) {
|
||||
+ fprintf(stderr,
|
||||
+ "FB: fb size limit %zu exceeds %zu, corrected\n",
|
||||
+ fb_len_lim, fb_len_max);
|
||||
+ fb_len_lim = fb_len_max;
|
||||
+ }
|
||||
+ if (fb_len > fb_len_lim) {
|
||||
+ fprintf(stderr,
|
||||
+ "FB: frontend fb size %zu limited to %zu\n",
|
||||
+ fb_len, fb_len_lim);
|
||||
+ fb_len = fb_len_lim;
|
||||
+ }
|
||||
+ if (depth != 8 && depth != 16 && depth != 24 && depth != 32) {
|
||||
+ fprintf(stderr,
|
||||
+ "FB: can't handle frontend fb depth %d\n",
|
||||
+ depth);
|
||||
+ return -1;
|
||||
+ }
|
||||
+ if (row_stride < 0 || row_stride > fb_len) {
|
||||
+ fprintf(stderr,
|
||||
+ "FB: invalid frontend stride %d\n", row_stride);
|
||||
+ return -1;
|
||||
+ }
|
||||
+ max_width = row_stride / (depth / 8);
|
||||
+ if (width < 0 || width > max_width) {
|
||||
+ fprintf(stderr,
|
||||
+ "FB: invalid frontend width %d limited to %d\n",
|
||||
+ width, max_width);
|
||||
+ width = max_width;
|
||||
+ }
|
||||
+ if (offset < 0 || offset >= fb_len) {
|
||||
+ fprintf(stderr,
|
||||
+ "FB: invalid frontend offset %d (max %zu)\n",
|
||||
+ offset, fb_len - 1);
|
||||
+ return -1;
|
||||
+ }
|
||||
+ max_height = (fb_len - offset) / row_stride;
|
||||
+ if (height < 0 || height > max_height) {
|
||||
+ fprintf(stderr,
|
||||
+ "FB: invalid frontend height %d limited to %d\n",
|
||||
+ height, max_height);
|
||||
+ height = max_height;
|
||||
+ }
|
||||
+ xenfb->fb_len = fb_len;
|
||||
+ xenfb->row_stride = row_stride;
|
||||
+ xenfb->depth = depth;
|
||||
+ xenfb->width = width;
|
||||
+ xenfb->height = height;
|
||||
+ xenfb->offset = offset;
|
||||
+ fprintf(stderr, "Framebuffer %dx%dx%d offset %d stride %d\n",
|
||||
+ width, height, depth, offset, row_stride);
|
||||
+ return 0;
|
||||
+}
|
||||
|
||||
static void xenfb_on_fb_event(struct xenfb *xenfb)
|
||||
{
|
||||
@@ -511,10 +579,17 @@
|
||||
xenfb_guest_copy(xenfb, x, y, w, h);
|
||||
break;
|
||||
case XENFB_TYPE_RESIZE:
|
||||
- xenfb->width = event->resize.width;
|
||||
- xenfb->height = event->resize.height;
|
||||
- xenfb->row_stride = event->resize.stride;
|
||||
+ if (xenfb_configure_fb(xenfb, xenfb->fb_len,
|
||||
+ event->resize.width,
|
||||
+ event->resize.height,
|
||||
+ event->resize.depth,
|
||||
+ xenfb->fb_len,
|
||||
+ 0,
|
||||
+ event->resize.stride) < 0)
|
||||
+ break;
|
||||
+
|
||||
dpy_resize(xenfb->ds, xenfb->width, xenfb->height);
|
||||
+ xenfb_invalidate(xenfb);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -695,22 +770,14 @@
|
||||
|
||||
if (xenfb_xs_scanf1(xenfb->xsh, xenfb->fb.nodename, "videoram", "%d", &videoram) < 0)
|
||||
videoram = 0;
|
||||
- videoram = videoram * 1024 * 1024;
|
||||
|
||||
fb_page = xenfb->fb.page;
|
||||
- xenfb->depth = fb_page->depth;
|
||||
- xenfb->width = fb_page->width;
|
||||
- xenfb->height = fb_page->height;
|
||||
- xenfb->fb_len = fb_page->mem_length;
|
||||
- xenfb->row_stride = fb_page->line_length;
|
||||
- /* Protect against hostile frontend, limit fb_len to configured */
|
||||
- if (videoram && xenfb->fb_len > videoram) {
|
||||
- xenfb->fb_len = videoram;
|
||||
- if (xenfb->row_stride * xenfb->height > xenfb->fb_len)
|
||||
- xenfb->height = xenfb->fb_len / xenfb->row_stride;
|
||||
+ if (xenfb_configure_fb(xenfb, videoram * 1024 * 1024U,
|
||||
+ fb_page->width, fb_page->height, fb_page->depth,
|
||||
+ fb_page->mem_length, 0, fb_page->line_length) < 0) {
|
||||
+ errno = EINVAL;
|
||||
+ return -1;
|
||||
}
|
||||
- fprintf(stderr, "Framebuffer depth %d width %d height %d line %d\n",
|
||||
- fb_page->depth, fb_page->width, fb_page->height, fb_page->line_length);
|
||||
if (xenfb_map_fb(xenfb, xenfb->fb.otherend_id) < 0)
|
||||
return -1;
|
||||
|
99
xen-shift-key.patch
Normal file
99
xen-shift-key.patch
Normal file
@ -0,0 +1,99 @@
|
||||
Index: xen-3.2-testing/tools/ioemu/keymaps.c
|
||||
===================================================================
|
||||
--- xen-3.2-testing.orig/tools/ioemu/keymaps.c 2008-01-16 13:19:03.000000000 -0700
|
||||
+++ xen-3.2-testing/tools/ioemu/keymaps.c 2008-05-07 09:02:03.000000000 -0600
|
||||
@@ -50,6 +50,7 @@
|
||||
struct key_range *keypad_range;
|
||||
struct key_range *numlock_range;
|
||||
struct key_range *shift_range;
|
||||
+ struct key_range *localstate_range;
|
||||
} kbd_layout_t;
|
||||
|
||||
static void add_to_key_range(struct key_range **krp, int code) {
|
||||
@@ -126,11 +127,15 @@
|
||||
if (rest && strstr(rest, "numlock")) {
|
||||
add_to_key_range(&k->keypad_range, keycode);
|
||||
add_to_key_range(&k->numlock_range, keysym);
|
||||
- fprintf(stderr, "keypad keysym %04x keycode %d\n", keysym, keycode);
|
||||
+ //fprintf(stderr, "keypad keysym %04x keycode %d\n", keysym, keycode);
|
||||
}
|
||||
if (rest && strstr(rest, "shift")) {
|
||||
add_to_key_range(&k->shift_range, keysym);
|
||||
- fprintf(stderr, "shift keysym %04x keycode %d\n", keysym, keycode);
|
||||
+ //fprintf(stderr, "shift keysym %04x keycode %d\n", keysym, keycode);
|
||||
+ }
|
||||
+ if (rest && strstr(rest, "localstate")) {
|
||||
+ add_to_key_range(&k->localstate_range, keycode);
|
||||
+ //fprintf(stderr, "localstate keysym %04x keycode %d\n", keysym, keycode);
|
||||
}
|
||||
|
||||
/* if(keycode&0x80)
|
||||
@@ -221,3 +226,14 @@
|
||||
return 1;
|
||||
return 0;
|
||||
}
|
||||
+
|
||||
+static int keycodeIsShiftable(void *kbd_layout, int keycode)
|
||||
+{
|
||||
+ kbd_layout_t *k = kbd_layout;
|
||||
+ struct key_range *kr;
|
||||
+
|
||||
+ for (kr = k->localstate_range; kr; kr = kr->next)
|
||||
+ if (keycode >= kr->start && keycode <= kr->end)
|
||||
+ return 0;
|
||||
+ return 1;
|
||||
+}
|
||||
Index: xen-3.2-testing/tools/ioemu/vnc.c
|
||||
===================================================================
|
||||
--- xen-3.2-testing.orig/tools/ioemu/vnc.c 2008-05-06 14:38:17.000000000 -0600
|
||||
+++ xen-3.2-testing/tools/ioemu/vnc.c 2008-05-07 09:01:10.000000000 -0600
|
||||
@@ -1107,6 +1107,7 @@
|
||||
int keycode;
|
||||
int shift_keys = 0;
|
||||
int shift = 0;
|
||||
+ int keypad = 0;
|
||||
|
||||
if (is_graphic_console()) {
|
||||
if (sym >= 'A' && sym <= 'Z') {
|
||||
@@ -1163,7 +1164,8 @@
|
||||
return;
|
||||
}
|
||||
|
||||
- if (keycodeIsKeypad(vs->kbd_layout, keycode)) {
|
||||
+ keypad = keycodeIsKeypad(vs->kbd_layout, keycode);
|
||||
+ if (keypad) {
|
||||
/* If the numlock state needs to change then simulate an additional
|
||||
keypress before sending this one. This will happen if the user
|
||||
toggles numlock away from the VNC window.
|
||||
@@ -1183,14 +1185,15 @@
|
||||
|
||||
if (is_graphic_console()) {
|
||||
/* If the shift state needs to change then simulate an additional
|
||||
- keypress before sending this one. Ignore for escape key, need to
|
||||
- enhance for other non shiftable keys.
|
||||
+ keypress before sending this one. Ignore for keypad keys and
|
||||
+ those that have localstate, See keymaps/common
|
||||
*/
|
||||
- if (shift && !shift_keys && keycode != 1) {
|
||||
+ if (shift && !shift_keys) {
|
||||
press_key_shift_down(vs, down, keycode);
|
||||
return;
|
||||
}
|
||||
- else if (!shift && shift_keys && keycode != 1) {
|
||||
+ else if (!shift && shift_keys && !keypad &&
|
||||
+ keycodeIsShiftable(vs->kbd_layout, keycode)) {
|
||||
press_key_shift_up(vs, down, keycode);
|
||||
return;
|
||||
}
|
||||
Index: xen-3.2-testing/tools/ioemu/vnc_keysym.h
|
||||
===================================================================
|
||||
--- xen-3.2-testing.orig/tools/ioemu/vnc_keysym.h 2008-01-16 13:19:03.000000000 -0700
|
||||
+++ xen-3.2-testing/tools/ioemu/vnc_keysym.h 2008-05-07 09:01:26.000000000 -0600
|
||||
@@ -345,6 +345,7 @@
|
||||
{"Num_Lock", 0xff7f}, /* XK_Num_Lock */
|
||||
{"Pause", 0xff13}, /* XK_Pause */
|
||||
{"Escape", 0xff1b}, /* XK_Escape */
|
||||
+{"ISO_Left_Tab", 0xfe20},/* XK_ISO_Left_Tab */
|
||||
|
||||
/* localized keys */
|
||||
{"BackApostrophe", 0xff21},
|
53
xen-vnc-resize.patch
Normal file
53
xen-vnc-resize.patch
Normal file
@ -0,0 +1,53 @@
|
||||
Index: xen-3.2-testing/tools/ioemu/vnc.c
|
||||
===================================================================
|
||||
--- xen-3.2-testing.orig/tools/ioemu/vnc.c 2008-05-09 12:16:09.000000000 -0600
|
||||
+++ xen-3.2-testing/tools/ioemu/vnc.c 2008-05-09 12:21:37.000000000 -0600
|
||||
@@ -244,6 +244,7 @@
|
||||
static void vnc_update_client(void *opaque);
|
||||
static void vnc_client_read(void *opaque);
|
||||
static void framebuffer_set_updated(VncState *vs, int x, int y, int w, int h);
|
||||
+static void vnc_write_newsize(VncState *vs);
|
||||
|
||||
#if 0
|
||||
static inline void vnc_set_bit(uint32_t *d, int k)
|
||||
@@ -356,11 +357,7 @@
|
||||
ds->height = h;
|
||||
ds->linesize = w * vs->depth;
|
||||
if (vs->csock != -1 && vs->has_resize && size_changed) {
|
||||
- vnc_write_u8(vs, 0); /* msg id */
|
||||
- vnc_write_u8(vs, 0);
|
||||
- vnc_write_u16(vs, 1); /* number of rects */
|
||||
- vnc_framebuffer_update(vs, 0, 0, ds->width, ds->height, -223);
|
||||
- vnc_flush(vs);
|
||||
+ vnc_write_newsize(vs);
|
||||
vs->width = ds->width;
|
||||
vs->height = ds->height;
|
||||
}
|
||||
@@ -370,6 +367,15 @@
|
||||
framebuffer_set_updated(vs, 0, 0, ds->width, ds->height);
|
||||
}
|
||||
|
||||
+static void vnc_write_newsize(VncState *vs)
|
||||
+{
|
||||
+ vnc_write_u8(vs, 0); /* msg id */
|
||||
+ vnc_write_u8(vs, 0);
|
||||
+ vnc_write_u16(vs, 1); /* number of rects */
|
||||
+ vnc_framebuffer_update(vs, 0, 0, vs->ds->width, vs->ds->height, -223);
|
||||
+ vnc_flush(vs);
|
||||
+}
|
||||
+
|
||||
/* fastest code */
|
||||
static void vnc_write_pixels_copy(VncState *vs, void *pixels, int size)
|
||||
{
|
||||
@@ -1300,6 +1306,11 @@
|
||||
break;
|
||||
case -223: /* DesktopResize */
|
||||
vs->has_resize = 1;
|
||||
+ if (vs->width != vs->ds->width || vs->height != vs->ds->height) {
|
||||
+ vnc_write_newsize(vs);
|
||||
+ vs->width = vs->ds->width;
|
||||
+ vs->height = vs->ds->height;
|
||||
+ }
|
||||
break;
|
||||
case -257:
|
||||
vs->has_pointer_type_change = 1;
|
30
xen.changes
30
xen.changes
@ -1,3 +1,33 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri May 23 09:13:59 MDT 2008 - jfehlig@novell.com
|
||||
|
||||
- bnc#378595 - Revert patch that disables use of ifup/ifdown.
|
||||
ifup-bridge in sysconfig has been fixed so patch is no longer
|
||||
needed. Calling ifdown on bridge now removes ports and deletes
|
||||
bridge, so network-bridge no longer needs to do these tasks.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri May 16 15:29:26 MDT 2008 - carnold@novell.com
|
||||
|
||||
- bnc#390985 - xm man page needs FIXME sections to be fixed
|
||||
xen-fixme-doc.diff
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 14 11:00:42 MDT 2008 - carnold@novell.com
|
||||
|
||||
- bnc#375322 - L3:timer went backwards
|
||||
x86-domain-shutdown-latency.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat May 10 12:56:24 MDT 2008 - plc@novell.com
|
||||
|
||||
- bnc#388969 - Shift tab traversal does not work
|
||||
xen-shift-key.patch
|
||||
- bnc#384277 - PVFB security hole
|
||||
xen-pvfb-security.patch
|
||||
- bnc#385586 - VNC windows size too small
|
||||
xen-vnc-resize.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Apr 25 13:24:39 MDT 2008 - carnold@novell.com
|
||||
|
||||
|
50
xen.spec
50
xen.spec
@ -1,5 +1,5 @@
|
||||
#
|
||||
# spec file for package xen (Version 3.2.1_16881_01)
|
||||
# spec file for package xen (Version 3.2.1_16881_04)
|
||||
#
|
||||
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# This file and all modifications and additions to the pristine
|
||||
@ -33,7 +33,7 @@ BuildRequires: glibc-32bit glibc-devel-32bit
|
||||
%if %{?with_kmp}0
|
||||
BuildRequires: kernel-source kernel-syms module-init-tools xorg-x11
|
||||
%endif
|
||||
Version: 3.2.1_16881_01
|
||||
Version: 3.2.1_16881_04
|
||||
Release: 1
|
||||
License: GPL v2 only
|
||||
Group: System/Kernel
|
||||
@ -91,6 +91,10 @@ Patch27: 17233-hap-check.patch
|
||||
Patch28: 17246-numa-node-selection-fix.patch
|
||||
Patch29: 17248-hvm-ignore-USB-RMRR.patch
|
||||
Patch30: 17315-windows-bug-check-0x101-fix.patch
|
||||
Patch31: 17500-hvm-load-diags.patch
|
||||
Patch32: 17505-shadow-l1e-table-fix.patch
|
||||
Patch33: 17526-variable-delay-timestamps-fix.patch
|
||||
Patch34: 17532-xenstored-abort-fix.patch
|
||||
# Our patches
|
||||
Patch100: xen-config.diff
|
||||
Patch101: xend-config.diff
|
||||
@ -101,6 +105,7 @@ Patch105: xen-changeset.diff
|
||||
Patch106: xen-paths.diff
|
||||
Patch107: xen-xmexample.diff
|
||||
Patch108: xen-xmexample-nbd.diff
|
||||
Patch109: xen-fixme-doc.diff
|
||||
Patch111: xen-domUloader.diff
|
||||
Patch112: xen-no-dummy-nfs-ip.diff
|
||||
Patch113: serial-split.patch
|
||||
@ -126,7 +131,7 @@ Patch137: qemu-security-etch1.diff
|
||||
Patch138: vnc-i18n-keys.diff
|
||||
Patch139: rpmlint.diff
|
||||
Patch140: cdrom-removable.patch
|
||||
Patch150: bridge-opensuse-11_0-temp.patch
|
||||
Patch150: bridge-opensuse.patch
|
||||
Patch151: bridge-vlan.diff
|
||||
Patch152: bridge-bonding.diff
|
||||
Patch153: bridge-hostonly.diff
|
||||
@ -141,6 +146,9 @@ Patch161: keymap-vm.patch
|
||||
Patch162: keymap_nl-be.patch
|
||||
Patch163: key-shift-escape.patch
|
||||
Patch164: key-altgr.patch
|
||||
Patch165: xen-shift-key.patch
|
||||
Patch166: xen-pvfb-security.patch
|
||||
Patch167: xen-vnc-resize.patch
|
||||
# Maybe later
|
||||
Patch200: hvm-ide-flush-o_direct.patch
|
||||
# Patches from Jan
|
||||
@ -148,13 +156,14 @@ Patch240: xenctx.patch
|
||||
Patch241: const-callback-arg.patch
|
||||
Patch242: const-set-trap-table-arg.patch
|
||||
Patch243: pv-drv-mkbuildtree.patch
|
||||
Patch244: x86-show-page-walk-early.patch
|
||||
Patch245: svm-lmsl.patch
|
||||
Patch246: x86_emulate.patch
|
||||
Patch247: x86-hvm-load-diags.patch
|
||||
Patch244: x86-compat-vcpu-op.patch
|
||||
Patch245: x86-show-page-walk-early.patch
|
||||
Patch246: svm-lmsl.patch
|
||||
Patch247: x86_emulate.patch
|
||||
Patch248: x86-pgtable-no-biglock.patch
|
||||
Patch249: x86-extra-trap-info.patch
|
||||
Patch250: 32on64-extra-mem.patch
|
||||
Patch251: x86-domain-shutdown-latency.patch
|
||||
# PV Driver Patches
|
||||
Patch350: pv-driver-build.patch
|
||||
Patch351: xen-ioemu-hvm-pv-support.diff
|
||||
@ -535,6 +544,10 @@ Authors:
|
||||
%patch28 -p1
|
||||
%patch29 -p1
|
||||
%patch30 -p1
|
||||
%patch31 -p1
|
||||
%patch32 -p1
|
||||
%patch33 -p1
|
||||
%patch34 -p1
|
||||
%patch100 -p1
|
||||
%patch101 -p1
|
||||
%patch102 -p1
|
||||
@ -544,6 +557,7 @@ Authors:
|
||||
%patch106 -p1
|
||||
%patch107 -p1
|
||||
%patch108 -p1
|
||||
%patch109 -p1
|
||||
%patch111 -p1
|
||||
%patch112 -p1
|
||||
%patch113 -p1
|
||||
@ -584,6 +598,9 @@ Authors:
|
||||
%patch162 -p1
|
||||
%patch163 -p1
|
||||
%patch164 -p1
|
||||
%patch165 -p1
|
||||
%patch166 -p1
|
||||
%patch167 -p1
|
||||
#%patch200 -p1
|
||||
%patch240 -p1
|
||||
%patch241 -p1
|
||||
@ -596,6 +613,7 @@ Authors:
|
||||
%patch248 -p1
|
||||
%patch249 -p1
|
||||
%patch250 -p1
|
||||
%patch251 -p1
|
||||
%patch350 -p1
|
||||
%patch351 -p1
|
||||
%patch352 -p1
|
||||
@ -918,6 +936,24 @@ rm -f $RPM_BUILD_ROOT/%pysite/*.egg-info
|
||||
/sbin/ldconfig
|
||||
|
||||
%changelog
|
||||
* Fri May 23 2008 jfehlig@novell.com
|
||||
- bnc#378595 - Revert patch that disables use of ifup/ifdown.
|
||||
ifup-bridge in sysconfig has been fixed so patch is no longer
|
||||
needed. Calling ifdown on bridge now removes ports and deletes
|
||||
bridge, so network-bridge no longer needs to do these tasks.
|
||||
* Fri May 16 2008 carnold@novell.com
|
||||
- bnc#390985 - xm man page needs FIXME sections to be fixed
|
||||
xen-fixme-doc.diff
|
||||
* Wed May 14 2008 carnold@novell.com
|
||||
- bnc#375322 - L3:timer went backwards
|
||||
x86-domain-shutdown-latency.patch
|
||||
* Sat May 10 2008 plc@novell.com
|
||||
- bnc#388969 - Shift tab traversal does not work
|
||||
xen-shift-key.patch
|
||||
- bnc#384277 - PVFB security hole
|
||||
xen-pvfb-security.patch
|
||||
- bnc#385586 - VNC windows size too small
|
||||
xen-vnc-resize.patch
|
||||
* Fri Apr 25 2008 carnold@novell.com
|
||||
- bnc#383513 - Unknown unit 'K' in Xen's logrotate config file.
|
||||
* Fri Apr 25 2008 carnold@novell.com
|
||||
|
Loading…
Reference in New Issue
Block a user