[PULL 17/30] ppc/spapr: Use start-powered-off CPUState property

2020-09-03 Thread David Gibson
From: Thiago Jung Bauermann PowerPC sPAPR CPUs start in the halted state, and spapr_reset_vcpu() attempts to implement this by setting CPUState::halted to 1. But that's too late for the case of hotplugged CPUs in a machine configure with 2 or more threads per core. By then, other parts of QEMU h

[PULL 18/30] ppc/e500: Use start-powered-off CPUState property

2020-09-03 Thread David Gibson
From: Thiago Jung Bauermann Instead of setting CPUState::halted to 1 in ppce500_cpu_reset_sec(), use the start-powered-off property which makes cpu_common_reset() initialize it to 1 in common code. Also change creation of CPU object from cpu_create() to object_new() and qdev_realize_and_unref()

[PULL 02/30] ppc/pnv: Fix TypeInfo of PnvLpcController abstract class

2020-09-03 Thread David Gibson
From: Cédric Le Goater It was missing the instance_size field. Cc: Eduardo Habkost Signed-off-by: Cédric Le Goater Message-Id: <20200822083920.2668930-1-...@kaod.org> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: David Gibson --- hw/ppc/pnv_lpc.c | 3 +-- 1 file changed, 1 insertion(+)

[PULL 25/30] ppc: introducing spapr_numa.c NUMA code helper

2020-09-03 Thread David Gibson
From: Daniel Henrique Barboza We're going to make changes in how spapr handles all ibm,associativity* related properties to enhance our current NUMA support. At this moment we have associativity code scattered all around spapr_* files, with hardcoded values and array sizes. This makes it harder

[PULL 13/30] spapr, spapr_nvdimm: fold NVDIMM validation in the same place

2020-09-03 Thread David Gibson
From: Daniel Henrique Barboza NVDIMM has different contraints and conditions than the regular DIMM and we'll need to add at least one more. Instead of relying on 'if (nvdimm)' conditionals in the body of spapr_memory_pre_plug(), use the existing spapr_nvdimm_validate_opts() and put all NVDIMM ha

[PULL 19/30] mips/cps: Use start-powered-off CPUState property

2020-09-03 Thread David Gibson
From: Thiago Jung Bauermann Instead of setting CPUState::halted to 1 in main_cpu_reset(), use the start-powered-off property which makes cpu_common_reset() initialize it to 1 in common code. Also change creation of CPU object from cpu_create() to object_new() and qdev_realize_and_unref() because

[PULL 06/30] spapr_vscsi: do not allow device hotplug

2020-09-03 Thread David Gibson
From: Daniel Henrique Barboza We do not implement hotplug in the vscsi bus, but we forgot to tell qdev about it. The result is that users are able to hotplug devices in the vscsi bus, the devices appear in qdev, but they aren't usable by the guest OS unless the user reboots it first. Setting qbu

[PULL 16/30] target/arm: Move setting of CPU halted state to generic code

2020-09-03 Thread David Gibson
From: Thiago Jung Bauermann This change is in a separate patch because it's not so obvious that it won't cause a regression. Suggested-by: Eduardo Habkost Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: David Gibson Reviewed-by: Greg Kurz Signed-off-by: Thiago Jung Bauermann Message-Id: <2

[PULL 07/30] spapr/xive: Use the xics flag to check for XIVE-only IRQ backends

2020-09-03 Thread David Gibson
From: Cédric Le Goater The sPAPR machine has four different IRQ backends, each implementing the XICS or XIVE interrupt mode or both in the case of the 'dual' backend. If a machine is started in P8 compat mode, QEMU should necessarily support the XICS interrupt mode and in that case, the XIVE-onl

[PULL 22/30] target/s390x: Use start-powered-off CPUState property

2020-09-03 Thread David Gibson
From: Thiago Jung Bauermann Instead of setting CPUState::halted to 1 in s390_cpu_initfn(), use the start-powered-off property which makes cpu_common_reset() initialize it to 1 in common code. Note that this changes behavior by setting cs->halted to 1 on reset, which didn't happen before. Acked-

[PULL 24/30] hw/ppc/ppc4xx_pci: Replace pointless warning by assert()

2020-09-03 Thread David Gibson
From: Philippe Mathieu-Daudé We call pci_register_root_bus() to register 4 IRQs with the ppc4xx_pci_set_irq() handler. As it can only be called with values in the [0-4[ range, replace the pointless warning by an assert(). Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200901104043.91383-5

[PULL 14/30] ppc/spapr_nvdimm: do not enable support with 'nvdimm=off'

2020-09-03 Thread David Gibson
From: Daniel Henrique Barboza The NVDIMM support for pSeries was introduced in 5.1, but it didn't contemplate the 'nvdimm' machine option that other archs uses. For every other arch, if no '-machine nvdimm(=on)' is present, it is assumed that the NVDIMM support is disabled. The user must explictl

[PULL 29/30] spapr, spapr_numa: move lookup-arrays handling to spapr_numa.c

2020-09-03 Thread David Gibson
From: Daniel Henrique Barboza In a similar fashion as the previous patch, let's move the handling of ibm,associativity-lookup-arrays from spapr.c to spapr_numa.c. A spapr_numa_write_assoc_lookup_arrays() helper was created, and spapr_dt_dynamic_reconfiguration_memory() can now use it to advertise

[PULL 23/30] hw/ppc/ppc4xx_pci: Use ARRAY_SIZE() instead of magic value

2020-09-03 Thread David Gibson
From: Philippe Mathieu-Daudé Replace the magic '4' by ARRAY_SIZE(s->irq) which is more explicit. Signed-off-by: Philippe Mathieu-Daudé Message-Id: <20200901104043.91383-4-f4...@amsat.org> Reviewed-by: Richard Henderson Reviewed-by: Cédric Le Goater Signed-off-by: David Gibson --- hw/ppc/ppc

[PULL 15/30] target/arm: Move start-powered-off property to generic CPUState

2020-09-03 Thread David Gibson
From: Thiago Jung Bauermann There are other platforms which also have CPUs that start powered off, so generalize the start-powered-off property so that it can be used by them. Note that ARMv7MState also has a property of the same name but this patch doesn't change it because that class isn't a s

[Bug 1894071] Re: qemu-i386-static ioctl return -14 (Bad Address)

2020-09-03 Thread Tony.LI
Hi,I found some problems, but I don't know if how to solve it better(I'm not really familiar with the source code). When I use ioctl() and use a structure like this: struct drm_mode_card_res { __u64 fb_id_ptr; __u64 crtc_id_ptr; __u64 connector_id_ptr; __u64 encode

[PULL 28/30] spapr, spapr_numa: handle vcpu ibm,associativity

2020-09-03 Thread David Gibson
From: Daniel Henrique Barboza Vcpus have an additional paramenter to be appended, vcpu_id. This also changes the size of the of property itself, which is being represented in index 0 of numa_assoc_array[cpu->node_id], and defaults to MAX_DISTANCE_REF_POINTS for all cases but vcpus. All this logi

[PULL 21/30] sparc/sun4m: Use start-powered-off CPUState property

2020-09-03 Thread David Gibson
From: Thiago Jung Bauermann Instead of setting CPUState::halted to 1 in secondary_cpu_reset(), use the start-powered-off property which makes cpu_common_reset() initialize it to 1 in common code. Now secondary_cpu_reset() becomes equivalent to main_cpu_reset() so rename the function to sun4m_cpu

[PULL 26/30] ppc/spapr_nvdimm: turn spapr_dt_nvdimm() static

2020-09-03 Thread David Gibson
From: Daniel Henrique Barboza This function is only used inside spapr_nvdimm.c. Signed-off-by: Daniel Henrique Barboza Message-Id: <20200901125645.118026-3-danielhb...@gmail.com> Signed-off-by: David Gibson --- hw/ppc/spapr_nvdimm.c | 22 +++--- include/hw/ppc/spapr_nv

[PULL 30/30] spapr_numa: move NVLink2 associativity handling to spapr_numa.c

2020-09-03 Thread David Gibson
From: Daniel Henrique Barboza The NVLink2 GPUs works like a regular NUMA node with its own associativity values, regardless of user input. This can be handled inside spapr_numa_associativity_init(), initializing NVGPU_MAX_NUM associativity arrays that can be used by the GPUs. Signed-off-by: Dan

[PULL 20/30] sparc/sun4m: Don't set cs->halted = 0 in main_cpu_reset()

2020-09-03 Thread David Gibson
From: Thiago Jung Bauermann We rely on cpu_common_reset() to set cs->halted to 0, it's redundant to do it in main_cpu_reset(). Signed-off-by: Thiago Jung Bauermann Message-Id: <20200826055535.951207-7-bauer...@linux.ibm.com> Reviewed-by: Philippe Mathieu-Daudé Signed-off-by: David Gibson ---

[PULL 27/30] spapr: introduce SpaprMachineState::numa_assoc_array

2020-09-03 Thread David Gibson
From: Daniel Henrique Barboza The next step to centralize all NUMA/associativity handling in the spapr machine is to create a 'one stop place' for all things ibm,associativity. This patch introduces numa_assoc_array, a 2 dimensional array that will store all ibm,associativity arrays of all NUMA

Re: [PATCH] configure: the error info not consistence with option.

2020-09-03 Thread Yonggang Luo
On Fri, Sep 4, 2020 at 8:18 AM Paolo Bonzini wrote: > test "$vhost_net_user" = "" && vhost_net_user=$vhost_user >> if test "$vhost_net_user" = "yes" && test "$vhost_user" = "no"; then >> - error_exit "--enable-vhost-net-user requires --enable-vhost-user" >> + error_exit "--enable-vhost-net re

Re: [PATCH 5/5] memory: Skip bad range assertion if notifier is DEVIOTLB_UNMAP type

2020-09-03 Thread Jason Wang
On 2020/9/4 上午12:14, Eugenio Pérez wrote: Device IOTLB invalidations can unmap arbitrary ranges, eiter outside of the memory region or even [0, ~0ULL] for all the space. The assertion could be hit by a guest, and rhel7 guest effectively hit it. Signed-off-by: Eugenio Pérez Reviewed-by: Peter

RE: [PATCH 0/2][RFC] exclude ivshmem mr from vhost sections

2020-09-03 Thread Wangxin (Alexander)
Ping. > > The ivshmem me now mapped to vhost memory regions, and it reduces > the number of available memslots of vhost backend, which may > causes vhost backend memory slots limit check failure in > vhost dev init. > > Since ivshmem_bar2 not normal RAM in Guest, and it shouldn't > have vhost D

[PATCH] iotests: Remove 030 from the auto group

2020-09-03 Thread Thomas Huth
Test 030 is still occasionally failing in the CI ... so for the time being, let's disable it in the "auto" group. We can add it back once it got more stable. Signed-off-by: Thomas Huth --- I just saw the problem here: https://cirrus-ci.com/task/5449330930745344?command=main#L6482 and Peter hi

Re: make -i check resut for msys2

2020-09-03 Thread Thomas Huth
On 04/09/2020 00.53, 罗勇刚(Yonggang Luo) wrote: > > > On Thu, Sep 3, 2020 at 10:33 PM Thomas Huth > wrote: > > On 03/09/2020 11.18, 罗勇刚(Yonggang Luo) wrote: > [...] > >   TEST    check-unit: tests/test-replication.exe > > ** > > ERROR:C:/work/xemu/qemu

Re: [PATCH v4 1/3] spapr: move h_home_node_associativity to spapr_numa.c

2020-09-03 Thread David Gibson
On Thu, Sep 03, 2020 at 10:04:37PM -0300, Daniel Henrique Barboza wrote: > The implementation of this hypercall will be modified to use > spapr->numa_assoc_arrays input. Moving it to spapr_numa.c makes > make more sense. > > Signed-off-by: Daniel Henrique Barboza Applied to ppc-for-5.2 (though i

Re: [PATCH v4 2/3] spapr_numa: create a vcpu associativity helper

2020-09-03 Thread David Gibson
On Thu, Sep 03, 2020 at 10:04:38PM -0300, Daniel Henrique Barboza wrote: > The work to be done in h_home_node_associativity() intersects > with what is already done in spapr_numa_fixup_cpu_dt(). This > patch creates a new helper, spapr_numa_get_vcpu_assoc(), to > be used for both spapr_numa_fixup_c

<    2   3   4   5   6   7