Architecture independence layer - v0 - x86 renaming
PATCH 1/3 Architecture independence layer - v0 - x86 renaming
[Patch 1/3]
This is just a renaming patch converting _arch_ to _x86_ as I posted it last week. It ensures a better readability by preventing two _arch interfaces in the code at the same time.
Signature · 10 lines
Grüsse / regards, Christian Ehrhardt IBM Linux Technology Center, Open Virtualization +49 7031/16-3385 [email protected] [email protected] IBM Deutschland Entwicklung GmbH Vorsitzender des Aufsichtsrats: Johann Weihen Geschäftsführung: Herbert Kircher Sitz der Gesellschaft: Böblingen Registergericht: Amtsgericht Stuttgart, HRB 243294
drivers/kvm/kvm.h +4 -4
@@ -415,7 +415,7 @@ struct descriptor_table {unsigned long base; } __attribute__((packed)); -struct kvm_arch_ops { +struct kvm_x86_ops {int (*cpu_has_kvm_support)(void );/* __init */ int (*disabled_by_bios)(void );/* __init */ void (*hardware_enable)(void *dummy);/* __init */
@@ -472,7 +472,7 @@ struct kvm_arch_ops { unsigned char *hypercall_addr); }; -extern struct kvm_arch_ops *kvm_arch_ops; +extern struct kvm_x86_ops *kvm_x86_ops;/* The guest did something we don't support. */ #define pr_unimpl (vcpu, fmt, ...) \
@@ -488,9 +488,9 @@ extern struct kvm_arch_ops *kvm_arch_ops;int kvm_vcpu_init (struct kvm_vcpu *vcpu,struct kvm *kvm,unsigned id);void kvm_vcpu_uninit (struct kvm_vcpu *vcpu); -int kvm_init_arch (struct kvm_arch_ops *ops,unsigned int vcpu_size, +int kvm_init_x86 (struct kvm_x86_ops *ops,unsigned int vcpu_size,struct module *module); -void kvm_exit_arch (void ); +void kvm_exit_x86 (void );int kvm_mmu_module_init (void );void kvm_mmu_module_exit (void );
drivers/kvm/kvm_main.c +78 -78
522 lines not on this page · raw message
drivers/kvm/mmu.c +3 -3
@@ -965,7 +965,7 @@ static int nonpaging_init_context(struct kvm_vcpu *vcpu)static void kvm_mmu_flush_tlb (struct kvm_vcpu *vcpu) { ++vcpu->stat.tlb_flush; - kvm_arch_ops->tlb_flush (vcpu); + kvm_x86_ops->tlb_flush (vcpu); }static void paging_new_cr3 (struct kvm_vcpu *vcpu)
@@ -978,7 +978,7 @@ static void inject_page_fault(struct kvm_vcpu *vcpu, u64 addr, u32 err_code) { - kvm_arch_ops->inject_page_fault (vcpu, addr, err_code); + kvm_x86_ops->inject_page_fault (vcpu, addr, err_code); }static void paging_free (struct kvm_vcpu *vcpu)
@@ -1072,7 +1072,7 @@ int kvm_mmu_load(struct kvm_vcpu *vcpu)if (r) goto out;mmu_alloc_roots (vcpu); - kvm_arch_ops->set_cr3 (vcpu, vcpu->mmu.root_hpa); + kvm_x86_ops->set_cr3 (vcpu, vcpu->mmu.root_hpa);kvm_mmu_flush_tlb (vcpu); out:mutex_unlock (&vcpu->kvm->lock);
drivers/kvm/paging_tmpl.h +1 -1
@@ -274,7 +274,7 @@ static void FNAME(set_pte_common)(struct kvm_vcpu *vcpu, access_bits &= ~PT_WRITABLE_MASK ;if (is_writeble_pte (spte)) { spte &= ~PT_WRITABLE_MASK ; - kvm_arch_ops->tlb_flush (vcpu); + kvm_x86_ops->tlb_flush (vcpu); }if (write_fault) *ptwrite =1 ;
drivers/kvm/svm.c +3 -3
@@ -1673,7 +1673,7 @@ static void svm_check_processor_compat(void *rtn) *(int *)rtn =0 ; } -static struct kvm_arch_ops svm_arch_ops = { +static struct kvm_x86_ops svm_x86_ops = { .cpu_has_kvm_support = has_svm, .disabled_by_bios = is_disabled, .hardware_setup = svm_hardware_setup,
@@ -1725,13 +1725,13 @@ static struct kvm_arch_ops svm_arch_ops = {static int __init svm_init (void ) { -return kvm_init_arch (&svm_arch_ops,sizeof (struct vcpu_svm ), +return kvm_init_x86 (&svm_x86_ops,sizeof (struct vcpu_svm ),THIS_MODULE ); } static void __exit svm_exit(void) { -kvm_exit_arch (); +kvm_exit_x86 (); }module_init (svm_init)
drivers/kvm/vmx.c +3 -3
@@ -2377,7 +2377,7 @@ static void __init vmx_check_processor_compat(void *rtn) } } -static struct kvm_arch_ops vmx_arch_ops = { +static struct kvm_x86_ops vmx_x86_ops = { .cpu_has_kvm_support = cpu_has_kvm_support, .disabled_by_bios = vmx_disabled_by_bios, .hardware_setup = hardware_setup,
@@ -2454,7 +2454,7 @@ static int __init vmx_init(void)memset (iova,0xff ,PAGE_SIZE );kunmap (vmx_io_bitmap_b); - r =kvm_init_arch (&vmx_arch_ops,sizeof (struct vcpu_vmx ),THIS_MODULE ); + r =kvm_init_x86 (&vmx_x86_ops,sizeof (struct vcpu_vmx ),THIS_MODULE );if (r) goto out1;
@@ -2472,7 +2472,7 @@ static void __exit vmx_exit(void)__free_page (vmx_io_bitmap_b);__free_page (vmx_io_bitmap_a); -kvm_exit_arch (); +kvm_exit_x86 (); }module_init (vmx_init)
drivers/kvm/x86_emulate.c +2 -2
@@ -1443,7 +1443,7 @@ twobyte_special_insn: | ((u64)_regs[VCPU_REGS_RDX] << 32); rc =kvm_set_msr (ctxt->vcpu, _regs[VCPU_REGS_RCX ], msr_data);if (rc) { - kvm_arch_ops->inject_gp (ctxt->vcpu,0 ); + kvm_x86_ops->inject_gp (ctxt->vcpu,0 ); _eip = ctxt->vcpu->rip; } rc =X86EMUL_CONTINUE ;
@@ -1452,7 +1452,7 @@ twobyte_special_insn:/* rdmsr */ rc =kvm_get_msr (ctxt->vcpu, _regs[VCPU_REGS_RCX ], &msr_data);if (rc) { - kvm_arch_ops->inject_gp (ctxt->vcpu,0 ); + kvm_x86_ops->inject_gp (ctxt->vcpu,0 ); _eip = ctxt->vcpu->rip; }else { _regs[VCPU_REGS_RAX ] = (u32 )msr_data;
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
kvm-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/kvm-devel