diff options
-rw-r--r-- | hw/rtl8139.c | 9 | ||||
-rw-r--r-- | kvm-all.c | 16 |
2 files changed, 20 insertions, 5 deletions
diff --git a/hw/rtl8139.c b/hw/rtl8139.c index 2413bc3..eb22d04 100644 --- a/hw/rtl8139.c +++ b/hw/rtl8139.c @@ -791,6 +791,9 @@ static int rtl8139_can_receive(VLANClientState *nc) return 1; if (!rtl8139_receiver_enabled(s)) return 1; + /* network/host communication happens only in normal mode */ + if ((s->Cfg9346 & Chip9346_op_mask) != Cfg9346_Normal) + return 0; if (rtl8139_cp_receiver_enabled(s)) { /* ??? Flow control not implemented in c+ mode. @@ -833,6 +836,12 @@ static ssize_t rtl8139_do_receive(VLANClientState *nc, const uint8_t *buf, size_ return -1; } + /* check whether we are in normal mode */ + if ((s->Cfg9346 & Chip9346_op_mask) != Cfg9346_Normal) { + DPRINTF("not in normal op mode\n"); + return -1; + } + /* XXX: check this */ if (s->RxConfig & AcceptAllPhys) { /* promiscuous: receive all */ @@ -62,11 +62,6 @@ typedef struct KVMSlot typedef struct kvm_dirty_log KVMDirtyLog; -typedef struct KVMMSIRoute { - struct kvm_irq_routing_entry kroute; - QTAILQ_ENTRY(KVMMSIRoute) entry; -} KVMMSIRoute; - struct KVMState { KVMSlot slots[32]; @@ -867,6 +862,11 @@ int kvm_irqchip_set_irq(KVMState *s, int irq, int level) } #ifdef KVM_CAP_IRQ_ROUTING +typedef struct KVMMSIRoute { + struct kvm_irq_routing_entry kroute; + QTAILQ_ENTRY(KVMMSIRoute) entry; +} KVMMSIRoute; + static void set_gsi(KVMState *s, unsigned int gsi) { s->used_gsi_bitmap[gsi / 32] |= 1U << (gsi % 32); @@ -1129,6 +1129,10 @@ static void kvm_init_irq_routing(KVMState *s) { } +void kvm_irqchip_release_virq(KVMState *s, int virq) +{ +} + int kvm_irqchip_send_msi(KVMState *s, MSIMessage msg) { abort(); @@ -1286,7 +1290,9 @@ int kvm_init(void) s->pit_state2 = kvm_check_extension(s, KVM_CAP_PIT_STATE2); #endif +#ifdef KVM_CAP_IRQ_ROUTING s->direct_msi = (kvm_check_extension(s, KVM_CAP_SIGNAL_MSI) > 0); +#endif ret = kvm_arch_init(s); if (ret < 0) { |