All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05
@ 2017-10-05 20:36 Eduardo Habkost
  2017-10-05 20:36 ` [Qemu-devel] [PULL 1/9] hw/acpi-build: Make assignment statement of next_base easy to read Eduardo Habkost
                   ` (9 more replies)
  0 siblings, 10 replies; 26+ messages in thread
From: Eduardo Habkost @ 2017-10-05 20:36 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel

The following changes since commit d8f932cc696250cb740240d668b39df5fbb2d5a0:

  Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging (2017-10-05 16:54:29 +0100)

are available in the git repository at:

  git://github.com/ehabkost/qemu.git tags/x86-and-machine-pull-request

for you to fetch changes up to 7d7e9c4fd6873d9624956cbe0a5cbfae59b7f8af:

  x86: Correct translation of some rdgsbase and wrgsbase encodings (2017-10-05 17:30:06 -0300)

----------------------------------------------------------------
x86 and machine queue, 2017-10-05

Includes x86, NUMA, ACPI, QOM, CPU, and option/config parsing
patches.

Highlights:
* Deprecation of -nodefconfig option;
* MachineClass::valid_cpu_types field.

----------------------------------------------------------------

Alistair Francis (1):
  machine: Add a valid_cpu_types property

Dou Liyang (2):
  hw/acpi-build: Make assignment statement of next_base easy to read
  ACPI/unit-test: Add a new testcase for RAM allocation in numa node

Eduardo Habkost (3):
  vl: Eliminate defconfig variable
  qemu-options: Deprecate -nodefconfig
  config: qemu_config_parse() return number of config groups

Igor Mammedov (1):
  qom: update doc comment for type_register[_static]()

Philippe Mathieu-Daudé (1):
  qom/cpu: move cpu_model null check to cpu_class_by_name()

Todd Eisenberger (1):
  x86: Correct translation of some rdgsbase and wrgsbase encodings

 include/hw/boards.h                   |   1 +
 include/qom/object.h                  |   4 ++--
 block/blkdebug.c                      |   1 -
 hw/core/machine.c                     |  32 ++++++++++++++++++++++++++++++++
 hw/i386/acpi-build.c                  |   2 +-
 qom/cpu.c                             |   7 ++++++-
 target/alpha/cpu.c                    |   6 +-----
 target/arm/cpu.c                      |   4 ----
 target/cris/cpu.c                     |   4 ----
 target/i386/translate.c               |   4 ++--
 target/lm32/cpu.c                     |   4 ----
 target/m68k/cpu.c                     |   4 ----
 target/mips/cpu.c                     |   4 ----
 target/moxie/cpu.c                    |   8 +-------
 target/openrisc/cpu.c                 |   4 ----
 target/sh4/cpu.c                      |   3 ---
 target/sparc/cpu.c                    |   4 ----
 target/tricore/cpu.c                  |   4 ----
 target/unicore32/cpu.c                |   4 ----
 target/xtensa/cpu.c                   |   4 ----
 tests/bios-tables-test.c              |  24 ++++++++++++++++++++++++
 util/qemu-config.c                    |  15 +++++++--------
 vl.c                                  |   5 +----
 qemu-doc.texi                         |   4 ++++
 qemu-options.hx                       |  17 ++++-------------
 tests/acpi-test-data/pc/DSDT.numamem  | Bin 0 -> 5104 bytes
 tests/acpi-test-data/pc/SRAT.numamem  | Bin 0 -> 224 bytes
 tests/acpi-test-data/q35/DSDT.numamem | Bin 0 -> 7788 bytes
 tests/acpi-test-data/q35/SRAT.numamem | Bin 0 -> 224 bytes
 29 files changed, 86 insertions(+), 87 deletions(-)
 create mode 100644 tests/acpi-test-data/pc/DSDT.numamem
 create mode 100644 tests/acpi-test-data/pc/SRAT.numamem
 create mode 100644 tests/acpi-test-data/q35/DSDT.numamem
 create mode 100644 tests/acpi-test-data/q35/SRAT.numamem

-- 
2.13.6

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

* [Qemu-devel] [PULL 1/9] hw/acpi-build: Make assignment statement of next_base easy to read
  2017-10-05 20:36 [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05 Eduardo Habkost
@ 2017-10-05 20:36 ` Eduardo Habkost
  2017-11-28 15:07   ` Igor Mammedov
  2017-10-05 20:36 ` [Qemu-devel] [PULL 2/9] ACPI/unit-test: Add a new testcase for RAM allocation in numa node Eduardo Habkost
                   ` (8 subsequent siblings)
  9 siblings, 1 reply; 26+ messages in thread
From: Eduardo Habkost @ 2017-10-05 20:36 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel, Dou Liyang

From: Dou Liyang <douly.fnst@cn.fujitsu.com>

It may be hard to read the assignment statement of "next_base", so

S/next_base += (1ULL << 32) - pcms->below_4g_mem_size;
 /next_base = mem_base + mem_len;

... for readability.

No functionality change.

Signed-off-by: Dou Liyang <douly.fnst@cn.fujitsu.com>
Message-Id: <1504231805-30957-3-git-send-email-douly.fnst@cn.fujitsu.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 hw/i386/acpi-build.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
index 2af37a9129..73e3443bce 100644
--- a/hw/i386/acpi-build.c
+++ b/hw/i386/acpi-build.c
@@ -2381,7 +2381,7 @@ build_srat(GArray *table_data, BIOSLinker *linker, MachineState *machine)
             }
             mem_base = 1ULL << 32;
             mem_len = next_base - pcms->below_4g_mem_size;
-            next_base += (1ULL << 32) - pcms->below_4g_mem_size;
+            next_base = mem_base + mem_len;
         }
         numamem = acpi_data_push(table_data, sizeof *numamem);
         build_srat_memory(numamem, mem_base, mem_len, i - 1,
-- 
2.13.6

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

* [Qemu-devel] [PULL 2/9] ACPI/unit-test: Add a new testcase for RAM allocation in numa node
  2017-10-05 20:36 [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05 Eduardo Habkost
  2017-10-05 20:36 ` [Qemu-devel] [PULL 1/9] hw/acpi-build: Make assignment statement of next_base easy to read Eduardo Habkost
@ 2017-10-05 20:36 ` Eduardo Habkost
  2017-11-28 15:08   ` Igor Mammedov
  2017-10-05 20:36 ` [Qemu-devel] [PULL 3/9] qom/cpu: move cpu_model null check to cpu_class_by_name() Eduardo Habkost
                   ` (7 subsequent siblings)
  9 siblings, 1 reply; 26+ messages in thread
From: Eduardo Habkost @ 2017-10-05 20:36 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel, Dou Liyang

From: Dou Liyang <douly.fnst@cn.fujitsu.com>

As QEMU supports the memory-less node, it is possible that there is
no RAM in the first numa node(also be called as node0). eg:
  ... \
  -m 128,slots=3,maxmem=1G \
  -numa node -numa node,mem=128M \

But, this makes it hard for QEMU to build a known-to-work ACPI SRAT
table. Only fixing it is not enough.

Add a testcase for this situation to make sure the ACPI table is
correct for guest.

Suggested-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Dou Liyang <douly.fnst@cn.fujitsu.com>
Message-Id: <1504231805-30957-4-git-send-email-douly.fnst@cn.fujitsu.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 tests/bios-tables-test.c              |  24 ++++++++++++++++++++++++
 tests/acpi-test-data/pc/DSDT.numamem  | Bin 0 -> 5104 bytes
 tests/acpi-test-data/pc/SRAT.numamem  | Bin 0 -> 224 bytes
 tests/acpi-test-data/q35/DSDT.numamem | Bin 0 -> 7788 bytes
 tests/acpi-test-data/q35/SRAT.numamem | Bin 0 -> 224 bytes
 5 files changed, 24 insertions(+)
 create mode 100644 tests/acpi-test-data/pc/DSDT.numamem
 create mode 100644 tests/acpi-test-data/pc/SRAT.numamem
 create mode 100644 tests/acpi-test-data/q35/DSDT.numamem
 create mode 100644 tests/acpi-test-data/q35/SRAT.numamem

diff --git a/tests/bios-tables-test.c b/tests/bios-tables-test.c
index 564da45f65..f0923152ff 100644
--- a/tests/bios-tables-test.c
+++ b/tests/bios-tables-test.c
@@ -808,6 +808,28 @@ static void test_acpi_piix4_tcg_memhp(void)
     free_test_data(&data);
 }
 
+static void test_acpi_q35_tcg_numamem(void)
+{
+    test_data data;
+
+    memset(&data, 0, sizeof(data));
+    data.machine = MACHINE_Q35;
+    data.variant = ".numamem";
+    test_acpi_one(" -numa node -numa node,mem=128", &data);
+    free_test_data(&data);
+}
+
+static void test_acpi_piix4_tcg_numamem(void)
+{
+    test_data data;
+
+    memset(&data, 0, sizeof(data));
+    data.machine = MACHINE_PC;
+    data.variant = ".numamem";
+    test_acpi_one(" -numa node -numa node,mem=128", &data);
+    free_test_data(&data);
+}
+
 int main(int argc, char *argv[])
 {
     const char *arch = qtest_get_arch();
@@ -830,6 +852,8 @@ int main(int argc, char *argv[])
         qtest_add_func("acpi/q35/cpuhp", test_acpi_q35_tcg_cphp);
         qtest_add_func("acpi/piix4/memhp", test_acpi_piix4_tcg_memhp);
         qtest_add_func("acpi/q35/memhp", test_acpi_q35_tcg_memhp);
+        qtest_add_func("acpi/piix4/numamem", test_acpi_piix4_tcg_numamem);
+        qtest_add_func("acpi/q35/numamem", test_acpi_q35_tcg_numamem);
     }
     ret = g_test_run();
     boot_sector_cleanup(disk);
diff --git a/tests/acpi-test-data/pc/DSDT.numamem b/tests/acpi-test-data/pc/DSDT.numamem
new file mode 100644
index 0000000000000000000000000000000000000000..bc703d77ee48720af1b801c518b43511c95c852d
GIT binary patch
literal 5104
zcmb7IZExE~5}qX~n_5aXWizjC8^LKVXmL&SlDFc3gC$b76k9SQ%DEh9oG8b|DMfK1
z(gvt&6i`&ab^ERG<!~RBK%e8E(EADf3B7-C=%I~2Rh=QVvMQTEE5Ovw&ckPBc4uct
zwj8VRzj**QUtBlKPP+KOHZ7cE06=5<)+@>;xE-sw(qx*XF!z}jjPX%ajXzq&jTQFq
zw)Zd3`{YZHwS3rmsXyOp`CsgNTR@<vTR!JB&=;FdvFUafY_pP4o8^j?D166dwOO$0
zpf)!u7SpS0h$*RMyVMXMh9Fd<8)dsug#^HNKWm`4&vcUK@0V&;+OAv8v~jEHGz#F;
zjOWu->obq*UN7;@fd>bkHW>7wH}lOw3;x+kz<+;?^`Xya)uvf@QYk*O7srT^929^Z
z(63x0Z^&J@d%=E?%?G|FWMJruoz0sP@PWP*8-tlj#VIsH94;*3Ze&b}dmP>U!{4qE
z3%v<Yz7ErCcB#hT4#;MK2C`YiFWtO!T^5Fk&F#KdZ<t6LE}4dlMgE@WXI7XGKIqaS
zuod<Mo`5v918(>BYS9|OW!Z=at1=2Sc+mq77{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q8N(w!)RDDYBORH;gF4iaz1yUl-ECua#am?0
z!2>5`yhl(z*5hrm=it#1dTbU@KGy3b;~^0GbRZw=mq^BR7Wz&gAM1mNF)@W6FOxmT
z9Me<Om|`P6#chr0DRNAfkv>iGn0^Um-1d>aLo(`(OVoJae}w3#J#8W0bsKCru(<pS
DEH%hI

literal 0
HcmV?d00001

diff --git a/tests/acpi-test-data/pc/SRAT.numamem b/tests/acpi-test-data/pc/SRAT.numamem
new file mode 100644
index 0000000000000000000000000000000000000000..dbc595d9cb85d3fcb5a4243153f42bb431c9de8f
GIT binary patch
literal 224
zcmWFzatwLEz`(%x#mV2<BUr&HBEUHqD8>jB1F=Cg2*ZH@DxXmUE`z~9*2k!U%mXRq
Yf~!ZCL8t>-1O^}2VG2>z!9?-X08OU~0RR91

literal 0
HcmV?d00001

diff --git a/tests/acpi-test-data/q35/DSDT.numamem b/tests/acpi-test-data/q35/DSDT.numamem
new file mode 100644
index 0000000000000000000000000000000000000000..fcb18d947b28c09c8b5a4fa65692efb41ef3a5d9
GIT binary patch
literal 7788
zcmb7JTW=f38J#7U)M~kumeR`dU4ruvv}j_=PLrZV1CzVFRiZ?Zbew<!xOS6Pj)R8q
z1xRWHkQ5*nKNLvR27ROh{g3!3<gEt!)Ym>0D2nJQ>iNFm$TLd{i1<M6nLTH|IkT6u
z+=)6-_k+tqSpO++g!RsH`R!I1q0JIP&^G=04SP%UcA|2vZ{<?9)!WVSHonSE@QbK?
zvu6E$JN_n)AATNNw+G_RxBlPm+#Y=TMSMpP>Cv5m>(Yk5>h?S3es3>yTVbQ<^y`ht
zD}C=ePCt}eX{TR`+QRAIY(!SDHr3zgg!YqrB8+aW4A(RJ+l6`8?=}B<{fDKCH@>;`
zu=MP=|M<g`d#(+_HT*jGy*{9?_;Ktm#Y6w={kzsDB<FoA!}+iGdADryY0n_0mZzR<
zqOMjB?)gnej<w>{Ta~UFtA!C_Y?zOFtJ@Tw5a0ip6LxRcCp`aFWj$JMwWI!W@Or<~
z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$g4~pQ^T8cg%H)MJ%|{3T<!i=bhrOB*5%g0*TRCiLm5G8`spvb>7If!u78B
EKkzjyY5)KL

literal 0
HcmV?d00001

diff --git a/tests/acpi-test-data/q35/SRAT.numamem b/tests/acpi-test-data/q35/SRAT.numamem
new file mode 100644
index 0000000000000000000000000000000000000000..dbc595d9cb85d3fcb5a4243153f42bb431c9de8f
GIT binary patch
literal 224
zcmWFzatwLEz`(%x#mV2<BUr&HBEUHqD8>jB1F=Cg2*ZH@DxXmUE`z~9*2k!U%mXRq
Yf~!ZCL8t>-1O^}2VG2>z!9?-X08OU~0RR91

literal 0
HcmV?d00001

-- 
2.13.6

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

* [Qemu-devel] [PULL 3/9] qom/cpu: move cpu_model null check to cpu_class_by_name()
  2017-10-05 20:36 [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05 Eduardo Habkost
  2017-10-05 20:36 ` [Qemu-devel] [PULL 1/9] hw/acpi-build: Make assignment statement of next_base easy to read Eduardo Habkost
  2017-10-05 20:36 ` [Qemu-devel] [PULL 2/9] ACPI/unit-test: Add a new testcase for RAM allocation in numa node Eduardo Habkost
@ 2017-10-05 20:36 ` Eduardo Habkost
  2017-10-05 20:36 ` [Qemu-devel] [PULL 4/9] machine: Add a valid_cpu_types property Eduardo Habkost
                   ` (6 subsequent siblings)
  9 siblings, 0 replies; 26+ messages in thread
From: Eduardo Habkost @ 2017-10-05 20:36 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel, Philippe Mathieu-Daudé

From: Philippe Mathieu-Daudé <f4bug@amsat.org>

and clean every implementation.

Suggested-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-Id: <20170917232842.14544-1-f4bug@amsat.org>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Reviewed-by: Artyom Tarasenko <atar4qemu@gmail.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 qom/cpu.c              | 7 ++++++-
 target/alpha/cpu.c     | 6 +-----
 target/arm/cpu.c       | 4 ----
 target/cris/cpu.c      | 4 ----
 target/lm32/cpu.c      | 4 ----
 target/m68k/cpu.c      | 4 ----
 target/mips/cpu.c      | 4 ----
 target/moxie/cpu.c     | 8 +-------
 target/openrisc/cpu.c  | 4 ----
 target/sh4/cpu.c       | 3 ---
 target/sparc/cpu.c     | 4 ----
 target/tricore/cpu.c   | 4 ----
 target/unicore32/cpu.c | 4 ----
 target/xtensa/cpu.c    | 4 ----
 14 files changed, 8 insertions(+), 56 deletions(-)

diff --git a/qom/cpu.c b/qom/cpu.c
index 94fa8fe005..54c9452b1c 100644
--- a/qom/cpu.c
+++ b/qom/cpu.c
@@ -316,7 +316,12 @@ static bool cpu_common_has_work(CPUState *cs)
 
 ObjectClass *cpu_class_by_name(const char *typename, const char *cpu_model)
 {
-    CPUClass *cc = CPU_CLASS(object_class_by_name(typename));
+    CPUClass *cc;
+
+    if (!cpu_model) {
+        return NULL;
+    }
+    cc = CPU_CLASS(object_class_by_name(typename));
 
     return cc->class_by_name(cpu_model);
 }
diff --git a/target/alpha/cpu.c b/target/alpha/cpu.c
index e6c6aabdf0..b8a21f4e01 100644
--- a/target/alpha/cpu.c
+++ b/target/alpha/cpu.c
@@ -127,14 +127,10 @@ static const AlphaCPUAlias alpha_cpu_aliases[] = {
 
 static ObjectClass *alpha_cpu_class_by_name(const char *cpu_model)
 {
-    ObjectClass *oc = NULL;
+    ObjectClass *oc;
     char *typename;
     int i;
 
-    if (cpu_model == NULL) {
-        return NULL;
-    }
-
     oc = object_class_by_name(cpu_model);
     if (oc != NULL && object_class_dynamic_cast(oc, TYPE_ALPHA_CPU) != NULL &&
         !object_class_is_abstract(oc)) {
diff --git a/target/arm/cpu.c b/target/arm/cpu.c
index 4300de66e2..4b81d07b9d 100644
--- a/target/arm/cpu.c
+++ b/target/arm/cpu.c
@@ -913,10 +913,6 @@ static ObjectClass *arm_cpu_class_by_name(const char *cpu_model)
     char *typename;
     char **cpuname;
 
-    if (!cpu_model) {
-        return NULL;
-    }
-
     cpuname = g_strsplit(cpu_model, ",", 1);
     typename = g_strdup_printf(ARM_CPU_TYPE_NAME("%s"), cpuname[0]);
     oc = object_class_by_name(typename);
diff --git a/target/cris/cpu.c b/target/cris/cpu.c
index ceebfed79b..88d93f2d11 100644
--- a/target/cris/cpu.c
+++ b/target/cris/cpu.c
@@ -69,10 +69,6 @@ static ObjectClass *cris_cpu_class_by_name(const char *cpu_model)
     ObjectClass *oc;
     char *typename;
 
-    if (cpu_model == NULL) {
-        return NULL;
-    }
-
 #if defined(CONFIG_USER_ONLY)
     if (strcasecmp(cpu_model, "any") == 0) {
         return object_class_by_name("crisv32-" TYPE_CRIS_CPU);
diff --git a/target/lm32/cpu.c b/target/lm32/cpu.c
index 2b8c36b6d0..bf081f56d2 100644
--- a/target/lm32/cpu.c
+++ b/target/lm32/cpu.c
@@ -246,10 +246,6 @@ static ObjectClass *lm32_cpu_class_by_name(const char *cpu_model)
     ObjectClass *oc;
     char *typename;
 
-    if (cpu_model == NULL) {
-        return NULL;
-    }
-
     typename = g_strdup_printf("%s-" TYPE_LM32_CPU, cpu_model);
     oc = object_class_by_name(typename);
     g_free(typename);
diff --git a/target/m68k/cpu.c b/target/m68k/cpu.c
index 55bf24bae6..8c70e0805c 100644
--- a/target/m68k/cpu.c
+++ b/target/m68k/cpu.c
@@ -87,10 +87,6 @@ static ObjectClass *m68k_cpu_class_by_name(const char *cpu_model)
     ObjectClass *oc;
     char *typename;
 
-    if (cpu_model == NULL) {
-        return NULL;
-    }
-
     typename = g_strdup_printf("%s-" TYPE_M68K_CPU, cpu_model);
     oc = object_class_by_name(typename);
     g_free(typename);
diff --git a/target/mips/cpu.c b/target/mips/cpu.c
index 1a9a3ed94d..c15b894362 100644
--- a/target/mips/cpu.c
+++ b/target/mips/cpu.c
@@ -166,10 +166,6 @@ static ObjectClass *mips_cpu_class_by_name(const char *cpu_model)
     ObjectClass *oc;
     char *typename;
 
-    if (cpu_model == NULL) {
-        return NULL;
-    }
-
     typename = mips_cpu_type_name(cpu_model);
     oc = object_class_by_name(typename);
     g_free(typename);
diff --git a/target/moxie/cpu.c b/target/moxie/cpu.c
index 748d02f29e..30bd44fcad 100644
--- a/target/moxie/cpu.c
+++ b/target/moxie/cpu.c
@@ -89,13 +89,7 @@ static void moxie_cpu_initfn(Object *obj)
 
 static ObjectClass *moxie_cpu_class_by_name(const char *cpu_model)
 {
-    ObjectClass *oc;
-
-    if (cpu_model == NULL) {
-        return NULL;
-    }
-
-    oc = object_class_by_name(cpu_model);
+    ObjectClass *oc = object_class_by_name(cpu_model);
     if (oc != NULL && (!object_class_dynamic_cast(oc, TYPE_MOXIE_CPU) ||
                        object_class_is_abstract(oc))) {
         return NULL;
diff --git a/target/openrisc/cpu.c b/target/openrisc/cpu.c
index a979f0bf8b..af9cdcc102 100644
--- a/target/openrisc/cpu.c
+++ b/target/openrisc/cpu.c
@@ -108,10 +108,6 @@ static ObjectClass *openrisc_cpu_class_by_name(const char *cpu_model)
     ObjectClass *oc;
     char *typename;
 
-    if (cpu_model == NULL) {
-        return NULL;
-    }
-
     typename = g_strdup_printf("%s-" TYPE_OPENRISC_CPU, cpu_model);
     oc = object_class_by_name(typename);
     g_free(typename);
diff --git a/target/sh4/cpu.c b/target/sh4/cpu.c
index 6ce7cba5a9..252440e019 100644
--- a/target/sh4/cpu.c
+++ b/target/sh4/cpu.c
@@ -133,9 +133,6 @@ static ObjectClass *superh_cpu_class_by_name(const char *cpu_model)
     ObjectClass *oc;
     GSList *list, *item;
 
-    if (cpu_model == NULL) {
-        return NULL;
-    }
     if (strcasecmp(cpu_model, "any") == 0) {
         return object_class_by_name(TYPE_SH7750R_CPU);
     }
diff --git a/target/sparc/cpu.c b/target/sparc/cpu.c
index 0806d699e6..beab90f3e6 100644
--- a/target/sparc/cpu.c
+++ b/target/sparc/cpu.c
@@ -730,10 +730,6 @@ static ObjectClass *sparc_cpu_class_by_name(const char *cpu_model)
     ObjectClass *oc;
     char *typename;
 
-    if (cpu_model == NULL) {
-        return NULL;
-    }
-
     typename = sparc_cpu_type_name(cpu_model);
     oc = object_class_by_name(typename);
     g_free(typename);
diff --git a/target/tricore/cpu.c b/target/tricore/cpu.c
index 5ab5b56454..871eb35453 100644
--- a/target/tricore/cpu.c
+++ b/target/tricore/cpu.c
@@ -120,10 +120,6 @@ static ObjectClass *tricore_cpu_class_by_name(const char *cpu_model)
     ObjectClass *oc;
     char *typename;
 
-    if (!cpu_model) {
-        return NULL;
-    }
-
     typename = g_strdup_printf("%s-" TYPE_TRICORE_CPU, cpu_model);
     oc = object_class_by_name(typename);
     g_free(typename);
diff --git a/target/unicore32/cpu.c b/target/unicore32/cpu.c
index c9b78ce68e..138acc9dd8 100644
--- a/target/unicore32/cpu.c
+++ b/target/unicore32/cpu.c
@@ -44,10 +44,6 @@ static ObjectClass *uc32_cpu_class_by_name(const char *cpu_model)
     ObjectClass *oc;
     char *typename;
 
-    if (cpu_model == NULL) {
-        return NULL;
-    }
-
     typename = g_strdup_printf("%s-" TYPE_UNICORE32_CPU, cpu_model);
     oc = object_class_by_name(typename);
     g_free(typename);
diff --git a/target/xtensa/cpu.c b/target/xtensa/cpu.c
index 85897df0a8..dcdc765a86 100644
--- a/target/xtensa/cpu.c
+++ b/target/xtensa/cpu.c
@@ -83,10 +83,6 @@ static ObjectClass *xtensa_cpu_class_by_name(const char *cpu_model)
     ObjectClass *oc;
     char *typename;
 
-    if (cpu_model == NULL) {
-        return NULL;
-    }
-
     typename = g_strdup_printf("%s-" TYPE_XTENSA_CPU, cpu_model);
     oc = object_class_by_name(typename);
     g_free(typename);
-- 
2.13.6

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

* [Qemu-devel] [PULL 4/9] machine: Add a valid_cpu_types property
  2017-10-05 20:36 [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05 Eduardo Habkost
                   ` (2 preceding siblings ...)
  2017-10-05 20:36 ` [Qemu-devel] [PULL 3/9] qom/cpu: move cpu_model null check to cpu_class_by_name() Eduardo Habkost
@ 2017-10-05 20:36 ` Eduardo Habkost
  2017-10-05 20:36 ` [Qemu-devel] [PULL 5/9] vl: Eliminate defconfig variable Eduardo Habkost
                   ` (5 subsequent siblings)
  9 siblings, 0 replies; 26+ messages in thread
From: Eduardo Habkost @ 2017-10-05 20:36 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel, Alistair Francis

From: Alistair Francis <alistair.francis@xilinx.com>

This patch add a MachineClass element that can be set in the machine C
code to specify a list of supported CPU types. If the supported CPU
types are specified the user enter CPU (by -cpu at runtime) is checked
against the supported types and QEMU exits if they aren't supported.

Signed-off-by: Alistair Francis <alistair.francis@xilinx.com>
Message-Id: <b8474e9d2e0a219d9bac901342f983b13d009301.1507059418.git.alistair.francis@xilinx.com>
[ehabkost: removed assert(), rewrote comment]
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 include/hw/boards.h |  1 +
 hw/core/machine.c   | 32 ++++++++++++++++++++++++++++++++
 2 files changed, 33 insertions(+)

diff --git a/include/hw/boards.h b/include/hw/boards.h
index 156e0a5701..191a5b3cd8 100644
--- a/include/hw/boards.h
+++ b/include/hw/boards.h
@@ -191,6 +191,7 @@ struct MachineClass {
     bool has_hotpluggable_cpus;
     bool ignore_memory_transaction_failures;
     int numa_mem_align_shift;
+    const char **valid_cpu_types;
     void (*numa_auto_assign_ram)(MachineClass *mc, NodeInfo *nodes,
                                  int nb_nodes, ram_addr_t size);
 
diff --git a/hw/core/machine.c b/hw/core/machine.c
index 80647edc2a..36c2fb069c 100644
--- a/hw/core/machine.c
+++ b/hw/core/machine.c
@@ -758,6 +758,38 @@ void machine_run_board_init(MachineState *machine)
     if (nb_numa_nodes) {
         machine_numa_finish_init(machine);
     }
+
+    /* If the machine supports the valid_cpu_types check and the user
+     * specified a CPU with -cpu check here that the user CPU is supported.
+     */
+    if (machine_class->valid_cpu_types && machine->cpu_type) {
+        ObjectClass *class = object_class_by_name(machine->cpu_type);
+        int i;
+
+        for (i = 0; machine_class->valid_cpu_types[i]; i++) {
+            if (object_class_dynamic_cast(class,
+                                          machine_class->valid_cpu_types[i])) {
+                /* The user specificed CPU is in the valid field, we are
+                 * good to go.
+                 */
+                break;
+            }
+        }
+
+        if (!machine_class->valid_cpu_types[i]) {
+            /* The user specified CPU is not valid */
+            error_report("Invalid CPU type: %s", machine->cpu_type);
+            error_printf("The valid types are: %s",
+                         machine_class->valid_cpu_types[0]);
+            for (i = 1; machine_class->valid_cpu_types[i]; i++) {
+                error_printf(", %s", machine_class->valid_cpu_types[i]);
+            }
+            error_printf("\n");
+
+            exit(1);
+        }
+    }
+
     machine_class->init(machine);
 }
 
-- 
2.13.6

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

* [Qemu-devel] [PULL 5/9] vl: Eliminate defconfig variable
  2017-10-05 20:36 [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05 Eduardo Habkost
                   ` (3 preceding siblings ...)
  2017-10-05 20:36 ` [Qemu-devel] [PULL 4/9] machine: Add a valid_cpu_types property Eduardo Habkost
@ 2017-10-05 20:36 ` Eduardo Habkost
  2017-10-05 20:36 ` [Qemu-devel] [PULL 6/9] qemu-options: Deprecate -nodefconfig Eduardo Habkost
                   ` (4 subsequent siblings)
  9 siblings, 0 replies; 26+ messages in thread
From: Eduardo Habkost @ 2017-10-05 20:36 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel

Both -nodefconfig and -no-user-config options do the same thing
today, we only need one variable to keep track of them.

Suggested-by: Markus Armbruster <armbru@redhat.com>
Acked-by: Alistair Francis <alistair.francis@xilinx.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20171004030025.7866-2-ehabkost@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 vl.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/vl.c b/vl.c
index 3fed457921..ebea42e0ea 100644
--- a/vl.c
+++ b/vl.c
@@ -3111,7 +3111,6 @@ int main(int argc, char **argv, char **envp)
     const char *qtest_log = NULL;
     const char *pid_file = NULL;
     const char *incoming = NULL;
-    bool defconfig = true;
     bool userconfig = true;
     bool nographic = false;
     DisplayType display_type = DT_DEFAULT;
@@ -3213,8 +3212,6 @@ int main(int argc, char **argv, char **envp)
             popt = lookup_opt(argc, argv, &optarg, &optind);
             switch (popt->index) {
             case QEMU_OPTION_nodefconfig:
-                defconfig = false;
-                break;
             case QEMU_OPTION_nouserconfig:
                 userconfig = false;
                 break;
@@ -3222,7 +3219,7 @@ int main(int argc, char **argv, char **envp)
         }
     }
 
-    if (defconfig && userconfig) {
+    if (userconfig) {
         if (qemu_read_default_config_file() < 0) {
             exit(1);
         }
-- 
2.13.6

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

* [Qemu-devel] [PULL 6/9] qemu-options: Deprecate -nodefconfig
  2017-10-05 20:36 [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05 Eduardo Habkost
                   ` (4 preceding siblings ...)
  2017-10-05 20:36 ` [Qemu-devel] [PULL 5/9] vl: Eliminate defconfig variable Eduardo Habkost
@ 2017-10-05 20:36 ` Eduardo Habkost
  2017-10-05 20:36 ` [Qemu-devel] [PULL 7/9] config: qemu_config_parse() return number of config groups Eduardo Habkost
                   ` (3 subsequent siblings)
  9 siblings, 0 replies; 26+ messages in thread
From: Eduardo Habkost @ 2017-10-05 20:36 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel, Markus Armbruster

Since 2012 (commit ba6212d8 "Eliminate cpus-x86_64.conf file") we
have no default config files that would be disabled using
-nodefconfig.  Update documentation and document -nodefconfig as
deprecated.

Cc: Markus Armbruster <armbru@redhat.com>
Acked-by: Alistair Francis <alistair.francis@xilinx.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20171004030025.7866-3-ehabkost@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 qemu-doc.texi   |  4 ++++
 qemu-options.hx | 17 ++++-------------
 2 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/qemu-doc.texi b/qemu-doc.texi
index ecd186a159..d8bb2c664f 100644
--- a/qemu-doc.texi
+++ b/qemu-doc.texi
@@ -2496,6 +2496,10 @@ would automatically enable USB support on the machine type.
 If using the new syntax, USB support must be explicitly
 enabled via the ``-machine usb=on'' argument.
 
+@subsection -nodefconfig (since 2.11.0)
+
+The ``-nodefconfig`` argument is a synonym for ``-no-user-config``.
+
 @section qemu-img command line arguments
 
 @subsection convert -s (since 2.0.0)
diff --git a/qemu-options.hx b/qemu-options.hx
index 39225ae6c3..981742d191 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -4067,26 +4067,17 @@ Write device configuration to @var{file}. The @var{file} can be either filename
 command line and device configuration into file or dash @code{-}) character to print the
 output to stdout. This can be later used as input file for @code{-readconfig} option.
 ETEXI
-DEF("nodefconfig", 0, QEMU_OPTION_nodefconfig,
-    "-nodefconfig\n"
-    "                do not load default config files at startup\n",
-    QEMU_ARCH_ALL)
-STEXI
-@item -nodefconfig
-@findex -nodefconfig
-Normally QEMU loads configuration files from @var{sysconfdir} and @var{datadir} at startup.
-The @code{-nodefconfig} option will prevent QEMU from loading any of those config files.
-ETEXI
+HXCOMM Deprecated, same as -no-user-config
+DEF("nodefconfig", 0, QEMU_OPTION_nodefconfig, "", QEMU_ARCH_ALL)
 DEF("no-user-config", 0, QEMU_OPTION_nouserconfig,
     "-no-user-config\n"
-    "                do not load user-provided config files at startup\n",
+    "                do not load default user-provided config files at startup\n",
     QEMU_ARCH_ALL)
 STEXI
 @item -no-user-config
 @findex -no-user-config
 The @code{-no-user-config} option makes QEMU not load any of the user-provided
-config files on @var{sysconfdir}, but won't make it skip the QEMU-provided config
-files from @var{datadir}.
+config files on @var{sysconfdir}.
 ETEXI
 DEF("trace", HAS_ARG, QEMU_OPTION_trace,
     "-trace [[enable=]<pattern>][,events=<file>][,file=<file>]\n"
-- 
2.13.6

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

* [Qemu-devel] [PULL 7/9] config: qemu_config_parse() return number of config groups
  2017-10-05 20:36 [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05 Eduardo Habkost
                   ` (5 preceding siblings ...)
  2017-10-05 20:36 ` [Qemu-devel] [PULL 6/9] qemu-options: Deprecate -nodefconfig Eduardo Habkost
@ 2017-10-05 20:36 ` Eduardo Habkost
  2017-10-05 20:36 ` [Qemu-devel] [PULL 8/9] qom: update doc comment for type_register[_static]() Eduardo Habkost
                   ` (2 subsequent siblings)
  9 siblings, 0 replies; 26+ messages in thread
From: Eduardo Habkost @ 2017-10-05 20:36 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel

Change qemu_config_parse() to return the number of config groups
in success and -EINVAL on error. This will allow callers of
qemu_config_parse() to check if something was really loaded from
the config file.

All existing callers of qemu_config_parse() and
qemu_read_config_file() only check if the return value was
negative, so the change shouldn't affect them.

Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Message-Id: <20171004025043.3788-2-ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 block/blkdebug.c   |  1 -
 util/qemu-config.c | 15 +++++++--------
 2 files changed, 7 insertions(+), 9 deletions(-)

diff --git a/block/blkdebug.c b/block/blkdebug.c
index 46e53f2f09..dfdf9b91aa 100644
--- a/block/blkdebug.c
+++ b/block/blkdebug.c
@@ -244,7 +244,6 @@ static int read_config(BDRVBlkdebugState *s, const char *filename,
         ret = qemu_config_parse(f, config_groups, filename);
         if (ret < 0) {
             error_setg(errp, "Could not parse blkdebug config file");
-            ret = -EINVAL;
             goto fail;
         }
     }
diff --git a/util/qemu-config.c b/util/qemu-config.c
index 405dd1a1d7..99b0e46fa3 100644
--- a/util/qemu-config.c
+++ b/util/qemu-config.c
@@ -385,6 +385,7 @@ void qemu_config_write(FILE *fp)
     }
 }
 
+/* Returns number of config groups on success, -errno on error */
 int qemu_config_parse(FILE *fp, QemuOptsList **lists, const char *fname)
 {
     char line[1024], group[64], id[64], arg[64], value[1024];
@@ -392,7 +393,8 @@ int qemu_config_parse(FILE *fp, QemuOptsList **lists, const char *fname)
     QemuOptsList *list = NULL;
     Error *local_err = NULL;
     QemuOpts *opts = NULL;
-    int res = -1, lno = 0;
+    int res = -EINVAL, lno = 0;
+    int count = 0;
 
     loc_push_none(&loc);
     while (fgets(line, sizeof(line), fp) != NULL) {
@@ -413,6 +415,7 @@ int qemu_config_parse(FILE *fp, QemuOptsList **lists, const char *fname)
                 goto out;
             }
             opts = qemu_opts_create(list, id, 1, NULL);
+            count++;
             continue;
         }
         if (sscanf(line, "[%63[^]]]", group) == 1) {
@@ -423,6 +426,7 @@ int qemu_config_parse(FILE *fp, QemuOptsList **lists, const char *fname)
                 goto out;
             }
             opts = qemu_opts_create(list, NULL, 0, &error_abort);
+            count++;
             continue;
         }
         value[0] = '\0';
@@ -447,7 +451,7 @@ int qemu_config_parse(FILE *fp, QemuOptsList **lists, const char *fname)
         error_report("error reading file");
         goto out;
     }
-    res = 0;
+    res = count;
 out:
     loc_pop(&loc);
     return res;
@@ -464,12 +468,7 @@ int qemu_read_config_file(const char *filename)
 
     ret = qemu_config_parse(f, vm_config_groups, filename);
     fclose(f);
-
-    if (ret == 0) {
-        return 0;
-    } else {
-        return -EINVAL;
-    }
+    return ret;
 }
 
 static void config_parse_qdict_section(QDict *options, QemuOptsList *opts,
-- 
2.13.6

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

* [Qemu-devel] [PULL 8/9] qom: update doc comment for type_register[_static]()
  2017-10-05 20:36 [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05 Eduardo Habkost
                   ` (6 preceding siblings ...)
  2017-10-05 20:36 ` [Qemu-devel] [PULL 7/9] config: qemu_config_parse() return number of config groups Eduardo Habkost
@ 2017-10-05 20:36 ` Eduardo Habkost
  2017-10-05 20:36 ` [Qemu-devel] [PULL 9/9] x86: Correct translation of some rdgsbase and wrgsbase encodings Eduardo Habkost
  2017-10-06 12:17 ` [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05 Peter Maydell
  9 siblings, 0 replies; 26+ messages in thread
From: Eduardo Habkost @ 2017-10-05 20:36 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel, Igor Mammedov

From: Igor Mammedov <imammedo@redhat.com>

type_register()/type_register_static() functions in current impl.
can't fail returning 0, also none of the users check for error
so update doc comment to reflect current behaviour.

Suggested-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <1507111682-66171-2-git-send-email-imammedo@redhat.com>
Reviewed-by: Eduardo Habkost <ehabkost@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 include/qom/object.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/qom/object.h b/include/qom/object.h
index e0d9824415..a707b67781 100644
--- a/include/qom/object.h
+++ b/include/qom/object.h
@@ -773,7 +773,7 @@ const char *object_get_typename(const Object *obj);
  * @info and all of the strings it points to should exist for the life time
  * that the type is registered.
  *
- * Returns: 0 on failure, the new #Type on success.
+ * Returns: the new #Type.
  */
 Type type_register_static(const TypeInfo *info);
 
@@ -784,7 +784,7 @@ Type type_register_static(const TypeInfo *info);
  * Unlike type_register_static(), this call does not require @info or its
  * string members to continue to exist after the call returns.
  *
- * Returns: 0 on failure, the new #Type on success.
+ * Returns: the new #Type.
  */
 Type type_register(const TypeInfo *info);
 
-- 
2.13.6

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

* [Qemu-devel] [PULL 9/9] x86: Correct translation of some rdgsbase and wrgsbase encodings
  2017-10-05 20:36 [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05 Eduardo Habkost
                   ` (7 preceding siblings ...)
  2017-10-05 20:36 ` [Qemu-devel] [PULL 8/9] qom: update doc comment for type_register[_static]() Eduardo Habkost
@ 2017-10-05 20:36 ` Eduardo Habkost
  2017-10-06 12:17 ` [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05 Peter Maydell
  9 siblings, 0 replies; 26+ messages in thread
From: Eduardo Habkost @ 2017-10-05 20:36 UTC (permalink / raw)
  To: Peter Maydell; +Cc: qemu-devel, Todd Eisenberger

From: Todd Eisenberger <teisenbe@google.com>

It looks like there was a transcription error when writing this code
initially.  The code previously only decoded src or dst of rax.  This
resolves
https://bugs.launchpad.net/qemu/+bug/1719984.

Signed-off-by: Todd Eisenberger <teisenbe@google.com>
Message-Id: <CAP26EVRNVb=Mq=O3s51w7fDhGVmf-e3XFFA73MRzc5b4qKBA4g@mail.gmail.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
---
 target/i386/translate.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/i386/translate.c b/target/i386/translate.c
index a8986f4c1a..7b920115f9 100644
--- a/target/i386/translate.c
+++ b/target/i386/translate.c
@@ -8155,9 +8155,9 @@ static target_ulong disas_insn(DisasContext *s, CPUState *cpu)
             break;
 
         case 0xc0 ... 0xc7: /* rdfsbase (f3 0f ae /0) */
-        case 0xc8 ... 0xc8: /* rdgsbase (f3 0f ae /1) */
+        case 0xc8 ... 0xcf: /* rdgsbase (f3 0f ae /1) */
         case 0xd0 ... 0xd7: /* wrfsbase (f3 0f ae /2) */
-        case 0xd8 ... 0xd8: /* wrgsbase (f3 0f ae /3) */
+        case 0xd8 ... 0xdf: /* wrgsbase (f3 0f ae /3) */
             if (CODE64(s)
                 && (prefixes & PREFIX_REPZ)
                 && !(prefixes & PREFIX_LOCK)
-- 
2.13.6

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

* Re: [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05
  2017-10-05 20:36 [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05 Eduardo Habkost
                   ` (8 preceding siblings ...)
  2017-10-05 20:36 ` [Qemu-devel] [PULL 9/9] x86: Correct translation of some rdgsbase and wrgsbase encodings Eduardo Habkost
@ 2017-10-06 12:17 ` Peter Maydell
  2017-10-06 13:45   ` Thomas Huth
  2017-10-06 15:27   ` Eduardo Habkost
  9 siblings, 2 replies; 26+ messages in thread
From: Peter Maydell @ 2017-10-06 12:17 UTC (permalink / raw)
  To: Eduardo Habkost; +Cc: QEMU Developers

On 5 October 2017 at 21:36, Eduardo Habkost <ehabkost@redhat.com> wrote:
> The following changes since commit d8f932cc696250cb740240d668b39df5fbb2d5a0:
>
>   Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging (2017-10-05 16:54:29 +0100)
>
> are available in the git repository at:
>
>   git://github.com/ehabkost/qemu.git tags/x86-and-machine-pull-request
>
> for you to fetch changes up to 7d7e9c4fd6873d9624956cbe0a5cbfae59b7f8af:
>
>   x86: Correct translation of some rdgsbase and wrgsbase encodings (2017-10-05 17:30:06 -0300)
>
> ----------------------------------------------------------------
> x86 and machine queue, 2017-10-05
>
> Includes x86, NUMA, ACPI, QOM, CPU, and option/config parsing
> patches.
>
> Highlights:
> * Deprecation of -nodefconfig option;
> * MachineClass::valid_cpu_types field.
>
> ----------------------------------------------------------------

This fails tests, I'm afraid:

TEST: tests/bios-tables-test... (pid=5565)
  /i386/acpi/piix4:
Looking for expected file 'tests/acpi-test-data/pc/DSDT'

Using expected file 'tests/acpi-test-data/pc/DSDT'

Looking for expected file 'tests/acpi-test-data/pc/APIC'

Using expected file 'tests/acpi-test-data/pc/APIC'

Looking for expected file 'tests/acpi-test-data/pc/HPET'

Using expected file 'tests/acpi-test-data/pc/HPET'
OK
  /i386/acpi/q35:
[snip]
  /i386/acpi/piix4/memhp:
Looking for expected file 'tests/acpi-test-data/pc/DSDT.memhp'

Using expected file 'tests/acpi-test-data/pc/DSDT.memhp'

Looking for expected file 'tests/acpi-test-data/pc/APIC.memhp'

Looking for expected file 'tests/acpi-test-data/pc/APIC'

Using expected file 'tests/acpi-test-data/pc/APIC'

Looking for expected file 'tests/acpi-test-data/pc/HPET.memhp'

Looking for expected file 'tests/acpi-test-data/pc/HPET'

Using expected file 'tests/acpi-test-data/pc/HPET'

Looking for expected file 'tests/acpi-test-data/pc/SRAT.memhp'

Using expected file 'tests/acpi-test-data/pc/SRAT.memhp'

Looking for expected file 'tests/acpi-test-data/pc/SLIT.memhp'

Using expected file 'tests/acpi-test-data/pc/SLIT.memhp'
acpi-test: Warning! DSDT mismatch. Actual [asl:/tmp/asl-6QYK7Y.dsl,
aml:/tmp/aml-E8YK7Y], Expected [asl:/tmp/asl-1H1I7Y.dsl,
aml:tests/acpi-test-data/pc/DSDT.memhp].
acpi-test: Warning. not showing difference since no diff utility is
specified. Set 'DIFF' environment variable to a preferred diff utility
and run 'make V=1 check' again to see ASL difference.OK

and same for /i386/acpi/piix4/numamem and for the
equivalent q35 tests.

Fails on s390, netbsd, freebsd, aarch32, x86-64.

As an aside, these acpi tests are a bit noisy with
V=1, especially the extra blank lines.

thanks
-- PMM

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

* Re: [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05
  2017-10-06 12:17 ` [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05 Peter Maydell
@ 2017-10-06 13:45   ` Thomas Huth
  2017-10-06 15:27   ` Eduardo Habkost
  1 sibling, 0 replies; 26+ messages in thread
From: Thomas Huth @ 2017-10-06 13:45 UTC (permalink / raw)
  To: Peter Maydell, Eduardo Habkost
  Cc: QEMU Developers, Igor Mammedov, Michael S. Tsirkin

On 06.10.2017 14:17, Peter Maydell wrote:
[...]
> 
> As an aside, these acpi tests are a bit noisy with
> V=1, especially the extra blank lines.
> 

FWIW, I suggested a patch here to fix that:

https://lists.gnu.org/archive/html/qemu-devel/2017-08/msg05404.html

... but apparently Igor did not like it that much.

 Thomas

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

* Re: [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05
  2017-10-06 12:17 ` [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05 Peter Maydell
  2017-10-06 13:45   ` Thomas Huth
@ 2017-10-06 15:27   ` Eduardo Habkost
  2017-10-06 15:37     ` Peter Maydell
  1 sibling, 1 reply; 26+ messages in thread
From: Eduardo Habkost @ 2017-10-06 15:27 UTC (permalink / raw)
  To: Peter Maydell; +Cc: QEMU Developers

On Fri, Oct 06, 2017 at 01:17:42PM +0100, Peter Maydell wrote:
> On 5 October 2017 at 21:36, Eduardo Habkost <ehabkost@redhat.com> wrote:
> > The following changes since commit d8f932cc696250cb740240d668b39df5fbb2d5a0:
> >
> >   Merge remote-tracking branch 'remotes/stefanha/tags/tracing-pull-request' into staging (2017-10-05 16:54:29 +0100)
> >
> > are available in the git repository at:
> >
> >   git://github.com/ehabkost/qemu.git tags/x86-and-machine-pull-request
> >
> > for you to fetch changes up to 7d7e9c4fd6873d9624956cbe0a5cbfae59b7f8af:
> >
> >   x86: Correct translation of some rdgsbase and wrgsbase encodings (2017-10-05 17:30:06 -0300)
> >
> > ----------------------------------------------------------------
> > x86 and machine queue, 2017-10-05
> >
> > Includes x86, NUMA, ACPI, QOM, CPU, and option/config parsing
> > patches.
> >
> > Highlights:
> > * Deprecation of -nodefconfig option;
> > * MachineClass::valid_cpu_types field.
> >
> > ----------------------------------------------------------------
> 
> This fails tests, I'm afraid:
[...]
> acpi-test: Warning! DSDT mismatch. Actual [asl:/tmp/asl-6QYK7Y.dsl,
> aml:/tmp/aml-E8YK7Y], Expected [asl:/tmp/asl-1H1I7Y.dsl,
> aml:tests/acpi-test-data/pc/DSDT.memhp].
> acpi-test: Warning. not showing difference since no diff utility is
> specified. Set 'DIFF' environment variable to a preferred diff utility
> and run 'make V=1 check' again to see ASL difference.OK
> 
> and same for /i386/acpi/piix4/numamem and for the
> equivalent q35 tests.
> 
> Fails on s390, netbsd, freebsd, aarch32, x86-64.
> 

Oops, sorry!

I need to find out why it didn't fail on travis-ci:
https://travis-ci.org/ehabkost/qemu/builds/283884670

-- 
Eduardo

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

* Re: [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05
  2017-10-06 15:27   ` Eduardo Habkost
@ 2017-10-06 15:37     ` Peter Maydell
  2017-10-10  7:41       ` Dou Liyang
  0 siblings, 1 reply; 26+ messages in thread
From: Peter Maydell @ 2017-10-06 15:37 UTC (permalink / raw)
  To: Eduardo Habkost; +Cc: QEMU Developers

On 6 October 2017 at 16:27, Eduardo Habkost <ehabkost@redhat.com> wrote:
> On Fri, Oct 06, 2017 at 01:17:42PM +0100, Peter Maydell wrote:
>> This fails tests, I'm afraid:
> [...]
>> acpi-test: Warning! DSDT mismatch. Actual [asl:/tmp/asl-6QYK7Y.dsl,
>> aml:/tmp/aml-E8YK7Y], Expected [asl:/tmp/asl-1H1I7Y.dsl,
>> aml:tests/acpi-test-data/pc/DSDT.memhp].
>> acpi-test: Warning. not showing difference since no diff utility is
>> specified. Set 'DIFF' environment variable to a preferred diff utility
>> and run 'make V=1 check' again to see ASL difference.OK
>>
>> and same for /i386/acpi/piix4/numamem and for the
>> equivalent q35 tests.
>>
>> Fails on s390, netbsd, freebsd, aarch32, x86-64.
>>
>
> Oops, sorry!
>
> I need to find out why it didn't fail on travis-ci:
> https://travis-ci.org/ehabkost/qemu/builds/283884670

My guess is that one of {iasl installed, iasl not installed}
is broken, but the travis environments don't test both.

thanks
-- PMM

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

* Re: [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05
  2017-10-06 15:37     ` Peter Maydell
@ 2017-10-10  7:41       ` Dou Liyang
  2017-10-10  9:40         ` Peter Maydell
  2017-10-10 12:52         ` Eduardo Habkost
  0 siblings, 2 replies; 26+ messages in thread
From: Dou Liyang @ 2017-10-10  7:41 UTC (permalink / raw)
  To: Peter Maydell, Eduardo Habkost; +Cc: QEMU Developers

Hi Eduardo,

I couldn't reproduce the failure too. But, I have some concern below.

At 10/06/2017 11:37 PM, Peter Maydell wrote:
> On 6 October 2017 at 16:27, Eduardo Habkost <ehabkost@redhat.com> wrote:
>> On Fri, Oct 06, 2017 at 01:17:42PM +0100, Peter Maydell wrote:
>>> This fails tests, I'm afraid:
>> [...]
>>> acpi-test: Warning! DSDT mismatch. Actual [asl:/tmp/asl-6QYK7Y.dsl,
>>> aml:/tmp/aml-E8YK7Y], Expected [asl:/tmp/asl-1H1I7Y.dsl,
>>> aml:tests/acpi-test-data/pc/DSDT.memhp].

This warning is about memory hot-plug tests. DSDT mismatch is too
strange, I hope to see their difference.

>>> acpi-test: Warning. not showing difference since no diff utility is
>>> specified. Set 'DIFF' environment variable to a preferred diff utility
>>> and run 'make V=1 check' again to see ASL difference.OK
>>>
>>> and same for /i386/acpi/piix4/numamem and for the
>>> equivalent q35 tests.
>>>
>>> Fails on s390, netbsd, freebsd, aarch32, x86-64.
>>>
>>
>> Oops, sorry!
>>
>> I need to find out why it didn't fail on travis-ci:
>> https://travis-ci.org/ehabkost/qemu/builds/283884670
>
> My guess is that one of {iasl installed, iasl not installed}
> is broken, but the travis environments don't test both.
>
If we want do the "bios-tables-test", we need iasl support.

otherwise, when I run "make V=1 check" without iasl, the test
will report error:

...
TEST: tests/bios-tables-test... (pid=1006)
   /i386/acpi/piix4:
Looking for expected file 'tests/acpi-test-data/pc/DSDT'

Using expected file 'tests/acpi-test-data/pc/DSDT'

Looking for expected file 'tests/acpi-test-data/pc/APIC'

Using expected file 'tests/acpi-test-data/pc/APIC'

Looking for expected file 'tests/acpi-test-data/pc/HPET'

Using expected file 'tests/acpi-test-data/pc/HPET'
**
ERROR:tests/bios-tables-test.c:328:load_asl: assertion failed (error == 
NULL): Failed to execute child process "iasl" (No such file or 
directory) (g-exec-error-quark, 8)
FAIL
...

Thanks,
	dou.
> thanks
> -- PMM
>
>
>
>

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

* Re: [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05
  2017-10-10  7:41       ` Dou Liyang
@ 2017-10-10  9:40         ` Peter Maydell
  2017-10-10 13:29           ` Dou Liyang
  2017-10-10 12:52         ` Eduardo Habkost
  1 sibling, 1 reply; 26+ messages in thread
From: Peter Maydell @ 2017-10-10  9:40 UTC (permalink / raw)
  To: Dou Liyang; +Cc: Eduardo Habkost, QEMU Developers

On 10 October 2017 at 08:41, Dou Liyang <douly.fnst@cn.fujitsu.com> wrote:
> If we want do the "bios-tables-test", we need iasl support.
>
> otherwise, when I run "make V=1 check" without iasl, the test
> will report error:

This works in master at the moment, I think (whether by skipping
the test or by using pre-compiled tables I don't know). We need to
keep 'make check' working with and without iasl.

thanks
-- PMM

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

* Re: [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05
  2017-10-10  7:41       ` Dou Liyang
  2017-10-10  9:40         ` Peter Maydell
@ 2017-10-10 12:52         ` Eduardo Habkost
  2017-10-10 12:56           ` Peter Maydell
  2017-10-10 13:07           ` Dou Liyang
  1 sibling, 2 replies; 26+ messages in thread
From: Eduardo Habkost @ 2017-10-10 12:52 UTC (permalink / raw)
  To: Dou Liyang; +Cc: Peter Maydell, QEMU Developers

On Tue, Oct 10, 2017 at 03:41:56PM +0800, Dou Liyang wrote:
> Hi Eduardo,
> 
> I couldn't reproduce the failure too. But, I have some concern below.
> 
> At 10/06/2017 11:37 PM, Peter Maydell wrote:
> > On 6 October 2017 at 16:27, Eduardo Habkost <ehabkost@redhat.com> wrote:
> > > On Fri, Oct 06, 2017 at 01:17:42PM +0100, Peter Maydell wrote:
> > > > This fails tests, I'm afraid:
> > > [...]
> > > > acpi-test: Warning! DSDT mismatch. Actual [asl:/tmp/asl-6QYK7Y.dsl,
> > > > aml:/tmp/aml-E8YK7Y], Expected [asl:/tmp/asl-1H1I7Y.dsl,
> > > > aml:tests/acpi-test-data/pc/DSDT.memhp].
> 
> This warning is about memory hot-plug tests. DSDT mismatch is too
> strange, I hope to see their difference.
> 
> > > > acpi-test: Warning. not showing difference since no diff utility is
> > > > specified. Set 'DIFF' environment variable to a preferred diff utility
> > > > and run 'make V=1 check' again to see ASL difference.OK
> > > > 
> > > > and same for /i386/acpi/piix4/numamem and for the
> > > > equivalent q35 tests.
> > > > 
> > > > Fails on s390, netbsd, freebsd, aarch32, x86-64.
> > > > 
> > > 
> > > Oops, sorry!
> > > 
> > > I need to find out why it didn't fail on travis-ci:
> > > https://travis-ci.org/ehabkost/qemu/builds/283884670
> > 
> > My guess is that one of {iasl installed, iasl not installed}
> > is broken, but the travis environments don't test both.
> > 
> If we want do the "bios-tables-test", we need iasl support.
> 
> otherwise, when I run "make V=1 check" without iasl, the test
> will report error:
> 
> ...
> TEST: tests/bios-tables-test... (pid=1006)
>   /i386/acpi/piix4:
> Looking for expected file 'tests/acpi-test-data/pc/DSDT'
> 
> Using expected file 'tests/acpi-test-data/pc/DSDT'
> 
> Looking for expected file 'tests/acpi-test-data/pc/APIC'
> 
> Using expected file 'tests/acpi-test-data/pc/APIC'
> 
> Looking for expected file 'tests/acpi-test-data/pc/HPET'
> 
> Using expected file 'tests/acpi-test-data/pc/HPET'
> **
> ERROR:tests/bios-tables-test.c:328:load_asl: assertion failed (error ==
> NULL): Failed to execute child process "iasl" (No such file or directory)
> (g-exec-error-quark, 8)
> FAIL

This shouldn't happen if CONFIG_IASL is not defined.  Did you run
configure again after removing iasl?

-- 
Eduardo

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

* Re: [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05
  2017-10-10 12:52         ` Eduardo Habkost
@ 2017-10-10 12:56           ` Peter Maydell
  2017-10-10 14:17             ` Dou Liyang
  2017-10-10 16:03             ` Eduardo Habkost
  2017-10-10 13:07           ` Dou Liyang
  1 sibling, 2 replies; 26+ messages in thread
From: Peter Maydell @ 2017-10-10 12:56 UTC (permalink / raw)
  To: Eduardo Habkost; +Cc: Dou Liyang, QEMU Developers

On 10 October 2017 at 13:52, Eduardo Habkost <ehabkost@redhat.com> wrote:
> This shouldn't happen if CONFIG_IASL is not defined.  Did you run
> configure again after removing iasl?

I've neither added nor removed iasl from the build systems
in question. Pull request tests just apply the pull and
run make/make check.

thanks
-- PMM

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

* Re: [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05
  2017-10-10 12:52         ` Eduardo Habkost
  2017-10-10 12:56           ` Peter Maydell
@ 2017-10-10 13:07           ` Dou Liyang
  1 sibling, 0 replies; 26+ messages in thread
From: Dou Liyang @ 2017-10-10 13:07 UTC (permalink / raw)
  To: Eduardo Habkost; +Cc: Peter Maydell, QEMU Developers

Hi Eduardo,

At 10/10/2017 08:52 PM, Eduardo Habkost wrote:
> This shouldn't happen if CONFIG_IASL is not defined.  Did you run
> configure again after removing iasl?

Oops, Yes, the result above is in CONFIG_IASL = iasl.  :-(
I have been aware of this problem.

I am waiting the result of the test with './configure --iasl="" '

Thanks,
	dou.

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

* Re: [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05
  2017-10-10  9:40         ` Peter Maydell
@ 2017-10-10 13:29           ` Dou Liyang
  0 siblings, 0 replies; 26+ messages in thread
From: Dou Liyang @ 2017-10-10 13:29 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Eduardo Habkost, QEMU Developers

Hi Peter,

At 10/10/2017 05:40 PM, Peter Maydell wrote:
> On 10 October 2017 at 08:41, Dou Liyang <douly.fnst@cn.fujitsu.com> wrote:
>> If we want do the "bios-tables-test", we need iasl support.
>>
>> otherwise, when I run "make V=1 check" without iasl, the test
>> will report error:
>
> This works in master at the moment, I think (whether by skipping
> the test or by using pre-compiled tables I don't know). We need to
> keep 'make check' working with and without iasl.

Yes, you are right, QEMU uses the macro named CONFIG_IASL to skip
the test if there is no ACPICA-tools in our system.

The QEMU has already kept 'make check' working with and without iasl.

The way I tested was wrong.

Thanks,
	dou.
>
> thanks
> -- PMM
>
>
>

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

* Re: [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05
  2017-10-10 12:56           ` Peter Maydell
@ 2017-10-10 14:17             ` Dou Liyang
  2017-10-10 16:03             ` Eduardo Habkost
  1 sibling, 0 replies; 26+ messages in thread
From: Dou Liyang @ 2017-10-10 14:17 UTC (permalink / raw)
  To: Peter Maydell, Eduardo Habkost; +Cc: QEMU Developers

Hi Peter,

At 10/10/2017 08:56 PM, Peter Maydell wrote:
> On 10 October 2017 at 13:52, Eduardo Habkost <ehabkost@redhat.com> wrote:
>> This shouldn't happen if CONFIG_IASL is not defined.  Did you run
>> configure again after removing iasl?
>
> I've neither added nor removed iasl from the build systems
> in question. Pull request tests just apply the pull and
> run make/make check.
>

Yes, Indeed.

now I can be sure that the problem is not related to iasl
installed or not. There are both OK in my host.

According to:
 >>> acpi-test: Warning! DSDT mismatch. Actual [asl:/tmp/asl-6QYK7Y.dsl,
 >>> aml:/tmp/aml-E8YK7Y], Expected [asl:/tmp/asl-1H1I7Y.dsl,
 >>> aml:tests/acpi-test-data/pc/DSDT.memhp].

May I resend the patch independently, and could you help me test it in
your machine. then, give me the output files, such as 
/tmp/asl-6QYK7Y.dsl and /tmp/asl-1H1I7Y.dsl file.

Thanks,
	dou.
> thanks
> -- PMM
>
>
>

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

* Re: [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05
  2017-10-10 12:56           ` Peter Maydell
  2017-10-10 14:17             ` Dou Liyang
@ 2017-10-10 16:03             ` Eduardo Habkost
  1 sibling, 0 replies; 26+ messages in thread
From: Eduardo Habkost @ 2017-10-10 16:03 UTC (permalink / raw)
  To: Peter Maydell; +Cc: Dou Liyang, QEMU Developers

On Tue, Oct 10, 2017 at 01:56:55PM +0100, Peter Maydell wrote:
> On 10 October 2017 at 13:52, Eduardo Habkost <ehabkost@redhat.com> wrote:
> > This shouldn't happen if CONFIG_IASL is not defined.  Did you run
> > configure again after removing iasl?
> 
> I've neither added nor removed iasl from the build systems
> in question. Pull request tests just apply the pull and
> run make/make check.

I understand.  The question was about the test failure reported
by Dou Liyang.

-- 
Eduardo

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

* Re: [Qemu-devel] [PULL 1/9] hw/acpi-build: Make assignment statement of next_base easy to read
  2017-10-05 20:36 ` [Qemu-devel] [PULL 1/9] hw/acpi-build: Make assignment statement of next_base easy to read Eduardo Habkost
@ 2017-11-28 15:07   ` Igor Mammedov
  2017-11-29  1:07     ` Dou Liyang
  0 siblings, 1 reply; 26+ messages in thread
From: Igor Mammedov @ 2017-11-28 15:07 UTC (permalink / raw)
  To: Eduardo Habkost; +Cc: Peter Maydell, Dou Liyang, qemu-devel

On Thu,  5 Oct 2017 17:36:30 -0300
Eduardo Habkost <ehabkost@redhat.com> wrote:

> From: Dou Liyang <douly.fnst@cn.fujitsu.com>
> 
> It may be hard to read the assignment statement of "next_base", so
> 
> S/next_base += (1ULL << 32) - pcms->below_4g_mem_size;
>  /next_base = mem_base + mem_len;
> 
> ... for readability.
> 
> No functionality change.
> 
> Signed-off-by: Dou Liyang <douly.fnst@cn.fujitsu.com>
> Message-Id: <1504231805-30957-3-git-send-email-douly.fnst@cn.fujitsu.com>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Pls, retest/respin once 2.12 dev window is open

> ---
>  hw/i386/acpi-build.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
> index 2af37a9129..73e3443bce 100644
> --- a/hw/i386/acpi-build.c
> +++ b/hw/i386/acpi-build.c
> @@ -2381,7 +2381,7 @@ build_srat(GArray *table_data, BIOSLinker *linker, MachineState *machine)
>              }
>              mem_base = 1ULL << 32;
>              mem_len = next_base - pcms->below_4g_mem_size;
> -            next_base += (1ULL << 32) - pcms->below_4g_mem_size;
> +            next_base = mem_base + mem_len;
>          }
>          numamem = acpi_data_push(table_data, sizeof *numamem);
>          build_srat_memory(numamem, mem_base, mem_len, i - 1,

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

* Re: [Qemu-devel] [PULL 2/9] ACPI/unit-test: Add a new testcase for RAM allocation in numa node
  2017-10-05 20:36 ` [Qemu-devel] [PULL 2/9] ACPI/unit-test: Add a new testcase for RAM allocation in numa node Eduardo Habkost
@ 2017-11-28 15:08   ` Igor Mammedov
  2017-11-29  1:06     ` Dou Liyang
  0 siblings, 1 reply; 26+ messages in thread
From: Igor Mammedov @ 2017-11-28 15:08 UTC (permalink / raw)
  To: Eduardo Habkost; +Cc: Peter Maydell, Dou Liyang, qemu-devel

On Thu,  5 Oct 2017 17:36:31 -0300
Eduardo Habkost <ehabkost@redhat.com> wrote:

> From: Dou Liyang <douly.fnst@cn.fujitsu.com>
> 
> As QEMU supports the memory-less node, it is possible that there is
> no RAM in the first numa node(also be called as node0). eg:
>   ... \
>   -m 128,slots=3,maxmem=1G \
>   -numa node -numa node,mem=128M \
> 
> But, this makes it hard for QEMU to build a known-to-work ACPI SRAT
> table. Only fixing it is not enough.
> 
> Add a testcase for this situation to make sure the ACPI table is
> correct for guest.
> 
> Suggested-by: Eduardo Habkost <ehabkost@redhat.com>
> Signed-off-by: Dou Liyang <douly.fnst@cn.fujitsu.com>
> Message-Id: <1504231805-30957-4-git-send-email-douly.fnst@cn.fujitsu.com>
> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>

Pls retest/respin once dev window is open.

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

* Re: [Qemu-devel] [PULL 2/9] ACPI/unit-test: Add a new testcase for RAM allocation in numa node
  2017-11-28 15:08   ` Igor Mammedov
@ 2017-11-29  1:06     ` Dou Liyang
  0 siblings, 0 replies; 26+ messages in thread
From: Dou Liyang @ 2017-11-29  1:06 UTC (permalink / raw)
  To: Igor Mammedov, Eduardo Habkost; +Cc: Peter Maydell, qemu-devel

Hi Igor,

At 11/28/2017 11:08 PM, Igor Mammedov wrote:
> On Thu,  5 Oct 2017 17:36:31 -0300
> Eduardo Habkost <ehabkost@redhat.com> wrote:
>
>> From: Dou Liyang <douly.fnst@cn.fujitsu.com>
>>
>> As QEMU supports the memory-less node, it is possible that there is
>> no RAM in the first numa node(also be called as node0). eg:
>>   ... \
>>   -m 128,slots=3,maxmem=1G \
>>   -numa node -numa node,mem=128M \
>>
>> But, this makes it hard for QEMU to build a known-to-work ACPI SRAT
>> table. Only fixing it is not enough.
>>
>> Add a testcase for this situation to make sure the ACPI table is
>> correct for guest.
>>
>> Suggested-by: Eduardo Habkost <ehabkost@redhat.com>
>> Signed-off-by: Dou Liyang <douly.fnst@cn.fujitsu.com>
>> Message-Id: <1504231805-30957-4-git-send-email-douly.fnst@cn.fujitsu.com>
>> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
>
> Pls retest/respin once dev window is open.
>

Yes, Thanks so much for your reminder. I will do that.

Thanks,
	dou.

>
>
>

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

* Re: [Qemu-devel] [PULL 1/9] hw/acpi-build: Make assignment statement of next_base easy to read
  2017-11-28 15:07   ` Igor Mammedov
@ 2017-11-29  1:07     ` Dou Liyang
  0 siblings, 0 replies; 26+ messages in thread
From: Dou Liyang @ 2017-11-29  1:07 UTC (permalink / raw)
  To: Igor Mammedov, Eduardo Habkost; +Cc: Peter Maydell, qemu-devel

Hi, Igor,

At 11/28/2017 11:07 PM, Igor Mammedov wrote:
> On Thu,  5 Oct 2017 17:36:30 -0300
> Eduardo Habkost <ehabkost@redhat.com> wrote:
>
>> From: Dou Liyang <douly.fnst@cn.fujitsu.com>
>>
>> It may be hard to read the assignment statement of "next_base", so
>>
>> S/next_base += (1ULL << 32) - pcms->below_4g_mem_size;
>>  /next_base = mem_base + mem_len;
>>
>> ... for readability.
>>
>> No functionality change.
>>
>> Signed-off-by: Dou Liyang <douly.fnst@cn.fujitsu.com>
>> Message-Id: <1504231805-30957-3-git-send-email-douly.fnst@cn.fujitsu.com>
>> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
> Pls, retest/respin once 2.12 dev window is open
>

Yes, I will.

Thanks,
	dou.

>> ---
>>  hw/i386/acpi-build.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c
>> index 2af37a9129..73e3443bce 100644
>> --- a/hw/i386/acpi-build.c
>> +++ b/hw/i386/acpi-build.c
>> @@ -2381,7 +2381,7 @@ build_srat(GArray *table_data, BIOSLinker *linker, MachineState *machine)
>>              }
>>              mem_base = 1ULL << 32;
>>              mem_len = next_base - pcms->below_4g_mem_size;
>> -            next_base += (1ULL << 32) - pcms->below_4g_mem_size;
>> +            next_base = mem_base + mem_len;
>>          }
>>          numamem = acpi_data_push(table_data, sizeof *numamem);
>>          build_srat_memory(numamem, mem_base, mem_len, i - 1,
>
>
>
>

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

end of thread, other threads:[~2017-11-29  1:08 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-05 20:36 [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05 Eduardo Habkost
2017-10-05 20:36 ` [Qemu-devel] [PULL 1/9] hw/acpi-build: Make assignment statement of next_base easy to read Eduardo Habkost
2017-11-28 15:07   ` Igor Mammedov
2017-11-29  1:07     ` Dou Liyang
2017-10-05 20:36 ` [Qemu-devel] [PULL 2/9] ACPI/unit-test: Add a new testcase for RAM allocation in numa node Eduardo Habkost
2017-11-28 15:08   ` Igor Mammedov
2017-11-29  1:06     ` Dou Liyang
2017-10-05 20:36 ` [Qemu-devel] [PULL 3/9] qom/cpu: move cpu_model null check to cpu_class_by_name() Eduardo Habkost
2017-10-05 20:36 ` [Qemu-devel] [PULL 4/9] machine: Add a valid_cpu_types property Eduardo Habkost
2017-10-05 20:36 ` [Qemu-devel] [PULL 5/9] vl: Eliminate defconfig variable Eduardo Habkost
2017-10-05 20:36 ` [Qemu-devel] [PULL 6/9] qemu-options: Deprecate -nodefconfig Eduardo Habkost
2017-10-05 20:36 ` [Qemu-devel] [PULL 7/9] config: qemu_config_parse() return number of config groups Eduardo Habkost
2017-10-05 20:36 ` [Qemu-devel] [PULL 8/9] qom: update doc comment for type_register[_static]() Eduardo Habkost
2017-10-05 20:36 ` [Qemu-devel] [PULL 9/9] x86: Correct translation of some rdgsbase and wrgsbase encodings Eduardo Habkost
2017-10-06 12:17 ` [Qemu-devel] [PULL 0/9] x86 and machine queue, 2017-10-05 Peter Maydell
2017-10-06 13:45   ` Thomas Huth
2017-10-06 15:27   ` Eduardo Habkost
2017-10-06 15:37     ` Peter Maydell
2017-10-10  7:41       ` Dou Liyang
2017-10-10  9:40         ` Peter Maydell
2017-10-10 13:29           ` Dou Liyang
2017-10-10 12:52         ` Eduardo Habkost
2017-10-10 12:56           ` Peter Maydell
2017-10-10 14:17             ` Dou Liyang
2017-10-10 16:03             ` Eduardo Habkost
2017-10-10 13:07           ` Dou Liyang

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.