Re: [PATCH v2] aspeed: Refactor UART init for multi-SoC machines

2022-07-01 Thread Cédric Le Goater
On 7/1/22 22:02, Peter Delevoryas wrote: This change moves the code that connects the SoC UART's to serial_hd's to the machine. It makes each UART a proper child member of the SoC, and then allows the machine to selectively initialize the chardev for each UART with a serial_hd. This should

[PATCH] ui/cocoa: Fix switched_to_fullscreen warning

2022-07-01 Thread Peter Delevoryas
I noticed this error while building QEMU on Mac OS X: [1040/1660] Compiling Objective-C object libcommon.fa.p/ui_cocoa.m.o ../ui/cocoa.m:803:17: warning: variable 'switched_to_fullscreen' set but not used [-Wunused-but-set-variable] static bool switched_to_fullscreen = false;

[PATCH v2] hw/i2c/pca954x: Add method to get channels

2022-07-01 Thread Peter Delevoryas
I added this helper in the Aspeed machine file a while ago to help initialize fuji-bmc i2c devices. This moves it to the official pca954x file so that other files can use it. This does something very similar to pca954x_i2c_get_bus, but I think this is useful when you have a very complicated dts

Re: [PATCH] hw/intc: loongarch_pch_msi: Fix msi vector convertion

2022-07-01 Thread maobibo
Add to peter.mayd...@linaro.org 在 2022/7/1 11:07, Mao Bibo 写道: > Loongarch pch msi intc connects to extioi controller, the range of irq number > is 64-255. Here adds irqbase property for loongarch pch msi controller, we can > get irq offset from view of pch_msi controller with the method: > msi

Re: Why we should avoid new submodules if possible

2022-07-01 Thread Philippe Mathieu-Daudé via
On Fri, Jul 1, 2022 at 5:37 AM Thomas Huth wrote: > On 29/06/2022 08.28, Ani Sinha wrote: > > On Tue, Jun 28, 2022 at 11:30 PM Michael S. Tsirkin wrote: > >> On Tue, Jun 28, 2022 at 05:15:05PM +0100, Daniel P. Berrangé wrote: > >>> FYI, the reason much of this is intentionally NOT under the

Re: [PATCH RESEND 00/11] target/ppc: Implement slbiag move slb* to decodetree

2022-07-01 Thread Daniel Henrique Barboza
On 7/1/22 10:34, Lucas Coutinho wrote: Resent after rebasing and fixing conflicts with master. Add Leandro Lupori as reviewer. Based-on: <20220624191424.190471-1-leandro.lup...@eldorado.org.br> Implement the following PowerISA v3.0 instuction: slbiag: SLB Invalidate All Global X-form

Re: [PATCH 09/12] pc-bios/s390-ccw: Split virtio-scsi code from virtio_blk_setup_device()

2022-07-01 Thread Eric Farman
On Tue, 2022-06-28 at 15:10 +0200, Thomas Huth wrote: > The next patch is going to add more virtio-block specific code to > virtio_blk_setup_device(), and if the virtio-scsi code is also in > there, this is more cumbersome. And the calling function > virtio_setup() > in main.c looks at the device

[PATCH v2] aspeed: Refactor UART init for multi-SoC machines

2022-07-01 Thread Peter Delevoryas
This change moves the code that connects the SoC UART's to serial_hd's to the machine. It makes each UART a proper child member of the SoC, and then allows the machine to selectively initialize the chardev for each UART with a serial_hd. This should preserve backwards compatibility, but also

Re: [PATCH] aspeed: Refactor UART init for multi-SoC machines

2022-07-01 Thread Peter Delevoryas
On Fri, Jul 01, 2022 at 12:56:19PM -0700, Peter Delevoryas wrote: > This change moves the code that connects the SoC UART's to serial_hd's > to the machine. > > It makes each UART a proper child member of the SoC, and then allows the > machine to selectively initialize the chardev for each UART

[PATCH] aspeed: Refactor UART init for multi-SoC machines

2022-07-01 Thread Peter Delevoryas
This change moves the code that connects the SoC UART's to serial_hd's to the machine. It makes each UART a proper child member of the SoC, and then allows the machine to selectively initialize the chardev for each UART with a serial_hd. This should preserve backwards compatibility, but also

Re: [PATCH 00/40] PS2 device QOMification - part 2

2022-07-01 Thread Helge Deller
Hi Mark, On 6/29/22 14:39, Mark Cave-Ayland wrote: > Here is the follow-on series from part 1 which completes the work to remove > the legacy global device init functions for PS2 devices. Now that part 1 has > been applied, the hard part to remove the PS2 function callback and argument > has been

Re: [PATCH 08/12] pc-bios/s390-ccw/virtio: Beautify the code for reading virtqueue configuration

2022-07-01 Thread Eric Farman
On Tue, 2022-06-28 at 15:10 +0200, Thomas Huth wrote: > It looks nicer if we separate the run_ccw() from the IPL_assert() > statement, and the error message should talk about "virtio device" > instead of "block device", since this code is nowadays used for > non-block (i.e. network) devices, too.

Re: [PATCH 07/12] pc-bios/s390-ccw/virtio: Read device config after feature negotiation

2022-07-01 Thread Eric Farman
On Tue, 2022-06-28 at 15:10 +0200, Thomas Huth wrote: > Feature negotiation should be done first, since some fields in the > config area can depend on the negotiated features and thus should > rather be read afterwards. > > While we're at it, also adjust the error message here a little bit > (the

Re: [PATCH 05/12] pc-bios/s390-ccw/virtio-blkdev: Remove virtio_assume_scsi()

2022-07-01 Thread Eric Farman
On Tue, 2022-06-28 at 15:10 +0200, Thomas Huth wrote: > The virtio_assume_scsi() function is very questionable: First, it > is only called for virtio-blk, and not for virtio-scsi, so the naming > is already quite confusing. Second, it is called if we detected a > "invalid" IPL disk, trying to fix

Re: [PATCH 04/12] pc-bios/s390-ccw/virtio-blkdev: Simplify/fix virtio_ipl_disk_is_valid()

2022-07-01 Thread Eric Farman
On Tue, 2022-06-28 at 15:10 +0200, Thomas Huth wrote: > The s390-ccw bios fails to boot if the boot disk is a virtio-blk > disk with a sector size of 4096. For example: > > dasdfmt -b 4096 -d cdl -y -p -M quick /dev/dasdX > fdasd -a /dev/dasdX > install a guest onto /dev/dasdX1 using

[PATCH] aspeed: Create SRAM name from first CPU index

2022-07-01 Thread Peter Delevoryas
To support multiple SoC's running simultaneously, we need a unique name for each RAM region. DRAM is created by the machine, but SRAM is created by the SoC, since in hardware it is part of the SoC's internals. We need a way to uniquely identify each SRAM region though, for VM migration. Since

Re: [PULL v2 0/9] Block jobs & NBD patches

2022-07-01 Thread John Snow
On Wed, Jun 29, 2022 at 7:18 PM Richard Henderson wrote: > > On 6/29/22 13:45, Vladimir Sementsov-Ogievskiy wrote: > > The following changes since commit ad4c7f529a279685da84297773b4ec8080153c2d: > > > >Merge tag 'pull-semi-20220628' of https://gitlab.com/rth7680/qemu into > > staging

[PATCH v6 10/10] i386/pc: restrict AMD only enforcing of valid IOVAs to new machine type

2022-07-01 Thread Joao Martins
The added enforcing is only relevant in the case of AMD where the range right before the 1TB is restricted and cannot be DMA mapped by the kernel consequently leading to IOMMU INVALID_DEVICE_REQUEST or possibly other kinds of IOMMU events in the AMD IOMMU. Although, there's a case where it may

[PATCH v6 07/10] i386/pc: handle unitialized mr in pc_get_cxl_range_end()

2022-07-01 Thread Joao Martins
This in preparation to allow pc_pci_hole64_start() to be called early in pc_memory_init(), handle CXL memory region end when its underlying memory region isn't yet initialized. Cc: Jonathan Cameron Signed-off-by: Joao Martins --- hw/i386/pc.c | 13 + 1 file changed, 13

Re: [PATCH v2 02/10] tests/qemu-iotests: skip 108 when FUSE is not loaded

2022-07-01 Thread John Snow
On Fri, Jul 1, 2022 at 4:05 AM Hanna Reitz wrote: > > On 16.06.22 16:26, John Snow wrote: > > In certain container environments we may not have FUSE at all, so skip > > the test in this circumstance too. > > > > Signed-off-by: John Snow > > --- > > tests/qemu-iotests/108 | 5 + > > 1 file

Re: [PATCH 02/17] acpi: x86: deduplicate HPET AML building

2022-07-01 Thread Michael S. Tsirkin
On Fri, Jul 01, 2022 at 09:35:00AM -0400, Igor Mammedov wrote: > HPET AML doesn't depend on piix4 nor q35, move code buiding it > to common scope to avoid duplication. > > Signed-off-by: Igor Mammedov Apropos, tests/data/acpi/rebuild-expected-aml.sh ignores the fact that some tables might be

[PATCH v6 06/10] i386/pc: factor out cxl range start to helper

2022-07-01 Thread Joao Martins
Factor out the calculation of the base address of the MR. It will be used later on for the cxl range end counterpart calculation and as well in pc_memory_init() CXL mr initialization, thus avoiding duplication. Cc: Jonathan Cameron Signed-off-by: Joao Martins --- hw/i386/pc.c | 28

[PATCH v6 08/10] i386/pc: factor out device_memory base/size to helper

2022-07-01 Thread Joao Martins
Move obtaining hole64_start from device_memory MR base/size into an helper alongside correspondent getters in pc_memory_init() when the hotplug range is unitialized. This is the final step that allows pc_pci_hole64_start() to be callable at the beginning of pc_memory_init() before any MRs are

Re: [PATCH v4 0/4] hmat acpi: Don't require initiator value in -numa

2022-07-01 Thread Jonathan Cameron via
On Thu, 30 Jun 2022 09:30:58 -0400 "Michael S. Tsirkin" wrote: > On Thu, Jun 30, 2022 at 02:40:13PM +0200, Brice Goglin wrote: > > > > Le 30/06/2022 à 14:23, Igor Mammedov a écrit : > > > On Thu, 30 Jun 2022 09:36:47 +0200 > > > Brice Goglin wrote: > > > > > > > Allow -numa without

Re: [PATCH v4 19/45] target/arm: Implement SME MOVA

2022-07-01 Thread Peter Maydell
On Tue, 28 Jun 2022 at 05:40, Richard Henderson wrote: > > We can reuse the SVE functions for implementing moves to/from > horizontal tile slices, but we need new ones for moves to/from > vertical tile slices. > > Signed-off-by: Richard Henderson > --- > diff --git a/target/arm/sme_helper.c

[PATCH v6 09/10] i386/pc: relocate 4g start to 1T where applicable

2022-07-01 Thread Joao Martins
It is assumed that the whole GPA space is available to be DMA addressable, within a given address space limit, except for a tiny region before the 4G. Since Linux v5.4, VFIO validates whether the selected GPA is indeed valid i.e. not reserved by IOMMU on behalf of some specific devices or

[PATCH v6 05/10] i386/pc: factor out cxl range end to helper

2022-07-01 Thread Joao Martins
Move calculation of CXL memory region end to separate helper in preparation to allow pc_pci_hole64_start() to be called before any mrs are initialized. Cc: Jonathan Cameron Signed-off-by: Joao Martins --- hw/i386/pc.c | 31 +-- 1 file changed, 21 insertions(+), 10

[PATCH v6 04/10] i386/pc: factor out above-4g end to an helper

2022-07-01 Thread Joao Martins
There's a couple of places that seem to duplicate this calculation of RAM size above the 4G boundary. Move all those to a helper function. Signed-off-by: Joao Martins --- hw/i386/pc.c | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git

[PATCH v6 00/10] i386/pc: Fix creation of >= 1010G guests on AMD systems with IOMMU

2022-07-01 Thread Joao Martins
v5[6] -> v6: * Rebased to latest staging * Consider @cxl_base setting to also use above_4g_mem_start (Igor Mammedov) * Use 4 * GiB instead of raw hex (Igor Mammedov) * Delete @host_type (Igor Mammedov) * Rename to i440fx_dev to i440fx_host (Igor Mammedov) * Rebase on top of patch that removes

[PATCH v6 03/10] i386/pc: pass pci_hole64_size to pc_memory_init()

2022-07-01 Thread Joao Martins
Use the pre-initialized pci-host qdev and fetch the pci-hole64-size into pc_memory_init() newly added argument. piix needs a bit of care given all the !pci_enabled() and that the pci_hole64_size is private to i440fx. This is in preparation to determine that host-phys-bits are enough and for

Re: [PATCH v2] hw/nvme: Use ioeventfd to handle doorbell updates

2022-07-01 Thread Keith Busch
On Thu, Jun 30, 2022 at 11:22:31AM +0800, Jinhao Fan wrote: > +static int nvme_init_sq_ioeventfd(NvmeSQueue *sq) > +{ > +NvmeCtrl *n = sq->ctrl; > +uint16_t offset = sq->sqid << 3; > +int ret; > + > +ret = event_notifier_init(>notifier, 0); > +if (ret < 0) { > +return

[PATCH v6 02/10] i386/pc: create pci-host qdev prior to pc_memory_init()

2022-07-01 Thread Joao Martins
At the start of pc_memory_init() we usually pass a range of 0..UINT64_MAX as pci_memory, when really its 2G (i440fx) or 32G (q35). To get the real user value, we need to get pci-host passed property for default pci_hole64_size. Thus to get that, create the qdev prior to memory init to better make

[PATCH v6 01/10] hw/i386: add 4g boundary start to X86MachineState

2022-07-01 Thread Joao Martins
Rather than hardcoding the 4G boundary everywhere, introduce a X86MachineState field @above_4g_mem_start and use it accordingly. This is in preparation for relocating ram-above-4g to be dynamically start at 1T on AMD platforms. Signed-off-by: Joao Martins Reviewed-by: Igor Mammedov ---

[PATCH v2 2/3] Add zero-copy-copied migration stat

2022-07-01 Thread Leonardo Bras
Signed-off-by: Leonardo Bras --- qapi/migration.json | 5 - migration/migration.c | 1 + monitor/hmp-cmds.c| 4 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/qapi/migration.json b/qapi/migration.json index 7102e474a6..925f009868 100644 --- a/qapi/migration.json +++

[PATCH v2 3/3] migration/multifd: Warn user when zerocopy not working

2022-07-01 Thread Leonardo Bras
Some errors, like the lack of Scatter-Gather support by the network interface(NETIF_F_SG) may cause sendmsg(...,MSG_ZEROCOPY) to fail on using zero-copy, which causes it to fall back to the default copying mechanism. After each full dirty-bitmap scan there should be a zero-copy flush happening,

[PATCH v2 1/3] QIOChannelSocket: Fix zero-copy flush returning code 1 when nothing sent

2022-07-01 Thread Leonardo Bras
If flush is called when no buffer was sent with MSG_ZEROCOPY, it currently returns 1. This return code should be used only when Linux fails to use MSG_ZEROCOPY on a lot of sendmsg(). Fix this by returning early from flush if no sendmsg(...,MSG_ZEROCOPY) was attempted. Fixes: 2bc58ffc2926

[PATCH v2 0/3] Zero copy improvements (QIOChannel + multifd)

2022-07-01 Thread Leonardo Bras
The first patch avoid spuriously returning 1 [*] when zero-copy flush is attempted before any buffer was sent using MSG_ZEROCOPY. [*] zero-copy not being used, even though it's enabled and supported by kernel The second patch introduces a new migration stat (zero-copy-copied) that will be used

Re: [PATCH 03/12] pc-bios/s390-ccw/bootmap: Improve the guessing logic in zipl_load_vblk()

2022-07-01 Thread Eric Farman
On Tue, 2022-06-28 at 15:10 +0200, Thomas Huth wrote: > The logic of trying an final ISO or ECKD boot on virtio-block devices > is > very weird: Since the geometry hardly ever matches in > virtio_disk_is_scsi(), > virtio_blk_setup_device() always sets a "guessed" disk geometry via >

Re: [PATCH 02/12] pc-bios/s390-ccw/virtio: Introduce a macro for the DASD block size

2022-07-01 Thread Eric Farman
On Tue, 2022-06-28 at 15:21 +0200, Cornelia Huck wrote: > On Tue, Jun 28 2022, Thomas Huth wrote: > > > Use VIRTIO_DASD_BLOCK_SIZE instead of the magic value 4096. > > > > Signed-off-by: Thomas Huth > > --- > > pc-bios/s390-ccw/virtio.h| 1 + > > pc-bios/s390-ccw/virtio-blkdev.c | 2

Re: [PATCH 01/12] pc-bios/s390-ccw: Add a proper prototype for main()

2022-07-01 Thread Eric Farman
On Tue, 2022-06-28 at 15:10 +0200, Thomas Huth wrote: > Older versions of Clang complain if there is no prototype for main(). > Add one, and while we're at it, make sure that we use the same type > for main.c and netmain.c - since the return value does not matter, > declare the return type of

Re: [PATCH] qga: add command 'guest-get-cpustats'

2022-07-01 Thread Konstantin Kostiuk
On Fri, Jul 1, 2022 at 4:53 PM Marc-André Lureau wrote: > Hi > > On Fri, Jul 1, 2022 at 7:11 AM zhenwei pi wrote: > >> A vCPU thread always reaches 100% utilization when: >> - guest uses idle=poll >> - disable HLT vm-exit >> - enable MWAIT >> >> Add new guest agent command 'guest-get-cpustats'

Re: [PATCH] ebpf: replace deprecated bpf_program__set_socket_filter

2022-07-01 Thread Peter Maydell
On Wed, 8 Jun 2022 at 09:17, Jason Wang wrote: > > On Tue, May 31, 2022 at 1:40 PM Zhang, Chen wrote: > > > > > > > > > -Original Message- > > > From: Qemu-devel > > bounces+chen.zhang=intel@nongnu.org> On Behalf Of Haochen Tong > > > Sent: Saturday, May 28, 2022 3:07 AM > > > To:

Re: [PATCH] qga: add command 'guest-get-cpustats'

2022-07-01 Thread Marc-André Lureau
Hi On Fri, Jul 1, 2022 at 7:11 AM zhenwei pi wrote: > A vCPU thread always reaches 100% utilization when: > - guest uses idle=poll > - disable HLT vm-exit > - enable MWAIT > > Add new guest agent command 'guest-get-cpustats' to get guest CPU > statistics, we can know the guest workload and how

Re: [PULL 14/15] qdev: Base object creation on QDict rather than QemuOpts

2022-07-01 Thread Peter Maydell
On Fri, 15 Oct 2021 at 16:01, Kevin Wolf wrote: > QDicts are both what QMP natively uses and what the keyval parser > produces. Going through QemuOpts isn't useful for either one, so switch > the main device creation function to QDicts. By sharing more code with > the -object/object-add code

[PATCH RESEND 11/11] target/ppc: Implement slbiag

2022-07-01 Thread Lucas Coutinho
Reviewed-by: Leandro Lupori Signed-off-by: Lucas Coutinho --- target/ppc/helper.h | 1 + target/ppc/insn32.decode | 4 +++ target/ppc/mmu-hash64.c | 27 target/ppc/translate/storage-ctrl-impl.c.inc | 14

[PATCH RESEND 05/11] target/ppc: Move slbia to decodetree

2022-07-01 Thread Lucas Coutinho
Reviewed-by: Leandro Lupori Signed-off-by: Lucas Coutinho --- target/ppc/helper.h | 2 +- target/ppc/insn32.decode | 5 + target/ppc/mmu-hash64.c | 2 +- target/ppc/translate.c | 17 -

[PATCH RESEND 10/11] target/ppc: Move slbsync to decodetree

2022-07-01 Thread Lucas Coutinho
Reviewed-by: Leandro Lupori Signed-off-by: Lucas Coutinho --- target/ppc/insn32.decode | 2 ++ target/ppc/translate.c | 17 - target/ppc/translate/storage-ctrl-impl.c.inc | 14 ++ 3 files changed, 16 insertions(+), 17

[PATCH 16/17] tests: acpi: update expected blobs

2022-07-01 Thread Igor Mammedov
Expected change: +Device (SE8) +{ +Name (_ADR, 0x001D) // _ADR: Address +Name (ASUN, 0x1D) Method (_DSM, 4, Serialized) // _DSM: Device-Specific Method {

[PATCH] linux-user: Passthrough MADV_DONTNEED for certain file mappings

2022-07-01 Thread Ilya Leoshkevich
This is a follow-up for commit 892a4f6a750a ("linux-user: Add partial support for MADV_DONTNEED"), which added passthrough for anonymous mappings. File mappings can be handled in a similar manner. In order to do that, mark pages, for which mmap() was passed through, with PAGE_PASSTHROUGH, and

[PATCH RESEND 09/11] target/ppc: Move slbfee to decodetree

2022-07-01 Thread Lucas Coutinho
Reviewed-by: Leandro Lupori Signed-off-by: Lucas Coutinho --- target/ppc/helper.h | 2 +- target/ppc/insn32.decode | 2 ++ target/ppc/mmu-hash64.c | 2 +- target/ppc/translate.c | 26 ---

[PATCH 13/17] tests: acpi: update expected blobs

2022-07-01 Thread Igor Mammedov
Expected change: -Name (_SUN, 0x0X) // _SUN: Slot User Number Name (_ADR, 0xY) // _ADR: Address ... +Name (_SUN, 0xX) // _SUN: Slot User Number Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 14

[PATCH RESEND 06/11] target/ppc: Move slbmte to decodetree

2022-07-01 Thread Lucas Coutinho
Reviewed-by: Leandro Lupori Signed-off-by: Lucas Coutinho --- target/ppc/helper.h | 2 +- target/ppc/insn32.decode | 2 ++ target/ppc/mmu-hash64.c | 2 +- target/ppc/translate.c | 14 --

[PATCH RESEND 07/11] target/ppc: Move slbmfev to decodetree

2022-07-01 Thread Lucas Coutinho
Reviewed-by: Leandro Lupori Signed-off-by: Lucas Coutinho --- target/ppc/helper.h | 2 +- target/ppc/insn32.decode | 2 ++ target/ppc/mmu-hash64.c | 2 +- target/ppc/translate.c | 12

[PATCH 15/17] x86: pci: acpi: reorder Device's _DSM method

2022-07-01 Thread Igor Mammedov
align _DSM method in empty slot descriptor with a populated slot position. Expected change: +Device (SE8) +{ +Name (_ADR, 0x001D) // _ADR: Address +Name (ASUN, 0x1D) Method (_DSM, 4, Serialized) // _DSM:

[PATCH RESEND 08/11] target/ppc: Move slbmfee to decodetree

2022-07-01 Thread Lucas Coutinho
Reviewed-by: Leandro Lupori Signed-off-by: Lucas Coutinho --- target/ppc/helper.h | 2 +- target/ppc/insn32.decode | 1 + target/ppc/mmu-hash64.c | 2 +- target/ppc/translate.c | 13 -

[PATCH 14/17] tests: acpi: whitelist pc/q35 DSDT before moving _ADR field

2022-07-01 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..1983fa596b 100644 ---

[PATCH RESEND 02/11] target/ppc: add macros to check privilege level

2022-07-01 Thread Lucas Coutinho
From: Matheus Ferst Equivalent to CHK_SV and CHK_HV, but can be used in decodetree methods. Reviewed-by: Leandro Lupori Signed-off-by: Matheus Ferst Signed-off-by: Lucas Coutinho --- target/ppc/translate.c | 21 +

[PATCH RESEND 04/11] target/ppc: Move slbieg to decodetree

2022-07-01 Thread Lucas Coutinho
Reviewed-by: Leandro Lupori Signed-off-by: Lucas Coutinho --- target/ppc/helper.h | 2 +- target/ppc/insn32.decode | 1 + target/ppc/mmu-hash64.c | 2 +- target/ppc/translate.c | 13 -

[PATCH 05/17] acpi: x86: refactor PDSM method to reduce nesting

2022-07-01 Thread Igor Mammedov
.., it will help with code readability and make easier to extend method in followup patches Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 139 --- 1 file changed, 77 insertions(+), 62 deletions(-) diff --git a/hw/i386/acpi-build.c

[PATCH RESEND 03/11] target/ppc: Move slbie to decodetree

2022-07-01 Thread Lucas Coutinho
Reviewed-by: Leandro Lupori Signed-off-by: Lucas Coutinho --- target/ppc/helper.h | 2 +- target/ppc/insn32.decode | 7 +++ target/ppc/mmu-hash64.c | 2 +- target/ppc/translate.c | 13 -

[PATCH 06/17] x86: acpi: _DSM: use Package to pass parameters

2022-07-01 Thread Igor Mammedov
Numer of possible arguments to pass to a method is limited in ACPI. The following patches will need to pass over more parameters to PDSM method, will hit that limit. Prepare for this by passing structure (Package) to method, which let us workaround arguments limitation. Pass to PDSM all standard

[PATCH RESEND 00/11] target/ppc: Implement slbiag move slb* to decodetree

2022-07-01 Thread Lucas Coutinho
Resent after rebasing and fixing conflicts with master. Add Leandro Lupori as reviewer. Based-on: <20220624191424.190471-1-leandro.lup...@eldorado.org.br> Implement the following PowerISA v3.0 instuction: slbiag: SLB Invalidate All Global X-form Move the following PowerISA v3.0 instuction to

[PATCH RESEND 01/11] target/ppc: receive DisasContext explicitly in GEN_PRIV

2022-07-01 Thread Lucas Coutinho
From: Matheus Ferst GEN_PRIV and related CHK_* macros just assumed that variable named "ctx" would be in scope when they are used, and that it would be a pointer to DisasContext. Change these macros to receive the pointer explicitly. Reviewed-by: Leandro Lupori Signed-off-by: Matheus Ferst

[PATCH 08/17] tests: acpi: whitelist pc/q35 DSDT before switching _DSM to use ASUN

2022-07-01 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..1983fa596b 100644 ---

[PATCH 17/17] x86: pci: acpi: deduplate PCI slots creation

2022-07-01 Thread Igor Mammedov
No functional change nor AML bytcode change. Consolidate code that generates empty and populated slots descriptors. Beside of eliminating duplication, it helps to consolidate conditions for generating parts of Device{} desriptor in one place, which makes code more compact and easier to read.

[PATCH 11/17] tests: acpi: whitelist pc/q35 DSDT before moving _ADR field

2022-07-01 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 14 ++ 1 file changed, 14 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..1983fa596b 100644 ---

[PATCH 09/17] x86: acpi: cleanup PCI device _DSM duplication

2022-07-01 Thread Igor Mammedov
add ASUN variable to hotpluggable slots and use it instead of _SUN which has the same value to reuse _DMS code on both branches (hot- and non-hotpluggable). No functional change. Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 56 +--- 1 file

[PATCH 03/17] tests: acpi: update expected blobs after HPET move

2022-07-01 Thread Igor Mammedov
HPET AML moved after PCI host bridge description (no functional change) diff example for PC machine: @@ -54,47 +54,6 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC", 0x0001) } } -Scope (_SB) -{ -Device (HPET) -{ -Name (_HID, EisaId

[PATCH 12/17] x86: pci: acpi: reorder Device's _ADR and _SUN fields

2022-07-01 Thread Igor Mammedov
no functional change, align order of fields in empty slot descriptor with a populated slot ordering. Expected diff: -Name (_SUN, 0x0X) // _SUN: Slot User Number Name (_ADR, 0xY) // _ADR: Address ... +Name (_SUN, 0xX) // _SUN: Slot User

[PATCH 07/17] tests: acpi: update expected blobs

2022-07-01 Thread Igor Mammedov
An intermediate blobs update to keep changes (last 2 patches) reviewable. Includes refactored PDSM that uses Package argument for custom parameters. = PDSM taking package as arguments Return (Local0) } -Method (PDSM, 6, Serialized) +Method (PDSM, 5,

[PATCH 10/17] tests: acpi: update expected blobs

2022-07-01 Thread Igor Mammedov
It's expected that hotpluggable slots will, get ASUN variable and use that instead of _SUN with its _DSM method. For example: @@ -979,8 +979,9 @@ DefinitionBlock ("", "DSDT", 1, "BOCHS ", "BXPC", 0x0001) Device (S18) { -Name (_SUN,

[PATCH 02/17] acpi: x86: deduplicate HPET AML building

2022-07-01 Thread Igor Mammedov
HPET AML doesn't depend on piix4 nor q35, move code buiding it to common scope to avoid duplication. Signed-off-by: Igor Mammedov --- hw/i386/acpi-build.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/hw/i386/acpi-build.c b/hw/i386/acpi-build.c index

[PATCH 04/17] tests: acpi: whitelist pc/q35 DSDT due to HPET AML move

2022-07-01 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 34 + 1 file changed, 34 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..452145badd 100644 ---

[PATCH 01/17] tests: acpi: whitelist pc/q35 DSDT due to HPET AML move

2022-07-01 Thread Igor Mammedov
Signed-off-by: Igor Mammedov --- tests/qtest/bios-tables-test-allowed-diff.h | 32 + 1 file changed, 32 insertions(+) diff --git a/tests/qtest/bios-tables-test-allowed-diff.h b/tests/qtest/bios-tables-test-allowed-diff.h index dfb8523c8b..a7aa428fab 100644 ---

[PATCH 00/17] acpi:pc/q35: minor PCI refactoring/cleanups

2022-07-01 Thread Igor Mammedov
Flushing out ACPI PCI cleanups that preceed conversion of DSDT PCI slots ennumeration to AcpiDevAmlIf interface. It's is mostly collection of patches thraet removes code duplication, we've accumulated around PCI relaterd AML in DSDT. git: https://gitlab.com/imammedo/qemu.git x86_pci_cleanups

[PATCH 3/3] hw/cxl: Fix size of constant in interleave granularity function.

2022-07-01 Thread Jonathan Cameron via
Whilst the interleave granularity is always small enough that this isn't a real problem (much less than 4GiB) let's change the constant to ULL to fix the coverity warning. Reported-by: Peter Maydell Fixes: 829de299d1 ("hw/cxl/component: Add utils for interleave parameter encoding/decoding")

[PATCH 1/3] hw/machine: Clear out left over CXL related pointer from move of state handling to machines.

2022-07-01 Thread Jonathan Cameron via
This got left behind in the move of the CXL setup code from core files to the machines that support it. Link: https://gitlab.com/qemu-project/qemu/-/commit/1ebf9001fb2701e3c00b401334c8f3900a46adaa Signed-off-by: Jonathan Cameron --- include/hw/boards.h | 1 - 1 file changed, 1 deletion(-)

[PATCH 2/3] hw/i386/pc: Always place CXL Memory Regions after device_memory

2022-07-01 Thread Jonathan Cameron via
Previously broken_reserved_end was taken into account, but Igor Mammedov identified that this could lead to a clash between potential RAM being mapped in the region and CXL usage. Hence always add the size of the device_memory memory region. This only affects the case where the

[PATCH 0/3] hw/cxl, hw/machine, hw/i386: Misc minor fixes / cleanup

2022-07-01 Thread Jonathan Cameron via
Three more or less less unrelated fixes for recently added CXL code. Jonathan Cameron (3): hw/machine: Clear out left over CXL related pointer from move of state handling to machines. hw/i386/pc: Always place CXL Memory Regions after device_memory hw/cxl: Fix size of constant in

Re: [PATCH 1/2] hw: m25p80: Add Block Protect and Top Bottom bits for write protect

2022-07-01 Thread Francisco Iglesias
On [2022 Jul 01] Fri 14:23:17, Cédric Le Goater wrote: > On 7/1/22 13:40, Francisco Iglesias wrote: > > Hi Iris, > > > > Looks good, a couple of minor comments below! > > > > On [2022 Jun 27] Mon 11:52:33, Iris Chen wrote: > > > Signed-off-by: Iris Chen > > > --- > > > hw/block/m25p80.c | 74

Re: [PATCH v4 15/45] target/arm: Add SME enablement checks

2022-07-01 Thread Peter Maydell
On Tue, 28 Jun 2022 at 05:32, Richard Henderson wrote: > > These functions will be used to verify that the cpu > is in the correct state for a given instruction. > > Signed-off-by: Richard Henderson > --- Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v4 16/45] target/arm: Handle SME in sve_access_check

2022-07-01 Thread Peter Maydell
On Tue, 28 Jun 2022 at 05:39, Richard Henderson wrote: > > The pseudocode for CheckSVEEnabled gains a check for Streaming > SVE mode, and for SME present but SVE absent. > > Signed-off-by: Richard Henderson > --- > target/arm/translate-a64.c | 22 -- > 1 file changed, 16

API to change the vendor of IDE disk

2022-07-01 Thread Alex
Dear Qemu Genius This is zaifeng (wzf_develo...@foxmail.com) (WeChat ID: QemuKVM). Yes, I am a cloud engineer. (๑•̀ㅂ•́)و✧ MayIaskyousomequestionsaboutQemu? Here is the problem: If you use IDE disk on a Windows VM, "QEMU HARDDISK" could be found from device

Re: [libvirt PATCH v2] tools: add virt-qmp-proxy for proxying QMP clients to libvirt QEMU guests

2022-07-01 Thread Michal Prívozník
On 6/20/22 19:19, Daniel P. Berrangé wrote: > Libvirt provides QMP passthrough APIs for the QEMU driver and these are > exposed in virsh. It is not especially pleasant, however, using the raw > QMP JSON syntax. QEMU has a tool 'qmp-shell' which can speak QMP and > exposes a human friendly

Re: [PATCH v4 14/45] target/arm: Mark LD1RO as non-streaming

2022-07-01 Thread Peter Maydell
On Tue, 28 Jun 2022 at 05:49, Richard Henderson wrote: > > Mark these as a non-streaming instructions, which should trap > if full a64 support is not enabled in streaming mode. > > Signed-off-by: Richard Henderson > --- > target/arm/sme-fa64.decode | 3 --- > target/arm/translate-sve.c | 2 ++ >

Re: venv for python qtest bits? (was: Re: [PATCH 11/12] acpi/tests/bits: add README file for bits qtests)

2022-07-01 Thread Michael S. Tsirkin
On Fri, Jul 01, 2022 at 03:44:32PM +0530, Ani Sinha wrote: > but I thought you were suggesting we built bits every time the test is run? In my opinion 3 scenarios are worth supporting: - people not touching ACPI, including users - simply don't run the tests, comparing tables with expected

Re: [PATCH v4 13/45] target/arm: Mark LDFF1 and LDNF1 as non-streaming

2022-07-01 Thread Peter Maydell
On Tue, 28 Jun 2022 at 05:28, Richard Henderson wrote: > > Mark these as a non-streaming instructions, which should trap > if full a64 support is not enabled in streaming mode. > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH 2/2] target/riscv: Ibex: Support priv version 1.11

2022-07-01 Thread Bin Meng
On Thu, Jun 30, 2022 at 7:31 AM Alistair Francis wrote: > > From: Alistair Francis > > The Ibex CPU supports version 1.11 of the priv spec [1], so let's > correct that in QEMU as well. > > 1: https://ibex-core.readthedocs.io/en/latest/01_overview/compliance.html > > Signed-off-by: Alistair

Re: [PATCH 1/2] target/riscv: Fixup MSECCFG minimum priv check

2022-07-01 Thread Bin Meng
On Thu, Jun 30, 2022 at 7:31 AM Alistair Francis wrote: > > From: Alistair Francis > > There is nothing in the RISC-V spec that mandates version 1.12 is > required for ePMP and there is currently hardware [1] that implements > ePMP (a draft version though) with the 1.11 priv spec. > > 1:

Re: [PATCH v4 12/45] target/arm: Mark gather prefetch as non-streaming

2022-07-01 Thread Peter Maydell
On Tue, 28 Jun 2022 at 05:42, Richard Henderson wrote: > > Mark these as a non-streaming instructions, which should trap if full > a64 support is not enabled in streaming mode. In this case, introduce > PRF_ns (prefetch non-streaming) to handle the checks. > > Signed-off-by: Richard Henderson >

Re: [PATCH v4 11/45] target/arm: Mark gather/scatter load/store as non-streaming

2022-07-01 Thread Peter Maydell
On Tue, 28 Jun 2022 at 05:38, Richard Henderson wrote: > > Mark these as a non-streaming instructions, which should trap > if full a64 support is not enabled in streaming mode. > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v4 10/45] target/arm: Mark string/histo/crypto as non-streaming

2022-07-01 Thread Peter Maydell
On Tue, 28 Jun 2022 at 05:35, Richard Henderson wrote: > > Mark these as a non-streaming instructions, which should trap stray "a". > if full a64 support is not enabled in streaming mode. > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH 1/2] hw: m25p80: Add Block Protect and Top Bottom bits for write protect

2022-07-01 Thread Cédric Le Goater
On 7/1/22 13:40, Francisco Iglesias wrote: Hi Iris, Looks good, a couple of minor comments below! On [2022 Jun 27] Mon 11:52:33, Iris Chen wrote: Signed-off-by: Iris Chen --- hw/block/m25p80.c | 74 +++ 1 file changed, 62 insertions(+), 12

Re: [PATCH v4 09/45] target/arm: Mark SMMLA, UMMLA, USMMLA as non-streaming

2022-07-01 Thread Peter Maydell
On Tue, 28 Jun 2022 at 05:25, Richard Henderson wrote: > > Mark these as a non-streaming instructions, which should trap > if full a64 support is not enabled in streaming mode. > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v4 08/45] target/arm: Mark FTSMUL, FTMAD, FADDA as non-streaming

2022-07-01 Thread Peter Maydell
On Tue, 28 Jun 2022 at 05:28, Richard Henderson wrote: > > Mark these as a non-streaming instructions, which should trap > if full a64 support is not enabled in streaming mode. > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v4 07/45] target/arm: Mark PMULL, FMMLA as non-streaming

2022-07-01 Thread Peter Maydell
On Tue, 28 Jun 2022 at 05:28, Richard Henderson wrote: > > Mark these as a non-streaming instructions, which should trap > if full a64 support is not enabled in streaming mode. > > Signed-off-by: Richard Henderson > --- > target/arm/sme-fa64.decode | 2 -- > target/arm/translate-sve.c | 18

Re: [PATCH v4 06/45] target/arm: Mark BDEP, BEXT, BGRP, COMPACT, FEXPA, FTSSEL as non-streaming

2022-07-01 Thread Peter Maydell
On Tue, 28 Jun 2022 at 05:28, Richard Henderson wrote: > > Mark these as a non-streaming instructions, which should trap > if full a64 support is not enabled in streaming mode. > > Signed-off-by: Richard Henderson > --- > target/arm/sme-fa64.decode | 3 --- > target/arm/translate-sve.c | 22

Re: [PATCH 1/2] hw: m25p80: Add Block Protect and Top Bottom bits for write protect

2022-07-01 Thread Francisco Iglesias
Hi Iris, Looks good, a couple of minor comments below! On [2022 Jun 27] Mon 11:52:33, Iris Chen wrote: > Signed-off-by: Iris Chen > --- > hw/block/m25p80.c | 74 +++ > 1 file changed, 62 insertions(+), 12 deletions(-) > > diff --git

Re: [PATCH v4 05/45] target/arm: Mark RDFFR, WRFFR, SETFFR as non-streaming

2022-07-01 Thread Peter Maydell
On Tue, 28 Jun 2022 at 05:26, Richard Henderson wrote: > > Mark these as a non-streaming instructions, which should trap > if full a64 support is not enabled in streaming mode. > > Signed-off-by: Richard Henderson Reviewed-by: Peter Maydell thanks -- PMM

Re: [PATCH v4 04/45] target/arm: Mark ADR as non-streaming

2022-07-01 Thread Peter Maydell
On Tue, 28 Jun 2022 at 05:26, Richard Henderson wrote: > > Mark ADR as a non-streaming instruction, which should trap > if full a64 support is not enabled in streaming mode. > > Removing entries from sme-fa64.decode is an easy way to see > what remains to be done. > > Signed-off-by: Richard

  1   2   >