Re: [PATCH v2 1/1] target/s390x: Allow 2G hugepages guest backing

Matthew Rosato <[email protected]>
Newsgroups gmane.comp.emulators.qemu
Message-ID <[email protected]>
> -        if (kvm_enabled() && kvm_s390_get_hpage_1m()) {
> +        if (kvm_enabled() && kvm_s390_get_hpage()) {

...

>  
> -    cap_hpage_1m = 1;
> +int kvm_s390_get_hpage(void)
> +{
> +    return cap_hpage;
>  }
>  
>  int kvm_s390_get_hpage_1m(void)
>  {
> -    return cap_hpage_1m;
> +    return cap_hpage == 1;
> +}
> +
> +int kvm_s390_get_hpage_2g(void)
> +{
> +    return cap_hpage == 2;
>  }

Hey Claudio,

Thanks for changing things to differentiate between 1m and 2g for the cap.

Overall LGTM but this patch now makes kvm_s390_get_hpage_1m() dead code
(not referenced anywhere) as well as introduces a new function
kvm_s390_get_hpage_2g() that is also unused.

Since this patch is by itself, why not just remove the functions
until/if they are needed and only provide kvm_s390_get_hpage()?

Do you have planned future patches that you are confident will soon make
use of these get_hpage_1m() and get_hpage_2g() helpers?

Thanks,
Matt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.