QEMU-Devel Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH for-5.0] arm:virt: fix broken IPA range with KVM enabled
@ 2020-03-26 11:28 Igor Mammedov
  2020-03-26 11:39 ` Auger Eric
  0 siblings, 1 reply; 2+ messages in thread
From: Igor Mammedov @ 2020-03-26 11:28 UTC (permalink / raw)
  To: qemu-devel
  Cc: peter.maydell, drjones, gshan, shameerali.kolothum.thodi,
	eric.auger, pbonzini

Commit a1b18df9a4848, broke virt_kvm_type() logic, which depends on
maxram_size, ram_size, ram_slots being parsed/set on machine instance
at the time accelerator (KVM) is initialized.

set_memory_options() part was already reverted by commit 2a7b18a3205b,
so revert remaining initialization of above machine fields to make
virt_kvm_type() work as it used to.

Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Reported-by: Auger Eric <eric.auger@redhat.com>
---
 softmmu/vl.c | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/softmmu/vl.c b/softmmu/vl.c
index 814537bb42..132c6e73dc 100644
--- a/softmmu/vl.c
+++ b/softmmu/vl.c
@@ -4137,6 +4137,9 @@ void qemu_init(int argc, char **argv, char **envp)
     machine_opts = qemu_get_machine_opts();
     qemu_opt_foreach(machine_opts, machine_set_property, current_machine,
                      &error_fatal);
+    current_machine->ram_size = ram_size;
+    current_machine->maxram_size = maxram_size;
+    current_machine->ram_slots = ram_slots;
 
     /*
      * Note: uses machine properties such as kernel-irqchip, must run
@@ -4315,10 +4318,6 @@ void qemu_init(int argc, char **argv, char **envp)
         }
     }
 
-    current_machine->ram_size = ram_size;
-    current_machine->maxram_size = maxram_size;
-    current_machine->ram_slots = ram_slots;
-
     parse_numa_opts(current_machine);
 
     if (machine_class->default_ram_id && current_machine->ram_size &&
-- 
2.18.1



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

* Re: [PATCH for-5.0] arm:virt: fix broken IPA range with KVM enabled
  2020-03-26 11:28 [PATCH for-5.0] arm:virt: fix broken IPA range with KVM enabled Igor Mammedov
@ 2020-03-26 11:39 ` Auger Eric
  0 siblings, 0 replies; 2+ messages in thread
From: Auger Eric @ 2020-03-26 11:39 UTC (permalink / raw)
  To: Igor Mammedov, qemu-devel
  Cc: peter.maydell, drjones, gshan, shameerali.kolothum.thodi, pbonzini

Hi Igor,

On 3/26/20 12:28 PM, Igor Mammedov wrote:
> Commit a1b18df9a4848, broke virt_kvm_type() logic, which depends on
> maxram_size, ram_size, ram_slots being parsed/set on machine instance
> at the time accelerator (KVM) is initialized.
> 
> set_memory_options() part was already reverted by commit 2a7b18a3205b,
> so revert remaining initialization of above machine fields to make
> virt_kvm_type() work as it used to.
Oh I did not notice set_memory_options() change was already reverted.
> 
> Signed-off-by: Igor Mammedov <imammedo@redhat.com>
> Reported-by: Auger Eric <eric.auger@redhat.com>
Reviewed-by: Eric Auger <eric.auger@redhat.com>
Tested-by: Eric Auger <eric.auger@redhat.com>


> ---
>  softmmu/vl.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/softmmu/vl.c b/softmmu/vl.c
> index 814537bb42..132c6e73dc 100644
> --- a/softmmu/vl.c
> +++ b/softmmu/vl.c
> @@ -4137,6 +4137,9 @@ void qemu_init(int argc, char **argv, char **envp)
>      machine_opts = qemu_get_machine_opts();
>      qemu_opt_foreach(machine_opts, machine_set_property, current_machine,
>                       &error_fatal);
> +    current_machine->ram_size = ram_size;
> +    current_machine->maxram_size = maxram_size;
> +    current_machine->ram_slots = ram_slots;

Nit: Before configure_accelerators() call there is a comment stating
that configure_accelerators uses machine properties and must be called
after machine_set_property. Maybe we should add it also uses memory
properties and should be called after set_memory_options. This may avoid
other changes of the same style.

Thanks

Eric
>  
>      /*
>       * Note: uses machine properties such as kernel-irqchip, must run
> @@ -4315,10 +4318,6 @@ void qemu_init(int argc, char **argv, char **envp)
>          }
>      }
>  
> -    current_machine->ram_size = ram_size;
> -    current_machine->maxram_size = maxram_size;
> -    current_machine->ram_slots = ram_slots;
> -
>      parse_numa_opts(current_machine);
>  
>      if (machine_class->default_ram_id && current_machine->ram_size &&
> 



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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-26 11:28 [PATCH for-5.0] arm:virt: fix broken IPA range with KVM enabled Igor Mammedov
2020-03-26 11:39 ` Auger Eric

QEMU-Devel Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/qemu-devel/0 qemu-devel/git/0.git
	git clone --mirror https://lore.kernel.org/qemu-devel/1 qemu-devel/git/1.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 qemu-devel qemu-devel/ https://lore.kernel.org/qemu-devel \
		qemu-devel@nongnu.org
	public-inbox-index qemu-devel

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.nongnu.qemu-devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git