qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paul Brook <paul@codesourcery.com>
To: qemu-devel@nongnu.org
Cc: Muli Ben-Yehuda <muli@il.ibm.com>, Nadav Amit <nadav.amit@gmail.com>
Subject: Re: [Qemu-devel] [PATCH] Basic Intel IOMMU DMAR emulation
Date: Thu, 8 Apr 2010 12:43:13 +0100	[thread overview]
Message-ID: <201004081243.13932.paul@codesourcery.com> (raw)
In-Reply-To: <8DC5AC30-AF5C-461F-BA46-69F6C583C9EA@gmail.com>

>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

      reply	other threads:[~2010-04-08 11:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-08  0:58 [Qemu-devel] [PATCH] Basic Intel IOMMU DMAR emulation Nadav Amit
2010-04-08 11:43 ` Paul Brook [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201004081243.13932.paul@codesourcery.com \
    --to=paul@codesourcery.com \
    --cc=muli@il.ibm.com \
    --cc=nadav.amit@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).