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-01 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 a

[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 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] [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] [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 f

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/

[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 t

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 wit

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 restrictio

[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
2 ecx=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 su

[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

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

2019-01-13 Thread Like Xu
: 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