search for: cr3

Displaying 20 results from an estimated 1098 matches for "cr3".

2007 Nov 15
0
[patch 12/19] xen: deal with stale cr3 values when unpinning pagetables
...3572cc000143b in mainline. When a pagetable is no longer in use, it must be unpinned so that its pages can be freed. However, this is only possible if there are no stray uses of the pagetable. The code currently deals with all the usual cases, but there's a rare case where a vcpu is changing cr3, but is doing so lazily, and the change hasn't actually happened by the time the pagetable is unpinned, even though it appears to have been completed. This change adds a second per-cpu cr3 variable - xen_current_cr3 - which tracks the actual state of the vcpu cr3. It is only updated once the...
2007 Nov 15
0
[patch 12/19] xen: deal with stale cr3 values when unpinning pagetables
...3572cc000143b in mainline. When a pagetable is no longer in use, it must be unpinned so that its pages can be freed. However, this is only possible if there are no stray uses of the pagetable. The code currently deals with all the usual cases, but there's a rare case where a vcpu is changing cr3, but is doing so lazily, and the change hasn't actually happened by the time the pagetable is unpinned, even though it appears to have been completed. This change adds a second per-cpu cr3 variable - xen_current_cr3 - which tracks the actual state of the vcpu cr3. It is only updated once the...
2011 Jun 27
20
[PATCH 0 of 5] v2: Nested-p2m cleanups and locking changes
This patch series tidies up a few bits ofthe nested p2m code. The main thing it does is reorganize the locking so that most of the changes to nested p2m tables happen only under the p2m lock, and the nestedp2m lock is only needed to reassign p2m tables to new cr3 values. Changes since v1: - a few minor fixes - more sensible flushing policy in p2m_get_nestedp2m() - smoke-tested this time! Tim. _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel
2006 Jun 15
1
Bug with xc_translate_foreign_address?
...urns: # ./xenctx -f 1 eip: c027b646 esp: c0441ed4 eax: 000000c4 ebx: c0495300 ecx: 000001f7 edx: 000001f7 esi: c0495394 edi: 00000000 ebp: c027fec0 cs: 00000060 ds: 0000007b fs: 00000000 gs: 00000033 Stack: failed to map PT failed to map page. Upon inspection, the value of cr3 in xc_translate_foreign_address (after the line cr3 = ctx.ctrlreg[3]) is set to be 0 if the xenctx tool is run immediately after the system is booted and a domU is created. However, if I wait until after I see the second "(XEN) HVM_PIT: guest freq in cycles="<some value> in the xen...
2007 Apr 18
0
[RFC, PATCH 18/24] i386 Vmi tlbflush header
.../tlbflush.h 2006-03-10 13:03:38.000000000 -0800 @@ -4,38 +4,7 @@ #include <linux/config.h> #include <linux/mm.h> #include <asm/processor.h> - -#define __flush_tlb() \ - do { \ - unsigned int tmpreg; \ - \ - __asm__ __volatile__( \ - "movl %%cr3, %0; \n" \ - "movl %0, %%cr3; # flush TLB \n" \ - : "=r" (tmpreg) \ - :: "memory"); \ - } while (0) - -/* - * Global pages have to be flushed a bit differently. Not a real - * performance problem because this does not happen often. -...
2007 Apr 18
0
[RFC, PATCH 18/24] i386 Vmi tlbflush header
.../tlbflush.h 2006-03-10 13:03:38.000000000 -0800 @@ -4,38 +4,7 @@ #include <linux/config.h> #include <linux/mm.h> #include <asm/processor.h> - -#define __flush_tlb() \ - do { \ - unsigned int tmpreg; \ - \ - __asm__ __volatile__( \ - "movl %%cr3, %0; \n" \ - "movl %0, %%cr3; # flush TLB \n" \ - : "=r" (tmpreg) \ - :: "memory"); \ - } while (0) - -/* - * Global pages have to be flushed a bit differently. Not a real - * performance problem because this does not happen often. -...
2020 Aug 07
2
[PATCH v3 4/7] x86/paravirt: remove 32-bit support from PARAVIRT_XXL
...t; -# endif > }; > > static const struct patch_xxl patch_data_xxl = { > @@ -42,7 +38,6 @@ static const struct patch_xxl patch_data_xxl = { > .irq_save_fl = { 0x9c, 0x58 }, // pushf; pop %[re]ax > .mmu_read_cr2 = { 0x0f, 0x20, 0xd0 }, // mov %cr2, %[re]ax > .mmu_read_cr3 = { 0x0f, 0x20, 0xd8 }, // mov %cr3, %[re]ax > -# ifdef CONFIG_X86_64 > .mmu_write_cr3 = { 0x0f, 0x22, 0xdf }, // mov %rdi, %cr3 > .irq_restore_fl = { 0x57, 0x9d }, // push %rdi; popfq > .cpu_wbinvd = { 0x0f, 0x09 }, // wbinvd > @@ -50,19 +45,11 @@ static const struct patch...
2020 Aug 07
2
[PATCH v3 4/7] x86/paravirt: remove 32-bit support from PARAVIRT_XXL
...t; -# endif > }; > > static const struct patch_xxl patch_data_xxl = { > @@ -42,7 +38,6 @@ static const struct patch_xxl patch_data_xxl = { > .irq_save_fl = { 0x9c, 0x58 }, // pushf; pop %[re]ax > .mmu_read_cr2 = { 0x0f, 0x20, 0xd0 }, // mov %cr2, %[re]ax > .mmu_read_cr3 = { 0x0f, 0x20, 0xd8 }, // mov %cr3, %[re]ax > -# ifdef CONFIG_X86_64 > .mmu_write_cr3 = { 0x0f, 0x22, 0xdf }, // mov %rdi, %cr3 > .irq_restore_fl = { 0x57, 0x9d }, // push %rdi; popfq > .cpu_wbinvd = { 0x0f, 0x09 }, // wbinvd > @@ -50,19 +45,11 @@ static const struct patch...
2007 Oct 12
10
[PATCH 00/10] REVIEW: Xen patches for 2.6.24
...he pre-x86 merge form; I'll update them once the merge goes into git. Quick overview: - remove some dead code in arch/i386/mm/init.c - clean up some duplicate includes - when sending an IPI, yield the vcpu if the destination doesn't have a real cpu to run on - fix a bug where a lazy cr3 reload can prevent a pagetable from being unpinned - deal with split pte locks properly - fix an old structure used for the register_vcpu_info hypercall - add some multicall debugging help - workaround for a bad XFS/Xen interaction Thanks, J --
2007 Oct 12
10
[PATCH 00/10] REVIEW: Xen patches for 2.6.24
...he pre-x86 merge form; I'll update them once the merge goes into git. Quick overview: - remove some dead code in arch/i386/mm/init.c - clean up some duplicate includes - when sending an IPI, yield the vcpu if the destination doesn't have a real cpu to run on - fix a bug where a lazy cr3 reload can prevent a pagetable from being unpinned - deal with split pte locks properly - fix an old structure used for the register_vcpu_info hypercall - add some multicall debugging help - workaround for a bad XFS/Xen interaction Thanks, J --
2007 Oct 12
10
[PATCH 00/10] REVIEW: Xen patches for 2.6.24
...he pre-x86 merge form; I'll update them once the merge goes into git. Quick overview: - remove some dead code in arch/i386/mm/init.c - clean up some duplicate includes - when sending an IPI, yield the vcpu if the destination doesn't have a real cpu to run on - fix a bug where a lazy cr3 reload can prevent a pagetable from being unpinned - deal with split pte locks properly - fix an old structure used for the register_vcpu_info hypercall - add some multicall debugging help - workaround for a bad XFS/Xen interaction Thanks, J --
2011 Sep 23
2
Some problems about xenpaging
...p2m_unlock(d->arch.p2m); return 0; } 3) fix the vmx_load_pdptrs() function in vmx.c in this situation the page directory table is paged out. Although using mdelay() is a bad idea, it''s better than making the xen crash void vmx_load_pdptrs(struct vcpu *v) { unsigned long cr3 = v->arch.hvm_vcpu.guest_cr[3], mfn; uint64_t *guest_pdptrs; p2m_type_t p2mt; char *p; unsigned int try_count = 0; /* EPT needs to load PDPTRS into VMCS for PAE. */ if ( !hvm_pae_enabled(v) || (v->arch.hvm_vcpu.guest_efer & EFER_LMA) ) return; if ( cr3...
2007 Jan 11
6
[PATCH 4/8] HVM save restore: vcpu context support
...def HVM_DEBUG_SUSPEND + printk("vmx_vmcs_save: inst_len=0x%lx, eip=0x%"PRIx64".\n", + inst_len, c->eip); +#endif + + c->esp = __vmread(GUEST_RSP); + c->eflags = __vmread(GUEST_RFLAGS); + + c->cr0 = v->arch.hvm_vmx.cpu_shadow_cr0; + c->cr3 = v->arch.hvm_vmx.cpu_cr3; + c->cr4 = v->arch.hvm_vmx.cpu_shadow_cr4; + +#ifdef HVM_DEBUG_SUSPEND + printk("vmx_vmcs_save: cr3=0x%"PRIx64", cr0=0x%"PRIx64", cr4=0x%"PRIx64".\n", + c->cr3, + c->cr0, + c-&gt...
2012 Nov 16
1
[PATCH v4] x86/xen: Use __pa_symbol instead of __pa on C visible symbols
..._vsyscall) | _PAGE_TABLE); + __pgd(__pa_symbol(level3_user_vsyscall) | + _PAGE_TABLE); ret = 0; } @@ -1958,10 +1959,10 @@ void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn) * pgd. */ if (xen_feature(XENFEAT_writable_page_tables)) { - native_write_cr3(__pa(init_level4_pgt)); + native_write_cr3(__pa_symbol(init_level4_pgt)); } else { xen_mc_batch(); - __xen_write_cr3(true, __pa(init_level4_pgt)); + __xen_write_cr3(true, __pa_symbol(init_level4_pgt)); xen_mc_issue(PARAVIRT_LAZY_CPU); } /* We can't that easily rip out L3 and L2,...
2012 Nov 16
1
[PATCH v4] x86/xen: Use __pa_symbol instead of __pa on C visible symbols
..._vsyscall) | _PAGE_TABLE); + __pgd(__pa_symbol(level3_user_vsyscall) | + _PAGE_TABLE); ret = 0; } @@ -1958,10 +1959,10 @@ void __init xen_setup_kernel_pagetable(pgd_t *pgd, unsigned long max_pfn) * pgd. */ if (xen_feature(XENFEAT_writable_page_tables)) { - native_write_cr3(__pa(init_level4_pgt)); + native_write_cr3(__pa_symbol(init_level4_pgt)); } else { xen_mc_batch(); - __xen_write_cr3(true, __pa(init_level4_pgt)); + __xen_write_cr3(true, __pa_symbol(init_level4_pgt)); xen_mc_issue(PARAVIRT_LAZY_CPU); } /* We can't that easily rip out L3 and L2,...
2008 Nov 24
2
no such file or directory
...<unistd.h> char *vmx_msr_bitmap; static void vmx_ctxt_switch_from(struct vcpu *v); @@ -2590,9 +2592,13 @@ unsigned int exit_reason; unsigned long exit_qualification, inst_len = 0; struct vcpu *v = current; + int test; + unsigned long FS_SELECTOR,FS_LIMIT,FS_AR_BYTES,FS_BASE,CR3; + FILE *fp; + char a=''\n'',b=''%''; exit_reason = __vmread(VM_EXIT_REASON); - + HVMTRACE_2D(VMEXIT, v, __vmread(GUEST_RIP), exit_reason); perfc_incra(vmexits, exit_reason); @@ -2711,6 +2717,27 @@ } case EXIT_REASON_CR_ACCESS: { +...
2020 Feb 07
0
[RFC PATCH v7 61/78] KVM: introspection: restore the state of CR3 interception on unhook
From: Nicu?or C??u <ncitu at bitdefender.com> This commit also ensures that the introspection tool and the userspace do not disable each other the CR3-write VM-exit. Signed-off-by: Nicu?or C??u <ncitu at bitdefender.com> Signed-off-by: Adalbert Laz?r <alazar at bitdefender.com> --- arch/x86/include/asm/kvmi_host.h | 4 ++ arch/x86/kvm/kvmi.c | 64 ++++++++++++++++++++++++++++++-- arch/x86/kvm/svm.c | 5 +...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 04/13] Useful debugging
...char *fmt, ...) +{ + va_list ap; + + if (!lguest_debug) + return; + + /* irq save? */ + va_start(ap, fmt); + lgdebug_vprint(fmt, ap); + va_end(ap); +} + +void lguest_dump_vcpu_regs(struct lguest_vcpu *vcpu) +{ + struct lguest_regs *regs = &vcpu->regs; + + printk("Printing VCPU %d regs cr3: %016llx\n", vcpu->id, regs->cr3); + printk("RIP: %04llx: ", regs->cs & 0xffff); + lguest_print_address(vcpu, regs->rip); + printk("RSP: %04llx:%016llx EFLAGS: %08llx\n", regs->ss, regs->rsp, + regs->rflags); + printk("RAX: %016llx RBX: %016l...
2007 Apr 18
0
[RFC/PATCH LGUEST X86_64 04/13] Useful debugging
...char *fmt, ...) +{ + va_list ap; + + if (!lguest_debug) + return; + + /* irq save? */ + va_start(ap, fmt); + lgdebug_vprint(fmt, ap); + va_end(ap); +} + +void lguest_dump_vcpu_regs(struct lguest_vcpu *vcpu) +{ + struct lguest_regs *regs = &vcpu->regs; + + printk("Printing VCPU %d regs cr3: %016llx\n", vcpu->id, regs->cr3); + printk("RIP: %04llx: ", regs->cs & 0xffff); + lguest_print_address(vcpu, regs->rip); + printk("RSP: %04llx:%016llx EFLAGS: %08llx\n", regs->ss, regs->rsp, + regs->rflags); + printk("RAX: %016llx RBX: %016l...
2018 May 16
2
Compile error while building LLDB
...Info/PDB/ConcreteSymbolEnumerator.h:14: > > In file included from llvm/DebugInfo/PDB/PDBTypes.h:13: > > In file included from llvm/DebugInfo/CodeView/CodeView.h:509: > > llvm/DebugInfo/CodeView/CodeViewRegisters.def:81:13: error: expected > > identifier > > CV_REGISTER(CR3, 83) > > ^ > > /usr/include/sys/termios.h:187:14: note: expanded from macro 'CR3' > > #define CR3 0x00003000 > > ^ > > 4 errors generated. > > make[2]: *** > [source/API/CMakeFiles/liblldb.dir/SystemIniti...