From: Colin Xu <Colin.Xu@intel.com>
To: hang.yuan@linux.intel.com, qemu-devel@nongnu.org
Cc: wenchao.wang@intel.com
Subject: Re: [PATCH v2] [Qemu-devel] target/i386: HAX: Enable ROM/ROM device memory region support
Date: Mon, 30 Mar 2020 11:53:06 +0800 [thread overview]
Message-ID: <54b6f6c0-6419-2bc2-c915-9c7a83ab8dea@intel.com> (raw)
In-Reply-To: <1585538712-28300-1-git-send-email-hang.yuan@linux.intel.com>
Looks good to me.
Reviewed-by: Colin Xu <colin.xu@intel.com>
On 2020-03-30 11:25, hang.yuan@linux.intel.com wrote:
> From: Hang Yuan <hang.yuan@linux.intel.com>
>
> Add ROM and ROM device memory region support in HAX. Their memory region is
> read only and write access will generate EPT violation. The violation will be
> handled in the HAX kernel with the following patch.
>
> https://github.com/intel/haxm/commit/33ceea09a1655fca12c47f1e112b1d269357ff28
>
> v2: fix coding style problems
>
> Signed-off-by: Hang Yuan <hang.yuan@linux.intel.com>
> ---
> target/i386/hax-mem.c | 11 ++++-------
> 1 file changed, 4 insertions(+), 7 deletions(-)
>
> diff --git a/target/i386/hax-mem.c b/target/i386/hax-mem.c
> index 6bb5a24917..a8bfd37977 100644
> --- a/target/i386/hax-mem.c
> +++ b/target/i386/hax-mem.c
> @@ -175,13 +175,10 @@ static void hax_process_section(MemoryRegionSection *section, uint8_t flags)
> uint64_t host_va;
> uint32_t max_mapping_size;
>
> - /* We only care about RAM and ROM regions */
> - if (!memory_region_is_ram(mr)) {
> - if (memory_region_is_romd(mr)) {
> - /* HAXM kernel module does not support ROMD yet */
> - warn_report("Ignoring ROMD region 0x%016" PRIx64 "->0x%016" PRIx64,
> - start_pa, start_pa + size);
> - }
> + /* We only care about RAM/ROM regions and ROM device */
> + if (memory_region_is_rom(mr) || (memory_region_is_romd(mr))) {
> + flags |= HAX_RAM_INFO_ROM;
> + } else if (!memory_region_is_ram(mr)) {
> return;
> }
>
--
Best Regards,
Colin Xu
next prev parent reply other threads:[~2020-03-30 3:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-30 3:25 [PATCH v2] [Qemu-devel] target/i386: HAX: Enable ROM/ROM device memory region support hang.yuan
2020-03-30 3:53 ` Colin Xu [this message]
2020-04-28 2:45 ` Colin Xu
2020-04-28 8:11 ` Philippe Mathieu-Daudé
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=54b6f6c0-6419-2bc2-c915-9c7a83ab8dea@intel.com \
--to=colin.xu@intel.com \
--cc=hang.yuan@linux.intel.com \
--cc=qemu-devel@nongnu.org \
--cc=wenchao.wang@intel.com \
/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).