HV:transfer vmid's type to uint16_t

vmid's type prefered to be uint16_t.

V1->V2:vmid from uint32_t transfer to uint16_t
V2->V3:add range check to hcall's vmid parameter
V3->V4:seperate the declaration and actual code.
V4->V5:remove range check from hcall's vmid parameter

Signed-off-by: Huihuang Shi <huihuang.shi@intel.com>
Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
Huihuang Shi
2018-07-13 11:38:27 +08:00
committed by lijinxia
parent 6ad150834f
commit 680c64de13
13 changed files with 57 additions and 35 deletions

View File

@@ -55,7 +55,7 @@ int vioapic_mmio_access_handler(struct vcpu *vcpu, struct mem_io *mmio,
void *handler_private_data);
#ifdef HV_DEBUG
void get_vioapic_info(char *str, int str_max, int vmid);
void get_vioapic_info(char *str, int str_max, uint16_t vmid);
#endif /* HV_DEBUG */
#endif

View File

@@ -16,8 +16,8 @@ enum vm_privilege_level {
#define MAX_VM_NAME_LEN 16
struct vm_attr {
int id; /* Virtual machine identifier */
int boot_idx; /* Index indicating the boot sequence for this VM */
uint16_t id; /* Virtual machine identifier */
uint16_t boot_idx; /* Index indicating the boot sequence for this VM */
};
struct vm_hw_info {
@@ -177,7 +177,7 @@ int create_vm(struct vm_description *vm_desc, struct vm **vm);
int prepare_vm0(void);
void vm_fixup(struct vm *vm);
struct vm *get_vm_from_vmid(int vm_id);
struct vm *get_vm_from_vmid(uint16_t vm_id);
extern struct list_head vm_list;
extern spinlock_t vm_list_lock;

View File

@@ -217,7 +217,7 @@ int unassign_iommu_device(struct iommu_domain *domain,
uint8_t bus, uint8_t devfun);
/* Create a iommu domain for a VM specified by vm_id */
struct iommu_domain *create_iommu_domain(int vm_id,
struct iommu_domain *create_iommu_domain(uint16_t vm_id,
uint64_t translation_table, int addr_width);
/* Destroy the iommu domain */