khypervisor  v1
Defines | Functions
include/slotpirq.h File Reference
#include <arch_types.h>
#include <hvmm_types.h>
Include dependency graph for slotpirq.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define SLOT_INVALID   0xFFFFFFFF

Functions

void slotpirq_init (void)
void slotpirq_set (vmid_t vmid, uint32_t slot, uint32_t pirq)
uint32_t slotpirq_get (vmid_t vmid, uint32_t slot)
void slotpirq_clear (vmid_t vmid, uint32_t slot)
void slotvirq_set (vmid_t vmid, uint32_t slot, uint32_t virq)
uint32_t slotvirq_getslot (vmid_t vmid, uint32_t virq)
void slotvirq_clear (vmid_t vmid, uint32_t slot)

Define Documentation

#define SLOT_INVALID   0xFFFFFFFF

Definition at line 5 of file slotpirq.h.


Function Documentation

void slotpirq_clear ( vmid_t  vmid,
uint32_t  slot 
)

Definition at line 40 of file slotpirq.c.

Here is the call graph for this function:

uint32_t slotpirq_get ( vmid_t  vmid,
uint32_t  slot 
)

Definition at line 29 of file slotpirq.c.

{
    uint32_t pirq = PIRQ_INVALID;

    if ( vmid < NUM_GUESTS_STATIC ) {
        pirq = _guest_pirqatslot[vmid][slot];
        printh( "vgic: reading vmid:%d slot:%d pirq:%d\n", vmid, slot, pirq );
    }
    return pirq;
}
void slotpirq_init ( void  )

Definition at line 10 of file slotpirq.c.

{
    int i, j;
    for( i = 0; i < NUM_GUESTS_STATIC; i++ ) {
        for( j = 0; j < VGIC_NUM_MAX_SLOTS; j++ ) {
            _guest_pirqatslot[i][j] = PIRQ_INVALID;
            _guest_virqatslot[i][j] = VIRQ_INVALID;
        }
    }
}
void slotpirq_set ( vmid_t  vmid,
uint32_t  slot,
uint32_t  pirq 
)

Definition at line 21 of file slotpirq.c.

{
    if ( vmid < NUM_GUESTS_STATIC ) {
        printh( "vgic: setting vmid:%d slot:%d pirq:%d\n", vmid, slot, pirq );
        _guest_pirqatslot[vmid][slot] = pirq;
    }
}
void slotvirq_clear ( vmid_t  vmid,
uint32_t  slot 
)

Definition at line 72 of file slotpirq.c.

Here is the call graph for this function:

uint32_t slotvirq_getslot ( vmid_t  vmid,
uint32_t  virq 
)

Definition at line 55 of file slotpirq.c.

{
    uint32_t slot = SLOT_INVALID;
    int i;

    if ( vmid < NUM_GUESTS_STATIC ) {
        for ( i = 0; i < VGIC_NUM_MAX_SLOTS; i++ ) {
            if ( _guest_virqatslot[vmid][i] == virq ) {
                slot = i;
                printh( "vgic: reading vmid:%d slot:%d virq:%d\n", vmid, slot, virq );
                break;
            }
        }
    }
    return slot;
}
void slotvirq_set ( vmid_t  vmid,
uint32_t  slot,
uint32_t  virq 
)

Definition at line 45 of file slotpirq.c.

{
    if ( vmid < NUM_GUESTS_STATIC ) {
        printh( "vgic: setting vmid:%d slot:%d virq:%d\n", vmid, slot, virq );
        _guest_virqatslot[vmid][slot] = virq;
    } else {
        printh( "vgic: not setting invalid vmid:%d slot:%d virq:%d\n", vmid, slot, virq );
    }
}
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines