blob: 9d79edf99d188bc2065edfd985bc84518baf9189 [file] [log] [blame]
Madhukar Pappireddyeed861e2024-09-25 13:50:54 -05001/*
2 * Copyright 2024 The Hafnium Authors.
3 *
4 * Use of this source code is governed by a BSD-style
5 * license that can be found in the LICENSE file or at
6 * https://opensource.org/licenses/BSD-3-Clause.
7 */
8
9#pragma once
10
11#include "hf/vcpu.h"
12
13/**
14 * Partition manager maintains a list of entries, associated with vCPUs with
15 * pending timer deadline, for each CPU. Each list is protected from concurrent
16 * accesses, by multiple CPUs, with the help of a spinlock belonging to the CPU
17 * owning the list.
18 * Note: Each list is maintained as a circular linked list with a special entry
19 * called `root_entry`. This entry is not associated with any vCPU and solely
20 * exists to help with list manipulation operations. Therefore, if there are
21 * five vCPUs with pending timer being tracked by partition manager on a CPU,
22 * the corresponding list will have six entries.
23 */
24struct timer_pending_vcpu_list {
25 struct list_entry root_entry;
26};