NOVA-microhypervisor/inc/timeout_hypercall.hpp

39 lines
1001 B
C++

/*
* Hypercall Timeout
*
* Copyright (C) 2014 Udo Steinberg, FireEye, Inc.
* Copyright (C) 2019-2025 Udo Steinberg, BlueRock Security, Inc.
*
* This file is part of the NOVA microhypervisor.
*
* NOVA is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* NOVA is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License version 2 for more details.
*/
#pragma once
#include "timeout.hpp"
class Ec;
class Sm;
class Timeout_hypercall final : public Timeout
{
private:
Ec * const ec { nullptr };
Sm * sm { nullptr };
void trigger() override;
public:
Timeout_hypercall (Ec *e) : ec (e) {}
void enqueue (uint64_t t, Sm *s) { sm = s; Timeout::enqueue (t); }
};