Re: [PATCH 4/6] target/mips: Convert Loongson [D]DIVU.G opcodes to decodetree

2021-08-09 Thread Philippe Mathieu-Daudé
On 1/21/21 8:58 PM, Richard Henderson wrote: > On 1/12/21 11:55 AM, Philippe Mathieu-Daudé wrote: >> Convert DIVU.G (divide 32-bit unsigned integers) and DDIVU.G >> (divide 64-bit unsigned integers) opcodes to decodetree. >> >> Signed-off-by: Philippe Mathieu-Daudé >> --- >>

Re: [PATCH] ui/sdl2: Check return value from g_setenv()

2021-08-09 Thread Gerd Hoffmann
Hi, > Setting environment variables can fail; check the return value > from g_setenv() and bail out if we couldn't set SDL_VIDEODRIVER. Hmm, looking at the comment I'm wondering whenever we maybe should just drop the setenv (after 6.1). It's quite old, I doubt svgalib talking directly to the

Re: [PATCH 3/3] ps2: migration support for command reply queue

2021-08-09 Thread Gerd Hoffmann
Hi, > this part actually works. .needed is only evaluated on the sending side. For > the receiving side subsections are optional. Migration doesn't fail if a > subsection isn't loaded. Before I sent this patch series one of the > migration tests was a migration from 6.0.92 to 6.0.92 with one

Re: [PATCH] fsl-imx6ul: add SAI1/2/3 and ASRC as unimplemented devices

2021-08-09 Thread Philippe Mathieu-Daudé
Hi Guenter, On 8/10/21 6:10 AM, Guenter Roeck wrote: > Define SAI1/2/3 and ASRC as unimplemented devices to avoid random > Linux kernel crashes. Relevant dmesg output could be useful. > Signed-off-by: Guenter Roeck > --- > hw/arm/fsl-imx6ul.c | 12 > 1 file changed, 12

Re: [PATCH] monitor/hmp: schedule qemu_chr_fe_accept_input() after read

2021-08-09 Thread Volker Rümelin
Since commit 584af1f1d9 (ui/gtk: add a keyboard fifo to the VTE consoles) a GTK VTE console chardev backend relies on the connected chardev frontend to call qemu_chr_fe_accept_input() whenever it can receive new characters. The HMP monitor doesn't do this. It only schedules

Re: [PULL 24/30] spapr_pci: populate ibm,loc-code

2021-08-09 Thread Philippe Mathieu-Daudé
On 8/10/21 6:29 AM, David Gibson wrote: > On Mon, Aug 09, 2021 at 10:57:00AM +0100, Peter Maydell wrote: >> On Tue, 7 Jul 2015 at 16:49, Alexander Graf wrote: >>> >>> From: Nikunj A Dadhania >>> >>> Each hardware instance has a platform unique location code. The OF >>> device tree that

Re: [PATCH] xive: Remove extra '0x' prefix in trace events

2021-08-09 Thread Philippe Mathieu-Daudé
On 8/10/21 2:56 AM, David Gibson wrote: > On Mon, Aug 09, 2021 at 11:39:49AM +0200, Philippe Mathieu-Daudé wrote: >> On 8/9/21 10:52 AM, Cédric Le Goater wrote: >>> Cc: th...@redhat.com >>> Fixes: 4e960974d4ee ("xive: Add trace events") >>> Resolves:

Re: [PATCH 3/3] ps2: migration support for command reply queue

2021-08-09 Thread Volker Rümelin
Hi, +static bool ps2_keyboard_cqueue_needed(void *opaque) +{ +PS2KbdState *s = opaque; + +return s->common.queue.cwptr != -1; /* the queue is mostly empty */ +} + +static const VMStateDescription vmstate_ps2_keyboard_cqueue = { +.name = "ps2kbd/command_reply_queue", +.needed

Re: [PATCH] fuzz: avoid building twice, when running on gitlab

2021-08-09 Thread Philippe Mathieu-Daudé
+Coiby Xu & qemu-block@ On 8/9/21 9:36 PM, Peter Maydell wrote: > On Mon, 9 Aug 2021 at 20:30, Alexander Bulekov wrote: >> >> On 210809 1506, Alexander Bulekov wrote: >>> On 210809 1925, Peter Maydell wrote: On Mon, 9 Aug 2021 at 12:18, Alexander Bulekov wrote: > > On oss-fuzz, we

Re: [PATCH] audio: Never send migration section

2021-08-09 Thread Philippe Mathieu-Daudé
On 8/9/21 7:12 PM, Daniel P. Berrangé wrote: > On Mon, Aug 09, 2021 at 06:09:56PM +0100, Dr. David Alan Gilbert (git) wrote: >> From: "Dr. David Alan Gilbert" >> >> The audio migration vmstate is empty, and always has been; we can't >> just remove it though because an old qemu might send it us.

Re: [PULL 24/30] spapr_pci: populate ibm,loc-code

2021-08-09 Thread David Gibson
On Mon, Aug 09, 2021 at 10:57:00AM +0100, Peter Maydell wrote: > On Tue, 7 Jul 2015 at 16:49, Alexander Graf wrote: > > > > From: Nikunj A Dadhania > > > > Each hardware instance has a platform unique location code. The OF > > device tree that describes a part of a hardware entity must include

Re: [PATCH for 6.2 31/49] bsd-user: Remove dead #ifdefs from elfload.c

2021-08-09 Thread Richard Henderson
On 8/7/21 11:42 AM, Warner Losh wrote: From: Warner Losh LOW_ELF_STACK doesn't exist on FreeBSD and likely never will. Remove it. Likewise, remove an #if 0 block that's not useful Signed-off-by: Warner Losh --- bsd-user/elfload.c | 20 1 file changed, 20 deletions(-)

Re: [PATCH 14/19] target/ppc/pmu_book3s_helper.c: add generic timeout helpers

2021-08-09 Thread David Gibson
On Mon, Aug 09, 2021 at 10:10:52AM -0300, Daniel Henrique Barboza wrote: > Before adding counter negative condition support for the other 5 > counters, create generic helpers that retrieves the elapsed timeout to > counter negative based on the event being sampled. > > Signed-off-by: Daniel

Re: [PATCH for 6.2 32/49] bsd-user: *BSD specific siginfo defintions

2021-08-09 Thread Richard Henderson
On 8/7/21 11:42 AM, Warner Losh wrote: From: Warner Losh Add FreeBSD, NetBSD and OpenBSD values for the various signal info types and defines to decode different signals to discover more information about the specific signal types. Signed-off-by: Stacey Son Signed-off-by: Warner Losh ---

Re: [PATCH 13/19] target/ppc/translate: PMU: handle setting of PMCs while running

2021-08-09 Thread David Gibson
On Mon, Aug 09, 2021 at 10:10:51AM -0300, Daniel Henrique Barboza wrote: > The initial PMU support were made under the assumption that the counters > would be set before running the PMU and read after either freezing the > PMU manually or via a performance monitor alert. > > Turns out that some

Re: [PATCH 18/19] target/ppc/pmu_book3s_helper.c: add PM_CMPLU_STALL mock events

2021-08-09 Thread David Gibson
On Mon, Aug 09, 2021 at 10:10:56AM -0300, Daniel Henrique Barboza wrote: > EBB powerpc kernel test 'multi_counter_test' uses PM_CMPLU_STALL events > that we do not support. These events are related to CPU stalled/wasted > cycles while waiting for resources, cache misses and so on. > > Unlike the

Re: [PATCH 15/19] target/ppc/pmu_book3s_helper: enable counter negative for all PMCs

2021-08-09 Thread David Gibson
On Mon, Aug 09, 2021 at 10:10:53AM -0300, Daniel Henrique Barboza wrote: > All performance monitor counters can trigger a counter negative > condition if the proper MMCR0 bits are set. This patch does that by > doing the following: > > - pmc_counter_negative_enabled() will check whether a given

Re: [PATCH 05/19] target/ppc/pmu_book3s_helper.c: eliminate code repetition

2021-08-09 Thread David Gibson
On Mon, Aug 09, 2021 at 10:10:43AM -0300, Daniel Henrique Barboza wrote: > We don't need a base_icount value in CPUPPCState for each PMC. All the > calculation done after freeze will use the same base start value. Use a > single 'pmu_base_icount' attribute that can be use to all PMCs. > >

Re: [PATCH 12/19] target/ppc/pmu_book3s_helper.c: enable PMC1 counter negative EBB

2021-08-09 Thread David Gibson
On Mon, Aug 09, 2021 at 10:10:50AM -0300, Daniel Henrique Barboza wrote: > This patch starts the counter negative EBB support by enabling PMC1 > counter negative condition. > > A counter negative condition happens when a performance monitor counter > reaches the value 0x8000. When that

Re: [PATCH 09/19] PPC64/TCG: Implement 'rfebb' instruction

2021-08-09 Thread David Gibson
On Mon, Aug 09, 2021 at 10:10:47AM -0300, Daniel Henrique Barboza wrote: > From: Gustavo Romero > > An Event-Based Branch (EBB) allows applications to change the NIA when a > event-based exception occurs. Event-based exceptions are enabled by > setting the Branch Event Status and Control

Re: [PATCH 16/19] target/ppc/pmu_book3s_helper: adding 0xFA event

2021-08-09 Thread David Gibson
On Mon, Aug 09, 2021 at 10:10:54AM -0300, Daniel Henrique Barboza wrote: > The PowerISA 3.1 defines the 0xFA event as instructions completed when > the thread's CTRL register is set. Some EBB powerpc kernel tests use > this event to exercise both the PMU and the EBB support. Couldn't you

Re: [PATCH 03/19] target/ppc: add exclusive user write function for PMU regs

2021-08-09 Thread David Gibson
On Mon, Aug 09, 2021 at 10:10:41AM -0300, Daniel Henrique Barboza wrote: > From: Gustavo Romero > > Similar to the previous patch, write read on PowerPC PMU regs > requires extra handling than the generic write ureg functions. > > This patch adds a specific write function for user PMU SPRs, >

Re: [PATCH 06/19] target/ppc/pmu_book3s_helper: enable PMC1-PMC4 events

2021-08-09 Thread David Gibson
On Mon, Aug 09, 2021 at 10:10:44AM -0300, Daniel Henrique Barboza wrote: > So far the PMU logic was using PMC5 for instruction counting (linux > kernel PM_INST_CMPL) and PMC6 to count cycles (PM_CYC). We aren't using > PMCs 1-4. > > Let's enable all PMCs to count these 2 events we already

Re: [PATCH for-6.2 v6 6/7] spapr: use DEVICE_UNPLUG_ERROR to report unplug errors

2021-08-09 Thread David Gibson
On Mon, Aug 09, 2021 at 03:47:14PM -0300, Daniel Henrique Barboza wrote: > > > On 8/7/21 11:06 AM, Markus Armbruster wrote: > > Daniel Henrique Barboza writes: > > > > > Linux Kernel 5.12 is now unisolating CPU DRCs in the device_removal > > > error path, signalling that the hotunplug process

Re: [PATCH 10/19] target/ppc: PMU Event-Based exception support

2021-08-09 Thread David Gibson
On Mon, Aug 09, 2021 at 10:10:48AM -0300, Daniel Henrique Barboza wrote: > From: Gustavo Romero > > Following up the rfebb implementation, this patch adds the EBB exception > support that are triggered by Performance Monitor alerts. This exception > occurs when an enabled PMU condition or event

Re: [PATCH 04/19] target/ppc: PMU Book3s basic insns count for pseries TCG

2021-08-09 Thread David Gibson
On Mon, Aug 09, 2021 at 10:10:42AM -0300, Daniel Henrique Barboza wrote: > The PMCC (PMC Control) bit in the MMCR0 register controls whether the > counters PMC5 and PMC6 are being part of the performance monitor > facility in a specific time. If PMCC allows it, PMC5 and PMC6 will > always be used

Re: [PATCH 01/19] target/ppc: add exclusive Book3S PMU reg read/write functions

2021-08-09 Thread David Gibson
On Mon, Aug 09, 2021 at 10:10:39AM -0300, Daniel Henrique Barboza wrote: > The PowerPC PMU, as described by PowerISA v3.1, has a lot of functions > that freezes, resets and sets counters to specific values depending on > the circuntances. Some of these are trigged based on read/value of the > PMU

Re: [PATCH 00/26] ppc/pnv: Extend the powernv10 machine

2021-08-09 Thread David Gibson
On Mon, Aug 09, 2021 at 03:45:21PM +0200, Cédric Le Goater wrote: > Hi, > > This series adds the minimum set of models (XIVE2, PHB5) to boot a > baremetal POWER10 machine using the OpenPOWER firmware images. > > The major change is the support for the interrupt controller of the > POWER10

Re: [PATCH 00/26] ppc/pnv: Extend the powernv10 machine

2021-08-09 Thread David Gibson
On Mon, Aug 09, 2021 at 03:45:21PM +0200, Cédric Le Goater wrote: > Hi, > > This series adds the minimum set of models (XIVE2, PHB5) to boot a > baremetal POWER10 machine using the OpenPOWER firmware images. > > The major change is the support for the interrupt controller of the > POWER10

Re: [PATCH 02/19] target/ppc: add exclusive user read function for PMU regs

2021-08-09 Thread David Gibson
On Mon, Aug 09, 2021 at 10:10:40AM -0300, Daniel Henrique Barboza wrote: > From: Gustavo Romero > > User read on PowerPC PMU regs requires extra handling in some > instances. Instead of changing the existing read ureg function > (spr_read_ureg) this patch adds a specific read function for > user

[PATCH] fsl-imx6ul: add SAI1/2/3 and ASRC as unimplemented devices

2021-08-09 Thread Guenter Roeck
Define SAI1/2/3 and ASRC as unimplemented devices to avoid random Linux kernel crashes. Signed-off-by: Guenter Roeck --- hw/arm/fsl-imx6ul.c | 12 1 file changed, 12 insertions(+) diff --git a/hw/arm/fsl-imx6ul.c b/hw/arm/fsl-imx6ul.c index e0128d7316..48b60eb3ce 100644 ---

[PATCH] hw: arm: aspeed: Enable mac0/1 instead of mac1/2 for g220a

2021-08-09 Thread Guenter Roeck
According to its dts file in the Linux kernel, we need mac0 and mac1 enabled instead of mac1 and mac2. Also, g220a is based on aspeed-g5 (ast2500) which doesn't even have the third interface. Signed-off-by: Guenter Roeck --- hw/arm/aspeed.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)

[PATCH] target/riscv: Don't wrongly overide isa version

2021-08-09 Thread LIU Zhiwei
For some cpu, the isa version has already been set in cpu init function. Thus only overide the isa version when isa version is not set, or users set different isa version explicitly by cpu parameters. Signed-off-by: LIU Zhiwei --- target/riscv/cpu.c | 14 -- 1 file changed, 8

Re: [PATCH for 6.2 26/49] bsd-user: Create target specific vmparam.h

2021-08-09 Thread Warner Losh
On Mon, Aug 9, 2021 at 2:39 PM Richard Henderson < richard.hender...@linaro.org> wrote: > On 8/7/21 11:42 AM, Warner Losh wrote: > > +#define TARGET_MAXTSIZ (128UL*1024*1024) /* max text size */ > > +#define TARGET_DFLDSIZ (128UL*1024*1024) /* initial data size limit > */ > > +#define

Re: [PATCH for 6.2 25/49] bsd-user: define max args in terms of pages

2021-08-09 Thread Warner Losh
On Mon, Aug 9, 2021 at 2:33 PM Richard Henderson < richard.hender...@linaro.org> wrote: > On 8/7/21 11:42 AM, Warner Losh wrote: > > From: Warner Losh > > > > For 32-bit platforms, pass in up to 256k of args. For 64-bit, bump that > > to 512k. > > > > Signed-off-by: Kyle Evans > >

Re: [PATCH for 6.2 24/49] bsd-user: Include more things in qemu.h

2021-08-09 Thread Warner Losh
On Mon, Aug 9, 2021 at 2:31 PM Richard Henderson < richard.hender...@linaro.org> wrote: > On 8/7/21 11:42 AM, Warner Losh wrote: > > From: Warner Losh > > > > Include more header files to match bsd-user fork. > > > > Signed-off-by: Warner Losh > > --- > > bsd-user/qemu.h | 9 + > > 1

[PULL for-6.1 1/1] qga: fix leak of base64 decoded data on command error

2021-08-09 Thread Michael Roth
From: Daniel P. Berrangé If the guest command fails to be spawned, then we would leak the decoded base64 input used for the command's stdin feed. Signed-off-by: Daniel P. Berrangé Reviewed-by: Marc-André Lureau Signed-off-by: Michael Roth --- qga/commands.c | 4 ++-- 1 file changed, 2

[PATCH v2 1/1] target/riscv: Add User CSRs read-only check

2021-08-09 Thread LIU Zhiwei
For U-mode CSRs, read-only check is also needed. Signed-off-by: LIU Zhiwei Reviewed-by: Bin Meng --- target/riscv/csr.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/target/riscv/csr.c b/target/riscv/csr.c index 9a4ed18ac5..5499cae94a 100644 ---

[PULL for-6.1 0/1] qemu-ga patch queue for hard-freeze/rc3

2021-08-09 Thread Michael Roth
Hi Peter, This is a single fix for a potentially recurring memory leak in the guest agent. If you don't think it is rc3 material I can save it for 6.2, but if possible this would be good to have in. The following changes since commit dee64246ded3aa7dbada68b96ce1c64e5bea327d: Merge

Re: [PATCH] ppc/pnv: update skiboot to commit 820d43c0a775.

2021-08-09 Thread David Gibson
On Mon, Aug 09, 2021 at 10:14:05AM +0200, Cédric Le Goater wrote: > On 8/9/21 10:06 AM, Philippe Mathieu-Daudé wrote: > > On 8/9/21 9:55 AM, Cédric Le Goater wrote: > >> Hello Phil, > >> > >> On 8/9/21 9:06 AM, Philippe Mathieu-Daudé wrote: > >>> Hi Cédric, > >>> > >>> On 8/6/21 8:00 PM, Cédric Le

Re: [PATCH] xive: Remove extra '0x' prefix in trace events

2021-08-09 Thread David Gibson
On Mon, Aug 09, 2021 at 11:39:49AM +0200, Philippe Mathieu-Daudé wrote: > On 8/9/21 10:52 AM, Cédric Le Goater wrote: > > Cc: th...@redhat.com > > Fixes: 4e960974d4ee ("xive: Add trace events") > > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/519 > > Signed-off-by: Cédric Le Goater > >

Re: [PATCH] ppc/pnv: update skiboot to commit 820d43c0a775.

2021-08-09 Thread David Gibson
On Mon, Aug 09, 2021 at 09:55:35AM +0200, Cédric Le Goater wrote: > Hello Phil, > > On 8/9/21 9:06 AM, Philippe Mathieu-Daudé wrote: > > Hi Cédric, > > > > On 8/6/21 8:00 PM, Cédric Le Goater wrote: > >> It includes support for the POWER10 processor and the QEMU platform. > > > > 1/ Can you

Re: [PATCH for 6.2 30/49] bsd-user: elf cleanup

2021-08-09 Thread Richard Henderson
On 8/7/21 11:42 AM, Warner Losh wrote: From: Warner Losh Move OS-dependent defines into target_os_elf.h. Move the architectural dependent stuff into target_arch_elf.h. Adjust elfload.c to use target_create_elf_tables instead of create_elf_tables. Signed-off-by: Warner Losh Signed-off-by:

Re: [PATCH v1] s390x/ioinst: Fix wrong MSCH alignment check on little endian

2021-08-09 Thread Halil Pasic
On Thu, 5 Aug 2021 16:37:53 +0200 David Hildenbrand wrote: > schib->pmcw.chars is 32bit, not 16bit. This fixes the kvm-unit-tests > "css" test, which fails with: > > FAIL: Channel Subsystem: measurement block format1: Unaligned MB origin: > Program interrupt: expected(21) == received(0) >

Re: Re: [PATCH v4] virtio/vsock: add two more queues for datagram types

2021-08-09 Thread Jiang Wang .
On Mon, Aug 9, 2021 at 3:58 AM Stefano Garzarella wrote: > > On Thu, Aug 05, 2021 at 12:07:02PM -0700, Jiang Wang . wrote: > >On Wed, Aug 4, 2021 at 1:13 AM Stefano Garzarella > >wrote: > >> > >> On Tue, Aug 03, 2021 at 11:41:32PM +, Jiang Wang wrote: > >> >Datagram sockets are

Re: Re: [RFC v3] virtio/vsock: add two more queues for datagram types

2021-08-09 Thread Jiang Wang .
On Mon, Aug 9, 2021 at 3:49 AM Stefano Garzarella wrote: > > On Thu, Aug 05, 2021 at 12:00:05PM -0700, Jiang Wang . wrote: > >On Tue, Aug 3, 2021 at 11:49 PM Stefano Garzarella > >wrote: > >> > >> On Wed, Aug 4, 2021 at 8:41 AM Stefano Garzarella > >> wrote: > >> > > >> > On Tue, Aug 03, 2021

Re: [PATCH for 6.2 29/49] bsd-user: Add system independent stack, data and text limiting

2021-08-09 Thread Richard Henderson
On 8/7/21 11:42 AM, Warner Losh wrote: From: Warner Losh Eliminate the x86 specific stack stuff in favor of more generic control over the process size: target_maxtsiz max text size target_dfldsiz initial data size limit target_maxdsiz max data size target_dflssiz initial

Re: [PATCH for 6.2 28/49] bsd-user: Move stack initializtion into a per-os file.

2021-08-09 Thread Richard Henderson
On 8/7/21 11:42 AM, Warner Losh wrote: +static inline int setup_initial_stack(struct bsd_binprm *bprm, +abi_ulong *ret_addr, abi_ulong *stringp) +{ +int i; +abi_ulong stack_hi_addr; +size_t execpath_len, stringspace; +abi_ulong destp, argvp, envp, p; +struct

Re: [PATCH for 6.2 27/49] bsd-user: Add architecture specific signal tramp code

2021-08-09 Thread Richard Henderson
On 8/7/21 11:42 AM, Warner Losh wrote: From: Warner Losh Add a stubbed out version of setup_sigtramp. This is not yet used for x86, but is used for other architectures. This will be connected in future commits. Signed-off-by: Stacey Son Signed-off-by: Warner Losh ---

Re: [PATCH for 6.2 26/49] bsd-user: Create target specific vmparam.h

2021-08-09 Thread Richard Henderson
On 8/7/21 11:42 AM, Warner Losh wrote: +#define TARGET_MAXTSIZ (128UL*1024*1024) /* max text size */ +#define TARGET_DFLDSIZ (128UL*1024*1024) /* initial data size limit */ +#define TARGET_MAXDSIZ (512UL*1024*1024) /* max data size */ +#define TARGET_DFLSSIZ (8UL*1024*1024) /*

Re: [PATCH for 6.2 25/49] bsd-user: define max args in terms of pages

2021-08-09 Thread Richard Henderson
On 8/7/21 11:42 AM, Warner Losh wrote: From: Warner Losh For 32-bit platforms, pass in up to 256k of args. For 64-bit, bump that to 512k. Signed-off-by: Kyle Evans Signed-off-by: Warner Losh --- bsd-user/qemu.h | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-)

Re: [PATCH for 6.2 24/49] bsd-user: Include more things in qemu.h

2021-08-09 Thread Richard Henderson
On 8/7/21 11:42 AM, Warner Losh wrote: From: Warner Losh Include more header files to match bsd-user fork. Signed-off-by: Warner Losh --- bsd-user/qemu.h | 9 + 1 file changed, 9 insertions(+) diff --git a/bsd-user/qemu.h b/bsd-user/qemu.h index 6c4ec61d76..02e6e8327a 100644 ---

Re: [PULL 0/2] Block patches for 6.1-rc3

2021-08-09 Thread Peter Maydell
On Mon, 9 Aug 2021 at 18:03, Hanna Reitz wrote: > > Hi Peter, > > Let me prefix this by saying that it's me, Max. I've changed my name > and email address. I understand freeze may not be the best of times for > this, but it looks like I can no longer send mails from the mreitz@ > address for

[PATCH for-6.2 v3 1/2] qom: DECLARE_INTERFACE_CHECKER macro

2021-08-09 Thread Eduardo Habkost
The new macro will be similar to DECLARE_INSTANCE_CHECKER, but for interface types (that use INTEFACE_CHECK instead of OBJECT_CHECK). Signed-off-by: Eduardo Habkost --- Changes series v1 -> v2: none Change series v2 -> v3: * Rebased on top of [PATCH for-6.2 00/12] qom: Get rid of all manual

[PATCH for-6.2 v3 2/2] [autoamted] Use DECLARE_INTERFACE_CHECKER macro

2021-08-09 Thread Eduardo Habkost
Replace manual INTERFACE_CHECK macros with DECLARE_INTERFACE_CHECKER, which is less error prone. Generated using: $ ./scripts/codeconverter/converter.py -i \ --pattern=InterfaceCheckMacro $(g grep -l '' -- '*.[ch]') Signed-off-by: Eduardo Habkost --- include/hw/acpi/acpi_dev_interface.h |

Re: [PATCH] docs/devel: fix missing antislash

2021-08-09 Thread Eduardo Habkost
On Mon, Aug 09, 2021 at 07:31:41PM +0200, Alexandre Iooss wrote: > Signed-off-by: Alexandre Iooss > --- > docs/devel/qom.rst | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/docs/devel/qom.rst b/docs/devel/qom.rst > index e5fe3597cd..b9568c0fb8 100644 > ---

[PATCH for-6.2 v3 0/2] qom: DECLARE_INTERFACE_CHECKER macro

2021-08-09 Thread Eduardo Habkost
This is an alternative to the series: Subject: [PATCH 0/3] qom: Replace INTERFACE_CHECK with OBJECT_CHECK https://lore.kernel.org/qemu-devel/20200916193101.511600-1-ehabk...@redhat.com/ Instead of removing INTERFACE_CHECK completely, keep it but use a DECLARE_INTERFACE_CHECKER macro to

Re: [PATCH for-6.2 00/12] qom: Get rid of all manual usage of OBJECT_CHECK & friends

2021-08-09 Thread Eduardo Habkost
On Sat, Aug 07, 2021 at 10:15:52AM +0200, Philippe Mathieu-Daudé wrote: > On 8/6/21 11:11 PM, Eduardo Habkost wrote: > > This series gets rid of all manual usage of OBJECT_CHECK, > > OBJECT_CLASS_CHECK, and OBJECT_GET_CLASS. > > > > All type check macros defined manually are replaced with > >

migration-test, intermittent hang, aarch64 host, i386 guest

2021-08-09 Thread Peter Maydell
migration-test hung on me again in merge testing. Here are the backtraces; note that one of the qemu-system-i386 processes is a zombie that its parent isn't reaping. Process tree: migration-test(786453)-+-qemu-system-i38(802719) |-qemu-system-i38(802846)

Re: [PATCH] fuzz: avoid building twice, when running on gitlab

2021-08-09 Thread Peter Maydell
On Mon, 9 Aug 2021 at 20:30, Alexander Bulekov wrote: > > On 210809 1506, Alexander Bulekov wrote: > > On 210809 1925, Peter Maydell wrote: > > > On Mon, 9 Aug 2021 at 12:18, Alexander Bulekov wrote: > > > > > > > > On oss-fuzz, we build twice, to put together a build that is portable to > > > >

Re: [RFC PATCH 02/13] target/riscv: Support UXL32 for branch instructions

2021-08-09 Thread Richard Henderson
On 8/8/21 3:45 PM, LIU Zhiwei wrote: On 2021/8/6 上午3:06, Richard Henderson wrote: On 8/4/21 4:53 PM, LIU Zhiwei wrote: +static TCGv gpr_src_u(DisasContext *ctx, int reg_num) +{ +    if (reg_num == 0) { +    return ctx->zero; +    } +    if (ctx->uxl32) { +   

Re: [PATCH] fuzz: avoid building twice, when running on gitlab

2021-08-09 Thread Alexander Bulekov
On 210809 1506, Alexander Bulekov wrote: > On 210809 1925, Peter Maydell wrote: > > On Mon, 9 Aug 2021 at 12:18, Alexander Bulekov wrote: > > > > > > On oss-fuzz, we build twice, to put together a build that is portable to > > > the runner containers. On gitlab ci, this is wasteful and

[PATCH] Acceptance tests: add myself as a reviewer for the acceptance tests.

2021-08-09 Thread Willian Rampazzo
Signed-off-by: Willian Rampazzo --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 37b1a8e442..3f8ad63165 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -3422,6 +3422,7 @@ W: https://trello.com/b/6Qi1pxVn/avocado-qemu R: Cleber Rosa R: Philippe

Re: [PATCH-for-6.2 v3 1/7] target/mips: Introduce generic TRANS() macro for decodetree helpers

2021-08-09 Thread Richard Henderson
On 8/8/21 7:30 AM, Philippe Mathieu-Daudé wrote: Plain copy/paste of the TRANS() macro introduced in the PPC commit f2aabda8ac9 ("target/ppc: Move D/DS/X-form integer loads to decodetree") to the MIPS target. Suggested-by: Richard Henderson Signed-off-by: Philippe Mathieu-Daudé ---

Re: [PATCH-for-6.2 2/2] target/mips/mxu: Use tcg_constant_i32()

2021-08-09 Thread Richard Henderson
On 8/8/21 6:08 AM, Philippe Mathieu-Daudé wrote: Replace uses of tcg_const_i32() with the allocate and free close together. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/tcg/mxu_translate.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) In my opinion these functions

Re: [PATCH-for-6.2 1/2] target/mips/tx79: Use tcg_constant_tl()

2021-08-09 Thread Richard Henderson
On 8/8/21 6:08 AM, Philippe Mathieu-Daudé wrote: Replace uses of tcg_const_tl() with the allocate and free close together. Signed-off-by: Philippe Mathieu-Daudé --- target/mips/tcg/tx79_translate.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) Reviewed-by: Richard Henderson

Re: [PATCH v3 10/10] virtiofsd: Add lazy lo_do_find()

2021-08-09 Thread Vivek Goyal
On Fri, Jul 30, 2021 at 05:01:34PM +0200, Max Reitz wrote: > lo_find() right now takes two lookup keys for two maps, namely the file > handle for inodes_by_handle and the statx information for inodes_by_ids. > However, we only need the statx information if looking up the inode by > the file handle

Re: [PATCH] fuzz: avoid building twice, when running on gitlab

2021-08-09 Thread Alexander Bulekov
On 210809 1925, Peter Maydell wrote: > On Mon, 9 Aug 2021 at 12:18, Alexander Bulekov wrote: > > > > On oss-fuzz, we build twice, to put together a build that is portable to > > the runner containers. On gitlab ci, this is wasteful and contributes to > > timeouts on the build-oss-fuzz job. Avoid

Re: [PATCH for-6.2 v6 1/7] hw/acpi/memory_hotplug.c: avoid sending MEM_UNPLUG_ERROR if dev->id is NULL

2021-08-09 Thread Daniel Henrique Barboza
On 8/7/21 10:38 AM, Markus Armbruster wrote: I apologize for the not reviewing this promptly. Daniel Henrique Barboza writes: qapi_event_send_mem_unplug_error() deals with @device being NULL by replacing it with an empty string ("") when emitting the event. Aside from the fact that this

Re: [PATCH for-6.2 v6 6/7] spapr: use DEVICE_UNPLUG_ERROR to report unplug errors

2021-08-09 Thread Daniel Henrique Barboza
On 8/7/21 11:06 AM, Markus Armbruster wrote: Daniel Henrique Barboza writes: Linux Kernel 5.12 is now unisolating CPU DRCs in the device_removal error path, signalling that the hotunplug process wasn't successful. This allow us to send a DEVICE_UNPLUG_ERROR in drc_unisolate_logical() to

Re: [PULL 0/2] Block patches for 6.1-rc3

2021-08-09 Thread Peter Maydell
On Mon, 9 Aug 2021 at 18:03, Hanna Reitz wrote: > > Hi Peter, > > Let me prefix this by saying that it's me, Max. I've changed my name > and email address. I understand freeze may not be the best of times for > this, but it looks like I can no longer send mails from the mreitz@ > address for

Re: [PATCH v3 09/10] virtiofsd: Optionally fill lo_inode.fhandle

2021-08-09 Thread Vivek Goyal
On Fri, Jul 30, 2021 at 05:01:33PM +0200, Max Reitz wrote: > When the inode_file_handles option is set, try to generate a file handle > for new inodes instead of opening an O_PATH FD. > > Being able to open these again will require CAP_DAC_READ_SEARCH, so the > description text tells the user

Re: [PATCH] fuzz: avoid building twice, when running on gitlab

2021-08-09 Thread Peter Maydell
On Mon, 9 Aug 2021 at 12:18, Alexander Bulekov wrote: > > On oss-fuzz, we build twice, to put together a build that is portable to > the runner containers. On gitlab ci, this is wasteful and contributes to > timeouts on the build-oss-fuzz job. Avoid building twice on gitlab, at > the remote cost

Re: [PATCH for 6.2 23/49] bsd-user: pull in target_arch_thread.h update target_arch_elf.h

2021-08-09 Thread Richard Henderson
On 8/8/21 11:43 AM, Warner Losh wrote: BTW, I've started to notice that many of the items flagged by the style commitcheck.pl script originated in the linux-user code and it's still that way today...  Do you have any advice for what I should do about that, if anything?

[PATCH] docs/devel: fix missing antislash

2021-08-09 Thread Alexandre Iooss
Signed-off-by: Alexandre Iooss --- docs/devel/qom.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/devel/qom.rst b/docs/devel/qom.rst index e5fe3597cd..b9568c0fb8 100644 --- a/docs/devel/qom.rst +++ b/docs/devel/qom.rst @@ -309,7 +309,7 @@ This is equivalent to the

[PATCH v2 0/1] virtio: failover: allow to keep the VFIO device rather than the virtio-net one

2021-08-09 Thread Laurent Vivier
v2: use validate_features() to disable the guest driver rather than setting vring.num to 0. With failover, when the guest virtio-net driver doesn't support the STANDBY feature, the primary device is not plugged and only the virtio-net device is kept. Doing like that we can migrate the machine

[PATCH v2 1/1] virtio: failover: define the default device to use in case of error

2021-08-09 Thread Laurent Vivier
If the guest driver doesn't support the STANDBY feature, by default we keep the virtio-net device and don't hotplug the VFIO device, but in some cases, user can prefer to use the VFIO device rather than the virtio-net one. We can't unplug the virtio-net device (because on migration it is expected

Re: [PATCH] audio: Never send migration section

2021-08-09 Thread Daniel P . Berrangé
On Mon, Aug 09, 2021 at 06:09:56PM +0100, Dr. David Alan Gilbert (git) wrote: > From: "Dr. David Alan Gilbert" > > The audio migration vmstate is empty, and always has been; we can't > just remove it though because an old qemu might send it us. > Changes with -audiodev now mean it's sometimes

[PATCH] audio: Never send migration section

2021-08-09 Thread Dr. David Alan Gilbert (git)
From: "Dr. David Alan Gilbert" The audio migration vmstate is empty, and always has been; we can't just remove it though because an old qemu might send it us. Changes with -audiodev now mean it's sometimes created when it didn't used to be, and can confuse migration to old qemu. Change it so

[PULL 0/2] Block patches for 6.1-rc3

2021-08-09 Thread Hanna Reitz
Hi Peter, Let me prefix this by saying that it's me, Max. I've changed my name and email address. I understand freeze may not be the best of times for this, but it looks like I can no longer send mails from the mreitz@ address for now (only receive them). I've tried to create and sign the tag

[PULL 2/2] tests: filter out TLS distinguished name in certificate checks

2021-08-09 Thread Hanna Reitz
From: Daniel P. Berrangé The version of GNUTLS in Fedora 34 has changed the order in which encodes fields when generating new TLS certificates. This in turn changes the order seen when querying the distinguished name. This ultimately breaks the expected output in the NBD TLS iotests. We don't

[PULL 1/2] block/export/fuse.c: fix musl build

2021-08-09 Thread Hanna Reitz
From: Fabrice Fontaine Fix the following build failure on musl raised since version 6.0.0 and https://gitlab.com/qemu-project/qemu/-/commit/4ca37a96a75aafe7a37ba51ab1912b09b7190a6b because musl does not define FALLOC_FL_ZERO_RANGE: ../block/export/fuse.c: In function 'fuse_fallocate':

Re: [PATCH v3 08/10] virtiofsd: Add inodes_by_handle hash table

2021-08-09 Thread Hanna Reitz
On 09.08.21 18:10, Vivek Goyal wrote: On Fri, Jul 30, 2021 at 05:01:32PM +0200, Max Reitz wrote: Currently, lo_inode.fhandle is always NULL and so always keep an O_PATH FD in lo_inode.fd. Therefore, when the respective inode is unlinked, its inode ID will remain in use until we drop our

[PATCH v3] blog: add a post for the new TCG cache modelling plugin

2021-08-09 Thread Mahmoud Mandour
This post introduces the new TCG plugin `cache` that's used for cache modelling. This plugin is a part of my GSoC 2021 participation. Signed-off-by: Mahmoud Mandour --- v2 -> v3: Added a prologue briefly explaining the importance of caching. Explained the multi-threaded linux-user

Re: [PATCH v3 07/10] virtiofsd: Add lo_inode.fhandle

2021-08-09 Thread Hanna Reitz
On 09.08.21 17:21, Vivek Goyal wrote: On Fri, Jul 30, 2021 at 05:01:31PM +0200, Max Reitz wrote: This new field is an alternative to lo_inode.fd: Either of the two must be set. In case an O_PATH FD is needed for some lo_inode, it is either taken from lo_inode.fd, if valid, or a temporary FD is

[CXL volatile MEM] - Qemu command to turn on HMAT and NUMA fails with assertion

2021-08-09 Thread Samarth Saxena
Hi All, I am trying the following command to run Qemu with Kernel 5.14. qemu-system-x86_64 -M q35,accel=kvm,nvdimm=on,cxl=on,hmat=on -m 8448M,slots=2,maxmem=16G -smp 8,sockets=2,cores=2,threads=2 -hda /lan/dscratch/singhabh/shradha/ubuntu-20.10-64_with_orig_driver_backup.qcow2 -enable-kvm

Re: [PATCH v3] hw/acpi: add an assertion check for non-null return from acpi_get_i386_pci_host

2021-08-09 Thread Ani Sinha
On Fri, 6 Aug 2021, Philippe Mathieu-Daudé wrote: > On 8/6/21 4:01 PM, Philippe Mathieu-Daudé wrote: > > On 8/6/21 12:52 PM, Ani Sinha wrote: > >> On Fri, 6 Aug 2021, Igor Mammedov wrote: > >>> On Thu, 5 Aug 2021 19:42:35 +0530 (IST) > >>> Ani Sinha wrote: > On Thu, 5 Aug 2021, Ani Sinha

[PATCH v13] qapi: introduce 'query-x86-cpuid' QMP command.

2021-08-09 Thread Valeriy Vdovin
From: Valeriy Vdovin Introducing new QMP command 'query-x86-cpuid'. This command can be used to get virtualized cpu model info generated by QEMU during VM initialization in the form of cpuid representation. Diving into more details about virtual CPU generation: QEMU first parses '-cpu' command

[PATCH] ui/sdl2: Check return value from g_setenv()

2021-08-09 Thread Peter Maydell
Setting environment variables can fail; check the return value from g_setenv() and bail out if we couldn't set SDL_VIDEODRIVER. Fixes: Coverity 1458798 Signed-off-by: Peter Maydell --- I followed existing practice in this function for how it deals with errors (ie, fprintf to stderr and exit).

Re: [PATCH 1/2] virtio: add a way to disable a queue

2021-08-09 Thread Laurent Vivier
On 09/08/2021 05:01, Jason Wang wrote: > > 在 2021/8/6 下午3:27, Laurent Vivier 写道: >> On 06/08/2021 08:25, Jason Wang wrote: >>> 在 2021/8/2 下午4:42, Laurent Vivier 写道: On 02/08/2021 06:50, Jason Wang wrote: > 在 2021/7/30 上午3:19, Laurent Vivier 写道: >> Add

Re: [PATCH v3 08/10] virtiofsd: Add inodes_by_handle hash table

2021-08-09 Thread Vivek Goyal
On Fri, Jul 30, 2021 at 05:01:32PM +0200, Max Reitz wrote: > Currently, lo_inode.fhandle is always NULL and so always keep an O_PATH > FD in lo_inode.fd. Therefore, when the respective inode is unlinked, > its inode ID will remain in use until we drop our lo_inode (and > lo_inode_put() thus

Re: [PULL for-6.1 0/1] hw/nvme fixes

2021-08-09 Thread Peter Maydell
On Mon, 9 Aug 2021 at 11:56, Klaus Jensen wrote: > > From: Klaus Jensen > > Hi Peter, > > The following changes since commit dee64246ded3aa7dbada68b96ce1c64e5bea327d: > > Merge remote-tracking branch > 'remotes/vivier2/tags/linux-user-for-6.1-pull-request' into staging > (2021-08-06 10:28:33

Re: [PATCH V6 00/27] Live Update

2021-08-09 Thread Steven Sistare
I forgot to mention in the changes list: I added a new mechanism to save fd values, in lieu of the environment. See [PATCH V6 13/27] cpr: preserve extra state - Steve On 8/6/2021 5:43 PM, Steve Sistare wrote: > Provide the cpr-save, cpr-exec, and cpr-load commands for live update. > These save

Re: [PATCH] linux-user: Check lock_user result for ip_mreq_source sockopts

2021-08-09 Thread Philippe Mathieu-Daudé
On 8/9/21 5:54 PM, Peter Maydell wrote: > In do_setsockopt(), the code path for the options which take a struct > ip_mreq_source (IP_BLOCK_SOURCE, IP_UNBLOCK_SOURCE, > IP_ADD_SOURCE_MEMBERSHIP and IP_DROP_SOURCE_MEMBERSHIP) fails to > check the return value from lock_user(). Handle this in the

Re: [PATCH 09/10] hw/misc: Add Infineon DPS310 sensor model

2021-08-09 Thread Philippe Mathieu-Daudé
On 8/9/21 3:15 PM, Cédric Le Goater wrote: > From: Joel Stanley > > This contains some hardcoded register values that were obtained from the > hardware after reading the temperature. > > It does enough to test the Linux kernel driver. The FIFO mode, IRQs and > operation modes other than the

Re: [PATCH 08/10] aspeed: Emulate the AST2600A3

2021-08-09 Thread Philippe Mathieu-Daudé
On 8/9/21 3:15 PM, Cédric Le Goater wrote: > From: Joel Stanley > > This is the latest revision of the ASPEED 2600 SoC. As there is no > need to model multiple revisions of the same SoC for the moment, > update the SCU AST2600 to model the A3 revision instead of the A1 and > adapt the AST2600

[PATCH] linux-user: Check lock_user result for ip_mreq_source sockopts

2021-08-09 Thread Peter Maydell
In do_setsockopt(), the code path for the options which take a struct ip_mreq_source (IP_BLOCK_SOURCE, IP_UNBLOCK_SOURCE, IP_ADD_SOURCE_MEMBERSHIP and IP_DROP_SOURCE_MEMBERSHIP) fails to check the return value from lock_user(). Handle this in the usual way by returning -TARGET_EFAULT. (In

Re: [PATCH 03/10] watchdog: aspeed: Fix sequential control writes

2021-08-09 Thread Philippe Mathieu-Daudé
On 8/9/21 3:15 PM, Cédric Le Goater wrote: > From: Andrew Jeffery > > The logic in the handling for the control register required toggling the > enable state for writes to stick. Rework the condition chain to allow > sequential writes that do not update the enable state. > > Fixes: 854123bf8d4b

Re: [PATCH for 6.1] tests: filter out TLS distinguished name in certificate checks

2021-08-09 Thread Hanna Reitz
On 04.08.21 20:03, Daniel P. Berrangé wrote: The version of GNUTLS in Fedora 34 has changed the order in which encodes fields when generating new TLS certificates. This in turn changes the order seen when querying the distinguished name. This ultimately breaks the expected output in the NBD TLS

Re: [PATCH v2] block/export/fuse.c: fix musl build

2021-08-09 Thread Hanna Reitz
On 09.08.21 11:51, Fabrice Fontaine wrote: Fix the following build failure on musl raised since version 6.0.0 and https://gitlab.com/qemu-project/qemu/-/commit/4ca37a96a75aafe7a37ba51ab1912b09b7190a6b because musl does not define FALLOC_FL_ZERO_RANGE: ../block/export/fuse.c: In function

  1   2   3   >