@@ -349,6 +349,7 @@ pub struct HostPhysicalDevices {
349
349
350
350
/// A configuration for a `VirtualMachine`
351
351
pub struct VirtualMachineConfig {
352
+ <<<<<<< HEAD
352
353
/// The cores assigned as part of this configuration
353
354
pub cpus: ArrayVec < [ percore:: CoreId ; MAX_PER_VM_CORE_COUNT ] > ,
354
355
@@ -365,6 +366,13 @@ pub struct VirtualMachineConfig {
365
366
366
367
/// The size of this machines physical address space in MiB
367
368
pub memory : u64 ,
369
+ =======
370
+ cpus : ArrayVec < [ percore:: CoreId ; MAX_PER_VM_CORE_COUNT ] > ,
371
+ images : Vec < ( String , GuestPhysAddr ) > ,
372
+ virtual_devices : DeviceMap ,
373
+ physical_devices : PhysicalDeviceConfig ,
374
+ memory : u64 , // in MB
375
+ >>>>>>> a sort of initial skeleton for cpuid.
368
376
override_cpu_name: bool
369
377
}
370
378
@@ -404,6 +412,39 @@ impl VirtualMachineConfig {
404
412
self . images . push ( ( image, addr) ) ;
405
413
Ok ( ( ) )
406
414
}
415
+ <<<<<<< HEAD
416
+ =======
417
+
418
+ /// Access the configurations virtual `DeviceMap`
419
+ pub fn virtual_devices ( & self ) -> & DeviceMap {
420
+ & self . virtual_devices
421
+ }
422
+
423
+ /// Access the configurations virtual `DeviceMap` mutably
424
+ pub fn virtual_devices_mut ( & mut self ) -> & mut DeviceMap {
425
+ & mut self . virtual_devices
426
+ }
427
+
428
+ /// Access the configurations physical hardware
429
+ pub fn physical_devices ( & self ) -> & PhysicalDeviceConfig {
430
+ & self . physical_devices
431
+ }
432
+
433
+ /// Get the list of CoreIds assicated with this VM
434
+ pub fn cpus ( & self ) -> & ArrayVec < [ percore:: CoreId ; MAX_PER_VM_CORE_COUNT ] > {
435
+ & self . cpus
436
+ }
437
+
438
+ /// Get the CoreId of the BSP for this VM
439
+ pub fn bsp_id ( & self ) -> percore:: CoreId {
440
+ self . cpus[ 0 ]
441
+ }
442
+
443
+
444
+ pub fn override_cpu_name ( & self ) -> bool {
445
+ self . override_cpu_name
446
+ }
447
+ >>>>>>> a sort of initial skeleton for cpuid.
407
448
}
408
449
409
450
/// A virtual machine
0 commit comments