Lines Matching refs:cmd
382 static void amdvi_completion_wait(AMDVIState *s, uint64_t *cmd) in amdvi_completion_wait() argument
385 hwaddr addr = cpu_to_le64(extract64(cmd[0], 3, 49)) << 3; in amdvi_completion_wait()
386 uint64_t data = cpu_to_le64(cmd[1]); in amdvi_completion_wait()
388 if (extract64(cmd[0], 52, 8)) { in amdvi_completion_wait()
389 amdvi_log_illegalcom_error(s, extract64(cmd[0], 60, 4), in amdvi_completion_wait()
392 if (extract64(cmd[0], 0, 1)) { in amdvi_completion_wait()
400 if (extract64(cmd[0], 1, 1)) { in amdvi_completion_wait()
409 static void amdvi_inval_devtab_entry(AMDVIState *s, uint64_t *cmd) in amdvi_inval_devtab_entry() argument
411 uint16_t devid = cpu_to_le16((uint16_t)extract64(cmd[0], 0, 16)); in amdvi_inval_devtab_entry()
414 if (extract64(cmd[0], 16, 44) || cmd[1]) { in amdvi_inval_devtab_entry()
415 amdvi_log_illegalcom_error(s, extract64(cmd[0], 60, 4), in amdvi_inval_devtab_entry()
422 static void amdvi_complete_ppr(AMDVIState *s, uint64_t *cmd) in amdvi_complete_ppr() argument
424 if (extract64(cmd[0], 16, 16) || extract64(cmd[0], 52, 8) || in amdvi_complete_ppr()
425 extract64(cmd[1], 0, 2) || extract64(cmd[1], 3, 29) in amdvi_complete_ppr()
426 || extract64(cmd[1], 48, 16)) { in amdvi_complete_ppr()
427 amdvi_log_illegalcom_error(s, extract64(cmd[0], 60, 4), in amdvi_complete_ppr()
433 static void amdvi_inval_all(AMDVIState *s, uint64_t *cmd) in amdvi_inval_all() argument
435 if (extract64(cmd[0], 0, 60) || cmd[1]) { in amdvi_inval_all()
436 amdvi_log_illegalcom_error(s, extract64(cmd[0], 60, 4), in amdvi_inval_all()
453 static void amdvi_inval_pages(AMDVIState *s, uint64_t *cmd) in amdvi_inval_pages() argument
455 uint16_t domid = cpu_to_le16((uint16_t)extract64(cmd[0], 32, 16)); in amdvi_inval_pages()
457 if (extract64(cmd[0], 20, 12) || extract64(cmd[0], 48, 12) || in amdvi_inval_pages()
458 extract64(cmd[1], 3, 9)) { in amdvi_inval_pages()
459 amdvi_log_illegalcom_error(s, extract64(cmd[0], 60, 4), in amdvi_inval_pages()
468 static void amdvi_prefetch_pages(AMDVIState *s, uint64_t *cmd) in amdvi_prefetch_pages() argument
470 if (extract64(cmd[0], 16, 8) || extract64(cmd[0], 52, 8) || in amdvi_prefetch_pages()
471 extract64(cmd[1], 1, 1) || extract64(cmd[1], 3, 1) || in amdvi_prefetch_pages()
472 extract64(cmd[1], 5, 7)) { in amdvi_prefetch_pages()
473 amdvi_log_illegalcom_error(s, extract64(cmd[0], 60, 4), in amdvi_prefetch_pages()
480 static void amdvi_inval_inttable(AMDVIState *s, uint64_t *cmd) in amdvi_inval_inttable() argument
482 if (extract64(cmd[0], 16, 44) || cmd[1]) { in amdvi_inval_inttable()
483 amdvi_log_illegalcom_error(s, extract64(cmd[0], 60, 4), in amdvi_inval_inttable()
494 static void iommu_inval_iotlb(AMDVIState *s, uint64_t *cmd) in iommu_inval_iotlb() argument
497 uint16_t devid = extract64(cmd[0], 0, 16); in iommu_inval_iotlb()
498 if (extract64(cmd[1], 1, 1) || extract64(cmd[1], 3, 1) || in iommu_inval_iotlb()
499 extract64(cmd[1], 6, 6)) { in iommu_inval_iotlb()
500 amdvi_log_illegalcom_error(s, extract64(cmd[0], 60, 4), in iommu_inval_iotlb()
505 if (extract64(cmd[1], 0, 1)) { in iommu_inval_iotlb()
509 amdvi_iotlb_remove_page(s, cpu_to_le64(extract64(cmd[1], 12, 52)) << 12, in iommu_inval_iotlb()
510 cpu_to_le16(extract64(cmd[1], 0, 16))); in iommu_inval_iotlb()
518 uint64_t cmd[2]; in amdvi_cmdbuf_exec() local
521 cmd, AMDVI_COMMAND_SIZE, MEMTXATTRS_UNSPECIFIED)) { in amdvi_cmdbuf_exec()
527 switch (extract64(cmd[0], 60, 4)) { in amdvi_cmdbuf_exec()
529 amdvi_completion_wait(s, cmd); in amdvi_cmdbuf_exec()
532 amdvi_inval_devtab_entry(s, cmd); in amdvi_cmdbuf_exec()
535 amdvi_inval_pages(s, cmd); in amdvi_cmdbuf_exec()
538 iommu_inval_iotlb(s, cmd); in amdvi_cmdbuf_exec()
541 amdvi_inval_inttable(s, cmd); in amdvi_cmdbuf_exec()
544 amdvi_prefetch_pages(s, cmd); in amdvi_cmdbuf_exec()
547 amdvi_complete_ppr(s, cmd); in amdvi_cmdbuf_exec()
550 amdvi_inval_all(s, cmd); in amdvi_cmdbuf_exec()
553 trace_amdvi_unhandled_command(extract64(cmd[1], 60, 4)); in amdvi_cmdbuf_exec()
555 amdvi_log_illegalcom_error(s, extract64(cmd[1], 60, 4), in amdvi_cmdbuf_exec()