mbox series

[v1,0/2] memory-device: reintroduce memory region size check

Message ID 20240117135554.787344-1-david@redhat.com (mailing list archive)
Headers show
Series memory-device: reintroduce memory region size check | expand

Message

David Hildenbrand Jan. 17, 2024, 1:55 p.m. UTC
Reintroduce a modified region size check, after we would now allow some
configurations that don't make any sense (e.g., partial hugetlb pages,
1G+1byte DIMMs).

We have to take care of hv-balloon first, which was the case why we
remove that check in the first place.

Cc: "Maciej S. Szmigiero" <maciej.szmigiero@oracle.com>
Cc: Mario Casquero <mcasquer@redhat.com>
Cc: Igor Mammedov <imammedo@redhat.com>
Cc: Xiao Guangrong <xiaoguangrong.eric@gmail.com>

David Hildenbrand (2):
  hv-balloon: use get_min_alignment() to express 32 GiB alignment
  memory-device: reintroduce memory region size check

 hw/hyperv/hv-balloon.c | 37 +++++++++++++++++++++----------------
 hw/mem/memory-device.c | 14 ++++++++++++++
 2 files changed, 35 insertions(+), 16 deletions(-)

Comments

Maciej S. Szmigiero Jan. 22, 2024, 2:34 p.m. UTC | #1
Hi David,

On 17.01.2024 14:55, David Hildenbrand wrote:
> Reintroduce a modified region size check, after we would now allow some
> configurations that don't make any sense (e.g., partial hugetlb pages,
> 1G+1byte DIMMs).
> 
> We have to take care of hv-balloon first, which was the case why we
> remove that check in the first place.
> 
> Cc: "Maciej S. Szmigiero" <maciej.szmigiero@oracle.com>
> Cc: Mario Casquero <mcasquer@redhat.com>
> Cc: Igor Mammedov <imammedo@redhat.com>
> Cc: Xiao Guangrong <xiaoguangrong.eric@gmail.com>
> 
> David Hildenbrand (2):
>    hv-balloon: use get_min_alignment() to express 32 GiB alignment
>    memory-device: reintroduce memory region size check
> 
>   hw/hyperv/hv-balloon.c | 37 +++++++++++++++++++++----------------
>   hw/mem/memory-device.c | 14 ++++++++++++++
>   2 files changed, 35 insertions(+), 16 deletions(-)
> 

Looked at the changes, tested hv-balloon with a small memory
backend and it seem to work fine, so for the whole series:

Reviewed-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>

Thanks,
Maciej
David Hildenbrand Jan. 22, 2024, 4:49 p.m. UTC | #2
On 17.01.24 14:55, David Hildenbrand wrote:
> Reintroduce a modified region size check, after we would now allow some
> configurations that don't make any sense (e.g., partial hugetlb pages,
> 1G+1byte DIMMs).
> 
> We have to take care of hv-balloon first, which was the case why we
> remove that check in the first place.
> 
> Cc: "Maciej S. Szmigiero" <maciej.szmigiero@oracle.com>
> Cc: Mario Casquero <mcasquer@redhat.com>
> Cc: Igor Mammedov <imammedo@redhat.com>
> Cc: Xiao Guangrong <xiaoguangrong.eric@gmail.com>

Thanks all for resting+review. Queued to

https://github.com/davidhildenbrand/qemu.git mem-next
David Hildenbrand Jan. 22, 2024, 4:50 p.m. UTC | #3
On 22.01.24 17:49, David Hildenbrand wrote:
> On 17.01.24 14:55, David Hildenbrand wrote:
>> Reintroduce a modified region size check, after we would now allow some
>> configurations that don't make any sense (e.g., partial hugetlb pages,
>> 1G+1byte DIMMs).
>>
>> We have to take care of hv-balloon first, which was the case why we
>> remove that check in the first place.
>>
>> Cc: "Maciej S. Szmigiero" <maciej.szmigiero@oracle.com>
>> Cc: Mario Casquero <mcasquer@redhat.com>
>> Cc: Igor Mammedov <imammedo@redhat.com>
>> Cc: Xiao Guangrong <xiaoguangrong.eric@gmail.com>
> 
> Thanks all for resting+review. Queued to

Haha, "testing" :)