mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-09-13 21:09:54 +00:00
HV: hypercall: revisit types in structure parameters
While fixing the MISRA C violations related to integral types, we have unified the type of the following data: uint8_t: phys_pin, virt_pin, vpic_pin, ioapic_pin, vioapic_pin uint16_t: vm_id, pcpu_id, vcpu_id, vpid uint32_t: vector, irq This patch revisits the types of the fields in vhm_request as well as the structures used as parameters in the hypercalls, and make them aligned with the types the hypervisor uses for such data. Reserved fields are added to keep the size and layout of the structures. Implicit paddings are also made explicit as reserved fields. Signed-off-by: Junjie Mao <junjie.mao@intel.com> Acked-by: Eddie Dong <eddie.dong@intel.com>
This commit is contained in:
@@ -152,7 +152,13 @@ struct memory_map {
|
||||
*/
|
||||
struct set_memmaps {
|
||||
/** vmid for this hypercall */
|
||||
uint64_t vmid;
|
||||
uint16_t vmid;
|
||||
|
||||
/** Reserved */
|
||||
uint16_t reserved0;
|
||||
|
||||
/** Reserved */
|
||||
uint32_t reserved1;
|
||||
|
||||
/** multi memmaps numbers */
|
||||
uint32_t memmaps_num;
|
||||
@@ -171,6 +177,9 @@ struct sbuf_setup_param {
|
||||
/** sbuf physical cpu id */
|
||||
uint16_t pcpu_id;
|
||||
|
||||
/** Reserved */
|
||||
uint16_t reserved;
|
||||
|
||||
/** sbuf id */
|
||||
uint32_t sbuf_id;
|
||||
|
||||
@@ -210,13 +219,22 @@ struct hc_ptdev_irq {
|
||||
/** INTX remapping info */
|
||||
struct {
|
||||
/** virtual IOAPIC/PIC pin */
|
||||
uint32_t virt_pin;
|
||||
uint8_t virt_pin;
|
||||
|
||||
/** Reserved */
|
||||
uint32_t reserved0:24;
|
||||
|
||||
/** physical IOAPIC pin */
|
||||
uint32_t phys_pin;
|
||||
uint8_t phys_pin;
|
||||
|
||||
/** Reserved */
|
||||
uint32_t reserved1:24;
|
||||
|
||||
/** is virtual pin from PIC */
|
||||
uint32_t pic_pin;
|
||||
bool pic_pin;
|
||||
|
||||
/** Reserved */
|
||||
uint32_t reserved2:24;
|
||||
} intx;
|
||||
|
||||
/** MSIx remapping info */
|
||||
|
Reference in New Issue
Block a user