mirror of
https://github.com/mii443/qemu.git
synced 2025-12-03 11:08:25 +00:00
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
Miscellaneous bugfixes # gpg: Signature made Wed 15 Nov 2017 15:27:25 GMT # gpg: using RSA key 0xBFFBD25F78C7AE83 # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * remotes/bonzini/tags/for-upstream: fix scripts/update-linux-headers.sh here document exec: Do not resolve subpage in mru_section util/stats64: Fix min/max comparisons cpu-exec: avoid cpu_exec_nocache infinite loop with record/replay cpu-exec: don't overwrite exception_index vhost-user-scsi: add missing virtqueue_size param target-i386: adds PV_TLB_FLUSH CPUID feature bit thread-posix: fix qemu_rec_mutex_trylock macro Makefile: simpler/faster "make help" ioapic/tracing: Remove last DPRINTFs Enable 8-byte wide MMIO for 16550 serial devices Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
12
exec.c
12
exec.c
@@ -410,22 +410,16 @@ static MemoryRegionSection *address_space_lookup_region(AddressSpaceDispatch *d,
|
||||
{
|
||||
MemoryRegionSection *section = atomic_read(&d->mru_section);
|
||||
subpage_t *subpage;
|
||||
bool update;
|
||||
|
||||
if (section && section != &d->map.sections[PHYS_SECTION_UNASSIGNED] &&
|
||||
section_covers_addr(section, addr)) {
|
||||
update = false;
|
||||
} else {
|
||||
if (!section || section == &d->map.sections[PHYS_SECTION_UNASSIGNED] ||
|
||||
!section_covers_addr(section, addr)) {
|
||||
section = phys_page_find(d, addr);
|
||||
update = true;
|
||||
atomic_set(&d->mru_section, section);
|
||||
}
|
||||
if (resolve_subpage && section->mr->subpage) {
|
||||
subpage = container_of(section->mr, subpage_t, iomem);
|
||||
section = &d->map.sections[subpage->sub_section[SUBPAGE_IDX(addr)]];
|
||||
}
|
||||
if (update) {
|
||||
atomic_set(&d->mru_section, section);
|
||||
}
|
||||
return section;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user