paravirt.c (64131a87f2aae2ed9e05d8227c5b009ca6c50d98) paravirt.c (aac82d319148c6a84e1bf90b86d3e0ec8bf0ee38)
1/* Paravirtualization interfaces
2 Copyright (C) 2006 Rusty Russell IBM Corporation
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8

--- 140 unchanged lines hidden (view full) ---

149
150 /* identity functions just return their single argument */
151 else if (opfunc == _paravirt_ident_32)
152 ret = paravirt_patch_ident_32(insnbuf, len);
153 else if (opfunc == _paravirt_ident_64)
154 ret = paravirt_patch_ident_64(insnbuf, len);
155
156 else if (type == PARAVIRT_PATCH(pv_cpu_ops.iret) ||
1/* Paravirtualization interfaces
2 Copyright (C) 2006 Rusty Russell IBM Corporation
3
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8

--- 140 unchanged lines hidden (view full) ---

149
150 /* identity functions just return their single argument */
151 else if (opfunc == _paravirt_ident_32)
152 ret = paravirt_patch_ident_32(insnbuf, len);
153 else if (opfunc == _paravirt_ident_64)
154 ret = paravirt_patch_ident_64(insnbuf, len);
155
156 else if (type == PARAVIRT_PATCH(pv_cpu_ops.iret) ||
157#ifdef CONFIG_X86_32
157 type == PARAVIRT_PATCH(pv_cpu_ops.irq_enable_sysexit) ||
158 type == PARAVIRT_PATCH(pv_cpu_ops.irq_enable_sysexit) ||
159#endif
158 type == PARAVIRT_PATCH(pv_cpu_ops.usergs_sysret32) ||
159 type == PARAVIRT_PATCH(pv_cpu_ops.usergs_sysret64))
160 /* If operation requires a jmp, then jmp */
161 ret = paravirt_patch_jmp(insnbuf, opfunc, addr, len);
162 else
163 /* Otherwise call the function; assume target could
164 clobber any caller-save reg */
165 ret = paravirt_patch_call(insnbuf, opfunc, CLBR_ANY,

--- 200 unchanged lines hidden (view full) ---

366 .write_gdt_entry = native_write_gdt_entry,
367 .write_idt_entry = native_write_idt_entry,
368
369 .alloc_ldt = paravirt_nop,
370 .free_ldt = paravirt_nop,
371
372 .load_sp0 = native_load_sp0,
373
160 type == PARAVIRT_PATCH(pv_cpu_ops.usergs_sysret32) ||
161 type == PARAVIRT_PATCH(pv_cpu_ops.usergs_sysret64))
162 /* If operation requires a jmp, then jmp */
163 ret = paravirt_patch_jmp(insnbuf, opfunc, addr, len);
164 else
165 /* Otherwise call the function; assume target could
166 clobber any caller-save reg */
167 ret = paravirt_patch_call(insnbuf, opfunc, CLBR_ANY,

--- 200 unchanged lines hidden (view full) ---

368 .write_gdt_entry = native_write_gdt_entry,
369 .write_idt_entry = native_write_idt_entry,
370
371 .alloc_ldt = paravirt_nop,
372 .free_ldt = paravirt_nop,
373
374 .load_sp0 = native_load_sp0,
375
374#if defined(CONFIG_X86_32) || defined(CONFIG_IA32_EMULATION)
376#if defined(CONFIG_X86_32)
375 .irq_enable_sysexit = native_irq_enable_sysexit,
376#endif
377#ifdef CONFIG_X86_64
378#ifdef CONFIG_IA32_EMULATION
379 .usergs_sysret32 = native_usergs_sysret32,
380#endif
381 .usergs_sysret64 = native_usergs_sysret64,
382#endif

--- 55 unchanged lines hidden (view full) ---

438 .pte_update = paravirt_nop,
439 .pte_update_defer = paravirt_nop,
440 .pmd_update = paravirt_nop,
441 .pmd_update_defer = paravirt_nop,
442
443 .ptep_modify_prot_start = __ptep_modify_prot_start,
444 .ptep_modify_prot_commit = __ptep_modify_prot_commit,
445
377 .irq_enable_sysexit = native_irq_enable_sysexit,
378#endif
379#ifdef CONFIG_X86_64
380#ifdef CONFIG_IA32_EMULATION
381 .usergs_sysret32 = native_usergs_sysret32,
382#endif
383 .usergs_sysret64 = native_usergs_sysret64,
384#endif

--- 55 unchanged lines hidden (view full) ---

440 .pte_update = paravirt_nop,
441 .pte_update_defer = paravirt_nop,
442 .pmd_update = paravirt_nop,
443 .pmd_update_defer = paravirt_nop,
444
445 .ptep_modify_prot_start = __ptep_modify_prot_start,
446 .ptep_modify_prot_commit = __ptep_modify_prot_commit,
447
446#if CONFIG_PGTABLE_LEVELS >= 3
448#if PAGETABLE_LEVELS >= 3
447#ifdef CONFIG_X86_PAE
448 .set_pte_atomic = native_set_pte_atomic,
449 .pte_clear = native_pte_clear,
450 .pmd_clear = native_pmd_clear,
451#endif
452 .set_pud = native_set_pud,
453
454 .pmd_val = PTE_IDENT,
455 .make_pmd = PTE_IDENT,
456
449#ifdef CONFIG_X86_PAE
450 .set_pte_atomic = native_set_pte_atomic,
451 .pte_clear = native_pte_clear,
452 .pmd_clear = native_pmd_clear,
453#endif
454 .set_pud = native_set_pud,
455
456 .pmd_val = PTE_IDENT,
457 .make_pmd = PTE_IDENT,
458
457#if CONFIG_PGTABLE_LEVELS == 4
459#if PAGETABLE_LEVELS == 4
458 .pud_val = PTE_IDENT,
459 .make_pud = PTE_IDENT,
460
461 .set_pgd = native_set_pgd,
462#endif
460 .pud_val = PTE_IDENT,
461 .make_pud = PTE_IDENT,
462
463 .set_pgd = native_set_pgd,
464#endif
463#endif /* CONFIG_PGTABLE_LEVELS >= 3 */
465#endif /* PAGETABLE_LEVELS >= 3 */
464
465 .pte_val = PTE_IDENT,
466 .pgd_val = PTE_IDENT,
467
468 .make_pte = PTE_IDENT,
469 .make_pgd = PTE_IDENT,
470
471 .dup_mmap = paravirt_nop,

--- 18 unchanged lines hidden ---
466
467 .pte_val = PTE_IDENT,
468 .pgd_val = PTE_IDENT,
469
470 .make_pte = PTE_IDENT,
471 .make_pgd = PTE_IDENT,
472
473 .dup_mmap = paravirt_nop,

--- 18 unchanged lines hidden ---