- fate#310510 - fix xenpaging
24269-mem_event_move_mem_event_domain_out_of_struct_domain.patch 24270-Free_d-mem_event_on_domain_destruction..patch - fate#310510 - fix xenpaging 24318-x86-mm_Fix_checks_during_foreign_mapping_of_paged_pages.patch - fate#310510 - fix xenpaging 23949-constify_vcpu_set_affinitys_second_parameter.patch - fate#310510 - fix xenpaging 24105-xenpaging_compare_domain_pointer_in_p2m_mem_paging_populate.patch 24106-mem_event_check_capabilities_only_once.patch - fate#310510 - fix xenpaging 24272-xenpaging_Fix_c-s_235070a29c8c3ddf7_update_machine_to_phys_mapping_during_page_deallocation.patch - bnc#727081 - xend domains don't work anymore since update from 12.1 beta to 12.1 RC 1 24344-tools-x86_64_Fix_cpuid_inline_asm_to_not_clobber_stacks_red_zone.patch 24345-tools-libxc_Fix_x86_32_build_breakage_in_previous_changeset..patch - bnc#733449 - Panic in mcfg_ioremap when booting xen-dbg.gz on Xeon E3-1230 24341-x86-64-mmcfg_remove___initdata_annotation_overlooked_in_23749e8d1c8f074ba.patch - fate#310510 - fix xenpaging backport waitqueue changes from xen-unstable 24104-waitqueue_Double_size_of_x86_shadow_stack..patch 24171-x86waitqueue_Allocate_whole_page_for_shadow_stack..patch 24195-waitqueue_Detect_saved-stack_overflow_and_crash_the_guest..patch 24196-waitqueue_Reorder_prepare_to_wait_so_that_vcpu_is_definitely_on_the.patch 24197-x86-waitqueue_Because_we_have_per-cpu_stacks_we_must_wake_up_on_teh.patch 24231-waitqueue_Implement_wake_up_nroneall..patch 24232-waitqueue_Hold_a_reference_to_a_domain_on_a_waitqueue..patch - fate#310510 - fix xenpaging 24227-xenpaging_restrict_pagefile_permissions.patch - fate#310510 - fix xenpaging merge upstream version of our existing patches: 24218-libxc_add_bitmap_clear_function.patch remove old versions: xenpaging.bitmap_clear.patch - fate#310510 - fix xenpaging merge upstream version of our existing patches: 24138-xenpaging_munmap_all_pages_after_page-in.patch 24208-xenpaging_remove_filename_from_comment.patch 24209-xenpaging_remove_obsolete_comment_in_resume_path.patch 24210-xenpaging_use_PERROR_to_print_errno.patch 24211-xenpaging_simplify_file_op.patch 24212-xenpaging_print_gfn_in_failure_case.patch 24213-xenpaging_update_xenpaging_init.patch 24214-xenpaging_remove_xc_dominfo_t_from_paging_t.patch 24215-xenpaging_track_the_number_of_paged-out_pages.patch 24216-xenpaging_move_page_add-resume_loops_into_its_own_function..patch 24217-xenpaging_improve_mainloop_exit_handling.patch 24219-xenpaging_retry_unpageable_gfns.patch 24220-xenpaging_install_into_LIBEXEC_dir.patch 24221-xenpaging_add_XEN_PAGING_DIR_-_libxl_xenpaging_dir_path.patch 24222-xenpaging_use_guests_tot_pages_as_working_target.patch 24223-xenpaging_watch_the_guests_memory-target-tot_pages_xenstore_value.patch 24224-xenpaging_add_cmdline_interface_for_pager.patch 24225-xenpaging_improve_policy_mru_list_handling.patch 24226-xenpaging_add_debug_to_show_received_watch_event..patch remove old versions: xenpaging.XEN_PAGING_DIR.patch xenpaging.add_evict_pages.patch xenpaging.cmdline-interface.patch xenpaging.encapsulate_domain_info.patch xenpaging.file_op-return-code.patch xenpaging.install-to-libexec.patch xenpaging.low_target_policy_nomru.patch xenpaging.main-loop-exit-handling.patch xenpaging.misleading-comment.patch xenpaging.page_in-munmap-size.patch xenpaging.print-gfn.patch xenpaging.record-numer-paged-out-pages.patch xenpaging.reset-uncomsumed.patch xenpaging.stale-comments.patch xenpaging.target-tot_pages.patch xenpaging.use-PERROR.patch xenpaging.watch-target-tot_pages.patch xenpaging.watch_event-DPRINTF.patch xenpaging.xc_interface_open-comment.patch - bnc#733348 - Use 'xm' in various scripts if xend is running. Modified xmclone.sh and xen-updown.sh - Only emit xl warning when xend is running and -f (force) flag is not specified. Modified disable-xl-when-using-xend.patch - Upstream patches from Jan 24190-hap-log-dirty-disable-rc.patch 24193-hap-track-dirty-vram-rc.patch 24201-x86-pcpu-platform-op.patch OBS-URL: https://build.opensuse.org/package/show/Virtualization/xen?expand=0&rev=161
This commit is contained in:
parent
ac6e56e6d7
commit
3e2a25f4c0
127
23949-constify_vcpu_set_affinitys_second_parameter.patch
Normal file
127
23949-constify_vcpu_set_affinitys_second_parameter.patch
Normal file
@ -0,0 +1,127 @@
|
||||
changeset: 23949:39df16923958
|
||||
user: Jan Beulich <jbeulich@suse.com>
|
||||
date: Thu Oct 13 10:00:13 2011 +0200
|
||||
files: xen/arch/x86/cpu/mcheck/vmce.c xen/arch/x86/traps.c xen/common/schedule.c xen/include/xen/sched.h
|
||||
description:
|
||||
constify vcpu_set_affinity()'s second parameter
|
||||
|
||||
None of the callers actually make use of the function's returning of
|
||||
the old affinity through its second parameter, and eliminating this
|
||||
capability allows some callers to no longer use a local variable here,
|
||||
reducing their stack footprint significantly when building with large
|
||||
NR_CPUS.
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@suse.com>
|
||||
Acked-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
|
||||
---
|
||||
xen/arch/x86/cpu/mcheck/vmce.c | 5 +----
|
||||
xen/arch/x86/traps.c | 10 ++--------
|
||||
xen/common/schedule.c | 6 ++----
|
||||
xen/include/xen/sched.h | 2 +-
|
||||
4 files changed, 6 insertions(+), 17 deletions(-)
|
||||
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/cpu/mcheck/vmce.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/cpu/mcheck/vmce.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/cpu/mcheck/vmce.c
|
||||
@@ -304,7 +304,6 @@ int vmce_wrmsr(u32 msr, u64 val)
|
||||
int inject_vmce(struct domain *d)
|
||||
{
|
||||
int cpu = smp_processor_id();
|
||||
- cpumask_t affinity;
|
||||
|
||||
/* PV guest and HVM guest have different vMCE# injection methods. */
|
||||
if ( !test_and_set_bool(d->vcpu[0]->mce_pending) )
|
||||
@@ -323,11 +322,9 @@ int inject_vmce(struct domain *d)
|
||||
{
|
||||
d->vcpu[0]->cpu_affinity_tmp =
|
||||
d->vcpu[0]->cpu_affinity;
|
||||
- cpus_clear(affinity);
|
||||
- cpu_set(cpu, affinity);
|
||||
mce_printk(MCE_VERBOSE, "MCE: CPU%d set affinity, old %d\n",
|
||||
cpu, d->vcpu[0]->processor);
|
||||
- vcpu_set_affinity(d->vcpu[0], &affinity);
|
||||
+ vcpu_set_affinity(d->vcpu[0], cpumask_of(cpu));
|
||||
vcpu_kick(d->vcpu[0]);
|
||||
}
|
||||
else
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/traps.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/traps.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/traps.c
|
||||
@@ -3104,7 +3104,6 @@ static void nmi_mce_softirq(void)
|
||||
{
|
||||
int cpu = smp_processor_id();
|
||||
struct softirq_trap *st = &per_cpu(softirq_trap, cpu);
|
||||
- cpumask_t affinity;
|
||||
|
||||
BUG_ON(st == NULL);
|
||||
BUG_ON(st->vcpu == NULL);
|
||||
@@ -3120,9 +3119,7 @@ static void nmi_mce_softirq(void)
|
||||
* Make sure to wakeup the vcpu on the
|
||||
* specified processor.
|
||||
*/
|
||||
- cpus_clear(affinity);
|
||||
- cpu_set(st->processor, affinity);
|
||||
- vcpu_set_affinity(st->vcpu, &affinity);
|
||||
+ vcpu_set_affinity(st->vcpu, cpumask_of(st->processor));
|
||||
|
||||
/* Affinity is restored in the iret hypercall. */
|
||||
}
|
||||
@@ -3192,14 +3189,11 @@ void async_exception_cleanup(struct vcpu
|
||||
!test_and_set_bool(curr->mce_pending) )
|
||||
{
|
||||
int cpu = smp_processor_id();
|
||||
- cpumask_t affinity;
|
||||
|
||||
curr->cpu_affinity_tmp = curr->cpu_affinity;
|
||||
- cpus_clear(affinity);
|
||||
- cpu_set(cpu, affinity);
|
||||
printk(XENLOG_DEBUG "MCE: CPU%d set affinity, old %d\n",
|
||||
cpu, curr->processor);
|
||||
- vcpu_set_affinity(curr, &affinity);
|
||||
+ vcpu_set_affinity(curr, cpumask_of(cpu));
|
||||
}
|
||||
}
|
||||
}
|
||||
Index: xen-4.1.2-testing/xen/common/schedule.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/common/schedule.c
|
||||
+++ xen-4.1.2-testing/xen/common/schedule.c
|
||||
@@ -593,9 +593,9 @@ int cpu_disable_scheduler(unsigned int c
|
||||
return ret;
|
||||
}
|
||||
|
||||
-int vcpu_set_affinity(struct vcpu *v, cpumask_t *affinity)
|
||||
+int vcpu_set_affinity(struct vcpu *v, const cpumask_t *affinity)
|
||||
{
|
||||
- cpumask_t online_affinity, old_affinity;
|
||||
+ cpumask_t online_affinity;
|
||||
cpumask_t *online;
|
||||
|
||||
if ( v->domain->is_pinned )
|
||||
@@ -607,9 +607,7 @@ int vcpu_set_affinity(struct vcpu *v, cp
|
||||
|
||||
vcpu_schedule_lock_irq(v);
|
||||
|
||||
- old_affinity = v->cpu_affinity;
|
||||
v->cpu_affinity = *affinity;
|
||||
- *affinity = old_affinity;
|
||||
if ( !cpu_isset(v->processor, v->cpu_affinity) )
|
||||
set_bit(_VPF_migrating, &v->pause_flags);
|
||||
|
||||
Index: xen-4.1.2-testing/xen/include/xen/sched.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/xen/sched.h
|
||||
+++ xen-4.1.2-testing/xen/include/xen/sched.h
|
||||
@@ -623,7 +623,7 @@ void scheduler_free(struct scheduler *sc
|
||||
int schedule_cpu_switch(unsigned int cpu, struct cpupool *c);
|
||||
void vcpu_force_reschedule(struct vcpu *v);
|
||||
int cpu_disable_scheduler(unsigned int cpu);
|
||||
-int vcpu_set_affinity(struct vcpu *v, cpumask_t *affinity);
|
||||
+int vcpu_set_affinity(struct vcpu *v, const cpumask_t *affinity);
|
||||
|
||||
void vcpu_runstate_get(struct vcpu *v, struct vcpu_runstate_info *runstate);
|
||||
uint64_t get_cpu_idle_time(unsigned int cpu);
|
27
24104-waitqueue_Double_size_of_x86_shadow_stack..patch
Normal file
27
24104-waitqueue_Double_size_of_x86_shadow_stack..patch
Normal file
@ -0,0 +1,27 @@
|
||||
changeset: 24104:4daa4ad90f12
|
||||
user: Keir Fraser <keir@xen.org>
|
||||
date: Tue Nov 08 19:33:46 2011 +0000
|
||||
files: xen/common/wait.c
|
||||
description:
|
||||
waitqueue: Double size of x86 shadow stack.
|
||||
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
|
||||
---
|
||||
xen/common/wait.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: xen-4.1.2-testing/xen/common/wait.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/common/wait.c
|
||||
+++ xen-4.1.2-testing/xen/common/wait.c
|
||||
@@ -33,7 +33,7 @@ struct waitqueue_vcpu {
|
||||
* hypervisor context before sleeping (descheduling), setjmp/longjmp-style.
|
||||
*/
|
||||
void *esp;
|
||||
- char stack[1500];
|
||||
+ char stack[3000];
|
||||
#endif
|
||||
};
|
||||
|
@ -0,0 +1,30 @@
|
||||
changeset: 24105:89efd82620ec
|
||||
user: Olaf Hering <olaf@aepfle.de>
|
||||
date: Tue Nov 08 19:35:01 2011 +0000
|
||||
files: xen/arch/x86/mm/p2m.c
|
||||
description:
|
||||
xenpaging: compare domain pointer in p2m_mem_paging_populate
|
||||
|
||||
Compare just the domain pointer instead of the domain_id number.
|
||||
|
||||
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
||||
Committed-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
|
||||
---
|
||||
xen/arch/x86/mm/p2m.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/mm/p2m.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/mm/p2m.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/mm/p2m.c
|
||||
@@ -3060,7 +3060,7 @@ void p2m_mem_paging_populate(struct p2m_
|
||||
p2m_unlock(p2m);
|
||||
|
||||
/* Pause domain if request came from guest and gfn has paging type */
|
||||
- if ( p2m_is_paging(p2mt) && v->domain->domain_id == d->domain_id )
|
||||
+ if ( p2m_is_paging(p2mt) && v->domain == d )
|
||||
{
|
||||
vcpu_pause_nosync(v);
|
||||
req.flags |= MEM_EVENT_FLAG_VCPU_PAUSED;
|
112
24106-mem_event_check_capabilities_only_once.patch
Normal file
112
24106-mem_event_check_capabilities_only_once.patch
Normal file
@ -0,0 +1,112 @@
|
||||
changeset: 24106:2af5bfbc9fde
|
||||
user: Olaf Hering <olaf@aepfle.de>
|
||||
date: Tue Nov 08 19:35:42 2011 +0000
|
||||
files: xen/arch/x86/mm/mem_event.c
|
||||
description:
|
||||
mem_event: check capabilities only once
|
||||
|
||||
It is not required to check the system capabilities during every domctl.
|
||||
Rearrange the code to check them only once.
|
||||
|
||||
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
||||
Committed-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
|
||||
---
|
||||
xen/arch/x86/mm/mem_event.c | 54 ++++++++++++++++++++++++--------------------
|
||||
1 file changed, 30 insertions(+), 24 deletions(-)
|
||||
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/mm/mem_event.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/mm/mem_event.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/mm/mem_event.c
|
||||
@@ -253,32 +253,35 @@ int mem_event_domctl(struct domain *d, x
|
||||
case XEN_DOMCTL_MEM_EVENT_OP_PAGING:
|
||||
{
|
||||
struct mem_event_domain *med = &d->mem_paging;
|
||||
- struct p2m_domain *p2m = p2m_get_hostp2m(d);
|
||||
- rc = -ENODEV;
|
||||
- /* Only HAP is supported */
|
||||
- if ( !hap_enabled(d) )
|
||||
- break;
|
||||
-
|
||||
- /* Currently only EPT is supported */
|
||||
- if ( boot_cpu_data.x86_vendor != X86_VENDOR_INTEL )
|
||||
- break;
|
||||
-
|
||||
- rc = -EXDEV;
|
||||
- /* Disallow paging in a PoD guest */
|
||||
- if ( p2m->pod.entry_count )
|
||||
- break;
|
||||
+ rc = -EINVAL;
|
||||
|
||||
switch( mec->op )
|
||||
{
|
||||
case XEN_DOMCTL_MEM_EVENT_OP_PAGING_ENABLE:
|
||||
{
|
||||
+ struct p2m_domain *p2m = p2m_get_hostp2m(d);
|
||||
+ rc = -ENODEV;
|
||||
+ /* Only HAP is supported */
|
||||
+ if ( !hap_enabled(d) )
|
||||
+ break;
|
||||
+
|
||||
+ /* Currently only EPT is supported */
|
||||
+ if ( boot_cpu_data.x86_vendor != X86_VENDOR_INTEL )
|
||||
+ break;
|
||||
+
|
||||
+ rc = -EXDEV;
|
||||
+ /* Disallow paging in a PoD guest */
|
||||
+ if ( p2m->pod.entry_count )
|
||||
+ break;
|
||||
+
|
||||
rc = mem_event_enable(d, mec, med);
|
||||
}
|
||||
break;
|
||||
|
||||
case XEN_DOMCTL_MEM_EVENT_OP_PAGING_DISABLE:
|
||||
{
|
||||
- rc = mem_event_disable(med);
|
||||
+ if ( med->ring_page )
|
||||
+ rc = mem_event_disable(med);
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -295,26 +298,29 @@ int mem_event_domctl(struct domain *d, x
|
||||
case XEN_DOMCTL_MEM_EVENT_OP_ACCESS:
|
||||
{
|
||||
struct mem_event_domain *med = &d->mem_access;
|
||||
- rc = -ENODEV;
|
||||
- /* Only HAP is supported */
|
||||
- if ( !hap_enabled(d) )
|
||||
- break;
|
||||
-
|
||||
- /* Currently only EPT is supported */
|
||||
- if ( boot_cpu_data.x86_vendor != X86_VENDOR_INTEL )
|
||||
- break;
|
||||
+ rc = -EINVAL;
|
||||
|
||||
switch( mec->op )
|
||||
{
|
||||
case XEN_DOMCTL_MEM_EVENT_OP_ACCESS_ENABLE:
|
||||
{
|
||||
+ rc = -ENODEV;
|
||||
+ /* Only HAP is supported */
|
||||
+ if ( !hap_enabled(d) )
|
||||
+ break;
|
||||
+
|
||||
+ /* Currently only EPT is supported */
|
||||
+ if ( boot_cpu_data.x86_vendor != X86_VENDOR_INTEL )
|
||||
+ break;
|
||||
+
|
||||
rc = mem_event_enable(d, mec, med);
|
||||
}
|
||||
break;
|
||||
|
||||
case XEN_DOMCTL_MEM_EVENT_OP_ACCESS_DISABLE:
|
||||
{
|
||||
- rc = mem_event_disable(&d->mem_access);
|
||||
+ if ( med->ring_page )
|
||||
+ rc = mem_event_disable(&d->mem_access);
|
||||
}
|
||||
break;
|
||||
|
@ -1,5 +1,8 @@
|
||||
# HG changeset patch
|
||||
# Parent 951a9879c34bee1dd2fa0329a541ae089f271c11
|
||||
changeset: 24138:e2cc58b85b6e
|
||||
user: Olaf Hering <olaf@aepfle.de>
|
||||
date: Mon Nov 14 17:49:14 2011 +0000
|
||||
files: tools/xenpaging/pagein.c
|
||||
description:
|
||||
xenpaging: munmap all pages after page-in
|
||||
|
||||
Do munmap() on all mapped pages, not just the first one. Without this
|
||||
@ -8,6 +11,8 @@ because the page count does not go down to 1. This change was missing
|
||||
from changeset 23827:d1d6abc1db20.
|
||||
|
||||
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
||||
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
|
||||
|
||||
|
||||
---
|
||||
tools/xenpaging/pagein.c | 2 +-
|
@ -0,0 +1,62 @@
|
||||
changeset: 24171:fe80909663c1
|
||||
user: Keir Fraser <keir@xen.org>
|
||||
date: Tue Nov 22 13:00:21 2011 +0000
|
||||
files: xen/common/wait.c
|
||||
description:
|
||||
x86,waitqueue: Allocate whole page for shadow stack.
|
||||
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
|
||||
---
|
||||
xen/common/wait.c | 16 ++++++++++++++--
|
||||
1 file changed, 14 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: xen-4.1.2-testing/xen/common/wait.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/common/wait.c
|
||||
+++ xen-4.1.2-testing/xen/common/wait.c
|
||||
@@ -33,7 +33,7 @@ struct waitqueue_vcpu {
|
||||
* hypervisor context before sleeping (descheduling), setjmp/longjmp-style.
|
||||
*/
|
||||
void *esp;
|
||||
- char stack[3000];
|
||||
+ char *stack;
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -45,6 +45,15 @@ int init_waitqueue_vcpu(struct vcpu *v)
|
||||
if ( wqv == NULL )
|
||||
return -ENOMEM;
|
||||
|
||||
+#ifdef CONFIG_X86
|
||||
+ wqv->stack = alloc_xenheap_page();
|
||||
+ if ( wqv->stack == NULL )
|
||||
+ {
|
||||
+ xfree(wqv);
|
||||
+ return -ENOMEM;
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
memset(wqv, 0, sizeof(*wqv));
|
||||
INIT_LIST_HEAD(&wqv->list);
|
||||
wqv->vcpu = v;
|
||||
@@ -63,6 +72,9 @@ void destroy_waitqueue_vcpu(struct vcpu
|
||||
return;
|
||||
|
||||
BUG_ON(!list_empty(&wqv->list));
|
||||
+#ifdef CONFIG_X86
|
||||
+ free_xenheap_page(wqv->stack);
|
||||
+#endif
|
||||
xfree(wqv);
|
||||
|
||||
v->waitqueue_vcpu = NULL;
|
||||
@@ -115,7 +127,7 @@ static void __prepare_to_wait(struct wai
|
||||
: "=S" (wqv->esp)
|
||||
: "c" (cpu_info), "D" (wqv->stack)
|
||||
: "memory" );
|
||||
- BUG_ON((cpu_info - (char *)wqv->esp) > sizeof(wqv->stack));
|
||||
+ BUG_ON((cpu_info - (char *)wqv->esp) > PAGE_SIZE);
|
||||
}
|
||||
|
||||
static void __finish_wait(struct waitqueue_vcpu *wqv)
|
25
24190-hap-log-dirty-disable-rc.patch
Normal file
25
24190-hap-log-dirty-disable-rc.patch
Normal file
@ -0,0 +1,25 @@
|
||||
# HG changeset patch
|
||||
# User Andres Lagar-Cavilla <andres@lagarcavilla.org>
|
||||
# Date 1322148057 0
|
||||
# Node ID 6b3d8250ee2c63d90680c142549123a4b1559f55
|
||||
# Parent 7da681c490e0a8a2b3f1fb311d254dc7ce618a43
|
||||
x86/mm: change return code for log-dirty disabling
|
||||
|
||||
Disabling log dirty mode in HAP always returns -EINVAL. Make it
|
||||
return the correct rc on success.
|
||||
|
||||
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
|
||||
Signed-off-by: Tim Deegan <tim@xen.org>
|
||||
Committed-by: Tim Deegan <tim@xen.org>
|
||||
|
||||
--- a/xen/arch/x86/mm/hap/hap.c
|
||||
+++ b/xen/arch/x86/mm/hap/hap.c
|
||||
@@ -710,6 +710,8 @@ int hap_domctl(struct domain *d, xen_dom
|
||||
return rc;
|
||||
case XEN_DOMCTL_SHADOW_OP_GET_ALLOCATION:
|
||||
sc->mb = hap_get_allocation(d);
|
||||
+ /* Fall through... */
|
||||
+ case XEN_DOMCTL_SHADOW_OP_OFF:
|
||||
return 0;
|
||||
default:
|
||||
HAP_ERROR("Bad hap domctl op %u\n", sc->op);
|
21
24193-hap-track-dirty-vram-rc.patch
Normal file
21
24193-hap-track-dirty-vram-rc.patch
Normal file
@ -0,0 +1,21 @@
|
||||
# HG changeset patch
|
||||
# User Andres Lagar-Cavilla <andres@lagarcavilla.org>
|
||||
# Date 1322149491 0
|
||||
# Node ID 67d2ac426defedad9c10eb339019f9dc9f02d2ae
|
||||
# Parent 3c864e04c2ad060ca1cac6579994777993fef6e6
|
||||
Trivial fix for rc val in hap track dirty vram
|
||||
|
||||
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
|
||||
Committed-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
--- a/xen/arch/x86/mm/hap/hap.c
|
||||
+++ b/xen/arch/x86/mm/hap/hap.c
|
||||
@@ -143,7 +143,7 @@ int hap_track_dirty_vram(struct domain *
|
||||
}
|
||||
else if ( !paging_mode_log_dirty(d) && !dirty_vram )
|
||||
{
|
||||
- rc -ENOMEM;
|
||||
+ rc = -ENOMEM;
|
||||
if ( (dirty_vram = xmalloc(struct sh_dirty_vram)) == NULL )
|
||||
goto param_fail;
|
||||
|
@ -0,0 +1,68 @@
|
||||
changeset: 24195:9b65336f688f
|
||||
user: Keir Fraser <keir@xen.org>
|
||||
date: Thu Nov 24 15:48:10 2011 +0000
|
||||
files: xen/common/wait.c
|
||||
description:
|
||||
waitqueue: Detect saved-stack overflow and crash the guest.
|
||||
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
|
||||
---
|
||||
xen/common/wait.c | 19 +++++++++++++++----
|
||||
1 file changed, 15 insertions(+), 4 deletions(-)
|
||||
|
||||
Index: xen-4.1.2-testing/xen/common/wait.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/common/wait.c
|
||||
+++ xen-4.1.2-testing/xen/common/wait.c
|
||||
@@ -107,13 +107,16 @@ void wake_up(struct waitqueue_head *wq)
|
||||
static void __prepare_to_wait(struct waitqueue_vcpu *wqv)
|
||||
{
|
||||
char *cpu_info = (char *)get_cpu_info();
|
||||
+
|
||||
asm volatile (
|
||||
#ifdef CONFIG_X86_64
|
||||
"push %%rax; push %%rbx; push %%rcx; push %%rdx; push %%rdi; "
|
||||
"push %%rbp; push %%r8; push %%r9; push %%r10; push %%r11; "
|
||||
"push %%r12; push %%r13; push %%r14; push %%r15; call 1f; "
|
||||
"1: mov 80(%%rsp),%%rdi; mov 96(%%rsp),%%rcx; mov %%rsp,%%rsi; "
|
||||
- "sub %%rsi,%%rcx; rep movsb; mov %%rsp,%%rsi; pop %%rax; "
|
||||
+ "sub %%rsi,%%rcx; cmp %3,%%rcx; jbe 2f; "
|
||||
+ "xor %%esi,%%esi; jmp 3f; "
|
||||
+ "2: rep movsb; mov %%rsp,%%rsi; 3: pop %%rax; "
|
||||
"pop %%r15; pop %%r14; pop %%r13; pop %%r12; "
|
||||
"pop %%r11; pop %%r10; pop %%r9; pop %%r8; "
|
||||
"pop %%rbp; pop %%rdi; pop %%rdx; pop %%rcx; pop %%rbx; pop %%rax"
|
||||
@@ -121,13 +124,20 @@ static void __prepare_to_wait(struct wai
|
||||
"push %%eax; push %%ebx; push %%ecx; push %%edx; push %%edi; "
|
||||
"push %%ebp; call 1f; "
|
||||
"1: mov 8(%%esp),%%edi; mov 16(%%esp),%%ecx; mov %%esp,%%esi; "
|
||||
- "sub %%esi,%%ecx; rep movsb; mov %%esp,%%esi; pop %%eax; "
|
||||
+ "sub %%esi,%%ecx; cmp %3,%%ecx; jbe 2f; "
|
||||
+ "xor %%esi,%%esi; jmp 3f; "
|
||||
+ "2: rep movsb; mov %%esp,%%esi; 3: pop %%eax; "
|
||||
"pop %%ebp; pop %%edi; pop %%edx; pop %%ecx; pop %%ebx; pop %%eax"
|
||||
#endif
|
||||
: "=S" (wqv->esp)
|
||||
- : "c" (cpu_info), "D" (wqv->stack)
|
||||
+ : "c" (cpu_info), "D" (wqv->stack), "i" (PAGE_SIZE)
|
||||
: "memory" );
|
||||
- BUG_ON((cpu_info - (char *)wqv->esp) > PAGE_SIZE);
|
||||
+
|
||||
+ if ( unlikely(wqv->esp == 0) )
|
||||
+ {
|
||||
+ gdprintk(XENLOG_ERR, "Stack too large in %s\n", __FUNCTION__);
|
||||
+ domain_crash_synchronous();
|
||||
+ }
|
||||
}
|
||||
|
||||
static void __finish_wait(struct waitqueue_vcpu *wqv)
|
||||
@@ -163,6 +173,7 @@ void prepare_to_wait(struct waitqueue_he
|
||||
struct vcpu *curr = current;
|
||||
struct waitqueue_vcpu *wqv = curr->waitqueue_vcpu;
|
||||
|
||||
+ ASSERT(!in_atomic());
|
||||
ASSERT(list_empty(&wqv->list));
|
||||
|
||||
spin_lock(&wq->lock);
|
@ -0,0 +1,49 @@
|
||||
changeset: 24196:de4fe05fe887
|
||||
user: Keir Fraser <keir@xen.org>
|
||||
date: Thu Nov 24 15:49:25 2011 +0000
|
||||
files: xen/common/wait.c
|
||||
description:
|
||||
waitqueue: Reorder prepare_to_wait() so that vcpu is definitely on the
|
||||
queue on exit, even after a wakeup.
|
||||
|
||||
Otherwise, when we go round the loop in wait_event(), we may not
|
||||
actually sleep after the first iteration, as we do not put ourselves
|
||||
back on the queue on wakeup.
|
||||
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
|
||||
---
|
||||
xen/common/wait.c | 7 ++++---
|
||||
1 file changed, 4 insertions(+), 3 deletions(-)
|
||||
|
||||
Index: xen-4.1.2-testing/xen/common/wait.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/common/wait.c
|
||||
+++ xen-4.1.2-testing/xen/common/wait.c
|
||||
@@ -108,6 +108,8 @@ static void __prepare_to_wait(struct wai
|
||||
{
|
||||
char *cpu_info = (char *)get_cpu_info();
|
||||
|
||||
+ ASSERT(wqv->esp == 0);
|
||||
+
|
||||
asm volatile (
|
||||
#ifdef CONFIG_X86_64
|
||||
"push %%rax; push %%rbx; push %%rcx; push %%rdx; push %%rdi; "
|
||||
@@ -174,14 +176,13 @@ void prepare_to_wait(struct waitqueue_he
|
||||
struct waitqueue_vcpu *wqv = curr->waitqueue_vcpu;
|
||||
|
||||
ASSERT(!in_atomic());
|
||||
- ASSERT(list_empty(&wqv->list));
|
||||
+ __prepare_to_wait(wqv);
|
||||
|
||||
+ ASSERT(list_empty(&wqv->list));
|
||||
spin_lock(&wq->lock);
|
||||
list_add_tail(&wqv->list, &wq->list);
|
||||
vcpu_pause_nosync(curr);
|
||||
spin_unlock(&wq->lock);
|
||||
-
|
||||
- __prepare_to_wait(wqv);
|
||||
}
|
||||
|
||||
void finish_wait(struct waitqueue_head *wq)
|
@ -0,0 +1,78 @@
|
||||
changeset: 24197:ca92c4a8b31f
|
||||
user: Keir Fraser <keir@xen.org>
|
||||
date: Thu Nov 24 15:50:08 2011 +0000
|
||||
files: xen/common/wait.c
|
||||
description:
|
||||
x86/waitqueue: Because we have per-cpu stacks, we must wake up on teh
|
||||
same cpu that we slept on. Otherwise stack references are bogus on
|
||||
wakeup.
|
||||
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
|
||||
---
|
||||
xen/common/wait.c | 27 +++++++++++++++++++++++++++
|
||||
1 file changed, 27 insertions(+)
|
||||
|
||||
Index: xen-4.1.2-testing/xen/common/wait.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/common/wait.c
|
||||
+++ xen-4.1.2-testing/xen/common/wait.c
|
||||
@@ -34,6 +34,8 @@ struct waitqueue_vcpu {
|
||||
*/
|
||||
void *esp;
|
||||
char *stack;
|
||||
+ cpumask_t saved_affinity;
|
||||
+ unsigned int wakeup_cpu;
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -107,9 +109,19 @@ void wake_up(struct waitqueue_head *wq)
|
||||
static void __prepare_to_wait(struct waitqueue_vcpu *wqv)
|
||||
{
|
||||
char *cpu_info = (char *)get_cpu_info();
|
||||
+ struct vcpu *curr = current;
|
||||
|
||||
ASSERT(wqv->esp == 0);
|
||||
|
||||
+ /* Save current VCPU affinity; force wakeup on *this* CPU only. */
|
||||
+ wqv->wakeup_cpu = smp_processor_id();
|
||||
+ wqv->saved_affinity = curr->cpu_affinity;
|
||||
+ if ( vcpu_set_affinity(curr, cpumask_of(wqv->wakeup_cpu)) )
|
||||
+ {
|
||||
+ gdprintk(XENLOG_ERR, "Unable to set vcpu affinity\n");
|
||||
+ domain_crash_synchronous();
|
||||
+ }
|
||||
+
|
||||
asm volatile (
|
||||
#ifdef CONFIG_X86_64
|
||||
"push %%rax; push %%rbx; push %%rcx; push %%rdx; push %%rdi; "
|
||||
@@ -145,6 +157,7 @@ static void __prepare_to_wait(struct wai
|
||||
static void __finish_wait(struct waitqueue_vcpu *wqv)
|
||||
{
|
||||
wqv->esp = NULL;
|
||||
+ (void)vcpu_set_affinity(current, &wqv->saved_affinity);
|
||||
}
|
||||
|
||||
void check_wakeup_from_wait(void)
|
||||
@@ -156,6 +169,20 @@ void check_wakeup_from_wait(void)
|
||||
if ( likely(wqv->esp == NULL) )
|
||||
return;
|
||||
|
||||
+ /* Check if we woke up on the wrong CPU. */
|
||||
+ if ( unlikely(smp_processor_id() != wqv->wakeup_cpu) )
|
||||
+ {
|
||||
+ /* Re-set VCPU affinity and re-enter the scheduler. */
|
||||
+ struct vcpu *curr = current;
|
||||
+ wqv->saved_affinity = curr->cpu_affinity;
|
||||
+ if ( vcpu_set_affinity(curr, cpumask_of(wqv->wakeup_cpu)) )
|
||||
+ {
|
||||
+ gdprintk(XENLOG_ERR, "Unable to set vcpu affinity\n");
|
||||
+ domain_crash_synchronous();
|
||||
+ }
|
||||
+ wait(); /* takes us back into the scheduler */
|
||||
+ }
|
||||
+
|
||||
asm volatile (
|
||||
"mov %1,%%"__OP"sp; rep movsb; jmp *(%%"__OP"sp)"
|
||||
: : "S" (wqv->stack), "D" (wqv->esp),
|
64
24201-x86-pcpu-platform-op.patch
Normal file
64
24201-x86-pcpu-platform-op.patch
Normal file
@ -0,0 +1,64 @@
|
||||
# HG changeset patch
|
||||
# User Jan Beulich <jbeulich@suse.com>
|
||||
# Date 1322153786 -3600
|
||||
# Node ID 9c6bea25f71233787a36893deaf0e811f2dcb8d8
|
||||
# Parent 480531cab3f4468b1ec9b549bc84d66e420ce685
|
||||
x86: small fixes to pcpu platform op handling
|
||||
|
||||
XENPF_get_cpuinfo should init the flags output field rather than only
|
||||
modify it.
|
||||
|
||||
XENPF_cpu_online must check for the input CPU number to be in range.
|
||||
|
||||
XENPF_cpu_offline must also do that, and should also reject attempts to
|
||||
offline CPU 0 (this fails in cpu_down() too, but preventing this here
|
||||
appears more correct given that the code here calls
|
||||
continue_hypercall_on_cpu(0, ...), which would be flawed if cpu_down()
|
||||
would ever allow bringing down CPU 0 (and a distinct error code is
|
||||
easier to deal with when debugging issues).
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@suse.com>
|
||||
Acked-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
--- a/xen/arch/x86/platform_hypercall.c
|
||||
+++ b/xen/arch/x86/platform_hypercall.c
|
||||
@@ -449,13 +449,14 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe
|
||||
if ( (g_info->xen_cpuid >= NR_CPUS) ||
|
||||
!cpu_present(g_info->xen_cpuid) )
|
||||
{
|
||||
- g_info->flags |= XEN_PCPU_FLAGS_INVALID;
|
||||
+ g_info->flags = XEN_PCPU_FLAGS_INVALID;
|
||||
}
|
||||
else
|
||||
{
|
||||
g_info->apic_id = x86_cpu_to_apicid[g_info->xen_cpuid];
|
||||
g_info->acpi_id = acpi_get_processor_id(g_info->xen_cpuid);
|
||||
ASSERT(g_info->apic_id != BAD_APICID);
|
||||
+ g_info->flags = 0;
|
||||
if (cpu_online(g_info->xen_cpuid))
|
||||
g_info->flags |= XEN_PCPU_FLAGS_ONLINE;
|
||||
}
|
||||
@@ -472,7 +473,7 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe
|
||||
{
|
||||
int cpu = op->u.cpu_ol.cpuid;
|
||||
|
||||
- if ( !cpu_present(cpu) )
|
||||
+ if ( cpu >= NR_CPUS || !cpu_present(cpu) )
|
||||
{
|
||||
ret = -EINVAL;
|
||||
break;
|
||||
@@ -493,7 +494,13 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe
|
||||
{
|
||||
int cpu = op->u.cpu_ol.cpuid;
|
||||
|
||||
- if ( !cpu_present(cpu) )
|
||||
+ if ( cpu == 0 )
|
||||
+ {
|
||||
+ ret = -EOPNOTSUPP;
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ if ( cpu >= NR_CPUS || !cpu_present(cpu) )
|
||||
{
|
||||
ret = -EINVAL;
|
||||
break;
|
@ -1,8 +1,13 @@
|
||||
# HG changeset patch
|
||||
# Parent 401247fe2a24c4923a0106c5d8230fb16de0bb96
|
||||
changeset: 24208:31fce41fc2b2
|
||||
user: Olaf Hering <olaf@aepfle.de>
|
||||
date: Sun Nov 20 17:01:15 2011 +0100
|
||||
files: tools/xenpaging/file_ops.c tools/xenpaging/policy_default.c tools/xenpaging/xenpaging.c
|
||||
description:
|
||||
xenpaging: remove filename from comment
|
||||
|
||||
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
||||
Committed-by: Ian Jackson <ian.jackson.citrix.com>
|
||||
|
||||
|
||||
---
|
||||
tools/xenpaging/file_ops.c | 1 -
|
@ -1,5 +1,8 @@
|
||||
# HG changeset patch
|
||||
# Parent 138406814b338c07af349a477dd7602ecca8be70
|
||||
changeset: 24209:fe8946916512
|
||||
user: Olaf Hering <olaf@aepfle.de>
|
||||
date: Sun Nov 20 17:01:20 2011 +0100
|
||||
files: tools/xenpaging/xenpaging.c
|
||||
description:
|
||||
xenpaging: remove obsolete comment in resume path
|
||||
|
||||
Remove stale comment.
|
||||
@ -7,6 +10,8 @@ If a page was populated several times the vcpu is paused and
|
||||
xenpaging has to unpause it again.
|
||||
|
||||
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
||||
Committed-by: Ian Jackson <ian.jackson.citrix.com>
|
||||
|
||||
|
||||
---
|
||||
tools/xenpaging/xenpaging.c | 1 -
|
@ -1,14 +1,18 @@
|
||||
# HG changeset patch
|
||||
# Parent 5eb76b80baa127278e0fc1574bef22a79d9513f5
|
||||
changeset: 24210:d1d54cdc4a7b
|
||||
user: Olaf Hering <olaf@aepfle.de>
|
||||
date: Sun Nov 20 17:01:32 2011 +0100
|
||||
files: tools/xenpaging/xenpaging.c
|
||||
description:
|
||||
xenpaging: use PERROR to print errno
|
||||
|
||||
v3:
|
||||
- adjust arguments for xc_mem_paging_enable() failures
|
||||
|
||||
v2:
|
||||
- move changes to file_op() to different patch
|
||||
|
||||
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
||||
Committed-by: Ian Jackson <ian.jackson.citrix.com>
|
||||
|
||||
|
||||
---
|
||||
tools/xenpaging/xenpaging.c | 58 ++++++++++++++++++++++----------------------
|
@ -1,7 +1,11 @@
|
||||
# HG changeset patch
|
||||
# Parent 7a4a6935bfa145b24d5183cbf43ce8cc140d9183
|
||||
changeset: 24211:8ddac056a89e
|
||||
user: Olaf Hering <olaf@aepfle.de>
|
||||
date: Sun Nov 20 17:01:39 2011 +0100
|
||||
files: tools/xenpaging/file_ops.c
|
||||
description:
|
||||
xenpaging: simplify file_op
|
||||
|
||||
Catch lseek() errors.
|
||||
Use -1 as return value and let caller read errno.
|
||||
Remove const casts from buffer pointers, the page is writeable.
|
||||
Use wrapper for write() which matches the read() prototype.
|
||||
@ -9,6 +13,8 @@ Remove unused stdarg.h inclusion.
|
||||
Remove unused macro.
|
||||
|
||||
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
||||
Committed-by: Ian Jackson <ian.jackson.citrix.com>
|
||||
|
||||
|
||||
---
|
||||
tools/xenpaging/file_ops.c | 29 +++++++++--------------------
|
@ -1,8 +1,13 @@
|
||||
# HG changeset patch
|
||||
# Parent 9c7e82499e983ad11b13dd41d2fa5f12072adecf
|
||||
changeset: 24212:fbc31627adde
|
||||
user: Olaf Hering <olaf@aepfle.de>
|
||||
date: Sun Nov 20 17:01:41 2011 +0100
|
||||
files: tools/xenpaging/xenpaging.c
|
||||
description:
|
||||
xenpaging: print gfn in failure case
|
||||
|
||||
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
||||
Committed-by: Ian Jackson <ian.jackson.citrix.com>
|
||||
|
||||
|
||||
---
|
||||
tools/xenpaging/xenpaging.c | 18 +++++++++---------
|
@ -1,11 +1,16 @@
|
||||
# HG changeset patch
|
||||
# Parent c6014fd38d1f150dd433985f8388b4858ba5aaca
|
||||
changeset: 24213:e3cbbad72382
|
||||
user: Olaf Hering <olaf@aepfle.de>
|
||||
date: Sun Nov 20 17:02:22 2011 +0100
|
||||
files: tools/xenpaging/xenpaging.c
|
||||
description:
|
||||
xenpaging: update xenpaging_init
|
||||
|
||||
Move comment about xc_handle to the right place.
|
||||
Allocate paging early and use calloc.
|
||||
|
||||
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
||||
Committed-by: Ian Jackson <ian.jackson.citrix.com>
|
||||
|
||||
|
||||
---
|
||||
tools/xenpaging/xenpaging.c | 22 +++++++++++-----------
|
@ -1,11 +1,16 @@
|
||||
# HG changeset patch
|
||||
# Parent f665912bc70e0b12e194cf1dd1d37bd22b29c54f
|
||||
changeset: 24214:f06595abfa88
|
||||
user: Olaf Hering <olaf@aepfle.de>
|
||||
date: Sun Nov 20 17:02:36 2011 +0100
|
||||
files: tools/xenpaging/policy_default.c tools/xenpaging/xenpaging.c tools/xenpaging/xenpaging.h
|
||||
description:
|
||||
xenpaging: remove xc_dominfo_t from paging_t
|
||||
|
||||
Remove xc_dominfo_t from paging_t, record only max_pages.
|
||||
This value is used to setup internal data structures.
|
||||
|
||||
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
||||
Committed-by: Ian Jackson <ian.jackson.citrix.com>
|
||||
|
||||
|
||||
---
|
||||
tools/xenpaging/policy_default.c | 8 ++++----
|
@ -1,10 +1,15 @@
|
||||
# HG changeset patch
|
||||
# Parent 8e31f3194c87e1cdb41621caa5a41810ef787293
|
||||
changeset: 24215:dc7dabe2fe99
|
||||
user: Olaf Hering <olaf@aepfle.de>
|
||||
date: Sun Nov 20 17:02:38 2011 +0100
|
||||
files: tools/xenpaging/xenpaging.c tools/xenpaging/xenpaging.h
|
||||
description:
|
||||
xenpaging: track the number of paged-out pages
|
||||
|
||||
This change is required by subsequent changes.
|
||||
|
||||
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
||||
Committed-by: Ian Jackson <ian.jackson.citrix.com>
|
||||
|
||||
|
||||
---
|
||||
tools/xenpaging/xenpaging.c | 8 ++++++++
|
@ -1,3 +1,8 @@
|
||||
changeset: 24216:4fe585c2a3e5
|
||||
user: Olaf Hering <olaf@aepfle.de>
|
||||
date: Sun Nov 20 17:02:39 2011 +0100
|
||||
files: tools/xenpaging/xenpaging.c
|
||||
description:
|
||||
xenpaging: move page add/resume loops into its own function.
|
||||
|
||||
Move page resume loop into its own function.
|
||||
@ -12,6 +17,8 @@ v2:
|
||||
- check if victims allocation succeeded
|
||||
|
||||
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
||||
Committed-by: Ian Jackson <ian.jackson.citrix.com>
|
||||
|
||||
|
||||
---
|
||||
tools/xenpaging/xenpaging.c | 94 ++++++++++++++++++++++++++++----------------
|
@ -1,11 +1,16 @@
|
||||
# HG changeset patch
|
||||
# Parent f08959fb7528e1724e26365973914ae3e0af78ea
|
||||
changeset: 24217:b531f5ceddf0
|
||||
user: Olaf Hering <olaf@aepfle.de>
|
||||
date: Sun Nov 20 17:02:39 2011 +0100
|
||||
files: tools/xenpaging/xenpaging.c
|
||||
description:
|
||||
xenpaging: improve mainloop exit handling
|
||||
|
||||
Remove the if/else logic to exit from the in case a signal arrives.
|
||||
Update comments.
|
||||
|
||||
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
||||
Committed-by: Ian Jackson <ian.jackson.citrix.com>
|
||||
|
||||
|
||||
---
|
||||
tools/xenpaging/xenpaging.c | 16 +++++++++-------
|
@ -1,8 +1,13 @@
|
||||
# HG changeset patch
|
||||
# Parent 2ac53905d95e6d02f53c99f6e2fa38f7306b8800
|
||||
changeset: 24218:a2b4ae2becdf
|
||||
user: Olaf Hering <olaf@aepfle.de>
|
||||
date: Sun Nov 20 17:02:40 2011 +0100
|
||||
files: tools/libxc/xc_bitops.h
|
||||
description:
|
||||
libxc: add bitmap_clear function
|
||||
|
||||
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
||||
Committed-by: Ian Jackson <ian.jackson.citrix.com>
|
||||
|
||||
|
||||
---
|
||||
tools/libxc/xc_bitops.h | 6 ++++++
|
@ -1,5 +1,8 @@
|
||||
# HG changeset patch
|
||||
# Parent 5d87917314c0b4f13c987575d5329dfa215c5698
|
||||
changeset: 24219:8eba32b9598c
|
||||
user: Olaf Hering <olaf@aepfle.de>
|
||||
date: Sun Nov 20 17:02:41 2011 +0100
|
||||
files: tools/xenpaging/policy_default.c
|
||||
description:
|
||||
xenpaging: retry unpageable gfns
|
||||
|
||||
Nomination of gfns can fail, but may succeed later.
|
||||
@ -9,6 +12,8 @@ v2:
|
||||
- print debug when clearing uncosumed happens
|
||||
|
||||
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
||||
Committed-by: Ian Jackson <ian.jackson.citrix.com>
|
||||
|
||||
|
||||
---
|
||||
tools/xenpaging/policy_default.c | 14 ++++++++++++++
|
@ -1,11 +1,16 @@
|
||||
# HG changeset patch
|
||||
# Parent a30ec96cbaa43bc7abd90b7d974a8033265409c1
|
||||
changeset: 24220:2087f21befc2
|
||||
user: Olaf Hering <olaf@aepfle.de>
|
||||
date: Sun Nov 20 17:02:42 2011 +0100
|
||||
files: tools/xenpaging/Makefile
|
||||
description:
|
||||
xenpaging: install into LIBEXEC dir
|
||||
|
||||
In preparation of upcoming libxl integration,
|
||||
move xenpaging binary from /usr/sbin/ to /usr/lib/xen/bin/
|
||||
|
||||
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
||||
Committed-by: Ian Jackson <ian.jackson.citrix.com>
|
||||
|
||||
|
||||
---
|
||||
tools/xenpaging/Makefile | 4 ++--
|
@ -1,6 +1,13 @@
|
||||
changeset: 24221:cd5948592b10
|
||||
user: Olaf Hering <olaf@aepfle.de>
|
||||
date: Sun Nov 20 17:02:43 2011 +0100
|
||||
files: Config.mk config/StdGNU.mk tools/libxl/libxl.h tools/libxl/libxl_paths.c tools/xenpaging/Makefile
|
||||
description:
|
||||
xenpaging: add XEN_PAGING_DIR / libxl_xenpaging_dir_path()
|
||||
|
||||
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
||||
Committed-by: Ian Jackson <ian.jackson.citrix.com>
|
||||
|
||||
|
||||
---
|
||||
Config.mk | 1 +
|
@ -1,5 +1,8 @@
|
||||
# HG changeset patch
|
||||
# Parent f057eb06706e2bacaadb41cf80fa45001e786e69
|
||||
changeset: 24222:286a741b4d86
|
||||
user: Olaf Hering <olaf@aepfle.de>
|
||||
date: Sun Nov 20 17:02:45 2011 +0100
|
||||
files: tools/xenpaging/policy_default.c tools/xenpaging/xenpaging.c tools/xenpaging/xenpaging.h
|
||||
description:
|
||||
xenpaging: use guests tot_pages as working target
|
||||
|
||||
This change reverses the task of xenpaging. Before this change a fixed number
|
||||
@ -7,6 +10,8 @@ of pages was paged out. With this change the guest will not have access to
|
||||
more than the given number of pages at the same time.
|
||||
|
||||
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
||||
Committed-by: Ian Jackson <ian.jackson.citrix.com>
|
||||
|
||||
|
||||
---
|
||||
tools/xenpaging/policy_default.c | 1
|
@ -1,5 +1,8 @@
|
||||
# HG changeset patch
|
||||
# Parent 0d872bf1203dd36200477f688908797875035b50
|
||||
changeset: 24223:9e3c2ef70c8a
|
||||
user: Olaf Hering <olaf@aepfle.de>
|
||||
date: Sun Nov 20 17:02:47 2011 +0100
|
||||
files: tools/xenpaging/xenpaging.c
|
||||
description:
|
||||
xenpaging: watch the guests memory/target-tot_pages xenstore value
|
||||
|
||||
Subsequent patches will use xenstored to store the numbers of pages
|
||||
@ -7,6 +10,8 @@ xenpaging is suppose to page-out.
|
||||
Remove num_pages and use target_pages instead.
|
||||
|
||||
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
||||
Committed-by: Ian Jackson <ian.jackson.citrix.com>
|
||||
|
||||
|
||||
---
|
||||
tools/xenpaging/xenpaging.c | 51 +++++++++++++++++++++++++++++++++++++++++++-
|
@ -1,5 +1,8 @@
|
||||
# HG changeset patch
|
||||
# Parent 434f0b4da9148b101e184e0108be6c31f67038f4
|
||||
changeset: 24224:7243fd87410e
|
||||
user: Olaf Hering <olaf@aepfle.de>
|
||||
date: Sun Nov 20 17:02:48 2011 +0100
|
||||
files: tools/xenpaging/xenpaging.c tools/xenpaging/xenpaging.h
|
||||
description:
|
||||
xenpaging: add cmdline interface for pager
|
||||
|
||||
Introduce a cmdline handling for the pager. This simplifies libxl support,
|
||||
@ -17,6 +20,8 @@ options:
|
||||
|
||||
|
||||
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
||||
Committed-by: Ian Jackson <ian.jackson.citrix.com>
|
||||
|
||||
|
||||
---
|
||||
tools/xenpaging/xenpaging.c | 139 ++++++++++++++++++++++++++++++++------------
|
@ -1,5 +1,8 @@
|
||||
# HG changeset patch
|
||||
# Parent 79677f532a2406ca501250b50fa8b33965a8d7d7
|
||||
changeset: 24225:d47d1ad56366
|
||||
user: Olaf Hering <olaf@aepfle.de>
|
||||
date: Sun Nov 20 17:02:50 2011 +0100
|
||||
files: tools/xenpaging/policy.h tools/xenpaging/policy_default.c tools/xenpaging/xenpaging.c
|
||||
description:
|
||||
xenpaging: improve policy mru list handling
|
||||
|
||||
Without this change it is not possible to page-out all guest pages, then
|
||||
@ -17,6 +20,8 @@ is no need to adjust the mru list because dropping a page is not usage
|
||||
of a page.
|
||||
|
||||
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
||||
Committed-by: Ian Jackson <ian.jackson.citrix.com>
|
||||
|
||||
|
||||
---
|
||||
tools/xenpaging/policy.h | 2 ++
|
||||
@ -95,7 +100,7 @@ Index: xen-4.1.2-testing/tools/xenpaging/xenpaging.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/tools/xenpaging/xenpaging.c
|
||||
+++ xen-4.1.2-testing/tools/xenpaging/xenpaging.c
|
||||
@@ -616,7 +616,14 @@ static int xenpaging_resume_page(xenpagi
|
||||
@@ -615,7 +615,14 @@ static int xenpaging_resume_page(xenpagi
|
||||
/* Notify policy of page being paged in */
|
||||
if ( notify_policy )
|
||||
{
|
||||
@ -111,7 +116,7 @@ Index: xen-4.1.2-testing/tools/xenpaging/xenpaging.c
|
||||
|
||||
/* Record number of resumed pages */
|
||||
paging->num_paged_out--;
|
||||
@@ -870,7 +877,7 @@ int main(int argc, char *argv[])
|
||||
@@ -869,7 +876,7 @@ int main(int argc, char *argv[])
|
||||
{
|
||||
DPRINTF("drop_page ^ gfn %"PRIx64" pageslot %d\n", req.gfn, i);
|
||||
/* Notify policy of page being dropped */
|
@ -1,8 +1,13 @@
|
||||
# HG changeset patch
|
||||
# Parent 5b764d6fc1e8165d9012cc8866ba08332fb13021
|
||||
changeset: 24226:c9b75ccd3ebf
|
||||
user: Olaf Hering <olaf@aepfle.de>
|
||||
date: Sun Nov 20 18:26:15 2011 +0100
|
||||
files: tools/xenpaging/xenpaging.c
|
||||
description:
|
||||
xenpaging: add debug to show received watch event.
|
||||
|
||||
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
||||
Committed-by: Ian Jackson <ian.jackson.citrix.com>
|
||||
|
||||
|
||||
---
|
||||
tools/xenpaging/xenpaging.c | 1 +
|
28
24227-xenpaging_restrict_pagefile_permissions.patch
Normal file
28
24227-xenpaging_restrict_pagefile_permissions.patch
Normal file
@ -0,0 +1,28 @@
|
||||
changeset: 24227:1027e7d13d02
|
||||
user: Olaf Hering <olaf@aepfle.de>
|
||||
date: Sun Nov 20 18:26:16 2011 +0100
|
||||
files: tools/xenpaging/xenpaging.c
|
||||
description:
|
||||
xenpaging: restrict pagefile permissions
|
||||
|
||||
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
||||
Committed-by: Ian Jackson <ian.jackson.citrix.com>
|
||||
|
||||
|
||||
---
|
||||
tools/xenpaging/xenpaging.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: xen-4.1.2-testing/tools/xenpaging/xenpaging.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/tools/xenpaging/xenpaging.c
|
||||
+++ xen-4.1.2-testing/tools/xenpaging/xenpaging.c
|
||||
@@ -795,7 +795,7 @@ int main(int argc, char *argv[])
|
||||
xc_interface *xch;
|
||||
|
||||
int open_flags = O_CREAT | O_TRUNC | O_RDWR;
|
||||
- mode_t open_mode = S_IRUSR | S_IRGRP | S_IROTH | S_IWUSR | S_IWGRP | S_IWOTH;
|
||||
+ mode_t open_mode = S_IRUSR | S_IWUSR;
|
||||
int fd;
|
||||
|
||||
/* Initialise domain paging */
|
69
24231-waitqueue_Implement_wake_up_nroneall..patch
Normal file
69
24231-waitqueue_Implement_wake_up_nroneall..patch
Normal file
@ -0,0 +1,69 @@
|
||||
changeset: 24231:2a81ce2b2b93
|
||||
user: Keir Fraser <keir@xen.org>
|
||||
date: Fri Nov 25 20:27:11 2011 +0000
|
||||
files: xen/common/wait.c xen/include/xen/wait.h
|
||||
description:
|
||||
waitqueue: Implement wake_up_{nr,one,all}.
|
||||
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
|
||||
---
|
||||
xen/common/wait.c | 14 ++++++++++++--
|
||||
xen/include/xen/wait.h | 6 ++++--
|
||||
2 files changed, 16 insertions(+), 4 deletions(-)
|
||||
|
||||
Index: xen-4.1.2-testing/xen/common/wait.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/common/wait.c
|
||||
+++ xen-4.1.2-testing/xen/common/wait.c
|
||||
@@ -88,13 +88,13 @@ void init_waitqueue_head(struct waitqueu
|
||||
INIT_LIST_HEAD(&wq->list);
|
||||
}
|
||||
|
||||
-void wake_up(struct waitqueue_head *wq)
|
||||
+void wake_up_nr(struct waitqueue_head *wq, unsigned int nr)
|
||||
{
|
||||
struct waitqueue_vcpu *wqv;
|
||||
|
||||
spin_lock(&wq->lock);
|
||||
|
||||
- while ( !list_empty(&wq->list) )
|
||||
+ while ( !list_empty(&wq->list) && nr-- )
|
||||
{
|
||||
wqv = list_entry(wq->list.next, struct waitqueue_vcpu, list);
|
||||
list_del_init(&wqv->list);
|
||||
@@ -104,6 +104,16 @@ void wake_up(struct waitqueue_head *wq)
|
||||
spin_unlock(&wq->lock);
|
||||
}
|
||||
|
||||
+void wake_up_one(struct waitqueue_head *wq)
|
||||
+{
|
||||
+ wake_up_nr(wq, 1);
|
||||
+}
|
||||
+
|
||||
+void wake_up_all(struct waitqueue_head *wq)
|
||||
+{
|
||||
+ wake_up_nr(wq, UINT_MAX);
|
||||
+}
|
||||
+
|
||||
#ifdef CONFIG_X86
|
||||
|
||||
static void __prepare_to_wait(struct waitqueue_vcpu *wqv)
|
||||
Index: xen-4.1.2-testing/xen/include/xen/wait.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/xen/wait.h
|
||||
+++ xen-4.1.2-testing/xen/include/xen/wait.h
|
||||
@@ -28,8 +28,10 @@ struct waitqueue_head {
|
||||
/* Dynamically initialise a waitqueue. */
|
||||
void init_waitqueue_head(struct waitqueue_head *wq);
|
||||
|
||||
-/* Wake all VCPUs waiting on specified waitqueue. */
|
||||
-void wake_up(struct waitqueue_head *wq);
|
||||
+/* Wake VCPU(s) waiting on specified waitqueue. */
|
||||
+void wake_up_nr(struct waitqueue_head *wq, unsigned int nr);
|
||||
+void wake_up_one(struct waitqueue_head *wq);
|
||||
+void wake_up_all(struct waitqueue_head *wq);
|
||||
|
||||
/* Wait on specified waitqueue until @condition is true. */
|
||||
#define wait_event(wq, condition) \
|
@ -0,0 +1,72 @@
|
||||
changeset: 24232:95d4e2e0bed3
|
||||
user: Keir Fraser <keir@xen.org>
|
||||
date: Fri Nov 25 20:32:05 2011 +0000
|
||||
files: xen/common/wait.c xen/include/xen/wait.h
|
||||
description:
|
||||
waitqueue: Hold a reference to a domain on a waitqueue.
|
||||
|
||||
Also allow waitqueues to be dynamically destroyed.
|
||||
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
|
||||
---
|
||||
xen/common/wait.c | 8 ++++++++
|
||||
xen/include/xen/wait.h | 3 ++-
|
||||
2 files changed, 10 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: xen-4.1.2-testing/xen/common/wait.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/common/wait.c
|
||||
+++ xen-4.1.2-testing/xen/common/wait.c
|
||||
@@ -88,6 +88,11 @@ void init_waitqueue_head(struct waitqueu
|
||||
INIT_LIST_HEAD(&wq->list);
|
||||
}
|
||||
|
||||
+void destroy_waitqueue_head(struct waitqueue_head *wq)
|
||||
+{
|
||||
+ wake_up_all(wq);
|
||||
+}
|
||||
+
|
||||
void wake_up_nr(struct waitqueue_head *wq, unsigned int nr)
|
||||
{
|
||||
struct waitqueue_vcpu *wqv;
|
||||
@@ -99,6 +104,7 @@ void wake_up_nr(struct waitqueue_head *w
|
||||
wqv = list_entry(wq->list.next, struct waitqueue_vcpu, list);
|
||||
list_del_init(&wqv->list);
|
||||
vcpu_unpause(wqv->vcpu);
|
||||
+ put_domain(wqv->vcpu->domain);
|
||||
}
|
||||
|
||||
spin_unlock(&wq->lock);
|
||||
@@ -219,6 +225,7 @@ void prepare_to_wait(struct waitqueue_he
|
||||
spin_lock(&wq->lock);
|
||||
list_add_tail(&wqv->list, &wq->list);
|
||||
vcpu_pause_nosync(curr);
|
||||
+ get_knownalive_domain(curr->domain);
|
||||
spin_unlock(&wq->lock);
|
||||
}
|
||||
|
||||
@@ -237,6 +244,7 @@ void finish_wait(struct waitqueue_head *
|
||||
{
|
||||
list_del_init(&wqv->list);
|
||||
vcpu_unpause(curr);
|
||||
+ put_domain(curr->domain);
|
||||
}
|
||||
spin_unlock(&wq->lock);
|
||||
}
|
||||
Index: xen-4.1.2-testing/xen/include/xen/wait.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/xen/wait.h
|
||||
+++ xen-4.1.2-testing/xen/include/xen/wait.h
|
||||
@@ -25,8 +25,9 @@ struct waitqueue_head {
|
||||
.list = LIST_HEAD_INIT((name).list) \
|
||||
}
|
||||
|
||||
-/* Dynamically initialise a waitqueue. */
|
||||
+/* Dynamically initialise/destroy a waitqueue. */
|
||||
void init_waitqueue_head(struct waitqueue_head *wq);
|
||||
+void destroy_waitqueue_head(struct waitqueue_head *wq);
|
||||
|
||||
/* Wake VCPU(s) waiting on specified waitqueue. */
|
||||
void wake_up_nr(struct waitqueue_head *wq, unsigned int nr);
|
252
24269-mem_event_move_mem_event_domain_out_of_struct_domain.patch
Normal file
252
24269-mem_event_move_mem_event_domain_out_of_struct_domain.patch
Normal file
@ -0,0 +1,252 @@
|
||||
changeset: 24269:2cbc53a24683
|
||||
user: Olaf Hering <olaf@aepfle.de>
|
||||
date: Wed Nov 30 07:08:53 2011 -0800
|
||||
files: xen/arch/x86/hvm/hvm.c xen/arch/x86/mm/mem_event.c xen/arch/x86/mm/mem_sharing.c xen/arch/x86/mm/p2m.c xen/common/domain.c xen/include/xen/sched.h
|
||||
description:
|
||||
mem_event: move mem_event_domain out of struct domain
|
||||
|
||||
An upcoming change may increase the size of mem_event_domain. The result
|
||||
is a build failure because struct domain gets larger than a page.
|
||||
Allocate the room for the three mem_event_domain members at runtime.
|
||||
|
||||
v2:
|
||||
- remove mem_ prefix from members of new struct
|
||||
|
||||
Signed-off-by: Olaf Hering <olaf@aepfle.de>
|
||||
Committed-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
|
||||
---
|
||||
xen/arch/x86/hvm/hvm.c | 4 ++--
|
||||
xen/arch/x86/mm/mem_event.c | 6 +++---
|
||||
xen/arch/x86/mm/mem_sharing.c | 6 +++---
|
||||
xen/arch/x86/mm/p2m.c | 18 +++++++++---------
|
||||
xen/common/domain.c | 5 +++++
|
||||
xen/include/xen/sched.h | 18 ++++++++++++------
|
||||
6 files changed, 34 insertions(+), 23 deletions(-)
|
||||
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/hvm/hvm.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/hvm/hvm.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/hvm/hvm.c
|
||||
@@ -3909,7 +3909,7 @@ static int hvm_memory_event_traps(long p
|
||||
if ( (p & HVMPME_onchangeonly) && (value == old) )
|
||||
return 1;
|
||||
|
||||
- rc = mem_event_check_ring(d, &d->mem_access);
|
||||
+ rc = mem_event_check_ring(d, &d->mem_event->access);
|
||||
if ( rc )
|
||||
return rc;
|
||||
|
||||
@@ -3932,7 +3932,7 @@ static int hvm_memory_event_traps(long p
|
||||
req.gla_valid = 1;
|
||||
}
|
||||
|
||||
- mem_event_put_request(d, &d->mem_access, &req);
|
||||
+ mem_event_put_request(d, &d->mem_event->access, &req);
|
||||
|
||||
return 1;
|
||||
}
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/mm/mem_event.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/mm/mem_event.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/mm/mem_event.c
|
||||
@@ -252,7 +252,7 @@ int mem_event_domctl(struct domain *d, x
|
||||
{
|
||||
case XEN_DOMCTL_MEM_EVENT_OP_PAGING:
|
||||
{
|
||||
- struct mem_event_domain *med = &d->mem_paging;
|
||||
+ struct mem_event_domain *med = &d->mem_event->paging;
|
||||
rc = -EINVAL;
|
||||
|
||||
switch( mec->op )
|
||||
@@ -297,7 +297,7 @@ int mem_event_domctl(struct domain *d, x
|
||||
|
||||
case XEN_DOMCTL_MEM_EVENT_OP_ACCESS:
|
||||
{
|
||||
- struct mem_event_domain *med = &d->mem_access;
|
||||
+ struct mem_event_domain *med = &d->mem_event->access;
|
||||
rc = -EINVAL;
|
||||
|
||||
switch( mec->op )
|
||||
@@ -320,7 +320,7 @@ int mem_event_domctl(struct domain *d, x
|
||||
case XEN_DOMCTL_MEM_EVENT_OP_ACCESS_DISABLE:
|
||||
{
|
||||
if ( med->ring_page )
|
||||
- rc = mem_event_disable(&d->mem_access);
|
||||
+ rc = mem_event_disable(med);
|
||||
}
|
||||
break;
|
||||
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/mm/mem_sharing.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/mm/mem_sharing.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/mm/mem_sharing.c
|
||||
@@ -322,12 +322,12 @@ static struct page_info* mem_sharing_all
|
||||
req.flags |= MEM_EVENT_FLAG_VCPU_PAUSED;
|
||||
}
|
||||
|
||||
- if(mem_event_check_ring(d, &d->mem_share)) return page;
|
||||
+ if(mem_event_check_ring(d, &d->mem_event->share)) return page;
|
||||
|
||||
req.gfn = gfn;
|
||||
req.p2mt = p2m_ram_shared;
|
||||
req.vcpu_id = v->vcpu_id;
|
||||
- mem_event_put_request(d, &d->mem_share, &req);
|
||||
+ mem_event_put_request(d, &d->mem_event->share, &req);
|
||||
|
||||
return page;
|
||||
}
|
||||
@@ -342,7 +342,7 @@ int mem_sharing_sharing_resume(struct do
|
||||
mem_event_response_t rsp;
|
||||
|
||||
/* Get request off the ring */
|
||||
- mem_event_get_response(&d->mem_share, &rsp);
|
||||
+ mem_event_get_response(&d->mem_event->share, &rsp);
|
||||
|
||||
/* Unpause domain/vcpu */
|
||||
if( rsp.flags & MEM_EVENT_FLAG_VCPU_PAUSED )
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/mm/p2m.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/mm/p2m.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/mm/p2m.c
|
||||
@@ -2995,7 +2995,7 @@ void p2m_mem_paging_drop_page(struct p2m
|
||||
struct domain *d = p2m->domain;
|
||||
|
||||
/* Check that there's space on the ring for this request */
|
||||
- if ( mem_event_check_ring(d, &d->mem_paging) == 0)
|
||||
+ if ( mem_event_check_ring(d, &d->mem_event->paging) == 0)
|
||||
{
|
||||
/* Send release notification to pager */
|
||||
memset(&req, 0, sizeof(req));
|
||||
@@ -3003,7 +3003,7 @@ void p2m_mem_paging_drop_page(struct p2m
|
||||
req.gfn = gfn;
|
||||
req.vcpu_id = v->vcpu_id;
|
||||
|
||||
- mem_event_put_request(d, &d->mem_paging, &req);
|
||||
+ mem_event_put_request(d, &d->mem_event->paging, &req);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3038,7 +3038,7 @@ void p2m_mem_paging_populate(struct p2m_
|
||||
struct domain *d = p2m->domain;
|
||||
|
||||
/* Check that there's space on the ring for this request */
|
||||
- if ( mem_event_check_ring(d, &d->mem_paging) )
|
||||
+ if ( mem_event_check_ring(d, &d->mem_event->paging) )
|
||||
return;
|
||||
|
||||
memset(&req, 0, sizeof(req));
|
||||
@@ -3069,7 +3069,7 @@ void p2m_mem_paging_populate(struct p2m_
|
||||
else if ( p2mt != p2m_ram_paging_out && p2mt != p2m_ram_paged )
|
||||
{
|
||||
/* gfn is already on its way back and vcpu is not paused */
|
||||
- mem_event_put_req_producers(&d->mem_paging);
|
||||
+ mem_event_put_req_producers(&d->mem_event->paging);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -3078,7 +3078,7 @@ void p2m_mem_paging_populate(struct p2m_
|
||||
req.p2mt = p2mt;
|
||||
req.vcpu_id = v->vcpu_id;
|
||||
|
||||
- mem_event_put_request(d, &d->mem_paging, &req);
|
||||
+ mem_event_put_request(d, &d->mem_event->paging, &req);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -3156,7 +3156,7 @@ void p2m_mem_paging_resume(struct p2m_do
|
||||
mfn_t mfn;
|
||||
|
||||
/* Pull the response off the ring */
|
||||
- mem_event_get_response(&d->mem_paging, &rsp);
|
||||
+ mem_event_get_response(&d->mem_event->paging, &rsp);
|
||||
|
||||
/* Fix p2m entry if the page was not dropped */
|
||||
if ( !(rsp.flags & MEM_EVENT_FLAG_DROP_PAGE) )
|
||||
@@ -3209,7 +3209,7 @@ void p2m_mem_access_check(unsigned long
|
||||
p2m_unlock(p2m);
|
||||
|
||||
/* Otherwise, check if there is a memory event listener, and send the message along */
|
||||
- res = mem_event_check_ring(d, &d->mem_access);
|
||||
+ res = mem_event_check_ring(d, &d->mem_event->access);
|
||||
if ( res < 0 )
|
||||
{
|
||||
/* No listener */
|
||||
@@ -3253,7 +3253,7 @@ void p2m_mem_access_check(unsigned long
|
||||
|
||||
req.vcpu_id = v->vcpu_id;
|
||||
|
||||
- mem_event_put_request(d, &d->mem_access, &req);
|
||||
+ mem_event_put_request(d, &d->mem_event->access, &req);
|
||||
|
||||
/* VCPU paused, mem event request sent */
|
||||
}
|
||||
@@ -3263,7 +3263,7 @@ void p2m_mem_access_resume(struct p2m_do
|
||||
struct domain *d = p2m->domain;
|
||||
mem_event_response_t rsp;
|
||||
|
||||
- mem_event_get_response(&d->mem_access, &rsp);
|
||||
+ mem_event_get_response(&d->mem_event->access, &rsp);
|
||||
|
||||
/* Unpause domain */
|
||||
if ( rsp.flags & MEM_EVENT_FLAG_VCPU_PAUSED )
|
||||
Index: xen-4.1.2-testing/xen/common/domain.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/common/domain.c
|
||||
+++ xen-4.1.2-testing/xen/common/domain.c
|
||||
@@ -298,6 +298,10 @@ struct domain *domain_create(
|
||||
init_status |= INIT_gnttab;
|
||||
|
||||
poolid = 0;
|
||||
+
|
||||
+ d->mem_event = xzalloc(struct mem_event_per_domain);
|
||||
+ if ( !d->mem_event )
|
||||
+ goto fail;
|
||||
}
|
||||
|
||||
if ( arch_domain_create(d, domcr_flags) != 0 )
|
||||
@@ -329,6 +333,7 @@ struct domain *domain_create(
|
||||
fail:
|
||||
d->is_dying = DOMDYING_dead;
|
||||
atomic_set(&d->refcnt, DOMAIN_DESTROYED);
|
||||
+ xfree(d->mem_event);
|
||||
if ( init_status & INIT_arch )
|
||||
arch_domain_destroy(d);
|
||||
if ( init_status & INIT_gnttab )
|
||||
Index: xen-4.1.2-testing/xen/include/xen/sched.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/xen/sched.h
|
||||
+++ xen-4.1.2-testing/xen/include/xen/sched.h
|
||||
@@ -201,6 +201,16 @@ struct mem_event_domain
|
||||
int xen_port;
|
||||
};
|
||||
|
||||
+struct mem_event_per_domain
|
||||
+{
|
||||
+ /* Memory sharing support */
|
||||
+ struct mem_event_domain share;
|
||||
+ /* Memory paging support */
|
||||
+ struct mem_event_domain paging;
|
||||
+ /* Memory access support */
|
||||
+ struct mem_event_domain access;
|
||||
+};
|
||||
+
|
||||
struct domain
|
||||
{
|
||||
domid_t domain_id;
|
||||
@@ -327,12 +337,8 @@ struct domain
|
||||
/* Non-migratable and non-restoreable? */
|
||||
bool_t disable_migrate;
|
||||
|
||||
- /* Memory sharing support */
|
||||
- struct mem_event_domain mem_share;
|
||||
- /* Memory paging support */
|
||||
- struct mem_event_domain mem_paging;
|
||||
- /* Memory access support */
|
||||
- struct mem_event_domain mem_access;
|
||||
+ /* Various mem_events */
|
||||
+ struct mem_event_per_domain *mem_event;
|
||||
|
||||
/* Currently computed from union of all vcpu cpu-affinity masks. */
|
||||
nodemask_t node_affinity;
|
27
24270-Free_d-mem_event_on_domain_destruction..patch
Normal file
27
24270-Free_d-mem_event_on_domain_destruction..patch
Normal file
@ -0,0 +1,27 @@
|
||||
changeset: 24270:08716a7f1b74
|
||||
user: Keir Fraser <keir@xen.org>
|
||||
date: Wed Nov 30 07:12:41 2011 -0800
|
||||
files: xen/common/domain.c
|
||||
description:
|
||||
Free d->mem_event on domain destruction.
|
||||
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
|
||||
---
|
||||
xen/common/domain.c | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
Index: xen-4.1.2-testing/xen/common/domain.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/common/domain.c
|
||||
+++ xen-4.1.2-testing/xen/common/domain.c
|
||||
@@ -661,6 +661,8 @@ static void complete_domain_destroy(stru
|
||||
/* Free page used by xen oprofile buffer. */
|
||||
free_xenoprof_pages(d);
|
||||
|
||||
+ xfree(d->mem_event);
|
||||
+
|
||||
for ( i = d->max_vcpus - 1; i >= 0; i-- )
|
||||
if ( (v = d->vcpu[i]) != NULL )
|
||||
free_vcpu_struct(v);
|
@ -0,0 +1,50 @@
|
||||
changeset: 24272:62ff6a318c5d
|
||||
user: Keir Fraser <keir@xen.org>
|
||||
date: Wed Nov 30 16:59:58 2011 -0800
|
||||
files: xen/common/page_alloc.c
|
||||
description:
|
||||
xenpaging: Fix c/s 23507:0a29c8c3ddf7 ("update machine_to_phys_mapping[] during page deallocation")
|
||||
|
||||
This patch clobbers page owner in free_heap_pages() before we are
|
||||
finished using it. This means that a subsequent test to determine
|
||||
whether it is safe to avoid safety TLB flushes incorrectly always
|
||||
determines that it is safe to do so.
|
||||
|
||||
The fix is simple: we can defer the original patch's work until after
|
||||
we are done with the page-owner field.
|
||||
|
||||
Thanks to Christian Limpach for spotting this one.
|
||||
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
|
||||
---
|
||||
xen/common/page_alloc.c | 8 ++++----
|
||||
1 file changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
Index: xen-4.1.2-testing/xen/common/page_alloc.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/common/page_alloc.c
|
||||
+++ xen-4.1.2-testing/xen/common/page_alloc.c
|
||||
@@ -540,10 +540,6 @@ static void free_heap_pages(
|
||||
|
||||
for ( i = 0; i < (1 << order); i++ )
|
||||
{
|
||||
- /* This page is not a guest frame any more. */
|
||||
- page_set_owner(&pg[i], NULL); /* set_gpfn_from_mfn snoops pg owner */
|
||||
- set_gpfn_from_mfn(mfn + i, INVALID_M2P_ENTRY);
|
||||
-
|
||||
/*
|
||||
* Cannot assume that count_info == 0, as there are some corner cases
|
||||
* where it isn't the case and yet it isn't a bug:
|
||||
@@ -567,6 +563,10 @@ static void free_heap_pages(
|
||||
pg[i].u.free.need_tlbflush = (page_get_owner(&pg[i]) != NULL);
|
||||
if ( pg[i].u.free.need_tlbflush )
|
||||
pg[i].tlbflush_timestamp = tlbflush_current_time();
|
||||
+
|
||||
+ /* This page is not a guest frame any more. */
|
||||
+ page_set_owner(&pg[i], NULL); /* set_gpfn_from_mfn snoops pg owner */
|
||||
+ set_gpfn_from_mfn(mfn + i, INVALID_M2P_ENTRY);
|
||||
}
|
||||
|
||||
avail[node][zone] += 1 << order;
|
@ -0,0 +1,105 @@
|
||||
changeset: 24318:f25a004a6de8
|
||||
user: Andres Lagar-Cavilla <andres@lagarcavilla.org>
|
||||
date: Thu Dec 01 17:21:24 2011 +0000
|
||||
files: xen/arch/x86/mm.c
|
||||
description:
|
||||
x86/mm: Fix checks during foreign mapping of paged pages
|
||||
|
||||
Check that the valid mfn is the one we are mapping, not the
|
||||
mfn of the page table of the foreign domain.
|
||||
|
||||
Signed-off-by: Andres Lagar-Cavilla <andres@lagarcavilla.org>
|
||||
Acked-by: Tim Deegan <tim@xen.org>
|
||||
Committed-by: Tim Deegan <tim@xen.org>
|
||||
|
||||
|
||||
---
|
||||
xen/arch/x86/mm.c | 24 ++++++++++++++++--------
|
||||
1 file changed, 16 insertions(+), 8 deletions(-)
|
||||
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/mm.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/mm.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/mm.c
|
||||
@@ -3492,8 +3492,9 @@ int do_mmu_update(
|
||||
{
|
||||
l1_pgentry_t l1e = l1e_from_intpte(req.val);
|
||||
p2m_type_t l1e_p2mt;
|
||||
+ unsigned long l1emfn = mfn_x(
|
||||
gfn_to_mfn(p2m_get_hostp2m(pg_owner),
|
||||
- l1e_get_pfn(l1e), &l1e_p2mt);
|
||||
+ l1e_get_pfn(l1e), &l1e_p2mt));
|
||||
|
||||
if ( p2m_is_paged(l1e_p2mt) )
|
||||
{
|
||||
@@ -3502,7 +3503,8 @@ int do_mmu_update(
|
||||
rc = -ENOENT;
|
||||
break;
|
||||
}
|
||||
- else if ( p2m_ram_paging_in_start == l1e_p2mt && !mfn_valid(mfn) )
|
||||
+ else if ( p2m_ram_paging_in_start == l1e_p2mt &&
|
||||
+ !mfn_valid(l1emfn) )
|
||||
{
|
||||
rc = -ENOENT;
|
||||
break;
|
||||
@@ -3534,7 +3536,8 @@ int do_mmu_update(
|
||||
{
|
||||
l2_pgentry_t l2e = l2e_from_intpte(req.val);
|
||||
p2m_type_t l2e_p2mt;
|
||||
- gfn_to_mfn(p2m_get_hostp2m(pg_owner), l2e_get_pfn(l2e), &l2e_p2mt);
|
||||
+ unsigned long l2emfn = mfn_x(
|
||||
+ gfn_to_mfn(p2m_get_hostp2m(pg_owner), l2e_get_pfn(l2e), &l2e_p2mt));
|
||||
|
||||
if ( p2m_is_paged(l2e_p2mt) )
|
||||
{
|
||||
@@ -3543,7 +3546,8 @@ int do_mmu_update(
|
||||
rc = -ENOENT;
|
||||
break;
|
||||
}
|
||||
- else if ( p2m_ram_paging_in_start == l2e_p2mt && !mfn_valid(mfn) )
|
||||
+ else if ( p2m_ram_paging_in_start == l2e_p2mt &&
|
||||
+ !mfn_valid(l2emfn) )
|
||||
{
|
||||
rc = -ENOENT;
|
||||
break;
|
||||
@@ -3563,7 +3567,8 @@ int do_mmu_update(
|
||||
{
|
||||
l3_pgentry_t l3e = l3e_from_intpte(req.val);
|
||||
p2m_type_t l3e_p2mt;
|
||||
- gfn_to_mfn(p2m_get_hostp2m(pg_owner), l3e_get_pfn(l3e), &l3e_p2mt);
|
||||
+ unsigned long l3emfn = mfn_x(
|
||||
+ gfn_to_mfn(p2m_get_hostp2m(pg_owner), l3e_get_pfn(l3e), &l3e_p2mt));
|
||||
|
||||
if ( p2m_is_paged(l3e_p2mt) )
|
||||
{
|
||||
@@ -3572,7 +3577,8 @@ int do_mmu_update(
|
||||
rc = -ENOENT;
|
||||
break;
|
||||
}
|
||||
- else if ( p2m_ram_paging_in_start == l3e_p2mt && !mfn_valid(mfn) )
|
||||
+ else if ( p2m_ram_paging_in_start == l3e_p2mt &&
|
||||
+ !mfn_valid(l3emfn) )
|
||||
{
|
||||
rc = -ENOENT;
|
||||
break;
|
||||
@@ -3592,8 +3598,9 @@ int do_mmu_update(
|
||||
{
|
||||
l4_pgentry_t l4e = l4e_from_intpte(req.val);
|
||||
p2m_type_t l4e_p2mt;
|
||||
+ unsigned long l4emfn = mfn_x(
|
||||
gfn_to_mfn(p2m_get_hostp2m(pg_owner),
|
||||
- l4e_get_pfn(l4e), &l4e_p2mt);
|
||||
+ l4e_get_pfn(l4e), &l4e_p2mt));
|
||||
|
||||
if ( p2m_is_paged(l4e_p2mt) )
|
||||
{
|
||||
@@ -3602,7 +3609,8 @@ int do_mmu_update(
|
||||
rc = -ENOENT;
|
||||
break;
|
||||
}
|
||||
- else if ( p2m_ram_paging_in_start == l4e_p2mt && !mfn_valid(mfn) )
|
||||
+ else if ( p2m_ram_paging_in_start == l4e_p2mt &&
|
||||
+ !mfn_valid(l4emfn) )
|
||||
{
|
||||
rc = -ENOENT;
|
||||
break;
|
@ -0,0 +1,27 @@
|
||||
changeset: 24341:60d4e257d04b
|
||||
user: Jan Beulich <jbeulich@suse.com>
|
||||
date: Fri Dec 02 09:05:26 2011 +0100
|
||||
files: xen/arch/x86/x86_64/mmconfig_64.c
|
||||
description:
|
||||
x86-64/mmcfg: remove __initdata annotation overlooked in 23749:e8d1c8f074ba
|
||||
|
||||
Signed-off-by: Jan Beulich <jbeulich@suse.com>
|
||||
|
||||
|
||||
---
|
||||
xen/arch/x86/x86_64/mmconfig_64.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/x86_64/mmconfig_64.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/x86_64/mmconfig_64.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/x86_64/mmconfig_64.c
|
||||
@@ -23,7 +23,7 @@ struct mmcfg_virt {
|
||||
char __iomem *virt;
|
||||
};
|
||||
static struct mmcfg_virt *pci_mmcfg_virt;
|
||||
-static int __initdata mmcfg_pci_segment_shift;
|
||||
+static unsigned int mmcfg_pci_segment_shift;
|
||||
|
||||
static char __iomem *get_virt(unsigned int seg, unsigned int *bus)
|
||||
{
|
@ -0,0 +1,91 @@
|
||||
changeset: 24344:72f4e4cb7440
|
||||
user: Keir Fraser <keir@xen.org>
|
||||
date: Fri Dec 02 06:31:14 2011 -0800
|
||||
files: tools/libxc/xc_cpuid_x86.c tools/misc/xen-detect.c
|
||||
description:
|
||||
tools/x86_64: Fix cpuid() inline asm to not clobber stack's red zone
|
||||
|
||||
Pushing stuff onto the stack on x86-64 when we do not specify
|
||||
-mno-red-zone is unsafe. Since the complicated asm is due to register
|
||||
pressure on i386, we simply implement an all-new simpler alternative
|
||||
for x86-64.
|
||||
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
Acked-by: Jan Beulich <jbeulich@novell.com>
|
||||
|
||||
|
||||
---
|
||||
tools/libxc/xc_cpuid_x86.c | 18 +++++++++---------
|
||||
tools/misc/xen-detect.c | 17 ++++++++++-------
|
||||
2 files changed, 19 insertions(+), 16 deletions(-)
|
||||
|
||||
Index: xen-4.1.2-testing/tools/libxc/xc_cpuid_x86.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/tools/libxc/xc_cpuid_x86.c
|
||||
+++ xen-4.1.2-testing/tools/libxc/xc_cpuid_x86.c
|
||||
@@ -42,23 +42,23 @@ static int hypervisor_is_64bit(xc_interf
|
||||
static void cpuid(const unsigned int *input, unsigned int *regs)
|
||||
{
|
||||
unsigned int count = (input[1] == XEN_CPUID_INPUT_UNUSED) ? 0 : input[1];
|
||||
- asm (
|
||||
#ifdef __i386__
|
||||
+ /* Use the stack to avoid reg constraint failures with some gcc flags */
|
||||
+ asm (
|
||||
"push %%ebx; push %%edx\n\t"
|
||||
-#else
|
||||
- "push %%rbx; push %%rdx\n\t"
|
||||
-#endif
|
||||
"cpuid\n\t"
|
||||
"mov %%ebx,4(%4)\n\t"
|
||||
"mov %%edx,12(%4)\n\t"
|
||||
-#ifdef __i386__
|
||||
"pop %%edx; pop %%ebx\n\t"
|
||||
-#else
|
||||
- "pop %%rdx; pop %%rbx\n\t"
|
||||
-#endif
|
||||
: "=a" (regs[0]), "=c" (regs[2])
|
||||
- : "0" (input[0]), "1" (count), "S" (regs)
|
||||
+ : "0" (input[0]), "1" (count), "S" (_regs)
|
||||
: "memory" );
|
||||
+#else
|
||||
+ asm (
|
||||
+ "cpuid"
|
||||
+ : "=a" (regs[0]), "=b" (regs[1]), "=c" (regs[2]), "=d" (regs[3])
|
||||
+ : "0" (input[0]), "2" (count) );
|
||||
+#endif
|
||||
}
|
||||
|
||||
/* Get the manufacturer brand name of the host processor. */
|
||||
Index: xen-4.1.2-testing/tools/misc/xen-detect.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/tools/misc/xen-detect.c
|
||||
+++ xen-4.1.2-testing/tools/misc/xen-detect.c
|
||||
@@ -35,18 +35,21 @@
|
||||
|
||||
static void cpuid(uint32_t idx, uint32_t *regs, int pv_context)
|
||||
{
|
||||
- asm volatile (
|
||||
#ifdef __i386__
|
||||
-#define R(x) "%%e"#x"x"
|
||||
-#else
|
||||
-#define R(x) "%%r"#x"x"
|
||||
-#endif
|
||||
- "push "R(a)"; push "R(b)"; push "R(c)"; push "R(d)"\n\t"
|
||||
+ /* Use the stack to avoid reg constraint failures with some gcc flags */
|
||||
+ asm volatile (
|
||||
+ "push %%eax; push %%ebx; push %%ecx; push %%edx\n\t"
|
||||
"test %1,%1 ; jz 1f ; ud2a ; .ascii \"xen\" ; 1: cpuid\n\t"
|
||||
"mov %%eax,(%2); mov %%ebx,4(%2)\n\t"
|
||||
"mov %%ecx,8(%2); mov %%edx,12(%2)\n\t"
|
||||
- "pop "R(d)"; pop "R(c)"; pop "R(b)"; pop "R(a)"\n\t"
|
||||
+ "pop %%edx; pop %%ecx; pop %%ebx; pop %%eax\n\t"
|
||||
: : "a" (idx), "c" (pv_context), "S" (regs) : "memory" );
|
||||
+#else
|
||||
+ asm volatile (
|
||||
+ "test %5,%5 ; jz 1f ; ud2a ; .ascii \"xen\" ; 1: cpuid\n\t"
|
||||
+ : "=a" (regs[0]), "=b" (regs[1]), "=c" (regs[2]), "=d" (regs[3])
|
||||
+ : "0" (idx), "1" (pv_context), "2" (0) );
|
||||
+#endif
|
||||
}
|
||||
|
||||
static int check_for_xen(int pv_context)
|
@ -0,0 +1,28 @@
|
||||
changeset: 24345:491c3ebf1d37
|
||||
tag: tip
|
||||
user: Keir Fraser <keir@xen.org>
|
||||
date: Fri Dec 02 08:40:02 2011 -0800
|
||||
files: tools/libxc/xc_cpuid_x86.c
|
||||
description:
|
||||
tools/libxc: Fix x86_32 build breakage in previous changeset.
|
||||
|
||||
Signed-off-by: Keir Fraser <keir@xen.org>
|
||||
|
||||
|
||||
---
|
||||
tools/libxc/xc_cpuid_x86.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
Index: xen-4.1.2-testing/tools/libxc/xc_cpuid_x86.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/tools/libxc/xc_cpuid_x86.c
|
||||
+++ xen-4.1.2-testing/tools/libxc/xc_cpuid_x86.c
|
||||
@@ -51,7 +51,7 @@ static void cpuid(const unsigned int *in
|
||||
"mov %%edx,12(%4)\n\t"
|
||||
"pop %%edx; pop %%ebx\n\t"
|
||||
: "=a" (regs[0]), "=c" (regs[2])
|
||||
- : "0" (input[0]), "1" (count), "S" (_regs)
|
||||
+ : "0" (input[0]), "1" (count), "S" (regs)
|
||||
: "memory" );
|
||||
#else
|
||||
asm (
|
@ -27,7 +27,7 @@ Index: xen-4.1.2-testing/tools/libxl/xl.c
|
||||
default:
|
||||
fprintf(stderr, "unknown global option\n");
|
||||
exit(2);
|
||||
@@ -107,6 +111,22 @@ int main(int argc, char **argv)
|
||||
@@ -107,6 +111,18 @@ int main(int argc, char **argv)
|
||||
exit(1);
|
||||
}
|
||||
opterr = 0;
|
||||
@ -41,10 +41,6 @@ Index: xen-4.1.2-testing/tools/libxl/xl.c
|
||||
+ "using libxenlight in\nconjunction with the legacy xend "
|
||||
+ "toolstack. Use -f (force) to override\n");
|
||||
+ exit(1);
|
||||
+ } else {
|
||||
+ fprintf(stderr, "WARNING: xend is running! It is not recommended "
|
||||
+ "using libxenlight in\nconjunction with the legacy xend "
|
||||
+ "toolstack.\n\n");
|
||||
+ }
|
||||
+ }
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
Index: xen-4.1.2-testing/xen/arch/x86/platform_hypercall.c
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/arch/x86/platform_hypercall.c
|
||||
+++ xen-4.1.2-testing/xen/arch/x86/platform_hypercall.c
|
||||
--- a/xen/arch/x86/platform_hypercall.c
|
||||
+++ b/xen/arch/x86/platform_hypercall.c
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <xen/cpu.h>
|
||||
#include <asm/current.h>
|
||||
@ -19,7 +17,7 @@ Index: xen-4.1.2-testing/xen/arch/x86/platform_hypercall.c
|
||||
struct xen_platform_op curop, *op = &curop;
|
||||
|
||||
if ( !IS_PRIV(current->domain) )
|
||||
@@ -522,6 +523,24 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe
|
||||
@@ -529,6 +530,24 @@ ret_t do_platform_op(XEN_GUEST_HANDLE(xe
|
||||
op->u.mem_add.epfn,
|
||||
op->u.mem_add.pxm);
|
||||
break;
|
||||
@ -44,10 +42,8 @@ Index: xen-4.1.2-testing/xen/arch/x86/platform_hypercall.c
|
||||
default:
|
||||
ret = -ENOSYS;
|
||||
break;
|
||||
Index: xen-4.1.2-testing/xen/include/public/platform.h
|
||||
===================================================================
|
||||
--- xen-4.1.2-testing.orig/xen/include/public/platform.h
|
||||
+++ xen-4.1.2-testing/xen/include/public/platform.h
|
||||
--- a/xen/include/public/platform.h
|
||||
+++ b/xen/include/public/platform.h
|
||||
@@ -451,6 +451,14 @@ struct xenpf_mem_hotadd
|
||||
uint32_t flags;
|
||||
};
|
||||
|
@ -12,7 +12,9 @@ usage () {
|
||||
exit $R_USAGE
|
||||
}
|
||||
|
||||
xm_cmd="xl -f"
|
||||
xm_cmd="xm"
|
||||
pidof -x /usr/sbin/xend >/dev/null 2>&1 || xm_cmd="xl"
|
||||
|
||||
######################################################################
|
||||
# change the working direcory and source some common files
|
||||
#
|
||||
|
135
xen.changes
135
xen.changes
@ -1,3 +1,138 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 2 20:35:29 CET 2011 - ohering@suse.de
|
||||
|
||||
- fate#310510 - fix xenpaging
|
||||
24269-mem_event_move_mem_event_domain_out_of_struct_domain.patch
|
||||
24270-Free_d-mem_event_on_domain_destruction..patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 2 20:25:24 CET 2011 - ohering@suse.de
|
||||
|
||||
- fate#310510 - fix xenpaging
|
||||
24318-x86-mm_Fix_checks_during_foreign_mapping_of_paged_pages.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 2 20:21:48 CET 2011 - ohering@suse.de
|
||||
|
||||
- fate#310510 - fix xenpaging
|
||||
23949-constify_vcpu_set_affinitys_second_parameter.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 2 19:36:33 CET 2011 - ohering@suse.de
|
||||
|
||||
- fate#310510 - fix xenpaging
|
||||
24105-xenpaging_compare_domain_pointer_in_p2m_mem_paging_populate.patch
|
||||
24106-mem_event_check_capabilities_only_once.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 2 19:02:05 CET 2011 - ohering@suse.de
|
||||
|
||||
- fate#310510 - fix xenpaging
|
||||
24272-xenpaging_Fix_c-s_235070a29c8c3ddf7_update_machine_to_phys_mapping_during_page_deallocation.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 2 18:46:14 CET 2011 - ohering@suse.de
|
||||
|
||||
- bnc#727081 - xend domains don't work anymore since update from 12.1 beta to 12.1 RC 1
|
||||
24344-tools-x86_64_Fix_cpuid_inline_asm_to_not_clobber_stacks_red_zone.patch
|
||||
24345-tools-libxc_Fix_x86_32_build_breakage_in_previous_changeset..patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 2 18:42:16 CET 2011 - ohering@suse.de
|
||||
|
||||
- bnc#733449 - Panic in mcfg_ioremap when booting xen-dbg.gz on Xeon E3-1230
|
||||
24341-x86-64-mmcfg_remove___initdata_annotation_overlooked_in_23749e8d1c8f074ba.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 2 18:21:46 CET 2011 - ohering@suse.de
|
||||
|
||||
- fate#310510 - fix xenpaging
|
||||
backport waitqueue changes from xen-unstable
|
||||
24104-waitqueue_Double_size_of_x86_shadow_stack..patch
|
||||
24171-x86waitqueue_Allocate_whole_page_for_shadow_stack..patch
|
||||
24195-waitqueue_Detect_saved-stack_overflow_and_crash_the_guest..patch
|
||||
24196-waitqueue_Reorder_prepare_to_wait_so_that_vcpu_is_definitely_on_the.patch
|
||||
24197-x86-waitqueue_Because_we_have_per-cpu_stacks_we_must_wake_up_on_teh.patch
|
||||
24231-waitqueue_Implement_wake_up_nroneall..patch
|
||||
24232-waitqueue_Hold_a_reference_to_a_domain_on_a_waitqueue..patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 2 17:32:34 CET 2011 - ohering@suse.de
|
||||
|
||||
- fate#310510 - fix xenpaging
|
||||
24227-xenpaging_restrict_pagefile_permissions.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 2 17:29:35 CET 2011 - ohering@suse.de
|
||||
|
||||
- fate#310510 - fix xenpaging
|
||||
merge upstream version of our existing patches:
|
||||
24218-libxc_add_bitmap_clear_function.patch
|
||||
remove old versions:
|
||||
xenpaging.bitmap_clear.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Dec 2 17:04:56 CET 2011 - ohering@suse.de
|
||||
|
||||
- fate#310510 - fix xenpaging
|
||||
merge upstream version of our existing patches:
|
||||
24138-xenpaging_munmap_all_pages_after_page-in.patch
|
||||
24208-xenpaging_remove_filename_from_comment.patch
|
||||
24209-xenpaging_remove_obsolete_comment_in_resume_path.patch
|
||||
24210-xenpaging_use_PERROR_to_print_errno.patch
|
||||
24211-xenpaging_simplify_file_op.patch
|
||||
24212-xenpaging_print_gfn_in_failure_case.patch
|
||||
24213-xenpaging_update_xenpaging_init.patch
|
||||
24214-xenpaging_remove_xc_dominfo_t_from_paging_t.patch
|
||||
24215-xenpaging_track_the_number_of_paged-out_pages.patch
|
||||
24216-xenpaging_move_page_add-resume_loops_into_its_own_function..patch
|
||||
24217-xenpaging_improve_mainloop_exit_handling.patch
|
||||
24219-xenpaging_retry_unpageable_gfns.patch
|
||||
24220-xenpaging_install_into_LIBEXEC_dir.patch
|
||||
24221-xenpaging_add_XEN_PAGING_DIR_-_libxl_xenpaging_dir_path.patch
|
||||
24222-xenpaging_use_guests_tot_pages_as_working_target.patch
|
||||
24223-xenpaging_watch_the_guests_memory-target-tot_pages_xenstore_value.patch
|
||||
24224-xenpaging_add_cmdline_interface_for_pager.patch
|
||||
24225-xenpaging_improve_policy_mru_list_handling.patch
|
||||
24226-xenpaging_add_debug_to_show_received_watch_event..patch
|
||||
remove old versions:
|
||||
xenpaging.XEN_PAGING_DIR.patch
|
||||
xenpaging.add_evict_pages.patch
|
||||
xenpaging.cmdline-interface.patch
|
||||
xenpaging.encapsulate_domain_info.patch
|
||||
xenpaging.file_op-return-code.patch
|
||||
xenpaging.install-to-libexec.patch
|
||||
xenpaging.low_target_policy_nomru.patch
|
||||
xenpaging.main-loop-exit-handling.patch
|
||||
xenpaging.misleading-comment.patch
|
||||
xenpaging.page_in-munmap-size.patch
|
||||
xenpaging.print-gfn.patch
|
||||
xenpaging.record-numer-paged-out-pages.patch
|
||||
xenpaging.reset-uncomsumed.patch
|
||||
xenpaging.stale-comments.patch
|
||||
xenpaging.target-tot_pages.patch
|
||||
xenpaging.use-PERROR.patch
|
||||
xenpaging.watch-target-tot_pages.patch
|
||||
xenpaging.watch_event-DPRINTF.patch
|
||||
xenpaging.xc_interface_open-comment.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 30 10:48:50 MST 2011 - jfehlig@suse.com
|
||||
|
||||
- bnc#733348 - Use 'xm' in various scripts if xend is running.
|
||||
Modified xmclone.sh and xen-updown.sh
|
||||
- Only emit xl warning when xend is running and -f (force) flag
|
||||
is not specified.
|
||||
Modified disable-xl-when-using-xend.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 30 09:43:34 MST 2011 - carnold@novell.com
|
||||
|
||||
- Upstream patches from Jan
|
||||
24190-hap-log-dirty-disable-rc.patch
|
||||
24193-hap-track-dirty-vram-rc.patch
|
||||
24201-x86-pcpu-platform-op.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Nov 22 17:57:07 MST 2011 - carnold@novell.com
|
||||
|
||||
|
153
xen.spec
153
xen.spec
@ -96,7 +96,7 @@ BuildRequires: glibc-devel
|
||||
%if %{?with_kmp}0
|
||||
BuildRequires: kernel-source kernel-syms module-init-tools xorg-x11
|
||||
%endif
|
||||
Version: 4.1.2_08
|
||||
Version: 4.1.2_09
|
||||
Release: 1
|
||||
License: GPLv2+
|
||||
Group: System/Kernel
|
||||
@ -257,6 +257,7 @@ Patch23908: 23908-p2m_query-modify_p2mt_with_p2m_lock_held.patch
|
||||
Patch23925: 23925-x86-AMD-ARAT-Fam12.patch
|
||||
Patch23933: 23933-pt-bus2bridge-update.patch
|
||||
Patch23943: 23943-xenpaging_clear_page_content_after_evict.patch
|
||||
Patch23949: 23949-constify_vcpu_set_affinitys_second_parameter.patch
|
||||
Patch23953: 23953-xenpaging_handle_evict_failures.patch
|
||||
Patch23955: 23955-x86-pv-cpuid-xsave.patch
|
||||
Patch23957: 23957-cpufreq-error-paths.patch
|
||||
@ -264,16 +265,56 @@ Patch23978: 23978-xenpaging_check_p2mt_in_p2m_mem_paging_functions.patch
|
||||
Patch23979: 23979-xenpaging_document_p2m_mem_paging_functions.patch
|
||||
Patch23980: 23980-xenpaging_disallow_paging_in_a_PoD_guest.patch
|
||||
Patch23993: 23993-x86-microcode-amd-fix-23871.patch
|
||||
Patch24104: 24104-waitqueue_Double_size_of_x86_shadow_stack..patch
|
||||
Patch24105: 24105-xenpaging_compare_domain_pointer_in_p2m_mem_paging_populate.patch
|
||||
Patch24106: 24106-mem_event_check_capabilities_only_once.patch
|
||||
Patch24116: 24116-x86-continuation-cancel.patch
|
||||
Patch24123: 24123-x86-cpuidle-quiesce.patch
|
||||
Patch24124: 24124-x86-microcode-amd-quiesce.patch
|
||||
Patch24137: 24137-revert-23666.patch
|
||||
Patch24138: 24138-xenpaging_munmap_all_pages_after_page-in.patch
|
||||
Patch24144: 24144-cpufreq-turbo-crash.patch
|
||||
Patch24148: 24148-shadow-pgt-dying-op-performance.patch
|
||||
Patch24155: 24155-x86-ioapic-EOI-after-migration.patch
|
||||
Patch24156: 24156-x86-ioapic-shared-vectors.patch
|
||||
Patch24157: 24157-x86-xstate-init.patch
|
||||
Patch24168: 24168-x86-vioapic-clear-remote_irr.patch
|
||||
Patch24171: 24171-x86waitqueue_Allocate_whole_page_for_shadow_stack..patch
|
||||
Patch24190: 24190-hap-log-dirty-disable-rc.patch
|
||||
Patch24193: 24193-hap-track-dirty-vram-rc.patch
|
||||
Patch24195: 24195-waitqueue_Detect_saved-stack_overflow_and_crash_the_guest..patch
|
||||
Patch24196: 24196-waitqueue_Reorder_prepare_to_wait_so_that_vcpu_is_definitely_on_the.patch
|
||||
Patch24197: 24197-x86-waitqueue_Because_we_have_per-cpu_stacks_we_must_wake_up_on_teh.patch
|
||||
Patch24201: 24201-x86-pcpu-platform-op.patch
|
||||
Patch24208: 24208-xenpaging_remove_filename_from_comment.patch
|
||||
Patch24209: 24209-xenpaging_remove_obsolete_comment_in_resume_path.patch
|
||||
Patch24210: 24210-xenpaging_use_PERROR_to_print_errno.patch
|
||||
Patch24211: 24211-xenpaging_simplify_file_op.patch
|
||||
Patch24212: 24212-xenpaging_print_gfn_in_failure_case.patch
|
||||
Patch24213: 24213-xenpaging_update_xenpaging_init.patch
|
||||
Patch24214: 24214-xenpaging_remove_xc_dominfo_t_from_paging_t.patch
|
||||
Patch24215: 24215-xenpaging_track_the_number_of_paged-out_pages.patch
|
||||
Patch24216: 24216-xenpaging_move_page_add-resume_loops_into_its_own_function..patch
|
||||
Patch24217: 24217-xenpaging_improve_mainloop_exit_handling.patch
|
||||
Patch24218: 24218-libxc_add_bitmap_clear_function.patch
|
||||
Patch24219: 24219-xenpaging_retry_unpageable_gfns.patch
|
||||
Patch24220: 24220-xenpaging_install_into_LIBEXEC_dir.patch
|
||||
Patch24221: 24221-xenpaging_add_XEN_PAGING_DIR_-_libxl_xenpaging_dir_path.patch
|
||||
Patch24222: 24222-xenpaging_use_guests_tot_pages_as_working_target.patch
|
||||
Patch24223: 24223-xenpaging_watch_the_guests_memory-target-tot_pages_xenstore_value.patch
|
||||
Patch24224: 24224-xenpaging_add_cmdline_interface_for_pager.patch
|
||||
Patch24225: 24225-xenpaging_improve_policy_mru_list_handling.patch
|
||||
Patch24226: 24226-xenpaging_add_debug_to_show_received_watch_event..patch
|
||||
Patch24227: 24227-xenpaging_restrict_pagefile_permissions.patch
|
||||
Patch24231: 24231-waitqueue_Implement_wake_up_nroneall..patch
|
||||
Patch24232: 24232-waitqueue_Hold_a_reference_to_a_domain_on_a_waitqueue..patch
|
||||
Patch24269: 24269-mem_event_move_mem_event_domain_out_of_struct_domain.patch
|
||||
Patch24270: 24270-Free_d-mem_event_on_domain_destruction..patch
|
||||
Patch24272: 24272-xenpaging_Fix_c-s_235070a29c8c3ddf7_update_machine_to_phys_mapping_during_page_deallocation.patch
|
||||
Patch24318: 24318-x86-mm_Fix_checks_during_foreign_mapping_of_paged_pages.patch
|
||||
Patch24341: 24341-x86-64-mmcfg_remove___initdata_annotation_overlooked_in_23749e8d1c8f074ba.patch
|
||||
Patch24344: 24344-tools-x86_64_Fix_cpuid_inline_asm_to_not_clobber_stacks_red_zone.patch
|
||||
Patch24345: 24345-tools-libxc_Fix_x86_32_build_breakage_in_previous_changeset..patch
|
||||
# Upstream qemu patches
|
||||
# Our patches
|
||||
Patch300: xen-config.diff
|
||||
@ -404,27 +445,7 @@ Patch651: ioemu-disable-scsi.patch
|
||||
Patch652: ioemu-disable-emulated-ide-if-pv.patch
|
||||
Patch700: hv_extid_compatibility.patch
|
||||
# FATE 310510
|
||||
Patch1107: xenpaging.stale-comments.patch
|
||||
Patch1108: xenpaging.misleading-comment.patch
|
||||
Patch1109: xenpaging.use-PERROR.patch
|
||||
Patch1110: xenpaging.file_op-return-code.patch
|
||||
Patch1111: xenpaging.print-gfn.patch
|
||||
Patch1112: xenpaging.xc_interface_open-comment.patch
|
||||
Patch1113: xenpaging.encapsulate_domain_info.patch
|
||||
Patch1114: xenpaging.record-numer-paged-out-pages.patch
|
||||
Patch1115: xenpaging.add_evict_pages.patch
|
||||
Patch1116: xenpaging.main-loop-exit-handling.patch
|
||||
Patch1117: xenpaging.bitmap_clear.patch
|
||||
Patch1118: xenpaging.reset-uncomsumed.patch
|
||||
Patch1119: xenpaging.install-to-libexec.patch
|
||||
Patch1120: xenpaging.XEN_PAGING_DIR.patch
|
||||
Patch1121: xenpaging.target-tot_pages.patch
|
||||
Patch1122: xenpaging.watch-target-tot_pages.patch
|
||||
Patch1123: xenpaging.cmdline-interface.patch
|
||||
Patch1125: xenpaging.watch_event-DPRINTF.patch
|
||||
Patch1126: xenpaging.guest-memusage.patch
|
||||
Patch1127: xenpaging.page_in-munmap-size.patch
|
||||
Patch1128: xenpaging.low_target_policy_nomru.patch
|
||||
Patch1129: xenpaging.autostart.patch
|
||||
Patch1130: xenpaging.HVMCOPY_gfn_paged_out.patch
|
||||
# xenalyze
|
||||
@ -439,6 +460,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%suse_kernel_module_package -n xen um xen -f kmp_filelist
|
||||
%endif
|
||||
|
||||
|
||||
%description
|
||||
Xen is a virtual machine monitor for x86 that supports execution of
|
||||
multiple guest operating systems with unprecedented levels of
|
||||
@ -500,6 +522,7 @@ Group: System/Kernel
|
||||
#Requires: xen = %{version}
|
||||
AutoReqProv: on
|
||||
|
||||
|
||||
%description libs
|
||||
Xen is a virtual machine monitor for x86 that supports execution of
|
||||
multiple guest operating systems with unprecedented levels of
|
||||
@ -545,6 +568,7 @@ Authors:
|
||||
|
||||
%if %{?with_dom0_support}0
|
||||
|
||||
|
||||
%package tools
|
||||
License: GPLv2+
|
||||
Summary: Xen Virtualization: Control tools for domain 0
|
||||
@ -556,6 +580,7 @@ Provides: xen-tools-ioemu = 3.2
|
||||
Obsoletes: xen-tools-ioemu <= 3.2
|
||||
AutoReqProv: on
|
||||
|
||||
|
||||
%description tools
|
||||
Xen is a virtual machine monitor for x86 that supports execution of
|
||||
multiple guest operating systems with unprecedented levels of
|
||||
@ -603,6 +628,7 @@ Authors:
|
||||
Ian Pratt <ian.pratt@cl.cam.ac.uk>
|
||||
%endif
|
||||
|
||||
|
||||
%package tools-domU
|
||||
License: GPLv2+
|
||||
Summary: Xen Virtualization: Control tools for domain U
|
||||
@ -610,6 +636,7 @@ Group: System/Kernel
|
||||
Conflicts: xen-tools
|
||||
AutoReqProv: on
|
||||
|
||||
|
||||
%description tools-domU
|
||||
Xen is a virtual machine monitor for x86 that supports execution of
|
||||
multiple guest operating systems with unprecedented levels of
|
||||
@ -630,6 +657,7 @@ Summary: Xen Virtualization: Headers and libraries for development
|
||||
Group: System/Kernel
|
||||
Requires: xen-libs = %{version}
|
||||
|
||||
|
||||
%description devel
|
||||
Xen is a virtual machine monitor for x86 that supports execution of
|
||||
multiple guest operating systems with unprecedented levels of
|
||||
@ -675,12 +703,14 @@ Authors:
|
||||
|
||||
%if %{?with_kmp}0
|
||||
|
||||
|
||||
%package KMP
|
||||
License: GPLv2+
|
||||
Group: System/Kernel
|
||||
Summary: Xen para-virtual device drivers for fully virtualized guests
|
||||
Conflicts: xen
|
||||
|
||||
|
||||
%description KMP
|
||||
Xen para-virtual device drivers for fully virtualized guests
|
||||
|
||||
@ -726,11 +756,13 @@ Xen, but is not available for release due to license restrictions.
|
||||
|
||||
%if %{?with_dom0_support}0
|
||||
|
||||
|
||||
%package doc-html
|
||||
License: GPLv2+
|
||||
Summary: Xen Virtualization: HTML documentation
|
||||
Group: Documentation/HTML
|
||||
|
||||
|
||||
%description doc-html
|
||||
Xen is a virtual machine monitor for x86 that supports execution of
|
||||
multiple guest operating systems with unprecedented levels of
|
||||
@ -750,6 +782,7 @@ License: GPLv2+
|
||||
Summary: Xen Virtualization: PDF documentation
|
||||
Group: Documentation/Other
|
||||
|
||||
|
||||
%description doc-pdf
|
||||
Xen is a virtual machine monitor for x86 that supports execution of
|
||||
multiple guest operating systems with unprecedented levels of
|
||||
@ -766,6 +799,7 @@ Authors:
|
||||
Ian Pratt <ian.pratt@cl.cam.ac.uk>
|
||||
%endif
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n %xen_build_dir -a 1 -a 20000
|
||||
%patch20000 -p1
|
||||
@ -886,6 +920,7 @@ tar xfj %{SOURCE2} -C $RPM_BUILD_DIR/%{xen_build_dir}/tools
|
||||
%patch23925 -p1
|
||||
%patch23933 -p1
|
||||
%patch23943 -p1
|
||||
%patch23949 -p1
|
||||
%patch23953 -p1
|
||||
%patch23955 -p1
|
||||
%patch23957 -p1
|
||||
@ -893,16 +928,56 @@ tar xfj %{SOURCE2} -C $RPM_BUILD_DIR/%{xen_build_dir}/tools
|
||||
%patch23979 -p1
|
||||
%patch23980 -p1
|
||||
%patch23993 -p1
|
||||
%patch24104 -p1
|
||||
%patch24105 -p1
|
||||
%patch24106 -p1
|
||||
%patch24116 -p1
|
||||
%patch24123 -p1
|
||||
%patch24124 -p1
|
||||
%patch24137 -p1
|
||||
%patch24138 -p1
|
||||
%patch24144 -p1
|
||||
%patch24148 -p1
|
||||
%patch24155 -p1
|
||||
%patch24156 -p1
|
||||
%patch24157 -p1
|
||||
%patch24168 -p1
|
||||
%patch24171 -p1
|
||||
%patch24190 -p1
|
||||
%patch24193 -p1
|
||||
%patch24195 -p1
|
||||
%patch24196 -p1
|
||||
%patch24197 -p1
|
||||
%patch24201 -p1
|
||||
%patch24208 -p1
|
||||
%patch24209 -p1
|
||||
%patch24210 -p1
|
||||
%patch24211 -p1
|
||||
%patch24212 -p1
|
||||
%patch24213 -p1
|
||||
%patch24214 -p1
|
||||
%patch24215 -p1
|
||||
%patch24216 -p1
|
||||
%patch24217 -p1
|
||||
%patch24218 -p1
|
||||
%patch24219 -p1
|
||||
%patch24220 -p1
|
||||
%patch24221 -p1
|
||||
%patch24222 -p1
|
||||
%patch24223 -p1
|
||||
%patch24224 -p1
|
||||
%patch24225 -p1
|
||||
%patch24226 -p1
|
||||
%patch24227 -p1
|
||||
%patch24231 -p1
|
||||
%patch24232 -p1
|
||||
%patch24269 -p1
|
||||
%patch24270 -p1
|
||||
%patch24272 -p1
|
||||
%patch24318 -p1
|
||||
%patch24341 -p1
|
||||
%patch24344 -p1
|
||||
%patch24345 -p1
|
||||
# Upstream patches
|
||||
%patch300 -p1
|
||||
%patch301 -p1
|
||||
@ -1025,33 +1100,14 @@ tar xfj %{SOURCE2} -C $RPM_BUILD_DIR/%{xen_build_dir}/tools
|
||||
%patch652 -p1
|
||||
%patch700 -p1
|
||||
# FATE 310510
|
||||
%patch1107 -p1
|
||||
%patch1108 -p1
|
||||
%patch1109 -p1
|
||||
%patch1110 -p1
|
||||
%patch1111 -p1
|
||||
%patch1112 -p1
|
||||
%patch1113 -p1
|
||||
%patch1114 -p1
|
||||
%patch1115 -p1
|
||||
%patch1116 -p1
|
||||
%patch1117 -p1
|
||||
%patch1118 -p1
|
||||
%patch1119 -p1
|
||||
%patch1120 -p1
|
||||
%patch1121 -p1
|
||||
%patch1122 -p1
|
||||
%patch1123 -p1
|
||||
%patch1125 -p1
|
||||
%patch1126 -p1
|
||||
%patch1127 -p1
|
||||
%patch1128 -p1
|
||||
%patch1129 -p1
|
||||
%patch1130 -p1
|
||||
#
|
||||
%patch99998 -p1
|
||||
%patch99999 -p1
|
||||
|
||||
|
||||
%build
|
||||
XEN_EXTRAVERSION=%version-%release
|
||||
XEN_EXTRAVERSION=${XEN_EXTRAVERSION#%{xvers}}
|
||||
@ -1087,6 +1143,7 @@ for flavor in %flavors_to_build; do
|
||||
done
|
||||
%endif
|
||||
|
||||
|
||||
%install
|
||||
export CFLAGS="$RPM_OPT_FLAGS"
|
||||
%if %{?with_dom0_support}0
|
||||
@ -1289,6 +1346,7 @@ rm -f $RPM_BUILD_ROOT/%{_bindir}/xencons
|
||||
|
||||
%if %{?with_dom0_support}0
|
||||
|
||||
|
||||
%files -f xen.files.txt
|
||||
%defattr(-,root,root)
|
||||
/boot/xen-%{version}-%{release}.gz
|
||||
@ -1305,6 +1363,7 @@ rm -f $RPM_BUILD_ROOT/%{_bindir}/xencons
|
||||
/boot/xen.gz
|
||||
%endif
|
||||
|
||||
|
||||
%files libs
|
||||
%defattr(-,root,root)
|
||||
%{_libdir}/fs/
|
||||
@ -1312,6 +1371,7 @@ rm -f $RPM_BUILD_ROOT/%{_bindir}/xencons
|
||||
|
||||
%if %{?with_dom0_support}0
|
||||
|
||||
|
||||
%files tools
|
||||
%defattr(-,root,root)
|
||||
/usr/bin/xenalyze
|
||||
@ -1415,12 +1475,14 @@ rm -f $RPM_BUILD_ROOT/%{_bindir}/xencons
|
||||
%config %{_fwdefdir}/xend-relocation-server
|
||||
%endif
|
||||
|
||||
|
||||
%files tools-domU
|
||||
%defattr(-,root,root)
|
||||
/usr/bin/xen-detect
|
||||
/bin/domu-xenstore
|
||||
/bin/xenstore-*
|
||||
|
||||
|
||||
%files devel
|
||||
%defattr(-,root,root)
|
||||
%{_bindir}/serial-split
|
||||
@ -1430,10 +1492,12 @@ rm -f $RPM_BUILD_ROOT/%{_bindir}/xencons
|
||||
|
||||
%if %{?with_dom0_support}0
|
||||
|
||||
|
||||
%files doc-html
|
||||
%defattr(-,root,root)
|
||||
%{_defaultdocdir}/xen/html
|
||||
|
||||
|
||||
%files doc-pdf
|
||||
%defattr(-,root,root)
|
||||
%{_defaultdocdir}/xen/pdf
|
||||
@ -1441,6 +1505,7 @@ rm -f $RPM_BUILD_ROOT/%{_bindir}/xencons
|
||||
|
||||
%if %{?with_dom0_support}0
|
||||
|
||||
|
||||
%post tools
|
||||
%if %{?with_xend}0
|
||||
# with_xend
|
||||
@ -1486,9 +1551,11 @@ if [ -f /usr/bin/qemu-nbd ]; then
|
||||
ln -s /usr/bin/qemu-nbd /usr/bin/qemu-nbd-xen
|
||||
fi
|
||||
|
||||
|
||||
%preun tools
|
||||
%{stop_on_removal xendomains xend xencommons}
|
||||
|
||||
|
||||
%postun tools
|
||||
%if %{?with_xend}0
|
||||
# with_xend
|
||||
@ -1503,8 +1570,12 @@ if [ -f /usr/bin/qemu-nbd-xen ]; then
|
||||
fi
|
||||
%endif
|
||||
|
||||
|
||||
%post libs -p /sbin/ldconfig
|
||||
|
||||
|
||||
%postun libs -p /sbin/ldconfig
|
||||
|
||||
|
||||
|
||||
%changelog
|
||||
|
@ -36,7 +36,8 @@ PART=2
|
||||
DOMU_IS_FILE_BASED=
|
||||
DOMU_ROOTDEV=
|
||||
FORCE=no
|
||||
xm_cmd="xl -f"
|
||||
xm_cmd="xm"
|
||||
pidof -x /usr/sbin/xend >/dev/null 2>&1 || xm_cmd="xl"
|
||||
|
||||
|
||||
#
|
||||
|
Loading…
x
Reference in New Issue
Block a user