Lines Matching full:msi
15 #include "hw/pci/msi.h"
31 qemu_log_mask(LOG_GUEST_ERROR, "MSI out of bounds (%d vs 0x%"PRIx64")", in phb3_msi_ive_addr()
65 static void phb3_msi_set_p(Phb3MsiState *msi, int srcno, uint8_t gen) in phb3_msi_set_p() argument
70 ive_addr = phb3_msi_ive_addr(msi->phb, srcno); in phb3_msi_set_p()
82 static void phb3_msi_set_q(Phb3MsiState *msi, int srcno) in phb3_msi_set_q() argument
87 ive_addr = phb3_msi_ive_addr(msi->phb, srcno); in phb3_msi_set_q()
99 static void phb3_msi_try_send(Phb3MsiState *msi, int srcno, bool force) in phb3_msi_try_send() argument
101 ICSState *ics = ICS(msi); in phb3_msi_try_send()
105 if (!phb3_msi_read_ive(msi->phb, srcno, &ive)) { in phb3_msi_try_send()
128 phb3_msi_set_q(msi, srcno); in phb3_msi_try_send()
131 phb3_msi_set_p(msi, srcno, gen); in phb3_msi_try_send()
137 phb3_msi_set_q(msi, srcno); in phb3_msi_try_send()
149 Phb3MsiState *msi = PHB3_MSI(opaque); in phb3_msi_set_irq() local
152 phb3_msi_try_send(msi, srcno, false); in phb3_msi_set_irq()
157 void pnv_phb3_msi_send(Phb3MsiState *msi, uint64_t addr, uint16_t data, in pnv_phb3_msi_send() argument
160 ICSState *ics = ICS(msi); in pnv_phb3_msi_send()
166 qemu_log_mask(LOG_GUEST_ERROR, "MSI %d out of bounds", src); in pnv_phb3_msi_send()
170 if (!phb3_msi_read_ive(msi->phb, src, &ive)) { in pnv_phb3_msi_send()
176 "MSI %d send by PE#%d but assigned to PE#%d", in pnv_phb3_msi_send()
181 qemu_irq_pulse(msi->qirqs[src]); in pnv_phb3_msi_send()
184 void pnv_phb3_msi_ffi(Phb3MsiState *msi, uint64_t val) in pnv_phb3_msi_ffi() argument
187 pnv_phb3_msi_send(msi, val, 0, -1); in pnv_phb3_msi_ffi()
190 msi->phb->regs[PHB_FFI_LOCK >> 3] = 0; in pnv_phb3_msi_ffi()
195 Phb3MsiState *msi = PHB3_MSI(ics); in phb3_msi_reject() local
202 msi->rba[idx] |= bit; in phb3_msi_reject()
203 msi->rba_sum |= (1u << idx); in phb3_msi_reject()
208 Phb3MsiState *msi = PHB3_MSI(ics); in phb3_msi_resend() local
211 if (msi->rba_sum == 0) { in phb3_msi_resend()
216 if ((msi->rba_sum & (1u << i)) == 0) { in phb3_msi_resend()
219 msi->rba_sum &= ~(1u << i); in phb3_msi_resend()
221 if ((msi->rba[i] & (1ull << j)) == 0) { in phb3_msi_resend()
224 msi->rba[i] &= ~(1ull << j); in phb3_msi_resend()
225 phb3_msi_try_send(msi, i * 64 + j, true); in phb3_msi_resend()
232 Phb3MsiState *msi = PHB3_MSI(obj); in phb3_msi_reset_hold() local
239 memset(msi->rba, 0, sizeof(msi->rba)); in phb3_msi_reset_hold()
240 msi->rba_sum = 0; in phb3_msi_reset_hold()
243 void pnv_phb3_msi_update_config(Phb3MsiState *msi, uint32_t base, in pnv_phb3_msi_update_config() argument
246 ICSState *ics = ICS(msi); in pnv_phb3_msi_update_config()
257 Phb3MsiState *msi = PHB3_MSI(dev); in phb3_msi_realize() local
258 ICSState *ics = ICS(msi); in phb3_msi_realize()
262 assert(msi->phb); in phb3_msi_realize()
270 msi->qirqs = qemu_allocate_irqs(phb3_msi_set_irq, msi, ics->nr_irqs); in phb3_msi_realize()
275 Phb3MsiState *msi = PHB3_MSI(obj); in phb3_msi_instance_init() local
279 (Object **)&msi->phb, in phb3_msi_instance_init()
318 void pnv_phb3_msi_pic_print_info(Phb3MsiState *msi, GString *buf) in pnv_phb3_msi_pic_print_info() argument
320 ICSState *ics = ICS(msi); in pnv_phb3_msi_pic_print_info()
329 if (!phb3_msi_read_ive(msi->phb, i, &ive)) { in pnv_phb3_msi_pic_print_info()