[PATCH v4 0/2] x86/sev: Measured Linux SEV guest with kernel/initrd/cmdline

2021-09-29 Thread Dov Murik
Currently booting with -kernel/-initrd/-append is not supported in SEV confidential guests, because the content of these blobs is not measured and therefore not trusted by the SEV guest. However, in some cases the kernel, initrd, and cmdline are not secret but should not be modified by the host.

[PATCH v4 2/2] x86/sev: generate SEV kernel loader hashes in x86_load_linux

2021-09-29 Thread Dov Murik
If SEV is enabled and a kernel is passed via -kernel, pass the hashes of kernel/initrd/cmdline in an encrypted guest page to OVMF for SEV measured boot. Co-developed-by: James Bottomley Signed-off-by: James Bottomley Signed-off-by: Dov Murik Reviewed-by: Daniel P. Berrangé --- hw/i386/x86.c |

[PATCH v4 1/2] sev/i386: Introduce sev_add_kernel_loader_hashes for measured linux boot

2021-09-29 Thread Dov Murik
Add the sev_add_kernel_loader_hashes function to calculate the hashes of the kernel/initrd/cmdline and fill a designated OVMF encrypted hash table area. For this to work, OVMF must support an encrypted area to place the data which is advertised via a special GUID in the OVMF reset table. The hash

[Bug 1945540] Re: Java crashes on s390x VM with SIGILL/ILL_PRVOPC at '__kernel_getcpu+0x8'

2021-09-29 Thread Thomas Huth
There were some fixes in QEMU v6.1. Please try that one to see whether it solves your problem, too. ** Project changed: qemu => qemu (Ubuntu) -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1945540 Ti

[PULL 43/44] MAINTAINERS: Add information for OpenPIC

2021-09-29 Thread David Gibson
The OpenPIC interrupt controller was once the de facto standard on ppc machines. In qemu it's now only used on some Macintosh and the Freescale e500 machine. It has no listed maintainer, and as far as I know, no-one who's really familiar with it any more. Since I'm moving away from the area, I n

Re: [RFC PATCH 1/1] hw: aspeed_adc: Add initial Aspeed ADC support

2021-09-29 Thread Cédric Le Goater
Hello Peter, If you run ./scripts/get_maintainer.pl on the patch, it will build the list of persons and mailing list to send to. On 9/30/21 02:42, p...@fb.com wrote: From: Peter Delevoryas This change sets up Aspeed SoC ADC emulation, so that most ADC drivers will pass the initialization sequ

[PULL 35/44] hw/intc: openpic: Drop Raven related codes

2021-09-29 Thread David Gibson
From: Bin Meng There is no machine that uses Motorola MCP750 (aka Raven) model. Drop the related codes. While we are here, drop the mentioning of Intel GW80314 I/O companion chip in the comments as it has been obsolete for years, and correct a typo too. Signed-off-by: Bin Meng Message-Id: <202

[PULL 38/44] spapr/xive: Fix kvm_xive_source_reset trace event

2021-09-29 Thread David Gibson
From: Cédric Le Goater The trace event was placed in the wrong routine. Move it under kvmppc_xive_source_reset_one(). Fixes: 4e960974d4ee ("xive: Add trace events") Signed-off-by: Cédric Le Goater Message-Id: <20210922070205.1235943-1-...@kaod.org> Reviewed-by: Greg Kurz Signed-off-by: David G

Re: [PATCH v3 0/3] monitor: Rate-limit MEMORY_DEVICE_SIZE_CHANGE qapi events per device

2021-09-29 Thread Markus Armbruster
David Hildenbrand writes: > Some fixes for virtio-mem-pci, to properly handle MEMORY_DEVICE_SIZE_CHANGE > events, especially not dropping events of some devices when rate-limiting. Series Reviewed-by: Markus Armbruster

[PULL 34/44] hw/intc: openpic: Correct the reset value of IPIDR for FSL chipset

2021-09-29 Thread David Gibson
From: Bin Meng The reset value of IPIDR should be zero for Freescale chipset, per the following 2 manuals I checked: - P2020RM (https://www.nxp.com/webapp/Download?colCode=P2020RM) - P4080RM (https://www.nxp.com/webapp/Download?colCode=P4080RM) Currently it is set to 1, which leaves the IPI ena

[PULL 44/44] MAINTAINERS: Demote sPAPR from "Supported" to "Maintained"

2021-09-29 Thread David Gibson
qemu/KVM on Power is no longer my primary job responsibility, nor Greg Kurz'. I still have some time for upstream maintenance, but it's no longer accurate to say that I'm paid to do so. Therefore, reduce sPAPR (the "pseries" machine type) from Supported to Maintained. Signed-off-by: David Gibson

[PULL 33/44] target/ppc: Fix 64-bit decrementer

2021-09-29 Thread David Gibson
From: Cédric Le Goater The current way the mask is built can overflow with a 64-bit decrementer. Use sextract64() to extract the signed values and remove the logic to handle negative values which has become useless. Cc: Luis Fernando Fujita Pires Fixes: a8dafa525181 ("target/ppc: Implement larg

[PULL 28/44] spapr_numa.c: rename numa_assoc_array to FORM1_assoc_array

2021-09-29 Thread David Gibson
From: Daniel Henrique Barboza Introducing a new NUMA affinity, FORM2, requires a new mechanism to switch between affinity modes after CAS. Also, we want FORM2 data structures and functions to be completely separated from the existing FORM1 code, allowing us to avoid adding new code that inherits

[PULL 41/44] MAINTAINERS: Orphan obscure ppc platforms

2021-09-29 Thread David Gibson
There are a nunber of old embedded ppc machine types which have been little changed and in "Odd Fixes" state for a long time. With both myself and Greg Kurz moving toward other areas, we no longer have the capacity to keep reviewing and maintaining even the rare patches that come in for those plat

[PULL 30/44] spapr_numa.c: FORM2 NUMA affinity support

2021-09-29 Thread David Gibson
From: Daniel Henrique Barboza The main feature of FORM2 affinity support is the separation of NUMA distances from ibm,associativity information. This allows for a more flexible and straightforward NUMA distance assignment without relying on complex associations between several levels of NUMA via

[PULL 42/44] MAINTAINERS: Remove David & Greg as reviewers/co-maintainers of powernv

2021-09-29 Thread David Gibson
With our interests moving to other areas, Greg and myself no longer have capacity to be regular reviewers of code for the powernv machine type, let alone co-maintainers. Additionally, not being IBM employees, we don't have easy access to the hardware information we'd need for good review. Therefo

[PULL 32/44] target/ppc: Convert debug to trace events (decrementer and IRQ)

2021-09-29 Thread David Gibson
From: Cédric Le Goater Signed-off-by: Cédric Le Goater Message-Id: <20210920061203.989563-4-...@kaod.org> Signed-off-by: David Gibson --- hw/ppc/ppc.c| 169 hw/ppc/trace-events | 22 +- 2 files changed, 82 insertions(+), 109 deletions(-

[PULL 37/44] spapr_numa.c: fixes in spapr_numa_FORM2_write_rtas_tables()

2021-09-29 Thread David Gibson
From: Daniel Henrique Barboza This patch has a handful of modifications for the recent added FORM2 support: - to not allocate more than the necessary size in 'distance_table'. At this moment the array is oversized due to allocating uint32_t for all elements, when most of them fits in an uint8_t.

[PULL 36/44] hw/intc: openpic: Clean up the styles

2021-09-29 Thread David Gibson
From: Bin Meng Correct the multi-line comment format. No functional changes. Signed-off-by: Bin Meng Message-Id: <20210918032653.646370-3-bin.m...@windriver.com> Signed-off-by: David Gibson --- hw/intc/openpic.c| 55 +--- include/hw/ppc/openpic.h |

[PULL 40/44] MAINTAINERS: Remove David & Greg as reviewers for a number of boards

2021-09-29 Thread David Gibson
Greg and I are moving towards other areas and no longer have capacity to act as regular reviewers for several of the secondary ppc machine types. So, remove ourselves as reviewers for Macintosh, PReP, sam460ex and pegasos2 in MAINTAINERS. Signed-off-by: David Gibson Reviewed-by: Greg Kurz Acked-

[PULL 29/44] spapr: move FORM1 verifications to post CAS

2021-09-29 Thread David Gibson
From: Daniel Henrique Barboza FORM2 NUMA affinity is prepared to deal with empty (memory/cpu less) NUMA nodes. This is used by the DAX KMEM driver to locate a PAPR SCM device that has a different latency than the original NUMA node from the regular memory. FORM2 is also able to deal with asymmet

[PULL 21/44] target/ppc: Convert debug to trace events (exceptions)

2021-09-29 Thread David Gibson
From: Cédric Le Goater Signed-off-by: Cédric Le Goater Message-Id: <20210920061203.989563-2-...@kaod.org> Signed-off-by: David Gibson --- target/ppc/excp_helper.c | 38 ++ target/ppc/trace-events | 8 2 files changed, 18 insertions(+), 28 deletion

[PULL 27/44] spapr_numa.c: parametrize FORM1 macros

2021-09-29 Thread David Gibson
From: Daniel Henrique Barboza The next preliminary step to introduce NUMA FORM2 affinity is to make the existing code independent of FORM1 macros and values, i.e. MAX_DISTANCE_REF_POINTS, NUMA_ASSOC_SIZE and VCPU_ASSOC_SIZE. This patch accomplishes that by doing the following: - move the NUMA re

[PULL 39/44] MAINTAINERS: Remove machine specific files from ppc TCG CPUs entry

2021-09-29 Thread David Gibson
Currently the PowerPC TCG CPUs entry in MAINTAINERS lists all of hw/ppc/ and include/hw/ppc. Nearly all the files in those places are related to specific ppc machine types, rather than to the actual CPUs however. Those machine types list their own files separately, often overlapping with this. Fo

[PULL 26/44] spapr_numa.c: scrap 'legacy_numa' concept

2021-09-29 Thread David Gibson
From: Daniel Henrique Barboza When first introduced, 'legacy_numa' was a way to refer to guests that either wouldn't be affected by associativity domain calculations, namely the ones with only 1 NUMA node, and pre 5.2 guests that shouldn't be affected by it because it would be an userspace change

[PULL 19/44] spapr: use DEVICE_UNPLUG_GUEST_ERROR to report unplug errors

2021-09-29 Thread David Gibson
From: Daniel Henrique Barboza Linux Kernel 5.12 is now unisolating CPU DRCs in the device_removal error path, signalling that the hotunplug process wasn't successful. This allow us to send a DEVICE_UNPLUG_GUEST_ERROR in drc_unisolate_logical() to signal this error to the management layer. We als

[PULL 15/44] spapr.c: handle dev->id in spapr_memory_unplug_rollback()

2021-09-29 Thread David Gibson
From: Daniel Henrique Barboza As done in hw/acpi/memory_hotplug.c, pass an empty string if dev->id is NULL to qapi_event_send_mem_unplug_error() to avoid relying on a behavior that can be changed in the future. Suggested-by: Markus Armbruster Reviewed-by: Greg Kurz Reviewed-by: David Gibson R

[PULL 31/44] spapr_numa.c: handle auto NUMA node with no distance info

2021-09-29 Thread David Gibson
From: Daniel Henrique Barboza numa_complete_configuration() in hw/core/numa.c always adds a NUMA node for the pSeries machine if none was specified, but without node distance information for the single node created. NUMA FORM1 affinity code didn't rely on numa_state information to do its job, bu

[PULL 23/44] target/ppc: add LPCR[HR] to DisasContext and hflags

2021-09-29 Thread David Gibson
From: Matheus Ferst Add a Host Radix field (hr) in DisasContext with LPCR[HR] value to allow us to decide between Radix and HPT while validating instructions arguments. Note that PowerISA v3.1 does not require LPCR[HR] and PATE.HR to match if the thread is in ultravisor/hypervisor real addressing

[PULL 14/44] memory_hotplug.c: handle dev->id = NULL in acpi_memory_hotplug_write()

2021-09-29 Thread David Gibson
From: Daniel Henrique Barboza qapi_event_send_mem_unplug_error() deals with @device being NULL by replacing it with an empty string ("") when emitting the event. Aside from the fact that this behavior (qapi visitor mapping NULL pointer to "") can be patched/changed someday, there's also the lack

[PULL 17/44] qapi/qdev.json: fix DEVICE_DELETED parameters doc

2021-09-29 Thread David Gibson
From: Daniel Henrique Barboza Clarify that @device is optional and that 'path' is the device path from QOM. This change follows Markus' suggestion verbatim, provided in full context here: https://lists.gnu.org/archive/html/qemu-devel/2021-07/msg01891.html Suggested-by: Markus Armbruster Revie

[PULL 08/44] ppc/xive: Export priority_to_ipb() helper

2021-09-29 Thread David Gibson
From: Cédric Le Goater Signed-off-by: Cédric Le Goater Message-Id: <20210901094153.227671-7-...@kaod.org> Signed-off-by: David Gibson --- hw/intc/xive.c| 21 ++--- include/hw/ppc/xive.h | 11 +++ 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/h

[PULL 16/44] spapr_drc.c: do not error_report() when drc->dev->id == NULL

2021-09-29 Thread David Gibson
From: Daniel Henrique Barboza The error_report() call in drc_unisolate_logical() is not considering that drc->dev->id can be NULL, and the underlying functions error_report() calls to do its job (vprintf(), g_strdup_printf() ...) has undefined behavior when trying to handle "%s" with NULL argumen

[PULL 24/44] target/ppc: Check privilege level based on PSR and LPCR[HR] in tlbie[l]

2021-09-29 Thread David Gibson
From: Matheus Ferst PowerISA v3.0B made tlbie[l] hypervisor privileged when PSR=0 and HR=1. To allow the check at translation time, we'll use the HR bit of LPCR to check the MMU mode instead of the PATE.HR. Signed-off-by: Matheus Ferst Message-Id: <20210917114751.206845-3-matheus.fe...@eldorado

[PULL 06/44] ppc/pnv: Add a comment on the "primary-topology-index" property

2021-09-29 Thread David Gibson
From: Cédric Le Goater On P10, the chip id is calculated from the "Primary topology table index". See skiboot commits for more information [1]. This information is extracted from the hdata on real systems which QEMU needs to emulate. Add this property for all machines even if it is only used on

[PULL 20/44] memory_hotplug.c: send DEVICE_UNPLUG_GUEST_ERROR in acpi_memory_hotplug_write()

2021-09-29 Thread David Gibson
From: Daniel Henrique Barboza MEM_UNPLUG_ERROR is deprecated since the introduction of DEVICE_UNPLUG_GUEST_ERROR. Keep emitting both while the deprecation of MEM_UNPLUG_ERROR is pending. CC: Michael S. Tsirkin CC: Igor Mammedov Acked-by: Michael S. Tsirkin Reviewed-by: Greg Kurz Reviewed-by:

[PULL 13/44] target/ppc: fix setting of CR flags in bcdcfsq

2021-09-29 Thread David Gibson
From: Luis Pires According to the ISA, CR should be set based on the source value, and not on the packed decimal result. The way this was implemented would cause GT, LT and EQ to be set incorrectly when the source value was too large and the 31 least significant digits of the packed decimal resul

[PULL 22/44] target/ppc: Replace debug messages by asserts for unknown IRQ pins

2021-09-29 Thread David Gibson
From: Cédric Le Goater If an unknown pin of the IRQ controller is raised, something is very wrong in the QEMU model. It is better to abort. Signed-off-by: Cédric Le Goater Message-Id: <20210920061203.989563-3-...@kaod.org> Signed-off-by: David Gibson --- hw/ppc/ppc.c | 24 ++--

[PULL 10/44] ppc/pnv: Rename "id" to "quad-id" in PnvQuad

2021-09-29 Thread David Gibson
From: Cédric Le Goater This to avoid possible conflicts with the "id" property of QOM objects. Signed-off-by: Cédric Le Goater Message-Id: <20210901094153.227671-9-...@kaod.org> Signed-off-by: David Gibson --- hw/ppc/pnv.c | 4 ++-- hw/ppc/pnv_core.c | 4 ++-- include/hw/

[PULL 18/44] qapi/qdev.json: add DEVICE_UNPLUG_GUEST_ERROR QAPI event

2021-09-29 Thread David Gibson
From: Daniel Henrique Barboza At this moment we only provide one event to report a hotunplug error, MEM_UNPLUG_ERROR. As of Linux kernel 5.12 and QEMU 6.0.0, the pseries machine is now able to report unplug errors for other device types, such as CPUs. Instead of creating a (device_type)_UNPLUG_E

[PULL 09/44] ppc/xive: Export xive_tctx_word2() helper

2021-09-29 Thread David Gibson
From: Cédric Le Goater Signed-off-by: Cédric Le Goater Message-Id: <20210901094153.227671-8-...@kaod.org> Signed-off-by: David Gibson --- hw/intc/xive.c| 5 - include/hw/ppc/xive.h | 5 + 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hw/intc/xive.c b/hw/intc/xi

[PULL 07/44] ppc/pnv: Remove useless variable

2021-09-29 Thread David Gibson
From: Cédric Le Goater Signed-off-by: Cédric Le Goater Message-Id: <20210901094153.227671-5-...@kaod.org> Signed-off-by: David Gibson --- hw/ppc/pnv.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index 2f5358b70c..a62e90b15e 100644 ---

[PULL 12/44] ppc/pnv: Add an assert when calculating the RAM distribution on chips

2021-09-29 Thread David Gibson
From: Cédric Le Goater Signed-off-by: Cédric Le Goater Message-Id: <20210902130928.528803-3-...@kaod.org> Reviewed-by: Greg Kurz Signed-off-by: David Gibson --- hw/ppc/pnv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hw/ppc/pnv.c b/hw/ppc/pnv.c index 03c86508d2..71e45515f1 100644 -

[PULL 03/44] host-utils: introduce uabs64()

2021-09-29 Thread David Gibson
From: Luis Pires Introduce uabs64(), a function that returns the absolute value of a 64-bit int as an unsigned value. This avoids the undefined behavior for common abs implementations, where abs of the most negative value is undefined. Signed-off-by: Luis Pires Reviewed-by: Richard Henderson R

[PULL 02/44] host-utils: fix missing zero-extension in divs128

2021-09-29 Thread David Gibson
From: Luis Pires *plow (lower 64 bits of the dividend) is passed into divs128() as a signed 64-bit integer. When building an __int128_t from it, it must be zero-extended, instead of sign-extended. Suggested-by: Richard Henderson Signed-off-by: Luis Pires Message-Id: <20210910112624.72748-3-lui

[PULL 11/44] docs/system: ppc: Update the URL for OpenPOWER firmware images

2021-09-29 Thread David Gibson
From: Cédric Le Goater This also fixes a small skiboot/skiroot typo and removes the links to the specific POWER8 and POWER9 images since the firmware images can be used to run all machines. Signed-off-by: Cédric Le Goater Message-Id: <20210902130928.528803-2-...@kaod.org> Reviewed-by: Greg Kurz

[PULL 25/44] spapr_numa.c: split FORM1 code into helpers

2021-09-29 Thread David Gibson
From: Daniel Henrique Barboza The upcoming FORM2 NUMA affinity will support asymmetric NUMA topologies and doesn't need be concerned with all the legacy support for older pseries FORM1 guests. We're also not going to calculate associativity domains based on numa distance (via spapr_numa_define_a

[PULL 00/44] ppc-for-6.2 queue 20210930

2021-09-29 Thread David Gibson
The following changes since commit 6b54a31bf7b403672a798b6443b1930ae6c74dea: Merge remote-tracking branch 'remotes/jsnow-gitlab/tags/python-pull-request' into staging (2021-09-28 13:07:32 +0100) are available in the Git repository at: https://gitlab.com/dgibson/qemu.git tags/ppc-for-6.2-202

[PULL 05/44] ppc/spapr: Add a POWER10 DD2 CPU

2021-09-29 Thread David Gibson
From: Cédric Le Goater Signed-off-by: Cédric Le Goater Message-Id: <20210901094153.227671-3-...@kaod.org> Reviewed-by: Greg Kurz Signed-off-by: David Gibson --- hw/ppc/spapr_cpu_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/ppc/spapr_cpu_core.c b/hw/ppc/spapr_cpu_core.c index

[PULL 04/44] i386/kvm: Replace abs64() with uabs64() from host-utils

2021-09-29 Thread David Gibson
From: Luis Pires Drop abs64() and use uabs64() from host-utils, which avoids an undefined behavior when taking abs of the most negative value. Signed-off-by: Luis Pires Reviewed-by: Richard Henderson Reviewed-by: Eduardo Habkost Message-Id: <20210910112624.72748-5-luis.pi...@eldorado.org.br>

[PULL 01/44] host-utils: Fix overflow detection in divu128()

2021-09-29 Thread David Gibson
From: Luis Pires The previous code didn't detect overflows if the high 64-bit of the dividend were equal to the 64-bit divisor. In that case, 64 bits wouldn't be enough to hold the quotient. Signed-off-by: Luis Pires Reviewed-by: Richard Henderson Message-Id: <20210910112624.72748-2-luis.pi...

TCG Floating Point Support (Work in Progress)

2021-09-29 Thread Matt
Hello-- I'm excited to share that I have been developing support for TCG floating point operations; specifically, to accelerate emulation of x86 guest code which heavily exercises the x87 FPU for a game console emulator project based on QEMU. So far, this work has shown great promise, demonstratin

Re: [PATCH v5] Prevent vhost-user-blk-test hang

2021-09-29 Thread Raphael Norwitz
On Tue, Sep 28, 2021 at 10:55:00AM +0200, Stefan Hajnoczi wrote: > On Mon, Sep 27, 2021 at 05:17:01PM +, Raphael Norwitz wrote: > > In the vhost-user-blk-test, as of now there is nothing stoping > > vhost-user-blk in QEMU writing to the socket right after forking off the > > storage daemon befo

[Bug 1945540] Re: Java crashes on s390x VM with SIGILL/ILL_PRVOPC at '__kernel_getcpu+0x8'

2021-09-29 Thread John Neffenger
I just tried the same s390x virtual machine under QEMU version 6.0.0 in the Ubuntu 21.10 Beta release, and the error still occurs. My system information is shown below: $ qemu-system-s390x --version QEMU emulator version 6.0.0 (Debian 1:6.0+dfsg-2expubuntu1) Copyright (c) 2003-2021 Fabrice Bellard

[PATCH v9 08/10] vhost: add support for configure interrupt

2021-09-29 Thread Cindy Lu
Add support for configure interrupt in vhost the interrupt will start in vhost_dev_start and stop in vhost_dev_stop Signed-off-by: Cindy Lu --- hw/virtio/vhost.c | 76 +++ include/hw/virtio/vhost.h | 4 +++ 2 files changed, 80 insertions(+) diff --gi

[PATCH v9 06/10] virtio: add support for configure interrupt

2021-09-29 Thread Cindy Lu
Add the support for configure interrupt in virtio add notifier_read and set_fd_handler function Signed-off-by: Cindy Lu --- hw/virtio/virtio.c | 29 + include/hw/virtio/virtio.h | 4 2 files changed, 33 insertions(+) diff --git a/hw/virtio/virtio.c b/hw

[PATCH v9 05/10] vhost-vdpa: add support for config interrupt call back

2021-09-29 Thread Cindy Lu
Add new call back function in vhost-vdpa, this call back function will set the fb number to hardware. Signed-off-by: Cindy Lu --- hw/virtio/trace-events | 2 ++ hw/virtio/vhost-vdpa.c | 7 +++ 2 files changed, 9 insertions(+) diff --git a/hw/virtio/trace-events b/hw/virtio/trace-events inde

[PATCH v9 10/10] virtio-pci: add support for configure interrupt

2021-09-29 Thread Cindy Lu
Add support for configure interrupt, The process is used kvm_irqfd_assign to set the gsi to kernel. When the configure notifier was signal by host, qemu will inject a msix interrupt to guest Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 88 +- hw/vi

[PATCH v9 04/10] vhost: add new call back function for config interrupt

2021-09-29 Thread Cindy Lu
To support the config interrupt, we need to add a new call back function for config interrupt. Signed-off-by: Cindy Lu --- include/hw/virtio/vhost-backend.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/hw/virtio/vhost-backend.h b/include/hw/virtio/vhost-backend.h index 8475c5a

[PATCH v9 09/10] virtio-mmio: add support for configure interrupt

2021-09-29 Thread Cindy Lu
Add configure interrupt support for virtio-mmio bus. This interrupt will be working while the backend is vhost-vdpa Signed-off-by: Cindy Lu --- hw/virtio/virtio-mmio.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/hw/virtio/virtio-mmio.c b/hw/virtio/virtio-mmio

[PATCH v9 03/10] virtio-pci: decouple the single vector from the interrupt process

2021-09-29 Thread Cindy Lu
To reuse the interrupt process in configure interrupt decouple the single vector from the interrupt process. Add new function the kvm_virtio_pci_vector_use_one and _release_one. these functions are use for the single vector, the whole process will finish in a loop for vq number. Signed-off-by: Cin

[PATCH v9 07/10] virtio-net: add support for configure interrupt

2021-09-29 Thread Cindy Lu
Add support for configure interrupt in virtio_net The functions are config_pending and config_mask Signed-off-by: Cindy Lu --- hw/net/vhost_net.c | 10 ++ hw/net/virtio-net.c | 6 ++ include/net/vhost_net.h | 3 +++ 3 files changed, 19 insertions(+) diff --git a/hw/net/vh

[PATCH v9 02/10] virtio-pci: decouple notifier from interrupt process

2021-09-29 Thread Cindy Lu
To reuse the notifier process in configure interrupt. Use the virtio_pci_get_notifier function to get the notifier. the INPUT of this function is the IDX, the OUTPUT is notifier and the vector Signed-off-by: Cindy Lu --- hw/virtio/virtio-pci.c | 84 +- 1 f

[PATCH v9 01/10] virtio: introduce macro IRTIO_CONFIG_IRQ_IDX

2021-09-29 Thread Cindy Lu
To support configure interrupt for vhost-vdpa introduce VIRTIO_CONFIG_IRQ_IDX -1 as config queue index, Then we can reuse the function guest_notifier_mask and guest_notifier_pending. Add the check of queue index, if the driver does not support configure interrupt, the function will just return Sig

[PATCH v9 00/10] vhost-vdpa: add support for configure interrupt

2021-09-29 Thread Cindy Lu
these patches add the support for configure interrupt These codes are all tested in vp-vdpa (support configure interrupt) vdpa_sim (not support configure interrupt), virtio tap device test in virtio-pci bus and virtio-mmio bus Change in v2: Add support for virtio-mmio bus active the notifier whi

Rust in Qemu BoF followup 2: Rust toolchain availability

2021-09-29 Thread David Gibson
Hi again all, I've now done.. or at least started... the second part of my followup from the KVM Forum BoF on Rust in Qemu. I've extended the page at https://wiki.qemu.org/RustInQemu with information on Rust toolchain availability. However, I found I had a lot more open questions on this one, so

Re: [PATCH] virtio-net : Add check for VIRTIO_NET_F_MAC

2021-09-29 Thread Cindy Lu
On Wed, Sep 29, 2021 at 9:36 PM Michael S. Tsirkin wrote: > > On Wed, Sep 29, 2021 at 08:08:40PM +0800, Cindy Lu wrote: > > On Wed, Sep 29, 2021 at 6:07 PM Michael Tokarev wrote: > > > > > > 29.09.2021 09:52, Cindy Lu wrote: > > > > For vdpa device, if the host support VIRTIO_NET_F_MAC > > > > we

Re: [PATCH v3 0/7] Reduce load on ppc target maintainers

2021-09-29 Thread David Gibson
On Mon, Sep 27, 2021 at 02:48:01PM +1000, David Gibson wrote: > Greg Kurz and myself have been co-maintainers for the ppc and ppc64 > targets for some time now. However, both our day job responsibilities > and interests are leading us towards other areas, so we have less time > to devote to this a

Re: [PATCH v12 00/16] machine: smp parsing fixes and improvement

2021-09-29 Thread wangyanan (Y)
On 2021/9/29 22:57, Paolo Bonzini wrote: On 29/09/21 16:46, Markus Armbruster wrote: Paolo Bonzini writes: On 29/09/21 04:58, Yanan Wang wrote: Hi, This is a new version (v12) with minor update suggested by Daniel and Philippe. Two new commits (#1 and #16) are added. Thanks! Queued, than

Re: QAPI sync meeting

2021-09-29 Thread John Snow
On Wed, Sep 29, 2021 at 8:18 AM Markus Armbruster wrote: > John Snow writes: > > > On Tue, Sep 28, 2021 at 9:53 AM Daniel P. Berrangé > > wrote: > > > >> On Mon, Sep 27, 2021 at 12:55:34PM -0400, John Snow wrote: > > [...] > > >> > - Any weekday after 13:00 UTC. Wednesdays, Thursdays and Friday

Re: [PATCH 0/1] hw: aspeed_gpio: Fix GPIO array indexing

2021-09-29 Thread Peter Delevoryas
> On Sep 27, 2021, at 8:43 PM, p...@fb.com wrote: > > From: Peter Delevoryas > > Hey everyone, > > I think there might be a bug in aspeed_gpio_update, where it's selecting > a GPIO IRQ to update. The indexing that maps from GPIO pin to IRQ leads > to an out-of-bounds array access and a segfau

Re: [PATCH 1/1] hw: aspeed_gpio: Fix pin I/O type declarations

2021-09-29 Thread Peter Delevoryas
> On Sep 28, 2021, at 3:53 AM, Damien Hedde wrote: > > > > On 9/28/21 05:24, p...@fb.com wrote: >> From: Peter Delevoryas >> Some of the pin declarations in the Aspeed GPIO module were incorrect, >> probably because of confusion over which bits in the input and output >> uint32_t's correspond

[RFC PATCH 0/1] hw: aspeed_adc: Add initial Aspeed ADC support

2021-09-29 Thread pdel
From: Peter Delevoryas Hey everyone, This patch mostly just does the basic, boilerplate setup for the ADC, so that we can start adding more ADC feature emulation in the future. The only device behavior that I tried to add was emulating the control initialization sequence and the sequence for en

[RFC PATCH 1/1] hw: aspeed_adc: Add initial Aspeed ADC support

2021-09-29 Thread pdel
From: Peter Delevoryas This change sets up Aspeed SoC ADC emulation, so that most ADC drivers will pass the initialization sequence and load successfully. In the future, we can extend this to emulate more features. The initialization sequence is: 1. Set `ADC00` to `0xF`. 2. Wait for bit

Re: QAPI sync meeting

2021-09-29 Thread John Snow
On Wed, Sep 29, 2021 at 9:52 AM Damien Hedde wrote: > > > On 9/27/21 18:55, John Snow wrote: > > Hiya, > > > > I'd like to propose that at least the three of us arrange a time to have > > a meeting where we discuss our plans and ideas for QAPI going forward, > > including rust, python, and golang

Re: [PATCH 0/4] qemu-img compare --stat

2021-09-29 Thread John Snow
On Wed, Sep 29, 2021 at 9:34 AM Vladimir Sementsov-Ogievskiy < vsement...@virtuozzo.com> wrote: > Hi all! > > Recently we faced the following task: > > Customer comes and say: incremental backup images are too fat. Does you > incremental backup works correct? > > What to answer? We should check so

[Bug 1945540] Re: Java crashes on s390x VM with SIGILL/ILL_PRVOPC at '__kernel_getcpu+0x8'

2021-09-29 Thread John Neffenger
** Attachment added: "the log file resulting from 'java --version'" https://bugs.launchpad.net/qemu/+bug/1945540/+attachment/5529211/+files/hs_err_pid6789.log -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.

[Bug 1945540] [NEW] Java crashes on s390x VM with SIGILL/ILL_PRVOPC at '__kernel_getcpu+0x8'

2021-09-29 Thread John Neffenger
Public bug reported: Host environment - Operating system: Ubuntu 20.04.3 LTS Desktop - OS/kernel version: Linux tower 5.11.0-37-generic #41~20.04.2-Ubuntu SMP Fri Sep 24 09:06:38 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux - Architecture: amd64 - QEMU flavor: qemu-system-s390x - QEMU version: QEM

Re: [PATCH v2 1/1] hw/riscv: shakti_c: Mark as not user creatable

2021-09-29 Thread Alistair Francis
On Wed, Sep 29, 2021 at 7:47 PM Bin Meng wrote: > > On Wed, Sep 29, 2021 at 7:30 AM Alistair Francis > wrote: > > > > From: Alistair Francis > > > > Mark the shakti_c machine as not user creatable. > > > > Resolves: https://gitlab.com/qemu-project/qemu/-/issues/639 > > Signed-off-by: Alistair Fr

RE: virtio-gpu: Get FD for texture

2021-09-29 Thread Kasireddy, Vivek
Hi Antonio, > > I am starting to believe that the error is due to the fact that no EGLContext > is active on the > current thread (the one running the Vulkan application). [Kasireddy, Vivek] Which UI module (and Host environment) are you testing with? gtk? egl-headless? Could you please provide

[PATCH qemu v2] QEMU coding style mandates spaces for indentation. This change replaces TABs in hw/ide/ and include/hw/ide.

2021-09-29 Thread ~farzon
From: Farzon Lotfi Resolves: https://gitlab.com/qemu-project/qemu/-/issues/371 Signed-off-by: Farzon Lotfi --- hw/ide/cmd646.c | 28 +-- hw/ide/core.c | 84 - hw/ide/microdrive.c | 360 +++--- include/hw/ide/internal.h | 248

[PATCH qemu v2] QEMU coding style mandates spaces for indentation. This change replaces TABs in hw/block/ and include/hw/block.

2021-09-29 Thread ~farzon
From: Farzon Lotfi Resolves: https://gitlab.com/qemu-project/qemu/-/issues/371 Signed-off-by: Farzon Lotfi --- hw/block/fdc.c | 4 +- hw/block/nand.c | 212 +++ hw/block/onenand.c | 126 +++ hw/block/tc58128.c

[PATCH qemu v2] QEMU coding style mandates spaces for indentation. This change replaces TABs in block files.

2021-09-29 Thread ~farzon
From: Farzon Lotfi Resolves: https://gitlab.com/qemu-project/qemu/-/issues/371 Signed-off-by: Farzon Lotfi --- block/bochs.c | 10 +- block/file-posix.c | 8 block/file-win32.c | 20 ++-- block/parallels.c | 10 +- block/qcow.c| 10 ++

Re: [PATCH v3] target/i386: Include 'hw/i386/apic.h' locally

2021-09-29 Thread Michael S. Tsirkin
On Wed, Sep 29, 2021 at 06:31:24PM +0200, Philippe Mathieu-Daudé wrote: > Instead of including a sysemu-specific header in "cpu.h" > (which is shared with user-mode emulations), include it > locally when required. > > Acked-by: Paolo Bonzini > Signed-off-by: Philippe Mathieu-Daudé Acked-by: Mic

Re: [PULL 1/5] hw/pcie-root-port: Fix hotplug for PCI devices requiring IO

2021-09-29 Thread Michael S. Tsirkin
On Wed, Sep 29, 2021 at 04:41:49PM +0300, Marcel Apfelbaum wrote: > Hi Michael, > > On Mon, Sep 27, 2021 at 12:49 PM Michael S. Tsirkin wrote: > > On Mon, Sep 27, 2021 at 10:33:42AM +0100, Daniel P. Berrangé wrote: > > On Tue, Aug 03, 2021 at 04:52:03PM -0400, Michael S. Tsirkin wrote: >

Re: [RFC 0/1] hw/ipmi: add an aspeed IPMI iBT device model

2021-09-29 Thread Titus Rwantare
On Tue, 28 Sept 2021 at 23:24, Cédric Le Goater wrote: > > Hello Titus, > > On 9/29/21 00:39, Titus Rwantare wrote: > > This patch follows the Handing IPMI for emulating BMC patch set by Hao Wu. > > Building on top of the work in [PATCH] hw/misc: Add an iBT device model > > posted > > by Cédric L

[PULL v2 00/19] NBD patches through 2021-09-27

2021-09-29 Thread Eric Blake
The following changes since commit 6b54a31bf7b403672a798b6443b1930ae6c74dea: Merge remote-tracking branch 'remotes/jsnow-gitlab/tags/python-pull-request' into staging (2021-09-28 13:07:32 +0100) are available in the Git repository at: https://repo.or.cz/qemu/ericb.git tags/pull-nbd-2021-09-

Re: [PULL 00/33] x86 and misc changes for 2021-09-28

2021-09-29 Thread Peter Maydell
On Tue, 28 Sept 2021 at 14:04, Paolo Bonzini wrote: > > The following changes since commit 14f02d8a9ec1746823c106933a4c8f062f9e0f95: > > Merge remote-tracking branch > 'remotes/philmd/tags/integration-testing-20210927' into staging (2021-09-27 > 19:52:43 +0100) > > are available in the Git rep

Re: [PATCH v3 2/3] QIOChannelSocket: Implement io_async_write & io_async_flush

2021-09-29 Thread Peter Xu
On Wed, Sep 29, 2021 at 04:36:10PM -0300, Leonardo Bras Soares Passos wrote: > On Tue, Sep 28, 2021 at 7:45 PM Peter Xu wrote: > > > > On Wed, Sep 22, 2021 at 07:24:22PM -0300, Leonardo Bras wrote: > > > +static void qio_channel_socket_async_flush(QIOChannel *ioc, > > > +

Re: [PATCH v3 0/3] QIOChannel async_write & async_flush + MSG_ZEROCOPY + multifd

2021-09-29 Thread Leonardo Bras Soares Passos
On Wed, Sep 29, 2021 at 4:23 PM Peter Xu wrote: > > On Wed, Sep 29, 2021 at 03:34:01PM -0300, Leonardo Bras Soares Passos wrote: > > You mean like I did in pre-V1, enabling ZEROCOPY for multifd it in QMP? > > Or is this something else? > > I mean any way to still be able to turn zerocopy off? E.g.

Re: [PATCH v3 3/3] multifd: Send using asynchronous write on nocomp to send RAM pages.

2021-09-29 Thread Leonardo Bras Soares Passos
On Tue, Sep 28, 2021 at 7:49 PM Peter Xu wrote: > > On Fri, Sep 24, 2021 at 06:43:49PM +0100, Daniel P. Berrangé wrote: > > > @@ -546,6 +546,7 @@ void multifd_save_cleanup(void) > > > MultiFDSendParams *p = &multifd_send_state->params[i]; > > > Error *local_err = NULL; > > > > >

[PATCH v3 09/13] qapi/parser: add import cycle workaround

2021-09-29 Thread John Snow
There is a cycle that exists in the QAPI generator: [schema -> expr -> parser -> schema]. It exists because the QAPIDoc class needs the names of types defined by the schema module, but the schema module needs to import both expr.py/parser.py to do its actual parsing. Ultimately, the layering viola

[PATCH v3 11/13] qapi/parser: enable mypy checks

2021-09-29 Thread John Snow
Signed-off-by: John Snow --- As always, this can be merged with the previous commit. Signed-off-by: John Snow --- scripts/qapi/mypy.ini | 5 - 1 file changed, 5 deletions(-) diff --git a/scripts/qapi/mypy.ini b/scripts/qapi/mypy.ini index 54ca4483d6d..66253564297 100644 --- a/scripts/qap

[PATCH v3 13/13] qapi/parser: enable pylint checks

2021-09-29 Thread John Snow
Signed-off-by: John Snow --- This can be merged with the previous commit, if desired. Signed-off-by: John Snow --- scripts/qapi/pylintrc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/qapi/pylintrc b/scripts/qapi/pylintrc index 5b7dbc58ad8..b259531a726 100644 --

[PATCH v3 05/13] qapi/parser: improve detection of '@symbol:' preface

2021-09-29 Thread John Snow
Leading and trailing whitespace are now discarded, addressing the FIXME comment. A new error is raised to detect this accidental case. Parsing for args sections is left alone here; the 'name' variable is moved into the only block where it is used. Signed-off-by: John Snow --- Tangentially rela

[PATCH v3 08/13] qapi/parser: Introduce NullSection

2021-09-29 Thread John Snow
Here's the weird bit. QAPIDoc generally expects -- virtually everywhere -- that it will always have a current section. The sole exception to this is in the case that end_comment() is called, which leaves us with *no* section. However, in this case, we also don't expect to actually ever mutate the c

[PATCH v3 12/13] qapi/parser: Silence too-few-public-methods warning

2021-09-29 Thread John Snow
Eh. Not worth the fuss today. There are bigger fish to fry. Signed-off-by: John Snow --- scripts/qapi/parser.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.py index 8a846079207..7511eedaa35 100644 --- a/scripts/qapi/parser.py +++ b/scripts/

[PATCH v3 07/13] qapi/parser: Simplify _end_section()

2021-09-29 Thread John Snow
The "if self._section" clause in end_section is mysterious: In which circumstances might we end a section when we don't have one? QAPIDoc always expects there to be a "current section", only except after a call to end_comment(). This actually *shouldn't* ever be 'None', so let's remove that logic

[PATCH v3 04/13] qapi: Add spaces after symbol declaration for consistency

2021-09-29 Thread John Snow
Several QGA definitions omit a blank line after the symbol declaration. This works OK currently, but it's the only place where we do this. Adjust it for consistency. Future commits may wind up enforcing this formatting. Signed-off-by: John Snow --- This isn't strictly necessary and I don't act

[PATCH v3 10/13] qapi/parser: add type hint annotations (QAPIDoc)

2021-09-29 Thread John Snow
Annotations do not change runtime behavior. This commit consists of only annotations. Signed-off-by: John Snow --- scripts/qapi/parser.py | 67 -- 1 file changed, 39 insertions(+), 28 deletions(-) diff --git a/scripts/qapi/parser.py b/scripts/qapi/parser.

  1   2   3   >