<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>     I use the qemu-2.7 and seabios-1.10.1 to start the windows 7 guest. And the xhci controller is passthroughed to </div><div>the guest. <span style="line-height: 1.7;">When the safe mode interface of the </span><span style="line-height: 23.8px;">windows 7 </span><span style="line-height: 1.7;">appears, keyboard sometimes doesn't work and I can </span></div><div><span style="line-height: 1.7;">not choose </span><span style="line-height: 1.7;">any mode. </span></div><div><span style="line-height: 1.7;">    I have referred to seabios code about xhci configuration and find that after initializing </span>USB keyboard, the timer</div><div>ISR will check usb event<span style="line-height: 23.8px;"> </span><span style="line-height: 23.8px;">periodically. Normally, the "</span>xhci_process_events" function can process the keyboard events,</div><div>but now TRB_C bit of xhci controller has been unchanged and <span style="line-height: 23.8px;">"</span><span style="line-height: 23.8px;">xhci_process_events" function derectly return. So</span></div><div><span style="line-height: 23.8px;">keyboard didn't work. I want to know why </span><span style="line-height: 23.8px;"> </span><span style="line-height: 23.8px;">TRB_C bit of xhci controller is always unchanged. Hope somebody can </span></div><div><span style="line-height: 23.8px;">help me.</span></div><div><span style="line-height: 23.8px;">    Sorry for my poor English.</span></div><div><br></div><div><div>static void xhci_process_events(struct usb_xhci_s *xhci)</div><div>{</div><div>    struct xhci_ring *evts = xhci->evts;</div><div><br></div><div>    for (;;) {</div><div>        /* check for event */</div><div>        u32 nidx = evts->nidx;</div><div>        u32 cs = evts->cs;</div><div>        struct xhci_trb *etrb = evts->ring + nidx;</div><div>        u32 control = etrb->control;</div><div>        if ((control & TRB_C) != (cs ? 1 : 0))</div><div>            return;<span style="font-size: 18px;"><b>//stop here</b></span></div></div><div>....</div><div>....}</div><div><br></div></div><br><br><span title="neteasefooter"><p> </p></span>