Re: [PATCH] hw/nvme: clear aen mask on reset

2022-06-16 Thread Klaus Jensen
On May 12 11:30, Klaus Jensen wrote: > From: Klaus Jensen > > The internally maintained AEN mask is not cleared on reset. Fix this. > > Signed-off-by: Klaus Jensen > --- > hw/nvme/ctrl.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c > index 1e6e0fcad

[PATCH v2] virtio-iommu: Fix the partial copy of probe request

2022-06-16 Thread Zhenzhong Duan
The structure of probe request doesn't include the tail, this leads to a few field missed to be copied. Currently this isn't an issue as those missed field belong to reserved field, just in case reserved field will be used in the future. Fixes: 1733eebb9e75b ("virtio-iommu: Implement RESV_MEM prob

[PATCH qemu v2 1/2] ppc: Define SETFIELD for the ppc target

2022-06-16 Thread Alexey Kardashevskiy
It keeps repeating, move it to the header. This uses __builtin_ctzl() to allow using the macros in #define. Signed-off-by: Alexey Kardashevskiy --- include/hw/pci-host/pnv_phb3_regs.h | 16 target/ppc/cpu.h| 5 + hw/intc/pnv_xive.c | 20

[PATCH qemu v2 0/2] ppc/spapr: Implement H_WATCHDOG

2022-06-16 Thread Alexey Kardashevskiy
This implements H_WATCHDOG. More detailed comments are in the patches. This is based on sha1 96c343cc774b Joel Stanley "linux-user: Add PowerPC ISA 3.1 and MMA to hwcap". Please comment. Thanks. Alexey Kardashevskiy (2): ppc: Define SETFIELD for the ppc target ppc/spapr: Implement H_WATCHD

[PATCH qemu v2 2/2] ppc/spapr: Implement H_WATCHDOG

2022-06-16 Thread Alexey Kardashevskiy
The new PAPR 2.12 defines a watchdog facility managed via the new H_WATCHDOG hypercall. This adds H_WATCHDOG support which a proposed driver for pseries uses: https://patchwork.ozlabs.org/project/linuxppc-dev/list/?series=303120 This was tested by running QEMU with a debug kernel and command line

RE: [PATCH] virtio-iommu: Fix the partial copy of probe request

2022-06-16 Thread Duan, Zhenzhong
>-Original Message- >From: Michael S. Tsirkin >Sent: Friday, June 17, 2022 1:31 PM >To: Duan, Zhenzhong >Cc: qemu-devel@nongnu.org; eric.au...@redhat.com >Subject: Re: [PATCH] virtio-iommu: Fix the partial copy of probe request > >On Fri, Jun 17, 2022 at 11:43:48AM +0800, Zhenzhong Dua

Re: [PATCH] virtio-iommu: Fix the partial copy of probe request

2022-06-16 Thread Michael S. Tsirkin
On Fri, Jun 17, 2022 at 11:43:48AM +0800, Zhenzhong Duan wrote: > The structure of probe request doesn't include the tail, this lead to > a few field is missed to be copied. Currently this isn't an issue as > those missed field belong to reserved field, just in case reserved > field will be used in

[PATCH] virtio-iommu: Fix the partial copy of probe request

2022-06-16 Thread Zhenzhong Duan
The structure of probe request doesn't include the tail, this lead to a few field is missed to be copied. Currently this isn't an issue as those missed field belong to reserved field, just in case reserved field will be used in the future. By this chance, also remove a few useless code. Signed-of

Re: [PATCH qemu] ppc/spapr: Implement H_WATCHDOG

2022-06-16 Thread Alexey Kardashevskiy
On 6/17/22 04:42, Daniel Henrique Barboza wrote: Hey, As you might have seen in the kernel thread I was unable to test the implementation. The code errors out down there: On 6/8/22 00:01, Alexey Kardashevskiy wrote: The new PAPR 2.12 defines a watchdog facility managed via the new H_WATC

Re: New "IndustryStandard" fw_cfg?

2022-06-16 Thread Xiaoyao Li
On 6/16/2022 4:28 PM, Gerd Hoffmann wrote: Hi, After re-read and re-think, I think the problem is better to state as: we need an interface for QEMU to tell OVMF how much memory it needs to accept, from [Minimum to All]. So for the case that user wants to boot an partial-enabled confidential

Re: [RFC PATCH v8 00/21] Net Control VQ support with asid in vDPA SVQ

2022-06-16 Thread Jason Wang
On Wed, Jun 15, 2022 at 6:03 PM Eugenio Perez Martin wrote: > > On Wed, Jun 15, 2022 at 5:04 AM Jason Wang wrote: > > > > On Tue, Jun 14, 2022 at 5:32 PM Eugenio Perez Martin > > wrote: > > > > > > On Tue, Jun 14, 2022 at 10:20 AM Jason Wang wrote: > > > > > > > > On Tue, Jun 14, 2022 at 4:14 P

Re: [PATCH] target/riscv/pmp: guard against PMP ranges with a negative size

2022-06-16 Thread Alistair Francis
On Thu, Jun 16, 2022 at 7:12 AM Nicolas Pitre wrote: > > For a TOR entry to match, the stard address must be lower than the end > address. Normally this is always the case, but correct code might still > run into the following scenario: > > Initial state: > > pmpaddr3 = 0x2000 pmp3cf

Re: [PATCH] target/riscv/pmp: guard against PMP ranges with a negative size

2022-06-16 Thread Alistair Francis
On Thu, Jun 16, 2022 at 10:20 PM Nicolas Pitre wrote: > > On Thu, 16 Jun 2022, Alistair Francis wrote: > > > On Thu, Jun 16, 2022 at 7:12 AM Nicolas Pitre wrote: > > > > > > For a TOR entry to match, the stard address must be lower than the end > > > address. Normally this is always the case, but

Re: [PATCH 0/2] linux-aio: fix unbalanced plugged counter in laio_io_unplug()

2022-06-16 Thread Mark Mielke
Thank you for finding this and fixing it. This issue has been giving us grief for months, and this patch appears to resolve the problem. In our case, it seemed to have much greater severity with the RHEL / CentOS 7.x Linux 3.10 kernel when tied to SolidFire iSCSI based storage. This caused it to e

Re: [PULL 00/10] virtio,pc,pci: fixes,cleanups,features

2022-06-16 Thread Richard Henderson
On 6/16/22 09:57, Michael S. Tsirkin wrote: The following changes since commit def6fd6c9ce9e00a30cdd0066e0fde206b3f3d2f: Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2022-06-16 07:13:04 -0700) are available in the Git repository at: git://git.kernel.org/pub/

Re: [Qemu-devel] [PATCH v1] virtio-scsi: Send "REPORTED LUNS CHANGED" sense data upon a disk hotplug.

2022-06-16 Thread Venu Busireddy
Ping? On 2022-05-31 15:22:37 -0500, Venu Busireddy wrote: > When a disk is hotplugged, QEMU reports a VIRTIO_SCSI_EVT_RESET_RESCAN > event, but does not send the "REPORTED LUNS CHANGED" sense data. This > does not conform to Section 5.6.6.3 of the VirtIO specification, which > states "Events wil

Re: misaligned-pointer-use libslirp/src/tcp_input.c

2022-06-16 Thread Alexander Bulekov
On 220616 0930, Patrick Venture wrote: > On Thu, Jun 16, 2022 at 6:31 AM Alexander Bulekov wrote: > > > Is this an --enable-sanitizers build? The virtual-device fuzzer catches > > > > Yeah - it should be reproducible with a sanitizers build from HEAD -- I can > try to get a manual instance going

Re: [PATCH 4/4] Adding support for multi-FD connections dynamically

2022-06-16 Thread Dr. David Alan Gilbert
* Het Gala (het.g...@nutanix.com) wrote: > i) Dynamically decide appropriate source and destination ip pairs for the >corresponding multi-FD channel to be connected. > > ii) Removed the support for setting the number of multi-fd channels from qmp > commands. As now all multiFD parameters w

Re: [PATCH qemu] ppc/spapr: Implement H_WATCHDOG

2022-06-16 Thread Daniel Henrique Barboza
Hey, As you might have seen in the kernel thread I was unable to test the implementation. The code errors out down there: On 6/8/22 00:01, Alexey Kardashevskiy wrote: The new PAPR 2.12 defines a watchdog facility managed via the new H_WATCHDOG hypercall. This adds H_WATCHDOG support which a

Re: [PATCH 2/4] Adding multi-interface support for multi-FD on destination side

2022-06-16 Thread Dr. David Alan Gilbert
* Het Gala (het.g...@nutanix.com) wrote: > i) Modified the format of qemu monitor command: ‘migrate-incoming’ by adding >a list, each element in the list is to open listeners with a given number >of multiFD channels. > > ii) Qemu starts with -incoming flag defer and -multi-fd-incoming defe

Re: [PATCH 5/9] error-report: introduce ErrorReportDetailedFunc

2022-06-16 Thread Warner Losh
On Thu, Jun 16, 2022 at 6:41 AM wrote: > From: Marc-André Lureau > > Remove monitor dependency from error printing code, by allowing programs > to set a callback for when to use "detailed" reporting or not. > > Signed-off-by: Marc-André Lureau > --- > include/qemu/error-report.h | 4 +

Re: [PULL 0/7] 9p queue 2022-06-16

2022-06-16 Thread Richard Henderson
https://github.com/cschoenebeck/qemu.git tags/pull-9p-20220616 for you to fetch changes up to 0e43495d3b4a50fc5e22f7b71261fdd5b56fdfcb: tests/9pfs: check fid being unaffected in fs_walk_2nd_nonexistent (2022-06-16 12:44:52 +0200)

[PATCH] net/vmnet: use availability check at runtime

2022-06-16 Thread Joelle van Dyne
MAC_OS_X_VERSION_MIN_REQUIRED is set at compile time so this means that when we target an older macOS version, it disables the newer features. With a runtime check, we can selectively disable newer API features. Signed-off-by: Joelle van Dyne --- net/vmnet-host.c| 70 +---

Re: [PATCH 3/4] Establishing connection between any non-default source and destination pair

2022-06-16 Thread Daniel P . Berrangé
On Thu, Jun 09, 2022 at 07:33:04AM +, Het Gala wrote: > i) Binding of the socket to source ip address and port on the non-default >interface has been implemented for multi-FD connection, which was not >necessary earlier because the binding was on the default interface itself. > > ii) C

Re: [PATCH 0/4] Multiple interface support on top of Multi-FD

2022-06-16 Thread Daniel P . Berrangé
On Thu, Jun 16, 2022 at 03:44:09PM +0530, manish.mishra wrote: > > On 16/06/22 1:46 pm, Daniel P. Berrangé wrote: > > On Wed, Jun 15, 2022 at 08:14:26PM +0100, Dr. David Alan Gilbert wrote: > > > * Daniel P. Berrangé (berra...@redhat.com) wrote: > > > > On Fri, Jun 10, 2022 at 05:58:31PM +0530, ma

Re: [PATCH 1/4] Modifying ‘migrate’ qmp command to add multi-FD socket on particular source and destination pair

2022-06-16 Thread Dr. David Alan Gilbert
* Het Gala (het.g...@nutanix.com) wrote: > i) Modified the format of the qemu monitor command : 'migrate' by adding a > list, >each element in the list consists of multi-FD connection parameters: source >and destination uris and of the number of multi-fd channels between each > pair. > >

[PULL 10/10] acpi/erst: fix fallthrough code upon validation failure

2022-06-16 Thread Michael S. Tsirkin
From: Ani Sinha At any step when any validation fail in check_erst_backend_storage(), there is no need to continue further through other validation checks. Further, by continuing even when record_size is 0, we run the risk of triggering a divide by zero error if we continued with other validation

[PULL 08/10] crypto: Introduce RSA algorithm

2022-06-16 Thread Michael S. Tsirkin
From: zhenwei pi There are two parts in this patch: 1, support akcipher service by cryptodev-builtin driver 2, virtio-crypto driver supports akcipher service In principle, we should separate this into two patches, to avoid compiling error, merge them into one. Then virtio-crypto gets request fr

[PULL 09/10] vhost: also check queue state in the vhost_dev_set_log error routine

2022-06-16 Thread Michael S. Tsirkin
From: Ni Xun When check queue state in the vhost_dev_set_log routine, it miss the error routine check, this patch also check queue state in error case. Fixes: 1e5a050f5798 ("check queue state in the vhost_dev_set_log routine") Signed-off-by: Ni Xun Reviewed-by: Zhigang Lu Message-Id: Reviewe

[PULL 07/10] virtio-iommu: Add an assert check in translate routine

2022-06-16 Thread Michael S. Tsirkin
From: Zhenzhong Duan With address space switch supported, dma access translation only happen after endpoint is attached to a non-bypass domain. Signed-off-by: Zhenzhong Duan Message-Id: <20220613061010.2674054-4-zhenzhong.d...@intel.com> Reviewed-by: Michael S. Tsirkin Signed-off-by: Michael S

[PULL 05/10] virtio-iommu: Add bypass mode support to assigned device

2022-06-16 Thread Michael S. Tsirkin
From: Zhenzhong Duan Currently assigned devices can not work in virtio-iommu bypass mode. Guest driver fails to probe the device due to DMA failure. And the reason is because of lacking GPA -> HPA mappings when VM is created. Add a root container memory region to hold both bypass memory region a

[PULL 04/10] virtio/vhost-user: Fix wrong vhost notifier GPtrArray size

2022-06-16 Thread Michael S. Tsirkin
From: Yajun Wu In fetch_or_create_notifier, idx begins with 0. So the GPtrArray size should be idx + 1 and g_ptr_array_set_size should be called with idx + 1. This wrong GPtrArray size causes fetch_or_create_notifier return an invalid address. Passing this invalid pointer to vhost_user_host_noti

[PULL 02/10] pci-bridge/cxl_downstream: Add a CXL switch downstream port

2022-06-16 Thread Michael S. Tsirkin
From: Jonathan Cameron Emulation of a simple CXL Switch downstream port. The Device ID has been allocated for this use. Signed-off-by: Jonathan Cameron Message-Id: <20220616145126.8002-3-jonathan.came...@huawei.com> Signed-off-by: Michael S. Tsirkin Reviewed-by: Michael S. Tsirkin Signed-off-

[PULL 01/10] pci-bridge/cxl_upstream: Add a CXL switch upstream port

2022-06-16 Thread Michael S. Tsirkin
From: Jonathan Cameron An initial simple upstream port emulation to allow the creation of CXL switches. The Device ID has been allocated for this use. Signed-off-by: Jonathan Cameron Message-Id: <20220616145126.8002-2-jonathan.came...@huawei.com> Signed-off-by: Michael S. Tsirkin Reviewed-by:

[PULL 06/10] virtio-iommu: Use recursive lock to avoid deadlock

2022-06-16 Thread Michael S. Tsirkin
From: Zhenzhong Duan When switching address space with mutex lock hold, mapping will be replayed for assigned device. This will trigger relock deadlock. Also release the mutex resource in unrealize routine. Signed-off-by: Zhenzhong Duan Message-Id: <20220613061010.2674054-3-zhenzhong.d...@inte

[PULL 03/10] docs/cxl: Add switch documentation

2022-06-16 Thread Michael S. Tsirkin
From: Jonathan Cameron Switches were already introduced, but now we support them update the documentation to provide an example in diagram and qemu command line parameter forms. Signed-off-by: Jonathan Cameron Message-Id: <20220616145126.8002-4-jonathan.came...@huawei.com> Signed-off-by: Michae

[PULL 00/10] virtio,pc,pci: fixes,cleanups,features

2022-06-16 Thread Michael S. Tsirkin
The following changes since commit def6fd6c9ce9e00a30cdd0066e0fde206b3f3d2f: Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging (2022-06-16 07:13:04 -0700) are available in the Git repository at: git://git.kernel.org/pub/scm/virt/kvm/mst/qemu.git tags/for_upstream for

Re: [PATCH 4/8] virtio: categorize callbacks in GS

2022-06-16 Thread Michael S. Tsirkin
On Thu, Jun 09, 2022 at 10:37:23AM -0400, Emanuele Giuseppe Esposito wrote: > All the callbacks below are always running in the main loop. > > The callbacks are the following: > - start/stop_ioeventfd: these are the callbacks where > blk_set_aio_context(iothread) is done, so they are called in t

Re: [Phishing Risk] [External] Re: [PATCH 4/7] crypto: Add ECDSA key parser

2022-06-16 Thread Michael S. Tsirkin
On Tue, Jun 14, 2022 at 09:43:59AM +0800, 何磊 wrote: > Hi Philippe, lots of thanks for your review! > > > On Jun 13, 2022, at 10:19 PM, Philippe Mathieu-Daudé > > wrote: > > > > On 13/6/22 10:45, Lei He wrote: > >> Add ECDSA key parser and ECDSA signautre parser. > >> Signed-off-by: lei he > >>

Re: misaligned-pointer-use libslirp/src/tcp_input.c

2022-06-16 Thread Patrick Venture
On Thu, Jun 16, 2022 at 6:31 AM Alexander Bulekov wrote: > Is this an --enable-sanitizers build? The virtual-device fuzzer catches > Yeah - it should be reproducible with a sanitizers build from HEAD -- I can try to get a manual instance going again without automation to try and reproduce it. W

Re: [PATCH 01/20] io: add a QIOChannelNull equivalent to /dev/null

2022-06-16 Thread Daniel P . Berrangé
On Tue, May 24, 2022 at 04:14:31PM -0500, Eric Blake wrote: > On Tue, May 24, 2022 at 12:02:16PM +0100, Daniel P. Berrangé wrote: > > This is for code which needs a portable equivalent to a QIOChannelFile > > connected to /dev/null. > > > > Signed-off-by: Daniel P. Berrangé > > --- > > include/i

Re: [PATCH 0/4] hw/nvme: add support for TP4084

2022-06-16 Thread Klaus Jensen
On Jun 16 07:57, Keith Busch wrote: > On Thu, Jun 16, 2022 at 12:42:49PM +0200, Klaus Jensen wrote: > > On Jun 8 03:28, Niklas Cassel via wrote: > > > Hello there, > > > > > > considering that Linux v5.19-rc1 is out which includes support for > > > NVMe TP4084: > > > https://git.kernel.org/pub/sc

Re: [PATCH V8 17/39] qapi: strList unit tests

2022-06-16 Thread Marc-André Lureau
On Wed, Jun 15, 2022 at 6:58 PM Steve Sistare wrote: > Signed-off-by: Steve Sistare > Reviewed-by: Marc-André Lureau > --- > MAINTAINERS | 1 + > tests/unit/meson.build| 1 + > tests/unit/test-strlist.c | 81 > +++ > 3 files ch

Re: [PULL 00/21] Statistics, preconfig and cleanup patches for 2022-06-16

2022-06-16 Thread Richard Henderson
On 6/16/22 01:31, Paolo Bonzini wrote: The following changes since commit debd0753663bc89c86f5462a53268f2e3f680f60: Merge tag 'pull-testing-next-140622-1' of https://github.com/stsquad/qemu into staging (2022-06-13 21:10:57 -0700) are available in the Git repository at: https://gitlab.c

Re: [PATCH V8 13/39] oslib: qemu_clear_cloexec

2022-06-16 Thread Daniel P . Berrangé
On Wed, Jun 15, 2022 at 07:52:00AM -0700, Steve Sistare wrote: > Define qemu_clear_cloexec, analogous to qemu_set_cloexec. > > Reviewed-by: Dr. David Alan Gilbert > Signed-off-by: Steve Sistare > --- > include/qemu/osdep.h | 1 + > util/oslib-posix.c | 9 + > util/oslib-win32.c | 4

Re: [PATCH V8 16/39] qapi: strv_from_strList

2022-06-16 Thread Marc-André Lureau
Hi On Wed, Jun 15, 2022 at 7:30 PM Steve Sistare wrote: > Signed-off-by: Steve Sistare > --- > include/qapi/util.h | 6 ++ > qapi/qapi-util.c| 14 ++ > 2 files changed, 20 insertions(+) > > diff --git a/include/qapi/util.h b/include/qapi/util.h > index 75dddca..51ff64e 100

Re: [PATCH V8 14/39] qapi: strList_from_string

2022-06-16 Thread Marc-André Lureau
Hi On Wed, Jun 15, 2022 at 7:04 PM Steve Sistare wrote: > Generalize strList_from_comma_list() to take any delimiter character, > rename > as strList_from_string(), and move it to qapi/util.c. > > No functional change. > > Signed-off-by: Steve Sistare > --- > include/qapi/util.h | 9 +

Re: [PATCH V8 15/39] qapi: QAPI_LIST_LENGTH

2022-06-16 Thread Marc-André Lureau
Hi On Wed, Jun 15, 2022 at 7:38 PM Steve Sistare wrote: > Signed-off-by: Steve Sistare > Reviewed-by: Marc-André Lureau > --- > include/qapi/util.h | 13 + > 1 file changed, 13 insertions(+) > > diff --git a/include/qapi/util.h b/include/qapi/util.h > index 7d88b09..75dddca 100

Re: [PATCH V8 13/39] oslib: qemu_clear_cloexec

2022-06-16 Thread Marc-André Lureau
On Wed, Jun 15, 2022 at 7:01 PM Steve Sistare wrote: > Define qemu_clear_cloexec, analogous to qemu_set_cloexec. > > Reviewed-by: Dr. David Alan Gilbert > Signed-off-by: Steve Sistare > Reviewed-by: Marc-André Lureau > --- > include/qemu/osdep.h | 1 + > util/oslib-posix.c | 9 +

Re: [PATCH V8 05/39] vl: start on wakeup request

2022-06-16 Thread Marc-André Lureau
Hi On Wed, Jun 15, 2022 at 7:27 PM Steve Sistare wrote: > If qemu starts and loads a VM in the suspended state, then a later wakeup > request will set the state to running, which is not sufficient to > initialize > the vm, as vm_start was never called during this invocation of qemu. See > qemu_

Re: [PATCH 0/4] Multiple interface support on top of Multi-FD

2022-06-16 Thread Dr. David Alan Gilbert
* Daniel P. Berrangé (berra...@redhat.com) wrote: > On Wed, Jun 15, 2022 at 05:43:28PM +0100, Daniel P. Berrangé wrote: > > On Fri, Jun 10, 2022 at 05:58:31PM +0530, manish.mishra wrote: > > > > > > On 09/06/22 9:17 pm, Daniel P. Berrangé wrote: > > > > On Thu, Jun 09, 2022 at 07:33:01AM +, He

Re: [PATCH V8 02/39] migration: qemu file wrappers

2022-06-16 Thread Daniel P . Berrangé
On Wed, Jun 15, 2022 at 07:51:49AM -0700, Steve Sistare wrote: > Add qemu_file_open and qemu_fd_open to create QEMUFile objects for unix > files and file descriptors. > > Signed-off-by: Steve Sistare > --- > migration/qemu-file-channel.c | 36 > migration/qem

Re: [PATCH V8 03/39] migration: simplify savevm

2022-06-16 Thread Marc-André Lureau
Hi On Wed, Jun 15, 2022 at 6:57 PM Steve Sistare wrote: > Use qemu_file_open to simplify a few functions in savevm.c. > No functional change. > > Signed-off-by: Steve Sistare > Reviewed-by: Dr. David Alan Gilbert > (ok, I get why you keep the mode_t in fopen) Reviewed-by: Marc-André Lureau

Re: [PATCH V8 02/39] migration: qemu file wrappers

2022-06-16 Thread Marc-André Lureau
Hi On Wed, Jun 15, 2022 at 6:54 PM Steve Sistare wrote: > Add qemu_file_open and qemu_fd_open to create QEMUFile objects for unix > files and file descriptors. > File descriptors are not really unix specific, but that's a detail. The names of the functions in the summary do not match the code,

[PATCH v11 3/3] docs/cxl: Add switch documentation

2022-06-16 Thread Jonathan Cameron via
Switches were already introduced, but now we support them update the documentation to provide an example in diagram and qemu command line parameter forms. Signed-off-by: Jonathan Cameron --- docs/system/devices/cxl.rst | 88 - 1 file changed, 86 insertions(+),

[PATCH v11 0/3] hw/pci-bridge/cxl: Add CXL Switches.

2022-06-16 Thread Jonathan Cameron via
Previously sent as patches 43-45 of [PATCH v10 00/45] CXl 2.0 emulation Support https://lore.kernel.org/qemu-devel/20220429144110.25167-45-jonathan.came...@huawei.com/#r Now the initial CXL support is upstream, patch sets applying to different parts of the CXL infrastructure can be reviewed / appl

[PATCH v11 2/3] pci-bridge/cxl_downstream: Add a CXL switch downstream port

2022-06-16 Thread Jonathan Cameron via
Emulation of a simple CXL Switch downstream port. The Device ID has been allocated for this use. Signed-off-by: Jonathan Cameron --- hw/cxl/cxl-host.c | 43 +- hw/pci-bridge/cxl_downstream.c | 249 + hw/pci-bridge/meson.build | 2 +- 3 fil

[PATCH v11 1/3] pci-bridge/cxl_upstream: Add a CXL switch upstream port

2022-06-16 Thread Jonathan Cameron via
An initial simple upstream port emulation to allow the creation of CXL switches. The Device ID has been allocated for this use. Signed-off-by: Jonathan Cameron --- hw/pci-bridge/cxl_upstream.c | 216 +++ hw/pci-bridge/meson.build| 2 +- include/hw/cxl/cxl.h

Re: [PULL v2 25/86] hw/cxl/component: Implement host bridge MMIO (8.2.5, table 142)

2022-06-16 Thread Igor Mammedov
On Mon, 16 May 2022 16:51:34 -0400 "Michael S. Tsirkin" wrote: > From: Ben Widawsky > > CXL host bridges themselves may have MMIO. Since host bridges don't have > a BAR they are treated as special for MMIO. This patch includes > i386/pc support. > Also hook up the device reset now that we have

Re: [PATCH V8 01/39] migration: fix populate_vfio_info

2022-06-16 Thread Marc-André Lureau
On Wed, Jun 15, 2022 at 7:20 PM Steve Sistare wrote: > Include CONFIG_DEVICES so that populate_vfio_info is instantiated for > CONFIG_VFIO. > > Signed-off-by: Steve Sistare > Fixes: 43bd0bf30fce ("migration: Move populate_vfio_info() into a separate file") Reviewed-by: Marc-André Lureau ---

Re: [PATCH v5 5/5] i386/pc: restrict AMD only enforcing of valid IOVAs to new machine type

2022-06-16 Thread Igor Mammedov
On Fri, 20 May 2022 11:45:32 +0100 Joao Martins wrote: > 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 ev

Re: [PATCH v2 03/10] qga: treat get-guest-fsinfo as "best effort"

2022-06-16 Thread John Snow
On Thu, Jun 16, 2022 at 10:36 AM Marc-André Lureau wrote: > > Hi > > On Thu, Jun 16, 2022 at 6:27 PM John Snow wrote: >> >> In some container environments, there may be references to block devices >> witnessable from a container through /proc/self/mountinfo that reference >> devices we simply don

[PATCH v2 07/10] tests/vm: update sha256sum for ubuntu.aarch64

2022-06-16 Thread John Snow
This checksum changes weekly; use a fixed point image and update the checksum so we don't have to re-download it quite so much. Note: Just like the centos.aarch64 test, this test currently seems very flaky when run as a TCG test. Signed-off-by: John Snow --- tests/vm/ubuntu.aarch64 | 8 ++--

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

2022-06-16 Thread John Snow
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 changed, 5 insertions(+) diff --git a/tests/qemu-iotests/108 b/tests/qemu-iotests/108 index 9e923d6a59f..54e935acf28 10

Re: [PATCH v2 03/10] qga: treat get-guest-fsinfo as "best effort"

2022-06-16 Thread Marc-André Lureau
Hi On Thu, Jun 16, 2022 at 6:27 PM John Snow wrote: > In some container environments, there may be references to block devices > witnessable from a container through /proc/self/mountinfo that reference > devices we simply don't have access to in the container, and could not > provide information

[PATCH v2 10/10] tests/vm: add 512MB extra memory per core

2022-06-16 Thread John Snow
If you try to run a 16 or 32 threaded test, you're going to run out of memory very quickly with qom-test and a few others. Bump the memory limit to try to scale with larger-core machines. Add this magic in early to the configuration process so that the config file, if provided, can still override

[PATCH v2 01/10] tests/qemu-iotests: hotfix for 307, 223 output

2022-06-16 Thread John Snow
Fixes: 58a6fdcc Signed-off-by: John Snow Tested-by: Daniel P. Berrangé Reviewed-by: Daniel P. Berrangé --- tests/qemu-iotests/223.out | 4 ++-- tests/qemu-iotests/307.out | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/qemu-iotests/223.out b/tests/qemu-iotests/223

[PATCH v2 05/10] tests/vm: switch CentOS 8 to CentOS 8 Stream

2022-06-16 Thread John Snow
The old CentOS image didn't work anymore because it was already EOL at the beginning of 2022. Signed-off-by: John Snow Reviewed-by: Thomas Huth --- tests/vm/centos | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/vm/centos b/tests/vm/centos index be4f6ff2f14..3a52

[PATCH v2 09/10] tests/vm: remove duplicate 'centos' VM test

2022-06-16 Thread John Snow
This is listed twice by accident; we require genisoimage to run the test, so remove the unconditional entry. Signed-off-by: John Snow --- tests/vm/Makefile.include | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/vm/Makefile.include b/tests/vm/Makefile.include index 70ee

[PATCH v2 08/10] tests/vm: remove ubuntu.i386 VM test

2022-06-16 Thread John Snow
Ubuntu 18.04 is out of our support window, and Ubuntu 20.04 does not support i386 anymore. The debian project does, but they do not provide any cloud images for it, a new expect-style script would have to be written. Since we have i386 cross-compiler tests hosted on GitLab CI, we don't need to sup

[PATCH v2 04/10] tests/vm: use 'cp' instead of 'ln' for temporary vm images

2022-06-16 Thread John Snow
If the initial setup fails, you've permanently altered the state of the downloaded image in an unknowable way. Use 'cp' like our other test setup scripts do. Signed-off-by: John Snow Reviewed-by: Thomas Huth --- tests/vm/centos | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[PATCH v2 00/10] Improve reliability of VM tests

2022-06-16 Thread John Snow
This patch series attempts to improve the reliability of several of the VM test targets. In particular, both CentOS 8 tests are non-functional because CentOS 8 was EOL at the beginning of this calendar year, with repositories and mirrors going offline. Notably, I also remove the ubuntu.i386 test b

[PATCH v2 03/10] qga: treat get-guest-fsinfo as "best effort"

2022-06-16 Thread John Snow
In some container environments, there may be references to block devices witnessable from a container through /proc/self/mountinfo that reference devices we simply don't have access to in the container, and could not provide information about. Instead of failing the entire fsinfo command, return s

Re: [PATCH v5 4/5] i386/pc: relocate 4g start to 1T where applicable

2022-06-16 Thread Igor Mammedov
On Fri, 20 May 2022 11:45:31 +0100 Joao Martins wrote: > It is assumed that the whole GPA space is available to be DMA > addressable, within a given address space limit, expect for a ^^^ typo? > tiny region before the 4G. Since Linux v5.4, VFIO

[PATCH v11 2/2] qtest/cxl: Add aarch64 virt test for CXL

2022-06-16 Thread Jonathan Cameron via
Add a single complex case for aarch64 virt machine. Signed-off-by: Jonathan Cameron --- tests/qtest/cxl-test.c | 48 + tests/qtest/meson.build | 1 + 2 files changed, 40 insertions(+), 9 deletions(-) diff --git a/tests/qtest/cxl-test.c b/tests/qtest/cxl

[PATCH v11 1/2] hw/arm/virt: Basic CXL enablement on pci_expander_bridge instances pxb-cxl

2022-06-16 Thread Jonathan Cameron via
Code based on i386/pc enablement. The memory layout places space for 16 host bridge register regions after the GIC_REDIST2 in the extended memmap. The CFMWs are placed above the extended memmap. Only create the CEDT table if cxl=on set for the machine. Signed-off-by: Jonathan Cameron --- hw/ar

[PATCH v11 0/2] arm/virt: CXL support via pxb_cxl

2022-06-16 Thread Jonathan Cameron via
Previously patches 40 and 41 of [PATCH v10 00/45] CXl 2.0 emulation Support https://lore.kernel.org/qemu-devel/20220429144110.25167-45-jonathan.came...@huawei.com/#r Now the base CXL support including for x86/pc is upstream (patches 1-39) there are no dependencies between the next few CXL elements

Re: [PATCH v5 3/5] i386/pc: pass pci_hole64_size to pc_memory_init()

2022-06-16 Thread Michael S. Tsirkin
On Thu, Jun 16, 2022 at 03:30:14PM +0200, Igor Mammedov wrote: > On Fri, 20 May 2022 11:45:30 +0100 > Joao Martins wrote: > > > 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_enabl

Re: [PATCH 0/4] hw/nvme: add support for TP4084

2022-06-16 Thread Keith Busch
On Thu, Jun 16, 2022 at 12:42:49PM +0200, Klaus Jensen wrote: > On Jun 8 03:28, Niklas Cassel via wrote: > > Hello there, > > > > considering that Linux v5.19-rc1 is out which includes support for > > NVMe TP4084: > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/drive

Re: [PATCH 0/9] Preliminary patches for subproject split

2022-06-16 Thread Marc-André Lureau
Hi On Thu, Jun 16, 2022 at 5:12 PM Paolo Bonzini wrote: > > On 6/16/22 14:40, marcandre.lur...@redhat.com wrote: > > From: Marc-André Lureau > > > > Hi, > > > > Here is another subset of the large "subproject(qga)"" series I intend to > > send > > soon after (https://gitlab.com/marcandre.lureau

[PATCH v7 13/18] job.h: define unlocked functions

2022-06-16 Thread Emanuele Giuseppe Esposito
All these functions assume that the lock is not held, and acquire it internally. These functions will be useful when job_lock is globally applied, as they will allow callers to access the job struct fields without worrying about the job lock. Update also the comments in blockjob.c (and move them

Re: [PATCH 1/8] migration: Implemented new parameter stream_content

2022-06-16 Thread Nikita
On 6/16/22 4:10 PM, Daniel P. Berrangé wrote: On Thu, Jun 16, 2022 at 03:53:29PM +0300, Nikita wrote: On 6/16/22 1:32 PM, Daniel P. Berrangé wrote: On Thu, Jun 16, 2022 at 01:19:57PM +0300, nikita.laps...@openvz.org wrote: From: Nikita Lapshin This new optional parameter contains inormatio

[PATCH v7 11/18] job.h: rename job API functions called with job_mutex held

2022-06-16 Thread Emanuele Giuseppe Esposito
With the *nop* job_lock/unlock placed, rename the job functions of the job API that are always under job_mutex, adding "_locked" suffix. List of functions that get this suffix: job_txn_unref job_txn_add_job job_ref job_unref job_enter_cond job_finish_sync job_is_

Re: [PATCH v5 2/5] i386/pc: create pci-host qdev prior to pc_memory_init()

2022-06-16 Thread Reviewed-by: Igor Mammedov
On Fri, 20 May 2022 11:45:29 +0100 Joao Martins wrote: > 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 t

[PATCH v7 09/18] block/mirror.c: use of job helpers in drivers to avoid TOC/TOU

2022-06-16 Thread Emanuele Giuseppe Esposito
Once job lock is used and aiocontext is removed, mirror has to perform job operations under the same critical section, using the helpers prepared in previous commit. Note: at this stage, job_{lock/unlock} and job lock guard macros are *nop*. Signed-off-by: Emanuele Giuseppe Esposito Reviewed-by:

[PATCH v7 10/18] jobs: rename static functions called with job_mutex held

2022-06-16 Thread Emanuele Giuseppe Esposito
With the *nop* job_lock/unlock placed, rename the static functions that are always under job_mutex, adding "_locked" suffix. List of functions that get this suffix: job_txn_refjob_txn_del_job job_txn_apply job_state_transition job_should_pause job_event_cance

[PATCH v7 05/18] job.h: add _locked duplicates for job API functions called with and without job_mutex

2022-06-16 Thread Emanuele Giuseppe Esposito
In preparation to the job_lock/unlock usage, create _locked duplicates of some functions, since they will be sometimes called with job_mutex held (mostly within job.c), and sometimes without (mostly from JobDrivers using the job API). Therefore create a _locked version of such function, so that it

[PATCH v7 03/18] job.c: API functions not used outside should be static

2022-06-16 Thread Emanuele Giuseppe Esposito
job_event_* functions can all be static, as they are not used outside job.c. Same applies for job_txn_add_job(). Reviewed-by: Stefan Hajnoczi Signed-off-by: Emanuele Giuseppe Esposito --- include/qemu/job.h | 18 -- job.c | 22 +++--- 2 files change

[PATCH v7 15/18] job: detect change of aiocontext within job coroutine

2022-06-16 Thread Emanuele Giuseppe Esposito
From: Paolo Bonzini We want to make sure access of job->aio_context is always done under either BQL or job_mutex. The problem is that using aio_co_enter(job->aiocontext, job->co) in job_start and job_enter_cond makes the coroutine immediately resume, so we can't hold the job lock. And caching it

Re: [PATCH v5 3/5] i386/pc: pass pci_hole64_size to pc_memory_init()

2022-06-16 Thread Igor Mammedov
On Fri, 20 May 2022 11:45:30 +0100 Joao Martins wrote: > 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 p

[PATCH v7 16/18] jobs: protect job.aio_context with BQL and job_mutex

2022-06-16 Thread Emanuele Giuseppe Esposito
In order to make it thread safe, implement a "fake rwlock", where we allow reads under BQL *or* job_mutex held, but writes only under BQL *and* job_mutex. The only write we have is in child_job_set_aio_ctx, which always happens under drain (so the job is paused). For this reason, introduce job_set

[PATCH v7 00/18] job: replace AioContext lock with job_mutex

2022-06-16 Thread Emanuele Giuseppe Esposito
In this series, we want to remove the AioContext lock and instead use the already existent job_mutex to protect the job structures and list. This is part of the work to get rid of AioContext lock usage in favour of smaller granularity locks. In order to simplify reviewer's job, job lock/unlock fun

Re: [PATCH 0/9] Preliminary patches for subproject split

2022-06-16 Thread Paolo Bonzini
On 6/16/22 14:40, marcandre.lur...@redhat.com wrote: From: Marc-André Lureau Hi, Here is another subset of the large "subproject(qga)"" series I intend to send soon after (https://gitlab.com/marcandre.lureau/qemu/-/commits/qga). Hi, I took a peek there and I have a question. While the conf

[PATCH v7 17/18] job.c: enable job lock/unlock and remove Aiocontext locks

2022-06-16 Thread Emanuele Giuseppe Esposito
Change the job_{lock/unlock} and macros to use job_mutex. Now that they are not nop anymore, remove the aiocontext to avoid deadlocks. Therefore: - when possible, remove completely the aiocontext lock/unlock pair - if it is used by some other function too, reduce the locking section as much as po

[PATCH v7 08/18] jobs: use job locks also in the unit tests

2022-06-16 Thread Emanuele Giuseppe Esposito
Add missing job synchronization in the unit tests, with explicit locks. Note: at this stage, job_{lock/unlock} and job lock guard macros are *nop*. Signed-off-by: Emanuele Giuseppe Esposito --- tests/unit/test-bdrv-drain.c | 76 - tests/unit/test-block-iothread.c |

Re: [PATCH 1/8] migration: Implemented new parameter stream_content

2022-06-16 Thread Daniel P . Berrangé
On Thu, Jun 16, 2022 at 03:53:29PM +0300, Nikita wrote: > > On 6/16/22 1:32 PM, Daniel P. Berrangé wrote: > > On Thu, Jun 16, 2022 at 01:19:57PM +0300, nikita.laps...@openvz.org wrote: > > > From: Nikita Lapshin > > > > > > This new optional parameter contains inormation about migration > > > st

[PATCH v7 06/18] jobs: protect jobs with job_lock/unlock

2022-06-16 Thread Emanuele Giuseppe Esposito
Introduce the job locking mechanism through the whole job API, following the comments in job.h and requirements of job-monitor (like the functions in job-qmp.c, assume lock is held) and job-driver (like in mirror.c and all other JobDriver, lock is not held). Use the _locked helpers introduced bef

Re: misaligned-pointer-use libslirp/src/tcp_input.c

2022-06-16 Thread Alexander Bulekov
Is this an --enable-sanitizers build? The virtual-device fuzzer catches these periodically while fuzzing network-devices. However I don't think OSS-Fuzz creates reports for them for some reason. I can create qtest reproducers, if that is useful. -Alex On 220615 0942, Patrick Venture wrote: > Hey

[PATCH v7 18/18] block_job_query: remove atomic read

2022-06-16 Thread Emanuele Giuseppe Esposito
Not sure what the atomic here was supposed to do, since job.busy is protected by the job lock. Since the whole function is called under job_mutex, just remove the atomic. Reviewed-by: Stefan Hajnoczi Signed-off-by: Emanuele Giuseppe Esposito --- blockjob.c | 2 +- 1 file changed, 1 insertion(+)

[PATCH v7 01/18] job.c: make job_mutex and job_lock/unlock() public

2022-06-16 Thread Emanuele Giuseppe Esposito
job mutex will be used to protect the job struct elements and list, replacing AioContext locks. Right now use a shared lock for all jobs, in order to keep things simple. Once the AioContext lock is gone, we can introduce per-job locks. To simplify the switch from aiocontext to job lock, introduce

  1   2   3   >