All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2] s390x: remove direct reference to mem_path global form s390x code
@ 2019-01-28 12:31 Igor Mammedov
  2019-01-28 12:46 ` David Hildenbrand
  2019-01-28 14:55 ` Philippe Mathieu-Daudé
  0 siblings, 2 replies; 6+ messages in thread
From: Igor Mammedov @ 2019-01-28 12:31 UTC (permalink / raw)
  To: qemu-devel; +Cc: pasic, borntraeger, qemu-s390x, cohuck, rth, david

I plan to deprecate -mem-path option and replace it with memory-backend,
for that it's necessary to get rid of mem_path global variable.
Do it for s390x case, replacing it with alternative way to enable
1Mb hugepages capability.

Todo that replace qemu_mempath_getpagesize() with qemu_getrampagesize()
which also checks for -mem-path provided RAM.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
---
v2:
  * s/qemu_mempath_getpagesize/qemu_getrampagesiz/ and drop the rest of changes
          David Hildenbrand <david@redhat.com>
---
 target/s390x/kvm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
index 2ebf26a..90766fa 100644
--- a/target/s390x/kvm.c
+++ b/target/s390x/kvm.c
@@ -287,7 +287,7 @@ void kvm_s390_crypto_reset(void)
 
 static int kvm_s390_configure_mempath_backing(KVMState *s)
 {
-    size_t path_psize = qemu_mempath_getpagesize(mem_path);
+    size_t path_psize = qemu_getrampagesize();
 
     if (path_psize == 4 * KiB) {
         return 0;
@@ -319,7 +319,7 @@ int kvm_arch_init(MachineState *ms, KVMState *s)
 {
     MachineClass *mc = MACHINE_GET_CLASS(ms);
 
-    if (mem_path && kvm_s390_configure_mempath_backing(s)) {
+    if (kvm_s390_configure_mempath_backing(s)) {
         return -EINVAL;
     }
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH v2] s390x: remove direct reference to mem_path global form s390x code
  2019-01-28 12:31 [Qemu-devel] [PATCH v2] s390x: remove direct reference to mem_path global form s390x code Igor Mammedov
@ 2019-01-28 12:46 ` David Hildenbrand
  2019-01-28 14:55 ` Philippe Mathieu-Daudé
  1 sibling, 0 replies; 6+ messages in thread
From: David Hildenbrand @ 2019-01-28 12:46 UTC (permalink / raw)
  To: Igor Mammedov, qemu-devel; +Cc: pasic, borntraeger, qemu-s390x, cohuck, rth

On 28.01.19 13:31, Igor Mammedov wrote:
> I plan to deprecate -mem-path option and replace it with memory-backend,
> for that it's necessary to get rid of mem_path global variable.
> Do it for s390x case, replacing it with alternative way to enable
> 1Mb hugepages capability.
> 
> Todo that replace qemu_mempath_getpagesize() with qemu_getrampagesize()
> which also checks for -mem-path provided RAM.
> 
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> ---
> v2:
>   * s/qemu_mempath_getpagesize/qemu_getrampagesiz/ and drop the rest of changes
>           David Hildenbrand <david@redhat.com>
> ---
>  target/s390x/kvm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
> index 2ebf26a..90766fa 100644
> --- a/target/s390x/kvm.c
> +++ b/target/s390x/kvm.c
> @@ -287,7 +287,7 @@ void kvm_s390_crypto_reset(void)
>  
>  static int kvm_s390_configure_mempath_backing(KVMState *s)
>  {
> -    size_t path_psize = qemu_mempath_getpagesize(mem_path);
> +    size_t path_psize = qemu_getrampagesize();
>  
>      if (path_psize == 4 * KiB) {
>          return 0;
> @@ -319,7 +319,7 @@ int kvm_arch_init(MachineState *ms, KVMState *s)
>  {
>      MachineClass *mc = MACHINE_GET_CLASS(ms);
>  
> -    if (mem_path && kvm_s390_configure_mempath_backing(s)) {
> +    if (kvm_s390_configure_mempath_backing(s)) {
>          return -EINVAL;
>      }
>  
> 

Nice!

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 

Thanks,

David / dhildenb

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH v2] s390x: remove direct reference to mem_path global form s390x code
  2019-01-28 12:31 [Qemu-devel] [PATCH v2] s390x: remove direct reference to mem_path global form s390x code Igor Mammedov
  2019-01-28 12:46 ` David Hildenbrand
@ 2019-01-28 14:55 ` Philippe Mathieu-Daudé
  2019-01-28 15:32   ` [Qemu-devel] [PATCH v3] " Igor Mammedov
  1 sibling, 1 reply; 6+ messages in thread
From: Philippe Mathieu-Daudé @ 2019-01-28 14:55 UTC (permalink / raw)
  To: Igor Mammedov, qemu-devel
  Cc: david, cohuck, pasic, borntraeger, qemu-s390x, rth

On 1/28/19 1:31 PM, Igor Mammedov wrote:
> I plan to deprecate -mem-path option and replace it with memory-backend,
> for that it's necessary to get rid of mem_path global variable.
> Do it for s390x case, replacing it with alternative way to enable
> 1Mb hugepages capability.
> 
> Todo that replace qemu_mempath_getpagesize() with qemu_getrampagesize()

I guess this should be: "To do that, replace ..."

> which also checks for -mem-path provided RAM.
> 
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> ---
> v2:
>   * s/qemu_mempath_getpagesize/qemu_getrampagesiz/ and drop the rest of changes
>           David Hildenbrand <david@redhat.com>
> ---
>  target/s390x/kvm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
> index 2ebf26a..90766fa 100644
> --- a/target/s390x/kvm.c
> +++ b/target/s390x/kvm.c
> @@ -287,7 +287,7 @@ void kvm_s390_crypto_reset(void)
>  
>  static int kvm_s390_configure_mempath_backing(KVMState *s)
>  {
> -    size_t path_psize = qemu_mempath_getpagesize(mem_path);
> +    size_t path_psize = qemu_getrampagesize();
>  
>      if (path_psize == 4 * KiB) {
>          return 0;
> @@ -319,7 +319,7 @@ int kvm_arch_init(MachineState *ms, KVMState *s)
>  {
>      MachineClass *mc = MACHINE_GET_CLASS(ms);
>  
> -    if (mem_path && kvm_s390_configure_mempath_backing(s)) {
> +    if (kvm_s390_configure_mempath_backing(s)) {
>          return -EINVAL;
>      }
>  
> 

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [Qemu-devel] [PATCH v3] s390x: remove direct reference to mem_path global form s390x code
  2019-01-28 14:55 ` Philippe Mathieu-Daudé
@ 2019-01-28 15:32   ` Igor Mammedov
  2019-01-29 12:39     ` Cornelia Huck
  0 siblings, 1 reply; 6+ messages in thread
From: Igor Mammedov @ 2019-01-28 15:32 UTC (permalink / raw)
  To: qemu-devel; +Cc: pasic, borntraeger, qemu-s390x, cohuck, rth, david, philmd

I plan to deprecate -mem-path option and replace it with memory-backend,
for that it's necessary to get rid of mem_path global variable.
Do it for s390x case, replacing it with alternative way to enable
1Mb hugepages capability.

To do that, replace qemu_mempath_getpagesize() with qemu_getrampagesize()
which also checks for -mem-path provided RAM.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
---
v3:
  fixup, typo in commit msg (Philippe Mathieu-Daudé <philmd@redhat.com>)
v2:
  * s/qemu_mempath_getpagesize/qemu_getrampagesiz/ and drop the rest of changes
          David Hildenbrand <david@redhat.com>
---
 target/s390x/kvm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
index 2ebf26a..90766fa 100644
--- a/target/s390x/kvm.c
+++ b/target/s390x/kvm.c
@@ -287,7 +287,7 @@ void kvm_s390_crypto_reset(void)
 
 static int kvm_s390_configure_mempath_backing(KVMState *s)
 {
-    size_t path_psize = qemu_mempath_getpagesize(mem_path);
+    size_t path_psize = qemu_getrampagesize();
 
     if (path_psize == 4 * KiB) {
         return 0;
@@ -319,7 +319,7 @@ int kvm_arch_init(MachineState *ms, KVMState *s)
 {
     MachineClass *mc = MACHINE_GET_CLASS(ms);
 
-    if (mem_path && kvm_s390_configure_mempath_backing(s)) {
+    if (kvm_s390_configure_mempath_backing(s)) {
         return -EINVAL;
     }
 
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH v3] s390x: remove direct reference to mem_path global form s390x code
  2019-01-28 15:32   ` [Qemu-devel] [PATCH v3] " Igor Mammedov
@ 2019-01-29 12:39     ` Cornelia Huck
  2019-01-29 14:43       ` Igor Mammedov
  0 siblings, 1 reply; 6+ messages in thread
From: Cornelia Huck @ 2019-01-29 12:39 UTC (permalink / raw)
  To: Igor Mammedov
  Cc: qemu-devel, pasic, borntraeger, qemu-s390x, rth, david, philmd

On Mon, 28 Jan 2019 16:32:38 +0100
Igor Mammedov <imammedo@redhat.com> wrote:

In the subject: s/form/from/

> I plan to deprecate -mem-path option and replace it with memory-backend,
> for that it's necessary to get rid of mem_path global variable.
> Do it for s390x case, replacing it with alternative way to enable
> 1Mb hugepages capability.
> 
> To do that, replace qemu_mempath_getpagesize() with qemu_getrampagesize()
> which also checks for -mem-path provided RAM.
> 
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> Reviewed-by: David Hildenbrand <david@redhat.com>
> ---
> v3:
>   fixup, typo in commit msg (Philippe Mathieu-Daudé <philmd@redhat.com>)
> v2:
>   * s/qemu_mempath_getpagesize/qemu_getrampagesiz/ and drop the rest of changes
>           David Hildenbrand <david@redhat.com>
> ---
>  target/s390x/kvm.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
> index 2ebf26a..90766fa 100644
> --- a/target/s390x/kvm.c
> +++ b/target/s390x/kvm.c
> @@ -287,7 +287,7 @@ void kvm_s390_crypto_reset(void)
>  
>  static int kvm_s390_configure_mempath_backing(KVMState *s)
>  {
> -    size_t path_psize = qemu_mempath_getpagesize(mem_path);
> +    size_t path_psize = qemu_getrampagesize();
>  
>      if (path_psize == 4 * KiB) {
>          return 0;
> @@ -319,7 +319,7 @@ int kvm_arch_init(MachineState *ms, KVMState *s)
>  {
>      MachineClass *mc = MACHINE_GET_CLASS(ms);
>  
> -    if (mem_path && kvm_s390_configure_mempath_backing(s)) {
> +    if (kvm_s390_configure_mempath_backing(s)) {
>          return -EINVAL;
>      }
>  

This needs an #include "exec/ram_addr.h", or the compilation fails.

Should I fix it up while applying, or will you resend?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Qemu-devel] [PATCH v3] s390x: remove direct reference to mem_path global form s390x code
  2019-01-29 12:39     ` Cornelia Huck
@ 2019-01-29 14:43       ` Igor Mammedov
  0 siblings, 0 replies; 6+ messages in thread
From: Igor Mammedov @ 2019-01-29 14:43 UTC (permalink / raw)
  To: Cornelia Huck
  Cc: qemu-devel, pasic, borntraeger, qemu-s390x, rth, david, philmd

On Tue, 29 Jan 2019 13:39:31 +0100
Cornelia Huck <cohuck@redhat.com> wrote:

> On Mon, 28 Jan 2019 16:32:38 +0100
> Igor Mammedov <imammedo@redhat.com> wrote:
> 
> In the subject: s/form/from/
> 
> > I plan to deprecate -mem-path option and replace it with memory-backend,
> > for that it's necessary to get rid of mem_path global variable.
> > Do it for s390x case, replacing it with alternative way to enable
> > 1Mb hugepages capability.
> > 
> > To do that, replace qemu_mempath_getpagesize() with qemu_getrampagesize()
> > which also checks for -mem-path provided RAM.
> > 
> > Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> > Reviewed-by: David Hildenbrand <david@redhat.com>
> > ---
> > v3:
> >   fixup, typo in commit msg (Philippe Mathieu-Daudé <philmd@redhat.com>)
> > v2:
> >   * s/qemu_mempath_getpagesize/qemu_getrampagesiz/ and drop the rest of changes
> >           David Hildenbrand <david@redhat.com>
> > ---
> >  target/s390x/kvm.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
> > index 2ebf26a..90766fa 100644
> > --- a/target/s390x/kvm.c
> > +++ b/target/s390x/kvm.c
> > @@ -287,7 +287,7 @@ void kvm_s390_crypto_reset(void)
> >  
> >  static int kvm_s390_configure_mempath_backing(KVMState *s)
> >  {
> > -    size_t path_psize = qemu_mempath_getpagesize(mem_path);
> > +    size_t path_psize = qemu_getrampagesize();
> >  
> >      if (path_psize == 4 * KiB) {
> >          return 0;
> > @@ -319,7 +319,7 @@ int kvm_arch_init(MachineState *ms, KVMState *s)
> >  {
> >      MachineClass *mc = MACHINE_GET_CLASS(ms);
> >  
> > -    if (mem_path && kvm_s390_configure_mempath_backing(s)) {
> > +    if (kvm_s390_configure_mempath_backing(s)) {
> >          return -EINVAL;
> >      }
> >    
> 
> This needs an #include "exec/ram_addr.h", or the compilation fails.
> 
> Should I fix it up while applying, or will you resend?

I'll resend

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-01-29 15:03 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-01-28 12:31 [Qemu-devel] [PATCH v2] s390x: remove direct reference to mem_path global form s390x code Igor Mammedov
2019-01-28 12:46 ` David Hildenbrand
2019-01-28 14:55 ` Philippe Mathieu-Daudé
2019-01-28 15:32   ` [Qemu-devel] [PATCH v3] " Igor Mammedov
2019-01-29 12:39     ` Cornelia Huck
2019-01-29 14:43       ` Igor Mammedov

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.