This repository has been archived by the owner on May 12, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 375
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
persist: manage "hypervisor.json" with new store
Fixes #803 Merge "hypervisor.json" into "persist.json", so the new store can take care of hypervisor data now. Signed-off-by: Wei Zhang <zhangwei555@huawei.com>
- Loading branch information
1 parent
bc15e44
commit ba85be6
Showing
9 changed files
with
201 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// Copyright (c) 2016 Intel Corporation | ||
// | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
package persistapi | ||
|
||
// Bridge is a bridge where devices can be hot plugged | ||
type Bridge struct { | ||
// DeviceAddr contains information about devices plugged and its address in the bridge | ||
DeviceAddr map[uint32]string | ||
|
||
// Type is the type of the bridge (pci, pcie, etc) | ||
Type string | ||
|
||
//ID is used to identify the bridge in the hypervisor | ||
ID string | ||
|
||
// Addr is the PCI/e slot of the bridge | ||
Addr int | ||
} | ||
|
||
// CPUDevice represents a CPU device which was hot-added in a running VM | ||
type CPUDevice struct { | ||
// ID is used to identify this CPU in the hypervisor options. | ||
ID string | ||
} | ||
|
||
type HypervisorState struct { | ||
Pid int | ||
// Type of hypervisor, E.g. qemu/firecracker/acrn. | ||
Type string | ||
BlockIndex int | ||
UUID string | ||
|
||
// Belows are qemu specific | ||
// Refs: virtcontainers/qemu.go:QemuState | ||
Bridges []Bridge | ||
// HotpluggedCPUs is the list of CPUs that were hot-added | ||
HotpluggedVCPUs []CPUDevice | ||
HotpluggedMemory int | ||
HotplugVFIOOnRootBus bool | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.