mirror of
				https://gitlab.com/qemu-project/qboot.git
				synced 2024-02-13 08:33:40 +08:00 
			
		
		
		
	 9c48d67901
			
		
	
	9c48d67901
	
	
	
		
			
			This commit adds a PVH specific VM exit point for use in benchmarking boot times using a QEMU specific device that terminates the QEMU process and thus the VM itself when handling those VM exits. Since the VM terminates right at those exit points, generic tools like time can be used to measure the time spent between the QEMU startup and termination moments. The QEMU device used for those measurement is called isa-debug-exit for the PC and Q35 machine types. These devices take 2 arguments: iobase and iosize. iobase specifies which IO port we need to write into to have these devices eventually handle the corresponding VM exit. If for example, QEMU is started with the following argument: -device isa-debug-exit,iobase=0xf4 then any IO write to 0xf4 will terminate the QEMU process and the corresponding VM. Signed-off-by: Liam Merwick <liam.merwick@oracle.com>
		
			
				
	
	
		
			15 lines
		
	
	
		
			300 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
		
			300 B
		
	
	
	
		
			C
		
	
	
	
	
	
| #ifndef BENCHMARK_H
 | |
| #define BENCHMARK_H
 | |
| 
 | |
| /* IO ports for different exit points */
 | |
| #define LINUX_EXIT_PORT 0xf4
 | |
| #define FW_EXIT_PORT    0xf5
 | |
| 
 | |
| /* Exit point values */
 | |
| #define FW_START    1
 | |
| #define LINUX_START_FWCFG 2
 | |
| #define LINUX_START_BOOT  3
 | |
| #define LINUX_START_PVHBOOT  4
 | |
| 
 | |
| #endif /* BENCHMARK_H */
 |