diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-24 12:06:47 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-07-24 12:06:47 -0400 |
commit | c61264f98c1a974ee6f545f61a4ab33b141d6bda (patch) | |
tree | 490e82c3bbf1403098b582f589eec378be727d4c /arch/x86/xen/enlighten.c | |
parent | a23a334bd547e9462d9ca4a74608519a1e928848 (diff) | |
parent | bd9ddc875b6659f9f74dcfd285c472bc58041abd (diff) |
Merge branch 'upstream/xen-tracing2' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen
* 'upstream/xen-tracing2' of git://git.kernel.org/pub/scm/linux/kernel/git/jeremy/xen:
xen/trace: use class for multicall trace
xen/trace: convert mmu events to use DECLARE_EVENT_CLASS()/DEFINE_EVENT()
xen/multicall: move *idx fields to start of mc_buffer
xen/multicall: special-case singleton hypercalls
xen/multicalls: add unlikely around slowpath in __xen_mc_entry()
xen/multicalls: disable MC_DEBUG
xen/mmu: tune pgtable alloc/release
xen/mmu: use extend_args for more mmuext updates
xen/trace: add tlb flush tracepoints
xen/trace: add segment desc tracing
xen/trace: add xen_pgd_(un)pin tracepoints
xen/trace: add ptpage alloc/release tracepoints
xen/trace: add mmu tracepoints
xen/trace: add multicall tracing
xen/trace: set up tracepoint skeleton
xen/multicalls: remove debugfs stats
trace/xen: add skeleton for Xen trace events
Diffstat (limited to 'arch/x86/xen/enlighten.c')
-rw-r--r-- | arch/x86/xen/enlighten.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/arch/x86/xen/enlighten.c b/arch/x86/xen/enlighten.c index 53257421082b..974a528458a0 100644 --- a/arch/x86/xen/enlighten.c +++ b/arch/x86/xen/enlighten.c | |||
@@ -341,6 +341,8 @@ static void xen_set_ldt(const void *addr, unsigned entries) | |||
341 | struct mmuext_op *op; | 341 | struct mmuext_op *op; |
342 | struct multicall_space mcs = xen_mc_entry(sizeof(*op)); | 342 | struct multicall_space mcs = xen_mc_entry(sizeof(*op)); |
343 | 343 | ||
344 | trace_xen_cpu_set_ldt(addr, entries); | ||
345 | |||
344 | op = mcs.args; | 346 | op = mcs.args; |
345 | op->cmd = MMUEXT_SET_LDT; | 347 | op->cmd = MMUEXT_SET_LDT; |
346 | op->arg1.linear_addr = (unsigned long)addr; | 348 | op->arg1.linear_addr = (unsigned long)addr; |
@@ -496,6 +498,8 @@ static void xen_write_ldt_entry(struct desc_struct *dt, int entrynum, | |||
496 | xmaddr_t mach_lp = arbitrary_virt_to_machine(&dt[entrynum]); | 498 | xmaddr_t mach_lp = arbitrary_virt_to_machine(&dt[entrynum]); |
497 | u64 entry = *(u64 *)ptr; | 499 | u64 entry = *(u64 *)ptr; |
498 | 500 | ||
501 | trace_xen_cpu_write_ldt_entry(dt, entrynum, entry); | ||
502 | |||
499 | preempt_disable(); | 503 | preempt_disable(); |
500 | 504 | ||
501 | xen_mc_flush(); | 505 | xen_mc_flush(); |
@@ -565,6 +569,8 @@ static void xen_write_idt_entry(gate_desc *dt, int entrynum, const gate_desc *g) | |||
565 | unsigned long p = (unsigned long)&dt[entrynum]; | 569 | unsigned long p = (unsigned long)&dt[entrynum]; |
566 | unsigned long start, end; | 570 | unsigned long start, end; |
567 | 571 | ||
572 | trace_xen_cpu_write_idt_entry(dt, entrynum, g); | ||
573 | |||
568 | preempt_disable(); | 574 | preempt_disable(); |
569 | 575 | ||
570 | start = __this_cpu_read(idt_desc.address); | 576 | start = __this_cpu_read(idt_desc.address); |
@@ -619,6 +625,8 @@ static void xen_load_idt(const struct desc_ptr *desc) | |||
619 | static DEFINE_SPINLOCK(lock); | 625 | static DEFINE_SPINLOCK(lock); |
620 | static struct trap_info traps[257]; | 626 | static struct trap_info traps[257]; |
621 | 627 | ||
628 | trace_xen_cpu_load_idt(desc); | ||
629 | |||
622 | spin_lock(&lock); | 630 | spin_lock(&lock); |
623 | 631 | ||
624 | __get_cpu_var(idt_desc) = *desc; | 632 | __get_cpu_var(idt_desc) = *desc; |
@@ -637,6 +645,8 @@ static void xen_load_idt(const struct desc_ptr *desc) | |||
637 | static void xen_write_gdt_entry(struct desc_struct *dt, int entry, | 645 | static void xen_write_gdt_entry(struct desc_struct *dt, int entry, |
638 | const void *desc, int type) | 646 | const void *desc, int type) |
639 | { | 647 | { |
648 | trace_xen_cpu_write_gdt_entry(dt, entry, desc, type); | ||
649 | |||
640 | preempt_disable(); | 650 | preempt_disable(); |
641 | 651 | ||
642 | switch (type) { | 652 | switch (type) { |
@@ -665,6 +675,8 @@ static void xen_write_gdt_entry(struct desc_struct *dt, int entry, | |||
665 | static void __init xen_write_gdt_entry_boot(struct desc_struct *dt, int entry, | 675 | static void __init xen_write_gdt_entry_boot(struct desc_struct *dt, int entry, |
666 | const void *desc, int type) | 676 | const void *desc, int type) |
667 | { | 677 | { |
678 | trace_xen_cpu_write_gdt_entry(dt, entry, desc, type); | ||
679 | |||
668 | switch (type) { | 680 | switch (type) { |
669 | case DESC_LDT: | 681 | case DESC_LDT: |
670 | case DESC_TSS: | 682 | case DESC_TSS: |
@@ -684,7 +696,9 @@ static void __init xen_write_gdt_entry_boot(struct desc_struct *dt, int entry, | |||
684 | static void xen_load_sp0(struct tss_struct *tss, | 696 | static void xen_load_sp0(struct tss_struct *tss, |
685 | struct thread_struct *thread) | 697 | struct thread_struct *thread) |
686 | { | 698 | { |
687 | struct multicall_space mcs = xen_mc_entry(0); | 699 | struct multicall_space mcs; |
700 | |||
701 | mcs = xen_mc_entry(0); | ||
688 | MULTI_stack_switch(mcs.mc, __KERNEL_DS, thread->sp0); | 702 | MULTI_stack_switch(mcs.mc, __KERNEL_DS, thread->sp0); |
689 | xen_mc_issue(PARAVIRT_LAZY_CPU); | 703 | xen_mc_issue(PARAVIRT_LAZY_CPU); |
690 | } | 704 | } |