소스 검색

xen: check for zero sized area when invalidating memory

With the introduction of the linear mapped p2m list setting memory
areas to "invalid" had to be delayed. When doing the invalidation
make sure no zero sized areas are processed.

Signed-off-by: Juegren Gross <jgross@suse.com>
Signed-off-by: David Vrabel <david.vrabel@citrix.com>
Juergen Gross 10 년 전
부모
커밋
9a17ad7f3d
1개의 변경된 파일2개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      arch/x86/xen/setup.c

+ 2 - 0
arch/x86/xen/setup.c

@@ -160,6 +160,8 @@ void __init xen_inv_extra_mem(void)
 	int i;
 	int i;
 
 
 	for (i = 0; i < XEN_EXTRA_MEM_MAX_REGIONS; i++) {
 	for (i = 0; i < XEN_EXTRA_MEM_MAX_REGIONS; i++) {
+		if (!xen_extra_mem[i].size)
+			continue;
 		pfn_s = PFN_DOWN(xen_extra_mem[i].start);
 		pfn_s = PFN_DOWN(xen_extra_mem[i].start);
 		pfn_e = PFN_UP(xen_extra_mem[i].start + xen_extra_mem[i].size);
 		pfn_e = PFN_UP(xen_extra_mem[i].start + xen_extra_mem[i].size);
 		for (pfn = pfn_s; pfn < pfn_e; pfn++)
 		for (pfn = pfn_s; pfn < pfn_e; pfn++)