[PATCH v12 10/16] machine: Use ms instead of global current_machine in sanity-check

2021-09-28 Thread Yanan Wang
In the sanity-check of smp_cpus and max_cpus against mc in function machine_set_smp(), we are now using ms->smp.max_cpus for the check but using current_machine->smp.max_cpus in the error message. Tweak this by uniformly using the local ms. Signed-off-by: Yanan Wang Reviewed-by: Andrew Jones Rev

[PATCH v12 08/16] qtest/numa-test: Use detailed -smp CLIs in test_def_cpu_split

2021-09-28 Thread Yanan Wang
Since commit 80d7835749 (qemu-options: rewrite help for -smp options), the preference of sockets/cores in -smp parsing is considered liable to change, and actually we are going to change it in a coming commit. So it'll be more stable to use detailed -smp CLIs in the testcases that have strong depen

[PATCH v12 15/16] machine: Put all sanity-check in the generic SMP parser

2021-09-28 Thread Yanan Wang
Put both sanity-check of the input SMP configuration and sanity-check of the output SMP configuration uniformly in the generic parser. Then machine_set_smp() will become cleaner, also all the invalid scenarios can be tested only by calling the parser. Signed-off-by: Yanan Wang Reviewed-by: Andrew

[PATCH v12 09/16] machine: Prefer cores over sockets in smp parsing since 6.2

2021-09-28 Thread Yanan Wang
In the real SMP hardware topology world, it's much more likely that we have high cores-per-socket counts and few sockets totally. While the current preference of sockets over cores in smp parsing results in a virtual cpu topology with low cores-per-sockets counts and a large number of sockets, whic

[PATCH v12 05/16] machine: Set the value of cpus to match maxcpus if it's omitted

2021-09-28 Thread Yanan Wang
Currently we directly calculate the omitted cpus based on the given incomplete collection of parameters. This makes some cmdlines like: -smp maxcpus=16 -smp sockets=2,maxcpus=16 -smp sockets=2,dies=2,maxcpus=16 -smp sockets=2,cores=4,maxcpus=16 not work. We should probably set the value of

[PATCH v12 03/16] machine: Minor refactor/fix for the smp parsers

2021-09-28 Thread Yanan Wang
To pave the way for the functional improvement in later patches, make some refactor/cleanup for the smp parsers, including using local maxcpus instead of ms->smp.max_cpus in the calculation, defaulting dies to 0 initially like other members, cleanup the sanity check for dies. We actually also fix

[PATCH v12 13/16] machine: Remove smp_parse callback from MachineClass

2021-09-28 Thread Yanan Wang
Now we have a generic smp parser for all arches, and there will not be any other arch specific ones, so let's remove the callback from MachineClass and call the parser directly. Signed-off-by: Yanan Wang Reviewed-by: Andrew Jones Reviewed-by: Daniel P. Berrangé --- hw/core/machine.c | 3 +--

[PATCH v12 16/16] machine: Make smp_parse return a boolean

2021-09-28 Thread Yanan Wang
Quoting one of the Rules described in include/qapi/error.h: " Whenever practical, also return a value that indicates success / failure. This can make the error checking more concise, and can avoid useless error object creation and destruction. Note that we still have many functions returning void

Re: [PATCH] hw/arm/virt: Allow additions to the generated device tree

2021-09-28 Thread Simon Glass
Hi Peter, On Tue, 28 Sept 2021 at 03:21, Peter Maydell wrote: > > On Mon, 27 Sept 2021 at 21:12, Simon Glass wrote: > > I think you are misunderstanding my patch and that may be the problem here. > > > > Where QEMU is provided with a dtb (-dtb) it uses that and passes it > > on. This is absolute

[PATCH v12 12/16] machine: Make smp_parse generic enough for all arches

2021-09-28 Thread Yanan Wang
Currently the only difference between smp_parse and pc_smp_parse is the support of dies parameter and the related error reporting. With some arch compat variables like "bool dies_supported", we can make smp_parse generic enough for all arches and the PC specific one can be removed. Making smp_pars

[PATCH v12 11/16] machine: Tweak the order of topology members in struct CpuTopology

2021-09-28 Thread Yanan Wang
Now that all the possible topology parameters are integrated in struct CpuTopology, tweak the order of topology members to be "cpus/sockets/ dies/cores/threads/maxcpus" for readability and consistency. We also tweak the comment by adding explanation of dies parameter. Signed-off-by: Yanan Wang Re

[PATCH v12 14/16] machine: Move smp_prefer_sockets to struct SMPCompatProps

2021-09-28 Thread Yanan Wang
Now we have a common structure SMPCompatProps used to store information about SMP compatibility stuff, so we can also move smp_prefer_sockets there for cleaner code. No functional change intended. Signed-off-by: Yanan Wang Acked-by: David Gibson Reviewed-by: Andrew Jones Reviewed-by: Daniel P.

Re: [RFC PATCH 01/11] target/riscv: Add CLIC CSR mintstatus

2021-09-28 Thread Alistair Francis
On Tue, Sep 28, 2021 at 6:10 PM Frank Chang wrote: > > On Fri, Jul 2, 2021 at 3:17 PM Alistair Francis wrote: >> >> On Fri, Jul 2, 2021 at 4:11 PM LIU Zhiwei wrote: >> > >> > >> > On 2021/7/2 下午1:38, Alistair Francis wrote: >> > > On Thu, Jul 1, 2021 at 6:45 PM Frank Chang >> > > wrote: >> > >

Re: [PATCH v2 2/3] target/riscv: Implement the stval/mtval illegal instruction

2021-09-28 Thread Alistair Francis
On Fri, Sep 24, 2021 at 10:57 PM Richard Henderson wrote: > > On 9/24/21 2:48 AM, Alistair Francis wrote: > >> But... more specific to this case. Prior to this, was the exception > >> handler allowed to > >> assume anything about the contents of stval? Should the value have been > >> zero? Wo

Re: [PATCH v4 0/4] QEMU RISC-V ACLINT Support

2021-09-28 Thread Anup Patel
On Tue, Aug 31, 2021 at 4:36 PM Anup Patel wrote: > > The RISC-V Advanced Core Local Interruptor (ACLINT) is an improvement > over the SiFive CLINT but also maintains backward compatibility with > the SiFive CLINT. > > Latest RISC-V ACLINT specification (will be frozen soon) can be found at: > htt

Re: [PATCH v4 0/4] QEMU RISC-V ACLINT Support

2021-09-28 Thread Alistair Francis
On Wed, Sep 29, 2021 at 2:09 PM Anup Patel wrote: > > On Tue, Aug 31, 2021 at 4:36 PM Anup Patel wrote: > > > > The RISC-V Advanced Core Local Interruptor (ACLINT) is an improvement > > over the SiFive CLINT but also maintains backward compatibility with > > the SiFive CLINT. > > > > Latest RISC-

Re: [PATCH v4 0/4] QEMU RISC-V ACLINT Support

2021-09-28 Thread Anup Patel
On Wed, Sep 29, 2021 at 9:52 AM Alistair Francis wrote: > > On Wed, Sep 29, 2021 at 2:09 PM Anup Patel wrote: > > > > On Tue, Aug 31, 2021 at 4:36 PM Anup Patel wrote: > > > > > > The RISC-V Advanced Core Local Interruptor (ACLINT) is an improvement > > > over the SiFive CLINT but also maintains

Re: [RFC PATCH: v3 1/2] add mi device in qemu

2021-09-28 Thread Klaus Jensen
On Aug 3 12:54, Padmakar Kalghatgi wrote: > From: padmakar > > This patch contains the implementation of certain commands > of nvme-mi specification.The MI commands are useful to > manage/configure/monitor the device.Eventhough the MI commands > can be sent via the inband NVMe-MI send/recieve c

Re: [PATCH v3 0/2] modules: Improve modinfo.c support

2021-09-28 Thread Gerd Hoffmann
On Tue, Sep 28, 2021 at 05:46:26PM -0300, Jose R. Ziviani wrote: > This patchset introduces the modinfo_kconfig aiming for a fine-tune > control of module loading by simply checking Kconfig options during the > compile time, then generates one modinfo--softmmu.c per target. > > The main reason of

Re: [PATCH V3 00/10] vhost-vDPA multiqueue

2021-09-28 Thread Jason Wang
On Tue, Sep 7, 2021 at 5:03 PM Jason Wang wrote: > > Hi All: > > This patch implements the multiqueue support for vhost-vDPA. The most > important requirement si the control virtqueue support. The virtio-net > and vhost-net core are tweak to support control virtqueue as if what > data queue pairs

Re: [PATCH 2/3] hw/arm/virt-acpi-build: IORT upgrade up to revision E.b

2021-09-28 Thread Eric Auger
Hi Philippe, On 9/28/21 7:56 PM, Philippe Mathieu-Daudé wrote: > Hi Eric, > > On 9/28/21 19:21, Eric Auger wrote: >> Upgrade the IORT table from B to E.b specification >> revision (ARM DEN 0049E.b). >> >> Signed-off-by: Eric Auger >> --- >> hw/arm/virt-acpi-build.c | 47 -

Re: [PATCH] qapi: Make some ObjectTypes depend on the build settings

2021-09-28 Thread Thomas Huth
On 28/09/2021 19.39, Philippe Mathieu-Daudé wrote: On 9/28/21 18:02, Thomas Huth wrote: Some of the ObjectType entries already depend on CONFIG_* switches. Some others also only make sense with certain configurations, but are currently always listed in the ObjectType enum. Let's make them depend

Re: [RFC 0/1] hw/ipmi: add an aspeed IPMI iBT device model

2021-09-28 Thread Cédric Le Goater
Hello Titus, On 9/29/21 00:39, Titus Rwantare wrote: This patch follows the Handing IPMI for emulating BMC patch set by Hao Wu. Building on top of the work in [PATCH] hw/misc: Add an iBT device model posted by Cédric Le Goater, this iBT model works as a backend to ipmi-host-extern. Could you p

Re: [PATCH qemu] issue 371: convert tabs to spaces for the block subsystem.

2021-09-28 Thread Thomas Huth
On 29/09/2021 07.30, ~farzon wrote: From: Farzon Lotfi Hi! Thanks for your contribution! However, there are some more rules that need to be followed to get a patch accepted in the QEMU project: Please provide a proper patch description for your changes (something like: "QEMU coding style

Re: [PATCH v5 18/20] nubus: add support for slot IRQs

2021-09-28 Thread Mark Cave-Ayland
On 24/09/2021 10:05, Philippe Mathieu-Daudé wrote: On 9/24/21 11:01, Philippe Mathieu-Daudé wrote: On 9/24/21 09:06, Mark Cave-Ayland wrote: On 23/09/2021 10:49, Philippe Mathieu-Daudé wrote: On 9/23/21 11:13, Mark Cave-Ayland wrote: Each Nubus slot has an IRQ line that can be used to reque

[PATCH] virtio-net : Add check for VIRTIO_NET_F_MAC

2021-09-28 Thread Cindy Lu
For vdpa device, if the host support VIRTIO_NET_F_MAC we need to read the mac address from hardware, so need to check this bit, the logic is 1 if the host support VIRTIO_NET_F_MAC and the mac address is correct, qemu will use the mac address in hardware 2.if the host not support , qemu will use

<    1   2   3