From: Paolo Bonzini <pbonzini@redhat.com>
To: Efimov Vasily <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: Mon, 7 Sep 2015 14:50:56 +0200 [thread overview]
Message-ID: <55ED8830.8020506@redhat.com> (raw)
In-Reply-To: <1437389593-15297-1-git-send-email-real@ispras.ru>
On 20/07/2015 12:53, Efimov Vasily wrote:
> + read_src = address_space_translate(read_as, pam_offset,
> + &offset_within_read_leaf, &unused,
> + false);
> +
> + if (memory_region_is_ram(read_src) || memory_region_is_romd(read_src)) {
> + /* Read source is RAM or ROM.
> + Make current PAM region a ROM with body inside read source. */
> + cur->ram_addr = read_src->ram_addr + offset_within_read_leaf;
> + cur->rom_device = true;
> + cur->romd_mode = true;
> + } else {
> + /* Make current PAM region a clearly I/O region. */
> + cur->ram_addr = ~(ram_addr_t) 0;
> + cur->rom_device = false;
> + cur->romd_mode = false;
> + }
> +
> + pam->write_as = write_as;
> + pam->read_as = read_as;
> +}
> +
Hi Vasily,
I agree that this patch is an improvement compared to the earlier
versions, but it's still a bit of an abstraction violation and I'm not
sure if it works with KVM.
Let's see if we can improve things. Please correct me on the following:
1) For the "Make current PAM region a ROM" case, we can get the
ram_addr_t directly from the pc.bios and pc.rom MemoryRegions, and poke
into pam->region[1] and pam->region[2] when we create them.
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. However, I cannot understand or
remember what is the case where you get an I/O region.
Paolo
next prev parent reply other threads:[~2015-09-07 12:51 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 [this message]
2015-09-09 12:03 ` Ефимов Василий
2015-09-09 12:11 ` Paolo Bonzini
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=55ED8830.8020506@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.