All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Bonzini <pbonzini@redhat.com>
To: "Ефимов Василий" <real@ispras.ru>, qemu-devel@nongnu.org
Cc: Kirill Batuzov <batuzovk@ispras.ru>,
	"Michael S. Tsirkin" <mst@redhat.com>
Subject: Re: [Qemu-devel] [PATCH v2] PAM: make PAM emulation closer to documentation
Date: Wed, 9 Sep 2015 14:11:04 +0200	[thread overview]
Message-ID: <55F021D8.2000404@redhat.com> (raw)
In-Reply-To: <55F01FFA.8000406@ispras.ru>



On 09/09/2015 14:03, Ефимов Василий wrote:
> We also can set up redirection at machine initialization, but using of
> listener makes sure redirection is actual at runtime. I do not know
> case in which regions at the PAM addresses are changed dynamically
> during guest work. But even during machine initialization the memory
> tree is changed multiple times. So, listener at least ensures the last
> version of tree is used for redirection choice.

Fair enough.

>> 2) For the "Make current PAM region an I/O region" case, you could add
>> an IOMMU region that to 0xc0000-0xfffff.  The listener would disable
>> pam->region[1] if address_space_translate returns an I/O region and
>> enable it if it returns RAM/ROM.
> As I see, IOMMU cannot be used for CPU access to memory because of
> assertion (!section->mr->iommu_ops) in
> exec.c: address_space_translate_for_iotlb
> IOMMU is used for redirection of device and debug access through
> address_space_translate. Please correct me if I miss something.

You're right.  We could remove the assertion and reuse subpage_ops for
IOMMUs, it would not allow running code but it would allow accesses.
But it's not necessary because this can never happen in practice.

> There is no known case in which an I/O region is at PAM addresses.
> But it is theoretically possible. Hence, I decide to implement it
> instead of insert an assertion.

Let's keep the code simple and assert.  If you put a BAR at
0xc0000-0xfffff, RAM wins, so this situation should never happen on x86
chipsets.

Paolo

      reply	other threads:[~2015-09-09 12:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-20 10:53 [Qemu-devel] [PATCH v2] PAM: make PAM emulation closer to documentation Efimov Vasily
2015-07-21  7:46 ` Paolo Bonzini
2015-07-21 11:09   ` Ефимов Василий
2015-07-22 16:37 ` Kevin O'Connor
2015-07-24 10:11   ` Ефимов Василий
2015-09-07 10:41 ` Ефимов Василий
2015-09-07 12:50 ` Paolo Bonzini
2015-09-09 12:03   ` Ефимов Василий
2015-09-09 12:11     ` Paolo Bonzini [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=55F021D8.2000404@redhat.com \
    --to=pbonzini@redhat.com \
    --cc=batuzovk@ispras.ru \
    --cc=mst@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=real@ispras.ru \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.