KVM: PPC: HV: Remove generic instruction emulation
Now that we have properly split load/store instruction emulation and generic instruction emulation, we can move the generic one from kvm.ko to kvm-pr.ko on book3s_64. This reduces the attack surface and amount of code loaded on HV KVM kernels. Signed-off-by: Alexander Graf <agraf@suse.de>
This commit is contained in:
		
					parent
					
						
							
								5a484c7c1e
							
						
					
				
			
			
				commit
				
					
						29577fc00b
					
				
			
		
					 2 changed files with 21 additions and 1 deletions
				
			
		|  | @ -48,6 +48,7 @@ kvm-book3s_64-builtin-objs-$(CONFIG_KVM_BOOK3S_64_HANDLER) := \ | ||||||
| 
 | 
 | ||||||
| kvm-pr-y := \
 | kvm-pr-y := \
 | ||||||
| 	fpu.o \
 | 	fpu.o \
 | ||||||
|  | 	emulate.o \
 | ||||||
| 	book3s_paired_singles.o \
 | 	book3s_paired_singles.o \
 | ||||||
| 	book3s_pr.o \
 | 	book3s_pr.o \
 | ||||||
| 	book3s_pr_papr.o \
 | 	book3s_pr_papr.o \
 | ||||||
|  | @ -91,7 +92,6 @@ kvm-book3s_64-module-objs += \ | ||||||
| 	$(KVM)/kvm_main.o \
 | 	$(KVM)/kvm_main.o \
 | ||||||
| 	$(KVM)/eventfd.o \
 | 	$(KVM)/eventfd.o \
 | ||||||
| 	powerpc.o \
 | 	powerpc.o \
 | ||||||
| 	emulate.o \
 |  | ||||||
| 	emulate_loadstore.o \
 | 	emulate_loadstore.o \
 | ||||||
| 	book3s.o \
 | 	book3s.o \
 | ||||||
| 	book3s_64_vio.o \
 | 	book3s_64_vio.o \
 | ||||||
|  |  | ||||||
|  | @ -291,6 +291,26 @@ TRACE_EVENT(kvm_unmap_hva, | ||||||
| 	TP_printk("unmap hva 0x%lx\n", __entry->hva) | 	TP_printk("unmap hva 0x%lx\n", __entry->hva) | ||||||
| ); | ); | ||||||
| 
 | 
 | ||||||
|  | TRACE_EVENT(kvm_ppc_instr, | ||||||
|  | 	TP_PROTO(unsigned int inst, unsigned long _pc, unsigned int emulate), | ||||||
|  | 	TP_ARGS(inst, _pc, emulate), | ||||||
|  | 
 | ||||||
|  | 	TP_STRUCT__entry( | ||||||
|  | 		__field(	unsigned int,	inst		) | ||||||
|  | 		__field(	unsigned long,	pc		) | ||||||
|  | 		__field(	unsigned int,	emulate		) | ||||||
|  | 	), | ||||||
|  | 
 | ||||||
|  | 	TP_fast_assign( | ||||||
|  | 		__entry->inst		= inst; | ||||||
|  | 		__entry->pc		= _pc; | ||||||
|  | 		__entry->emulate	= emulate; | ||||||
|  | 	), | ||||||
|  | 
 | ||||||
|  | 	TP_printk("inst %u pc 0x%lx emulate %u\n", | ||||||
|  | 		  __entry->inst, __entry->pc, __entry->emulate) | ||||||
|  | ); | ||||||
|  | 
 | ||||||
| #endif /* _TRACE_KVM_H */ | #endif /* _TRACE_KVM_H */ | ||||||
| 
 | 
 | ||||||
| /* This part must be outside protection */ | /* This part must be outside protection */ | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Alexander Graf
				Alexander Graf