Re: Call for GSoC and Outreachy project ideas for summer 2023

2023-02-05 Thread Eugenio Perez Martin
On Fri, Jan 27, 2023 at 4:18 PM Stefan Hajnoczi wrote: > > Dear QEMU, KVM, and rust-vmm communities, > QEMU will apply for Google Summer of Code 2023 > (https://summerofcode.withgoogle.com/) and has been accepted into > Outreachy May 2023 (https://www.outreachy.org/). You can now > submit internsh

Re: [PATCH 13/19] hw/m68k: Set QDev properties using QDev API

2023-02-05 Thread Thomas Huth
Am Fri, 3 Feb 2023 19:09:08 +0100 schrieb Philippe Mathieu-Daudé : > No need to use the low-level QOM API when an object > inherits from QDev. Directly use the QDev API to set > its properties. > > Signed-off-by: Philippe Mathieu-Daudé > --- > hw/m68k/next-cube.c | 2 +- > hw/m68k/q800.c

Re: [PATCH 0/3] Misc sm501 clean ups

2023-02-05 Thread Daniel Henrique Barboza
On 1/30/23 06:43, Daniel Henrique Barboza wrote: On 1/28/23 23:43, BALATON Zoltan wrote: On Mon, 23 Jan 2023, Philippe Mathieu-Daudé wrote: On 21/1/23 21:35, BALATON Zoltan wrote: Some small trivial clean ups I've found while looking at this file. BALATON Zoltan (3):    hw/display/sm501:

[RFC PATCH 01/16] hw/arm/smmuv3: Add missing fields for IDR0

2023-02-05 Thread Mostafa Saleh
In preparation for adding stage-2 support. Add IDR0 fields related to stage-2. VMID16: 16-bit VMID supported. S2P: Stage-2 translation supported. They are described in 6.3.1 SMMU_IDR0. No functional change intended. Signed-off-by: Mostafa Saleh --- hw/arm/smmuv3-internal.h | 2 ++ 1 file chan

[RFC PATCH 08/16] hw/arm/smmuv3: Support S2AFFD

2023-02-05 Thread Mostafa Saleh
Parse S2AFFD from STE and use it in stage-2 translation. This is described in the SMMUv3 manual "5.2. Stream Table Entry" in "[181] S2AFFD". HTTU is not supported, SW is expected to maintain the Access flag. This flag determines the behavior on access of a stage-2 page whose descriptor has AF ==

[RFC PATCH 07/16] hw/arm/smmuv3: Check validity of stage-2 page table

2023-02-05 Thread Mostafa Saleh
Check if with the configured start level, ia_bits and granularity we can have a valid page table as described in ARM ARM D8.2 Translation process. The idea is to see for the highest possible number of IPA bits, how many concatenated tables we would need, if it is more than 16, then this is not poss

[RFC PATCH 00/16] Add stage-2 translation for SMMUv3

2023-02-05 Thread Mostafa Saleh
This patch series adds stage-2 translation support for SMMUv3. It is controlled by a new system property “arm-smmuv3.stage”. - When set to “1”: Stage-1 only would be advertised and supported (default behavior) - When set to “2”: Stage-2 only would be advertised and supported. - Value “all” is reser

[RFC PATCH 04/16] hw/arm/smmuv3: Add a system property to choose translation stage

2023-02-05 Thread Mostafa Saleh
Add a new system property for smmuv3 to choose what translation stages to advertise. The property added arm-smmuv3.stage can have 3 values: - "1": Stage-1 is only advertised. - "2": Stage-2 is only advertised. - "all": Stage-1 + Stage-2 are supported, which is not implemented in this patch series.

[RFC PATCH 09/16] hw/arm/smmuv3: Don't touch CD if stage-1 is not supported.

2023-02-05 Thread Mostafa Saleh
If stage-1 is not supported, SW will not configure it, so don't try to access it as it might have faulty addresses. Signed-off-by: Mostafa Saleh --- hw/arm/smmuv3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/arm/smmuv3.c b/hw/arm/smmuv3.c index 7884401475..c18460a4ff

[RFC PATCH 03/16] hw/arm/smmuv3: Rename smmu_ptw_64

2023-02-05 Thread Mostafa Saleh
In preparation for adding stage-2 support. Rename smmu_ptw_64 to smmu_ptw_64_s1. No functional change intended. Signed-off-by: Mostafa Saleh --- hw/arm/smmu-common.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/arm/smmu-common.c b/hw/arm/smmu-common.c index

[RFC PATCH 13/16] hw/arm/smmuv3: Add CMDs related to stage 2

2023-02-05 Thread Mostafa Saleh
CMD_TLBI_S2_IPA: As S1+S2 is not enabled, for now this can be the same as CMD_TLBI_NH_VAA. CMD_TLBI_S12_VMALL: Added new function to invalidate TLB by VMID. Signed-off-by: Mostafa Saleh --- hw/arm/smmu-common.c | 16 hw/arm/smmuv3.c | 25 +++

[RFC PATCH 06/16] hw/arm/smmuv3: Parse STE config for stage-2

2023-02-05 Thread Mostafa Saleh
Parse stage-2 configuration and populate it in SMMUTransCfg. Configs in this patch (s2g, ttb, tsz, sl0). Checking validity of values added when possible. MAX IPA supported is 48 bits and only AA64 tables are supported. Signed-off-by: Mostafa Saleh --- hw/arm/smmuv3.c | 43 +

[RFC PATCH 16/16] hw/arm/smmuv3: Enable stage-2 support

2023-02-05 Thread Mostafa Saleh
As everything is in place, we can use the new system property to advertise which stage is supported and remove bad_ste from STE stage2 config. Signed-off-by: Mostafa Saleh --- hw/arm/smmuv3.c | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/hw/arm/smmuv3.c b/hw/a

[RFC PATCH 10/16] hw/arm/smmuv3: Make TLB lookup work for stage-2

2023-02-05 Thread Mostafa Saleh
Right now, either stage-1 or stage-2 are supported, this simplifies how we can deal with TLBs. This patch makes TLB lookup work if stage-2 is enabled instead of stage-1. TLB lookup is done before a PTW, if a valid entry is found we won't do the PTW. To be able to do TLB lookup, we need the correct

[RFC PATCH 15/16] hw/arm/smmuv3: Add fault configuration for stage-2

2023-02-05 Thread Mostafa Saleh
As stall is not supported, if S2S is set the translation would abort. For S2R, we reuse the same code used for stage-1 with flag record_faults. However when nested translation is supported we would need to separate stage-1 and stage-2 faults. Signed-off-by: Mostafa Saleh --- hw/arm/smmuv3-intern

[RFC PATCH 02/16] hw/arm/smmuv3: Update translation config to hold stage-2

2023-02-05 Thread Mostafa Saleh
In preparation for adding stage-2 support. Add it's configuration. They are added as SMMUS2Cfg in SMMUTransCfg, SMMUS2Cfg hold configs parsed from STE: -tsz: Input range -sl0: start level of translation -affd: AF fault disable -granule_sz: Granule page shift -vmid: VMID -vttb: PA of translat

[RFC PATCH 12/16] hw/arm/smmuv3: Add VMID to tlb tagging

2023-02-05 Thread Mostafa Saleh
Allow TLB to be tagged with VMID. If stage-1 is only supported, VMID is set to -1 and ignored from STE and CMD_TLBI_NH* cmds. Signed-off-by: Mostafa Saleh --- hw/arm/smmu-common.c | 24 +++- hw/arm/smmu-internal.h | 2 ++ hw/arm/smmuv3.c | 12

[RFC PATCH 11/16] hw/arm/smmuv3: Read VMID from STE

2023-02-05 Thread Mostafa Saleh
According to SMMUv3 user manual "5.2 Stream Table Entry": All fields with an S2 prefix (with the exception of S2VMID) are IGNORED when stage-2 bypasses translation (Config[1] == 0). Which means that VMID can be used(for TLB tagging) even if stage-2 is bypassed, so we parse it unconditionally when

[RFC PATCH 14/16] hw/arm/smmuv3: Add stage-2 support in iova notifier

2023-02-05 Thread Mostafa Saleh
In smmuv3_notify_iova, read the granule based on translation stage and use VMID if valid value is sent. Signed-off-by: Mostafa Saleh --- hw/arm/smmuv3.c | 39 ++- hw/arm/trace-events | 2 +- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a

[RFC PATCH 05/16] hw/arm/smmuv3: Add page table walk for stage-2

2023-02-05 Thread Mostafa Saleh
In preparation for adding stage-2 support. Add Stage-2 PTW code. Only Aarch64 fromat is supported as stage-1. Max 48 bits IPA is supported. Nesting stage-1 and stage-2 is not supported right now. Signed-off-by: Mostafa Saleh --- hw/arm/smmu-common.c | 112 +++

Re: [RFC v2 12/13] vdpa: preemptive kick at enable

2023-02-05 Thread Michael S. Tsirkin
On Sat, Feb 04, 2023 at 03:04:02AM -0800, Si-Wei Liu wrote: > For network hardware device, I thought suspend > just needs to wait until the completion of ongoing Tx/Rx DMA transaction > already in the flight, rather than to drain all the upcoming packets until > avail_idx. It depends I guess but i

[PULL 03/16] ppc/pegasos2: Improve readability of VIA south bridge creation

2023-02-05 Thread Daniel Henrique Barboza
From: BALATON Zoltan Slightly improve readability of creating the south btidge by cnamging type of a local variable to avoid some casts within function arguments which makes some lines shorter and easier to read. Also remove an unneded line break. Signed-off-by: BALATON Zoltan Reviewed-by: Phil

[PULL 04/16] hw/pci-host/mv64361: Reuse pci_swizzle_map_irq_fn

2023-02-05 Thread Daniel Henrique Barboza
From: Bernhard Beschow mv64361_pcihost_map_irq() is a reimplementation of pci_swizzle_map_irq_fn(). Resolve this redundancy. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: BALATON Zoltan Message-Id: <20230106113927.8603-1-shen...@gmail.com> Signed-off-by: Dan

[PULL 16/16] hw/display/sm501: Code style fix

2023-02-05 Thread Daniel Henrique Barboza
From: BALATON Zoltan Fix checkpatch warning about multi-line comment. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé Message-Id: <8801292992a304609e1eac680fe36b515592b926.1674333199.git.bala...@eik.bme.hu> Signed-off-by: Daniel Henrique Barboza --- hw/display/sm501.c | 3

[PULL 00/16] ppc queue

2023-02-05 Thread Daniel Henrique Barboza
tags/pull-ppc-20230205 for you to fetch changes up to bd591dc1b3c39b7f73b8d9f20be6e9001c905238: hw/display/sm501: Code style fix (2023-02-05 06:40:28 -0300) ppc patch queue for 2023-02-05: This queue includes patches that

[PULL 07/16] hw/ppc/e500.c: Avoid hardcoding parent device in create_devtree_etsec()

2023-02-05 Thread Daniel Henrique Barboza
From: Bernhard Beschow The "platform" node is available through data->node, so use that instead of making assumptions about the parent device. Signed-off-by: Bernhard Beschow Reviewed-by: Daniel Henrique Barboza Message-Id: <20230125130024.158721-4-shen...@gmail.com> Signed-off-by: Daniel Henr

[PULL 11/16] ppc/pnv/pci: Update PHB5 version register

2023-02-05 Thread Daniel Henrique Barboza
From: Frederic Barrat Update register value per its P10 DD2 definition. Signed-off-by: Frederic Barrat Reviewed-by: Cédric Le Goater Message-Id: <20230127122848.550083-4-fbar...@linux.ibm.com> Signed-off-by: Daniel Henrique Barboza --- include/hw/pci-host/pnv_phb4.h | 2 +- 1 file changed, 1

[PULL 12/16] ppc/pnv/pci: Fix PHB xscom registers memory region name

2023-02-05 Thread Daniel Henrique Barboza
From: Frederic Barrat The name is for the region mapping the PHB xscom registers. It was apparently a bad cut-and-paste from the per-stack pci xscom area just above, so we had two regions with the same name. Signed-off-by: Frederic Barrat Reviewed-by: Cédric Le Goater Message-Id: <202301271228

[PULL 01/16] tests/migration: add sysprof-capture-4 as dependency for stress binary

2023-02-05 Thread Daniel Henrique Barboza
From: Murilo Opsfelder Araujo `make tests/migration/stress` fails with: FAILED: tests/migration/stress cc -m64 -mlittle-endian -o tests/migration/stress tests/migration/stress.p/stress.c.o -Wl,--as-needed -Wl,--no-undefined -pie -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -fstack-protec

[PULL 09/16] ppc/pnv/pci: Cleanup PnvPHBPecState structure

2023-02-05 Thread Daniel Henrique Barboza
From: Frederic Barrat Remove unused structure member 'system_memory'. Signed-off-by: Frederic Barrat Reviewed-by: Cédric Le Goater Message-Id: <20230127122848.550083-2-fbar...@linux.ibm.com> Signed-off-by: Daniel Henrique Barboza --- include/hw/pci-host/pnv_phb4.h | 2 -- 1 file changed, 2 d

[PULL 15/16] hw/display/sm501: Remove unneeded casts from void pointer

2023-02-05 Thread Daniel Henrique Barboza
From: BALATON Zoltan This is not needed in C. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé Message-Id: <58f599387dd0739ea1880bfb678872c0be26bf1b.1674333199.git.bala...@eik.bme.hu> Signed-off-by: Daniel Henrique Barboza --- hw/display/sm501.c | 22 +++---

[PULL 05/16] hw/ppc: Set machine->fdt in e500 machines

2023-02-05 Thread Daniel Henrique Barboza
From: Bernhard Beschow This enables support for the 'dumpdtb' QMP/HMP command for all e500 machines. Signed-off-by: Bernhard Beschow Reviewed-by: Daniel Henrique Barboza Message-Id: <20230125130024.158721-2-shen...@gmail.com> Signed-off-by: Daniel Henrique Barboza --- hw/ppc/e500.c | 7 +

[PULL 14/16] hw/display/sm501: Remove parenthesis around constant macro definitions

2023-02-05 Thread Daniel Henrique Barboza
From: BALATON Zoltan No need to wrap constants in parenthesis. Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé Message-Id: <9194546b73b05e7098761ec62b2dfd0699b97b65.1674333199.git.bala...@eik.bme.hu> Signed-off-by: Daniel Henrique Barboza --- hw/display/sm501.c | 394 +

[PULL 10/16] ppc/pnv/pci: Remove duplicate definition of PNV_PHB5_DEVICE_ID

2023-02-05 Thread Daniel Henrique Barboza
From: Frederic Barrat PNV_PHB5_DEVICE_ID is defined in two different headers. The definition in hw/pci-host/pnv_phb4.h was left out in a previous rework. Remaining definition is in hw/pci-host/pnv_phb.h. Signed-off-by: Frederic Barrat Reviewed-by: Cédric Le Goater Message-Id: <20230127122848.

[PULL 08/16] hw/ppc/e500.c: Attach eSDHC unimplemented region to ccsr_addr_space

2023-02-05 Thread Daniel Henrique Barboza
From: Bernhard Beschow Makes the unimplemented region move together with the CCSR address space if moved by a bootloader. Moving the CCSR address space isn't implemented yet but this patch is a preparation for it. Signed-off-by: Bernhard Beschow Reviewed-by: Philippe Mathieu-Daudé Message-Id:

[PULL 13/16] hw/ppc/pegasos2: Fix a typo in a comment

2023-02-05 Thread Daniel Henrique Barboza
From: BALATON Zoltan Reported-by: Stefan Weil Signed-off-by: BALATON Zoltan Reviewed-by: Philippe Mathieu-Daudé Message-Id: <20230203194312.33834745...@zero.eik.bme.hu> Signed-off-by: Daniel Henrique Barboza --- hw/ppc/pegasos2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --

[PULL 02/16] tests/migration: add support for ppc64le for guestperf.py

2023-02-05 Thread Daniel Henrique Barboza
From: Murilo Opsfelder Araujo Add support for ppc64le for guestperf.py. On ppc, console is usually hvc0 and serial device for pseries machine is spapr-vty. Signed-off-by: Murilo Opsfelder Araujo Reviewed-by: Daniel Henrique Barboza Reviewed-by: Juan Quintela Message-Id: <20220809002451.91541-

[PULL 06/16] hw/ppc/e500{, plat}: Drop redundant checks for presence of platform bus

2023-02-05 Thread Daniel Henrique Barboza
From: Bernhard Beschow This is a follow-up on commit 47a0b1dff7e9 'hw/ppc/mpc8544ds: Add platform bus': Both mpc85xx boards now have a platform bus unconditionally. Signed-off-by: Bernhard Beschow Reviewed-by: Daniel Henrique Barboza Message-Id: <20230125130024.158721-3-shen...@gmail.com> Sign

Re: [PATCH 00/10] Retire Fork-Based Fuzzing

2023-02-05 Thread Philippe Mathieu-Daudé
On 5/2/23 05:29, Alexander Bulekov wrote: * Some device do not completely reset their state. This can lead to non-reproducible crashes. However, in my local tests, most crashes were reproducible. OSS-Fuzz shouldn't send us reports unless it can consistently reproduce a crash. The

Re: [PATCH 01/10] hw/sparse-mem: clear memory on reset

2023-02-05 Thread Philippe Mathieu-Daudé
On 5/2/23 05:29, Alexander Bulekov wrote: We use sparse-mem for fuzzing. For long-running fuzzing processes, we eventually end up with many allocated sparse-mem pages. To avoid this, clear the allocated pages on system-reset. Signed-off-by: Alexander Bulekov --- hw/mem/sparse-mem.c | 13 +

Re: [PATCH 04/10] fuzz/generic-fuzz: add a limit on DMA bytes written

2023-02-05 Thread Philippe Mathieu-Daudé
On 5/2/23 05:29, Alexander Bulekov wrote: As we have repplaced fork-based fuzzing, with reboots - we can no longer Typo "replaced". use a timeout+exit() to avoid slow inputs. Libfuzzer has its own timer that it uses to catch slow inputs, however these timeouts are usually seconds-minutes long

Re: [PATCH 02/10] fuzz: add fuzz_reboot API

2023-02-05 Thread Philippe Mathieu-Daudé
On 5/2/23 05:29, Alexander Bulekov wrote: As we are converting most fuzzers to rely on reboots to reset state, introduce an API to make sure reboots are invoked in a consistent manner. Signed-off-by: Alexander Bulekov --- tests/qtest/fuzz/fuzz.c | 6 ++ tests/qtest/fuzz/fuzz.h | 2 +- 2

Re: [PATCH 2/4] pcie_regs: drop duplicated indicator value macros

2023-02-05 Thread Philippe Mathieu-Daudé
On 4/2/23 18:47, Vladimir Sementsov-Ogievskiy wrote: We already have indicator values in include/standard-headers/linux/pci_regs.h , no reason to reinvent them in include/hw/pci/pcie_regs.h. (and we already have usage of PCI_EXP_SLTCTL_PWR_IND_BLINK and PCI_EXP_SLTCTL_PWR_IND_OFF in hw/pci/pcie.c

Re: [PATCH 1/4] pcie: pcie_cap_slot_write_config(): use correct macro

2023-02-05 Thread Philippe Mathieu-Daudé
On 4/2/23 18:47, Vladimir Sementsov-Ogievskiy wrote: PCI_EXP_SLTCTL_PIC_OFF is a value, and PCI_EXP_SLTCTL_PIC is a mask. Happily PCI_EXP_SLTCTL_PIC_OFF is a maximum value for this mask and is equal to the mask itself. Still the code looks like a bug. Let's make it more reader-friendly. Signed-o

Re: [PATCH 4/4] pcie: add trace-point for power indicator transitions

2023-02-05 Thread Philippe Mathieu-Daudé
On 4/2/23 18:47, Vladimir Sementsov-Ogievskiy wrote: Signed-off-by: Vladimir Sementsov-Ogievskiy --- hw/pci/pcie.c | 20 hw/pci/trace-events | 3 +++ 2 files changed, 23 insertions(+) +static const char *pcie_sltctl_pic_str(uint16_t sltctl) +{ +switch (sltc

Re: [PATCH 3/5] hw/ppc/ppc4xx: Set QDev properties using QDev API

2023-02-05 Thread Daniel Henrique Barboza
On 2/3/23 18:16, Philippe Mathieu-Daudé wrote: No need to use the low-level QOM API when an object inherits from QDev. Directly use the QDev API to set its properties. All calls use either errp=&error_abort or &error_fatal, so converting to the QDev API is almost a no-op (QDev API always uses

Re: [PATCH 4/5] hw/ppc/spapr: Set QDev properties using QDev API

2023-02-05 Thread Daniel Henrique Barboza
On 2/3/23 18:16, Philippe Mathieu-Daudé wrote: No need to use the low-level QOM API when an object inherits from QDev. Directly use the QDev API to set its properties. All calls use either errp=&error_abort or &error_fatal, so converting to the QDev API is almost a no-op (QDev API always uses

Re: [PATCH 5/5] hw/ppc/pnv: Set QDev properties using QDev API

2023-02-05 Thread Daniel Henrique Barboza
On 2/3/23 18:16, Philippe Mathieu-Daudé wrote: No need to use the low-level QOM API when an object inherits from QDev. Directly use the QDev API to set its properties. One call in pnv_psi_power8_realize() propagate the Error* argument: if (!object_property_set_int(OBJECT(ics), "nr-irqs",

Re: [PATCH 2/5] hw/pci-host/raven: Set QDev properties using QDev API

2023-02-05 Thread Daniel Henrique Barboza
On 2/3/23 18:16, Philippe Mathieu-Daudé wrote: No need to use the low-level QOM API when an object inherits from QDev. Directly use the QDev API to set its properties. All calls use either errp=&error_fatal or NULL, so converting to the QDev API is almost a no-op (QDev API always uses &error_

Re: [PATCH v3 1/9] hw/pci-host/i440fx: Inline sysbus_add_io()

2023-02-05 Thread Philippe Mathieu-Daudé
On 4/2/23 16:10, Bernhard Beschow wrote: sysbus_add_io() just wraps memory_region_add_subregion() while also obscuring where the memory is attached. So use memory_region_add_subregion() directly and attach it to the existing memory region s->bus->address_space_io which is set as an alias to get_s

Re: [PATCH 0/5] hw/ppc: Set QDev properties using QDev API (part 2/3)

2023-02-05 Thread Daniel Henrique Barboza
On 2/3/23 18:16, Philippe Mathieu-Daudé wrote: part 1 [*] cover: -- QEMU provides the QOM API for core objects. Devices are modelled on top of QOM as QDev objects. There is no point in using the lower level QOM API with QDev; it makes the code more complex and harder to review. I first conve

Re: [PATCH v3 2/9] hw/pci-host/q35: Inline sysbus_add_io()

2023-02-05 Thread Philippe Mathieu-Daudé
On 4/2/23 16:10, Bernhard Beschow wrote: sysbus_add_io() just wraps memory_region_add_subregion() while also obscuring where the memory is attached. So use memory_region_add_subregion() directly and attach it to the existing memory region s->mch.address_space_io which is set as an alias to get_sy

Re: [PATCH v3 3/9] hw/i386/pc_q35: Reuse machine parameter

2023-02-05 Thread Philippe Mathieu-Daudé
On 4/2/23 16:10, Bernhard Beschow wrote: Signed-off-by: Bernhard Beschow Reviewed-by: Thomas Huth --- hw/i386/pc_q35.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v3 5/9] hw/i386/pc_{q35, piix}: Minimize usage of get_system_memory()

2023-02-05 Thread Philippe Mathieu-Daudé
On 4/2/23 16:10, Bernhard Beschow wrote: Signed-off-by: Bernhard Beschow Reviewed-by: Thomas Huth --- hw/i386/pc_piix.c | 2 +- hw/i386/pc_q35.c | 7 --- 2 files changed, 5 insertions(+), 4 deletions(-) Reviewed-by: Philippe Mathieu-Daudé

Re: [PATCH v3 7/9] hw/pci-host/pam: Make init_pam() usage more readable

2023-02-05 Thread Philippe Mathieu-Daudé
On 4/2/23 16:10, Bernhard Beschow wrote: Unlike pam_update() which takes the subject -- PAMMemoryRegion -- as first argument, init_pam() takes it as fifth (!) argument. This makes it quite hard to figure out what an init_pam() invocation actually initializes. By moving the subject to the front th

Re: [PATCH v3 8/9] hw/i386/x86: Make TYPE_X86_MACHINE the owner of smram

2023-02-05 Thread Philippe Mathieu-Daudé
On 4/2/23 16:10, Bernhard Beschow wrote: Treat the smram MemoryRegion analoguous to other memory regions such as ram, pci, io, ... , making the used memory regions more explicit when instantiating q35 or i440fx. Note that the q35 device uses these memory regions only during the realize phase whi

Re: [PATCH v3 9/9] target/i386/tcg/sysemu/tcg-cpu: Avoid own opinion about smram size

2023-02-05 Thread Philippe Mathieu-Daudé
On 4/2/23 16:10, Bernhard Beschow wrote: When setting up the CPU's smram memory region alias, the code currently assumes that the smram size is 4 GiB. While this is true, it repeats a decision made elsewhere which seems redundant and prone to inconsistencies. Avoid this by reusing whatever size t

Re: [PATCH 1/3] docs/system: Remove "mips" board from target-mips.rst

2023-02-05 Thread Philippe Mathieu-Daudé
On 2/2/23 14:21, Jiaxun Yang wrote: This board had been deprecated long ago. s/deprecated/removed/ Indeed, in commit f169413c27 ("hw/mips: Remove the 'r4k' machine"). Signed-off-by: Jiaxun Yang --- docs/system/target-mips.rst | 14 -- 1 file changed, 14 deletions(-) Review

Re: [PATCH 3/3] hw/mips: Add MIPS virt board

2023-02-05 Thread Philippe Mathieu-Daudé
Hi Jiaxun, On 2/2/23 14:21, Jiaxun Yang wrote: MIPS virt board is design to utilize existing VirtIO infrastures but also comptitable with MIPS's existing internal simulation tools. It includes virtio-mmio, pcie gpex, flash rom, fw_cfg, goldfish-rtc, and optional goldfish_pic in case MIPS GIC is

Re: [PULL 00/11] Net patches

2023-02-05 Thread Peter Maydell
On Sat, 4 Feb 2023 at 20:09, Laurent Vivier wrote: > > On 2/4/23 15:57, Peter Maydell wrote: > > On Thu, 2 Feb 2023 at 06:21, Jason Wang wrote: > >> > >> The following changes since commit > >> 13356edb87506c148b163b8c7eb0695647d00c2a: > >> > >>Merge tag 'block-pull-request' of https://gitla

Re: Call for GSoC and Outreachy project ideas for summer 2023

2023-02-05 Thread Stefan Hajnoczi
On Sun, 5 Feb 2023 at 03:15, Eugenio Perez Martin wrote: > > On Fri, Jan 27, 2023 at 4:18 PM Stefan Hajnoczi wrote: > > > > Dear QEMU, KVM, and rust-vmm communities, > > QEMU will apply for Google Summer of Code 2023 > > (https://summerofcode.withgoogle.com/) and has been accepted into > > Outrea

Qemu - how to run in Win?

2023-02-05 Thread Jacob A
Hello, After installing Qemu on Win, I don't see any shortcut to run it? There is only a link to 'uninstall'. launching exe files doesn't do anything. Can you please explain how to launch this application? Thanks, J. Please see the attached image.

[PATCH v2 2/2] tcg: use QTree instead of GTree

2023-02-05 Thread Emilio Cota
qemu-user can hang in a multi-threaded fork. One common reason is that when creating a TB, between fork and exec we manipulate a GTree whose memory allocator (GSlice) is not fork-safe. Although POSIX does not mandate it, the system's allocator (e.g. tcmalloc, libc malloc) is probably fork-safe. F

[PATCH v2 0/2] fix for #285

2023-02-05 Thread Emilio Cota
Changes since v1: - Add configure check to only use QTree if Glib still implements gslice. If Glib doesn't, then we call Glib directly with inline functions. - Add TODO's so that in the future (i.e. when the minimum version of Glib that we use doesn't implement gslice) we remove QTree. - Add c

[PATCH v2 1/2] util: import GTree as QTree

2023-02-05 Thread Emilio Cota
The only reason to add this implementation is to control the memory allocator used. Some users (e.g. TCG) cannot work reliably in multi-threaded environments (e.g. forking in user-mode) with GTree's allocator, GSlice. See https://gitlab.com/qemu-project/qemu/-/issues/285 for details. Importing GTr

Re: [PATCH 2/2] tcg: use QTree instead of GTree

2023-02-05 Thread Emilio Cota
On Mon, Jan 30, 2023 at 09:09:47 -1000, Richard Henderson wrote: > On 1/29/23 23:27, Daniel P. Berrangé wrote: > > On Sun, Jan 29, 2023 at 05:38:08PM -0500, Emilio Cota wrote: > > > Since this is a correctness issue, I think we should ship with qtree > > > and use it when configuring with glib <2.7

Re: [PULL 00/40] tcg patch queue

2023-02-05 Thread Peter Maydell
On Sat, 4 Feb 2023 at 16:33, Richard Henderson wrote: > > The following changes since commit 579510e196a544b42bd8bca9cc61688d4d1211ac: > > Merge tag 'pull-monitor-2023-02-03-v2' of https://repo.or.cz/qemu/armbru > into staging (2023-02-04 10:19:55 +) > > are available in the Git repository

Re: pixman_blt on aarch64

2023-02-05 Thread Richard Henderson
On 2/4/23 06:57, BALATON Zoltan wrote: This has just bounced, I hoped to still be able to post after moderation but now I'm resending it after subscribing to the pixman list. Meanwhile I've found this ticket as well: https://gitlab.freedesktop.org/pixman/pixman/-/merge_requests/71 See the rest o

Re: pixman_blt on aarch64

2023-02-05 Thread BALATON Zoltan
On Sun, 5 Feb 2023, Richard Henderson wrote: On 2/4/23 06:57, BALATON Zoltan wrote: This has just bounced, I hoped to still be able to post after moderation but now I'm resending it after subscribing to the pixman list. Meanwhile I've found this ticket as well: https://gitlab.freedesktop.org/p

qemu-img hangs on s390x

2023-02-05 Thread Michael Tokarev
There's a bug filed against qemu on debian, about qemu-img hanging on s390x. While digging in, I discovered that the thing is broken there indeed, and it is broken for a very long time, and it is interesting. The reproducer is rather simple: qemu-img create -f qcow2 -o preallocation=metadata bl

Re: pixman_blt on aarch64

2023-02-05 Thread Richard Henderson
On 2/5/23 08:44, BALATON Zoltan wrote: On Sun, 5 Feb 2023, Richard Henderson wrote: On 2/4/23 06:57, BALATON Zoltan wrote: This has just bounced, I hoped to still be able to post after moderation but now I'm resending it after subscribing to the pixman list. Meanwhile I've found this ticket as

Re: [PATCH v2 02/10] softmmu/ioport: Merge portio_list_add() into portio_list_init()

2023-02-05 Thread Mark Cave-Ayland
On 26/01/2023 21:17, Bernhard Beschow wrote: Both functions are always used together and in the same order. Let's reflect this in the API. Inspired-by: <20210518215545.1793947-9-phi...@redhat.com> 'hw/isa: Extract bus part from isa_register_portio_list()' Signed-off-by: Bernhard Besc

Re: [PATCH v2 03/10] softmmu/ioport: Remove unused functions

2023-02-05 Thread Mark Cave-Ayland
On 26/01/2023 21:17, Bernhard Beschow wrote: Signed-off-by: Bernhard Beschow --- include/exec/ioport.h | 2 -- softmmu/ioport.c | 24 2 files changed, 26 deletions(-) diff --git a/include/exec/ioport.h b/include/exec/ioport.h index ec3e8e5942..1ef5aebba3 1006

Re: [PATCH v2 04/10] hw/ide/piix: Disuse isa_get_irq()

2023-02-05 Thread Mark Cave-Ayland
On 26/01/2023 21:17, Bernhard Beschow wrote: isa_get_irq() asks for an ISADevice which piix-ide doesn't provide. Passing a NULL pointer works but causes the isabus global to be used then. By fishing out TYPE_ISA_BUS from the QOM tree it is possible to achieve the same as isa_get_irq(). This is

Re: [PATCH v2 07/10] hw/ide/piix: Require an ISABus only for user-created instances

2023-02-05 Thread Mark Cave-Ayland
On 26/01/2023 21:17, Bernhard Beschow wrote: Internal instances now defer interrupt wiring to the caller which decouples them from the ISABus. User-created devices still fish out the ISABus from the QOM tree and the interrupt wiring remains in PIIX IDE. The latter mechanism is considered a worka

Re: [PATCH v2 08/10] hw/ide: Let ide_init_ioport() take a MemoryRegion argument instead of ISADevice

2023-02-05 Thread Mark Cave-Ayland
On 26/01/2023 21:17, Bernhard Beschow wrote: Both callers to ide_init_ioport() have access to the I/O memory region of the ISA bus, so can pass it directly. This allows ide_init_ioport() to directly call portio_list_init(). Note, now the callers become the owner of the PortioList. Inspired-by:

Re: [RFC PATCH] docs/about/deprecated: Deprecate 32-bit host systems

2023-02-05 Thread Mark Cave-Ayland
On 30/01/2023 20:45, Alex Bennée wrote: Daniel P. Berrangé writes: On Mon, Jan 30, 2023 at 11:47:02AM +, Peter Maydell wrote: On Mon, 30 Jan 2023 at 11:44, Thomas Huth wrote: Testing 32-bit host OS support takes a lot of precious time during the QEMU contiguous integration tests, and

Re: [PATCH v2 07/10] hw/ide/piix: Require an ISABus only for user-created instances

2023-02-05 Thread BALATON Zoltan
On Sun, 5 Feb 2023, Mark Cave-Ayland wrote: On 26/01/2023 21:17, Bernhard Beschow wrote: Internal instances now defer interrupt wiring to the caller which decouples them from the ISABus. User-created devices still fish out the ISABus from the QOM tree and the interrupt wiring remains in PIIX IDE

Re: [PATCH v2 07/10] hw/ide/piix: Require an ISABus only for user-created instances

2023-02-05 Thread Mark Cave-Ayland
On 05/02/2023 22:21, BALATON Zoltan wrote: On Sun, 5 Feb 2023, Mark Cave-Ayland wrote: On 26/01/2023 21:17, Bernhard Beschow wrote: Internal instances now defer interrupt wiring to the caller which decouples them from the ISABus. User-created devices still fish out the ISABus from the QOM tree

Re: [PATCH 02/19] hw/qdev: Introduce qdev_prop_set_link()

2023-02-05 Thread Mark Cave-Ayland
On 03/02/2023 18:08, Philippe Mathieu-Daudé wrote: Introduce qdev_prop_set_link(), equivalent of object_property_set_link() for QDev objects. Signed-off-by: Philippe Mathieu-Daudé --- hw/core/qdev-properties.c| 5 + include/hw/qdev-properties.h | 1 + 2 files changed, 6 insertions(

Re: [PATCH v2] KVM: dirty ring: check if vcpu is created before dirty_ring_reap_one

2023-02-05 Thread Peter Xu
Hi, Weinan, On Sun, Feb 05, 2023 at 06:45:45AM +, Weinan Liu wrote: > Failed to assert '(dirty_gfns && ring_size)' in kvm_dirty_ring_reap_one if > the vcpu has not been finished to create yet. This bug occasionally occurs > when I open 200+ qemu instances on my 16G 6-cores x86 machine. And it

Re: [PATCH] kvm: dirty-ring: Fix race with vcpu creation

2023-02-05 Thread Peter Xu
Ping On Tue, Sep 27, 2022 at 11:46:53AM -0400, Peter Xu wrote: > It's possible that we want to reap a dirty ring on a vcpu that is during > creation, because the vcpu is put onto list (CPU_FOREACH visible) before > initialization of the structures. In this case: > > qemu_init_vcpu > x86_cpu_

Re: [PATCH v10 4/5] riscv: Introduce satp mode hw capabilities

2023-02-05 Thread Alistair Francis
On Fri, Feb 3, 2023 at 4:04 PM Alexandre Ghiti wrote: > > Currently, the max satp mode is set with the only constraint that it must be > implemented in QEMU, i.e. set in valid_vm_1_10_[32|64]. > > But we actually need to add another level of constraint: what the hw is > actually capable of, becaus

Re: [PATCH v2] target/riscv: fix ctzw behavior

2023-02-05 Thread Alistair Francis
On Sat, Feb 4, 2023 at 6:25 PM Vladimir Isaev wrote: > > According to spec, ctzw should work with 32-bit register, not 64. > > For example, previous implementation returns 33 for (1<<33) input > when the new one returns 32. > > Signed-off-by: Vladimir Isaev > Suggested-by: Richard Henderson Rev

Re: [PATCH] target/riscv: fix SBI getchar handler for KVM

2023-02-05 Thread Alistair Francis
On Sat, Feb 4, 2023 at 12:03 AM Vladimir Isaev wrote: > > Character must be returned via ret[0] field (copied to a0 by KVM). > > Return value should be set to 0 to indicate successful processing. > > Signed-off-by: Vladimir Isaev Reviewed-by: Alistair Francis Alistair > --- > target/riscv/kv

Re: [PATCH v5 01/14] RISC-V: Adding XTheadCmo ISA extension

2023-02-05 Thread Alistair Francis
On Wed, Feb 1, 2023 at 6:21 AM Christoph Muellner wrote: > > From: Christoph Müllner > > This patch adds support for the XTheadCmo ISA extension. > To avoid interfering with standard extensions, decoder and translation > are in its own xthead* specific files. > Future patches should be able to ea

Re: [PATCH: fix for virt instr exception] target/riscv: fix for virtual instr exception

2023-02-05 Thread Alistair Francis
On Sat, Jan 28, 2023 at 6:36 AM Deepak Gupta wrote: > > commit fb3f3730e4 added mechanism to generate virtual instruction > exception during instruction decode when virt is enabled. > > However in some situations, illegal instruction exception can be raised > due to state of CPU. One such situatio

Re: [PATCH 00/14] linux-user/sparc: Handle missing traps

2023-02-05 Thread Mark Cave-Ayland
On 02/02/2023 00:51, Richard Henderson wrote: Lots of missing trap code for cpu_loop(). r~ Richard Henderson (14): linux-user/sparc: Raise SIGILL for all unhandled software traps linux-user/sparc: Tidy syscall trap linux-user/sparc: Use TT_TRAP for flush windows linux-user/sparc: T

Re: [PATCH 0/9] hw: Use QOM alias properties and few QOM/QDev cleanups

2023-02-05 Thread Mark Cave-Ayland
On 03/02/2023 11:36, Philippe Mathieu-Daudé wrote: These patches are extracted from a QOM/QDev refactor series, so they are preliminary cleanups noticed while working on it: - Use correct type when calling qdev_prop_set_xxx() - Unify some qdev properties in MIPS models - Replace intermediate pr

Re: [PATCH v2 0/2] mac_nvram: Add block backend to persist NVRAM contents

2023-02-05 Thread Mark Cave-Ayland
On 02/02/2023 00:24, BALATON Zoltan wrote: Same as v1 just split in two patches as suggested by Mark. Regards, BALATON Zoltan BALATON Zoltan (2): mac_nvram: Add block backend to persist NVRAM contents mac_oldworld: Allow specifying nvram backing store hw/nvram/mac_nvram.c | 28

Re: [PATCH: fix for virt instr exception] target/riscv: fix for virtual instr exception

2023-02-05 Thread Alistair Francis
On Sat, Jan 28, 2023 at 6:36 AM Deepak Gupta wrote: > > commit fb3f3730e4 added mechanism to generate virtual instruction > exception during instruction decode when virt is enabled. > > However in some situations, illegal instruction exception can be raised > due to state of CPU. One such situatio

Re: [PATCH v2] target/riscv: fix ctzw behavior

2023-02-05 Thread Alistair Francis
On Sat, Feb 4, 2023 at 6:25 PM Vladimir Isaev wrote: > > According to spec, ctzw should work with 32-bit register, not 64. > > For example, previous implementation returns 33 for (1<<33) input > when the new one returns 32. > > Signed-off-by: Vladimir Isaev > Suggested-by: Richard Henderson Tha

Re: [PATCH] target/riscv: fix SBI getchar handler for KVM

2023-02-05 Thread Alistair Francis
On Sat, Feb 4, 2023 at 12:03 AM Vladimir Isaev wrote: > > Character must be returned via ret[0] field (copied to a0 by KVM). > > Return value should be set to 0 to indicate successful processing. > > Signed-off-by: Vladimir Isaev Thanks! Applied to riscv-to-apply.next Alistair > --- > target

Re: [PATCH v3 6/9] hw/i386/pc: Initialize ram_memory variable directly

2023-02-05 Thread Bernhard Beschow
Am 4. Februar 2023 15:26:13 UTC schrieb BALATON Zoltan : >On Sat, 4 Feb 2023, Bernhard Beschow wrote: >> Going through pc_memory_init() seems quite complicated for a simple >> assignment. >> >> Signed-off-by: Bernhard Beschow >> Reviewed-by: Philippe Mathieu-Daudé >> --- >> include/hw/i386/pc

Re: [PATCH v3 2/9] hw/pci-host/q35: Inline sysbus_add_io()

2023-02-05 Thread Bernhard Beschow
Am 5. Februar 2023 11:12:26 UTC schrieb "Philippe Mathieu-Daudé" : >On 4/2/23 16:10, Bernhard Beschow wrote: >> sysbus_add_io() just wraps memory_region_add_subregion() while also >> obscuring where the memory is attached. So use >> memory_region_add_subregion() directly and attach it to the ex

Re: [PATCH v2 03/10] softmmu/ioport: Remove unused functions

2023-02-05 Thread Bernhard Beschow
Am 5. Februar 2023 21:37:01 UTC schrieb Mark Cave-Ayland : >On 26/01/2023 21:17, Bernhard Beschow wrote: > >> Signed-off-by: Bernhard Beschow >> --- >> include/exec/ioport.h | 2 -- >> softmmu/ioport.c | 24 >> 2 files changed, 26 deletions(-) >> >> diff --g

PING: [PATCH v4 00/12] Refactor cryptodev

2023-02-05 Thread zhenwei pi
Hi Michael Please correct me if I miss anything... On 1/29/23 10:57, zhenwei pi wrote: v4 -> v5: - suggested by MST, use 'PRIu32' instead of '%u' to print a uint32_t value - correct *QCryptodevBackendClient* and *QCryptodevInfo* in qapi/cryptodev.json v3 -> v4: - a small change in '0005-crypt

Re: [PATCH 3/3] hw/mips: Add MIPS virt board

2023-02-05 Thread Jiaxun Yang
> 2023年2月5日 11:48,Philippe Mathieu-Daudé 写道: > > Hi Jiaxun, > > On 2/2/23 14:21, Jiaxun Yang wrote: >> MIPS virt board is design to utilize existing VirtIO infrastures >> but also comptitable with MIPS's existing internal simulation tools. >> It includes virtio-mmio, pcie gpex, flash rom, fw_

[PATCH v2 2/2] virtio_net: just purge tx when dev/queue reset

2023-02-05 Thread Xuan Zhuo
When dev/queue reset, we should just purge all packet, not try to flush the async packets. When flush these async packets, the callback(virtio_net_tx_complete) will try to flush new packets from tx queue. Fixes: 7dc6be52 ("virtio-net: support queue reset") Fixes: https://gitlab.com/qemu-project/qe

[PATCH v2 1/2] virtio_net: virtio_net_tx_complete() stop flush new packets for purge operation

2023-02-05 Thread Xuan Zhuo
For async tx, virtio_net_tx_complete() is called when purge or flush operation is done. But for purge operation, we should not try to flush new packet from tx queue. The purge operation means we will stop the queue soon. Signed-off-by: Xuan Zhuo --- hw/net/virtio-net.c | 32 ++---

  1   2   >