mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-30 01:02:33 +00:00
agent: acquire memory hotplug probe info via GetGuestDetails
In order to support memory hotplug via probe interface in kata-runtime, firstly, we need to verify whether guest kernel is capable of that. Fixes: #1149 Signed-off-by: Penny Zheng <penny.zheng@arm.com>
This commit is contained in:
parent
722aa3f2d3
commit
30a6a7de39
@ -416,7 +416,8 @@ func createAssets(ctx context.Context, sandboxConfig *SandboxConfig) error {
|
|||||||
|
|
||||||
func (s *Sandbox) getAndStoreGuestDetails() error {
|
func (s *Sandbox) getAndStoreGuestDetails() error {
|
||||||
guestDetailRes, err := s.agent.getGuestDetails(&grpc.GuestDetailsRequest{
|
guestDetailRes, err := s.agent.getGuestDetails(&grpc.GuestDetailsRequest{
|
||||||
MemBlockSize: true,
|
MemBlockSize: true,
|
||||||
|
MemHotplugProbe: true,
|
||||||
})
|
})
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@ -427,6 +428,7 @@ func (s *Sandbox) getAndStoreGuestDetails() error {
|
|||||||
if guestDetailRes.AgentDetails != nil {
|
if guestDetailRes.AgentDetails != nil {
|
||||||
s.seccompSupported = guestDetailRes.AgentDetails.SupportsSeccomp
|
s.seccompSupported = guestDetailRes.AgentDetails.SupportsSeccomp
|
||||||
}
|
}
|
||||||
|
s.state.GuestMemoryHotplugProbe = guestDetailRes.SupportMemHotplugProbe
|
||||||
|
|
||||||
if err = s.store.Store(store.State, s.state); err != nil {
|
if err = s.store.Store(store.State, s.state); err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -45,6 +45,9 @@ type State struct {
|
|||||||
// GuestMemoryBlockSizeMB is the size of memory block of guestos
|
// GuestMemoryBlockSizeMB is the size of memory block of guestos
|
||||||
GuestMemoryBlockSizeMB uint32 `json:"guestMemoryBlockSize"`
|
GuestMemoryBlockSizeMB uint32 `json:"guestMemoryBlockSize"`
|
||||||
|
|
||||||
|
// GuestMemoryHotplugProbe determines whether guest kernel supports memory hotplug probe interface
|
||||||
|
GuestMemoryHotplugProbe bool `json:"guestMemoryHotplugProbe"`
|
||||||
|
|
||||||
// CgroupPath is the cgroup hierarchy where sandbox's processes
|
// CgroupPath is the cgroup hierarchy where sandbox's processes
|
||||||
// including the hypervisor are placed.
|
// including the hypervisor are placed.
|
||||||
CgroupPath string `json:"cgroupPath,omitempty"`
|
CgroupPath string `json:"cgroupPath,omitempty"`
|
||||||
|
Loading…
Reference in New Issue
Block a user