Re: [PATCH 06/11] ppc/pnv: make pnv_ics_resend() use chip8->phbs[]

2022-06-14 Thread Daniel Henrique Barboza
On 6/14/22 06:24, Frederic Barrat wrote: On 13/06/2022 17:44, Daniel Henrique Barboza wrote: pnv_ics_resend() is scrolling through all the child objects of the chip to search for the PHBs. It's faster and simpler to just use the phbs[] array. pnv_ics_resend_child() was folded into pnv_ics_

Re: [PULL 00/15] Kraxel 20220614 patches

2022-06-14 Thread Richard Henderson
t: git://git.kraxel.org/qemu tags/kraxel-20220614-pull-request for you to fetch changes up to b95b56311a0890da0c9f7fc624529c3d7f8dbce0: virtio-gpu: Respect UI refresh rate for EDID (2022-06-14 10:34:37 +0200) usb: add CanoKey device,

Re: [PATCH 08/11] ppc/pnv: turn chip8->phbs[] into a PnvPHB3* array

2022-06-14 Thread Daniel Henrique Barboza
On 6/14/22 06:53, Frederic Barrat wrote: On 13/06/2022 17:44, Daniel Henrique Barboza wrote: When enabling user created PHBs (a change reverted by commit 9c10d86fee) we were handling PHBs created by default versus by the user in different manners. The only difference between these PHBs is t

Re: [PATCH 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-06-14 Thread Keith Busch
On Tue, Jun 14, 2022 at 03:24:37PM +0800, Jinhao Fan wrote: > > On Jun 14, 2022, at 5:15 AM, Keith Busch wrote: > > @@ -6538,9 +6544,25 @@ static void nvme_process_db(NvmeCtrl *n, hwaddr > > addr, int val) > > > > trace_pci_nvme_mmio_doorbell_sq(sq->sqid, new_tail); > > > > -if

Re: [PATCH 08/11] ppc/pnv: turn chip8->phbs[] into a PnvPHB3* array

2022-06-14 Thread Frederic Barrat
On 14/06/2022 17:39, Daniel Henrique Barboza wrote: I've been thinking about it and I guess I could do better with this and the proxy pnv-phb series that is already in v2. What I'm thinking is: - crop patches 8-11 from this series. Patches 1-7 would be the prep cleanup series; - split the pn

[PATCH] build: fix check for -fsanitize-coverage-allowlist

2022-06-14 Thread Alexander Bulekov
The existing check has two problems: 1. Meson uses a private directory for the get_supported_arguments check. ./instrumentation-filter does not exist in that private directory (it is copied into the root of the build-directory). 2. fsanitize-coverage-allowlist is unused when coverage instrumentati

Re: [PATCH 08/11] ppc/pnv: turn chip8->phbs[] into a PnvPHB3* array

2022-06-14 Thread Cédric Le Goater
On 6/14/22 17:39, Daniel Henrique Barboza wrote: On 6/14/22 06:53, Frederic Barrat wrote: On 13/06/2022 17:44, Daniel Henrique Barboza wrote: When enabling user created PHBs (a change reverted by commit 9c10d86fee) we were handling PHBs created by default versus by the user in different man

Re: [PATCH v16 2/9] linux-user: Add LoongArch signal support

2022-06-14 Thread Richard Henderson
On 6/14/22 02:05, Song Gao wrote: Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang --- linux-user/loongarch64/signal.c| 283 + linux-user/loongarch64/target_signal.h | 13 ++ 2 files changed, 296 insertions(+) create mode 100644 linux-user/loongarch64/

[PATCH] hw:w25p80: Add STATE_STANDBY to handle incorrect command

2022-06-14 Thread Dan Zhang
--- hw/block/m25p80.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/block/m25p80.c b/hw/block/m25p80.c index b6bd430a99..3bb0466dca 100644 --- a/hw/block/m25p80.c +++ b/hw/block/m25p80.c @@ -423,6 +423,7 @@ typedef enum { STATE_COLLECTING_DATA, STATE_COLLECTING_VAR_LEN_DA

Re: [PATCH v16 3/9] linux-user: Add LoongArch elf support

2022-06-14 Thread Richard Henderson
On 6/14/22 02:05, Song Gao wrote: +#define ELF_HWCAP get_elf_hwcap() + +static uint32_t get_elf_hwcap(void) +{ +return 0; +} This should not be zero. See cpu_probe_common in the kernel. At minimum HWCAP_LOONGARCH_CRC32 and HWCAP_LOONGARCH_FPU are missing. I don't know how many of the o

Re: [PATCH v2 1/2] QIOChannelSocket: Reduce ifdefs to improve readability

2022-06-14 Thread Leonardo Bras Soares Passos
On Tue, Jun 14, 2022 at 5:36 AM Daniel P. Berrangé wrote: > > On Mon, Jun 13, 2022 at 06:21:18PM -0300, Leonardo Bras Soares Passos wrote: > > On Fri, Jun 10, 2022 at 5:25 AM Daniel P. Berrangé > > wrote: > > > > > > > [...] > > > > > Ok, so if it is checked earlier then we merely need an assert

[PATCH RESEND 3/3] target/ppc: Implement ISA 3.00 tlbie[l]

2022-06-14 Thread Leandro Lupori
This initial version supports the invalidation of one or all TLB entries. Flush by PID/LPID, or based in process/partition scope is not supported, because it would make using the generic QEMU TLB implementation hard. In these cases, all entries are flushed. Signed-off-by: Leandro Lupori --- targ

Re: [PATCH 0/2] linux-aio: fix unbalanced plugged counter in laio_io_unplug()

2022-06-14 Thread Stefan Hajnoczi
On Thu, Jun 09, 2022 at 05:47:10PM +0100, Stefan Hajnoczi wrote: > An unlucky I/O pattern can result in stalled Linux AIO requests when the > plugged counter becomes unbalanced. See Patch 1 for details. > > Patch 2 adds a comment to explain why the laio_io_unplug() even checks max > batch in the f

Re: [PATCH v12 00/14] vfio-user server in QEMU

2022-06-14 Thread Stefan Hajnoczi
On Tue, Jun 14, 2022 at 02:37:02PM +, Jag Raman wrote: > > On Jun 14, 2022, at 3:06 AM, Stefan Hajnoczi wrote: > > > > On Mon, Jun 13, 2022 at 04:26:20PM -0400, Jagannathan Raman wrote: > >> This is v12 of the server side changes to enable vfio-user in QEMU. > >> > >> Thanks so much for revi

[PATCH RESEND 0/3] ppc: Implement ISA 3.00 tlbie[l]

2022-06-14 Thread Leandro Lupori
Add support for ISA 3.00 tlbie/tlbiel instructions, with RIC, PRS and R operands. Also, for Radix MMU, add support for the TLB invalidation of a single page. Flush by PID/LPID, or based in process/partition scope is not supported, because it would make using the generic QEMU TLB implementation har

[PATCH RESEND 1/3] target/ppc: Move tlbie to decode tree

2022-06-14 Thread Leandro Lupori
Also decode RIC, PRS and R operands. Signed-off-by: Leandro Lupori --- target/ppc/cpu_init.c| 4 +- target/ppc/insn32.decode | 7 ++ target/ppc/translate.c | 42 +- target/ppc/translate/storage-ctrl-impl.c.inc | 81 +

Re: [PATCH v2 07/11] vfio/migration: Implement VFIO migration protocol v2

2022-06-14 Thread Avihai Horon
On 6/14/2022 2:08 PM, Joao Martins wrote: External email: Use caution opening links or attachments On 5/30/22 18:07, Avihai Horon wrote: +static int vfio_save_complete_precopy(QEMUFile *f, void *opaque) +{ +VFIODevice *vbasedev = opaque; +enum vfio_device_mig_state recover_state; +

Re: [PATCH v16 9/9] target/loongarch: Update README

2022-06-14 Thread Richard Henderson
On 6/14/22 02:05, Song Gao wrote: Add linux-user emulation introduction Signed-off-by: Song Gao Signed-off-by: Xiaojuan Yang --- target/loongarch/README | 39 +-- 1 file changed, 37 insertions(+), 2 deletions(-) Reviewed-by: Richard Henderson r~

[PATCH] tests/vm: allow running tests in an unconfigured source tree

2022-06-14 Thread Paolo Bonzini
tests/vm/Makefile.include used to assume that it could run in an unconfigured source tree, and Cirrus CI relies on that. It was however broken by commit f4c66f1705 ("tests: use tests/venv to run basevm.py-based scripts", 2022-06-06), which co-opted the virtual environment being used by avocado tes

[PATCH RESEND 2/3] target/ppc: Move tlbiel to decode tree

2022-06-14 Thread Leandro Lupori
Also decode RIC, PRS and R operands. Signed-off-by: Leandro Lupori --- target/ppc/insn32.decode | 1 + target/ppc/translate.c | 22 target/ppc/translate/storage-ctrl-impl.c.inc | 16 +- 3 files changed, 12 insertions(+),

Re: [PATCH] configure: cleanup -fno-pie detection

2022-06-14 Thread Richard Henderson
On 6/14/22 07:50, Paolo Bonzini wrote: Place it only inside the 'if test "$pie" = "no"' conditional. Signed-off-by: Paolo Bonzini --- configure | 13 - 1 file changed, 4 insertions(+), 9 deletions(-) Worth mentioning 43924d1e53f, which obviated... -# Check we support -fno-pie

Re: [PATCH v16 7/9] target/loongarch: Adjust functions and structure to support user-mode

2022-06-14 Thread Richard Henderson
On 6/14/22 02:05, Song Gao wrote: @@ -172,17 +173,20 @@ static void loongarch_cpu_do_interrupt(CPUState *cs) update_badinstr = 0; break; case EXCCODE_ADEM: +case EXCCODE_BCE: case EXCCODE_SYS: case EXCCODE_BRK: +case EXCCODE_INE: +case EXCCODE_IPE

Re: [PATCH] hw:w25p80: Add STATE_STANDBY to handle incorrect command

2022-06-14 Thread Dan Zhang
Hi Cedric, I am sorry that accidently submit a pre-view code change as a patch using the git-sendmail. I originally mean to copy the following code in email reply and let commnity get better understand my proposal. Let me submit a formal patch in seperate thread. And will remove the code using t

Re: [PATCH v2 07/11] vfio/migration: Implement VFIO migration protocol v2

2022-06-14 Thread Joao Martins
On 6/14/22 17:34, Avihai Horon wrote: > > On 6/14/2022 2:08 PM, Joao Martins wrote: >> External email: Use caution opening links or attachments >> >> >> On 5/30/22 18:07, Avihai Horon wrote: >>> +static int vfio_save_complete_precopy(QEMUFile *f, void *opaque) >>> +{ >>> +VFIODevice *vbased

Re: [PATCH v6 0/8] KVM: mm: fd-based approach for supporting KVM guest private memory

2022-06-14 Thread Andy Lutomirski
On Tue, Jun 14, 2022 at 12:32 AM Chao Peng wrote: > > On Thu, Jun 09, 2022 at 08:29:06PM +, Sean Christopherson wrote: > > On Wed, Jun 08, 2022, Vishal Annapurve wrote: > > > > One argument is that userspace can simply rely on cgroups to detect > > misbehaving > > guests, but (a) those types

Re: [PULL 00/10] Block jobs & NBD patches

2022-06-14 Thread Richard Henderson
On 6/14/22 03:29, Vladimir Sementsov-Ogievskiy wrote: The following changes since commit debd0753663bc89c86f5462a53268f2e3f680f60: Merge tag 'pull-testing-next-140622-1' of https://github.com/stsquad/qemu into staging (2022-06-13 21:10:57 -0700) are available in the Git repository at: h

New "IndustryStandard" fw_cfg?

2022-06-14 Thread Dionna Amalie Glaze
Hi y'all, I'm Dionna. I work on Confidential VMs at Google Cloud. I've been keeping up with the TDX and SEV-SNP developments in OVMF and Linux, and some in Qemu. There's a new UEFI feature in v2.9 of the specification (March 2021) that allows for memory ranges to be classified as "unaccepted", sin

Re: [PATCH v2] docs: add PCIe root bus for VGA compat guideline

2022-06-14 Thread Kevin Locke
On Tue, 2022-06-14 at 10:52 +0200, Gerd Hoffmann wrote: >> On 06/12/22 19:32, Kevin Locke wrote: >>> PCI Express devices which use legacy VGA compatibility should be placed >>> on the Root Complex. This simplifies ioport access to VGA registers, >>> which requires use of a special exception bit to

Re: [PATCH v6 0/8] KVM: mm: fd-based approach for supporting KVM guest private memory

2022-06-14 Thread Sean Christopherson
On Tue, Jun 14, 2022, Andy Lutomirski wrote: > On Tue, Jun 14, 2022 at 12:32 AM Chao Peng > wrote: > > > > On Thu, Jun 09, 2022 at 08:29:06PM +, Sean Christopherson wrote: > > > On Wed, Jun 08, 2022, Vishal Annapurve wrote: > > > > > > One argument is that userspace can simply rely on cgroups

[PATCH] hw:m25p80: Add STATE_STANDBY command state

2022-06-14 Thread Dan Zhang
HW normally will switch it to stand by mode when receive incorrect command. i.e. Macronix MX66L1G45G data sheet section 8 DEVICE OPERATION described ``` 2. When an incorrect command is written to this device, it enters standby mode and stays in standby mode until the next CS# falling edge. In stand

Re: [PATCH v6 3/8] mm/memfd: Introduce MFD_INACCESSIBLE flag

2022-06-14 Thread Sean Christopherson
On Thu, Jun 02, 2022, Chao Peng wrote: > On Wed, Jun 01, 2022 at 02:11:42PM +0200, Gupta, Pankaj wrote: > > > > > > > Introduce a new memfd_create() flag indicating the content of the > > > > > created memfd is inaccessible from userspace through ordinary MMU > > > > > access (e.g., read/write/mma

Re: [PATCH v6 0/8] KVM: mm: fd-based approach for supporting KVM guest private memory

2022-06-14 Thread Andy Lutomirski
On Tue, Jun 14, 2022 at 12:09 PM Sean Christopherson wrote: > > On Tue, Jun 14, 2022, Andy Lutomirski wrote: > > On Tue, Jun 14, 2022 at 12:32 AM Chao Peng > > wrote: > > > > > > On Thu, Jun 09, 2022 at 08:29:06PM +, Sean Christopherson wrote: > > > > On Wed, Jun 08, 2022, Vishal Annapurve w

[PATCH v4 0/4] cutils: Introduce bundle mechanism

2022-06-14 Thread Akihiko Odaki
Developers often run QEMU without installing. The bundle mechanism allows to look up files which should be present in installation even in such a situation. It is a general mechanism and can find any files located relative to the installation tree. The build tree must have a new directory, qemu-bu

[PATCH v4 1/4] cutils: Introduce bundle mechanism

2022-06-14 Thread Akihiko Odaki
Developers often run QEMU without installing. The bundle mechanism allows to look up files which should be present in installation even in such a situation. It is a general mechanism and can find any files located relative to the installation tree. The build tree must have a new directory, qemu-bu

[PATCH v4 2/4] datadir: Use bundle mechanism

2022-06-14 Thread Akihiko Odaki
softmmu/datadir.c had its own implementation to find files in the build tree, but now bundle mechanism provides the unified implementation which works for datadir and the other files. Signed-off-by: Akihiko Odaki --- .travis.yml | 2 +- meson.build | 3 ++- pc-b

[PATCH v4 3/4] ui/icons: Use bundle mechanism

2022-06-14 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- meson.build | 2 +- ui/cocoa.m | 29 - ui/gtk.c | 6 +- ui/icons/meson.build | 36 ui/sdl2.c| 18 +++--- 5 files changed, 61 insertions(+)

RE: [RFC PATCH 00/13] Add a plugin to support out-of-band live migration for VFIO pass-through device

2022-06-14 Thread Dong, Eddie
> -Original Message- > From: Alex Williamson > Sent: Wednesday, June 1, 2022 11:01 AM > To: Dong, Eddie > Cc: Rao, Lei ; Tian, Kevin ; Zeng, > Jason ; quint...@redhat.com; dgilb...@redhat.com; > Li, Yadong ; Liu, Yi L ; qemu- > de...@nongnu.org > Subject: Re: [RFC PATCH 00/13] Add a plu

[PATCH v4 4/4] net: Use bundle mechanism

2022-06-14 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- include/net/net.h | 2 +- meson.build | 8 +++- net/tap.c | 6 +- qemu-options.hx | 4 ++-- 4 files changed, 15 insertions(+), 5 deletions(-) diff --git a/include/net/net.h b/include/net/net.h index 523136c7acb..4a5ed27a4b7 100644 --- a/in

[PATCH] ui/cocoa: Take refresh rate into account

2022-06-14 Thread Akihiko Odaki
Signed-off-by: Akihiko Odaki --- meson.build | 3 ++- ui/cocoa.m | 12 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 0c2e11ff071..0f83f3730af 100644 --- a/meson.build +++ b/meson.build @@ -575,7 +575,8 @@ if get_option('attr').allowe

[PATCH] ui/cocoa: Fix clipboard text release

2022-06-14 Thread Akihiko Odaki
[-NSPasteboard dataForType:] returns an autoreleased NSString, and callings its release method will result in double-free when the global autorelease pool is released. Use NSAutoreleasePool to release it properly. Signed-off-by: Akihiko Odaki --- ui/cocoa.m | 4 +++- 1 file changed, 3 insertions

Re: [RFC PATCH v2 3/8] qapi: net: add stream and dgram netdevs

2022-06-14 Thread Laurent Vivier
On 13/05/2022 13:44, Markus Armbruster wrote: Laurent Vivier writes: Copied from socket netdev file and modified to use SocketAddress to be able to introduce new features like unix socket. "udp" and "mcast" are squashed into dgram netdev, multicast is detected according to the IP address type

Re: [RFC PATCH v8 00/21] Net Control VQ support with asid in vDPA SVQ

2022-06-14 Thread Jason Wang
On Tue, Jun 14, 2022 at 5:32 PM Eugenio Perez Martin wrote: > > On Tue, Jun 14, 2022 at 10:20 AM Jason Wang wrote: > > > > On Tue, Jun 14, 2022 at 4:14 PM Eugenio Perez Martin > > wrote: > > > > > > On Tue, Jun 14, 2022 at 10:02 AM Jason Wang wrote: > > > > > > > > On Tue, Jun 14, 2022 at 12:32

[PATCH] q35:Enable TSEG only when G_SMRAME and TSEG_EN both enabled

2022-06-14 Thread Zhenzhong Duan
According to spec: "TSEG Enable (T_EN): Enabling of SMRAM memory for Extended SMRAM space only. When G_SMRAME = 1 and TSEG_EN = 1, the TSEG is enabled to appear in the appropriate physical address space. Note that once D_LCK is set, this bit becomes read only." Changed to match the spec descriptio

Re: [PATCH 1/2] hw/nvme: Implement shadow doorbell buffer support

2022-06-14 Thread Jinhao Fan
> On Jun 14, 2022, at 11:41 PM, Keith Busch wrote: > > It's a pretty nasty hack, and definitely not in compliance with the spec: the > db_addr is supposed to be read-only from the device side, though I do think > it's safe for this environment. Unless Klaus or anyone finds something I'm > missi

Re: [PATCH] hw/riscv: virt: pass random seed to fdt

2022-06-14 Thread Bin Meng
On Mon, Jun 13, 2022 at 8:08 PM Jason A. Donenfeld wrote: > > If the FDT contains /chosen/rng-seed, then the Linux RNG will use it to > initialize early. Set this using the usual guest random number > generation function. This is confirmed to successfully initialize the > RNG on Linux 5.19-rc2. >

[PATCH] target/riscv: Update tval for hardware watchpoint

2022-06-14 Thread Bin Meng
From: Bin Meng When watchpoint is hit, the breakpoint exception should update tval to point to the faulting virtual address. Signed-off-by: Bin Meng --- target/riscv/cpu.h| 1 + target/riscv/cpu_helper.c | 6 ++ target/riscv/debug.c | 2 ++ 3 files changed, 9 insertions(+) d

Re: [PATCH qemu] ppc/spapr: Implement H_WATCHDOG

2022-06-14 Thread Cédric Le Goater
Hello Alexey, On 6/8/22 05:01, Alexey Kardashevskiy wrote: The new PAPR 2.12 defines a watchdog facility managed via the new H_WATCHDOG hypercall. This adds H_WATCHDOG support which a proposed driver for pseries uses: https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=303120 This w

Re: [PATCH] target/ppc: cpu_init: Clean up stop state on cpu reset

2022-06-14 Thread Cédric Le Goater
On 6/14/22 10:29, Frederic Barrat wrote: The 'resume_as_sreset' attribute of a cpu can be set when a thread is entering a stop state on ppc books. It causes the thread to be re-routed to vector 0x100 when woken up by an exception. So it must be cleaned on reset or a thread might be re-routed unex

Re: [PATCH 1/9] target/riscv: debug: Determine the trigger type from tdata1.type

2022-06-14 Thread Bin Meng
On Fri, Jun 10, 2022 at 1:20 PM wrote: > > From: Frank Chang > > Current RISC-V debug assumes that only type 2 trigger is supported. > To allow more types of triggers to be supported in the future > (e.g. type 6 trigger, which is similar to type 2 trigger with additional > functionality), we sho

Re: [PATCH 1/9] target/riscv: debug: Determine the trigger type from tdata1.type

2022-06-14 Thread Bin Meng
On Fri, Jun 10, 2022 at 1:20 PM wrote: > > From: Frank Chang > > Current RISC-V debug assumes that only type 2 trigger is supported. > To allow more types of triggers to be supported in the future > (e.g. type 6 trigger, which is similar to type 2 trigger with additional > functionality), we sho

Re: [PATCH v2 07/11] vfio/migration: Implement VFIO migration protocol v2

2022-06-14 Thread Avihai Horon
On 6/14/2022 8:24 PM, Joao Martins wrote: External email: Use caution opening links or attachments On 6/14/22 17:34, Avihai Horon wrote: On 6/14/2022 2:08 PM, Joao Martins wrote: External email: Use caution opening links or attachments On 5/30/22 18:07, Avihai Horon wrote: +static int vf

[PATCH v2] ui/console: allow display device to be labeled with given id

2022-06-14 Thread Wen, Jianxian
The update makes it easier to find and specify devices. They can only be found by device type name without the id field, for example, devices of the same type have the same label. The update also adds a head field, which is useful for devices that support multiple heads, such as virtio-gpu. Signed

Re: [PATCH v2] docs: add PCIe root bus for VGA compat guideline

2022-06-14 Thread Gerd Hoffmann
Hi, > I think documenting the issue with VBE registers would be helpful. > Doing so with a recommendation for how to avoid the issue seems even > better. Would a recommendation to attach a device which supports VBE > to the Root Complex if VBE will be used by the guest make sense? Yes. This a

<    1   2