mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-22 09:17:58 +00:00
hv: vcpu: wait and signal vcpu event support
Introduce two kinds of events for each vcpu, VCPU_EVENT_IOREQ: for vcpu waiting for IO request completion VCPU_EVENT_VIRTUAL_INTERRUPT: for vcpu waiting for virtual interrupts events vcpu can wait for such events, and resume to run when the event get signalled. This patch also change IO request waiting/notifying to this way. Tracked-On: #4329 Signed-off-by: Shuo A Liu <shuo.a.liu@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -22,6 +22,7 @@
|
||||
#include <vlapic.h>
|
||||
#include <vmtrr.h>
|
||||
#include <schedule.h>
|
||||
#include <event.h>
|
||||
#include <io_req.h>
|
||||
#include <msr.h>
|
||||
#include <cpu.h>
|
||||
@@ -145,6 +146,10 @@ enum vm_cpu_mode {
|
||||
CPU_MODE_64BIT, /* IA-32E mode (CS.L = 1) */
|
||||
};
|
||||
|
||||
#define VCPU_EVENT_IOREQ 0
|
||||
#define VCPU_EVENT_VIRTUAL_INTERRUPT 1
|
||||
#define VCPU_EVENT_NUM 2
|
||||
|
||||
enum reset_mode;
|
||||
|
||||
/* 2 worlds: 0 for Normal World, 1 for Secure World */
|
||||
@@ -260,6 +265,8 @@ struct acrn_vcpu {
|
||||
|
||||
uint64_t reg_cached;
|
||||
uint64_t reg_updated;
|
||||
|
||||
struct sched_event events[VCPU_EVENT_NUM];
|
||||
} __aligned(PAGE_SIZE);
|
||||
|
||||
struct vcpu_dump {
|
||||
|
Reference in New Issue
Block a user