Re: [PATCH v3 08/19] target/riscv: move riscv_cpu_add_kvm_properties() to kvm.c

2023-09-21 Thread Alistair Francis
On Wed, Sep 20, 2023 at 10:47 PM Daniel Henrique Barboza wrote: > > We'll introduce the KVM accelerator class with a 'cpu_instance_init' > implementation that is going to be invoked during the common > riscv_cpu_post_init() (via accel_cpu_instance_init()). This > instance_init will execute KVM

Re: [PATCH v3 07/19] target/riscv/cpu.c: mark extensions arrays as 'const'

2023-09-21 Thread Alistair Francis
On Wed, Sep 20, 2023 at 9:21 PM Daniel Henrique Barboza wrote: > > We'll need to export these arrays to the accelerator classes in the next > patches. Mark them as 'const' now because they should not be modified at > runtime. > > Note that 'riscv_cpu_options' will also be exported, but can't be

Re: [PATCH v3 06/19] target/riscv: move 'host' CPU declaration to kvm.c

2023-09-21 Thread Alistair Francis
On Wed, Sep 20, 2023 at 9:22 PM Daniel Henrique Barboza wrote: > > This CPU only exists if we're compiling with KVM so move it to the kvm > specific file. > > Signed-off-by: Daniel Henrique Barboza > Reviewed-by: Philippe Mathieu-Daudé > Reviewed-by: Andrew Jones > Reviewed-by: LIU Zhiwei

Re: [PATCH v3 05/19] target/riscv/cpu.c: add .instance_post_init()

2023-09-21 Thread Alistair Francis
On Wed, Sep 20, 2023 at 9:24 PM Daniel Henrique Barboza wrote: > > All generic CPUs call riscv_cpu_add_user_properties(). The 'max' CPU > calls riscv_init_max_cpu_extensions(). Both can be moved to a common > instance_post_init() callback, implemented in riscv_cpu_post_init(), > called by all

RE: [PATCH v1 3/4] hw/arm/virt-acpi-build: patch guest SRAT for NUMA nodes

2023-09-21 Thread Ankit Agrawal
Hi Jonathan > > +if (pcidev->pdev.has_coherent_memory) { > > +uint64_t start_node = object_property_get_uint(obj, > > + "dev_mem_pxm_start", _abort); > > +uint64_t node_count = object_property_get_uint(obj, > > +

RE: [PATCH v1 1/4] vfio: new command line params for device memory NUMA nodes

2023-09-21 Thread Ankit Agrawal
> Also, good to say why multiple nodes per device are needed. This is to support the GPU's MIG (Mult-Instance GPUs) feature, (https://www.nvidia.com/en-in/technologies/multi-instance-gpu/) which allows partitioning of the GPU device resources (including device memory) into several isolated

Re: [PATCH v3 04/19] target/riscv: move riscv_tcg_ops to tcg-cpu.c

2023-09-21 Thread Alistair Francis
On Wed, Sep 20, 2023 at 9:21 PM Daniel Henrique Barboza wrote: > > Move the remaining of riscv_tcg_ops now that we have a working realize() > implementation. > > Signed-off-by: Daniel Henrique Barboza > Reviewed-by: Philippe Mathieu-Daudé > Reviewed-by: Andrew Jones > Reviewed-by: LIU Zhiwei

Re: [PATCH v3 03/19] target/riscv: move riscv_cpu_validate_set_extensions() to tcg-cpu.c

2023-09-21 Thread Alistair Francis
On Wed, Sep 20, 2023 at 10:25 PM Daniel Henrique Barboza wrote: > > This function is the core of the RISC-V validations for TCG CPUs, and it > has a lot going on. > > Functions in cpu.c were made public to allow them to be used by the KVM > accelerator class later on.

Re: [PATCH v3 02/19] target/riscv: move riscv_cpu_realize_tcg() to TCG::cpu_realizefn()

2023-09-21 Thread Alistair Francis
On Wed, Sep 20, 2023 at 9:24 PM Daniel Henrique Barboza wrote: > > riscv_cpu_realize_tcg() was added to allow TCG cpus to have a different > realize() path during the common riscv_cpu_realize(), making it a good > choice to start moving TCG exclusive code to tcg-cpu.c. > > Rename it to

Re: [PATCH v3 01/19] target/riscv: introduce TCG AccelCPUClass

2023-09-21 Thread Alistair Francis
On Wed, Sep 20, 2023 at 9:22 PM Daniel Henrique Barboza wrote: > > target/riscv/cpu.c needs to handle all possible accelerators (TCG and > KVM at this moment) during both init() and realize() time. This forces > us to resort to a lot of "if tcg" and "if kvm" throughout the code, > which isn't

Re: [PATCH v3 4/5] hw/char: riscv_htif: replace exit calls with proper shutdown

2023-09-21 Thread Alistair Francis
On Thu, Sep 7, 2023 at 9:26 PM Clément Chigot wrote: > > This replaces the exit calls by shutdown requests, ensuring a proper > cleanup of Qemu. Otherwise, some connections like gdb could be broken > before its final packet ("Wxx") is being sent. This part, being done > inside qemu_cleanup

[PATCH v4] hw/i386/pc: improve physical address space bound check for 32-bit x86 systems

2023-09-21 Thread Ani Sinha
32-bit x86 systems do not have a reserved memory for hole64. On those 32-bit systems without PSE36 or PAE CPU features, hotplugging memory devices are not supported by QEMU as QEMU always places hotplugged memory above 4 GiB boundary which is beyond the physical address space of the processor.

Re: [virtio-dev] Re: [VIRTIO PCI PATCH v5 1/1] transport-pci: Add freeze_mode to virtio_pci_common_cfg

2023-09-21 Thread Jason Wang
On Thu, Sep 21, 2023 at 2:28 PM Chen, Jiqian wrote: > > Hi Jason, > > On 2023/9/21 12:22, Jason Wang wrote: > > On Tue, Sep 19, 2023 at 7:43 PM Jiqian Chen wrote: > >> > >> When guest vm does S3, Qemu will reset and clear some things of virtio > >> devices, but guest can't aware that, so that

[PATCH] vfio/pci: rename vfio_put_device to vfio_pci_put_device

2023-09-21 Thread Zhenzhong Duan
vfio_put_device() is a VFIO PCI specific function, rename it with 'vfio_pci' prefix to avoid confusing. No functional change. Suggested-by: Cédric Le Goater Signed-off-by: Zhenzhong Duan --- hw/vfio/pci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/vfio/pci.c

Re: Concerns regarding e17bebd049 ("dump: Set correct vaddr for ELF dump")

2023-09-21 Thread Dave Young
Not sure if crash people subscribed to linux-debuggers, let's add more cc for awareness about this thread. On Thu, 21 Sept 2023 at 01:45, Stephen Brennan wrote: > > Stephen Brennan writes: > > Hi Jon, > > > > Jon Doron writes: > >> Hi Stephen, > >> Like you have said the reason is as I wrote

Re: [PATCH v13 6/9] gfxstream + rutabaga: add initial support for gfxstream

2023-09-21 Thread Akihiko Odaki
On 2023/09/22 9:03, Gurchetan Singh wrote: On Wed, Sep 20, 2023 at 5:05 AM Mark Cave-Ayland mailto:mark.cave-ayl...@ilande.co.uk>> wrote: On 20/09/2023 12:42, Akihiko Odaki wrote: > On 2023/08/29 9:36, Gurchetan Singh wrote: >> This adds initial support for gfxstream and

RE: [PATCH v1 13/22] vfio: Add base container

2023-09-21 Thread Duan, Zhenzhong
>-Original Message- >From: Eric Auger >Sent: Friday, September 22, 2023 1:20 AM >Subject: Re: [PATCH v1 13/22] vfio: Add base container > >Hi Zhenzhong, >On 9/21/23 05:35, Duan, Zhenzhong wrote: >> Hi Eric, >> >>> -Original Message- >>> From: Eric Auger >>> Sent: Thursday,

Re: [PATCH v11 6/9] gfxstream + rutabaga: add initial support for gfxstream

2023-09-21 Thread Akihiko Odaki
On 2023/09/22 8:44, Gurchetan Singh wrote: On Tue, Sep 19, 2023 at 3:07 PM Akihiko Odaki > wrote: On 2023/09/20 3:36, Bernhard Beschow wrote: > > > Am 15. September 2023 02:38:02 UTC schrieb Gurchetan Singh

[PATCH v2] hw/sd/sdhci: Block Size Register bits [14:12] is lost

2023-09-21 Thread Lu Gao
Block Size Register bits [14:12] is SDMA Buffer Boundary, it is missed in register write, but it is needed in SDMA transfer. e.g. it will be used in sdhci_sdma_transfer_multi_blocks to calculate boundary_ variables. Missing this field will cause wrong operation for different SDMA Buffer Boundary

Re: [RFC PATCH v2 07/21] i386/pc: Drop pc_machine_kvm_type()

2023-09-21 Thread Xiaoyao Li
On 9/21/2023 4:51 PM, David Hildenbrand wrote: On 14.09.23 05:51, Xiaoyao Li wrote: pc_machine_kvm_type() was introduced by commit e21be724eaf5 ("i386/xen: add pc_machine_kvm_type to initialize XEN_EMULATE mode") to do Xen specific initialization by utilizing kvm_type method. commit

Re: [RFC PATCH v2 05/21] kvm: Enable KVM_SET_USER_MEMORY_REGION2 for memslot

2023-09-21 Thread Xiaoyao Li
On 9/21/2023 4:56 PM, David Hildenbrand wrote: On 14.09.23 05:51, Xiaoyao Li wrote: From: Chao Peng Switch to KVM_SET_USER_MEMORY_REGION2 when supported by KVM. With KVM_SET_USER_MEMORY_REGION2, QEMU can set up memory region that backend'ed both by hva-based shared memory and gmem fd based

Re: [RFC PATCH v2 04/21] memory: Introduce memory_region_has_gmem_fd()

2023-09-21 Thread Xiaoyao Li
On 9/21/2023 4:46 PM, David Hildenbrand wrote: On 14.09.23 05:51, Xiaoyao Li wrote: Introduce memory_region_has_gmem_fd() to query if the MemoryRegion has KVM gmem fd allocated. *probably* best to just squash that into patch #2. Sure, I will do it.

Re: [RFC PATCH v2 02/21] RAMBlock: Add support of KVM private gmem

2023-09-21 Thread Xiaoyao Li
On 9/21/2023 4:55 PM, David Hildenbrand wrote: On 14.09.23 05:50, Xiaoyao Li wrote: From: Chao Peng Add KVM gmem support to RAMBlock so both normal hva based memory and kvm gmem fd based private memory can be associated in one RAMBlock. Introduce new flag RAM_KVM_GMEM. It calls KVM ioctl to

Re: [PATCH v13 6/9] gfxstream + rutabaga: add initial support for gfxstream

2023-09-21 Thread Gurchetan Singh
On Wed, Sep 20, 2023 at 5:05 AM Mark Cave-Ayland < mark.cave-ayl...@ilande.co.uk> wrote: > On 20/09/2023 12:42, Akihiko Odaki wrote: > > > On 2023/08/29 9:36, Gurchetan Singh wrote: > >> This adds initial support for gfxstream and cross-domain. Both > >> features rely on virtio-gpu blob

Re: [PATCH v23 01/20] CPU topology: extend with s390 specifics

2023-09-21 Thread Nina Schoetterl-Glausch
On Wed, 2023-09-20 at 12:57 +0200, Markus Armbruster wrote: > Nina Schoetterl-Glausch writes: > > > On Tue, 2023-09-19 at 14:47 +0200, Markus Armbruster wrote: > > > Nina Schoetterl-Glausch writes: > > > > > > > From: Pierre Morel > > > > > > > > S390 adds two new SMP levels, drawers and

Re: [PATCH 0/9] Replace remaining target_ulong in system-mode accel

2023-09-21 Thread Michael Tokarev
07.08.2023 18:56, Anton Johansson via wrote: This patchset replaces the remaining uses of target_ulong in the accel/ directory. Specifically, the address type of a few kvm/hvf functions is widened to vaddr, and the address type of the cpu_[st|ld]*() functions is changed to abi_ptr (which is

[PATCH] target/arm: Implement FEAT_HPMN0

2023-09-21 Thread Peter Maydell
FEAT_HPMN0 is a small feature which defines that it is valid for MDCR_EL2.HPMN to be set to 0, meaning "no PMU event counters provided to an EL1 guest" (previously this setting was reserved). QEMU's implementation almost gets HPMN == 0 right, but we need to fix one check in pmevcntr_is_64_bit().

Re: [PATCH 0/5] file-posix: Clean up and fix zoned checks

2023-09-21 Thread Michael Tokarev
21.09.2023 21:21, Michael Tokarev wrote: .. Is this stable-worthy (at least 1-3)?  From the bug description it smells like it should be in 8.1.x, or maybe whole series. N/M, this whole patchset has been Cc'd qemu-stable already. Thanks, /mjt

Re: [PATCH] accel/tcg: mttcg remove false-negative halted assertion

2023-09-21 Thread Michael Tokarev
29.08.2023 04:06, Nicholas Piggin wrote: mttcg asserts that an execution ending with EXCP_HALTED must have cpu->halted. However between the event or instruction that sets cpu->halted and requests exit and the assertion here, an asynchronous event could clear cpu->halted. This leads to crashes

Re: [PATCH 0/5] file-posix: Clean up and fix zoned checks

2023-09-21 Thread Michael Tokarev
24.08.2023 18:53, Hanna Czenczek wrote: Hi, As presented in [1] there is a bug in the zone code in raw_co_prw(), specifically we don’t check whether there actually is zone information before running code that assumes there is (and thus we run into a division by zero). This has now also been

Re: [PATCH v4 2/3] i386: Explicitly ignore unsupported BUS_MCEERR_AO MCE on AMD guest

2023-09-21 Thread Yazen Ghannam
On 9/20/23 7:13 AM, Joao Martins wrote: > On 18/09/2023 23:00, William Roche wrote: >> Hi John, >> >> I'd like to put the emphasis on the fact that ignoring the SRAO error >> for a VM is a real problem at least for a specific (rare) case I'm >> currently working on: The VM migration. >> >>

[PULL 12/30] target/arm: Implement FEAT_MOPS enable bits

2023-09-21 Thread Peter Maydell
FEAT_MOPS defines a handful of new enable bits: * HCRX_EL2.MSCEn, SCTLR_EL1.MSCEn, SCTLR_EL2.MSCen: define whether the new insns should UNDEF or not * HCRX_EL2.MCE2: defines whether memops exceptions from EL1 should be taken to EL1 or EL2 Since we don't sanitise what bits can be written

[PULL 08/30] target/arm: Update user-mode ID reg mask values

2023-09-21 Thread Peter Maydell
For user-only mode we reveal a subset of the AArch64 ID registers to the guest, to emulate the kernel's trap-and-emulate-ID-regs handling. Update the feature bit masks to match upstream kernel commit a48fa7efaf1161c1c. None of these features are yet implemented by QEMU, so this doesn't yet have a

[PULL 04/30] linux-user/elfload.c: Correct SME feature names reported in cpuinfo

2023-09-21 Thread Peter Maydell
Some of the names we use for CPU features in linux-user's dummy /proc/cpuinfo don't match the strings in the real kernel in arch/arm64/kernel/cpuinfo.c. Specifically, the SME related features have an underscore in the HWCAP_FOO define name, but (like the SVE ones) they do not have an underscore in

[PULL 14/30] target/arm: Define syndrome function for MOPS exceptions

2023-09-21 Thread Peter Maydell
The FEAT_MOPS memory operations can raise a Memory Copy or Memory Set exception if a copy or set instruction is executed when the CPU register state is not correct for that instruction. Define the usual syn_* function that constructs the syndrome register value for these exceptions.

[PULL 11/30] target/arm: Don't skip MTE checks for LDRT/STRT at EL0

2023-09-21 Thread Peter Maydell
The LDRT/STRT "unprivileged load/store" instructions behave like normal ones if executed at EL0. We handle this correctly for the load/store semantics, but get the MTE checking wrong. We always look at s->mte_active[is_unpriv] to see whether we should be doing MTE checks, but in hflags.c when we

[PULL 03/30] hw/arm/boot: Set SCR_EL3.FGTEn when booting kernel

2023-09-21 Thread Peter Maydell
From: Fabian Vogt Just like d7ef5e16a17c sets SCR_EL3.HXEn for FEAT_HCX, this commit handles SCR_EL3.FGTEn for FEAT_FGT: When we direct boot a kernel on a CPU which emulates EL3, we need to set up the EL3 system registers as the Linux kernel documentation specifies:

[PULL 29/30] elf2dmp: use Linux mmap with MAP_NORESERVE when possible

2023-09-21 Thread Peter Maydell
From: Viktor Prutyanov Glib's g_mapped_file_new maps file with PROT_READ|PROT_WRITE and MAP_PRIVATE. This leads to premature physical memory allocation of dump file size on Linux hosts and may fail. On Linux, mapping the file with MAP_NORESERVE limits the allocation by available memory.

[PULL 27/30] elf2dmp: introduce physical block alignment

2023-09-21 Thread Peter Maydell
From: Viktor Prutyanov Physical memory ranges may not be aligned to page size in QEMU ELF, but DMP can only contain page-aligned runs. So, align them. Signed-off-by: Viktor Prutyanov Reviewed-by: Akihiko Odaki Message-id: 20230915170153.10959-3-vik...@daynix.com Signed-off-by: Peter Maydell

[PULL 30/30] elf2dmp: rework PDB_STREAM_INDEXES::segments obtaining

2023-09-21 Thread Peter Maydell
From: Viktor Prutyanov PDB for Windows 11 kernel has slightly different structure compared to previous versions. Since elf2dmp don't use the other fields, copy only 'segments' field from PDB_STREAM_INDEXES. Signed-off-by: Viktor Prutyanov Reviewed-by: Akihiko Odaki Message-id:

[PULL 24/30] audio/jackaudio: Avoid dynamic stack allocation in qjack_process()

2023-09-21 Thread Peter Maydell
Avoid a dynamic stack allocation in qjack_process(). Since this function is a JACK process callback, we are not permitted to malloc() here, so we allocate a working buffer in qjack_client_init() instead. The codebase has very few VLAs, and if we can get rid of them all we can make the compiler

[PULL 17/30] target/arm: Implement the SET* instructions

2023-09-21 Thread Peter Maydell
Implement the SET* instructions which collectively implement a "memset" operation. These come in a set of three, eg SETP (prologue), SETM (main), SETE (epilogue), and each of those has different flavours to indicate whether memory accesses should be unpriv or non-temporal. This commit does not

[PULL 25/30] sbsa-ref: add non-secure EL2 virtual timer

2023-09-21 Thread Peter Maydell
From: Marcin Juszkiewicz Armv8.1+ cpus have Virtual Host Extension (VHE) which added non-secure EL2 virtual timer. This change adds it to fullfil Arm BSA (Base System Architecture) requirements. Signed-off-by: Marcin Juszkiewicz Message-id:

[PULL 20/30] target/arm: Implement MTE tag-checking functions for FEAT_MOPS copies

2023-09-21 Thread Peter Maydell
The FEAT_MOPS memory copy operations need an extra helper routine for checking for MTE tag checking failures beyond the ones we already added for memory set operations: * mte_mops_probe_rev() does the same job as mte_mops_probe(), but it checks tags starting at the provided address and working

[PULL 15/30] target/arm: New function allocation_tag_mem_probe()

2023-09-21 Thread Peter Maydell
For the FEAT_MOPS operations, the existing allocation_tag_mem() function almost does what we want, but it will take a watchpoint exception even for an ra == 0 probe request, and it requires that the caller guarantee that the memory is accessible. For FEAT_MOPS we want a function that will not

[PULL 02/30] docs/devel/loads-stores: Fix git grep regexes

2023-09-21 Thread Peter Maydell
The loads-and-stores documentation includes git grep regexes to find occurrences of the various functions. Some of these regexes have errors, typically failing to escape the '?', '(' and ')' when they should be metacharacters (since these are POSIX basic REs). We also weren't consistent about

[PULL 10/30] target/arm: Remove unused allocation_tag_mem() argument

2023-09-21 Thread Peter Maydell
The allocation_tag_mem() function takes an argument tag_size, but it never uses it. Remove the argument. In mte_probe_int() in particular this also lets us delete the code computing the value we were passing in. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Philippe

[PULL 26/30] elf2dmp: replace PE export name check with PDB name check

2023-09-21 Thread Peter Maydell
From: Viktor Prutyanov PE export name check introduced in d399d6b179 isn't reliable enough, because a page with the export directory may be not present for some reason. On the other hand, elf2dmp retrieves the PDB name in any case. It can be also used to check that a PE image is the kernel

[PULL 13/30] target/arm: Pass unpriv bool to get_a64_user_mem_index()

2023-09-21 Thread Peter Maydell
In every place that we call the get_a64_user_mem_index() function we do it like this: memidx = a->unpriv ? get_a64_user_mem_index(s) : get_mem_index(s); Refactor so the caller passes in the bool that says whether they want the 'unpriv' or 'normal' mem_index rather than having to do the ?:

[PULL 23/30] audio/jackaudio: Avoid dynamic stack allocation in qjack_client_init

2023-09-21 Thread Peter Maydell
Avoid a dynamic stack allocation in qjack_client_init(), by using a g_autofree heap allocation instead. (We stick with allocate + snprintf() because the JACK API requires the name to be no more than its maximum size, so g_strdup_printf() would require an extra truncation step.) The codebase has

[PULL 01/30] target/m68k: Add URL to semihosting spec

2023-09-21 Thread Peter Maydell
The spec for m68k semihosting is documented in the libgloss sources. Add a comment with the URL for it, as we already have for nios2 semihosting. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Reviewed-by: Alex Bennée Reviewed-by: Philippe Mathieu-Daudé Message-id:

[PULL 05/30] linux-user/elfload.c: Add missing arm and arm64 hwcap values

2023-09-21 Thread Peter Maydell
Our lists of Arm 32 and 64 bit hwcap values have lagged behind the Linux kernel. Update them to include all the bits defined as of upstream Linux git commit a48fa7efaf1161c1 (in the middle of the kernel 6.6 dev cycle). For 64-bit, we don't yet implement any of the features reported via these

[PULL 19/30] target/arm: Implement the SETG* instructions

2023-09-21 Thread Peter Maydell
The FEAT_MOPS SETG* instructions are very similar to the SET* instructions, but as well as setting memory contents they also set the MTE tags. They are architecturally required to operate on tag-granule aligned regions only. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson

[PULL 28/30] elf2dmp: introduce merging of physical memory runs

2023-09-21 Thread Peter Maydell
From: Viktor Prutyanov DMP supports 42 physical memory runs at most. So, merge adjacent physical memory ranges from QEMU ELF when possible to minimize total number of runs. Signed-off-by: Viktor Prutyanov Reviewed-by: Akihiko Odaki Message-id: 20230915170153.10959-4-vik...@daynix.com [PMM:

[PULL 21/30] target/arm: Implement the CPY* instructions

2023-09-21 Thread Peter Maydell
The FEAT_MOPS CPY* instructions implement memory copies. These come in both "always forwards" (memcpy-style) and "overlap OK" (memmove-style) flavours. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20230912140434.169-12-peter.mayd...@linaro.org ---

[PULL 06/30] linux-user/elfload.c: Report previously missing arm32 hwcaps

2023-09-21 Thread Peter Maydell
Add the code to report the arm32 hwcaps we were previously missing: ss, ssbs, fphp, asimdhp, asimddp, asimdfhm, asimdbf16, i8mm Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- linux-user/elfload.c | 12 1 file changed, 12 insertions(+) diff --git

[PULL 09/30] target/arm: Implement FEAT_HBC

2023-09-21 Thread Peter Maydell
FEAT_HBC (Hinted conditional branches) provides a new instruction BC.cond, which behaves exactly like the existing B.cond except that it provides a hint to the branch predictor about the likely behaviour of the branch. Since QEMU does not implement branch prediction, we can treat this identically

[PULL 22/30] target/arm: Enable FEAT_MOPS for CPU 'max'

2023-09-21 Thread Peter Maydell
Enable FEAT_MOPS on the AArch64 'max' CPU, and add it to the list of features we implement. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 20230912140434.169-13-peter.mayd...@linaro.org --- docs/system/arm/emulation.rst | 1 + linux-user/elfload.c | 1 +

[PULL 07/30] target/arm: Update AArch64 ID register field definitions

2023-09-21 Thread Peter Maydell
Update our AArch64 ID register field definitions from the 2023-06 system register XML release: https://developer.arm.com/documentation/ddi0601/2023-06/ Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson --- target/arm/cpu.h | 23 +++ 1 file changed, 23

[PULL 00/30] target-arm queue

2023-09-21 Thread Peter Maydell
-loongarch-20230920' of https://gitlab.com/gaosong/qemu into staging (2023-09-20 13:56:18 -0400) are available in the Git repository at: https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20230921 for you to fetch changes up to 231f6a7d66254a58bedbee458591b780e0a507b1

[PULL 16/30] target/arm: Implement MTE tag-checking functions for FEAT_MOPS

2023-09-21 Thread Peter Maydell
The FEAT_MOPS instructions need a couple of helper routines that check for MTE tag failures: * mte_mops_probe() checks whether there is going to be a tag error in the next up-to-a-page worth of data * mte_check_fail() is an existing function to record the fact of a tag failure, which we

[PULL 18/30] target/arm: Define new TB flag for ATA0

2023-09-21 Thread Peter Maydell
Currently the only tag-setting instructions always do so in the context of the current EL, and so we only need one ATA bit in the TB flags. The FEAT_MOPS SETG instructions include ones which set tags for a non-privileged access, so we now also need the equivalent "are tags enabled?" information

Re: [PATCH v1 13/22] vfio: Add base container

2023-09-21 Thread Eric Auger
Hi Zhenzhong, On 9/21/23 05:35, Duan, Zhenzhong wrote: > Hi Eric, > >> -Original Message- >> From: Eric Auger >> Sent: Thursday, September 21, 2023 1:31 AM >> Subject: Re: [PATCH v1 13/22] vfio: Add base container >> >> Hi Zhenzhong, >> >> On 9/19/23 19:23, Cédric Le Goater wrote: >>> On

Re: EDK2 ArmVirtQemu behaviour with multiple UARTs

2023-09-21 Thread Gerd Hoffmann
On Thu, Sep 21, 2023 at 04:34:27PM +0100, Peter Maydell wrote: > As long as EDK2 does something sensible when the DTB says "two > UARTs here and here" and it also finds a virtio-serial PCI > device, I don't mind what exactly it does. The problem here is > more that EDK2 currently does strange

Re: [PATCH v2] linux-user: Fixes for zero_bss

2023-09-21 Thread Philippe Mathieu-Daudé
On 9/9/23 20:45, Richard Henderson wrote: The previous change, 2d385be6152, assumed !PAGE_VALID meant that the page would be unmapped by the elf image. However, since we reserved the entire image space via mmap, PAGE_VALID will always be set. Instead, assume PROT_NONE for the same condition.

Re: [Bug 1819289] Re: Windows 95 and Windows 98 will not install or run

2023-09-21 Thread John M
This is happening again in 8.1. I used Windows 95 for a while in 6.1 and it was fine, but when I tried to upgrade to 8.1, it started happening again. I tried reducing the memory and it still happens. Not an urgent issue though. On Mon, Aug 30, 2021 at 2:05 AM Philippe Mathieu-Daudé <

[PATCH 1/1] hw/ide/core: terminate in-flight DMA on IDE bus reset

2023-09-21 Thread Simon Rowe
When an IDE controller is reset, its internal state is being cleared before any outstanding I/O is cancelled. If a response to DMA is received in this window, the aio callback will incorrectly continue with the next part of the transfer (now using sector 0 from the cleared controller state). For

[PATCH 0/1] CVE-2023-5088

2023-09-21 Thread Simon Rowe
The attached patch fixes CVE-2023-5088 in which a bug in QEMU could cause a guest I/O operation otherwise addressed to an arbitrary disk offset to be targeted to offset 0 instead (potentially overwriting the VM's boot code). This could be used, for example, by L2 guests with a virtual disk

Re: [PATCH 2/4] target/ppc: Add recording of taken branches to BHRB

2023-09-21 Thread Glenn Miles
It all looks pretty good otherwise. I do worry about POWER8/9 which do not have BHRB disable bit. How much do they slow down I wonder? That is a good question! I'll see if I can get some linux boot times with and without the changes on P9. I ran some tests booting ubuntu 20.04 on the

Re: EDK2 ArmVirtQemu behaviour with multiple UARTs

2023-09-21 Thread Peter Maydell
On Thu, 21 Sept 2023 at 16:26, Gerd Hoffmann wrote: > > On Thu, Sep 21, 2023 at 11:50:20AM +0100, Peter Maydell wrote: > > Hi; I've been looking again at a very long standing missing feature in > > the QEMU virt board, which is that we only have one UART. One of the > > things that has stalled

Re: EDK2 ArmVirtQemu behaviour with multiple UARTs

2023-09-21 Thread Gerd Hoffmann
On Thu, Sep 21, 2023 at 11:50:20AM +0100, Peter Maydell wrote: > Hi; I've been looking again at a very long standing missing feature in > the QEMU virt board, which is that we only have one UART. One of the > things that has stalled this in the past has been the odd behaviour of > EDK2 if the DTB

Re: [PULL 00/17] Trivial patches for 2023-09-21

2023-09-21 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL v2 00/22] implement discard operation for Parallels images

2023-09-21 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL v2 00/28] Block layer patches

2023-09-21 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PULL v3 0/9] testing updates (back to green!)

2023-09-21 Thread Stefan Hajnoczi
Applied, thanks. Please update the changelog at https://wiki.qemu.org/ChangeLog/8.2 for any user-visible changes. signature.asc Description: PGP signature

Re: [PATCH v2 3/5] elf2dmp: introduce merging of physical memory runs

2023-09-21 Thread Peter Maydell
On Fri, 15 Sept 2023 at 18:02, Viktor Prutyanov wrote: > > DMP supports 42 physical memory runs at most. So, merge adjacent > physical memory ranges from QEMU ELF when possible to minimize total > number of runs. > > Signed-off-by: Viktor Prutyanov > --- > contrib/elf2dmp/main.c | 56

Re: [PATCH 6/7] target/arm: Update user-mode ID reg mask values

2023-09-21 Thread Peter Maydell
On Mon, 11 Sept 2023 at 14:53, Peter Maydell wrote: > > For user-only mode we reveal a subset of the AArch64 ID registers > to the guest, to emulate the kernel's trap-and-emulate-ID-regs > handling. Update the feature bit masks to match upstream kernel > commit a48fa7efaf1161c1c. > > None of

Re: [PATCH v2] linux-user: Fixes for zero_bss

2023-09-21 Thread Michael Tokarev
09.09.2023 21:45, Richard Henderson wrote: The previous change, 2d385be6152, assumed !PAGE_VALID meant that the page would be unmapped by the elf image. However, since we reserved the entire image space via mmap, PAGE_VALID will always be set. Instead, assume PROT_NONE for the same condition.

[PATCH] qom/object_interfaces: Handle `len-` property first

2023-09-21 Thread Lu Gao
From: "Gao, Lu" Array property needs corresponding `len-` property set first to add actual array properties. Then we need to make sure `len-` property is set first before array property. But when the model is used with like `-device driver[,prop[=value][,...]]` in QEMU command line options,

Re: [PATCH v2 07/10] virtiofsd: Use qemu_get_runtime_dir()

2023-09-21 Thread Akihiko Odaki
On 2023/09/21 21:58, Stefan Hajnoczi wrote: On Thu, Nov 10, 2022 at 07:06:26PM +0900, Akihiko Odaki wrote: qemu_get_runtime_dir() is used to construct the path to a lock file. Signed-off-by: Akihiko Odaki --- tools/virtiofsd/fuse_virtio.c | 6 +++--- 1 file changed, 3 insertions(+), 3

Re: [PATCH v2 7/7] qobject atomics osdep: Make a few macros more hygienic

2023-09-21 Thread Markus Armbruster
Kevin Wolf writes: > Am 20.09.2023 um 20:31 hat Markus Armbruster geschrieben: [...] >> diff --git a/include/qapi/qmp/qobject.h b/include/qapi/qmp/qobject.h >> index 9003b71fd3..d36cc97805 100644 >> --- a/include/qapi/qmp/qobject.h >> +++ b/include/qapi/qmp/qobject.h >> @@ -45,10 +45,17 @@

Re: [PATCH v3 00/10] Validate and test qapi examples

2023-09-21 Thread Markus Armbruster
Victor Toso writes: > Hi, > > v2: https://lists.gnu.org/archive/html/qemu-devel/2023-09/msg02383.html > > - Sorry Markus, I kept the two last 'fix example' patches as I don't > fully remember how we should go with it. That's fine. I see two sane alternatives: 1. Add suitable elision syntax.

Re: [PATCH] accel/kvm/kvm-all: Handle register access errors

2023-09-21 Thread Peter Maydell
On Thu, 21 Sept 2023 at 08:25, Akihiko Odaki wrote: > On 2023/06/19 21:19, Peter Maydell wrote: > > On Sat, 10 Jun 2023 at 04:51, Akihiko Odaki > > wrote: > >> On 2022/12/01 20:00, Akihiko Odaki wrote: > >>> On 2022/12/01 19:40, Peter Maydell wrote: > On Thu, 1 Dec 2022 at 10:27, Akihiko

Re: [PATCH v2] plugins/hotblocks: Fix potential deadlock in plugin_exit() function

2023-09-21 Thread Philippe Mathieu-Daudé
On 21/9/23 11:23, Cong Liu wrote: This patch fixes a potential deadlock in the plugin_exit() function of QEMU. The original code does not release the lock mutex if it is NULL. This patch adds a check for it being NULL and releases the mutex in that case. Signed-off-by: Cong Liu Suggested-by:

Re: target/sparc: What is CPU_FEATURE_FLOAT128 for?

2023-09-21 Thread Philippe Mathieu-Daudé
On 19/9/23 11:32, Richard Henderson wrote: On 9/18/23 14:31, Philippe Mathieu-Daudé wrote: Hi Mark, Artyom, I'm looking at the CPU_FEATURE_FLOAT128 definition introduced in commit 64a88d5d3a ("CPU feature selection support"). Any clue how it was supposed to be used? This should have a

Re: [PATCH 11/52] migration/rdma: Drop rdma_add_block() error handling

2023-09-21 Thread Markus Armbruster
"Zhijian Li (Fujitsu)" writes: > On 18/09/2023 22:41, Markus Armbruster wrote: >> rdma_add_block() can't fail. Return void, and drop the unreachable >> error handling. >> >> Signed-off-by: Markus Armbruster >> --- >> migration/rdma.c | 30 +- >> 1 file changed, 9

Re: [PATCH v1 12/22] vfio/ccw: Use vfio_[attach/detach]_device

2023-09-21 Thread Cédric Le Goater
On 9/21/23 15:00, Duan, Zhenzhong wrote: -Original Message- From: Cédric Le Goater Sent: Thursday, September 21, 2023 8:20 PM Subject: Re: [PATCH v1 12/22] vfio/ccw: Use vfio_[attach/detach]_device On 8/30/23 12:37, Zhenzhong Duan wrote: From: Eric Auger Let the vfio-ccw device

[PATCH v3 6/7] block: Clean up local variable shadowing

2023-09-21 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Tracked down with -Wshadow=local. Clean up: delete inner declarations when they are actually redundant, else rename variables. Signed-off-by: Markus Armbruster Reviewed-by: Stefan Hajnoczi

[PATCH v3 2/7] migration: Clean up local variable shadowing

2023-09-21 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Tracked down with -Wshadow=local. Clean up: delete inner declarations when they are actually redundant, else rename variables. Signed-off-by: Markus Armbruster Reviewed-by: Peter Xu

[PATCH v3 0/7] Steps towards enabling -Wshadow=local

2023-09-21 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Bugs love to hide in such code. Evidence: PATCH 1. Enabling -Wshadow would prevent bugs like this one. But we'd have to clean up all the offenders first. We got a lot of them. Enabling

[PATCH v3 5/7] block/vdi: Clean up local variable shadowing

2023-09-21 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Tracked down with -Wshadow=local. Clean up: delete inner declarations when they are actually redundant, else rename variables. Signed-off-by: Markus Armbruster Reviewed-by: Stefan Hajnoczi

[PATCH v3 3/7] ui: Clean up local variable shadowing

2023-09-21 Thread Markus Armbruster
Local variables shadowing other local variables or parameters make the code needlessly hard to understand. Tracked down with -Wshadow=local. Clean up: delete inner declarations when they are actually redundant, else rename variables. Signed-off-by: Markus Armbruster Reviewed-by: Peter Maydell

Re: [PATCH v3 10/10] qapi: scripts: add a generator for qapi's examples

2023-09-21 Thread Markus Armbruster
Victor Toso writes: > This generator has two goals: > 1. Mechanical validation of QAPI examples > 2. Generate the examples in a JSON format to be consumed for extra > validation. > > The generator iterates over every Example section, parsing both server > and client messages. The generator

[PATCH 1/2] pc_piix: remove pc-i440fx-1.4 up to pc-i440fx-1.7

2023-09-21 Thread Paolo Bonzini
These are the last users of the 128K SeaBIOS blob in the i440FX family. Removing them allows us to drop PCI support from the 128K blob, thus making it easier to update SeaBIOS to newer versions. Signed-off-by: Paolo Bonzini --- docs/about/deprecated.rst | 8

[PATCH 0/2] pc_piix: remove machines using a 128K BIOS

2023-09-21 Thread Paolo Bonzini
Remove the deprecated machine types pc-i440fx-1.4 up to pc-i440fx-1.7 These are the last users of the 128K SeaBIOS blob in the i440FX family, and removing them allows us to drop PCI support from the 128K blob, which is always strapped for free space. Paolo Paolo Bonzini (2): pc_piix: remove

Re: [RFC] Proposal of QEMU PCI Endpoint test environment

2023-09-21 Thread Kishon Vijay Abraham I
+Vaishnav Hi Shunsuke, On 8/18/2023 7:16 PM, Shunsuke Mie wrote: Hi all, We are proposing to add a new test syste to Linux for PCIe Endpoint. That can be run on QEMU without real hardware. At present, partially we have confirmed that pci-epf-test is working, but it is not yet complete.

Re: [PATCH v1 04/22] vfio/common: Introduce vfio_container_add|del_section_window()

2023-09-21 Thread Cédric Le Goater
On 9/21/23 12:14, Duan, Zhenzhong wrote: Hi Cédric, -Original Message- From: Cédric Le Goater Sent: Thursday, September 21, 2023 4:29 PM Subject: Re: [PATCH v1 04/22] vfio/common: Introduce vfio_container_add|del_section_window() Hello Zhenzhong, On 8/30/23 12:37, Zhenzhong Duan

Re: [PATCH v1 05/22] vfio/common: Extract out vfio_kvm_device_[add/del]_fd

2023-09-21 Thread Cédric Le Goater
On 9/21/23 12:22, Duan, Zhenzhong wrote: -Original Message- From: Cédric Le Goater Sent: Thursday, September 21, 2023 4:42 PM Subject: Re: [PATCH v1 05/22] vfio/common: Extract out vfio_kvm_device_[add/del]_fd On 9/20/23 13:49, Eric Auger wrote: Hi Zhenzhong, On 8/30/23 12:37,

RE: [PATCH v1 12/22] vfio/ccw: Use vfio_[attach/detach]_device

2023-09-21 Thread Duan, Zhenzhong
>-Original Message- >From: Cédric Le Goater >Sent: Thursday, September 21, 2023 8:20 PM >Subject: Re: [PATCH v1 12/22] vfio/ccw: Use vfio_[attach/detach]_device > >On 8/30/23 12:37, Zhenzhong Duan wrote: >> From: Eric Auger >> >> Let the vfio-ccw device use vfio_attach_device() and >>

Re: [PATCH v2 07/10] virtiofsd: Use qemu_get_runtime_dir()

2023-09-21 Thread Stefan Hajnoczi
On Thu, Nov 10, 2022 at 07:06:26PM +0900, Akihiko Odaki wrote: > qemu_get_runtime_dir() is used to construct the path to a lock file. > > Signed-off-by: Akihiko Odaki > --- > tools/virtiofsd/fuse_virtio.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git

  1   2   3   >