mirror of
https://github.com/qemu/qemu.git
synced 2026-02-04 05:35:39 +00:00
igvm: move file load to complete callback
Add UserCreatableClass->complete callback function for igvm-cfg object. Move file loading and parsing of the igvm file from the process function to the new complete() callback function. Keep the igvm file loaded after processing, release it in finalize() instead, so we parse it only once. Reviewed-by: Ani Sinha <anisinha@redhat.com> Reviewed-by: Stefano Garzarella <sgarzare@redhat.com> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-ID: <20260126123755.357378-4-kraxel@redhat.com>
This commit is contained in:
@@ -13,6 +13,8 @@
|
||||
#include "qom/object.h"
|
||||
#include "hw/core/resettable.h"
|
||||
|
||||
#include <igvm/igvm.h>
|
||||
|
||||
struct IgvmCfg {
|
||||
ObjectClass parent_class;
|
||||
|
||||
@@ -22,7 +24,10 @@ struct IgvmCfg {
|
||||
* format.
|
||||
*/
|
||||
char *filename;
|
||||
IgvmHandle file;
|
||||
ResettableState reset_state;
|
||||
};
|
||||
|
||||
IgvmHandle qigvm_file_init(char *filename, Error **errp);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user