Re: [Xen-devel] [v8][PATCH 07/16] hvmloader/e820: construct guest e820 table

2015-07-16 Thread Chen, Tiejun
Honestly I didn't try to change that point but maybe I'm missing something? Yes, you are missing something. :-) I told you exactly what I wanted changed and what I said could remain the same: By all means, calculate high_mem_end so it's easier to read. But then, when creating a new region, s

Re: [Xen-devel] [v8][PATCH 07/16] hvmloader/e820: construct guest e820 table

2015-07-16 Thread George Dunlap
On 07/16/2015 04:29 PM, Chen, Tiejun wrote: > > > On 2015/7/16 23:16, George Dunlap wrote: >> On 07/16/2015 04:04 PM, Chen, Tiejun wrote: Yes, sorry, add_high_mem will be the size of memory *relocated*, not the actual end of it (unless, as you say, the original highmem region didn'

Re: [Xen-devel] [v8][PATCH 07/16] hvmloader/e820: construct guest e820 table

2015-07-16 Thread Chen, Tiejun
On 2015/7/16 23:16, George Dunlap wrote: On 07/16/2015 04:04 PM, Chen, Tiejun wrote: Yes, sorry, add_high_mem will be the size of memory *relocated*, not the actual end of it (unless, as you say, the original highmem region didn't exist). What I really meant was that either way, after adjusti

Re: [Xen-devel] [v8][PATCH 07/16] hvmloader/e820: construct guest e820 table

2015-07-16 Thread George Dunlap
On 07/16/2015 04:04 PM, Chen, Tiejun wrote: >> Yes, sorry, add_high_mem will be the size of memory *relocated*, not >> the actual end of it (unless, as you say, the original highmem region >> didn't exist). >> >> What I really meant was that either way, after adjusting the highmem >> region in the

Re: [Xen-devel] [v8][PATCH 07/16] hvmloader/e820: construct guest e820 table

2015-07-16 Thread Chen, Tiejun
Yes, sorry, add_high_mem will be the size of memory *relocated*, not the actual end of it (unless, as you say, the original highmem region didn't exist). What I really meant was that either way, after adjusting the highmem region in the e820, the end of that region should correspond to hvm_info->

Re: [Xen-devel] [v8][PATCH 07/16] hvmloader/e820: construct guest e820 table

2015-07-16 Thread George Dunlap
On Thu, Jul 16, 2015 at 2:12 PM, Chen, Tiejun wrote: >>> +if ( add_high_mem ) >>> +{ >>> +/* >>> + * hvmloader should always update hvm_info->high_mem_pgend >>> + * when it relocates RAM anywhere. >>> + */ >>> +BUG_ON( !hvm_info->high_mem_pgend ); >>

Re: [Xen-devel] [v8][PATCH 07/16] hvmloader/e820: construct guest e820 table

2015-07-16 Thread Chen, Tiejun
+/* + * And then we also need to adjust highmem. + */ +if ( add_high_mem ) +{ +for ( i = 0; i < nr; i++ ) +{ +if ( e820[i].type == E820_RAM && + e820[i].addr == (1ull << 32)) +{ +e820[i].size += add_high_me

Re: [Xen-devel] [v8][PATCH 07/16] hvmloader/e820: construct guest e820 table

2015-07-16 Thread George Dunlap
On Thu, Jul 16, 2015 at 7:52 AM, Tiejun Chen wrote: > Now use the hypervisor-supplied memory map to build our final e820 table: > * Add regions for BIOS ranges and other special mappings not in the > hypervisor map > * Add in the hypervisor regions > * Adjust the lowmem and highmem regions if we

[Xen-devel] [v8][PATCH 07/16] hvmloader/e820: construct guest e820 table

2015-07-15 Thread Tiejun Chen
Now use the hypervisor-supplied memory map to build our final e820 table: * Add regions for BIOS ranges and other special mappings not in the hypervisor map * Add in the hypervisor regions * Adjust the lowmem and highmem regions if we've had to relocate memory (adding a highmem region if necess