* [Qemu-devel] [PATCH] target/i386: HAX: Enable ROM/ROM device memory region support
@ 2019-06-26 6:00 hang.yuan
2019-06-26 8:55 ` no-reply
0 siblings, 1 reply; 2+ messages in thread
From: hang.yuan @ 2019-06-26 6:00 UTC (permalink / raw)
To: qemu-devel; +Cc: Hang Yuan
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
Signed-off-by: Hang Yuan <hang.yuan@linux.intel.com>
---
target/i386/hax-mem.c | 12 ++++--------
1 file changed, 4 insertions(+), 8 deletions(-)
diff --git a/target/i386/hax-mem.c b/target/i386/hax-mem.c
index 6bb5a24917..685e88cb45 100644
--- a/target/i386/hax-mem.c
+++ b/target/i386/hax-mem.c
@@ -175,15 +175,11 @@ 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;
- }
/* Adjust start_pa and size so that they are page-aligned. (Cf
* kvm_set_phys_mem() in kvm-all.c).
--
2.21.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [Qemu-devel] [PATCH] target/i386: HAX: Enable ROM/ROM device memory region support
2019-06-26 6:00 [Qemu-devel] [PATCH] target/i386: HAX: Enable ROM/ROM device memory region support hang.yuan
@ 2019-06-26 8:55 ` no-reply
0 siblings, 0 replies; 2+ messages in thread
From: no-reply @ 2019-06-26 8:55 UTC (permalink / raw)
To: hang.yuan; +Cc: hang.yuan, qemu-devel
Patchew URL: https://patchew.org/QEMU/1561528815-4912-1-git-send-email-hang.yuan@linux.intel.com/
Hi,
This series seems to have some coding style problems. See output below for
more information:
Message-id: 1561528815-4912-1-git-send-email-hang.yuan@linux.intel.com
Type: series
Subject: [Qemu-devel] [PATCH] target/i386: HAX: Enable ROM/ROM device memory region support
=== TEST SCRIPT BEGIN ===
#!/bin/bash
git rev-parse base > /dev/null || exit 0
git config --local diff.renamelimit 0
git config --local diff.renames True
git config --local diff.algorithm histogram
./scripts/checkpatch.pl --mailback base..
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
* [new tag] patchew/1561528815-4912-1-git-send-email-hang.yuan@linux.intel.com -> patchew/1561528815-4912-1-git-send-email-hang.yuan@linux.intel.com
- [tag update] patchew/20190626024942.29758-1-eblake@redhat.com -> patchew/20190626024942.29758-1-eblake@redhat.com
Switched to a new branch 'test'
9456e09 target/i386: HAX: Enable ROM/ROM device memory region support
=== OUTPUT BEGIN ===
ERROR: braces {} are necessary for all arms of this statement
#32: FILE: target/i386/hax-mem.c:179:
+ if (memory_region_is_rom(mr) || (memory_region_is_romd(mr)))
[...]
+ else if (!memory_region_is_ram(mr))
[...]
ERROR: code indent should never use tabs
#33: FILE: target/i386/hax-mem.c:180:
+^Iflags |= HAX_RAM_INFO_ROM;$
ERROR: braces {} are necessary for all arms of this statement
#34: FILE: target/i386/hax-mem.c:181:
+ else if (!memory_region_is_ram(mr))
[...]
total: 3 errors, 0 warnings, 19 lines checked
Commit 9456e095fae9 (target/i386: HAX: Enable ROM/ROM device memory region support) has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
=== OUTPUT END ===
Test command exited with code: 1
The full log is available at
http://patchew.org/logs/1561528815-4912-1-git-send-email-hang.yuan@linux.intel.com/testing.checkpatch/?type=message.
---
Email generated automatically by Patchew [https://patchew.org/].
Please send your feedback to patchew-devel@redhat.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-06-26 8:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-26 6:00 [Qemu-devel] [PATCH] target/i386: HAX: Enable ROM/ROM device memory region support hang.yuan
2019-06-26 8:55 ` no-reply
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).