VM-Entry Interruption-Information的struct构建和读取代码。

#include
using namespace std;

typedef struct _Int_info
{
	unsigned vector			:8;
	unsigned int_type		:3;
	unsigned error_code		:1;
	unsigned Reserved		:19;
	unsigned valid			:1;
}IntInfo,*pIntInfo;

void ShowStruct(pIntInfo info)
{
	cout<<"中断或异常向量为 : "<vector<int_type;
	switch (info->int_type)
	{
		case 0:cout<<" 外部中断;"<error_code;
	if(info->error_code)
	{
		cout<<" 有错误代码传递,可参考VMCS中的VM Entry exception error code;"<valid;
	if(info->valid)
	{
		cout<<" 合法;"<


 

你可能感兴趣的:(C/C++语言基础,Intel,VT-x,struct,exception,vector)