[PULL 19/26] target/ppc: powerpc_excp: Add excp_vectors bounds check

2022-01-04 Thread Cédric Le Goater
From: Fabiano Rosas The next patch will start accessing the excp_vectors array earlier in the function, so add a bounds check as first thing here. This converts the empty return on POWERPC_EXCP_NONE to an error. This exception number never reaches this function and if it does it probably means s

[PULL 21/26] target/ppc: powerpc_excp: Move system call vectored code together

2022-01-04 Thread Cédric Le Goater
From: Fabiano Rosas Now that 'vector' is known before calling the interrupt-specific setup code, we can move all of the scv setup into one place. No functional change intended. Signed-off-by: Fabiano Rosas Reviewed-by: Cédric Le Goater Reviewed-by: Richard Henderson Message-Id: <202112291657

[PULL 17/26] target/ppc: do not silence snan in xscvspdpn

2022-01-04 Thread Cédric Le Goater
From: Matheus Ferst The non-signalling versions of VSX scalar convert to shorter/longer precision insns doesn't silence SNaNs in the hardware. To better match this behavior, use the non-arithmatic conversion of helper_todouble instead of float32_to_float64. A test is added to prevent future regre

[PULL 15/26] ppc/ppc405: Introduce a store helper for SPR_40x_PID

2022-01-04 Thread Cédric Le Goater
The PID SPR of the 405 CPU contains the translation ID of the TLB which is a 8-bit field. Enforce the mask with a store helper. Cc: Christophe Leroy Reviewed-by: Richard Henderson Signed-off-by: Cédric Le Goater Message-Id: <20211222064025.1541490-8-...@kaod.org> Signed-off-by: Cédric Le Goater

Re: [PATCH v3 0/4] Reorg ppc64 pmu insn counting

2022-01-04 Thread Cédric Le Goater
On 1/3/22 23:47, Daniel Henrique Barboza wrote: Hi, This new version implements Richard's suggestions made in the v2 review. Changes from v2: - Patch 1: * fixed "PMC[1-5]" comment in target/ppc/cpu.h - Former patch 4: squashed into patch 1 - Patch 4 (former 5): * use boolean variables ins

[PULL 26/26] target/ppc: do not call hreg_compute_hflags() in helper_store_mmcr0()

2022-01-04 Thread Cédric Le Goater
From: Daniel Henrique Barboza MMCR0 writes will change only MMCR0 bits which are used to calculate HFLAGS_PMCC0, HFLAGS_PMCC1 and HFLAGS_INSN_CNT hflags. No other machine register will be changed during this operation. This means that hreg_compute_hflags() is overkill for what we need to do. pmu

Re: [PATCH v2 0/5] target/ppc: powerpc_excp improvements (1/n)

2022-01-04 Thread Cédric Le Goater
On 12/29/21 17:57, Fabiano Rosas wrote: This series comprises of the first 4 patches from the RFC v2 plus an extra patch addressing review comments. Patch 1,3,4,5 have been reviewed. Patch 2 addresses prior comments from patch 3 and has not been reviewed. RFC v1: https://lists.nongnu.org/archi

Re: [PATCH 00/17] ppc/pnv: enable pnv-phb4 user devices

2022-01-04 Thread Cédric Le Goater
On 12/28/21 20:37, Daniel Henrique Barboza wrote: Hi, This series implements pnv-phb4 user devices for the powernv9 machine. It also includes a couple of pnv-phb3 and pnv-phb3-root-port fixes that were also applied for the pnv4 equivalents. During the enablement I had to rollback from the previ

Re: [PATCH v2] target/ppc: do not silence snan in xscvspdpn

2022-01-04 Thread Cédric Le Goater
On 12/28/21 13:03, matheus.fe...@eldorado.org.br wrote: From: Matheus Ferst The non-signalling versions of VSX scalar convert to shorter/longer precision insns doesn't silence SNaNs in the hardware. To better match this behavior, use the non-arithmatic conversion of helper_todouble instead of f

Re: [PATCH v2 0/9] ppc/ppc405: Fixes

2022-01-04 Thread Cédric Le Goater
On 1/3/22 07:34, Cédric Le Goater wrote: Hello, The series starts with a couple of cleanups helping debug. It then adds back support for 405 timers which was broken 10 years ago. Thanks, C. Changes in v2: - removed inlining from powerpc_excp() routines - fixed a compile breakage with CON

[PATCH] docs/sphinx: fix compatibility with sphinx < 1.8

2022-01-04 Thread marcandre . lureau
From: Marc-André Lureau SphinxDirective was added with sphinx 1.8 (2018-09-13). Reported-by: Thomas Huth Signed-off-by: Marc-André Lureau --- docs/sphinx/fakedbusdoc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/sphinx/fakedbusdoc.py b/docs/sphinx/fakedbusdoc

Re: [PATCH 0/5] ppc/pnv: Preliminary cleanups before user created PHBs

2022-01-04 Thread Cédric Le Goater
On 12/22/21 07:38, Cédric Le Goater wrote: Hello, There are the last cleanups preparing ground for PHBs created on the command line and possibly libvirt support. Thanks, C. Cédric Le Goater (5): ppc/pnv: Change the maximum of PHB3 devices for Power8NVL ppc/pnv: Remove PHB4 reset handler

[PULL 1/2] hw/sd/sdcard: Rename Write Protect Group variables

2022-01-04 Thread Philippe Mathieu-Daudé
'wp_groups' holds a bitmap, rename it as 'wp_group_bmap'. 'wpgrps_size' is the bitmap size (in bits), rename it as 'wp_group_bits'. Patch created mechanically using: $ sed -i -e s/wp_groups/wp_group_bmap/ \ -e s/wpgrps_size/wp_group_bits/ hw/sd/sd.c Signed-off-by: Philippe Mathieu-D

[PULL 0/2] SD/MMC patches for 2022-01-04

2022-01-04 Thread Philippe Mathieu-Daudé
The following changes since commit b5a3d8bc9146ba22a25116cb748c97341bf99737: Merge tag 'pull-misc-20220103' of https://gitlab.com/rth7680/qemu into staging (2022-01-03 09:34:41 -0800) are available in the Git repository at: https://github.com/philmd/qemu.git tags/sdmmc-20220104

Re: [PATCH] docs/sphinx: fix compatibility with sphinx < 1.8

2022-01-04 Thread Thomas Huth
On 04/01/2022 08.46, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau SphinxDirective was added with sphinx 1.8 (2018-09-13). Reported-by: Thomas Huth Signed-off-by: Marc-André Lureau --- docs/sphinx/fakedbusdoc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PULL 2/2] hw/sd: Add SDHC support for SD card SPI-mode

2022-01-04 Thread Philippe Mathieu-Daudé
From: Frank Chang In SPI-mode, SD card's OCR register: Card Capacity Status (CCS) bit is not set to 1 correclty when the assigned SD image size is larger than 2GB (SDHC). This will cause the SD card to be indentified as SDSC incorrectly. CCS bit should be set to 1 if we are using SDHC. Also, as

Re: Something broke "make html" and "make man"

2022-01-04 Thread Thomas Huth
On 03/01/2022 21.33, Thomas Huth wrote:  Hi! "make html" and "make man" do not work anymore: $ make help | grep -B1 html Documentation targets:   html man  - Build documentation in specified format $ make html   GIT ui/keycodemapdb meson tests/fp/berkeley-testfloat-3 tests/

Re: [PATCH] docs/sphinx: fix compatibility with sphinx < 1.8

2022-01-04 Thread Marc-André Lureau
Hi Thomas On Tue, Jan 4, 2022 at 12:11 PM Thomas Huth wrote: > > On 04/01/2022 08.46, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > SphinxDirective was added with sphinx 1.8 (2018-09-13). > > > > Reported-by: Thomas Huth > > Signed-off-by: Marc-André Lureau > > --- > >

Re: [PATCH 3/8] hw/pci: Document pci_dma_map()

2022-01-04 Thread Philippe Mathieu-Daudé
On Tue, Jan 4, 2022 at 8:27 AM Peter Xu wrote: > > On Fri, Dec 31, 2021 at 12:48:56PM +0100, Philippe Mathieu-Daudé wrote: > > +/** > > + * pci_dma_map: Map a physical memory region into a device PCI address > > space. > > Shouldn't this be: "Map device PCI address space range into host virtual >

Re: [PATCH] migration: Don't return for postcopy_send_discard_bm_ram()

2022-01-04 Thread David Edmondson
On Thursday, 2021-12-30 at 17:05:25 +01, Philippe Mathieu-Daudé wrote: > postcopy_send_discard_bm_ram() always return zero. Since it can't > fail, simplify and do not return anything. > > Signed-off-by: Philippe Mathieu-Daudé Reviewed-by: David Edmondson > --- > Based-on: <20211224065000.97572

Re: [PATCH 7/8] hw/dma: Introduce dma_size_t type definition

2022-01-04 Thread Philippe Mathieu-Daudé
On Mon, Jan 3, 2022 at 11:22 AM David Hildenbrand wrote: > > /* > > * When an IOMMU is present, bus addresses become distinct from > > * CPU/memory physical addresses and may be a different size. Because > > @@ -39,9 +28,22 @@ struct QEMUSGList { > > * least most) cases. > > */ > > type

[PATCH v2 0/9] hw/dma: Use dma_addr_t type definition when relevant

2022-01-04 Thread Philippe Mathieu-Daudé
Since v1: - Addressed David review comment (stick to dma_addr_t type) - Addressed Peter review comment (incorrect doc string) Hi, This series aims to clarify a bit the DMA API, in particular the 'size' argument which is not clear enough (as we use multiple types for it). This helps avoiding build

[PATCH v2 1/9] hw/nvram: Restrict stub to sysemu and tools

2022-01-04 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé User-mode emulation doesn't need the fw_cfg stub. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé --- hw/nvram/meson.build | 6 -- stubs/meson.build| 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/hw/nvram/

[PATCH v2 2/9] hw/pci: Restrict pci-bus stub to sysemu

2022-01-04 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Neither tools nor user-mode emulation require the PCI bus stub. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé --- stubs/meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stubs/meson.build b/stubs/meson.bu

[PATCH v2 4/9] hw/dma: Remove CONFIG_USER_ONLY check

2022-01-04 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé DMA API should not be included in user-mode emulation. If so, build should fail. Remove the CONFIG_USER_ONLY check. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé --- include/sysemu/dma.h | 3 --- 1 file changed, 3 deletions(-) diff -

[PATCH v2 3/9] hw/pci: Document pci_dma_map()

2022-01-04 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé --- include/hw/pci/pci.h | 12 1 file changed, 12 insertions(+) diff --git a/include/hw/pci/pci.h b/include/hw/pci/pci.h index 5b36334a28a..07f08aa0626 100644 --- a/include/hw

[PATCH v2 5/9] hw/rdma/rdma_utils: Rename rdma_pci_dma_map 'len' argument

2022-01-04 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Various APIs use 'pval' naming for 'pointer to val'. rdma_pci_dma_map() uses 'plen' for 'PCI length', but since 'PCI' is already explicit in the function name, simplify and rename the argument 'len'. No logical change. Signed-off-by: Philippe Mathieu-Daudé Signed-of

[PATCH v2 6/9] hw/scsi: Rename SCSIRequest::resid as 'residual'

2022-01-04 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé The 'resid' field is slightly confusing and could be interpreted as some ID. Rename it as 'residual' which is clearer to review. No logical change. Signed-off-by: Philippe Mathieu-Daudé Signed-off-by: Philippe Mathieu-Daudé --- include/hw/scsi/scsi.h | 4 ++-- hw

[PATCH v2 9/9] hw/dma: Let dma_buf_read() / dma_buf_write() propagate MemTxResult

2022-01-04 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Since the previous commit, dma_buf_rw() returns a MemTxResult type. Do not discard it, return it to the caller. Since both dma_buf_read/dma_buf_write functions were previously returning the QEMUSGList size not consumed, add an extra argument where the unconsummed siz

[PATCH v2 8/9] hw/dma: Use dma_addr_t type definition when relevant

2022-01-04 Thread Philippe Mathieu-Daudé
From: Philippe Mathieu-Daudé Update the obvious places where dma_addr_t should be used (instead of uint64_t, hwaddr, size_t, int32_t types). This allows to have &dma_addr_t type portable on 32/64-bit hosts. Move QEMUSGList declaration after dma_addr_t declaration so this structure can use the n

[PATCH v2 7/9] hw/dma: Fix format string issues using dma_addr_t

2022-01-04 Thread Philippe Mathieu-Daudé
Signed-off-by: Philippe Mathieu-Daudé --- hw/ide/ahci.c| 2 +- hw/rdma/trace-events | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/ide/ahci.c b/hw/ide/ahci.c index 205dfdc6622..6c727dd0c08 100644 --- a/hw/ide/ahci.c +++ b/hw/ide/ahci.c @@ -1159,7 +1159,7 @@ stat

Re: [PATCH] docs/sphinx: fix compatibility with sphinx < 1.8

2022-01-04 Thread Thomas Huth
On 04/01/2022 09.15, Marc-André Lureau wrote: Hi Thomas On Tue, Jan 4, 2022 at 12:11 PM Thomas Huth wrote: On 04/01/2022 08.46, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau SphinxDirective was added with sphinx 1.8 (2018-09-13). Reported-by: Thomas Huth Signed-off-by: Marc-

Re: [PATCH v3 kvm/queue 14/16] KVM: Handle page fault for private memory

2022-01-04 Thread Chao Peng
On Tue, Jan 04, 2022 at 09:46:35AM +0800, Yan Zhao wrote: > On Thu, Dec 23, 2021 at 08:30:09PM +0800, Chao Peng wrote: > > When a page fault from the secondary page table while the guest is > > running happens in a memslot with KVM_MEM_PRIVATE, we need go > > different paths for private access and

[PATCH 0/2] hw/display/vmware_vga: supress debug output and fix

2022-01-04 Thread Carwyn Ellis
Two patches addressing the following in the vmware vga display code - only show debug output if DEBUG is explicitly enabled - do not discard display updates This prevents an issue that can cause garbled display output when a high number of screen updates are being requested. The

[PATCH 2/2] hw/display/vmware_vga: do not discard screen updates

2022-01-04 Thread Carwyn Ellis
In certain circumstances, typically when there is lots changing on the screen, updates will be discarded resulting in garbled output. This change firstly increases the screen update FIFO size to ensure it's large enough to accomodate all updates deferred in a given screen refresh cycle. When upda

[PATCH] gitlab-ci: Enable docs in the centos job

2022-01-04 Thread Thomas Huth
We just ran into a problem that the docs don't build on RHEL8 / CentOS 8 anymore. Seems like these distros are using one of the oldest Sphinx versions that we still have to support. Thus enable the docs build in the CI on CentOS so that such bugs don't slip in so easily again. Signed-off-by: Thoma

[PATCH 1/2] hw/display/vmware_vga: only show debug output if DEBUG enabled

2022-01-04 Thread Carwyn Ellis
Debug output was always being sent to STDERR. This has been replaced by a define that will only show this output when DEBUG is set to true. Signed-off-by: Carwyn Ellis --- hw/display/vmware_vga.c | 26 -- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/hw/

Re: [PATCH] migration: Don't return for postcopy_send_discard_bm_ram()

2022-01-04 Thread Juan Quintela
Philippe Mathieu-Daudé wrote: > postcopy_send_discard_bm_ram() always return zero. Since it can't > fail, simplify and do not return anything. > > Signed-off-by: Philippe Mathieu-Daudé > --- > Based-on: <20211224065000.97572-1-pet...@redhat.com> > --- > migration/ram.c | 6 +- > 1 file chang

Re: [PATCH 1/2] hw/display/vmware_vga: only show debug output if DEBUG enabled

2022-01-04 Thread Laurent Vivier
Le 04/01/2022 à 10:11, Carwyn Ellis a écrit : Debug output was always being sent to STDERR. This has been replaced by a define that will only show this output when DEBUG is set to true. Signed-off-by: Carwyn Ellis --- hw/display/vmware_vga.c | 26 -- 1 file changed, 1

Re: [PATCH 1/2] hw/display/vmware_vga: only show debug output if DEBUG enabled

2022-01-04 Thread Carwyn Ellis
Hey, Thanks for getting back to me. Yeah will take a look and update when I have a mo. Cheers Carwyn > On 4 Jan 2022, at 09:18, Laurent Vivier wrote: > > Le 04/01/2022 à 10:11, Carwyn Ellis a écrit : >> Debug output was always being sent to STDERR. This has been replaced by >> a define that w

Re: [PATCH] gitlab-ci: Enable docs in the centos job

2022-01-04 Thread Marc-André Lureau
On Tue, Jan 4, 2022 at 1:12 PM Thomas Huth wrote: > > We just ran into a problem that the docs don't build on RHEL8 / CentOS 8 > anymore. Seems like these distros are using one of the oldest Sphinx > versions that we still have to support. Thus enable the docs build in > the CI on CentOS so that s

Re: [PATCH] migration: Don't return for postcopy_send_discard_bm_ram()

2022-01-04 Thread Peter Xu
On Tue, Jan 04, 2022 at 10:15:16AM +0100, Juan Quintela wrote: > Philippe Mathieu-Daudé wrote: > > postcopy_send_discard_bm_ram() always return zero. Since it can't > > fail, simplify and do not return anything. > > > > Signed-off-by: Philippe Mathieu-Daudé > > --- > > Based-on: <20211224065000.9

Re: [PATCH 1/2] hw/display/vmware_vga: only show debug output if DEBUG enabled

2022-01-04 Thread Laurent Vivier
Le 04/01/2022 à 10:20, Carwyn Ellis a écrit : Hey, Thanks for getting back to me. Yeah will take a look and update when I have a mo. It's really easy to do, see below for an example: ... @@ -297,45 +303,45 @@ static inline bool vmsvga_verify_rect(DisplaySurface *surface,

Re: [PATCH 1/2] hw/display/vmware_vga: only show debug output if DEBUG enabled

2022-01-04 Thread Carwyn Ellis
Ok cool. Thanks for the info! > On 4 Jan 2022, at 09:27, Laurent Vivier wrote: > > Le 04/01/2022 à 10:20, Carwyn Ellis a écrit : >> Hey, >> Thanks for getting back to me. >> Yeah will take a look and update when I have a mo. > > It's really easy to do, see below for an example: > > ...

Re: Meeting today?

2022-01-04 Thread Edgar E. Iglesias
On Tue, Dec 14, 2021 at 3:49 PM Markus Armbruster wrote: > Daniel P. Berrangé writes: > > > On Tue, Dec 14, 2021 at 12:37:43PM +0100, Markus Armbruster wrote: > >> Mark Burton writes: > >> > >> > I realise it’s very short notice, but what about having a discussion > today at 15:00 ? > >> > >> I

Re: [PATCH 1/9] target/ppc: powerpc_excp: Extract software TLB logging into a function

2022-01-04 Thread Cédric Le Goater
Hello Fabiano, On 1/3/22 23:07, Fabiano Rosas wrote: Signed-off-by: Fabiano Rosas --- target/ppc/excp_helper.c | 63 +++- 1 file changed, 36 insertions(+), 27 deletions(-) diff --git a/target/ppc/excp_helper.c b/target/ppc/excp_helper.c index c7e55800af..

Re: [PATCH 2/9] target/ppc: powerpc_excp: Keep 60x soft MMU logs active

2022-01-04 Thread Cédric Le Goater
On 1/3/22 23:07, Fabiano Rosas wrote: Remove the compile time definition and make the logging be controlled by the `-d mmu` option in the cmdline. Signed-off-by: Fabiano Rosas Reviewed-by: Cédric Le Goater Thanks, C. --- target/ppc/excp_helper.c | 15 ++- 1 file changed,

Re: [PATCH v1] hw/smbios: verify header type for file before using it

2022-01-04 Thread Igor Mammedov
On Mon, 29 Nov 2021 16:52:11 +0300 Daniil Tatianin wrote: here should be more verbose description of the issue preferably with a way to reproduce it. and what/why patch does what it does. > Signed-off-by: Daniil Tatianin > --- > hw/smbios/smbios.c | 6 ++ > 1 file changed, 6 insertions(+)

Re: [PATCH] sysemu: Cleanup qemu_run_machine_init_done_notifiers()

2022-01-04 Thread Philippe Mathieu-Daudé
On Tue, Jan 4, 2022 at 3:41 AM Xiaoyao Li wrote: > > Remove qemu_run_machine_init_done_notifiers() since no implementation > and user. Fixes: f66dc8737c9 ("vl: move all generic initialization out of vl.c") Reviewed-by: Philippe Mathieu-Daudé > Signed-off-by: Xiaoyao Li > --- > include/sysemu/

Re: [PATCH 3/9] target/ppc: powerpc_excp: Group unimplemented exceptions

2022-01-04 Thread Cédric Le Goater
On 1/3/22 23:07, Fabiano Rosas wrote: (I'll alter this to use powerpc_excp_name once it is merged) Sure. Reviewed-by: Cédric Le Goater Thanks, C. Signed-off-by: Fabiano Rosas --- target/ppc/excp_helper.c | 76 1 file changed, 7 insertions(+), 6

Re: [PATCH v2 19/19] ppc/pnv: Move num_phbs under Pnv8Chip

2022-01-04 Thread Daniel Henrique Barboza
On 12/13/21 10:28, Cédric Le Goater wrote: It is not used elsewhere so that's where it belongs. Signed-off-by: Cédric Le Goater --- I am/was using this patch and didn't provide my r-b on it: Reviewed-by: Daniel Henrique Barboza include/hw/ppc/pnv.h | 4 ++-- hw/ppc/pnv.c |

Re: [PATCH v4 2/3] acpi: tpm: Add missing device identification objects

2022-01-04 Thread Igor Mammedov
On Wed, 22 Dec 2021 21:23:09 -0500 Stefan Berger wrote: > Add missing device identification objects _STR and _UID. They will appear why, does it break anything or it's just cosmetic? > as files 'description' and 'uid' under Linux sysfs. > > Cc: Shannon Zhao > Cc: Michael S. Tsirkin > Cc: Igo

Re: [PATCH v2 8/9] hw/dma: Use dma_addr_t type definition when relevant

2022-01-04 Thread Peter Xu
On Tue, Jan 04, 2022 at 09:54:30AM +0100, Philippe Mathieu-Daudé wrote: > diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c > index 462f79a1f60..c3c49176110 100644 > --- a/hw/nvme/ctrl.c > +++ b/hw/nvme/ctrl.c > @@ -1147,7 +1147,7 @@ static uint16_t nvme_tx(NvmeCtrl *n, NvmeSg *sg, > uint8_t *ptr, uint

Re: [PATCH v2 00/19] ppc/pnv: Add support for user created PHB3/PHB4 devices

2022-01-04 Thread Daniel Henrique Barboza
On 12/15/21 13:56, Cédric Le Goater wrote: On 12/13/21 14:28, Cédric Le Goater wrote: Hello, On the POWER8 processor, powernv8 machine, PHB3 devices can simply be created with :     -device pnv-phb3,chip-id=0,index=1 with a maximum of 3 PHB3s per chip, each PHB3 adding a new PCIe bus. On

Re: [PATCH v2 00/19] ppc/pnv: Add support for user created PHB3/PHB4 devices

2022-01-04 Thread Cédric Le Goater
On 1/4/22 10:56, Daniel Henrique Barboza wrote: On 12/15/21 13:56, Cédric Le Goater wrote: On 12/13/21 14:28, Cédric Le Goater wrote: Hello, On the POWER8 processor, powernv8 machine, PHB3 devices can simply be created with :     -device pnv-phb3,chip-id=0,index=1 with a maximum of 3 PHB3s

Re: [PATCH v2 19/19] ppc/pnv: Move num_phbs under Pnv8Chip

2022-01-04 Thread Cédric Le Goater
On 1/4/22 10:53, Daniel Henrique Barboza wrote: On 12/13/21 10:28, Cédric Le Goater wrote: It is not used elsewhere so that's where it belongs. Signed-off-by: Cédric Le Goater --- I am/was using this patch and didn't provide my r-b on it: Reviewed-by: Daniel Henrique Barboza Yes. Just

Re: [PATCH 5/9] target/ppc: Use ppc_interrupts_little_endian in powerpc_excp

2022-01-04 Thread Cédric Le Goater
On 1/3/22 23:07, Fabiano Rosas wrote: The ppc_interrupts_little_endian function is suitable for determining the endianness of interrupts for all Book3S CPUs. (I'm keeping the MSR check for the rest of the CPUs, but it will go away in the next patch.) Signed-off-by: Fabiano Rosas --- target/p

Re: [PATCH v3 kvm/queue 14/16] KVM: Handle page fault for private memory

2022-01-04 Thread Yan Zhao
On Tue, Jan 04, 2022 at 05:10:08PM +0800, Chao Peng wrote: > On Tue, Jan 04, 2022 at 09:46:35AM +0800, Yan Zhao wrote: > > On Thu, Dec 23, 2021 at 08:30:09PM +0800, Chao Peng wrote: > > > When a page fault from the secondary page table while the guest is > > > running happens in a memslot with KVM_

[PATCH] docs/tools/qemu-trace-stap.rst: Do not hard-code the QEMU binary name

2022-01-04 Thread Thomas Huth
In downstream, we want to use a different name for the QEMU binary, and some people might also use the docs for non-x86 binaries, that's why we already created the |qemu_system| placeholder in the past. Use it now in the stap trace doc, too. Signed-off-by: Thomas Huth --- docs/tools/qemu-trace-s

Re: [PATCH 0/3] Reorg ppc64 pmu insn counting

2022-01-04 Thread Alex Bennée
Daniel Henrique Barboza writes: > On 1/3/22 12:07, Alex Bennée wrote: >> Daniel Henrique Barboza writes: >> >>> On 12/23/21 00:01, Richard Henderson wrote: In contrast to Daniel's version, the code stays in power8-pmu.c, but is better organized to not take so much overhead. Bef

Re: [PATCH] docs/tools/qemu-trace-stap.rst: Do not hard-code the QEMU binary name

2022-01-04 Thread Philippe Mathieu-Daudé
On 4/1/22 11:33, Thomas Huth wrote: In downstream, we want to use a different name for the QEMU binary, and some people might also use the docs for non-x86 binaries, that's why we already created the |qemu_system| placeholder in the past. Use it now in the stap trace doc, too. Signed-off-by: Tho

Re: [RFC PATCH 2/2] tests/tcg/mips64el: Run float tests

2022-01-04 Thread Alex Bennée
Philippe Mathieu-Daudé writes: > On 12/26/21 03:25, Jiaxun Yang wrote: >> 在2021年12月26日十二月 上午12:19,Philippe Mathieu-Daudé写道: >>> Unfortunately this fails: >>> >>> $ make run-tcg-tests-mips64el-linux-user >>> ... >>> Files float_convs.out and tests/tcg/mips64el/float_convs.ref differ >>>

Re: [PATCH] gitlab-ci: Enable docs in the centos job

2022-01-04 Thread Philippe Mathieu-Daudé
On Tue, Jan 4, 2022 at 10:12 AM Thomas Huth wrote: > > We just ran into a problem that the docs don't build on RHEL8 / CentOS 8 > anymore. Seems like these distros are using one of the oldest Sphinx > versions that we still have to support. Thus enable the docs build in > the CI on CentOS so that

[PATCH v2] linux-user: don't adjust base of found hole

2022-01-04 Thread Alex Bennée
The pgb_find_hole function goes to the trouble of taking account of both mmap_min_addr and any offset we've applied to decide the starting address of a potential hole. This is especially important for emulating 32bit ARM in a 32bit build as we have applied the offset to ensure there will be space t

Re: [PATCH v2 1/6] linux-user: Split out do_prctl and subroutines

2022-01-04 Thread Laurent Vivier
Le 27/12/2021 à 16:01, Richard Henderson a écrit : Since the prctl constants are supposed to be generic, supply any that are not provided by the host. Split out subroutines for PR_GET_FP_MODE, PR_SET_FP_MODE, PR_GET_VL, PR_SET_VL, PR_RESET_KEYS, PR_SET_TAGGED_ADDR_CTRL, PR_GET_TAGGED_ADDR_CTRL.

Re: [PATCH v2 2/6] linux-user: Disable more prctl subcodes

2022-01-04 Thread Laurent Vivier
Le 27/12/2021 à 16:01, Richard Henderson a écrit : Create a list of subcodes that we want to pass on, a list of subcodes that should not be passed on because they would affect the running qemu itself, and a list that probably could be implemented but require extra work. Do not pass on unknown sub

Re: [PATCH v2 5/6] target/hppa: Implement prctl_unalign_sigbus

2022-01-04 Thread Laurent Vivier
Le 27/12/2021 à 16:01, Richard Henderson a écrit : Leave TARGET_ALIGNED_ONLY set, but use the new CPUState flag to set MO_UNALN for the instructions that the kernel handles in the unaligned trap. Signed-off-by: Richard Henderson --- linux-user/hppa/target_prctl.h | 2 +- target/hppa/cpu.h

Re: [PATCH v2 4/6] target/alpha: Implement prctl_unalign_sigbus

2022-01-04 Thread Laurent Vivier
Le 27/12/2021 à 16:01, Richard Henderson a écrit : Leave TARGET_ALIGNED_ONLY set, but use the new CPUState flag to set MO_UNALN for the instructions that the kernel handles in the unaligned trap. Signed-off-by: Richard Henderson --- linux-user/alpha/target_prctl.h | 2 +- target/alpha/cpu.h

Re: [PATCH v2 6/6] target/sh4: Implement prctl_unalign_sigbus

2022-01-04 Thread Laurent Vivier
Le 27/12/2021 à 16:01, Richard Henderson a écrit : Leave TARGET_ALIGNED_ONLY set, but use the new CPUState flag to set MO_UNALN for the instructions that the kernel handles in the unaligned trap. The Linux kernel does not handle all memory operations: no floating-point and no MAC. Signed-off-by

Re: [PATCH] linux-user/signal: Map exit signals in SIGCHLD siginfo_t

2022-01-04 Thread Laurent Vivier
Le 23/10/2021 à 21:59, Matthias Schiffer a écrit : When converting a siginfo_t from waitid(), the interpretation of si_status depends on the value of si_code: For CLD_EXITED, it is an exit code and should be copied verbatim. For other codes, it is a signal number (possibly with additional high bi

[RFC PATCH] tests/avocado: add :avocado: tags for some tests

2022-01-04 Thread Alex Bennée
This stops a bunch of tests failing because of a lack of "./qemu-system-x86-64" in a build directory where you have configured only one non-default target. I suspect what we really need is: :avocado: tags=arch:host to be properly multi-arch safe. Signed-off-by: Alex Bennée --- tests/avocad

Re: [PATCH 2/2] hw/display/vmware_vga: do not discard screen updates

2022-01-04 Thread Gerd Hoffmann
Hi, > This change firstly increases the screen update FIFO size to ensure it's > large enough to accomodate all updates deferred in a given screen > refresh cycle. How do you know it's large enough? > @@ -385,7 +385,14 @@ static inline void vmsvga_update_rect_delayed(struct > vmsvga_state_s *

Re: Redesign of QEMU startup & initial configuration

2022-01-04 Thread Richard W.M. Jones
Sorry for very delayed reply ... On Thu, Dec 02, 2021 at 07:57:38AM +0100, Markus Armbruster wrote: > 1. QMP only > >Management applications need to use QMP for monitoring anyway. They >may want to use it for initial configuration, too. Libvirt does. > >They still need to bootstrap

Re: [PATCH v11 29/31] linux-user: Implement CPU-specific signal handler for loongarch64 hosts

2022-01-04 Thread Philippe Mathieu-Daudé
On Thu, Dec 30, 2021 at 4:50 AM WANG Xuerui wrote: > > Hi, > > On 12/30/21 11:11, gaosong wrote: > > HI, > > On 2021/12/21 下午1:41, WANG Xuerui wrote: > > +case 0b001110: /* indexed, atomic, bounds-checking memory operations */ > +uint32_t sel = (insn >> 15) & 0b111; > + > +

Re: [PATCH] linux-user: Fix trivial build error on loongarch64

2022-01-04 Thread Philippe Mathieu-Daudé
I forgot to add trailing "hosts" in the subject line. On Tue, Jan 4, 2022 at 2:02 PM Philippe Mathieu-Daudé wrote: > > When building using GCC 8.3.0 on loongarch64 (Loongnix) we get: > > In file included from ../linux-user/signal.c:33: > ../linux-user/host/loongarch64/host-signal.h: In functi

[PATCH] linux-user: Fix trivial build error on loongarch64

2022-01-04 Thread Philippe Mathieu-Daudé
When building using GCC 8.3.0 on loongarch64 (Loongnix) we get: In file included from ../linux-user/signal.c:33: ../linux-user/host/loongarch64/host-signal.h: In function ‘host_signal_write’: ../linux-user/host/loongarch64/host-signal.h:57:9: error: a label can only be part of a statement a

Re: [RFC PATCH v2 20/44] i386/tdx: Parse tdx metadata and store the result into TdxGuestState

2022-01-04 Thread Xiaoyao Li
On 8/26/2021 7:18 PM, Gerd Hoffmann wrote: +int load_tdvf(const char *filename) +{ +for_each_fw_entry(fw, entry) { +if (entry->address < x86ms->below_4g_mem_size || +entry->address > 4 * GiB) { +tdvf_init_ram_memory(ms, entry); +} else { +

Re: [PATCH] linux-user: Fix trivial build error on loongarch64

2022-01-04 Thread WANG Xuerui
On 2022/1/4 21:02, Philippe Mathieu-Daudé wrote: > When building using GCC 8.3.0 on loongarch64 (Loongnix) we get: > > In file included from ../linux-user/signal.c:33: > ../linux-user/host/loongarch64/host-signal.h: In function > ‘host_signal_write’: > ../linux-user/host/loongarch64/host-si

Re: [PATCH] vl: Add -set options to device opts dict when using JSON syntax for -device

2022-01-04 Thread Daniel P . Berrangé
On Wed, Dec 22, 2021 at 09:22:47AM +0100, Gerd Hoffmann wrote: > On Tue, Dec 21, 2021 at 04:40:28PM +0100, Markus Armbruster wrote: > > Paolo Bonzini writes: > > > > > On 12/21/21 13:58, Markus Armbruster wrote: > > >>> Is this a regression? I suspect commit 5dacda5167 "vl: Enable JSON > > >>> s

Re: [PATCH 2/2] hw/display/vmware_vga: do not discard screen updates

2022-01-04 Thread Carwyn Ellis
> On 4 Jan 2022, at 12:23, Gerd Hoffmann wrote: > > Hi, > >> This change firstly increases the screen update FIFO size to ensure it's >> large enough to accomodate all updates deferred in a given screen >> refresh cycle. > > How do you know it's large enough? > >> @@ -385,7 +385,14 @@ stat

[PATCH] tests/tcg/loongson64: Add float reference files

2022-01-04 Thread Philippe Mathieu-Daudé
Generated on Loongson-3A5000 (CPU revision 0x0014c011). Signed-off-by: Philippe Mathieu-Daudé --- tests/tcg/loongson64/float_convs.ref | 748 ++ tests/tcg/loongson64/float_madds.ref | 768 +++ 2 files changed, 1516 insertions(+) create mode 100644

Re: [PATCH 2/2] qapi/ui: introduce change-vnc-listen

2022-01-04 Thread Daniel P . Berrangé
On Mon, Dec 20, 2021 at 04:44:18PM +0100, Vladimir Sementsov-Ogievskiy wrote: > Add command that can change addresses where VNC server listens for new > connections. Prior to 6.0 this functionality was available through > 'change' qmp command which was deleted. > > Signed-off-by: Vladimir Sementso

Re: [PATCH v2 1/5] ps2: Initial horizontal scroll support

2022-01-04 Thread Daniel P . Berrangé
On Wed, Dec 22, 2021 at 02:06:43AM +0100, Dmitry Petrov wrote: > v2: > - Patch is split into a sequence > - value is clamped to 31 for horizontal scroll > > This patch introduces horizontal scroll support for the ps/2 > mouse. > > The patch is based on the previous work > by Brad Jorsch done

Re: [PATCH v2 2/3] qapi/ui: introduce change-vnc-listen

2022-01-04 Thread Daniel P . Berrangé
On Wed, Dec 22, 2021 at 08:17:30PM +0100, Vladimir Sementsov-Ogievskiy wrote: > Add command that can change addresses where VNC server listens for new > connections. Prior to 6.0 this functionality was available through > 'change' qmp command which was deleted. > > Signed-off-by: Vladimir Sementso

Re: [PATCH 0/5] Introduce camera subsystem and USB video device

2022-01-04 Thread Daniel P . Berrangé
On Mon, Dec 27, 2021 at 10:27:29PM +0800, zhenwei pi wrote: > 1, The full picture of this patch set: >+-+ ++ +---+ >|UVC(done)| |virtio(TODO)| |other HW device| >+-+ ++ +---+ > |

[PATCH v1] Check and report for incomplete 'global' option format

2022-01-04 Thread Rohit Kumar
Qemu might crash when provided incomplete '-global' option. For example: qemu-system-x86_64 -global driver=isa-fdc qemu-system-x86_64: ../../devel/qemu/qapi/string-input-visitor.c:394: string_input_visitor_new: Assertion `str' failed. Aborted (core dumped) Resolves:

Re: [PULL 02/15] linux-user: Move syscall error detection into safe_syscall_base

2022-01-04 Thread Laurent Vivier
Le 20/12/2021 à 21:24, Richard Henderson a écrit : The current api from safe_syscall_base() is to return -errno, which is the interface provided by *some* linux kernel abis. The wrapper macro, safe_syscall(), detects error, stores into errno, and returns -1, to match the api of the system syscal

Re: [PATCH v1] Check and report for incomplete 'global' option format

2022-01-04 Thread Philippe Mathieu-Daudé
Cc'ing Markus / Thomas On 4/1/22 14:41, Rohit Kumar wrote: Qemu might crash when provided incomplete '-global' option. For example: qemu-system-x86_64 -global driver=isa-fdc qemu-system-x86_64: ../../devel/qemu/qapi/string-input-visitor.c:394: string_input_visitor_new: As

Re: [PATCH v4 6/7] tcg/tci: Support raising sigbus for user-only

2022-01-04 Thread Philippe Mathieu-Daudé
On 4/1/22 03:15, Richard Henderson wrote: Signed-off-by: Richard Henderson --- tcg/tci.c | 20 ++-- 1 file changed, 14 insertions(+), 6 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v4 7/7] tests/tcg/multiarch: Add sigbus.c

2022-01-04 Thread Philippe Mathieu-Daudé
On 4/1/22 03:15, Richard Henderson wrote: A mostly generic test for unaligned access raising SIGBUS. Reviewed-by: Peter Maydell Signed-off-by: Richard Henderson --- tests/tcg/multiarch/sigbus.c | 68 1 file changed, 68 insertions(+) create mode 100644

Re: [PATCH 5/9] target/ppc: Use ppc_interrupts_little_endian in powerpc_excp

2022-01-04 Thread Fabiano Rosas
Cédric Le Goater writes: > On 1/3/22 23:07, Fabiano Rosas wrote: >> The ppc_interrupts_little_endian function is suitable for determining >> the endianness of interrupts for all Book3S CPUs. >> >> (I'm keeping the MSR check for the rest of the CPUs, but it will go >> away in the next patch.) >>

Re: [PATCH v3 kvm/queue 01/16] mm/shmem: Introduce F_SEAL_INACCESSIBLE

2022-01-04 Thread David Hildenbrand
On 23.12.21 13:29, Chao Peng wrote: > From: "Kirill A. Shutemov" > > Introduce a new seal F_SEAL_INACCESSIBLE indicating the content of > the file is inaccessible from userspace in any possible ways like > read(),write() or mmap() etc. > > It provides semantics required for KVM guest private mem

[PATCH] linux-user/syscall.c: malloc to g_try_malloc

2022-01-04 Thread Ahmed Abouzied
Use g_try_malloc instead of malloc to alocate the target ifconfig. Also replace the corresponding free with g_free. Signed-off-by: Ahmed Abouzied --- Hello, I noticed that there was a `malloc` call in this file. It seems that it was added by the commit 22e4a267 (3 years ago) which was after th

Re: [PATCH v4 2/3] acpi: tpm: Add missing device identification objects

2022-01-04 Thread Stefan Berger
On 1/4/22 04:55, Igor Mammedov wrote: On Wed, 22 Dec 2021 21:23:09 -0500 Stefan Berger wrote: Add missing device identification objects _STR and _UID. They will appear why, does it break anything or it's just cosmetic? I don't know about whether any software needs these entries but it's

[PULL 02/15] user: move common-user includes to a subdirectory of {bsd, linux}-user/

2022-01-04 Thread Paolo Bonzini
Avoid polluting the compilation of common-user/ with local include files; making an include file available to common-user/ should be a deliberate decision in order to keep a clear interface that can be used by both bsd-user/ and linux-user/. Reviewed-by: Richard Henderson Signed-off-by: Paolo Bon

[PULL 04/15] block/file-posix: Simplify the XFS_IOC_DIOINFO handling

2022-01-04 Thread Paolo Bonzini
From: Thomas Huth The handling for the XFS_IOC_DIOINFO ioctl is currently quite excessive: This is not a "real" feature like the other features that we provide with the "--enable-xxx" and "--disable-xxx" switches for the configure script, since this does not influence lots of code (it's only abou

[PULL v3 00/15] Build system and KVM changes for 2021-12-23

2022-01-04 Thread Paolo Bonzini
The following changes since commit b5a3d8bc9146ba22a25116cb748c97341bf99737: Merge tag 'pull-misc-20220103' of https://gitlab.com/rth7680/qemu into staging (2022-01-03 09:34:41 -0800) are available in the Git repository at: https://gitlab.com/bonzini/qemu.git tags/for-upstream for you to f

[PULL 01/15] meson: reuse common_user_inc when building files specific to user-mode emulators

2022-01-04 Thread Paolo Bonzini
Reviewed-by: Richard Henderson Signed-off-by: Paolo Bonzini --- meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meson.build b/meson.build index 53065e96ec..de111d6fa1 100644 --- a/meson.build +++ b/meson.build @@ -2919,6 +2919,7 @@ foreach target : target_dirs

[PULL 05/15] configure: simplify creation of plugin symbol list

2022-01-04 Thread Paolo Bonzini
--dynamic-list is present on all supported ELF (not Windows or Darwin) platforms, since it dates back to 2006; -exported_symbols_list is likewise present on all supported versions of macOS. Do not bother doing a functional test in configure. Remove the file creation from configure as well: for Da

[PULL 06/15] configure: do not set bsd_user/linux_user early

2022-01-04 Thread Paolo Bonzini
Similar to other optional features, leave the variables empty and compute the actual value later. Use the existence of include or source directories to detect whether an OS or CPU supports respectively bsd-user and linux-user. For now, BSD user-mode emulation is buildable even on TCI-only archite

  1   2   3   >