diff options
author | Mike Day <ncmike@ncultra.org> | 2007-10-08 09:02:08 -0400 |
---|---|---|
committer | Avi Kivity <avi@qumranet.com> | 2008-01-30 10:52:50 -0500 |
commit | d77c26fce93d07802db97498959587eb9347b31d (patch) | |
tree | ed49397152d9a8c2ce3dda751a235283f07ef220 /drivers/kvm/kvm.h | |
parent | 7e620d16b8838bc0ad5b27d2dd55796270cd588c (diff) |
KVM: CodingStyle cleanup
Signed-off-by: Mike D. Day <ncmike@ncultra.org>
Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/kvm.h')
-rw-r--r-- | drivers/kvm/kvm.h | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h index 9f10c373b74c..ec5b498945ae 100644 --- a/drivers/kvm/kvm.h +++ b/drivers/kvm/kvm.h | |||
@@ -528,7 +528,7 @@ extern struct kvm_x86_ops *kvm_x86_ops; | |||
528 | if (printk_ratelimit()) \ | 528 | if (printk_ratelimit()) \ |
529 | printk(KERN_ERR "kvm: %i: cpu%i " fmt, \ | 529 | printk(KERN_ERR "kvm: %i: cpu%i " fmt, \ |
530 | current->tgid, (vcpu)->vcpu_id , ## __VA_ARGS__); \ | 530 | current->tgid, (vcpu)->vcpu_id , ## __VA_ARGS__); \ |
531 | } while(0) | 531 | } while (0) |
532 | 532 | ||
533 | #define kvm_printf(kvm, fmt ...) printk(KERN_DEBUG fmt) | 533 | #define kvm_printf(kvm, fmt ...) printk(KERN_DEBUG fmt) |
534 | #define vcpu_printf(vcpu, fmt...) kvm_printf(vcpu->kvm, fmt) | 534 | #define vcpu_printf(vcpu, fmt...) kvm_printf(vcpu->kvm, fmt) |
@@ -598,7 +598,7 @@ int kvm_set_msr(struct kvm_vcpu *vcpu, u32 msr_index, u64 data); | |||
598 | 598 | ||
599 | struct x86_emulate_ctxt; | 599 | struct x86_emulate_ctxt; |
600 | 600 | ||
601 | int kvm_emulate_pio (struct kvm_vcpu *vcpu, struct kvm_run *run, int in, | 601 | int kvm_emulate_pio(struct kvm_vcpu *vcpu, struct kvm_run *run, int in, |
602 | int size, unsigned port); | 602 | int size, unsigned port); |
603 | int kvm_emulate_pio_string(struct kvm_vcpu *vcpu, struct kvm_run *run, int in, | 603 | int kvm_emulate_pio_string(struct kvm_vcpu *vcpu, struct kvm_run *run, int in, |
604 | int size, unsigned long count, int down, | 604 | int size, unsigned long count, int down, |
@@ -607,7 +607,7 @@ void kvm_emulate_cpuid(struct kvm_vcpu *vcpu); | |||
607 | int kvm_emulate_halt(struct kvm_vcpu *vcpu); | 607 | int kvm_emulate_halt(struct kvm_vcpu *vcpu); |
608 | int emulate_invlpg(struct kvm_vcpu *vcpu, gva_t address); | 608 | int emulate_invlpg(struct kvm_vcpu *vcpu, gva_t address); |
609 | int emulate_clts(struct kvm_vcpu *vcpu); | 609 | int emulate_clts(struct kvm_vcpu *vcpu); |
610 | int emulator_get_dr(struct x86_emulate_ctxt* ctxt, int dr, | 610 | int emulator_get_dr(struct x86_emulate_ctxt *ctxt, int dr, |
611 | unsigned long *dest); | 611 | unsigned long *dest); |
612 | int emulator_set_dr(struct x86_emulate_ctxt *ctxt, int dr, | 612 | int emulator_set_dr(struct x86_emulate_ctxt *ctxt, int dr, |
613 | unsigned long value); | 613 | unsigned long value); |
@@ -631,7 +631,7 @@ void kvm_put_guest_fpu(struct kvm_vcpu *vcpu); | |||
631 | void kvm_flush_remote_tlbs(struct kvm *kvm); | 631 | void kvm_flush_remote_tlbs(struct kvm *kvm); |
632 | 632 | ||
633 | int emulator_read_std(unsigned long addr, | 633 | int emulator_read_std(unsigned long addr, |
634 | void *val, | 634 | void *val, |
635 | unsigned int bytes, | 635 | unsigned int bytes, |
636 | struct kvm_vcpu *vcpu); | 636 | struct kvm_vcpu *vcpu); |
637 | int emulator_write_emulated(unsigned long addr, | 637 | int emulator_write_emulated(unsigned long addr, |
@@ -721,55 +721,55 @@ static inline struct kvm_mmu_page *page_header(hpa_t shadow_page) | |||
721 | static inline u16 read_fs(void) | 721 | static inline u16 read_fs(void) |
722 | { | 722 | { |
723 | u16 seg; | 723 | u16 seg; |
724 | asm ("mov %%fs, %0" : "=g"(seg)); | 724 | asm("mov %%fs, %0" : "=g"(seg)); |
725 | return seg; | 725 | return seg; |
726 | } | 726 | } |
727 | 727 | ||
728 | static inline u16 read_gs(void) | 728 | static inline u16 read_gs(void) |
729 | { | 729 | { |
730 | u16 seg; | 730 | u16 seg; |
731 | asm ("mov %%gs, %0" : "=g"(seg)); | 731 | asm("mov %%gs, %0" : "=g"(seg)); |
732 | return seg; | 732 | return seg; |
733 | } | 733 | } |
734 | 734 | ||
735 | static inline u16 read_ldt(void) | 735 | static inline u16 read_ldt(void) |
736 | { | 736 | { |
737 | u16 ldt; | 737 | u16 ldt; |
738 | asm ("sldt %0" : "=g"(ldt)); | 738 | asm("sldt %0" : "=g"(ldt)); |
739 | return ldt; | 739 | return ldt; |
740 | } | 740 | } |
741 | 741 | ||
742 | static inline void load_fs(u16 sel) | 742 | static inline void load_fs(u16 sel) |
743 | { | 743 | { |
744 | asm ("mov %0, %%fs" : : "rm"(sel)); | 744 | asm("mov %0, %%fs" : : "rm"(sel)); |
745 | } | 745 | } |
746 | 746 | ||
747 | static inline void load_gs(u16 sel) | 747 | static inline void load_gs(u16 sel) |
748 | { | 748 | { |
749 | asm ("mov %0, %%gs" : : "rm"(sel)); | 749 | asm("mov %0, %%gs" : : "rm"(sel)); |
750 | } | 750 | } |
751 | 751 | ||
752 | #ifndef load_ldt | 752 | #ifndef load_ldt |
753 | static inline void load_ldt(u16 sel) | 753 | static inline void load_ldt(u16 sel) |
754 | { | 754 | { |
755 | asm ("lldt %0" : : "rm"(sel)); | 755 | asm("lldt %0" : : "rm"(sel)); |
756 | } | 756 | } |
757 | #endif | 757 | #endif |
758 | 758 | ||
759 | static inline void get_idt(struct descriptor_table *table) | 759 | static inline void get_idt(struct descriptor_table *table) |
760 | { | 760 | { |
761 | asm ("sidt %0" : "=m"(*table)); | 761 | asm("sidt %0" : "=m"(*table)); |
762 | } | 762 | } |
763 | 763 | ||
764 | static inline void get_gdt(struct descriptor_table *table) | 764 | static inline void get_gdt(struct descriptor_table *table) |
765 | { | 765 | { |
766 | asm ("sgdt %0" : "=m"(*table)); | 766 | asm("sgdt %0" : "=m"(*table)); |
767 | } | 767 | } |
768 | 768 | ||
769 | static inline unsigned long read_tr_base(void) | 769 | static inline unsigned long read_tr_base(void) |
770 | { | 770 | { |
771 | u16 tr; | 771 | u16 tr; |
772 | asm ("str %0" : "=g"(tr)); | 772 | asm("str %0" : "=g"(tr)); |
773 | return segment_base(tr); | 773 | return segment_base(tr); |
774 | } | 774 | } |
775 | 775 | ||
@@ -785,17 +785,17 @@ static inline unsigned long read_msr(unsigned long msr) | |||
785 | 785 | ||
786 | static inline void fx_save(struct i387_fxsave_struct *image) | 786 | static inline void fx_save(struct i387_fxsave_struct *image) |
787 | { | 787 | { |
788 | asm ("fxsave (%0)":: "r" (image)); | 788 | asm("fxsave (%0)":: "r" (image)); |
789 | } | 789 | } |
790 | 790 | ||
791 | static inline void fx_restore(struct i387_fxsave_struct *image) | 791 | static inline void fx_restore(struct i387_fxsave_struct *image) |
792 | { | 792 | { |
793 | asm ("fxrstor (%0)":: "r" (image)); | 793 | asm("fxrstor (%0)":: "r" (image)); |
794 | } | 794 | } |
795 | 795 | ||
796 | static inline void fpu_init(void) | 796 | static inline void fpu_init(void) |
797 | { | 797 | { |
798 | asm ("finit"); | 798 | asm("finit"); |
799 | } | 799 | } |
800 | 800 | ||
801 | static inline u32 get_rdx_init_val(void) | 801 | static inline u32 get_rdx_init_val(void) |