Re: [Qemu-devel] [PATCH 1/3] pc: Fix error message on die-id validation

2019-08-18 Thread Like Xu
On 2019/8/16 21:49, Eduardo Habkost wrote: On Fri, Aug 16, 2019 at 09:04:16AM +0800, Like Xu wrote: Hi, On 2019/8/16 2:38, Eduardo Habkost wrote: The error message for die-id range validation is incorrect. Example: $ qemu-system-x86_64 -smp 1,sockets=6,maxcpus=6 \ -device qemu64

Re: [Qemu-devel] [PATCH 1/3] pc: Fix error message on die-id validation

2019-08-15 Thread Like Xu
Hi, On 2019/8/16 2:38, Eduardo Habkost wrote: The error message for die-id range validation is incorrect. Example: $ qemu-system-x86_64 -smp 1,sockets=6,maxcpus=6 \ -device qemu64-x86_64-cpu,socket-id=1,die-id=1,core-id=0,thread-id=0 qemu-system-x86_64: -device

Re: [Qemu-devel] [PATCH for 4.1?] includes: remove stale [smp|max]_cpus externs

2019-07-11 Thread Like Xu
On 2019/7/11 21:05, Alex Bennée wrote: Commit a5e0b3311 removed these in favour of querying machine properties. Remove the extern declarations as well. Signed-off-by: Alex Bennée Cc: Like Xu Reviewed-by: Like Xu --- include/sysemu/sysemu.h | 2 -- 1 file changed, 2 deletions(-) diff

Re: [Qemu-devel] [PATCH v3 05/10] hw/riscv: Replace global smp variables with machine smp properties

2019-06-20 Thread Like Xu
On 2019/6/20 22:52, Eduardo Habkost wrote: On Sun, May 19, 2019 at 04:54:23AM +0800, Like Xu wrote: The global smp variables in riscv are replaced with smp machine properties. A local variable of the same name would be introduced in the declaration phase if it's used widely in the context

[Qemu-devel] [PATCH v4 1/3] target/i386: Add CPUID.1F generation support for multi-dies PCMachine

2019-06-19 Thread Like Xu
of dies per package is greater than 1, the cpuid_min_level would be adjusted to 0x1f regardless of whether the host supports CPUID.1F. Likewise, the CPUID.1F wouldn't be exposed if env->nr_dies < 2. Suggested-by: Eduardo Habkost Signed-off-by: Like Xu --- target/i386/cpu.

[Qemu-devel] [PATCH v4 3/3] vl.c: Add -smp, dies=* command line support and update doc

2019-06-19 Thread Like Xu
computing. Signed-off-by: Like Xu --- hw/i386/pc.c| 30 +- qemu-options.hx | 17 + vl.c| 3 +++ 3 files changed, 29 insertions(+), 21 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 092bd10d4d..2ed1b3f8de 100644 --- a/hw/i386/

[Qemu-devel] [PATCH v4 0/3] Introduce cpu die topology and enable CPUID.1F for i386

2019-06-19 Thread Like Xu
ork.kernel.org/cover/10876667/ Like Xu (3): target/i386: Add CPUID.1F generation support for multi-dies PCMachine machine: Refactor smp_parse() in vl.c as MachineClass::smp_parse() vl.c: Add -smp, dies=* command line support and update doc hw/core/machine.c| 76 +

[Qemu-devel] [PATCH v4 2/3] machine: Refactor smp_parse() in vl.c as MachineClass::smp_parse()

2019-06-19 Thread Like Xu
called pc_smp_parse() has been added to hw/i386/pc.c, which in this patch changes nothing against the default one . Suggested-by: Eduardo Habkost Signed-off-by: Like Xu Reviewed-by: Eduardo Habkost --- hw/core/machine.c| 76 ++ hw/i386/pc.c | 79

Re: [Qemu-devel] [PATCH v3 7/9] target/i386: Support multi-dies when host doesn't support CPUID.1F

2019-06-19 Thread Like Xu
On 2019/6/20 7:36, Eduardo Habkost wrote: On Wed, Jun 19, 2019 at 04:15:46PM -0300, Eduardo Habkost wrote: On Wed, Jun 12, 2019 at 04:41:02PM +0800, Like Xu wrote: In guest CPUID generation process, the cpuid_min_level would be adjusted to the maximum passed value for basic CPUID configuration

Re: [Qemu-devel] [PATCH v3 0/9] Introduce cpu die topology and enable CPUID.1F for i386

2019-06-18 Thread Like Xu
Ping for timely review. On 2019/6/12 16:40, Like Xu wrote: Multi-chip packaging technology allows integration of multi-cores in one die and multi-dies in one single package, for example Intel CLX-AP or AMD EPYC. This patch series extend the CPU topology to the socket/dies/core/thread model

[Qemu-devel] [PATCH v3 4/9] i386: Update new x86_apicid parsing rules with die_offset support

2019-06-12 Thread Like Xu
CPUIDs such as 0x3 for L3 cache should be mapping to die_offset. Signed-off-by: Like Xu --- hw/i386/pc.c | 29 ++- include/hw/i386/topology.h | 76 +++--- target/i386/cpu.c | 13 --- 3 files changed, 81 insertions(+), 37 deletions

[Qemu-devel] [PATCH v3 9/9] vl.c: Add -smp, dies=* command line support and update doc

2019-06-12 Thread Like Xu
computing. Signed-off-by: Like Xu --- hw/i386/pc.c| 32 ++-- qemu-options.hx | 17 + vl.c| 3 +++ 3 files changed, 30 insertions(+), 22 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 63b44bd2bd..8a5da4f0c1 100644 --- a/hw/i386/

[Qemu-devel] [PATCH v3 6/9] i386/cpu: Add CPUID.1F generation support for multi-dies PCMachine

2019-06-12 Thread Like Xu
of dies per package is less than 2, the qemu will not expose CPUID.1F regardless of whether the host supports CPUID.1F. Signed-off-by: Like Xu --- target/i386/cpu.c | 37 + target/i386/cpu.h | 4 target/i386/kvm.c | 12 3 files changed, 53

[Qemu-devel] [PATCH v3 5/9] tests/x86-cpuid: Update testcases in test_topo_bits() with multiple dies

2019-06-12 Thread Like Xu
The corresponding topo_bits tests are updated to support die configurations. Signed-off-by: Like Xu --- tests/test-x86-cpuid.c | 84 ++ 1 file changed, 45 insertions(+), 39 deletions(-) diff --git a/tests/test-x86-cpuid.c b/tests/test-x86-cpuid.c index

[Qemu-devel] [PATCH v3 0/9] Introduce cpu die topology and enable CPUID.1F for i386

2019-06-12 Thread Like Xu
nr_dies - Based on "[PATCH v3 00/10] Refactor cpu topo into machine properties" - Rebase to commit 2259637b95bef3116cc262459271de08e038cc66 v1: https://patchwork.kernel.org/cover/10876667/ Like Xu (9): i386: Add die-level cpu topology to x86CPU on PCMachine hw/i386: Adjust nr_die

[Qemu-devel] [PATCH v3 1/9] i386: Add die-level cpu topology to x86CPU on PCMachine

2019-06-12 Thread Like Xu
offline) on board will be calculated as: #cpus = #sockets * #dies * #cores * #threads and considering compatibility, the default value for #dies would be initialized to one in x86_cpu_initfn() and pc_machine_initfn(). Signed-off-by: Like Xu --- hw/i386/pc.c | 9 +++-- include/hw/i386

[Qemu-devel] [PATCH v3 2/9] hw/i386: Adjust nr_dies with configured smp_dies for PCMachine

2019-06-12 Thread Like Xu
oved. Suggested-by: Eduardo Habkost Signed-off-by: Like Xu --- hw/i386/pc.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 9e9a42f007..af2e95a1b9 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -1520,12 +1520,16 @@ void pc_acpi_sm

[Qemu-devel] [PATCH v3 8/9] machine: Refactor smp_parse() in vl.c as MachineClass::smp_parse()

2019-06-12 Thread Like Xu
called pc_smp_parse() has been added to hw/i386/pc.c, which in this patch changes nothing against the default one . Suggested-by: Eduardo Habkost Signed-off-by: Like Xu --- hw/core/machine.c| 77 hw/i386/pc.c | 76

[Qemu-devel] [PATCH v3 3/9] i386/cpu: Consolidate die-id validity in smp context

2019-06-12 Thread Like Xu
-by: Dr. David Alan Gilbert Signed-off-by: Like Xu --- hmp.c | 3 +++ hw/core/machine.c | 12 hw/i386/pc.c | 14 ++ include/hw/i386/topology.h | 2 ++ qapi/misc.json | 6 -- target/i386/cpu.c | 2

[Qemu-devel] [PATCH v3 7/9] target/i386: Support multi-dies when host doesn't support CPUID.1F

2019-06-12 Thread Like Xu
to be configured again by the last adjusted cpuid_min_level value. If a user wants to expose CPUID.1F by passing dies > 1 for any reason without host support, a per-cpu smp topology warning will appear but it's not blocked. Signed-off-by: Like Xu --- target/i386/kvm.c | 24 ++--

Re: [Qemu-devel] [PATCH v2 1/5] target/i386: Add cpu die-level topology support for X86CPU

2019-06-10 Thread Like Xu
On 2019/6/6 11:32, Eduardo Habkost wrote: On Tue, May 21, 2019 at 12:50:52AM +0800, Like Xu wrote: The die-level as the first PC-specific cpu topology is added to the leagcy cpu topology model which only covers sockets/cores/threads. In the new model with die-level support, the total number

Re: [Qemu-devel] [Qemu-ppc] [PATCH v3 04/10] hw/ppc: Replace global smp variables with machine smp properties

2019-06-06 Thread Like Xu
On 2019/6/6 16:20, Greg Kurz wrote: On Thu, 6 Jun 2019 13:07:32 +1000 David Gibson wrote: On Wed, Jun 05, 2019 at 11:54:56PM -0300, Eduardo Habkost wrote: On Wed, Jun 05, 2019 at 11:52:41PM -0300, Eduardo Habkost wrote: On Sun, May 19, 2019 at 04:54:22AM +0800, Like Xu wrote: The global

[Qemu-devel] [QUESTION] How to reduce network latency to improve netperf TCP_RR drastically?

2019-06-04 Thread Like Xu
netperf TCP STREAM guest to host - no regression Contact: MST --- I am trying to make some contributions to improving netperf TCP_RR. Could you please share more ideas or plans or implemental details to make it happen? Thanks, Like Xu

Re: [Qemu-devel] [PATCH v3 00/10] Refactor cpu topo into machine properties

2019-05-28 Thread Like Xu
Ping for [PATCH v3 00/10] Refactor cpu topo into machine properties. On 2019/5/26 21:51, Like Xu wrote: On 2019/5/19 4:54, Like Xu wrote: This patch series make existing cores/threads/sockets into machine properties and get rid of global smp_* variables they use currently. The purpose

Re: [Qemu-devel] [PATCH v2 2/5] i386/cpu: Consolidate die-id validity in smp context

2019-05-27 Thread Like Xu
On 2019/5/22 1:12, Dr. David Alan Gilbert wrote: * Like Xu (like...@linux.intel.com) wrote: Following the legacy smp check rules, the die_id validity is added to the same contexts as leagcy smp variables such as hmp_hotpluggable_cpus(), machine_set_cpu_numa_node(), cpu_slot_to_string

Re: [Qemu-devel] [PATCH v3 00/10] Refactor cpu topo into machine properties

2019-05-26 Thread Like Xu
On 2019/5/19 4:54, Like Xu wrote: This patch series make existing cores/threads/sockets into machine properties and get rid of global smp_* variables they use currently. The purpose of getting rid of globals is disentangle layer violations and let's do it one step at a time by replacing

[Qemu-devel] [PATCH v2 4/5] i386/cpu: Update apicid parsing rules and topo-bit tests for dies

2019-05-21 Thread Like Xu
such as 0x3 for L3 cache is mapping to die_offset from this commit. The corresponding topo_bits tests are updated to test die configurations. Signed-off-by: Like Xu --- hw/i386/pc.c | 38 +++-- include/hw/i386/topology.h | 76 -- target

[Qemu-devel] [PATCH v2 5/5] target/i386: Add CPUID.1F generation support for multi-die PCMachine

2019-05-21 Thread Like Xu
ost support, there will be a smp topology warning but it is not blocking. Signed-off-by: Like Xu --- target/i386/cpu.c | 37 + target/i386/cpu.h | 4 target/i386/kvm.c | 30 -- 3 files changed, 69 insertions(+), 2 deletions(-) d

[Qemu-devel] [PATCH v2 3/5] vl.c: Add -smp, dies=* command line support and update -smp doc

2019-05-21 Thread Like Xu
he parsing rules of new cpu-topology model obey the same restrictions/logic as the legacy socket/core/thread model especially on missing values computing. Signed-off-by: Like Xu --- qemu-options.hx | 17 +- vl.c| 89 - 2 files c

[Qemu-devel] [PATCH v2 0/5] Introduce cpu die topology and enable CPUID.1F for i386

2019-05-21 Thread Like Xu
tests for x86_apicid_from_cpu_idx() with nr_dies - Based on "[PATCH v3 00/10] Refactor cpu topo into machine properties" - Rebase to commit 2259637b95bef3116cc262459271de08e038cc66 v1: https://patchwork.kernel.org/cover/10876667/ Like Xu (5): target/i386: Add cpu die-level topolo

[Qemu-devel] [PATCH v2 1/5] target/i386: Add cpu die-level topology support for X86CPU

2019-05-21 Thread Like Xu
* #cores * #threads and considering compatibility, the default value for #dies is 1. A new set of die-related variables are added in smp context and the CPUX86State.nr_dies is assigned in x86_cpu_initfn() from PCMachineState. Signed-off-by: Like Xu --- hw/i386/pc.c | 3

[Qemu-devel] [PATCH v2 2/5] i386/cpu: Consolidate die-id validity in smp context

2019-05-21 Thread Like Xu
Following the legacy smp check rules, the die_id validity is added to the same contexts as leagcy smp variables such as hmp_hotpluggable_cpus(), machine_set_cpu_numa_node(), cpu_slot_to_string() and pc_cpu_pre_plug(). Signed-off-by: Like Xu --- hmp.c | 3 +++ hw/core/machine.c | 12

[Qemu-devel] [PATCH v3 08/10] hw/arm: Replace global smp variables with machine smp properties

2019-05-19 Thread Like Xu
only used once. No semantic changes. Signed-off-by: Like Xu Reviewed-by: Alistair Francis --- hw/arm/fsl-imx6.c | 6 +- hw/arm/fsl-imx6ul.c| 6 +- hw/arm/fsl-imx7.c | 7 +-- hw/arm/highbank.c | 1 + hw/arm/mcimx6ul-evk.c | 2 +- hw/arm/mcimx7d-sabre.c | 2

[Qemu-devel] [PATCH v3 02/10] machine: Refactor smp-related call chains to pass MachineState

2019-05-19 Thread Like Xu
() and mips *_create_cpu(). Suggested-by: Igor Mammedov Signed-off-by: Like Xu Reviewed-by: Alistair Francis --- hw/arm/virt.c| 2 +- hw/hppa/machine.c| 2 +- hw/i386/acpi-build.c | 2 +- hw/i386/pc.c | 9 - hw/mips/mips_malta.c

[Qemu-devel] [PATCH v3 10/10] vl.c: Replace smp global variables with smp machine properties

2019-05-19 Thread Like Xu
The global smp variables in vl.c are completely replaced with machine properties. Form this commit, the smp_cpus/smp_cores/smp_threads/max_cpus are deprecated and only machine properties within MachineState are fully applied and enabled. Signed-off-by: Like Xu Reviewed-by: Alistair Francis

[Qemu-devel] [PATCH v3 03/10] general: Replace global smp variables with smp machine properties

2019-05-19 Thread Like Xu
in the context. No semantic changes. Signed-off-by: Like Xu Reviewed-by: Alistair Francis --- accel/kvm/kvm-all.c | 4 ++-- backends/hostmem.c | 6 -- cpus.c | 6 -- exec.c | 3 ++- gdbstub.c| 4 hw/cpu

[Qemu-devel] [PATCH v3 05/10] hw/riscv: Replace global smp variables with machine smp properties

2019-05-19 Thread Like Xu
The global smp variables in riscv are replaced with smp machine properties. A local variable of the same name would be introduced in the declaration phase if it's used widely in the context OR replace it on the spot if it's only used once. No semantic changes. Signed-off-by: Like Xu --- hw

[Qemu-devel] [PATCH v3 06/10] hw/s390x: Replace global smp variables with machine smp properties

2019-05-19 Thread Like Xu
The global smp variables in s390x are replaced with smp machine properties. A local variable of the same name would be introduced in the declaration phase if it's used widely in the context OR replace it on the spot if it's only used once. No semantic changes. Signed-off-by: Like Xu --- hw

[Qemu-devel] [PATCH v3 04/10] hw/ppc: Replace global smp variables with machine smp properties

2019-05-19 Thread Like Xu
The global smp variables in ppc are replaced with smp machine properties. A local variable of the same name would be introduced in the declaration phase if it's used widely in the context OR replace it on the spot if it's only used once. No semantic changes. Signed-off-by: Like Xu --- hw/ppc

[Qemu-devel] [PATCH v3 07/10] hw/i386: Replace global smp variables with machine smp properties

2019-05-19 Thread Like Xu
if it's used widely in the context OR replace it on the spot if it's only used once. No semantic changes. Signed-off-by: Like Xu --- hw/i386/acpi-build.c | 11 +++ hw/i386/kvmvapic.c| 7 +-- hw/i386/pc.c | 24 +++- hw/i386/xen/xen-hvm.c | 4

[Qemu-devel] [PATCH v3 09/10] hw: Replace global smp variables with MachineState for all remaining archs

2019-05-19 Thread Like Xu
. No semantic changes. Signed-off-by: Like Xu Reviewed-by: Alistair Francis --- hw/alpha/dp264.c | 1 + hw/hppa/machine.c | 2 ++ hw/mips/boston.c | 2 +- hw/mips/mips_malta.c | 2 ++ hw/openrisc/openrisc_sim.c | 1 + hw/sparc/sun4m.c | 2 ++ hw/sparc64/sun4u.c

[Qemu-devel] [PATCH v3 00/10] Refactor cpu topo into machine properties

2019-05-19 Thread Like Xu
usage - use macs rather than ms in migration context for MigrationState - cleanup unrelated and redundant changes - spilt OpenRISC and RISC-V related patches v1: https://patchwork.kernel.org/cover/10876667/ Like Xu (10): hw/boards: Add struct CpuTopology to MachineState machine: Refactor smp

[Qemu-devel] [PATCH v3 01/10] hw/boards: Add struct CpuTopology to MachineState

2019-05-19 Thread Like Xu
l.c and there is no semantic change. Suggested-by: Igor Mammedov Suggested-by: Eduardo Habkost Signed-off-by: Like Xu Reviewed-by: Alistair Francis --- include/hw/boards.h | 15 +++ vl.c| 5 + 2 files changed, 20 insertions(+) diff --git a/include/hw/boards.

Re: [Qemu-devel] [PATCH v2 00/10] refactor cpu topo into machine properties

2019-05-09 Thread Like Xu
On 2019/5/6 16:33, Like Xu wrote: This patch series make existing cores/threads/sockets into machine properties and get rid of global smp_* variables they use currently. The purpose of getting rid of globals is disentangle layer violations and let's do it one step at a time by replacing

[Qemu-devel] [PATCH v2 10/10] cpu/topology: replace smp global variables with smp machine properties

2019-05-06 Thread Like Xu
At the end of this smp refactoring series, the global ones are removed and only smp machine properties are fully applied and enabled. Signed-off-by: Like Xu --- vl.c | 53 ++--- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/vl.c

[Qemu-devel] [PATCH v2 08/10] cpu/topology: add hw/i386 support for smp machine properties

2019-05-06 Thread Like Xu
-by: Like Xu --- hw/arm/vexpress.c | 4 ++-- hw/i386/acpi-build.c | 13 - hw/i386/kvmvapic.c| 7 +-- hw/i386/pc.c | 24 +++- hw/i386/xen/xen-hvm.c | 4 target/i386/cpu.c | 4 +++- 6 files changed, 37 insertions(+), 19 deletions

[Qemu-devel] [PATCH v2 00/10] refactor cpu topo into machine properties

2019-05-06 Thread Like Xu
calls as possible and delay other related refactoring efforts. Like Xu (10): hw/boards: add struct CpuTopology to MachineState cpu/topology: related call chains refactoring to pass MachineState cpu/topology: replace global smp variables by MachineState in general path cpu/topology: add

[Qemu-devel] [PATCH v2 05/10] cpu/topology: add hw/ppc support for smp machine properties

2019-05-06 Thread Like Xu
Following the replace rules, the global smp variables in ppc are replaced with smp machine properties. No semantic changes. Signed-off-by: Like Xu --- hw/ppc/e500.c | 3 +++ hw/ppc/mac_newworld.c | 3 ++- hw/ppc/mac_oldworld.c | 3 ++- hw/ppc/pnv.c | 6 -- hw/ppc/prep.c

[Qemu-devel] [PATCH v2 03/10] cpu/topology: replace global smp variables by MachineState in general path

2019-05-06 Thread Like Xu
. No semantic changes. Signed-off-by: Like Xu --- accel/kvm/kvm-all.c | 4 ++-- backends/hostmem.c | 6 -- cpus.c | 6 -- exec.c | 3 ++- gdbstub.c| 4 hw/cpu/core.c| 4

[Qemu-devel] [PATCH v2 09/10] cpu/topology: add hw/arm support for smp machine properties

2019-05-06 Thread Like Xu
Following the replace rules, the global smp variables in arm are replaced with smp machine properties. The init_cpus() and xlnx_zynqmp_create_rpu() are refactored to pass MachineState. No semantic changes. Signed-off-by: Like Xu --- hw/arm/fsl-imx6.c | 6 +- hw/arm/fsl-imx6ul.c

[Qemu-devel] [PATCH v2 02/10] cpu/topology: related call chains refactoring to pass MachineState

2019-05-06 Thread Like Xu
It's recommended to access smp variables via MachineState as an incoming parameter. This approach applies on legacy smbios_*_tables*(), *_machine_reset(), *__hot_add_cpu() and related *_create_cpu() for later smp variables usages. Suggested-by: Igor Mammedov Signed-off-by: Like Xu --- hw/arm

[Qemu-devel] [PATCH v2 04/10] cpu/topology: add uncommon arch support for smp machine properties

2019-05-06 Thread Like Xu
Following the replace rules, the global smp variables in hppa/mips/openrisc /sparc*/xtensa are replaced with smp machine properties. No semantic changes. Signed-off-by: Like Xu --- hw/alpha/dp264.c | 1 + hw/hppa/machine.c | 2 ++ hw/mips/boston.c | 2 +- hw/mips

[Qemu-devel] [PATCH v2 06/10] cpu/topology: add hw/riscv support for smp machine properties

2019-05-06 Thread Like Xu
Following the replace rules, the global smp variables in riscv are replaced with smp machine properties. No semantic changes. Signed-off-by: Like Xu --- hw/riscv/sifive_e.c| 6 -- hw/riscv/sifive_plic.c | 3 +++ hw/riscv/sifive_u.c| 6 -- hw/riscv/spike.c | 2 ++ hw/riscv

[Qemu-devel] [PATCH v2 07/10] cpu/topology: add hw/s390x support for smp machine properties

2019-05-06 Thread Like Xu
Following the replace rules, the global smp variables in s390x are replaced with smp machine properties. No semantic changes. Signed-off-by: Like Xu --- hw/s390x/s390-virtio-ccw.c | 3 ++- hw/s390x/sclp.c| 2 +- target/s390x/cpu.c | 3 +++ target/s390x/excp_helper.c | 5

[Qemu-devel] [PATCH v2 01/10] hw/boards: add struct CpuTopology to MachineState

2019-05-06 Thread Like Xu
To remove usages of global smp variables arch by arch, a bisect friendly way is introduced to initialize struct CpuTopology with duplicate ones; no semantic changes. Suggested-by: Igor Mammedov Suggested-by: Eduardo Habkost Signed-off-by: Like Xu --- include/hw/boards.h | 15

[Qemu-devel] [PATCH] hw/arm/fsl-imx: move cpus initialization to realize time after smp_cpus check

2019-04-30 Thread Like Xu
e. Suggested-by: Igor Mammedov Signed-off-by: Like Xu --- hw/arm/fsl-imx6.c | 13 +++-- hw/arm/fsl-imx6ul.c | 12 ++-- hw/arm/fsl-imx7.c | 15 +++ 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/hw/arm/fsl-imx6.c b/hw/arm/fsl-imx6.c index 7b7b97f..1

Re: [Qemu-devel] [PATCH 2/9] cpu/topology: add general support for machine properties

2019-04-30 Thread Like Xu
On 2019/4/4 22:25, Igor Mammedov wrote: On Fri, 29 Mar 2019 16:48:38 +0800 Like Xu wrote: diff --git a/cpus.c b/cpus.c index e83f72b..834a697 100644 --- a/cpus.c +++ b/cpus.c @@ -2067,6 +2067,10 @@ static void qemu_dummy_start_vcpu(CPUState *cpu) void qemu_init_vcpu(CPUState *cpu

Re: [Qemu-devel] [PATCH 0/4] Remove some qdev_get_machine() calls from CONFIG_USER_ONLY

2019-04-26 Thread Like Xu
On 2019/4/26 4:00, Eduardo Habkost wrote: This series moves some qdev code outside qdev.o, so it can be compiled only in CONFIG_SOFTMMU. The code being moved includes two qdev_get_machine() calls, so this will make it easier to move qdev_get_machine() to CONFIG_SOFTMMU later. After this

Re: [Qemu-devel] [PATCH v3 2/2] core/qdev: refactor qdev_get_machine() with type assertion

2019-04-24 Thread Like Xu
On 2019/4/25 1:21, Eduardo Habkost wrote: On Tue, Apr 23, 2019 at 03:59:31PM +0800, Like Xu wrote: On 2019/4/18 1:10, Eduardo Habkost wrote: On Wed, Apr 17, 2019 at 07:14:10AM +0200, Markus Armbruster wrote: Eduardo Habkost writes: On Mon, Apr 15, 2019 at 03:59:45PM +0800, Like Xu wrote

Re: [Qemu-devel] [PATCH v3 2/2] core/qdev: refactor qdev_get_machine() with type assertion

2019-04-23 Thread Like Xu
On 2019/4/18 1:10, Eduardo Habkost wrote: On Wed, Apr 17, 2019 at 07:14:10AM +0200, Markus Armbruster wrote: Eduardo Habkost writes: On Mon, Apr 15, 2019 at 03:59:45PM +0800, Like Xu wrote: To avoid the misuse of qdev_get_machine() if machine hasn't been created yet, this patch uses

Re: [Qemu-devel] [PATCH 3/9] cpu/topology: add uncommon arch support for smp machine properties

2019-04-16 Thread Like Xu
On 2019/4/8 20:54, Igor Mammedov wrote: On Fri, 29 Mar 2019 16:48:39 +0800 Like Xu wrote: here should be a commit message explaining what patch does in more detail. Signed-off-by: Like Xu Generic note, try not call qdev_get_machine() every time you replace smp_cpus or other variables

[Qemu-devel] [PATCH v3 1/2] vl.c: refactor current_machine as non-global variable

2019-04-15 Thread Like Xu
This patch makes the remaining dozen or so uses of the global current_machine outside vl.c use qdev_get_machine() instead, and then make current_machine local to vl.c instead of global. Suggested-by: Peter Maydell Signed-off-by: Like Xu --- accel/kvm/kvm-all.c | 6 -- device-hotplug.c

[Qemu-devel] [PATCH v3 2/2] core/qdev: refactor qdev_get_machine() with type assertion

2019-04-15 Thread Like Xu
To avoid the misuse of qdev_get_machine() if machine hasn't been created yet, this patch uses qdev_get_machine_uncheck() for obj-common (share with user-only mode) and adds type assertion to qdev_get_machine() in system-emulation mode. Suggested-by: Igor Mammedov Signed-off-by: Like Xu --- hw

[Qemu-devel] [PATCH v3 0/2] vl.c: make current_machine as non-global variable

2019-04-15 Thread Like Xu
tatic" (Thomas Huth) Like Xu (2): vl.c: refactor current_machine as non-global variable core/qdev: refactor qdev_get_machine() with type assertion accel/kvm/kvm-all.c| 6 -- device-hotplug.c | 3 ++- device_tree.c | 3 ++- exec.c | 6 -- hw/c

Re: [Qemu-devel] [PATCH 0/9] refactor cpu topo into machine properties

2019-04-08 Thread Like Xu
On 2019/4/8 21:26, Igor Mammedov wrote: On Thu, 4 Apr 2019 11:26:09 +0800 Like Xu wrote: On 2019/3/29 18:21, Igor Mammedov wrote: On Fri, 29 Mar 2019 16:48:36 +0800 Like Xu wrote: This patch series make existing cores/threads/sockets into machine properties and get rid of global

Re: [Qemu-devel] [PATCH v2] vl.c: make current_machine as non-global variable

2019-04-04 Thread Like Xu
On 2019/4/3 0:13, Markus Armbruster wrote: Igor Mammedov writes: On Tue, 2 Apr 2019 21:09:39 +0800 Like Xu wrote: On 2019/4/2 19:27, Markus Armbruster wrote: Like Xu writes: This patch makes the remaining dozen or so uses of the global current_machine outside vl.c use

Re: [Qemu-devel] [PATCH 0/9] refactor cpu topo into machine properties

2019-04-03 Thread Like Xu
On 2019/3/29 18:21, Igor Mammedov wrote: On Fri, 29 Mar 2019 16:48:36 +0800 Like Xu wrote: This patch series make existing cores/threads/sockets into machine properties and get rid of global variables they use currently. Thanks for looking into it! Its long overdue and rather desired

Re: [Qemu-devel] [PATCH v2] vl.c: make current_machine as non-global variable

2019-04-02 Thread Like Xu
On 2019/4/2 19:27, Markus Armbruster wrote: Like Xu writes: This patch makes the remaining dozen or so uses of the global current_machine outside vl.c use qdev_get_machine() instead, and then make current_machine local to vl.c instead of global. Signed-off-by: Like Xu You effectively

[Qemu-devel] [PATCH v2] vl.c: make current_machine as non-global variable

2019-04-02 Thread Like Xu
This patch makes the remaining dozen or so uses of the global current_machine outside vl.c use qdev_get_machine() instead, and then make current_machine local to vl.c instead of global. Signed-off-by: Like Xu --- Changes in v2: - make the variable current_machine "static" (T

[Qemu-devel] [PATCH] vl.c: make current_machine as non-global variable

2019-04-02 Thread Like Xu
This patch makes the remaining dozen or so uses of the global current_machine outside vl.c use qdev_get_machine() instead, and then make current_machine local to vl.c instead of global. Signed-off-by: Like Xu --- accel/kvm/kvm-all.c | 6 -- device-hotplug.c| 3 ++- device_tree.c

Re: [Qemu-devel] [PATCH 4/9] cpu/topology: add ARM support for smp machine properties

2019-04-01 Thread Like Xu
On 2019/4/2 12:45, Peter Maydell wrote: On Tue, 2 Apr 2019 at 09:46, Like Xu wrote: On 2019/4/2 7:38, Eduardo Habkost wrote: On Mon, Apr 01, 2019 at 10:56:30AM +0800, Like Xu wrote: On 2019/3/29 17:27, Alex Bennée wrote: [...] @@ -1713,6 +1717,9 @@ static void cortex_a9_initfn(Object *obj

Re: [Qemu-devel] [PATCH 4/9] cpu/topology: add ARM support for smp machine properties

2019-04-01 Thread Like Xu
On 2019/4/2 7:38, Eduardo Habkost wrote: On Mon, Apr 01, 2019 at 10:56:30AM +0800, Like Xu wrote: On 2019/3/29 17:27, Alex Bennée wrote: [...] @@ -1713,6 +1717,9 @@ static void cortex_a9_initfn(Object *obj) #ifndef CONFIG_USER_ONLY static uint64_t a15_l2ctlr_read(CPUARMState *env, const

Re: [Qemu-devel] [PATCH 4/9] cpu/topology: add ARM support for smp machine properties

2019-03-31 Thread Like Xu
On 2019/3/29 17:27, Alex Bennée wrote: Like Xu writes: Signed-off-by: Like Xu --- hw/arm/fsl-imx6.c | 5 + hw/arm/fsl-imx6ul.c| 5 + hw/arm/fsl-imx7.c | 5 + hw/arm/highbank.c | 1 + hw/arm/mcimx6ul-evk.c | 1 + hw/arm/mcimx7d-sabre.c | 3 +++ hw/arm

Re: [Qemu-devel] [Qemu-trivial] [PATCH 4/9] cpu/topology: add ARM support for smp machine properties

2019-03-31 Thread Like Xu
On 2019/3/29 19:20, Philippe Mathieu-Daudé wrote: Le ven. 29 mars 2019 10:27, Alex Bennée a écrit : Like Xu writes: Signed-off-by: Like Xu --- hw/arm/fsl-imx6.c | 5 + hw/arm/fsl-imx6ul.c| 5 + hw/arm/fsl-imx7.c | 5 + hw/arm/highbank.c | 1 + hw/arm

Re: [Qemu-devel] [PATCH 7/9] cpu/topology: add riscv support for smp machine properties

2019-03-31 Thread Like Xu
On 2019/3/30 7:01, Alistair Francis wrote: On Fri, Mar 29, 2019 at 1:59 AM Like Xu wrote: Signed-off-by: Like Xu --- hw/openrisc/openrisc_sim.c | 1 + hw/riscv/sifive_e.c| 4 hw/riscv/sifive_plic.c | 3 +++ hw/riscv/sifive_u.c| 4 hw/riscv/spike.c

Re: [Qemu-devel] [PATCH 1/9] cpu/topology: add struct CpuTopology to MachineState

2019-03-31 Thread Like Xu
On 2019/3/29 17:22, Alex Bennée wrote: Like Xu writes: Signed-off-by: Like Xu --- include/hw/arm/virt.h | 2 +- include/hw/boards.h | 8 include/sysemu/sysemu.h | 2 +- vl.c| 7 ++- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git

[Qemu-devel] [PATCH 7/9] cpu/topology: add riscv support for smp machine properties

2019-03-29 Thread Like Xu
Signed-off-by: Like Xu --- hw/openrisc/openrisc_sim.c | 1 + hw/riscv/sifive_e.c| 4 hw/riscv/sifive_plic.c | 3 +++ hw/riscv/sifive_u.c| 4 hw/riscv/spike.c | 2 ++ hw/riscv/virt.c| 1 + 6 files changed, 15 insertions(+) diff --git a/hw

[Qemu-devel] [PATCH 6/9] cpu/topology: add PPC support for smp machine properties

2019-03-29 Thread Like Xu
Signed-off-by: Like Xu --- hw/ppc/e500.c | 3 +++ hw/ppc/mac_newworld.c | 2 ++ hw/ppc/mac_oldworld.c | 2 ++ hw/ppc/pnv.c | 3 +++ hw/ppc/prep.c | 2 ++ hw/ppc/spapr.c| 29 + hw/ppc/spapr_rtas.c | 3 +++ 7 files changed, 44

[Qemu-devel] [PATCH 5/9] cpu/topology: add i386 support for smp machine properties

2019-03-29 Thread Like Xu
Signed-off-by: Like Xu --- hw/i386/acpi-build.c | 3 +++ hw/i386/kvmvapic.c | 5 + hw/i386/pc.c | 12 target/i386/cpu.c| 4 4 files changed, 24 insertions(+) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index 416da31..3813c28 100644 --- a/hw

[Qemu-devel] [PATCH 2/9] cpu/topology: add general support for machine properties

2019-03-29 Thread Like Xu
Signed-off-by: Like Xu --- accel/kvm/kvm-all.c | 3 +++ backends/hostmem.c | 4 cpus.c | 4 exec.c | 2 ++ gdbstub.c| 7 ++- hw/cpu/core.c| 3 +++ hw/smbios/smbios.c | 11 +++ migration

[Qemu-devel] [PATCH 9/9] cpu/topology: replace smp global variables with machine propertie

2019-03-29 Thread Like Xu
Signed-off-by: Like Xu --- vl.c | 53 ++--- 1 file changed, 26 insertions(+), 27 deletions(-) diff --git a/vl.c b/vl.c index 9089253..0c5a384 100644 --- a/vl.c +++ b/vl.c @@ -162,10 +162,6 @@ static Chardev **serial_hds; Chardev *parallel_hds

[Qemu-devel] [PATCH 0/9] refactor cpu topo into machine properties

2019-03-29 Thread Like Xu
This patch series make existing cores/threads/sockets into machine properties and get rid of global variables they use currently. Like Xu (9): cpu/topology: add struct CpuTopology to MachineState cpu/topology: add general support for machine properties cpu/topology: add uncommon arch

[Qemu-devel] [PATCH 3/9] cpu/topology: add uncommon arch support for smp machine properties

2019-03-29 Thread Like Xu
Signed-off-by: Like Xu --- hw/alpha/dp264.c | 1 + hw/hppa/machine.c| 4 hw/mips/boston.c | 1 + hw/mips/mips_malta.c | 9 + hw/sparc/sun4m.c | 2 ++ hw/sparc64/sun4u.c | 2 ++ hw/xtensa/sim.c | 1 + hw/xtensa/xtfpga.c | 1 + 8 files changed, 21 insertions

[Qemu-devel] [PATCH 4/9] cpu/topology: add ARM support for smp machine properties

2019-03-29 Thread Like Xu
Signed-off-by: Like Xu --- hw/arm/fsl-imx6.c | 5 + hw/arm/fsl-imx6ul.c| 5 + hw/arm/fsl-imx7.c | 5 + hw/arm/highbank.c | 1 + hw/arm/mcimx6ul-evk.c | 1 + hw/arm/mcimx7d-sabre.c | 3 +++ hw/arm/raspi.c | 2 ++ hw/arm/realview.c | 1 + hw/arm

[Qemu-devel] [PATCH 1/9] cpu/topology: add struct CpuTopology to MachineState

2019-03-29 Thread Like Xu
Signed-off-by: Like Xu --- include/hw/arm/virt.h | 2 +- include/hw/boards.h | 8 include/sysemu/sysemu.h | 2 +- vl.c| 7 ++- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/include/hw/arm/virt.h b/include/hw/arm/virt.h index 507517c

[Qemu-devel] [PATCH 8/9] cpu/topology: add s390x support for smp machine properties

2019-03-29 Thread Like Xu
Signed-off-by: Like Xu --- hw/s390x/s390-virtio-ccw.c | 2 ++ hw/s390x/sclp.c | 1 + target/openrisc/sys_helper.c | 5 + target/s390x/cpu.c | 3 +++ target/s390x/excp_helper.c | 6 ++ 5 files changed, 17 insertions(+) diff --git a/hw/s390x/s390-virtio-ccw.c b

[Qemu-devel] [Bug 1816052] Re: qemu system emulator fails to start if no sound card is present on host

2019-02-25 Thread Like Xu
I would work around this issue by applying "export QEMU_AUDIO_DRV=none" to shell before we run the qemu command. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1816052 Title: qemu system emulator

Re: [Qemu-devel] [Bug 1816052] Re: qemu system emulator fails to start if no sound card is present on host

2019-02-24 Thread Like Xu
On 2019/2/19 17:02, Gerd Hoffmann wrote: What happens if you remove "try-alsa" from the configure line? This issue could be fixed by passing "export QEMU_AUDIO_DRV=none" to shell env when alsa support form host kernel is unavailable.

Re: [Qemu-devel] [PATCH] doc: update .gitignore and fix typos for docs in tree

2019-02-19 Thread Like Xu
On 2019/2/20 11:09, Eric Blake wrote: On 2/20/19 2:55 AM, Like Xu wrote: Signed-off-by: Like Xu This feels like two independent patches - the .gitignore change is different from typo fixes. Actually, for .gitignore, you could just as easily do: echo '*.patch' >> .git/info/exclude a

[Qemu-devel] [PATCH v2] doc: fix typos for documents in tree

2019-02-19 Thread Like Xu
Signed-off-by: Like Xu --- docs/COLO-FT.txt | 2 +- docs/amd-memory-encryption.txt | 2 +- docs/can.txt | 2 +- docs/colo-proxy.txt| 6 +++--- docs/cpu-hotplug.rst | 2 +- docs/qcow2-cache.txt | 2 +- docs/qemu-block-drivers.texi

[Qemu-devel] [PATCH] doc: update .gitignore and fix typos for docs in tree

2019-02-19 Thread Like Xu
Signed-off-by: Like Xu --- .gitignore | 1 + docs/COLO-FT.txt | 2 +- docs/amd-memory-encryption.txt | 2 +- docs/can.txt | 2 +- docs/colo-proxy.txt| 6 +++--- docs/cpu-hotplug.rst | 2 +- docs/qcow2-cache.txt

Re: [Qemu-devel] Live migration from Qemu 2.12 hosts to Qemu 3.2 hosts, with VMX flag enabled in the guest?

2019-01-21 Thread Like Xu
On 2019/1/18 14:18, Christian Ehrhardt wrote: On Fri, Jan 18, 2019 at 7:33 AM Mark Mielke wrote: Thank you for the work on nested virtualization. Having had live migrations fail in the past when nested virtualization has been active, it is great to see that clever people have been working on

Re: [Qemu-devel] [PATCH v1 0/5] Introduce cpu die topology and enable CPUID.1F for i386

2019-01-17 Thread Like Xu
On 2019/1/17 22:24, Igor Mammedov wrote: On Mon, 14 Jan 2019 20:24:54 +0800 Like Xu wrote: As we know, die is a rectangular piece of a semiconductor wafer. It's very common that chip manufacturers put a multi-core die in one package and one die always has a one-to-one relationship with one

Re: [Qemu-devel] [PATCH v1 2/5] vl.c: add -smp, dies=* command line support

2019-01-16 Thread Like Xu
On 2019/1/17 2:26, Daniel P. Berrangé wrote: On Mon, Jan 14, 2019 at 06:51:34PM -0200, Eduardo Habkost wrote: On Mon, Jan 14, 2019 at 08:24:56PM +0800, Like Xu wrote: This patch updates the check rules on legeacy -smp parse from user command and it's designed to obey the same restrictions

[Qemu-devel] [PATCH v1 4/5] i386: enable CPUID.1F leaf generation based on spec

2019-01-13 Thread Like Xu
This patch uses the new socket/die/core/thread model to generate cpuid.1f eax/ebx/ecx/edx values especially the subleaf 2 which keeps die level information and adds an option in the cpu_x86_cpuid. Signed-off-by: Like Xu --- target/i386/cpu.c | 57

[Qemu-devel] [PATCH v1 3/5] i386: extend x86_apicid_* functions for smp_dies support

2019-01-13 Thread Like Xu
This patch rewrites the width/offset-apicid calculation with compatibility. It keeps the original symmetry as a default method and sets the die_id as well as node_id for leageacy numde_node auto-configuration. Signed-off-by: Like Xu --- hw/i386/pc.c | 37

[Qemu-devel] [PATCH v1 0/5] Introduce cpu die topology and enable CPUID.1F for i386

2019-01-13 Thread Like Xu
=0x0201 edx=0x0001 0x001f 0x02: eax=0x0002 ebx=0x0004 ecx=0x0502 edx=0x0003 0x001f 0x03: eax=0x ebx=0x ecx=0x0003 edx=0x0001 Like Xu (5): cpu: introduce die, the new cpu toppolgy emulation level vl.c: add -smp,dies=* command line support

[Qemu-devel] [PATCH v1 2/5] vl.c: add -smp, dies=* command line support

2019-01-13 Thread Like Xu
This patch updates the check rules on legeacy -smp parse from user command and it's designed to obey the same restrictions as socket/core/thread model. Signed-off-by: Like Xu --- hmp.c | 3 +++ hw/core/machine.c | 12 vl.c | 33

[Qemu-devel] [PATCH v1 1/5] cpu: introduce die, the new cpu toppolgy emulation level

2019-01-13 Thread Like Xu
-by: Like Xu --- cpus.c| 1 + include/qom/cpu.h | 1 + include/sysemu/cpus.h | 1 + qapi/misc.json| 1 + target/i386/cpu.h | 5 + 5 files changed, 9 insertions(+) diff --git a/cpus.c b/cpus.c index b09b702..503558d 100644 --- a/cpus.c +++ b/cpus.c @@ -2066,6

[Qemu-devel] [PATCH v1 5/5] i386: add CPUID.1F to cpuid_data with host_cpuid check

2019-01-13 Thread Like Xu
When cs->nr_dies is larger than 1, the CPUID.1F should be generated and is added to cpuid_data.entries for guest awareness. This patch provides a return option in kvm_has_cpuid_1f for default choice. Signed-off-by: Like Xu --- target/i386/kvm.c |

  1   2   >