Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1374359
| From | Toshi Kani <toshi.kani@hpe.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] x86/mm/pat: Fix BUG_ON in mmap_mem on QEMU/i386 |
| Date | 2016-04-08 18:50 +0200 |
| Message-ID | <rlHLA-6M8-9@gated-at.bofh.it> (permalink) |
| References | <rjfJM-2rv-11@gated-at.bofh.it> <rkx1U-2hc-21@gated-at.bofh.it> <rkBfc-61Y-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Tue, 2016-04-05 at 09:24 -0600, Toshi Kani wrote: > +xen-devl > > On Tue, 2016-04-05 at 13:09 +0200, Borislav Petkov wrote: > > On Fri, Apr 01, 2016 at 04:19:45PM -0600, Toshi Kani wrote: > > > : > > > > > > When the system does not have much memory, 'high_memory' points to > > > > What does "much memory" mean, exactly? > > I meant to say when a 32-bit system does not have ZONE_HIGHMEM, > __pa(high_memory) points to the maximum memory address + 1. > > I will remove this sentence since it is irrelevant to this BUG_ON. Even > if a 32-bit system does have ZONE_HIGHMEM, slow_virt_to_phys() still > returns 0 for high_memory because it is set to the maximum direct mapped > address + 1 in this case. This address is not covered by page table, > either. > > But this made me realized that this high_memory check can be harmful in > such case, ie. __pa(high_memory) is not the maximum memory address when > ZONE_HIGHMEM is present. > > I assume when this code block was originally added, legacy systems > without MTRRs did not have ZONE_HIGHMEM. However, MTRRs are also > disabled on Xen. Reactivating this code may cause an issue on Xen 32-bit > guests with ZONE_HIGHMEM. > > Question to Xen folks: Does Xen support 32-bit guests with ZONE_HIGHMEM? > > If yes, a safer fix may be to remove this code block since it was > deadcode anyway... I have not heard a confirmation from Xen folks, but I believe ZONE_HIGHMEM is supported on 32-bit Xen guests. So, unless someone has an objection, I am going to remove this code block in the next version of this patch. Thanks, -Toshi
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH] x86/mm/pat: Fix BUG_ON in mmap_mem on QEMU/i386 Borislav Petkov <bp@suse.de> - 2016-04-05 13:10 +0200
Re: [PATCH] x86/mm/pat: Fix BUG_ON in mmap_mem on QEMU/i386 Toshi Kani <toshi.kani@hpe.com> - 2016-04-05 17:40 +0200
Re: [PATCH] x86/mm/pat: Fix BUG_ON in mmap_mem on QEMU/i386 Toshi Kani <toshi.kani@hpe.com> - 2016-04-08 18:50 +0200
Re: [Xen-devel] [PATCH] x86/mm/pat: Fix BUG_ON in mmap_mem on QEMU/i386 David Vrabel <david.vrabel@citrix.com> - 2016-04-08 19:10 +0200
Re: [Xen-devel] [PATCH] x86/mm/pat: Fix BUG_ON in mmap_mem on QEMU/i386 Toshi Kani <toshi.kani@hpe.com> - 2016-04-08 19:10 +0200
csiph-web