[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL v6 21/42] i386: Don't print warning if phys-bits was
From: |
Eduardo Habkost |
Subject: |
[Qemu-devel] [PULL v6 21/42] i386: Don't print warning if phys-bits was set automatically |
Date: |
Fri, 5 Jul 2019 19:14:43 -0300 |
If cpu->host_phys_bits_limit is set, QEMU will make
cpu->phys_bits be lower than host_phys_bits on some cases. This
triggers a warning that was supposed to be printed only if
phys-bits was explicitly set in the command-line.
Reorder the code so the value of cpu->phys_bits is validated
before the cpu->host_phys_bits handling. This will avoid
unexpected warnings when cpu->host_phys_bits_limit is set.
Signed-off-by: Eduardo Habkost <address@hidden>
Message-Id: <address@hidden>
Reviewed-by: Dr. David Alan Gilbert <address@hidden>
Signed-off-by: Eduardo Habkost <address@hidden>
---
target/i386/cpu.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
index de1a469ae9..f538b54150 100644
--- a/target/i386/cpu.c
+++ b/target/i386/cpu.c
@@ -5293,15 +5293,6 @@ static void x86_cpu_realizefn(DeviceState *dev, Error
**errp)
uint32_t host_phys_bits = x86_host_phys_bits();
static bool warned;
- if (cpu->host_phys_bits) {
- /* The user asked for us to use the host physical bits */
- cpu->phys_bits = host_phys_bits;
- if (cpu->host_phys_bits_limit &&
- cpu->phys_bits > cpu->host_phys_bits_limit) {
- cpu->phys_bits = cpu->host_phys_bits_limit;
- }
- }
-
/* Print a warning if the user set it to a value that's not the
* host value.
*/
@@ -5313,6 +5304,15 @@ static void x86_cpu_realizefn(DeviceState *dev, Error
**errp)
warned = true;
}
+ if (cpu->host_phys_bits) {
+ /* The user asked for us to use the host physical bits */
+ cpu->phys_bits = host_phys_bits;
+ if (cpu->host_phys_bits_limit &&
+ cpu->phys_bits > cpu->host_phys_bits_limit) {
+ cpu->phys_bits = cpu->host_phys_bits_limit;
+ }
+ }
+
if (cpu->phys_bits &&
(cpu->phys_bits > TARGET_PHYS_ADDR_SPACE_BITS ||
cpu->phys_bits < 32)) {
--
2.18.0.rc1.1.g3f1ff2140
- Re: [Qemu-devel] [PULL v6 10/42] vl.c: Replace smp global variables with smp machine properties, (continued)
- [Qemu-devel] [PULL v6 13/42] i386/cpu: Consolidate die-id validity in smp context, Eduardo Habkost, 2019/07/05
- [Qemu-devel] [PULL v6 08/42] hw/arm: Replace global smp variables with machine smp properties, Eduardo Habkost, 2019/07/05
- [Qemu-devel] [PULL v6 11/42] i386: Add die-level cpu topology to x86CPU on PCMachine, Eduardo Habkost, 2019/07/05
- [Qemu-devel] [PULL v6 16/42] machine: show if CLI option '-numa node, mem' is supported in QAPI schema, Eduardo Habkost, 2019/07/05
- [Qemu-devel] [PULL v6 15/42] pc: fix possible NULL pointer dereference in pc_machine_get_device_memory_region_size(), Eduardo Habkost, 2019/07/05
- [Qemu-devel] [PULL v6 14/42] i386: Update new x86_apicid parsing rules with die_offset support, Eduardo Habkost, 2019/07/05
- [Qemu-devel] [PULL v6 17/42] numa: deprecate 'mem' parameter of '-numa node' option, Eduardo Habkost, 2019/07/05
- [Qemu-devel] [PULL v6 18/42] numa: deprecate implict memory distribution between nodes, Eduardo Habkost, 2019/07/05
- [Qemu-devel] [PULL v6 19/42] hppa: Delete unused hppa_cpu_list() function, Eduardo Habkost, 2019/07/05
- [Qemu-devel] [PULL v6 21/42] i386: Don't print warning if phys-bits was set automatically,
Eduardo Habkost <=
- [Qemu-devel] [PULL v6 22/42] i386: Fix signedness of hyperv_spinlock_attempts, Eduardo Habkost, 2019/07/05
- [Qemu-devel] [PULL v6 24/42] x86/cpu: use FeatureWordArray to define filtered_features, Eduardo Habkost, 2019/07/05
- [Qemu-devel] [PULL v6 23/42] i386: make 'hv-spinlocks' a regular uint32 property, Eduardo Habkost, 2019/07/05
- [Qemu-devel] [PULL v6 25/42] i386: Remove unused host_cpudef variable, Eduardo Habkost, 2019/07/05
- [Qemu-devel] [PULL v6 26/42] target/i386: Add CPUID.1F generation support for multi-dies PCMachine, Eduardo Habkost, 2019/07/05
- [Qemu-devel] [PULL v6 20/42] deprecate -mem-path fallback to anonymous RAM, Eduardo Habkost, 2019/07/05
- [Qemu-devel] [PULL v6 27/42] machine: Refactor smp_parse() in vl.c as MachineClass::smp_parse(), Eduardo Habkost, 2019/07/05
- [Qemu-devel] [PULL v6 28/42] vl.c: Add -smp, dies=* command line support and update doc, Eduardo Habkost, 2019/07/05
- [Qemu-devel] [PULL v6 29/42] qmp: Add deprecation information to query-machines, Eduardo Habkost, 2019/07/05