* [PATCH] x86/PVH: correct PVH Dom0 E820 region merge
@ 2026-10-05 16:01 Jan Beulich
2026-10-05 16:12 ` Jason Andryuk
2026-10-05 16:19 ` Roger Pau Monné
0 siblings, 2 replies; 4+ messages in thread
From: Jan Beulich @ 2026-10-05 16:01 UTC (permalink / raw)
To: xen-devel@lists.xenproject.org
Cc: Andrew Cooper, Teddy Astie, Roger Pau Monné
Folding with an immediately successive region can't be done by merely
lowering the start of the region. The size of the region needs increasing
as well.
Fixes: 5427134eae81 ("x86: populate PVHv2 Dom0 physical memory map")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
--- a/xen/arch/x86/hvm/dom0_build.c
+++ b/xen/arch/x86/hvm/dom0_build.c
@@ -229,6 +229,7 @@ static int __init pvh_add_mem_range(stru
if ( rs == e && d->arch.e820[i].type == type )
{
d->arch.e820[i].addr = s;
+ d->arch.e820[i].size += e - s;
return 0;
}
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] x86/PVH: correct PVH Dom0 E820 region merge
2026-10-05 16:01 [PATCH] x86/PVH: correct PVH Dom0 E820 region merge Jan Beulich
@ 2026-10-05 16:12 ` Jason Andryuk
2026-10-05 16:19 ` Roger Pau Monné
1 sibling, 0 replies; 4+ messages in thread
From: Jason Andryuk @ 2026-10-05 16:12 UTC (permalink / raw)
To: Jan Beulich, xen-devel@lists.xenproject.org
Cc: Andrew Cooper, Teddy Astie, Roger Pau Monné
On 2026-10-05 12:01, Jan Beulich wrote:
> Folding with an immediately successive region can't be done by merely
> lowering the start of the region. The size of the region needs increasing
> as well.
>
> Fixes: 5427134eae81 ("x86: populate PVHv2 Dom0 physical memory map")
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Jason Andryuk <jason.andryuk@amd.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] x86/PVH: correct PVH Dom0 E820 region merge
2026-10-05 16:01 [PATCH] x86/PVH: correct PVH Dom0 E820 region merge Jan Beulich
2026-10-05 16:12 ` Jason Andryuk
@ 2026-10-05 16:19 ` Roger Pau Monné
2026-10-06 5:56 ` Jan Beulich
1 sibling, 1 reply; 4+ messages in thread
From: Roger Pau Monné @ 2026-10-05 16:19 UTC (permalink / raw)
To: Jan Beulich; +Cc: xen-devel@lists.xenproject.org, Andrew Cooper, Teddy Astie
On Mon, Oct 05, 2026 at 06:01:34PM +0200, Jan Beulich wrote:
> Folding with an immediately successive region can't be done by merely
> lowering the start of the region. The size of the region needs increasing
> as well.
>
> Fixes: 5427134eae81 ("x86: populate PVHv2 Dom0 physical memory map")
> Signed-off-by: Jan Beulich <jbeulich@suse.com>
My bad...
Reviewed-by: Roger Pau Monné <roger@xenproject.org>
>
> --- a/xen/arch/x86/hvm/dom0_build.c
> +++ b/xen/arch/x86/hvm/dom0_build.c
> @@ -229,6 +229,7 @@ static int __init pvh_add_mem_range(stru
> if ( rs == e && d->arch.e820[i].type == type )
> {
> d->arch.e820[i].addr = s;
> + d->arch.e820[i].size += e - s;
I think it would be simpler as:
d->arch.e820[i].size = re - s;
Thanks, Roger.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] x86/PVH: correct PVH Dom0 E820 region merge
2026-10-05 16:19 ` Roger Pau Monné
@ 2026-10-06 5:56 ` Jan Beulich
0 siblings, 0 replies; 4+ messages in thread
From: Jan Beulich @ 2026-10-06 5:56 UTC (permalink / raw)
To: Roger Pau Monné
Cc: xen-devel@lists.xenproject.org, Andrew Cooper, Teddy Astie
On 05.10.2026 18:19, Roger Pau Monné wrote:
> On Mon, Oct 05, 2026 at 06:01:34PM +0200, Jan Beulich wrote:
>> Folding with an immediately successive region can't be done by merely
>> lowering the start of the region. The size of the region needs increasing
>> as well.
>>
>> Fixes: 5427134eae81 ("x86: populate PVHv2 Dom0 physical memory map")
>> Signed-off-by: Jan Beulich <jbeulich@suse.com>
>
> My bad...
>
> Reviewed-by: Roger Pau Monné <roger@xenproject.org>
Thanks.
>> --- a/xen/arch/x86/hvm/dom0_build.c
>> +++ b/xen/arch/x86/hvm/dom0_build.c
>> @@ -229,6 +229,7 @@ static int __init pvh_add_mem_range(stru
>> if ( rs == e && d->arch.e820[i].type == type )
>> {
>> d->arch.e820[i].addr = s;
>> + d->arch.e820[i].size += e - s;
>
> I think it would be simpler as:
>
> d->arch.e820[i].size = re - s;
Perhaps, but the way I have it the compiler may figure that it can fold
the tail of this path with the next if()'s body.
Jan
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-10-06 5:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-05 16:01 [PATCH] x86/PVH: correct PVH Dom0 E820 region merge Jan Beulich
2026-10-05 16:12 ` Jason Andryuk
2026-10-05 16:19 ` Roger Pau Monné
2026-10-06 5:56 ` Jan Beulich
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.