mirror of
				https://github.com/qemu/qemu.git
				synced 2025-10-31 20:44:16 +00:00 
			
		
		
		
	 e5d1730d1e
			
		
	
	
		e5d1730d1e
		
	
	
	
	
		
			
			When initializing a QPCIBus, track which QTestState the bus is associated with (so that a later patch can then explicitly use that test state for all communication on the bus, rather than blindly relying on global_qtest). Update the initialization functions to take another parameter, and update all callers to pass in state (for now, most callers get away with passing the current global_qtest as the current state, although this required fixing the order of initialization to ensure qtest_start() is called before qpci_init*() in rtl8139-test, and provided an opportunity to pass in the allocator in e1000e-test). Touch up some allocations to use g_new0() rather than g_malloc() while in the area, and simplify some code (all implementations of QOSOps provide a .init_allocator() that never fails). Signed-off-by: Eric Blake <eblake@redhat.com> Reviewed-by: John Snow <jsnow@redhat.com> Reviewed-by: Thomas Huth <thuth@redhat.com> [thuth: Removed hunk from vhost-user-test.c that is not required anymore, fixed conflict in qtest_vboot() and adjusted qpci_init_pc() in sdhci-test] Signed-off-by: Thomas Huth <thuth@redhat.com>
		
			
				
	
	
		
			18 lines
		
	
	
		
			395 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			395 B
		
	
	
	
		
			C
		
	
	
	
	
	
| /*
 | |
|  * libqos PCI bindings for SPAPR
 | |
|  *
 | |
|  * This work is licensed under the terms of the GNU GPL, version 2 or later.
 | |
|  * See the COPYING file in the top-level directory.
 | |
|  */
 | |
| 
 | |
| #ifndef LIBQOS_PCI_SPAPR_H
 | |
| #define LIBQOS_PCI_SPAPR_H
 | |
| 
 | |
| #include "libqos/malloc.h"
 | |
| #include "libqos/pci.h"
 | |
| 
 | |
| QPCIBus *qpci_init_spapr(QTestState *qts, QGuestAllocator *alloc);
 | |
| void     qpci_free_spapr(QPCIBus *bus);
 | |
| 
 | |
| #endif
 |