qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Maxime Villard <max@m00nbsd.net>
To: qemu-devel@nongnu.org
Subject: [Qemu-devel] Question about the pc.bios mapping on x86
Date: Sun, 9 Dec 2018 10:23:36 +0100	[thread overview]
Message-ID: <afa2b9f1-f59a-6793-261f-39dac7ec78f5@m00nbsd.net> (raw)

Hi,
I am developing Qemu support for an accelerator, and I'm facing the following
situation:

The accelerator has a MemoryListener, with a region_add function. Qemu calls
region_add a certain number of times. At one point it wants to map pc.bios,
but the HVA it wants pc.bios mapped at happens to be already occupied by a
mapping done previously.

Typically, a previous call to region_add created a mapping entry with
	[HVA=0x...A2F000 GPA=0xFFFC0000 SIZE=0x40000]
and now Qemu calls region_add to create the pc.bios entry with
	[HVA=0x...A4F000 GPA=0x000E0000 SIZE=0x20000]
As you can see the higher half of the previous HVA mapping collides.

My question is the following: what is the expected behavior here? Is it to
munmap the HVA that collides and remap it to GPA=0xE0000? Is it to duplicate
the content pointed to by the colliding HVA into the new GPA?

I have tested a few combinations, but I can't seem to find the right one, so
I prefer to ask directly to clear the confusion.

Sorry if this is a stupid question, but I didn't find a clear explanation
of the expected behavior.

Thanks

                 reply	other threads:[~2018-12-09  9:23 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=afa2b9f1-f59a-6793-261f-39dac7ec78f5@m00nbsd.net \
    --to=max@m00nbsd.net \
    --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).