[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Basic Intel IOMMU DMAR emulation
From: |
Paul Brook |
Subject: |
Re: [Qemu-devel] [PATCH] Basic Intel IOMMU DMAR emulation |
Date: |
Thu, 8 Apr 2010 12:43:13 +0100 |
User-agent: |
KMail/1.12.4 (Linux/2.6.33-2-amd64; KDE/4.3.4; x86_64; ; ) |
>1. DMAR tables must be loaded by command line ( -acpitable
> sig=DMAR,data=hw/DMAR.dat )
Why?
> +void cpu_physical_memory_rw_io(target_phys_addr_t addr, uint8_t *buf,
> + int len, int is_write, uint16_t devfn,
> + int* err);
This appears to be PCI specific, which is wrong.
You should be using the qdev infrastructure.
>+/* Mapping related structures */
>+struct IommuRootEntry {
>+ uint32_t p : 1 ;
>+ uint32_t res1 : 11 ;
>+ uint64_t ctp : 52 ;
>+ uint64_t res2 : 64 ;
>+};
This is almost certainly wrong on some hosts. You can not assume anything
about bitfield layout. Do not use these if an exact binary representation is
required.
Paul