Re: [PATCH v2 ppc-for-5.0 2/2] ppc/spapr: Support reboot of secure pseries guest

2019-12-11 Thread Cédric Le Goater
Hello Bharata, On 12/12/2019 06:50, Bharata B Rao wrote: > A pseries guest can be run as a secure guest on Ultravisor-enabled > POWER platforms. When such a secure guest is reset, we need to > release/reset a few resources both on ultravisor and hypervisor side. > This is achieved by invoking thi

Re: [PATCH 08/28] target/i386: Use cpu_*_mmuidx_ra instead of templates

2019-12-11 Thread Paolo Bonzini
On 12/12/19 05:00, Richard Henderson wrote: > Do not use exec/cpu_ldst_{,useronly_}template.h directly, > but instead use the functional interface. > > Cc: Paolo Bonzini > Cc: Eduardo Habkost > Signed-off-by: Richard Henderson > --- > target/i386/seg_helper.c | 75 ++---

Re: QEMU VM crashes when enabling KVM

2019-12-11 Thread Paolo Bonzini
On 12/12/19 02:59, Wayne Li wrote: > We wrote a project that is created on top of the QEMU source code; it > calls functions from the QEMU code.  I run the executable created by > compiling that project/QEMU code.  Anyway, looking at the following > documentation: > > https://www.kernel.org/doc/Do

Re: [PATCH v2] tests: use g_test_rand_int

2019-12-11 Thread Thomas Huth
On 12/12/2019 02.17, Paolo Bonzini wrote: > g_test_rand_int provides a reproducible random integer number, using a > different number seed every time but allowing reproduction using the > --seed command line option. It is thus better suited to tests than > g_random_int or random. > > Signed-off-b

Re: [PATCH 1/1] tests/Makefile: Fix check-report.* targets shown in check-help

2019-12-11 Thread Thomas Huth
On 11/12/2019 21.44, Wainer dos Santos Moschetta wrote: > The check-report.html and check-report.xml targets were replaced > with check-report.tap in commit 9df43317b82 but the check-help > text was not updated so it still lists check-report.html. > > Fixes: 9df43317b82 > Signed-off-by: Wainer dos

Re: [PATCH v2] configure: simplify vhost condition with Kconfig

2019-12-11 Thread Thomas Huth
On 12/12/2019 01.30, Paolo Bonzini wrote: > From: Marc-André Lureau > > Signed-off-by: Marc-André Lureau > Signed-off-by: Paolo Bonzini > --- > Kconfig.host| 5 + > Makefile| 1 + > hw/virtio/Kconfig | 3 +++ > hw/virtio/Makefile.objs | 4 ++-- > 4 files c

Re: [PATCH v3] net/imx_fec: Adding support for MAC filtering in the FEC IP implementation.

2019-12-11 Thread Bilal Wasim
Hi Jason, Mark, Can you please review this patch.. --Bilal On Tue, 10 Dec 2019, 19:06 , wrote: > From: bwasim > > This addition ensures that the IP does NOT boot up in promiscuous mode > by default, and so the software only receives the desired > packets(Unicast, Broadcast, Unicast / Multicas

Re: [virtio-dev] Re: guest / host buffer sharing ...

2019-12-11 Thread David Stevens
> First the addressing is non-trivial, especially with the "transport > specific device address" in the tuple. There is complexity here, but I think it would also be present in the buffer sharing device case. With a buffer sharing device, the same identifying information would need to be provided

Re: [RFC PATCH 0/9] Introduce mediate ops in vfio-pci

2019-12-11 Thread Yan Zhao
On Thu, Dec 12, 2019 at 11:48:25AM +0800, Jason Wang wrote: > > On 2019/12/6 下午8:49, Yan Zhao wrote: > > On Fri, Dec 06, 2019 at 05:40:02PM +0800, Jason Wang wrote: > >> On 2019/12/6 下午4:22, Yan Zhao wrote: > >>> On Thu, Dec 05, 2019 at 09:05:54PM +0800, Jason Wang wrote: > On 2019/12/5 下午4:5

[PATCH v2 ppc-for-5.0 1/2] linux-headers: Update

2019-12-11 Thread Bharata B Rao
Update to mainline commit: e42617b825f8 ("Linux 5.5-rc1") Signed-off-by: Bharata B Rao --- include/standard-headers/asm-x86/bootparam.h | 7 +- .../infiniband/hw/vmw_pvrdma/pvrdma_dev_api.h | 15 +++- include/standard-headers/drm/drm_fourcc.h | 28 ++- .../linux/input-event-codes.h

[PATCH v2 ppc-for-5.0 0/2] ppc/spapr: Support reboot of secure pseries guest

2019-12-11 Thread Bharata B Rao
This patchset adds KVM_PPC_SVM_OFF ioctl which is required to support reset of secure guest. This includes linux-headers update so that we get the newly introduced ioctl. v1: https://lists.gnu.org/archive/html/qemu-devel/2019-12/msg01489.html Bharata B Rao (2): linux-headers: Update ppc/spap

[PATCH v2 ppc-for-5.0 2/2] ppc/spapr: Support reboot of secure pseries guest

2019-12-11 Thread Bharata B Rao
A pseries guest can be run as a secure guest on Ultravisor-enabled POWER platforms. When such a secure guest is reset, we need to release/reset a few resources both on ultravisor and hypervisor side. This is achieved by invoking this new ioctl KVM_PPC_SVM_OFF from the machine reset path. As part o

Re: [PATCH v1 ppc-for-5.0 2/2] ppc/spapr: Support reboot of secure pseries guest

2019-12-11 Thread Bharata B Rao
On Wed, Dec 11, 2019 at 04:27:42PM +1100, David Gibson wrote: > Ah, right. We'll need to check for -ENOTTY specifically and ignore > it, then. We don't want this spewing warnings on every non-secure > guest. I am posting v2 with explicit check for -ENOTTY. > > > It looks like we may need a new

Re: [PATCH 26/28] target/ppc: Use cpu_*_mmuidx_ra instead of MMU_MODE*_SUFFIX

2019-12-11 Thread David Gibson
On Wed, Dec 11, 2019 at 08:00:37PM -0800, Richard Henderson wrote: > There are only two uses. Within dcbz_common, the local variable > mmu_idx already contains the epid computation, and we can avoid > repeating it for the store. Within helper_icbiep, the usage is > trivially expanded using PPC_TL

Re: [PATCH 0/2] ppc/pnv: HOMER fixes and improvements

2019-12-11 Thread David Gibson
On Wed, Dec 11, 2019 at 09:29:10AM +0100, Cédric Le Goater wrote: > Hello, > > The first patch introduces a new XSCOM region for the PBA bridge unit > (Power Bus Access) which connects the OCC (On Chip Controller) to the > Power bus and System Memory. The PBA is used to gather sensor data, > for p

Re: [PATCH v5 3/3] target/ppc: support single stepping with KVM HV

2019-12-11 Thread David Gibson
On Wed, Dec 11, 2019 at 04:10:13PM -0300, Fabiano Rosas wrote: > The hardware singlestep mechanism in POWER works via a Trace Interrupt > (0xd00) that happens after any instruction executes, whenever MSR_SE = > 1 (PowerISA Section 6.5.15 - Trace Interrupt). > > However, with kvm_hv, the Trace Inte

Re: [PATCH v5 1/3] linux-headers: Update kvm.h for ppc single step capability

2019-12-11 Thread David Gibson
On Wed, Dec 11, 2019 at 04:10:11PM -0300, Fabiano Rosas wrote: > Signed-off-by: Fabiano Rosas Generally, imported linux header updates are done as a block, pulling qemu up to a specified kernel commit id, rather than just grabbing pieces for a particular feature. There's actually already a heade

Re: [PATCH v5 2/3] kvm-all: Introduce kvm_set_singlestep

2019-12-11 Thread David Gibson
On Wed, Dec 11, 2019 at 04:10:12PM -0300, Fabiano Rosas wrote: > For single stepping (via KVM) of a guest vcpu to work, KVM needs not > only to support the SET_GUEST_DEBUG ioctl but to also recognize the > KVM_GUESTDBG_SINGLESTEP bit in the control field of the > kvm_guest_debug struct. > > This p

Re: [PATCH v2 03/18] tcg: move qemu_tcg_configure to accel/tcg/tcg-all.c

2019-12-11 Thread Richard Henderson
On 12/9/19 7:01 AM, Paolo Bonzini wrote: > Move everything related to mttcg_enabled in accel/tcg/tcg-all.c, > which will make even more sense when "thread" becomes a QOM property. > > For now, initializing mttcg_enabled in the instance_init function > prepares for the next patch, which will only i

Re: [PATCH v2 02/18] vl: move icount configuration earlier

2019-12-11 Thread Richard Henderson
On 12/9/19 7:01 AM, Paolo Bonzini wrote: > Once qemu_tcg_configure is turned into a QOM property setter, it will not > be able to set a default value for mttcg_enabled. Setting the default will > move to the TCG instance_init function, which currently runs before "-icount" > is processed. > > How

Re: [PATCH v2 01/18] memory: do not look at current_machine->accel

2019-12-11 Thread Richard Henderson
On 12/9/19 7:01 AM, Paolo Bonzini wrote: > "info mtree -f" prints the wrong accelerator name if used with for example > "-machine accel=kvm:tcg". The right thing to do is to fetch the name > from the AccelClass, which will also work nicely once > current_machine->accel stops existing. > > Tested-

[PATCH 28/28] cputlb: Expand cpu_ldst_template.h in cputlb.c

2019-12-11 Thread Richard Henderson
Reduce the amount of preprocessor obfuscation by expanding the text of each of the functions generated. The result is only slightly smaller than the original. Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 67 +++--- include/exec/cpu_ldst_template.h | 117 -

[PATCH 24/28] target/mips: Use cpu_*_mmuidx_ra instead of MMU_MODE*_SUFFIX

2019-12-11 Thread Richard Henderson
The separate suffixed functions were used to construct some do_##insn function switched on mmu_idx. The interface is exactly identical to the *_mmuidx_ra functions. Replace them directly and remove the constructions. Cc: Aurelien Jarno Cc: Aleksandar Markovic Cc: Aleksandar Rikalo Signed-off-

[PATCH 25/28] target/s390x: Use cpu_*_mmuidx_ra instead of MMU_MODE*_SUFFIX

2019-12-11 Thread Richard Henderson
The generated functions aside from *_real are unused. The *_real functions have a couple of users in mem_helper.c; use *_mmuidx_ra instead, with MMU_REAL_IDX. Cc: David Hildenbrand Signed-off-by: Richard Henderson --- target/s390x/cpu.h| 5 - target/s390x/mem_helper.c | 5 + 2 f

[PATCH 21/28] target/unicore32: Remove MMU_MODE{0,1}_SUFFIX

2019-12-11 Thread Richard Henderson
The functions generated by these macros are unused. Cc: Guan Xuetao Signed-off-by: Richard Henderson --- target/unicore32/cpu.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/unicore32/cpu.h b/target/unicore32/cpu.h index 50ed9dd99c..7a32e086ed 100644 --- a/target/unicore32/cpu.h +

Re: [RFC PATCH 0/9] Introduce mediate ops in vfio-pci

2019-12-11 Thread Jason Wang
On 2019/12/7 上午1:42, Alex Williamson wrote: On Fri, 6 Dec 2019 17:40:02 +0800 Jason Wang wrote: On 2019/12/6 下午4:22, Yan Zhao wrote: On Thu, Dec 05, 2019 at 09:05:54PM +0800, Jason Wang wrote: On 2019/12/5 下午4:51, Yan Zhao wrote: On Thu, Dec 05, 2019 at 02:33:19PM +0800, Jason Wang wrote:

[PATCH 17/28] target/cris: Remove MMU_MODE{0,1}_SUFFIX

2019-12-11 Thread Richard Henderson
The functions generated by these macros are unused. Cc: Edgar E. Iglesias Signed-off-by: Richard Henderson --- target/cris/cpu.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/cris/cpu.h b/target/cris/cpu.h index aba0a66474..bc43bc23a1 100644 --- a/target/cris/cpu.h +++ b/target/cr

[PATCH 27/28] cputlb: Remove support for MMU_MODE*_SUFFIX

2019-12-11 Thread Richard Henderson
All users have now been converted to cpu_*_mmuidx_ra. Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 230 1 file changed, 230 deletions(-) diff --git a/include/exec/cpu_ldst.h b/include/exec/cpu_ldst.h index 5a638fd8d6..eb2756e214 100644

[PATCH 20/28] target/sh4: Remove MMU_MODE{0,1}_SUFFIX

2019-12-11 Thread Richard Henderson
The functions generated by these macros are unused. Cc: Aurelien Jarno Signed-off-by: Richard Henderson --- target/sh4/cpu.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/sh4/cpu.h b/target/sh4/cpu.h index ecaa7a18a9..452a596e67 100644 --- a/target/sh4/cpu.h +++ b/target/sh4/cpu.h

[PATCH 14/28] cputlb: Expand cpu_ldst_useronly_template.h in user-exec.c

2019-12-11 Thread Richard Henderson
With the tracing hooks, the inline functions are no longer so simple. Reduce the amount of preprocessor obfuscation by expanding the text of each of the functions generated. The result is only slightly larger than the original. Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h

[PATCH 26/28] target/ppc: Use cpu_*_mmuidx_ra instead of MMU_MODE*_SUFFIX

2019-12-11 Thread Richard Henderson
There are only two uses. Within dcbz_common, the local variable mmu_idx already contains the epid computation, and we can avoid repeating it for the store. Within helper_icbiep, the usage is trivially expanded using PPC_TLB_EPID_LOAD. Cc: David Gibson Signed-off-by: Richard Henderson --- targ

[PATCH 23/28] target/m68k: Use cpu_*_mmuidx_ra instead of MMU_MODE{0, 1}_SUFFIX

2019-12-11 Thread Richard Henderson
The generated *_user functions are unused. The *_kernel functions have a couple of users in op_helper.c; use *_mmuidx_ra instead, with MMU_KERNEL_IDX. Cc: Laurent Vivier Signed-off-by: Richard Henderson --- target/m68k/cpu.h | 2 -- target/m68k/op_helper.c | 5 + 2 files changed, 5 i

[PATCH 16/28] target/alpha: Remove MMU_MODE{0,1}_SUFFIX

2019-12-11 Thread Richard Henderson
The functions generated by these macros are unused. Signed-off-by: Richard Henderson --- target/alpha/cpu.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/alpha/cpu.h b/target/alpha/cpu.h index a530249a5b..3f782c0efe 100644 --- a/target/alpha/cpu.h +++ b/target/alpha/cpu.h @@ -193,8

[PATCH 12/28] linux-user: Include tcg.h in syscall.c

2019-12-11 Thread Richard Henderson
Code movement in an upcoming patch will show that this file was implicitly depending on tcg.h being included indirectly. Signed-off-by: Richard Henderson --- linux-user/syscall.c | 1 + 1 file changed, 1 insertion(+) diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 171c0caef3..348

[PATCH 22/28] target/xtensa: Remove MMU_MODE{0,1,2,3}_SUFFIX

2019-12-11 Thread Richard Henderson
The functions generated by these macros are unused. Cc: Max Filippov Signed-off-by: Richard Henderson --- target/xtensa/cpu.h | 4 1 file changed, 4 deletions(-) diff --git a/target/xtensa/cpu.h b/target/xtensa/cpu.h index b363ffcf10..f5a7ea48bb 100644 --- a/target/xtensa/cpu.h +++ b/targ

[PATCH 19/28] target/microblaze: Remove MMU_MODE{0,1,2}_SUFFIX

2019-12-11 Thread Richard Henderson
The functions generated by these macros are unused. Cc: Edgar E. Iglesias Signed-off-by: Richard Henderson --- target/microblaze/cpu.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/target/microblaze/cpu.h b/target/microblaze/cpu.h index 95773089aa..32522f606b 100644 --- a/target/microbl

[PATCH 09/28] target/s390x: Include tcg.h in mem_helper.c

2019-12-11 Thread Richard Henderson
Code movement in an upcoming patch will show that this file was implicitly depending on tcg.h being included indirectly. Cc: David Hildenbrand Signed-off-by: Richard Henderson --- target/s390x/mem_helper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/s390x/mem_helper.c b/target/s3

[PATCH 13/28] linux-user: Include trace-root.h in syscall-trace.h

2019-12-11 Thread Richard Henderson
Code movement in an upcoming patch will show that this file was implicitly depending on trace-root.h being included beforehand. Signed-off-by: Richard Henderson --- include/user/syscall-trace.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/user/syscall-trace.h b/include/user/sysc

[PATCH 18/28] target/i386: Remove MMU_MODE{0,1,2}_SUFFIX

2019-12-11 Thread Richard Henderson
The functions generated by these macros are unused. Cc: Paolo Bonzini Cc: Eduardo Habkost Signed-off-by: Richard Henderson --- target/i386/cpu.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/target/i386/cpu.h b/target/i386/cpu.h index cde2a16b94..6a8228df4f 100644 --- a/target/i386/cpu

[PATCH 15/28] target/nios2: Remove MMU_MODE{0,1}_SUFFIX

2019-12-11 Thread Richard Henderson
The functions generated by these macros are unused. Cc: Chris Wulff Cc: Marek Vasut Signed-off-by: Richard Henderson --- target/nios2/cpu.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/target/nios2/cpu.h b/target/nios2/cpu.h index 361b06ffeb..78f633f970 100644 --- a/target/nios2/cpu.h

[PATCH 11/28] accel/tcg: Include tcg.h in tcg-runtime.c

2019-12-11 Thread Richard Henderson
Code movement in an upcoming patch will show that this file was implicitly depending on tcg.h being included indirectly. Signed-off-by: Richard Henderson --- accel/tcg/tcg-runtime.c | 1 + 1 file changed, 1 insertion(+) diff --git a/accel/tcg/tcg-runtime.c b/accel/tcg/tcg-runtime.c index 8a1e40

[PATCH 06/28] cputlb: Rename helper_ret_ld*_cmmu to cpu_ld*_code

2019-12-11 Thread Richard Henderson
There are no uses of the *_cmmu names other than the bare wrapping within the *_code inlines. Therefore rename the functions so we can drop the inlines. Use abi_ptr instead of target_ulong in preparation for user-only; the two types are identical for softmmu. Signed-off-by: Richard Henderson --

[PATCH 10/28] target/arm: Include tcg.h in sve_helper.c

2019-12-11 Thread Richard Henderson
Code movement in an upcoming patch will show that this file was implicitly depending on tcg.h being included indirectly. Cc: Peter Maydell Signed-off-by: Richard Henderson --- target/arm/sve_helper.c | 1 + 1 file changed, 1 insertion(+) diff --git a/target/arm/sve_helper.c b/target/arm/sve_he

[PATCH 08/28] target/i386: Use cpu_*_mmuidx_ra instead of templates

2019-12-11 Thread Richard Henderson
Do not use exec/cpu_ldst_{,useronly_}template.h directly, but instead use the functional interface. Cc: Paolo Bonzini Cc: Eduardo Habkost Signed-off-by: Richard Henderson --- target/i386/seg_helper.c | 75 ++-- 1 file changed, 50 insertions(+), 25 deletions(

[PATCH 07/28] cputlb: Provide cpu_(ld,st}*_mmuidx_ra for user-only

2019-12-11 Thread Richard Henderson
This finishes the new interface began with the previous patch. Document the interface and deprecate MMU_MODE_SUFFIX. Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 84 ++--- 1 file changed, 79 insertions(+), 5 deletions(-) diff --git a/include

[PATCH 00/28] cputlb: Remove support for MMU_MODE*_SUFFIX

2019-12-11 Thread Richard Henderson
This is part of a project to raise the limit on NB_MMU_MODES. One of those is in cpu_ldst.h, in support of MMU_MODE*_SUFFIX. While this could be extended, it's not the best interface for such things. Better is a single interface that allows a variable mmu_idx. The best exemplars of that is the u

[PATCH 05/28] translator: Use cpu_ld*_code instead of open-coding

2019-12-11 Thread Richard Henderson
The DO_LOAD macros replicate the distinction already performed by the cpu_ldst.h functions. Use them. Signed-off-by: Richard Henderson --- include/exec/cpu_ldst.h | 11 - include/exec/translator.h | 48 +++ 2 files changed, 13 insertions(+), 46 dele

[PATCH 02/28] cputlb: Use trace_mem_get_info instead of trace_mem_build_info

2019-12-11 Thread Richard Henderson
In the cpu_ldst templates, we already require a MemOp, and it is cleaner and clearer to pass that instead of 3 separate arguments describing the memory operation. Signed-off-by: Richard Henderson --- include/exec/cpu_ldst_template.h | 22 +++--- include/exec/cpu_ldst_use

[PATCH 03/28] trace: Remove trace_mem_build_info_no_se_[bl]e

2019-12-11 Thread Richard Henderson
It is easy for the atomic helpers to use trace_mem_build_info directly, without resorting to symbol pasting. For this usage, we cannot use trace_mem_get_info, because the MemOp does not support 16-byte accesses. Signed-off-by: Richard Henderson --- accel/tcg/atomic_template.h | 67 +

[PATCH 04/28] cputlb: Move body of cpu_ldst_template.h out of line

2019-12-11 Thread Richard Henderson
With the tracing hooks, the inline functions are no longer so simple. Once out-of-line, the current tlb_entry lookup is redundant with the one in the main load/store_helper. This also begins the introduction of a new target facing interface, with suffix *_mmuidx_ra. This is not yet official beca

[PATCH 01/28] target/xtensa: Use probe_access for itlb_hit_test

2019-12-11 Thread Richard Henderson
We don't actually need the result of the read, only to probe that the memory mapping exists. This is exactly what probe_access does. This is also the only user of any cpu_ld*_code_ra function. Removing this allows the interface to be removed shortly. Cc: Max Filippov Signed-off-by: Richard Hend

Re: [RFC PATCH 0/9] Introduce mediate ops in vfio-pci

2019-12-11 Thread Jason Wang
On 2019/12/6 下午8:49, Yan Zhao wrote: On Fri, Dec 06, 2019 at 05:40:02PM +0800, Jason Wang wrote: On 2019/12/6 下午4:22, Yan Zhao wrote: On Thu, Dec 05, 2019 at 09:05:54PM +0800, Jason Wang wrote: On 2019/12/5 下午4:51, Yan Zhao wrote: On Thu, Dec 05, 2019 at 02:33:19PM +0800, Jason Wang wrote:

Re: [RFC PATCH 4/9] vfio-pci: register default dynamic-trap-bar-info region

2019-12-11 Thread Yan Zhao
On Thu, Dec 12, 2019 at 11:07:42AM +0800, Alex Williamson wrote: > On Wed, 11 Dec 2019 21:02:40 -0500 > Yan Zhao wrote: > > > On Thu, Dec 12, 2019 at 02:56:55AM +0800, Alex Williamson wrote: > > > On Wed, 11 Dec 2019 01:25:55 -0500 > > > Yan Zhao wrote: > > > > > > > On Wed, Dec 11, 2019 at 1

Re: [RFC PATCH 4/9] vfio-pci: register default dynamic-trap-bar-info region

2019-12-11 Thread Alex Williamson
On Wed, 11 Dec 2019 21:02:40 -0500 Yan Zhao wrote: > On Thu, Dec 12, 2019 at 02:56:55AM +0800, Alex Williamson wrote: > > On Wed, 11 Dec 2019 01:25:55 -0500 > > Yan Zhao wrote: > > > > > On Wed, Dec 11, 2019 at 12:38:05AM +0800, Alex Williamson wrote: > > > > On Tue, 10 Dec 2019 02:44:44 -0

Re: [PATCH v2] ppc/pnv: Make PnvXScomInterface an incomplete type

2019-12-11 Thread David Gibson
On Wed, Dec 11, 2019 at 05:04:15PM +0100, Greg Kurz wrote: > PnvXScomInterface is an interface instance. It should never be > dereferenced. Drop the dummy type definition for extra safety, > which is the common practice with QOM interfaces. > > While here also convert the bogus OBJECT_CHECK() to I

Re: [PATCH] object: Improve documentation of interfaces

2019-12-11 Thread David Gibson
On Wed, Dec 11, 2019 at 02:32:41PM +0100, Greg Kurz wrote: > QOM interfaces allow a limited form of multiple inheritance, at the > condition of being stateless. That is, they cannot be instantiated > and a pointer to an interface shouldn't be dereferenceable in any way. > This is achieved by making

Re: [PATCH v3 19/20] tests/tcg/aarch64: add SVE iotcl test

2019-12-11 Thread Richard Henderson
On 12/11/19 9:05 AM, Alex Bennée wrote: > +int main(int argc, char **argv) > +{ > +unsigned int sve_feature = (get_cpu_reg(ID_AA64PFR0_EL1) >> 32) & 0xf; > +/* Exit early if we don't support SVE at all */ > +if (sve_feature == 0x1) { > +/* we also need to probe for the ioctl sup

Re: [PATCH v3 16/20] tests/tcg: ensure we re-configure if configure.sh is updated

2019-12-11 Thread Richard Henderson
On 12/11/19 9:05 AM, Alex Bennée wrote: > We were only doing this if docker was enabled which isn't quite. Isn't quite ... a complete sentence? ;-) > > Fixes: fc76c56d3f47 > Signed-off-by: Alex Bennée > --- > tests/tcg/Makefile.prereqs | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-)

Re: [PATCH v3 14/20] target/arm: don't bother with id_aa64pfr0_read for USER_ONLY

2019-12-11 Thread Richard Henderson
On 12/11/19 9:05 AM, Alex Bennée wrote: > For system emulation we need to check the state of the GIC before we > report the value. However this isn't relevant to exporting of the > value to linux-user and indeed breaks the exported value as set by > modify_arm_cp_regs. > > Signed-off-by: Alex Benn

Re: [PATCH v3 12/20] target/arm: generate xml description of our SVE registers

2019-12-11 Thread Richard Henderson
On 12/11/19 9:05 AM, Alex Bennée wrote: > +static struct TypeSize vec_lanes[] = { const. > +case 51: > +return gdb_get_reg64(buf, (cpu->env.vfp.zcr_el[1] & 0xf) + 1); You need to use sve_zcr_len_for_el to get the effective vq. Also, I thought vg == 2 * vq. > +case 51: > +{ >

Re: [RFC PATCH 4/9] vfio-pci: register default dynamic-trap-bar-info region

2019-12-11 Thread Yan Zhao
On Thu, Dec 12, 2019 at 02:56:55AM +0800, Alex Williamson wrote: > On Wed, 11 Dec 2019 01:25:55 -0500 > Yan Zhao wrote: > > > On Wed, Dec 11, 2019 at 12:38:05AM +0800, Alex Williamson wrote: > > > On Tue, 10 Dec 2019 02:44:44 -0500 > > > Yan Zhao wrote: > > > > > > > On Tue, Dec 10, 2019 at 0

Re: [PATCH v3 11/20] target/arm: default SVE length to 64 bytes for linux-user

2019-12-11 Thread Richard Henderson
On 12/11/19 9:05 AM, Alex Bennée wrote: > The Linux kernel chooses the default of 64 bytes for SVE registers on > the basis that it is the largest size on known hardware that won't > grow the signal frame. We still honour the sve-max-vq property and > userspace can expand the number of lanes by cal

Re: QEMU VM crashes when enabling KVM

2019-12-11 Thread Wayne Li
We wrote a project that is created on top of the QEMU source code; it calls functions from the QEMU code. I run the executable created by compiling that project/QEMU code. Anyway, looking at the following documentation: https://www.kernel.org/doc/Documentation/powerpc/cpu_families.txt It looks

Re: [PATCH v3 08/20] gdbstub: extend GByteArray to read register helpers

2019-12-11 Thread Richard Henderson
On 12/11/19 9:05 AM, Alex Bennée wrote: > Instead of passing a pointer to memory now just extend the GByteArray > to all the read register helpers. They can then safely append their > data through the normal way. We don't bother with this abstraction for > write registers as we have already ensured

Re: [PATCH] vhost-user-test: fix a memory leak

2019-12-11 Thread Pan Nengyuan
On 2019/12/11 16:18, Marc-André Lureau wrote: > Hi > > On Wed, Dec 11, 2019 at 11:57 AM Thomas Huth wrote: >> >> Hi! >> >> On 11/12/2019 01.55, pannengy...@huawei.com wrote: >> [...] >>> diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c >>> index 91ea373..54be931 100644 >>> --- a

Re: [PATCH v3 06/20] target/arm: use gdb_get_reg helpers

2019-12-11 Thread Richard Henderson
On 12/11/19 9:05 AM, Alex Bennée wrote: > This is cleaner than poking memory directly and will make later > clean-ups easier. > > Signed-off-by: Alex Bennée > Reviewed-by: Philippe Mathieu-Daudé > > --- > v2 > - make sure we pass hi/lo correctly as quads are stored in LE order > --- > target

Re: [PATCH] vhost-user-test: fix a memory leak

2019-12-11 Thread Pan Nengyuan
On 2019/12/11 15:57, Thomas Huth wrote: > Hi! > > On 11/12/2019 01.55, pannengy...@huawei.com wrote: > [...] >> diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c >> index 91ea373..54be931 100644 >> --- a/tests/vhost-user-test.c >> +++ b/tests/vhost-user-test.c >> @@ -717,6 +717,8

Re: [PATCH v2] tests: use g_test_rand_int

2019-12-11 Thread Richard Henderson
On 12/11/19 5:17 PM, Paolo Bonzini wrote: > g_test_rand_int provides a reproducible random integer number, using a > different number seed every time but allowing reproduction using the > --seed command line option. It is thus better suited to tests than > g_random_int or random. > > Signed-off-b

[PATCH v2] tests: use g_test_rand_int

2019-12-11 Thread Paolo Bonzini
g_test_rand_int provides a reproducible random integer number, using a different number seed every time but allowing reproduction using the --seed command line option. It is thus better suited to tests than g_random_int or random. Signed-off-by: Paolo Bonzini --- tests/ivshmem-test.c | 2 +- te

Re: [PATCH] tests: use g_test_rand_int

2019-12-11 Thread Paolo Bonzini
On 11/12/19 20:25, Thomas Huth wrote: > On 11/12/2019 15.23, Paolo Bonzini wrote: >> g_test_rand_int provides a reproducible random integer number, using a >> different number seed every time but allowing reproduction using the >> --seed command line option. It is thus better suited to tests than

Re: QEMU VM crashes when enabling KVM

2019-12-11 Thread Paolo Bonzini
On 11/12/19 22:23, Wayne Li wrote: > > Now I am fairly sure KVM is actually enabled on the system.  Finding > that out was another story that spanned a couple of months.  But long > story short, lsmod doesn't show that the KVM kernel module is running.  > But that's because KVM is built-in and it

Re: [PATCH] vhost-user-test: fix a memory leak

2019-12-11 Thread Pan Nengyuan
On 2019/12/11 15:48, Laurent Vivier wrote: > On 11/12/2019 01:55, pannengy...@huawei.com wrote: >> From: Pan Nengyuan >> >> Spotted by ASAN. >> >> Reported-by: Euler Robot >> Signed-off-by: Pan Nengyuan >> --- >> tests/vhost-user-test.c | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff -

Re: [PATCH] migration: fix stringop-truncation warning

2019-12-11 Thread Paolo Bonzini
On 12/12/19 01:55, Richard Henderson wrote: > On 12/11/19 6:23 AM, Paolo Bonzini wrote: >> @@ -44,8 +44,7 @@ void global_state_store_running(void) >> { >> const char *state = RunState_str(RUN_STATE_RUNNING); >> assert(strlen(state) < sizeof(global_state.runstate)); >> -strncpy((char

Re: [PATCH v3 4/4] qom/object: Use common get/set uint helpers

2019-12-11 Thread Alexey Kardashevskiy
On 10/12/2019 23:04, Felipe Franciosi wrote: > Hi > >> On Dec 2, 2019, at 6:31 AM, Alexey Kardashevskiy wrote: >> >> >> >> On 30/11/2019 04:46, Felipe Franciosi wrote: >>> Several objects implemented their own uint property getters and setters, >>> despite them being straightforward (without a

Re: [PATCH] migration: fix stringop-truncation warning

2019-12-11 Thread Richard Henderson
On 12/11/19 6:23 AM, Paolo Bonzini wrote: > @@ -44,8 +44,7 @@ void global_state_store_running(void) > { > const char *state = RunState_str(RUN_STATE_RUNNING); > assert(strlen(state) < sizeof(global_state.runstate)); > -strncpy((char *)global_state.runstate, > - state, sizeo

Re: [PATCH] target/arm: Display helpful message when hflags mismatch

2019-12-11 Thread Richard Henderson
On 12/9/19 8:00 AM, Alex Bennée wrote: >> -#ifdef CONFIG_DEBUG_TCG >> -assert(flags == rebuild_hflags_internal(env)); >> -#endif >> +assert_hflags_rebuild_correctly(env); > > I'm trying to recall why we don't just use: > > g_assert_cmphex(flags, =, rebuild_hflags_internal(env)) > > I t

Re: [PATCH 1/1] tests/Makefile: Fix check-report.* targets shown in check-help

2019-12-11 Thread Paolo Bonzini
On 11/12/19 21:44, Wainer dos Santos Moschetta wrote: > The check-report.html and check-report.xml targets were replaced > with check-report.tap in commit 9df43317b82 but the check-help > text was not updated so it still lists check-report.html. > > Fixes: 9df43317b82 > Signed-off-by: Wainer dos S

Re: [PATCH] target/arm: ensure we use current exception state after SCR update

2019-12-11 Thread Richard Henderson
On 12/9/19 6:37 AM, Alex Bennée wrote: > +/* Re-read the current EL, don't use cached values */ > #define ARM_CP_CURRENTEL (ARM_CP_SPECIAL | 0x0400) > #define ARM_CP_DC_ZVA(ARM_CP_SPECIAL | 0x0500) > #define ARM_LAST_SPECIAL ARM_CP_DC_ZVA ... > @@ -5179,7 +5179,7 @@ s

Re: [PATCH] configure: simplify vhost condition with Kconfig

2019-12-11 Thread Paolo Bonzini
On 11/12/19 20:38, Thomas Huth wrote: > On 11/12/2019 15.24, Paolo Bonzini wrote: >> From: Marc-André Lureau >> >> Signed-off-by: Marc-André Lureau >> Signed-off-by: Paolo Bonzini >> --- >> Kconfig.host| 5 + >> hw/virtio/Kconfig | 3 +++ >> hw/virtio/Makefile.objs | 4 ++-

[PATCH v2] configure: simplify vhost condition with Kconfig

2019-12-11 Thread Paolo Bonzini
From: Marc-André Lureau Signed-off-by: Marc-André Lureau Signed-off-by: Paolo Bonzini --- Kconfig.host| 5 + Makefile| 1 + hw/virtio/Kconfig | 3 +++ hw/virtio/Makefile.objs | 4 ++-- 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/Kconfig

Re: [PATCH] tests: fix test-qga on macosx

2019-12-11 Thread Paolo Bonzini
On 11/12/19 20:12, Thomas Huth wrote: > On 11/12/2019 15.23, Paolo Bonzini wrote: >> From: Marc-André Lureau >> >> Fix Unix socket connection & skip commands that are not implemented. >> >> Signed-off-by: Marc-André Lureau >> Signed-off-by: Paolo Bonzini >> --- >> tests/test-qga.c | 25

Re: [PATCH 09/10] arm: allwinner-h3: add SD/MMC host controller

2019-12-11 Thread Niek Linnenbank
Ping! Anyone would like to comment on this driver? I finished the rework on all previous comments in this series. Currently debugging the hflags error reported by Philippe. After that, I'm ready to send out v2 of these patches. Regards, Niek On Mon, Dec 2, 2019 at 10:10 PM Niek Linnenbank wro

QEMU VM crashes when enabling KVM

2019-12-11 Thread Wayne Li
Dear QEMU list members, So we developed a virtual machine that that runs on QEMU. The virtual machine emulates a certain piece of equipment running on a PowerPC 7457 processor. And we are running the virtual machine on a T4240-RDB which as a PowerPC e6500 processor. I can't give any more detail

[PATCH 0/1] tests/Makefile: Show check-report.tap in check-help

2019-12-11 Thread Wainer dos Santos Moschetta
Simple fix to commit 9df43317b82 that didn't adjust check-help. Wainer dos Santos Moschetta (1): tests/Makefile: Fix check-report.* targets shown in check-help tests/Makefile.include | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) -- 2.21.0

[PATCH 1/1] tests/Makefile: Fix check-report.* targets shown in check-help

2019-12-11 Thread Wainer dos Santos Moschetta
The check-report.html and check-report.xml targets were replaced with check-report.tap in commit 9df43317b82 but the check-help text was not updated so it still lists check-report.html. Fixes: 9df43317b82 Signed-off-by: Wainer dos Santos Moschetta --- tests/Makefile.include | 4 +--- 1 file chan

Re: [PATCH for-5.0 v11 00/20] VIRTIO-IOMMU device

2019-12-11 Thread Michael S. Tsirkin
On Wed, Dec 11, 2019 at 05:48:05PM +0100, Auger Eric wrote: > Hi Michael, > > On 12/11/19 5:40 PM, Michael S. Tsirkin wrote: > > On Fri, Nov 22, 2019 at 07:29:23PM +0100, Eric Auger wrote: > >> This series implements the QEMU virtio-iommu device. > >> > >> This matches the v0.12 spec and the corre

[PATCH 2/2] target/s390x: Implement LOAD/STORE TO REAL ADDRESS inline

2019-12-11 Thread Richard Henderson
These are trivially done by performing a memory operation with the correct mmu_idx. The only tricky part is using get_address directly in order to get the address wrapped; we cannot use la2 because of the format. Signed-off-by: Richard Henderson --- target/s390x/helper.h | 4 target/

[PATCH 1/2] target/s390x: Split out helper_per_store_real

2019-12-11 Thread Richard Henderson
Split the PER handling for store-to-real-address into its own helper function, conditionally called when PER is enabled, just as we do for per_branch and per_ifetch. Signed-off-by: Richard Henderson --- target/s390x/helper.h | 1 + target/s390x/mem_helper.c | 16 target/s

[PATCH 0/2] target/s390x: Implement LOAD/STORE TO REAL ADDRESS inline

2019-12-11 Thread Richard Henderson
Found while working on other parts of cputlb, this cleanup can be split out independently. r~ Richard Henderson (2): target/s390x: Split out helper_per_store_real target/s390x: Implement LOAD/STORE TO REAL ADDRESS inline target/s390x/helper.h | 5 + target/s390x/mem_helper.c |

Re: [RFC PATCH] scripts/tap-driver: report "slow" tests (HACK)

2019-12-11 Thread Wainer dos Santos Moschetta
On 11/19/19 5:54 AM, Alex Bennée wrote: Alex Bennée writes: Some tests seem to run slower on CI systems but we don't really get visibility of which it is unless we happen to hang the test at the end of a run. This hacky change exposes "slow" tests in the tap output. [AJB: my perl is rusty,

Re: [PATCH v2] ci: build out-of-tree

2019-12-11 Thread Thomas Huth
On 11/12/2019 15.33, Paolo Bonzini wrote: > Most developers are using out-of-tree builds and it was discussed in the past > to only allow those. To prepare for the transition, use out-of-tree builds > in all continuous integration jobs. > > Based on a patch by Marc-André Lureau. > > Signed-off-b

Re: [PATCH] configure: simplify vhost condition with Kconfig

2019-12-11 Thread Thomas Huth
On 11/12/2019 15.24, Paolo Bonzini wrote: > From: Marc-André Lureau > > Signed-off-by: Marc-André Lureau > Signed-off-by: Paolo Bonzini > --- > Kconfig.host| 5 + > hw/virtio/Kconfig | 3 +++ > hw/virtio/Makefile.objs | 4 ++-- > 3 files changed, 10 insertions(+), 2 delet

Re: [PATCH] vhost-user-scsi: fix printf format warning

2019-12-11 Thread Thomas Huth
On 11/12/2019 15.23, Paolo Bonzini wrote: > From: Marc-André Lureau > > Fixes: > ../contrib/vhost-user-scsi/vhost-user-scsi.c:118:57: error: format specifies > type 'unsigned char' but the argument has type 'int' [-Werror,-Wformat] > g_warning("Unable to determine cdb len (0x%02hhX)", c

Re: [PATCH] glib: use portable g_setenv()

2019-12-11 Thread Thomas Huth
On 11/12/2019 15.23, Paolo Bonzini wrote: > From: Marc-André Lureau > > We have a setenv() wrapper in os-win32.c that no one is actually using. > Drop it and change to g_setenv() uniformly. > > Signed-off-by: Marc-André Lureau > Signed-off-by: Paolo Bonzini > --- > include/sysemu/os-win32.h

Re: [PATCH] tests: use g_test_rand_int

2019-12-11 Thread Thomas Huth
On 11/12/2019 15.23, Paolo Bonzini wrote: > g_test_rand_int provides a reproducible random integer number, using a > different number seed every time but allowing reproduction using the > --seed command line option. It is thus better suited to tests than > g_random_int or random. > > Signed-off-b

[PATCH v5 2/3] kvm-all: Introduce kvm_set_singlestep

2019-12-11 Thread Fabiano Rosas
For single stepping (via KVM) of a guest vcpu to work, KVM needs not only to support the SET_GUEST_DEBUG ioctl but to also recognize the KVM_GUESTDBG_SINGLESTEP bit in the control field of the kvm_guest_debug struct. This patch adds support for querying the single step capability so that QEMU can

Re: [PATCH] tests: fix test-qga on macosx

2019-12-11 Thread Thomas Huth
On 11/12/2019 15.23, Paolo Bonzini wrote: > From: Marc-André Lureau > > Fix Unix socket connection & skip commands that are not implemented. > > Signed-off-by: Marc-André Lureau > Signed-off-by: Paolo Bonzini > --- > tests/test-qga.c | 25 ++--- > 1 file changed, 18 insert

[PATCH v5 3/3] target/ppc: support single stepping with KVM HV

2019-12-11 Thread Fabiano Rosas
The hardware singlestep mechanism in POWER works via a Trace Interrupt (0xd00) that happens after any instruction executes, whenever MSR_SE = 1 (PowerISA Section 6.5.15 - Trace Interrupt). However, with kvm_hv, the Trace Interrupt happens inside the guest and KVM has no visibility of it. Therefore

[PATCH v5 0/3] target/ppc: single step for KVM HV

2019-12-11 Thread Fabiano Rosas
I'm resending this series now that the KVM capability got merged: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1a9167a214f --- Original cover-letter: Single stepping via GDB/gdbstub is currently not working with KVM HV. When asking for a single step (stepi), KVM

[PATCH v5 1/3] linux-headers: Update kvm.h for ppc single step capability

2019-12-11 Thread Fabiano Rosas
Signed-off-by: Fabiano Rosas --- linux-headers/linux/kvm.h | 1 + 1 file changed, 1 insertion(+) diff --git a/linux-headers/linux/kvm.h b/linux-headers/linux/kvm.h index 3d9b18f7f8..488f3baf01 100644 --- a/linux-headers/linux/kvm.h +++ b/linux-headers/linux/kvm.h @@ -1000,6 +1000,7 @@ struct kvm

  1   2   3   >