Re: How to pass through off-chip USB controller


Wu, Binbin
 

Hi Tonny,
Which version of your clearlinux SOS?
Is there any chance that can you confirm that whether hw/pci/passthrough.c:560 is the line of code in bold?

static void
msix_table_write(struct vmctx *ctx, int vcpu, struct passthru_dev *ptdev,
uint64_t offset, int size, uint64_t data)
{
struct pci_vdev *dev;
struct msix_table_entry *entry;
uint8_t *dest8;
uint16_t *dest16;
uint32_t *dest32;
uint64_t *dest64;
size_t entry_offset;
uint32_t vector_control;
int index;
 
dev = ptdev->dev;
if (offset >= dev->msix.pba_offset &&
    offset < dev->msix.pba_offset + dev->msix.pba_size) {
switch (size) {
case 1:
dest8 = (uint8_t *)(dev->msix.pba_page + offset -
    dev->msix.pba_page_offset);
*dest8 = data;
break;
case 2:
dest16 = (uint16_t *)(dev->msix.pba_page + offset -
    dev->msix.pba_page_offset);
*dest16 = data;
break;
case 4:
dest32 = (uint32_t *)(dev->msix.pba_page + offset -
    dev->msix.pba_page_offset);
*dest32 = data;                //is hw/pci/passthrough.c:560 this line of code?
break;
case 8:
dest64 = (uint64_t *)(dev->msix.pba_page + offset -
    dev->msix.pba_page_offset);
*dest64 = data;
break;
default:
break;
}
return;
}
 

Join acrn-users@lists.projectacrn.org to automatically receive all group messages.