struct hvm_hw_vpic *s;
int i;
+ if ( !has_vpic(d) )
+ return 0;
+
/* Save the state of both PICs */
for ( i = 0; i < 2 ; i++ )
{
{
struct hvm_hw_vpic *s;
uint16_t inst;
-
+
+ if ( !has_vpic(d) )
+ return -ENODEV;
+
/* Which PIC is this? */
inst = hvm_load_instance(h);
if ( inst > 1 )
{
struct hvm_hw_vpic *vpic;
+ if ( !has_vpic(d) )
+ return;
+
/* Master PIC. */
vpic = &d->arch.hvm_domain.vpic[0];
memset(vpic, 0, sizeof(*vpic));
void vpic_init(struct domain *d)
{
+ if ( !has_vpic(d) )
+ return;
+
vpic_reset(d);
register_portio_handler(d, 0x20, 2, vpic_intercept_pic_io);
struct hvm_hw_vpic *vpic = &d->arch.hvm_domain.vpic[irq >> 3];
uint8_t mask = 1 << (irq & 7);
+ ASSERT(has_vpic(d));
ASSERT(irq <= 15);
ASSERT(vpic_is_locked(vpic));
struct hvm_hw_vpic *vpic = &d->arch.hvm_domain.vpic[irq >> 3];
uint8_t mask = 1 << (irq & 7);
+ ASSERT(has_vpic(d));
ASSERT(irq <= 15);
ASSERT(vpic_is_locked(vpic));
int irq, vector;
struct hvm_hw_vpic *vpic = &v->domain->arch.hvm_domain.vpic[0];
+ ASSERT(has_vpic(v->domain));
+
TRACE_2D(TRC_HVM_EMUL_PIC_PEND_IRQ_CALL, vlapic_accept_pic_intr(v),
vpic->int_output);
if ( !vlapic_accept_pic_intr(v) || !vpic->int_output )