|
|
4ec855 |
From 7e78c8e8b5a9cab9ef4604dc29eab4b4323e9b9b Mon Sep 17 00:00:00 2001
|
|
|
4ec855 |
From: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
4ec855 |
Date: Tue, 13 Aug 2019 01:53:55 +0100
|
|
|
4ec855 |
Subject: [PATCH 01/21] i386: Don't print warning if phys-bits was set
|
|
|
4ec855 |
automatically
|
|
|
4ec855 |
|
|
|
4ec855 |
RH-Author: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
4ec855 |
Message-id: <20190813015355.17556-1-ehabkost@redhat.com>
|
|
|
4ec855 |
Patchwork-id: 89946
|
|
|
4ec855 |
O-Subject: [RHEL-8.1.0 qemu-kvm PATCH] i386: Don't print warning if phys-bits was set automatically
|
|
|
4ec855 |
Bugzilla: 1719127
|
|
|
4ec855 |
RH-Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
4ec855 |
RH-Acked-by: Igor Mammedov <imammedo@redhat.com>
|
|
|
4ec855 |
RH-Acked-by: John Snow <jsnow@redhat.com>
|
|
|
4ec855 |
|
|
|
4ec855 |
BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1719127
|
|
|
4ec855 |
BRANCH: rhel-8.1.0
|
|
|
4ec855 |
UPSTREAM: fea306520ea4b2f189dd23c70a6afd2fc4ffafdc
|
|
|
4ec855 |
BREW: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=23026463
|
|
|
4ec855 |
|
|
|
4ec855 |
If cpu->host_phys_bits_limit is set, QEMU will make
|
|
|
4ec855 |
cpu->phys_bits be lower than host_phys_bits on some cases. This
|
|
|
4ec855 |
triggers a warning that was supposed to be printed only if
|
|
|
4ec855 |
phys-bits was explicitly set in the command-line.
|
|
|
4ec855 |
|
|
|
4ec855 |
Reorder the code so the value of cpu->phys_bits is validated
|
|
|
4ec855 |
before the cpu->host_phys_bits handling. This will avoid
|
|
|
4ec855 |
unexpected warnings when cpu->host_phys_bits_limit is set.
|
|
|
4ec855 |
|
|
|
4ec855 |
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
4ec855 |
Message-Id: <20190611205420.20286-1-ehabkost@redhat.com>
|
|
|
4ec855 |
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
|
|
|
4ec855 |
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
4ec855 |
(cherry picked from commit fea306520ea4b2f189dd23c70a6afd2fc4ffafdc)
|
|
|
4ec855 |
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
|
|
|
4ec855 |
Signed-off-by: Danilo C. L. de Paula <ddepaula@redhat.com>
|
|
|
4ec855 |
---
|
|
|
4ec855 |
target/i386/cpu.c | 18 +++++++++---------
|
|
|
4ec855 |
1 file changed, 9 insertions(+), 9 deletions(-)
|
|
|
4ec855 |
|
|
|
4ec855 |
diff --git a/target/i386/cpu.c b/target/i386/cpu.c
|
|
|
4ec855 |
index c8f50a7..c69116c 100644
|
|
|
4ec855 |
--- a/target/i386/cpu.c
|
|
|
4ec855 |
+++ b/target/i386/cpu.c
|
|
|
4ec855 |
@@ -5116,15 +5116,6 @@ static void x86_cpu_realizefn(DeviceState *dev, Error **errp)
|
|
|
4ec855 |
uint32_t host_phys_bits = x86_host_phys_bits();
|
|
|
4ec855 |
static bool warned;
|
|
|
4ec855 |
|
|
|
4ec855 |
- if (cpu->host_phys_bits) {
|
|
|
4ec855 |
- /* The user asked for us to use the host physical bits */
|
|
|
4ec855 |
- cpu->phys_bits = host_phys_bits;
|
|
|
4ec855 |
- if (cpu->host_phys_bits_limit &&
|
|
|
4ec855 |
- cpu->phys_bits > cpu->host_phys_bits_limit) {
|
|
|
4ec855 |
- cpu->phys_bits = cpu->host_phys_bits_limit;
|
|
|
4ec855 |
- }
|
|
|
4ec855 |
- }
|
|
|
4ec855 |
-
|
|
|
4ec855 |
/* Print a warning if the user set it to a value that's not the
|
|
|
4ec855 |
* host value.
|
|
|
4ec855 |
*/
|
|
|
4ec855 |
@@ -5136,6 +5127,15 @@ static void x86_cpu_realizefn(DeviceState *dev, Error **errp)
|
|
|
4ec855 |
warned = true;
|
|
|
4ec855 |
}
|
|
|
4ec855 |
|
|
|
4ec855 |
+ if (cpu->host_phys_bits) {
|
|
|
4ec855 |
+ /* The user asked for us to use the host physical bits */
|
|
|
4ec855 |
+ cpu->phys_bits = host_phys_bits;
|
|
|
4ec855 |
+ if (cpu->host_phys_bits_limit &&
|
|
|
4ec855 |
+ cpu->phys_bits > cpu->host_phys_bits_limit) {
|
|
|
4ec855 |
+ cpu->phys_bits = cpu->host_phys_bits_limit;
|
|
|
4ec855 |
+ }
|
|
|
4ec855 |
+ }
|
|
|
4ec855 |
+
|
|
|
4ec855 |
if (cpu->phys_bits &&
|
|
|
4ec855 |
(cpu->phys_bits > TARGET_PHYS_ADDR_SPACE_BITS ||
|
|
|
4ec855 |
cpu->phys_bits < 32)) {
|
|
|
4ec855 |
--
|
|
|
4ec855 |
1.8.3.1
|
|
|
4ec855 |
|