[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 89cf65: hw/virtio/virtio-crypto: Fix op_code
From: |
Richard Henderson |
Subject: |
[Qemu-commits] [qemu/qemu] 89cf65: hw/virtio/virtio-crypto: Fix op_code assignment in... |
Date: |
Tue, 23 Jul 2024 16:32:48 -0700 |
Branch: refs/heads/staging
Home: https://github.com/qemu/qemu
Commit: 89cf6574bc4bcdb99894e9401ecea0063d8212ce
https://github.com/qemu/qemu/commit/89cf6574bc4bcdb99894e9401ecea0063d8212ce
Author: Zheyu Ma <zheyuma97@gmail.com>
Date: 2024-07-21 (Sun, 21 Jul 2024)
Changed paths:
M hw/virtio/virtio-crypto.c
Log Message:
-----------
hw/virtio/virtio-crypto: Fix op_code assignment in
virtio_crypto_create_asym_session
Currently, if the function fails during the key_len check, the op_code
does not have a proper value, causing virtio_crypto_free_create_session_req
not to free the memory correctly, leading to a memory leak.
By setting the op_code before performing any checks, we ensure that
virtio_crypto_free_create_session_req has the correct context to
perform cleanup operations properly, thus preventing memory leaks.
ASAN log:
==3055068==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 512 byte(s) in 1 object(s) allocated from:
#0 0x5586a75e6ddd in malloc
llvm/compiler-rt/lib/asan/asan_malloc_linux.cpp:129:3
#1 0x7fb6b63b6738 in g_malloc
(/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x5e738)
#2 0x5586a864bbde in virtio_crypto_handle_ctrl
hw/virtio/virtio-crypto.c:407:19
#3 0x5586a94fc84c in virtio_queue_notify_vq hw/virtio/virtio.c:2277:9
#4 0x5586a94fc0a2 in virtio_queue_host_notifier_read
hw/virtio/virtio.c:3641:9
Signed-off-by: Zheyu Ma <zheyuma97@gmail.com>
Message-Id: <20240702211835.3064505-1-zheyuma97@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 7967b7e0b17cb5e700ca040e0b68ba8fb0035c0d
https://github.com/qemu/qemu/commit/7967b7e0b17cb5e700ca040e0b68ba8fb0035c0d
Author: Stefano Garzarella <sgarzare@redhat.com>
Date: 2024-07-21 (Sun, 21 Jul 2024)
Changed paths:
M MAINTAINERS
Log Message:
-----------
MAINTAINERS: add Stefano Garzarella as vhost/vhost-user reviewer
I have recently been working on supporting vhost-user on any POSIX,
so I want to help maintain it.
Cc: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20240704081336.21208-1-sgarzare@redhat.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: b7dbfe4f47884e67a309c206b3eadec339a0d3b6
https://github.com/qemu/qemu/commit/b7dbfe4f47884e67a309c206b3eadec339a0d3b6
Author: Fan Ni <fan.ni@samsung.com>
Date: 2024-07-21 (Sun, 21 Jul 2024)
Changed paths:
M hw/cxl/cxl-mailbox-utils.c
Log Message:
-----------
hw/cxl/cxl-mailbox-utils: remove unneeded mailbox output payload space zeroing
The whole mailbox output payload space is already zeroed after copying
out the input payload, which happens before processing the specific mailbox
command:
https://elixir.bootlin.com/qemu/v8.2.1/source/hw/cxl/cxl-device-utils.c#L204
Signed-off-by: Fan Ni <fan.ni@samsung.com>
Link: https://lore.kernel.org/r/20240221221824.1092966-1-nifan.cxl@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20240705113956.941732-3-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 9de2049c95e1a94e27430e71a9d9ace07ec8eda6
https://github.com/qemu/qemu/commit/9de2049c95e1a94e27430e71a9d9ace07ec8eda6
Author: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Date: 2024-07-21 (Sun, 21 Jul 2024)
Changed paths:
M hw/mem/cxl_type3.c
Log Message:
-----------
hw/cxl: Check for multiple mappings of memory backends.
Similar protection to that provided for -numa memdev=x
to make sure that memory used to back a type3 device is not also mapped
as normal RAM, or for multiple type3 devices.
This is an easy footgun to remove and seems multiple people have
run into it.
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20240705113956.941732-4-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: a207d5f87d66f7933b50677e047498fc4af63e1f
https://github.com/qemu/qemu/commit/a207d5f87d66f7933b50677e047498fc4af63e1f
Author: Zhao Liu <zhao1.liu@intel.com>
Date: 2024-07-21 (Sun, 21 Jul 2024)
Changed paths:
M hw/cxl/cxl-host.c
Log Message:
-----------
hw/cxl/cxl-host: Fix segmentation fault when getting cxl-fmw property
QEMU crashes (Segmentation fault) when getting cxl-fmw property via
qmp:
(QEMU) qom-get path=machine property=cxl-fmw
This issue is caused by accessing wrong callback (opaque) type in
machine_get_cfmw().
cxl_machine_init() sets the callback as `CXLState *` type but
machine_get_cfmw() treats the callback as
`CXLFixedMemoryWindowOptionsList **`.
Fix this error by casting opaque to `CXLState *` type in
machine_get_cfmw().
Fixes: 03b39fcf64bc ("hw/cxl: Make the CXL fixed memory window setup a machine
parameter.")
Signed-off-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Li Zhijian <lizhijian@fujitsu.com>
Reviewed-by: Xingtao Yao <yaoxt.fnst@fujitsu.com>
Link:
https://lore.kernel.org/r/20240704093404.1848132-1-zhao1.liu@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20240705113956.941732-2-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: d61cc5b6a8d373376a8bf5ec29cfc3267a29efbe
https://github.com/qemu/qemu/commit/d61cc5b6a8d373376a8bf5ec29cfc3267a29efbe
Author: Davidlohr Bueso <dave@stgolabs.net>
Date: 2024-07-21 (Sun, 21 Jul 2024)
Changed paths:
M hw/cxl/cxl-mailbox-utils.c
M hw/mem/cxl_type3.c
M include/hw/cxl/cxl_device.h
Log Message:
-----------
hw/cxl: Add get scan media capabilities cmd support
Use simple heuristics to determine the cost of scanning any given
chunk, assuming cost is equal across the whole device, without
differentiating between volatile or persistent partitions. This
is aligned to the fact that these constraints are not enforced
in respective poison query commands.
Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
Link: https://lore.kernel.org/r/20230908073152.4386-3-dave@stgolabs.net
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20240705120643.959422-2-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 75b800dd3bd8042503ddd4e8a4169f34349325e2
https://github.com/qemu/qemu/commit/75b800dd3bd8042503ddd4e8a4169f34349325e2
Author: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Date: 2024-07-21 (Sun, 21 Jul 2024)
Changed paths:
M hw/cxl/cxl-mailbox-utils.c
M hw/mem/cxl_type3.c
M include/hw/cxl/cxl_device.h
Log Message:
-----------
hw/cxl/mbox: replace sanitize_running() with cxl_dev_media_disabled()
The spec states that reads/writes should have no effect and a part of
commands should be ignored when the media is disabled, not when the
sanitize command is running.
Introduce cxl_dev_media_disabled() to check if the media is disabled and
replace sanitize_running() with it.
Make sure that the media has been correctly disabled during sanitation
by adding an assert to __toggle_media(). Now, enabling when already
enabled or vice versa results in an assert() failure.
Suggested-by: Davidlohr Bueso <dave@stgolabs.net>
Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Link: https://lore.kernel.org/r/20231222090051.3265307-4-42.hyeyoo@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20240705120643.959422-3-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 7d65874ba0ea8cdb2a5ac51c397d721d7d49d828
https://github.com/qemu/qemu/commit/7d65874ba0ea8cdb2a5ac51c397d721d7d49d828
Author: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Date: 2024-07-21 (Sun, 21 Jul 2024)
Changed paths:
M hw/cxl/cxl-events.c
M hw/cxl/cxl-mailbox-utils.c
M include/hw/cxl/cxl_device.h
Log Message:
-----------
hw/cxl/events: discard all event records during sanitation
Per CXL r3.1 Section 8.2.9.9.5.1: Sanitize (Opcode 4400h), the
sanitize command should delete all event logs. Introduce
cxl_discard_all_event_logs() and call
this in __do_sanitization().
Signed-off-by: Hyeonggon Yoo <42.hyeyoo@gmail.com>
Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
Link: https://lore.kernel.org/r/20231222090051.3265307-5-42.hyeyoo@gmail.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20240705120643.959422-4-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 89b5cfcc31e655a40919698a7f95a9208d6f12a3
https://github.com/qemu/qemu/commit/89b5cfcc31e655a40919698a7f95a9208d6f12a3
Author: Davidlohr Bueso <dave@stgolabs.net>
Date: 2024-07-21 (Sun, 21 Jul 2024)
Changed paths:
M hw/cxl/cxl-mailbox-utils.c
M include/hw/cxl/cxl_device.h
Log Message:
-----------
hw/cxl: Add get scan media results cmd support
Iterate over the list keeping the output payload size into account,
returning the results from a previous scan media operation. The
scan media operation does not fail prematurely due to device being
out of storage, so this implementation does not deal with the
retry/restart functionality.
Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
Link: https://lore.kernel.org/r/20230908073152.4386-5-dave@stgolabs.net
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20240705120643.959422-5-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 25da36d5d04deb8869bd6ad1223832f09f3efe79
https://github.com/qemu/qemu/commit/25da36d5d04deb8869bd6ad1223832f09f3efe79
Author: Gregory Price <gourry.memverge@gmail.com>
Date: 2024-07-21 (Sun, 21 Jul 2024)
Changed paths:
M hw/cxl/cxl-mailbox-utils.c
A include/hw/cxl/cxl_mailbox.h
Log Message:
-----------
cxl/mailbox: move mailbox effect definitions to a header
Preparation for allowing devices to define their own CCI commands
Signed-off-by: Gregory Price <gregory.price@memverge.com>
Link:
https://lore.kernel.org/r/20230906001517.324380-2-gregory.price@memverge.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20240705123039.963781-2-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: d80378943a6b88b8d211e1468073d9dd44239e27
https://github.com/qemu/qemu/commit/d80378943a6b88b8d211e1468073d9dd44239e27
Author: Shiju Jose <shiju.jose@huawei.com>
Date: 2024-07-21 (Sun, 21 Jul 2024)
Changed paths:
M hw/cxl/cxl-mailbox-utils.c
M include/hw/cxl/cxl_device.h
Log Message:
-----------
hw/cxl/cxl-mailbox-utils: Add support for feature commands (8.2.9.6)
CXL spec 3.1 section 8.2.9.6 describes optional device specific features.
CXL devices supports features with changeable attributes.
Get Supported Features retrieves the list of supported device specific
features. The settings of a feature can be retrieved using Get Feature and
optionally modified using Set Feature.
Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
Reviewed-by: Fan Ni <fan.ni@samsung.com>
Signed-off-by: Shiju Jose <shiju.jose@huawei.com>
Link: https://lore.kernel.org/r/20240223085902.1549-2-shiju.jose@huawei.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20240705123039.963781-3-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: d88f667414106c7216485774293d0831c2482d20
https://github.com/qemu/qemu/commit/d88f667414106c7216485774293d0831c2482d20
Author: Shiju Jose <shiju.jose@huawei.com>
Date: 2024-07-21 (Sun, 21 Jul 2024)
Changed paths:
M hw/cxl/cxl-mailbox-utils.c
M hw/mem/cxl_type3.c
M include/hw/cxl/cxl_device.h
Log Message:
-----------
hw/cxl/cxl-mailbox-utils: Add device patrol scrub control feature
CXL spec 3.1 section 8.2.9.9.11.1 describes the device patrol scrub control
feature. The device patrol scrub proactively locates and makes corrections
to errors in regular cycle. The patrol scrub control allows the request to
configure patrol scrub input configurations.
The patrol scrub control allows the requester to specify the number of
hours for which the patrol scrub cycles must be completed, provided that
the requested number is not less than the minimum number of hours for the
patrol scrub cycle that the device is capable of. In addition, the patrol
scrub controls allow the host to disable and enable the feature in case
disabling of the feature is needed for other purposes such as
performance-aware operations which require the background operations to be
turned off.
Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
Reviewed-by: Fan Ni <fan.ni@samsung.com>
Signed-off-by: Shiju Jose <shiju.jose@huawei.com>
Link: https://lore.kernel.org/r/20240223085902.1549-3-shiju.jose@huawei.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20240705123039.963781-4-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 2d41ce38fb9af3e66f85c8b8f9c3f83148c3d549
https://github.com/qemu/qemu/commit/2d41ce38fb9af3e66f85c8b8f9c3f83148c3d549
Author: Shiju Jose <shiju.jose@huawei.com>
Date: 2024-07-21 (Sun, 21 Jul 2024)
Changed paths:
M hw/cxl/cxl-mailbox-utils.c
M hw/mem/cxl_type3.c
M include/hw/cxl/cxl_device.h
Log Message:
-----------
hw/cxl/cxl-mailbox-utils: Add device DDR5 ECS control feature
CXL spec 3.1 section 8.2.9.9.11.2 describes the DDR5 Error Check Scrub (ECS)
control feature.
The Error Check Scrub (ECS) is a feature defined in JEDEC DDR5 SDRAM
Specification (JESD79-5) and allows the DRAM to internally read, correct
single-bit errors, and write back corrected data bits to the DRAM array
while providing transparency to error counts. The ECS control feature
allows the request to configure ECS input configurations during system
boot or at run-time.
The ECS control allows the requester to change the log entry type, the ECS
threshold count provided that the request is within the definition
specified in DDR5 mode registers, change mode between codeword mode and
row count mode, and reset the ECS counter.
Reviewed-by: Davidlohr Bueso <dave@stgolabs.net>
Reviewed-by: Fan Ni <fan.ni@samsung.com>
Signed-off-by: Shiju Jose <shiju.jose@huawei.com>
Link: https://lore.kernel.org/r/20240223085902.1549-4-shiju.jose@huawei.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20240705123039.963781-5-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 3c1e1e5e240e683f0611b96cd325471639f22c6d
https://github.com/qemu/qemu/commit/3c1e1e5e240e683f0611b96cd325471639f22c6d
Author: Davidlohr Bueso <dave@stgolabs.net>
Date: 2024-07-21 (Sun, 21 Jul 2024)
Changed paths:
M hw/cxl/cxl-mailbox-utils.c
M include/hw/cxl/cxl_device.h
Log Message:
-----------
hw/cxl: Support firmware updates
Implement transfer and activate functionality per 3.1 spec for
supporting update metadata (no actual buffers). Transfer times
are arbitrarily set to ten and two seconds for full and part
transfers, respectively.
cxl update-firmware mem0 -F fw.img
<on-going fw update>
cxl update-firmware mem0
"memdev":"mem0",
"pmem_size":"1024.00 MiB (1073.74 MB)",
"serial":"0",
"host":"0000:0d:00.0",
"firmware":{
"num_slots":2,
"active_slot":1,
"online_activate_capable":true,
"slot_1_version":"BWFW VERSION 0",
"fw_update_in_progress":true,
"remaining_size":22400
}
}
<completed fw update>
cxl update-firmware mem0
{
"memdev":"mem0",
"pmem_size":"1024.00 MiB (1073.74 MB)",
"serial":"0",
"host":"0000:0d:00.0",
"firmware":{
"num_slots":2,
"active_slot":1,
"staged_slot":2,
"online_activate_capable":true,
"slot_1_version":"BWFW VERSION 0",
"slot_2_version":"BWFW VERSION 1",
"fw_update_in_progress":false
}
}
Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
Link: https://lore.kernel.org/r/20240627164912.25630-1-dave@stgolabs.net
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20240705125915.991672-2-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: e3f15732c479e6c4baa56af65f52d99fbfb5c417
https://github.com/qemu/qemu/commit/e3f15732c479e6c4baa56af65f52d99fbfb5c417
Author: Yi Liu <yi.l.liu@intel.com>
Date: 2024-07-21 (Sun, 21 Jul 2024)
Changed paths:
M MAINTAINERS
Log Message:
-----------
MAINTAINERS: Add myself as a VT-d reviewer
Signed-off-by: Yi Liu <yi.l.liu@intel.com>
Message-Id: <20240708032112.796339-1-yi.l.liu@intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 98e77e3dd8dd6e7aa9a7dffa60f49c8c8a49d4e3
https://github.com/qemu/qemu/commit/98e77e3dd8dd6e7aa9a7dffa60f49c8c8a49d4e3
Author: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Date: 2024-07-21 (Sun, 21 Jul 2024)
Changed paths:
M hw/audio/virtio-snd.c
Log Message:
-----------
virtio-snd: add max size bounds check in input cb
When reading input audio in the virtio-snd input callback,
virtio_snd_pcm_in_cb(), we do not check whether the iov can actually fit
the data buffer. This is because we use the buffer->size field as a
total-so-far accumulator instead of byte-size-left like in TX buffers.
This triggers an out of bounds write if the size of the virtio queue
element is equal to virtio_snd_pcm_status, which makes the available
space for audio data zero. This commit adds a check for reaching the
maximum buffer size before attempting any writes.
Reported-by: Zheyu Ma <zheyuma97@gmail.com>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2427
Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Message-Id: <virtio-snd-fuzz-2427-fix-v1-manos.pitsidianakis@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 9b6083465fb8311f2410615f8303a41f580a2a20
https://github.com/qemu/qemu/commit/9b6083465fb8311f2410615f8303a41f580a2a20
Author: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Date: 2024-07-21 (Sun, 21 Jul 2024)
Changed paths:
M hw/audio/virtio-snd.c
Log Message:
-----------
virtio-snd: check for invalid param shift operands
When setting the parameters of a PCM stream, we compute the bit flag
with the format and rate values as shift operand to check if they are
set in supported_formats and supported_rates.
If the guest provides a format/rate value which when shifting 1 results
in a value bigger than the number of bits in
supported_formats/supported_rates, we must report an error.
Previously, this ended up triggering the not reached assertions later
when converting to internal QEMU values.
Reported-by: Zheyu Ma <zheyuma97@gmail.com>
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2416
Signed-off-by: Manos Pitsidianakis <manos.pitsidianakis@linaro.org>
Message-Id: <virtio-snd-fuzz-2416-fix-v1-manos.pitsidianakis@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: a3c8d7e38550c3d5a46e6fa94ffadfa625a4861d
https://github.com/qemu/qemu/commit/a3c8d7e38550c3d5a46e6fa94ffadfa625a4861d
Author: Clément Mathieu--Drif <clement.mathieu--drif@eviden.com>
Date: 2024-07-21 (Sun, 21 Jul 2024)
Changed paths:
M hw/i386/intel_iommu_internal.h
Log Message:
-----------
intel_iommu: fix FRCD construction macro
The constant must be unsigned, otherwise the two's complement
overrides the other fields when a PASID is present.
Fixes: 1b2b12376c8a ("intel-iommu: PASID support")
Signed-off-by: Clément Mathieu--Drif <clement.mathieu--drif@eviden.com>
Reviewed-by: Yi Liu <yi.l.liu@intel.com>
Reviewed-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Minwoo Im <minwoo.im@samsung.com>
Message-Id: <20240709142557.317271-2-clement.mathieu--drif@eviden.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 3a23554f91c01cf75705a36a5eed3ebef6636d41
https://github.com/qemu/qemu/commit/3a23554f91c01cf75705a36a5eed3ebef6636d41
Author: Clément Mathieu--Drif <clement.mathieu--drif@eviden.com>
Date: 2024-07-21 (Sun, 21 Jul 2024)
Changed paths:
M hw/i386/intel_iommu_internal.h
Log Message:
-----------
intel_iommu: move VTD_FRCD_PV and VTD_FRCD_PP declarations
These 2 macros are for high 64-bit of the FRCD registers.
Declarations have to be moved accordingly.
Signed-off-by: Clément Mathieu--Drif <clement.mathieu--drif@eviden.com>
Reviewed-by: Minwoo Im <minwoo.im@samsung.com>
Reviewed-by: Yi Liu <yi.l.liu@intel.com>
Message-Id: <20240709142557.317271-3-clement.mathieu--drif@eviden.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: d7258f7a250716231d23d5412dd6caf923936549
https://github.com/qemu/qemu/commit/d7258f7a250716231d23d5412dd6caf923936549
Author: Clément Mathieu--Drif <clement.mathieu--drif@eviden.com>
Date: 2024-07-21 (Sun, 21 Jul 2024)
Changed paths:
M hw/i386/intel_iommu_internal.h
Log Message:
-----------
intel_iommu: fix type of the mask field in VTDIOTLBPageInvInfo
Per the below code, it can overflow as am can be larger than 8 according
to the CH 6.5.2.3 IOTLB Invalidate. Use uint64_t to avoid overflows.
Fixes: b5a280c00840 ("intel-iommu: add IOTLB using hash table")
Signed-off-by: Clément Mathieu--Drif <clement.mathieu--drif@eviden.com>
Reviewed-by: Minwoo Im <minwoo.im@samsung.com>
Reviewed-by: Yi Liu <yi.l.liu@intel.com>
Message-Id: <20240709142557.317271-4-clement.mathieu--drif@eviden.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: bb3a23d5b0b43bed3c9a6ecf5a6871e2871be883
https://github.com/qemu/qemu/commit/bb3a23d5b0b43bed3c9a6ecf5a6871e2871be883
Author: Clément Mathieu--Drif <clement.mathieu--drif@eviden.com>
Date: 2024-07-21 (Sun, 21 Jul 2024)
Changed paths:
M hw/i386/intel_iommu.c
Log Message:
-----------
intel_iommu: make type match
The 'level' field in vtd_iotlb_key is an unsigned integer.
We don't need to store level as an int in vtd_lookup_iotlb.
This is not an issue by itself, but using unsigned here seems cleaner.
Signed-off-by: Clément Mathieu--Drif <clement.mathieu--drif@eviden.com>
Reviewed-by: Yi Liu <yi.l.liu@intel.com>
Message-Id: <20240709142557.317271-5-clement.mathieu--drif@eviden.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: c303aa0942589427b42192ef7cff75a79ef8646b
https://github.com/qemu/qemu/commit/c303aa0942589427b42192ef7cff75a79ef8646b
Author: Jonah Palmer <jonah.palmer@oracle.com>
Date: 2024-07-21 (Sun, 21 Jul 2024)
Changed paths:
M include/hw/virtio/virtio.h
Log Message:
-----------
virtio: Add bool to VirtQueueElement
Add the boolean 'in_order_filled' member to the VirtQueueElement structure.
The use of this boolean will signify whether the element has been processed
and is ready to be flushed (so long as the element is in-order). This
boolean is used to support the VIRTIO_F_IN_ORDER feature.
Reviewed-by: Eugenio Pérez <eperezma@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <20240710125522.4168043-2-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 2256e8482b2bba88abcc734dbc6951b825773f0b
https://github.com/qemu/qemu/commit/2256e8482b2bba88abcc734dbc6951b825773f0b
Author: Jonah Palmer <jonah.palmer@oracle.com>
Date: 2024-07-21 (Sun, 21 Jul 2024)
Changed paths:
M hw/virtio/virtio.c
Log Message:
-----------
virtio: virtqueue_pop - VIRTIO_F_IN_ORDER support
Add VIRTIO_F_IN_ORDER feature support in virtqueue_split_pop and
virtqueue_packed_pop.
VirtQueueElements popped from the available/descritpor ring are added to
the VirtQueue's used_elems array in-order and in the same fashion as
they would be added the used and descriptor rings, respectively.
This will allow us to keep track of the current order, what elements
have been written, as well as an element's essential data after being
processed.
Reviewed-by: Eugenio Pérez <eperezma@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <20240710125522.4168043-3-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: b44135daa3721778f4656ca3c15bd9b3060f1176
https://github.com/qemu/qemu/commit/b44135daa3721778f4656ca3c15bd9b3060f1176
Author: Jonah Palmer <jonah.palmer@oracle.com>
Date: 2024-07-21 (Sun, 21 Jul 2024)
Changed paths:
M hw/virtio/virtio.c
Log Message:
-----------
virtio: virtqueue_ordered_fill - VIRTIO_F_IN_ORDER support
Add VIRTIO_F_IN_ORDER feature support for the virtqueue_fill operation.
The goal of the virtqueue_ordered_fill operation when the
VIRTIO_F_IN_ORDER feature has been negotiated is to search for this
now-used element, set its length, and mark the element as filled in
the VirtQueue's used_elems array.
By marking the element as filled, it will indicate that this element has
been processed and is ready to be flushed, so long as the element is
in-order.
Reviewed-by: Eugenio Pérez <eperezma@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <20240710125522.4168043-4-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 844619147c5110f335cbbbad51cda6a898c7ef33
https://github.com/qemu/qemu/commit/844619147c5110f335cbbbad51cda6a898c7ef33
Author: Jonah Palmer <jonah.palmer@oracle.com>
Date: 2024-07-21 (Sun, 21 Jul 2024)
Changed paths:
M hw/virtio/virtio.c
Log Message:
-----------
virtio: virtqueue_ordered_flush - VIRTIO_F_IN_ORDER support
Add VIRTIO_F_IN_ORDER feature support for the virtqueue_flush operation.
The goal of the virtqueue_ordered_flush operation when the
VIRTIO_F_IN_ORDER feature has been negotiated is to write elements to
the used/descriptor ring in-order and then update used_idx.
The function iterates through the VirtQueueElement used_elems array
in-order starting at vq->used_idx. If the element is valid (filled), the
element is written to the used/descriptor ring. This process continues
until we find an invalid (not filled) element.
For packed VQs, the first entry (at vq->used_idx) is written to the
descriptor ring last so the guest doesn't see any invalid descriptors.
If any elements were written, the used_idx is updated.
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <20240710125522.4168043-5-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Eugenio Pérez <eperezma@redhat.com>
Commit: c03213fdc9d7b680cc575cd1e725750702a10b09
https://github.com/qemu/qemu/commit/c03213fdc9d7b680cc575cd1e725750702a10b09
Author: Jonah Palmer <jonah.palmer@oracle.com>
Date: 2024-07-21 (Sun, 21 Jul 2024)
Changed paths:
M hw/block/vhost-user-blk.c
M hw/net/vhost_net.c
M hw/scsi/vhost-scsi.c
M hw/scsi/vhost-user-scsi.c
M hw/virtio/vhost-user-fs.c
M hw/virtio/vhost-user-vsock.c
M net/vhost-vdpa.c
Log Message:
-----------
vhost,vhost-user: Add VIRTIO_F_IN_ORDER to vhost feature bits
Add support for the VIRTIO_F_IN_ORDER feature across a variety of vhost
devices.
The inclusion of VIRTIO_F_IN_ORDER in the feature bits arrays for these
devices ensures that the backend is capable of offering and providing
support for this feature, and that it can be disabled if the backend
does not support it.
Acked-by: Eugenio Pérez <eperezma@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <20240710125522.4168043-6-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 0b0bb34f342f04ab8255a64edb7c6aec7105dc94
https://github.com/qemu/qemu/commit/0b0bb34f342f04ab8255a64edb7c6aec7105dc94
Author: Jonah Palmer <jonah.palmer@oracle.com>
Date: 2024-07-21 (Sun, 21 Jul 2024)
Changed paths:
M include/hw/virtio/virtio.h
Log Message:
-----------
virtio: Add VIRTIO_F_IN_ORDER property definition
Extend the virtio device property definitions to include the
VIRTIO_F_IN_ORDER feature.
The default state of this feature is disabled, allowing it to be
explicitly enabled where it's supported.
Acked-by: Eugenio Pérez <eperezma@redhat.com>
Signed-off-by: Jonah Palmer <jonah.palmer@oracle.com>
Message-Id: <20240710125522.4168043-7-jonah.palmer@oracle.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 99d7c1b99a3fdb69213c09da6b7614243f877bee
https://github.com/qemu/qemu/commit/99d7c1b99a3fdb69213c09da6b7614243f877bee
Author: Stefano Garzarella <sgarzare@redhat.com>
Date: 2024-07-21 (Sun, 21 Jul 2024)
Changed paths:
M contrib/vhost-user-blk/vhost-user-blk.c
Log Message:
-----------
contrib/vhost-user-blk: fix overflowing expression
Coverity reported:
>>> CID 1549454: Integer handling issues (OVERFLOW_BEFORE_WIDEN)
>>> Potentially overflowing expression
"le32_to_cpu(desc->num_sectors) << 9" with type "uint32_t"
(32 bits, unsigned) is evaluated using 32-bit arithmetic, and
then used in a context that expects an expression of type
"uint64_t" (64 bits, unsigned).
199 le32_to_cpu(desc->num_sectors) << 9 };
Coverity noticed this issue after commit ab04420c3 ("contrib/vhost-user-*:
use QEMU bswap helper functions"), but it was pre-existing and introduced
from the beginning by commit caa1ee4313 ("vhost-user-blk: add
discard/write zeroes features support").
Explicitly cast the 32-bit value before the shift to fix this issue.
Fixes: Coverity CID 1549454
Fixes: 5ab04420c3 ("contrib/vhost-user-*: use QEMU bswap helper functions")
Fixes: caa1ee4313 ("vhost-user-blk: add discard/write zeroes features support")
Cc: changpeng.liu@intel.com
Suggested-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Stefano Garzarella <sgarzare@redhat.com>
Message-Id: <20240712153857.207440-1-sgarzare@redhat.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: ca6dd3aef8a103138c99788bcba8195d4905ddc5
https://github.com/qemu/qemu/commit/ca6dd3aef8a103138c99788bcba8195d4905ddc5
Author: Akihiko Odaki <akihiko.odaki@daynix.com>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M hw/pci/pci.c
Log Message:
-----------
hw/pci: Fix SR-IOV VF number calculation
pci_config_get_bar_addr() had a division by vf_stride. vf_stride needs
to be non-zero when there are multiple VFs, but the specification does
not prohibit to make it zero when there is only one VF.
Do not perform the division for the first VF to avoid division by zero.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20240715-sriov-v5-2-3f5539093ffc@daynix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 78f9d7fd1989311040beff54979bcb2a1ba0aff2
https://github.com/qemu/qemu/commit/78f9d7fd1989311040beff54979bcb2a1ba0aff2
Author: Akihiko Odaki <akihiko.odaki@daynix.com>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M hw/pci/pcie_sriov.c
Log Message:
-----------
pcie_sriov: Ensure PF and VF are mutually exclusive
A device cannot be a SR-IOV PF and a VF at the same time.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20240715-sriov-v5-3-3f5539093ffc@daynix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 47cc753e50076c25334091783738be9f716253b1
https://github.com/qemu/qemu/commit/47cc753e50076c25334091783738be9f716253b1
Author: Akihiko Odaki <akihiko.odaki@daynix.com>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M hw/pci/pcie_sriov.c
Log Message:
-----------
pcie_sriov: Check PCI Express for SR-IOV PF
SR-IOV requires PCI Express.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20240715-sriov-v5-4-3f5539093ffc@daynix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 122173a5830f7757f8a94a3b1559582f312e140b
https://github.com/qemu/qemu/commit/122173a5830f7757f8a94a3b1559582f312e140b
Author: Akihiko Odaki <akihiko.odaki@daynix.com>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M hw/pci/pci.c
M hw/pci/pcie_sriov.c
M include/hw/pci/pci_device.h
M include/hw/pci/pcie_sriov.h
Log Message:
-----------
pcie_sriov: Allow user to create SR-IOV device
A user can create a SR-IOV device by specifying the PF with the
sriov-pf property of the VFs. The VFs must be added before the PF.
A user-creatable VF must have PCIDeviceClass::sriov_vf_user_creatable
set. Such a VF cannot refer to the PF because it is created before the
PF.
A PF that user-creatable VFs can be attached calls
pcie_sriov_pf_init_from_user_created_vfs() during realization and
pcie_sriov_pf_exit() when exiting.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20240715-sriov-v5-5-3f5539093ffc@daynix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 3f868ffb0bae0c4feafabe34a371cded57fe3806
https://github.com/qemu/qemu/commit/3f868ffb0bae0c4feafabe34a371cded57fe3806
Author: Akihiko Odaki <akihiko.odaki@daynix.com>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M hw/virtio/virtio-pci.c
M include/hw/virtio/virtio-pci.h
Log Message:
-----------
virtio-pci: Implement SR-IOV PF
Allow user to attach SR-IOV VF to a virtio-pci PF.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20240715-sriov-v5-6-3f5539093ffc@daynix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: c2d6db6a1f39780b24538440091893f9fbe060a7
https://github.com/qemu/qemu/commit/c2d6db6a1f39780b24538440091893f9fbe060a7
Author: Akihiko Odaki <akihiko.odaki@daynix.com>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M hw/virtio/virtio-net-pci.c
Log Message:
-----------
virtio-net: Implement SR-IOV VF
A virtio-net device can be added as a SR-IOV VF to another virtio-pci
device that will be the PF.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20240715-sriov-v5-7-3f5539093ffc@daynix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: d6f40c95b35bd380340b698e4306704fe22a5d68
https://github.com/qemu/qemu/commit/d6f40c95b35bd380340b698e4306704fe22a5d68
Author: Akihiko Odaki <akihiko.odaki@daynix.com>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M MAINTAINERS
M docs/system/index.rst
A docs/system/sriov.rst
Log Message:
-----------
docs: Document composable SR-IOV device
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Message-Id: <20240715-sriov-v5-8-3f5539093ffc@daynix.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 62f182c97b31445012d37181005a83ff8453edaa
https://github.com/qemu/qemu/commit/62f182c97b31445012d37181005a83ff8453edaa
Author: Igor Mammedov <imammedo@redhat.com>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M hw/arm/virt.c
M hw/core/machine.c
M hw/i386/pc_piix.c
M hw/i386/pc_q35.c
M hw/smbios/smbios.c
M include/hw/boards.h
Log Message:
-----------
smbios: make memory device size configurable per Machine
Currently QEMU describes initial[1] RAM* in SMBIOS as a series of
virtual DIMMs (capped at 16Gb max) using type 17 structure entries.
Which is fine for the most cases. However when starting guest
with terabytes of RAM this leads to too many memory device
structures, which eventually upsets linux kernel as it reserves
only 64K for these entries and when that border is crossed out
it runs out of reserved memory.
Instead of partitioning initial RAM on 16Gb DIMMs, use maximum
possible chunk size that SMBIOS spec allows[2]. Which lets
encode RAM in lower 31 bits of 32bit field (which amounts upto
2047Tb per DIMM).
As result initial RAM will generate only one type 17 structure
until host/guest reach ability to use more RAM in the future.
Compat changes:
We can't unconditionally change chunk size as it will break
QEMU<->guest ABI (and migration). Thus introduce a new machine
class field that would let older versioned machines to use
legacy 16Gb chunks, while new(er) machine type[s] use maximum
possible chunk size.
PS:
While it might seem to be risky to rise max entry size this large
(much beyond of what current physical RAM modules support),
I'd not expect it causing much issues, modulo uncovering bugs
in software running within guest. And those should be fixed
on guest side to handle SMBIOS spec properly, especially if
guest is expected to support so huge RAM configs.
In worst case, QEMU can reduce chunk size later if we would
care enough about introducing a workaround for some 'unfixable'
guest OS, either by fixing up the next machine type or
giving users a CLI option to customize it.
1) Initial RAM - is RAM configured with help '-m SIZE' CLI option/
implicitly defined by machine. It doesn't include memory
configured with help of '-device' option[s] (pcdimm,nvdimm,...)
2) SMBIOS 3.1.0 7.18.5 Memory Device — Extended Size
PS:
* tested on 8Tb host with RHEL6 guest, which seems to parse
type 17 SMBIOS table entries correctly (according to 'dmidecode').
Signed-off-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20240715122417.4059293-1-imammedo@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 08c328682231b64878fc052a11091bea39577a6f
https://github.com/qemu/qemu/commit/08c328682231b64878fc052a11091bea39577a6f
Author: Salil Mehta <salil.mehta@huawei.com>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M accel/kvm/kvm-all.c
M accel/kvm/kvm-cpus.h
M accel/kvm/trace-events
M include/sysemu/kvm.h
Log Message:
-----------
accel/kvm: Extract common KVM vCPU {creation,parking} code
KVM vCPU creation is done once during the vCPU realization when Qemu vCPU thread
is spawned. This is common to all the architectures as of now.
Hot-unplug of vCPU results in destruction of the vCPU object in QOM but the
corresponding KVM vCPU object in the Host KVM is not destroyed as KVM doesn't
support vCPU removal. Therefore, its representative KVM vCPU object/context in
Qemu is parked.
Refactor architecture common logic so that some APIs could be reused by vCPU
Hotplug code of some architectures likes ARM, Loongson etc. Update new/old APIs
with trace events. New APIs qemu_{create,park,unpark}_vcpu() can be externally
called. No functional change is intended here.
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Tested-by: Vishnu Pajjuri <vishnu@os.amperecomputing.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Tested-by: Xianglai Li <lixianglai@loongson.cn>
Tested-by: Miguel Luis <miguel.luis@oracle.com>
Reviewed-by: Shaoqin Huang <shahuang@redhat.com>
Reviewed-by: Vishnu Pajjuri <vishnu@os.amperecomputing.com>
Reviewed-by: Nicholas Piggin <npiggin@gmail.com>
Tested-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20240716111502.202344-2-salil.mehta@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 2f1a85daf3d8d06e4b204c29c1d47c76a2bc81e6
https://github.com/qemu/qemu/commit/2f1a85daf3d8d06e4b204c29c1d47c76a2bc81e6
Author: Salil Mehta <salil.mehta@huawei.com>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M hw/acpi/cpu.c
M include/hw/acpi/cpu.h
Log Message:
-----------
hw/acpi: Move CPU ctrl-dev MMIO region len macro to common header file
CPU ctrl-dev MMIO region length could be used in ACPI GED and various other
architecture specific places. Move ACPI_CPU_HOTPLUG_REG_LEN macro to more
appropriate common header file.
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Shaoqin Huang <shahuang@redhat.com>
Tested-by: Vishnu Pajjuri <vishnu@os.amperecomputing.com>
Tested-by: Xianglai Li <lixianglai@loongson.cn>
Tested-by: Miguel Luis <miguel.luis@oracle.com>
Tested-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20240716111502.202344-3-salil.mehta@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 06f1f4958be70f14f527d1f03d1e9a141650bbc5
https://github.com/qemu/qemu/commit/06f1f4958be70f14f527d1f03d1e9a141650bbc5
Author: Salil Mehta <salil.mehta@huawei.com>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M docs/specs/acpi_hw_reduced_hotplug.rst
M hw/acpi/acpi-cpu-hotplug-stub.c
M hw/acpi/generic_event_device.c
M include/hw/acpi/generic_event_device.h
Log Message:
-----------
hw/acpi: Update ACPI GED framework to support vCPU Hotplug
ACPI GED (as described in the ACPI 6.4 spec) uses an interrupt listed in the
_CRS object of GED to intimate OSPM about an event. Later then demultiplexes the
notified event by evaluating ACPI _EVT method to know the type of event. Use
ACPI GED to also notify the guest kernel about any CPU hot(un)plug events.
Note, GED interface is used by many hotplug events like memory hotplug, NVDIMM
hotplug and non-hotplug events like system power down event. Each of these can
be selected using a bit in the 32 bit GED IO interface. A bit has been reserved
for the CPU hotplug event.
ACPI CPU hotplug related initialization should only happen if ACPI_CPU_HOTPLUG
support has been enabled for particular architecture. Add cpu_hotplug_hw_init()
stub to avoid compilation break.
Co-developed-by: Keqian Zhu <zhukeqian1@huawei.com>
Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Shaoqin Huang <shahuang@redhat.com>
Tested-by: Vishnu Pajjuri <vishnu@os.amperecomputing.com>
Tested-by: Xianglai Li <lixianglai@loongson.cn>
Tested-by: Miguel Luis <miguel.luis@oracle.com>
Reviewed-by: Vishnu Pajjuri <vishnu@os.amperecomputing.com>
Tested-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Zhao Liu <zhao1.liu@intel.com>
Message-Id: <20240716111502.202344-4-salil.mehta@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
Commit: 549c9a9dcbc1592ea79496f7b3ab234f366adeba
https://github.com/qemu/qemu/commit/549c9a9dcbc1592ea79496f7b3ab234f366adeba
Author: Salil Mehta <salil.mehta@huawei.com>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M hw/acpi/generic_event_device.c
M include/hw/acpi/generic_event_device.h
Log Message:
-----------
hw/acpi: Update GED _EVT method AML with CPU scan
OSPM evaluates _EVT method to map the event. The CPU hotplug event eventually
results in start of the CPU scan. Scan figures out the CPU and the kind of
event(plug/unplug) and notifies it back to the guest. Update the GED AML _EVT
method with the call to method \\_SB.CPUS.CSCN (via \\_SB.GED.CSCN)
Architecture specific code [1] might initialize its CPUs AML code by calling
common function build_cpus_aml() like below for ARM:
build_cpus_aml(scope, ms, opts, xx_madt_cpu_entry, memmap[VIRT_CPUHP_ACPI].base,
"\\_SB", "\\_SB.GED.CSCN", AML_SYSTEM_MEMORY);
[1]
https://lore.kernel.org/qemu-devel/20240613233639.202896-13-salil.mehta@huawei.com/
Co-developed-by: Keqian Zhu <zhukeqian1@huawei.com>
Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Tested-by: Vishnu Pajjuri <vishnu@os.amperecomputing.com>
Tested-by: Xianglai Li <lixianglai@loongson.cn>
Tested-by: Miguel Luis <miguel.luis@oracle.com>
Reviewed-by: Shaoqin Huang <shahuang@redhat.com>
Tested-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20240716111502.202344-5-salil.mehta@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: efdb43b831efa5e0c8da3d062a1a37325b4a7708
https://github.com/qemu/qemu/commit/efdb43b831efa5e0c8da3d062a1a37325b4a7708
Author: Salil Mehta <salil.mehta@huawei.com>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M hw/acpi/cpu.c
M hw/i386/acpi-build.c
M include/hw/acpi/cpu.h
Log Message:
-----------
hw/acpi: Update CPUs AML with cpu-(ctrl)dev change
CPUs Control device(\\_SB.PCI0) register interface for the x86 arch is IO port
based and existing CPUs AML code assumes _CRS objects would evaluate to a system
resource which describes IO Port address. But on ARM arch CPUs control
device(\\_SB.PRES) register interface is memory-mapped hence _CRS object should
evaluate to system resource which describes memory-mapped base address. Update
build CPUs AML function to accept both IO/MEMORY region spaces and accordingly
update the _CRS object.
Co-developed-by: Keqian Zhu <zhukeqian1@huawei.com>
Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Tested-by: Vishnu Pajjuri <vishnu@os.amperecomputing.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Tested-by: Xianglai Li <lixianglai@loongson.cn>
Tested-by: Miguel Luis <miguel.luis@oracle.com>
Reviewed-by: Shaoqin Huang <shahuang@redhat.com>
Tested-by: Zhao Liu <zhao1.liu@intel.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20240716111502.202344-6-salil.mehta@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 24bec42f3d6eae035d5df48c057157f83b260e17
https://github.com/qemu/qemu/commit/24bec42f3d6eae035d5df48c057157f83b260e17
Author: Salil Mehta <salil.mehta@huawei.com>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M include/exec/cpu-common.h
M include/hw/core/cpu.h
M system/physmem.c
Log Message:
-----------
physmem: Add helper function to destroy CPU AddressSpace
Virtual CPU Hot-unplug leads to unrealization of a CPU object. This also
involves destruction of the CPU AddressSpace. Add common function to help
destroy the CPU AddressSpace.
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Tested-by: Vishnu Pajjuri <vishnu@os.amperecomputing.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Tested-by: Xianglai Li <lixianglai@loongson.cn>
Tested-by: Miguel Luis <miguel.luis@oracle.com>
Reviewed-by: Shaoqin Huang <shahuang@redhat.com>
Tested-by: Zhao Liu <zhao1.liu@intel.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20240716111502.202344-7-salil.mehta@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 242da18082abc9310ecd528c528501acbcf718c7
https://github.com/qemu/qemu/commit/242da18082abc9310ecd528c528501acbcf718c7
Author: Salil Mehta <salil.mehta@huawei.com>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M gdbstub/gdbstub.c
M hw/core/cpu-common.c
M include/exec/gdbstub.h
Log Message:
-----------
gdbstub: Add helper function to unregister GDB register space
Add common function to help unregister the GDB register space. This shall be
done in context to the CPU unrealization.
Note: These are common functions exported to arch specific code. For example,
for ARM this code is being referred in associated arch specific patch-set:
Link:
https://lore.kernel.org/qemu-devel/20230926103654.34424-1-salil.mehta@huawei.com/
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
Tested-by: Vishnu Pajjuri <vishnu@os.amperecomputing.com>
Reviewed-by: Gavin Shan <gshan@redhat.com>
Tested-by: Xianglai Li <lixianglai@loongson.cn>
Tested-by: Miguel Luis <miguel.luis@oracle.com>
Reviewed-by: Shaoqin Huang <shahuang@redhat.com>
Reviewed-by: Vishnu Pajjuri <vishnu@os.amperecomputing.com>
Tested-by: Zhao Liu <zhao1.liu@intel.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20240716111502.202344-8-salil.mehta@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 935c3914184c4ebb1a4c545fc77fe2f0b24645c2
https://github.com/qemu/qemu/commit/935c3914184c4ebb1a4c545fc77fe2f0b24645c2
Author: Eric Auger <eric.auger@redhat.com>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M hw/virtio/virtio-iommu.c
Log Message:
-----------
Revert "virtio-iommu: Clear IOMMUDevice when VFIO device is unplugged"
This reverts commit 1b889d6e39c32d709f1114699a014b381bcf1cb1.
There are different problems with that tentative fix:
- Some resources are left dangling (resv_regions,
host_resv_ranges) and memory subregions are left attached to
the root MR although freed as embedded in the sdev IOMMUDevice.
Finally the sdev->as is not destroyed and associated listeners
are left.
- Even when fixing the above we observe a memory corruption
associated with the deallocation of the IOMMUDevice. This can
be observed when a VFIO device is hotplugged, hot-unplugged
and a system reset is issued. At this stage we have not been
able to identify the root cause (IOMMU MR or as structs beeing
overwritten and used later on?).
- Another issue is HostIOMMUDevice are indexed by non aliased
BDF whereas the IOMMUDevice is indexed by aliased BDF - yes the
current naming is really misleading -. Given the state of the
code I don't think the virtio-iommu device works in non
singleton group case though.
So let's revert the patch for now. This means the IOMMU MR/as survive
the hotunplug. This is what is done in the intel_iommu for instance.
It does not sound very logical to keep those but currently there is
no symetric function to pci_device_iommu_address_space().
probe_done issue will be handled in a subsequent patch. Also
resv_regions and host_resv_regions will be deallocated separately.
Signed-off-by: Eric Auger <eric.auger@redhat.com>
Message-Id: <20240716094619.1713905-2-eric.auger@redhat.com>
Tested-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 3745768918c2528f2b00b63bb3a764c458364f70
https://github.com/qemu/qemu/commit/3745768918c2528f2b00b63bb3a764c458364f70
Author: Eric Auger <eric.auger@redhat.com>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M hw/virtio/virtio-iommu.c
M include/hw/virtio/virtio-iommu.h
Log Message:
-----------
virtio-iommu: Remove probe_done
Now we have switched to PCIIOMMUOps to convey host IOMMU information,
the host reserved regions are transmitted when the PCIe topology is
built. This happens way before the virtio-iommu driver calls the probe
request. So let's remove the probe_done flag that allowed to check
the probe was not done before the IOMMU MR got enabled. Besides this
probe_done flag had a flaw wrt migration since it was not saved/restored.
The only case at risk is if 2 devices were plugged to a
PCIe to PCI bridge and thus aliased. First of all we
discovered in the past this case was not properly supported for
neither SMMU nor virtio-iommu on guest kernel side: see
[RFC] virtio-iommu: Take into account possible aliasing in virtio_iommu_mr()
https://lore.kernel.org/all/20230116124709.793084-1-eric.auger@redhat.com/
If this were supported by the guest kernel, it is unclear what the call
sequence would be from a virtio-iommu driver point of view.
Signed-off-by: Eric Auger <eric.auger@redhat.com>
Message-Id: <20240716094619.1713905-3-eric.auger@redhat.com>
Tested-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 62ac01d1de5096022e08355f8df47bf1191a3ed1
https://github.com/qemu/qemu/commit/62ac01d1de5096022e08355f8df47bf1191a3ed1
Author: Eric Auger <eric.auger@redhat.com>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M hw/virtio/virtio-iommu.c
Log Message:
-----------
virtio-iommu: Free [host_]resv_ranges on unset_iommu_devices
We are currently missing the deallocation of the [host_]resv_regions
in case of hot unplug. Also to make things more simple let's rule
out the case where multiple HostIOMMUDevices would be aliased and
attached to the same IOMMUDevice. This allows to remove the handling
of conflicting Host reserved regions. Anyway this is not properly
supported at guest kernel level. On hotunplug the reserved regions
are reset to the ones set by virtio-iommu property.
Signed-off-by: Eric Auger <eric.auger@redhat.com>
Message-Id: <20240716094619.1713905-4-eric.auger@redhat.com>
Tested-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 1993d634d57718d6eb107c973b7c8b80a6d91338
https://github.com/qemu/qemu/commit/1993d634d57718d6eb107c973b7c8b80a6d91338
Author: Eric Auger <eric.auger@redhat.com>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M hw/virtio/virtio-iommu.c
Log Message:
-----------
virtio-iommu: Remove the end point on detach
We currently miss the removal of the endpoint in case of detach.
Signed-off-by: Eric Auger <eric.auger@redhat.com>
Message-Id: <20240716094619.1713905-5-eric.auger@redhat.com>
Tested-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: a6586419a13ec9698428d9585ef8540c594f978f
https://github.com/qemu/qemu/commit/a6586419a13ec9698428d9585ef8540c594f978f
Author: Eric Auger <eric.auger@redhat.com>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M hw/vfio/common.c
M hw/vfio/trace-events
Log Message:
-----------
hw/vfio/common: Add vfio_listener_region_del_iommu trace event
Trace when VFIO gets notified about the deletion of an IOMMU MR.
Also trace the name of the region in the add_iommu trace message.
Signed-off-by: Eric Auger <eric.auger@redhat.com>
Message-Id: <20240716094619.1713905-6-eric.auger@redhat.com>
Tested-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 6c027a9de3fae3b8a3a4868e17c7a28ba5372463
https://github.com/qemu/qemu/commit/6c027a9de3fae3b8a3a4868e17c7a28ba5372463
Author: Eric Auger <eric.auger@redhat.com>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M hw/virtio/trace-events
M hw/virtio/virtio-iommu.c
Log Message:
-----------
virtio-iommu: Add trace point on virtio_iommu_detach_endpoint_from_domain
Add a trace point on virtio_iommu_detach_endpoint_from_domain().
Signed-off-by: Eric Auger <eric.auger@redhat.com>
Message-Id: <20240716094619.1713905-7-eric.auger@redhat.com>
Tested-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: a54dd0cd6b9119c44d52547f51a529122f0ec1f1
https://github.com/qemu/qemu/commit/a54dd0cd6b9119c44d52547f51a529122f0ec1f1
Author: Sunil V L <sunilvl@ventanamicro.com>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M hw/riscv/virt-acpi-build.c
Log Message:
-----------
hw/riscv/virt-acpi-build.c: Add namespace devices for PLIC and APLIC
As per the requirement ACPI_080 in the RISC-V Boot and Runtime Services
(BRS) specification [1], PLIC and APLIC should be in namespace as well.
So, add them using the defined HID.
[1] -
https://github.com/riscv-non-isa/riscv-brs/releases/download/v0.0.2/riscv-brs-spec.pdf
(Chapter 6)
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20240716144306.2432257-2-sunilvl@ventanamicro.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: faacd2e6b6a85a5eee2472e5a7f50bf69c4ad44a
https://github.com/qemu/qemu/commit/faacd2e6b6a85a5eee2472e5a7f50bf69c4ad44a
Author: Sunil V L <sunilvl@ventanamicro.com>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M hw/riscv/virt-acpi-build.c
Log Message:
-----------
hw/riscv/virt-acpi-build.c: Update the HID of RISC-V UART
The requirement ACPI_060 in the RISC-V BRS specification [1], requires
NS16550 compatible UART to have the HID RSCV0003. So, update the HID for
the UART.
[1] -
https://github.com/riscv-non-isa/riscv-brs/releases/download/v0.0.2/riscv-brs-spec.pdf
(Chapter 6)
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20240716144306.2432257-3-sunilvl@ventanamicro.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: af09c25199a15925c34ae8c9635a79a81fd9b499
https://github.com/qemu/qemu/commit/af09c25199a15925c34ae8c9635a79a81fd9b499
Author: Sunil V L <sunilvl@ventanamicro.com>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M tests/qtest/bios-tables-test-allowed-diff.h
Log Message:
-----------
tests/acpi: Allow DSDT acpi table changes for aarch64
so that CI tests don't fail when those ACPI tables are updated in the
next patch. This is as per the documentation in bios-tables-tests.c.
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20240716144306.2432257-4-sunilvl@ventanamicro.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 35520bc702a8c3d7b434305ac403de437003d4bc
https://github.com/qemu/qemu/commit/35520bc702a8c3d7b434305ac403de437003d4bc
Author: Sunil V L <sunilvl@ventanamicro.com>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M hw/pci-host/gpex-acpi.c
Log Message:
-----------
acpi/gpex: Create PCI link devices outside PCI root bridge
Currently, PCI link devices (PNP0C0F) are always created within the
scope of the PCI root bridge. However, RISC-V needs these link devices
to be created outside to ensure the probing order in the OS. This
matches the example given in the ACPI specification [1] as well. Hence,
create these link devices directly under _SB instead of under the PCI
root bridge.
To keep these link device names unique for multiple PCI bridges, change
the device name from GSIx to LXXY format where XX is the PCI bus number
and Y is the INTx.
GPEX is currently used by riscv, aarch64/virt and x86/microvm machines.
So, this change will alter the DSDT for those systems.
[1] - ACPI 5.1: 6.2.13.1 Example: Using _PRT to Describe PCI IRQ Routing
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20240716144306.2432257-5-sunilvl@ventanamicro.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 0af3dfa5c5590ae21d1f58a389968d4b90112fd7
https://github.com/qemu/qemu/commit/0af3dfa5c5590ae21d1f58a389968d4b90112fd7
Author: Sunil V L <sunilvl@ventanamicro.com>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M tests/data/acpi/aarch64/virt/DSDT
M tests/data/acpi/aarch64/virt/DSDT.acpihmatvirt
M tests/data/acpi/aarch64/virt/DSDT.memhp
M tests/data/acpi/aarch64/virt/DSDT.pxb
M tests/data/acpi/aarch64/virt/DSDT.topology
M tests/data/acpi/x86/microvm/DSDT.pcie
M tests/qtest/bios-tables-test-allowed-diff.h
Log Message:
-----------
tests/acpi: update expected DSDT blob for aarch64 and microvm
After PCI link devices are moved out of the scope of PCI root complex,
the DSDT files of machines which use GPEX, will change. So, update the
expected AML files with these changes for these machines.
Mainly, there are 2 changes.
1) Since the link devices are created now directly under _SB for all PCI
root bridges in the system, they should have unique names. So, instead
of GSIx, named those devices as LXXY where L means link, XX will have
PCI bus number and Y will have the INTx number (ex: L000 or L001). The
_PRT entries will also be updated to reflect this name change.
2) PCI link devices are moved from the scope of each PCI root bridge to
directly under _SB.
Below is the sample iASL difference for one such link device.
Scope (\_SB)
{
Name (_HID, "LNRO0005") // _HID: Hardware ID
Name (_UID, 0x1F) // _UID: Unique ID
Name (_CCA, One) // _CCA: Cache Coherency Attribute
Name (_CRS, ResourceTemplate () // _CRS: Current Resource Settings
{
Memory32Fixed (ReadWrite,
0x0A003E00, // Address Base
0x00000200, // Address Length
)
Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, ,, )
{
0x0000004F,
}
})
+ Device (L000)
+ {
+ Name (_HID, "PNP0C0F" /* PCI Interrupt Link Device */)
+ Name (_UID, Zero) // _UID: Unique ID
+ Name (_PRS, ResourceTemplate ()
+ {
+ Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, ,, )
+ {
+ 0x00000023,
+ }
+ })
+ Name (_CRS, ResourceTemplate ()
+ {
+ Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, ,, )
+ {
+ 0x00000023,
+ }
+ })
+ Method (_SRS, 1, NotSerialized) // _SRS: Set Resource Settings
+ {
+ }
+ }
+
Device (PCI0)
{
Name (_HID, "PNP0A08" /* PCI Express Bus */) // _HID: Hardware ID
Name (_CID, "PNP0A03" /* PCI Bus */) // _CID: Compatible ID
Name (_SEG, Zero) // _SEG: PCI Segment
Name (_BBN, Zero) // _BBN: BIOS Bus Number
Name (_UID, Zero) // _UID: Unique ID
Name (_STR, Unicode ("PCIe 0 Device")) // _STR: Description String
Name (_CCA, One) // _CCA: Cache Coherency Attribute
Name (_PRT, Package (0x80) // _PRT: PCI Routing Table
{
Package (0x04)
{
0xFFFF,
Zero,
- GSI0,
+ L000,
Zero
},
.....
})
Device (GSI0)
{
Name (_HID, "PNP0C0F" /* PCI Interrupt Link Device */)
Name (_UID, Zero) // _UID: Unique ID
Name (_PRS, ResourceTemplate ()
{
Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, ,, )
{
0x00000023,
}
})
Name (_CRS, ResourceTemplate ()
{
Interrupt (ResourceConsumer, Level, ActiveHigh, Exclusive, ,, )
{
0x00000023,
}
})
Method (_SRS, 1, NotSerialized) // _SRS: Set Resource Settings
{
}
}
}
}
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Message-Id: <20240716144306.2432257-6-sunilvl@ventanamicro.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 329b327924f7e1a7a735c91b31f722708599e10f
https://github.com/qemu/qemu/commit/329b327924f7e1a7a735c91b31f722708599e10f
Author: Sunil V L <sunilvl@ventanamicro.com>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M tests/qtest/bios-tables-test.c
Log Message:
-----------
tests/qtest/bios-tables-test.c: Remove the fall back path
The expected ACPI AML files are moved now under ${arch}/{machine} path.
Hence, there is no need to search in old path which didn't have ${arch}.
Remove the code which searches for the expected AML files under old path
as well.
Suggested-by: Igor Mammedov <imammedo@redhat.com>
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20240716144306.2432257-7-sunilvl@ventanamicro.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: cc3ba2422554b63f30b697eb67143b5d48c5b7a3
https://github.com/qemu/qemu/commit/cc3ba2422554b63f30b697eb67143b5d48c5b7a3
Author: Sunil V L <sunilvl@ventanamicro.com>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
A tests/data/acpi/riscv64/virt/APIC
A tests/data/acpi/riscv64/virt/DSDT
A tests/data/acpi/riscv64/virt/FACP
A tests/data/acpi/riscv64/virt/MCFG
A tests/data/acpi/riscv64/virt/RHCT
A tests/data/acpi/riscv64/virt/SPCR
M tests/qtest/bios-tables-test-allowed-diff.h
Log Message:
-----------
tests/acpi: Add empty ACPI data files for RISC-V
As per process documented (steps 1-3) in bios-tables-test.c, add empty
AML data files for RISC-V ACPI tables and add the entries in
bios-tables-test-allowed-diff.h.
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20240716144306.2432257-8-sunilvl@ventanamicro.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 5b966e548fb7a530431379bab053eb1d6fb25867
https://github.com/qemu/qemu/commit/5b966e548fb7a530431379bab053eb1d6fb25867
Author: Sunil V L <sunilvl@ventanamicro.com>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M tests/qtest/bios-tables-test.c
Log Message:
-----------
tests/qtest/bios-tables-test.c: Enable basic testing for RISC-V
Add basic ACPI table test case for RISC-V.
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Reviewed-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20240716144306.2432257-9-sunilvl@ventanamicro.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: e9c0d54f4aebeeeebf1124d6acd607e3015e0a51
https://github.com/qemu/qemu/commit/e9c0d54f4aebeeeebf1124d6acd607e3015e0a51
Author: Sunil V L <sunilvl@ventanamicro.com>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M tests/data/acpi/riscv64/virt/APIC
M tests/data/acpi/riscv64/virt/DSDT
M tests/data/acpi/riscv64/virt/FACP
M tests/data/acpi/riscv64/virt/MCFG
M tests/data/acpi/riscv64/virt/RHCT
M tests/data/acpi/riscv64/virt/SPCR
M tests/qtest/bios-tables-test-allowed-diff.h
Log Message:
-----------
tests/acpi: Add expected ACPI AML files for RISC-V
As per the step 5 in the process documented in bios-tables-test.c,
generate the expected ACPI AML data files for RISC-V using the
rebuild-expected-aml.sh script and update the
bios-tables-test-allowed-diff.h.
These are all new files being added for the first time. Hence, iASL diff
output is not added.
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
Acked-by: Alistair Francis <alistair.francis@wdc.com>
Acked-by: Igor Mammedov <imammedo@redhat.com>
Message-Id: <20240716144306.2432257-10-sunilvl@ventanamicro.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 78cc8c69475042ce6b6f720f8c81920fead0d86e
https://github.com/qemu/qemu/commit/78cc8c69475042ce6b6f720f8c81920fead0d86e
Author: Alistair Francis <alistair23@gmail.com>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M include/hw/pci/pcie_doe.h
Log Message:
-----------
hw/pci: Add all Data Object Types defined in PCIe r6.0
Add all of the defined protocols/features from the PCIe-SIG r6.0
"Table 6-32 PCI-SIG defined Data Object Types (Vendor ID = 0001h)"
table.
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
Message-Id: <20240703092027.644758-2-alistair.francis@wdc.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: bc419a1cc5b15deec9cf7cb7a382392c112810e2
https://github.com/qemu/qemu/commit/bc419a1cc5b15deec9cf7cb7a382392c112810e2
Author: Huai-Cheng Kuo <hchkuo@avery-design.com.tw>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M MAINTAINERS
M backends/Kconfig
M backends/meson.build
A backends/spdm-socket.c
A include/sysemu/spdm-socket.h
Log Message:
-----------
backends: Initial support for SPDM socket support
SPDM enables authentication, attestation and key exchange to assist in
providing infrastructure security enablement. It's a standard published
by the DMTF [1].
SPDM supports multiple transports, including PCIe DOE and MCTP.
This patch adds support to QEMU to connect to an external SPDM
instance.
SPDM support can be added to any QEMU device by exposing a
TCP socket to a SPDM server. The server can then implement the SPDM
decoding/encoding support, generally using libspdm [2].
This is similar to how the current TPM implementation works and means
that the heavy lifting of setting up certificate chains, capabilities,
measurements and complex crypto can be done outside QEMU by a well
supported and tested library.
1: https://www.dmtf.org/standards/SPDM
2: https://github.com/DMTF/libspdm
Signed-off-by: Huai-Cheng Kuo <hchkuo@avery-design.com.tw>
Signed-off-by: Chris Browy <cbrowy@avery-design.com>
Co-developed-by: Jonathan Cameron <Jonathan.cameron@huawei.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
[ Changes by WM
- Bug fixes from testing
]
Signed-off-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
[ Changes by AF:
- Convert to be more QEMU-ified
- Move to backends as it isn't PCIe specific
]
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Message-Id: <20240703092027.644758-3-alistair.francis@wdc.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 4f947b10d525958578002848a92eeb6152ffbf0d
https://github.com/qemu/qemu/commit/4f947b10d525958578002848a92eeb6152ffbf0d
Author: Wilfred Mallawa <wilfred.mallawa@wdc.com>
Date: 2024-07-22 (Mon, 22 Jul 2024)
Changed paths:
M docs/specs/index.rst
A docs/specs/spdm.rst
M hw/nvme/ctrl.c
M include/hw/pci/pci_device.h
M include/hw/pci/pcie_doe.h
Log Message:
-----------
hw/nvme: Add SPDM over DOE support
Setup Data Object Exchange (DOE) as an extended capability for the NVME
controller and connect SPDM to it (CMA) to it.
Signed-off-by: Wilfred Mallawa <wilfred.mallawa@wdc.com>
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
Reviewed-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Acked-by: Klaus Jensen <k.jensen@samsung.com>
Message-Id: <20240703092027.644758-4-alistair.francis@wdc.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Commit: 5885bcef3d760e84d17eb4113e85f2aea0bd0582
https://github.com/qemu/qemu/commit/5885bcef3d760e84d17eb4113e85f2aea0bd0582
Author: Richard Henderson <richard.henderson@linaro.org>
Date: 2024-07-24 (Wed, 24 Jul 2024)
Changed paths:
M MAINTAINERS
M accel/kvm/kvm-all.c
M accel/kvm/kvm-cpus.h
M accel/kvm/trace-events
M backends/Kconfig
M backends/meson.build
A backends/spdm-socket.c
M contrib/vhost-user-blk/vhost-user-blk.c
M docs/specs/acpi_hw_reduced_hotplug.rst
M docs/specs/index.rst
A docs/specs/spdm.rst
M docs/system/index.rst
A docs/system/sriov.rst
M gdbstub/gdbstub.c
M hw/acpi/acpi-cpu-hotplug-stub.c
M hw/acpi/cpu.c
M hw/acpi/generic_event_device.c
M hw/arm/virt.c
M hw/audio/virtio-snd.c
M hw/block/vhost-user-blk.c
M hw/core/cpu-common.c
M hw/core/machine.c
M hw/cxl/cxl-events.c
M hw/cxl/cxl-host.c
M hw/cxl/cxl-mailbox-utils.c
M hw/i386/acpi-build.c
M hw/i386/intel_iommu.c
M hw/i386/intel_iommu_internal.h
M hw/i386/pc_piix.c
M hw/i386/pc_q35.c
M hw/mem/cxl_type3.c
M hw/net/vhost_net.c
M hw/nvme/ctrl.c
M hw/pci-host/gpex-acpi.c
M hw/pci/pci.c
M hw/pci/pcie_sriov.c
M hw/riscv/virt-acpi-build.c
M hw/scsi/vhost-scsi.c
M hw/scsi/vhost-user-scsi.c
M hw/smbios/smbios.c
M hw/vfio/common.c
M hw/vfio/trace-events
M hw/virtio/trace-events
M hw/virtio/vhost-user-fs.c
M hw/virtio/vhost-user-vsock.c
M hw/virtio/virtio-crypto.c
M hw/virtio/virtio-iommu.c
M hw/virtio/virtio-net-pci.c
M hw/virtio/virtio-pci.c
M hw/virtio/virtio.c
M include/exec/cpu-common.h
M include/exec/gdbstub.h
M include/hw/acpi/cpu.h
M include/hw/acpi/generic_event_device.h
M include/hw/boards.h
M include/hw/core/cpu.h
M include/hw/cxl/cxl_device.h
A include/hw/cxl/cxl_mailbox.h
M include/hw/pci/pci_device.h
M include/hw/pci/pcie_doe.h
M include/hw/pci/pcie_sriov.h
M include/hw/virtio/virtio-iommu.h
M include/hw/virtio/virtio-pci.h
M include/hw/virtio/virtio.h
M include/sysemu/kvm.h
A include/sysemu/spdm-socket.h
M net/vhost-vdpa.c
M system/physmem.c
M tests/data/acpi/aarch64/virt/DSDT
M tests/data/acpi/aarch64/virt/DSDT.acpihmatvirt
M tests/data/acpi/aarch64/virt/DSDT.memhp
M tests/data/acpi/aarch64/virt/DSDT.pxb
M tests/data/acpi/aarch64/virt/DSDT.topology
A tests/data/acpi/riscv64/virt/APIC
A tests/data/acpi/riscv64/virt/DSDT
A tests/data/acpi/riscv64/virt/FACP
A tests/data/acpi/riscv64/virt/MCFG
A tests/data/acpi/riscv64/virt/RHCT
A tests/data/acpi/riscv64/virt/SPCR
M tests/data/acpi/x86/microvm/DSDT.pcie
M tests/qtest/bios-tables-test.c
Log Message:
-----------
Merge tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu
into staging
virtio,pci,pc: features,fixes
pci: Initial support for SPDM Responders
cxl: Add support for scan media, feature commands, device patrol scrub
control, DDR5 ECS control, firmware updates
virtio: in-order support
virtio-net: support for SR-IOV emulation (note: known issues on s390,
might get reverted if not fixed)
smbios: memory device size is now configurable per Machine
cpu: architecture agnostic code to support vCPU Hotplug
Fixes, cleanups all over the place.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
# -----BEGIN PGP SIGNATURE-----
#
# iQFDBAABCAAtFiEEXQn9CHHI+FuUyooNKB8NuNKNVGkFAmae9l8PHG1zdEByZWRo
# YXQuY29tAAoJECgfDbjSjVRp8fYH/impBH9nViO/WK48io4mLSkl0EUL8Y/xrMvH
# zKFCKaXq8D96VTt1Z4EGKYgwG0voBKZaCEKYU/0ARGnSlSwxINQ8ROCnBWMfn2sx
# yQt08EXVMznNLtXjc6U5zCoCi6SaV85GH40No3MUFXBQt29ZSlFqO/fuHGZHYBwS
# wuVKvTjjNF4EsGt3rS4Qsv6BwZWMM+dE6yXpKWk68kR8IGp+6QGxkMbWt9uEX2Md
# VuemKVnFYw0XGCGy5K+ZkvoA2DGpEw0QxVSOMs8CI55Oc9SkTKz5fUSzXXGo1if+
# M1CTjOPJu6pMym6gy6XpFa8/QioDA/jE2vBQvfJ64TwhJDV159s=
# =k8e9
# -----END PGP SIGNATURE-----
# gpg: Signature made Tue 23 Jul 2024 10:16:31 AM AEST
# gpg: using RSA key 5D09FD0871C8F85B94CA8A0D281F0DB8D28D5469
# gpg: issuer "mst@redhat.com"
# gpg: Good signature from "Michael S. Tsirkin <mst@kernel.org>" [undefined]
# gpg: aka "Michael S. Tsirkin <mst@redhat.com>" [undefined]
# gpg: WARNING: The key's User ID is not certified with a trusted signature!
# gpg: There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 0270 606B 6F3C DF3D 0B17 0970 C350 3912 AFBE 8E67
# Subkey fingerprint: 5D09 FD08 71C8 F85B 94CA 8A0D 281F 0DB8 D28D 5469
* tag 'for_upstream' of https://git.kernel.org/pub/scm/virt/kvm/mst/qemu: (61
commits)
hw/nvme: Add SPDM over DOE support
backends: Initial support for SPDM socket support
hw/pci: Add all Data Object Types defined in PCIe r6.0
tests/acpi: Add expected ACPI AML files for RISC-V
tests/qtest/bios-tables-test.c: Enable basic testing for RISC-V
tests/acpi: Add empty ACPI data files for RISC-V
tests/qtest/bios-tables-test.c: Remove the fall back path
tests/acpi: update expected DSDT blob for aarch64 and microvm
acpi/gpex: Create PCI link devices outside PCI root bridge
tests/acpi: Allow DSDT acpi table changes for aarch64
hw/riscv/virt-acpi-build.c: Update the HID of RISC-V UART
hw/riscv/virt-acpi-build.c: Add namespace devices for PLIC and APLIC
virtio-iommu: Add trace point on virtio_iommu_detach_endpoint_from_domain
hw/vfio/common: Add vfio_listener_region_del_iommu trace event
virtio-iommu: Remove the end point on detach
virtio-iommu: Free [host_]resv_ranges on unset_iommu_devices
virtio-iommu: Remove probe_done
Revert "virtio-iommu: Clear IOMMUDevice when VFIO device is unplugged"
gdbstub: Add helper function to unregister GDB register space
physmem: Add helper function to destroy CPU AddressSpace
...
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
Compare: https://github.com/qemu/qemu/compare/3b5efc553eb1...5885bcef3d76
To unsubscribe from these emails, change your notification settings at
https://github.com/qemu/qemu/settings/notifications