mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	KVM: selftests: Add vgic initialization for dirty log perf test for ARM
For ARM64, if no vgic is setup before the dirty log perf test, the userspace irqchip would be used, which would affect the dirty log perf test result. Signed-off-by: Jing Zhang <jingzhangos@google.com> Tested-by: Fuad Tabba <tabba@google.com> Reviewed-by: Fuad Tabba <tabba@google.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20220118015703.3630552-4-jingzhangos@google.com
This commit is contained in:
		
							parent
							
								
									f783ef1c0e
								
							
						
					
					
						commit
						c340f7899a
					
				
					 1 changed files with 10 additions and 0 deletions
				
			
		| 
						 | 
					@ -18,6 +18,12 @@
 | 
				
			||||||
#include "test_util.h"
 | 
					#include "test_util.h"
 | 
				
			||||||
#include "perf_test_util.h"
 | 
					#include "perf_test_util.h"
 | 
				
			||||||
#include "guest_modes.h"
 | 
					#include "guest_modes.h"
 | 
				
			||||||
 | 
					#ifdef __aarch64__
 | 
				
			||||||
 | 
					#include "aarch64/vgic.h"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#define GICD_BASE_GPA			0x8000000ULL
 | 
				
			||||||
 | 
					#define GICR_BASE_GPA			0x80A0000ULL
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/* How many host loops to run by default (one KVM_GET_DIRTY_LOG for each loop)*/
 | 
					/* How many host loops to run by default (one KVM_GET_DIRTY_LOG for each loop)*/
 | 
				
			||||||
#define TEST_HOST_LOOP_N		2UL
 | 
					#define TEST_HOST_LOOP_N		2UL
 | 
				
			||||||
| 
						 | 
					@ -200,6 +206,10 @@ static void run_test(enum vm_guest_mode mode, void *arg)
 | 
				
			||||||
		vm_enable_cap(vm, &cap);
 | 
							vm_enable_cap(vm, &cap);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#ifdef __aarch64__
 | 
				
			||||||
 | 
						vgic_v3_setup(vm, nr_vcpus, 64, GICD_BASE_GPA, GICR_BASE_GPA);
 | 
				
			||||||
 | 
					#endif
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	/* Start the iterations */
 | 
						/* Start the iterations */
 | 
				
			||||||
	iteration = 0;
 | 
						iteration = 0;
 | 
				
			||||||
	host_quit = false;
 | 
						host_quit = false;
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue