Re: [PATCH v4 3/7] vdpa: Make vhost_vdpa_net_cvq_map_elem accept any out sg

2022-07-31 Thread Eugenio Perez Martin
On Mon, Jul 25, 2022 at 10:48 AM Jason Wang wrote: > > > 在 2022/7/22 19:12, Eugenio Pérez 写道: > > So its generic enough to accept any out sg buffer and we can inject > > NIC state messages. > > > > Signed-off-by: Eugenio Pérez > > --- > > net/vhost-vdpa.c | 29 +++-- > >

[Bug 1180923] Re: unused memory filled with 0x00 instead of 0xFF

2022-07-31 Thread Yonggang Luo
** Bug watch added: gitlab.com/qemu-project/qemu/-/issues #1133 https://gitlab.com/qemu-project/qemu/-/issues/1133 -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.launchpad.net/bugs/1180923 Title: unused memory fill

Re: [Bug 1180923] Re: unused memory filled with 0x00 instead of 0xFF

2022-07-31 Thread Yonggang Luo
I create a issue at https://gitlab.com/qemu-project/qemu/-/issues/1133 to tracking this On Mon, Aug 1, 2022 at 5:06 AM David Glover <1180...@bugs.launchpad.net> wrote: > I know this is expired but it's still a problem in qemu 7.0.0. For > example, when running MS-DOS 6.22, "mem" reports 0K of upp

Re: [PATCH] ipmi:smbus: Add a check around a memcpy

2022-07-31 Thread Michael S. Tsirkin
On Sun, Jul 31, 2022 at 06:02:46PM -0500, miny...@acm.org wrote: > From: Corey Minyard > > In one case: > > memcpy(sid->inmsg + sid->inlen, buf, len); > > if len == 0 then sid->inmsg + sig->inlen can point to one past the inmsg > array if the array is full. We have to allow len == 0 due to s

RE: [PULL V2 25/25] net/colo.c: fix segmentation fault when packet is not parsed correctly

2022-07-31 Thread Zhang, Chen
> -Original Message- > From: Jason Wang > Sent: Monday, August 1, 2022 12:18 PM > To: Zhang, Chen ; Xu, Tao3 > Cc: qemu-devel@nongnu.org; Li Zhijian ; Peter > Maydell > Subject: Re: [PULL V2 25/25] net/colo.c: fix segmentation fault when packet > is not parsed correctly > > > 在 2022/

Re: [PULL V2 25/25] net/colo.c: fix segmentation fault when packet is not parsed correctly

2022-07-31 Thread Jason Wang
在 2022/7/29 21:58, Peter Maydell 写道: On Wed, 20 Jul 2022 at 10:04, Jason Wang wrote: From: Zhang Chen When COLO use only one vnet_hdr_support parameter between filter-redirector and filter-mirror(or colo-compare), COLO will crash with segmentation fault. Back track as follow: Thread 1 "qem

Re: [PULL V2 19/25] vdpa: Extract get features part from vhost_vdpa_get_max_queue_pairs

2022-07-31 Thread Jason Wang
在 2022/7/29 22:08, Peter Maydell 写道: On Wed, 20 Jul 2022 at 10:04, Jason Wang wrote: From: Eugenio Pérez To know the device features is needed for CVQ SVQ, so SVQ knows if it can handle all commands or not. Extract from vhost_vdpa_get_max_queue_pairs so we can reuse it. Signed-off-by: Euge

RE: [PATCH] disas/nanomips: Convert nanoMIPS disassembler to C

2022-07-31 Thread Vince Del Vecchio via
On Fri, 29 Jul 2022 at 10:18, Peter Maydell wrote: > ... > Is it possible to break this down into smaller pieces so it isn't one single > enormous 5000 line patch ? > > I guess partial conversion is likely to run into compilation difficulties > mid-series; if so we could do "disable the disasse

Re: [RFC 0/3] Add Generic SPI GPIO model

2022-07-31 Thread Andrew Jeffery
On Sun, 31 Jul 2022, at 06:48, Cédric Le Goater wrote: > On 7/29/22 19:30, Peter Delevoryas wrote: >> Certainly we'd like to use IRQ's instead, but she ran into correctness >> problems. Maybe we can investigate that further and fix it. Yes, let's not work around problems that we have the abilit

[RFC v5 08/11] virtio-blk: add zoned storage APIs for zoned devices

2022-07-31 Thread Sam Li
This patch extends virtio-blk emulation to handle zoned device commands by calling the new block layer APIs to perform zoned device I/O on behalf of the guest. It supports Report Zone, and four zone oparations (open, close, finish, reset). The virtio-blk zoned device command specifications is curre

[RFC v5 11/11] docs/zoned-storage: add zoned device documentation

2022-07-31 Thread Sam Li
Add the documentation about the zoned device support to virtio-blk emulation. Signed-off-by: Sam Li --- docs/devel/zoned-storage.rst | 68 ++ docs/system/qemu-block-drivers.rst.inc | 6 +++ 2 files changed, 74 insertions(+) create mode 100644 docs/devel/zoned-

[RFC v5 09/11] qemu-io: add zoned block device operations.

2022-07-31 Thread Sam Li
Add zoned storage commands of the device: zone_report(zrp), zone_open(zo), zone_close(zc), zone_reset(zrs), zone_finish(zf). For example, to test zone_report, use following command: $ ./build/qemu-io --image-opts driver=zoned_host_device, filename=/dev/nullb0 -c "zrp offset nr_zones" Signed-off-b

[RFC v5 06/11] raw-format: add zone operations to pass through requests

2022-07-31 Thread Sam Li
raw-format driver usually sits on top of file-posix driver. It needs to pass through requests of zone commands. Signed-off-by: Sam Li --- block/raw-format.c | 13 + 1 file changed, 13 insertions(+) diff --git a/block/raw-format.c b/block/raw-format.c index 69fd650eaf..6b20bd22ef 100

[RFC v5 10/11] qemu-iotests: test new zone operations

2022-07-31 Thread Sam Li
We have added new block layer APIs of zoned block devices. Test it with: Create a null_blk device, run each zone operation on it and see whether reporting right zone information. Signed-off-by: Sam Li --- tests/qemu-iotests/tests/zoned.out | 53 ++ tests/qemu-iotests/tests/zoned.

[RFC v5 07/11] config: add check to block layer

2022-07-31 Thread Sam Li
Putting zoned/non-zoned BlockDrivers on top of each other is not allowed. Signed-off-by: Sam Li --- block.c | 13 + block/file-posix.c | 2 ++ block/raw-format.c | 1 + include/block/block_int-common.h | 10 ++ 4 files ch

[RFC v5 03/11] file-posix: introduce get_sysfs_long_val for the long sysfs attribute

2022-07-31 Thread Sam Li
Use sysfs attribute files to get the long value of zoned device information. Signed-off-by: Sam Li --- block/file-posix.c | 23 --- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/block/file-posix.c b/block/file-posix.c index 48cd096624..bcf898f0cb 100644 --- a

[RFC v5 05/11] block: add block layer APIs resembling Linux ZonedBlockDevice ioctls

2022-07-31 Thread Sam Li
By adding zone management operations in BlockDriver, storage controller emulation can use the new block layer APIs including Report Zone and four zone management operations (open, close, finish, reset). BlockDriver can get zone information from null_blk device by refreshing BLockLimits. Signed-of

[RFC v5 04/11] file-posix: introduce get_sysfs_str_val for device zoned model

2022-07-31 Thread Sam Li
Use sysfs attribute files to get the string value of device zoned model. Then get_sysfs_zoned_model can convert it to BlockZoneModel type in QEMU. Signed-off-by: Sam Li --- block/file-posix.c | 86 include/block/block_int-common.h | 3 ++ 2 files c

[RFC v5 02/11] include: import virtio_blk headers from linux with zoned storage support

2022-07-31 Thread Sam Li
Add file from Dmitry's "virtio-blk:add support for zoned block devices" linux patch using scripts/update-linux-headers.sh. There is a link for more information: https://github.com/dmitry-fomichev/virtblk-zbd Signed-off-by: Sam Li --- include/standard-headers/linux/virtio_blk.h | 118

[RFC v5 01/11] include: add zoned device structs

2022-07-31 Thread Sam Li
Signed-off-by: Sam Li --- include/block/block-common.h | 43 1 file changed, 43 insertions(+) diff --git a/include/block/block-common.h b/include/block/block-common.h index fdb7306e78..c9d28b1c51 100644 --- a/include/block/block-common.h +++ b/include/block/b

[RFC v5 00/11] Add support for zoned device

2022-07-31 Thread Sam Li
Zoned Block Devices (ZBDs) devide the LBA space to block regions called zones that are larger than the LBA size. It can only allow sequential writes, which reduces write amplification in SSD, leading to higher throughput and increased capacity. More details about ZBDs can be found at: https://zone

[PULL 3/3] Hexagon (tests/tcg/hexagon) reference file for float_convd

2022-07-31 Thread Taylor Simpson
The test is in tests/tcg/multiarch/float_convd.c Signed-off-by: Taylor Simpson Acked-by: Richard Henderson Message-Id: <20220718230320.2-4-tsimp...@quicinc.com> --- tests/tcg/hexagon/float_convd.ref | 988 ++ 1 file changed, 988 insertions(+) create mode 100644

[PULL 2/3] Hexagon (tests/tcg/hexagon) Fix alignment in load_unpack.c

2022-07-31 Thread Taylor Simpson
The increment used in :brev tests was causing unaligned addresses Change the increment and the relevant expected values Signed-off-by: Taylor Simpson Acked-by: Richard Henderson Message-Id: <20220718230320.2-3-tsimp...@quicinc.com> --- tests/tcg/hexagon/load_unpack.c | 14 +++--- 1

[PULL 1/3] Hexagon (target/hexagon) make VyV operands use a unique temp

2022-07-31 Thread Taylor Simpson
VyV operand is only used in the vshuff and vdeal instructions. These instructions write to both VyV and VxV operands. In the case where both operands are the same register, we need a separate location for VyV. We use the existing vtmp field in CPUHexagonState. Test case added in tests/tcg/hexag

[PULL 0/3] Hexagon bug fixes and test improvements

2022-07-31 Thread Taylor Simpson
The following changes since commit 3916603e0c1d909e14e09d5ebcbdaa9c9e21adf3: Merge tag 'pull-la-20220729' of https://gitlab.com/rth7680/qemu into staging (2022-07-29 17:39:17 -0700) are available in the Git repository at: https://github.com/quic/qemu tags/pull-hex-20220731

[PATCH] ipmi:smbus: Add a check around a memcpy

2022-07-31 Thread minyard
From: Corey Minyard In one case: memcpy(sid->inmsg + sid->inlen, buf, len); if len == 0 then sid->inmsg + sig->inlen can point to one past the inmsg array if the array is full. We have to allow len == 0 due to some vagueness in the spec, but we don't have to call memcpy. Found by Coverity.

[Bug 1180923] Re: unused memory filled with 0x00 instead of 0xFF

2022-07-31 Thread David Glover
I know this is expired but it's still a problem in qemu 7.0.0. For example, when running MS-DOS 6.22, "mem" reports 0K of upper memory, and memmaker fails to run, complaining that it could not allocate any. I'd love to know if there's a workaround. -- You received this bug notification because yo

Re: virtio: why no full reset on virtio_set_status 0 ?

2022-07-31 Thread Claudio Fontana
On 7/29/22 16:00, Claudio Fontana wrote: > On 7/29/22 15:21, Alex Bennée wrote: >> >> Claudio Fontana writes: >> >>> On 7/29/22 12:13, Michael S. Tsirkin wrote: On Fri, Jul 29, 2022 at 11:46:05AM +0200, Claudio Fontana wrote: >>> @@ -2025,7 +2031,6 @@ void virtio_reset(void *opaque) >

Re: virtio: why no full reset on virtio_set_status 0 ?

2022-07-31 Thread Claudio Fontana
On 7/28/22 12:24, Cornelia Huck wrote: > On Thu, Jul 28 2022, Claudio Fontana wrote: > >> On 7/28/22 09:43, Claudio Fontana wrote: >>> On 7/28/22 03:27, Jason Wang wrote: On Wed, Jul 27, 2022 at 11:32 PM Michael S. Tsirkin wrote: > > On Wed, Jul 27, 2022 at 12:51:31PM +0200, C

[PATCH v2 3/5] tests/acpi: allow changes for core_count2 test

2022-07-31 Thread Julia Suvorova
Signed-off-by: Julia Suvorova --- tests/qtest/bios-tables-test-allowed-diff.h | 3 +++ tests/data/acpi/q35/APIC.core-count2| 0 tests/data/acpi/q35/DSDT.core-count2| 0 tests/data/acpi/q35/FACP.core-count2| 0 4 files changed, 3 insertions(+) create mode 100644 tests/data

[PATCH v2 2/5] bios-tables-test: teach test to use smbios 3.0 tables

2022-07-31 Thread Julia Suvorova
Introduce the 64-bit entry point. Since we no longer have a total number of structures, stop checking for the new ones at the EOF structure (type 127). Signed-off-by: Julia Suvorova --- tests/qtest/bios-tables-test.c | 95 +- 1 file changed, 71 insertions(+), 24 d

[PATCH v2 4/5] bios-tables-test: add test for number of cores > 255

2022-07-31 Thread Julia Suvorova
The new test is run with a large number of cpus and checks if the core_count field in smbios_cpu_test (structure type 4) is correct. Choose q35 as it allows to run with -smp > 255. Signed-off-by: Julia Suvorova --- tests/qtest/bios-tables-test.c | 53 +- 1 file c

[PATCH v2 5/5] tests/acpi: update tables for new core count test

2022-07-31 Thread Julia Suvorova
Changes in the tables (for 275 cores): FACP: + Use APIC Cluster Model (V4) : 1 APIC: +[02Ch 0044 1]Subtable Type : 00 [Processor Local APIC] +[02Dh 0045 1] Length : 08 +[02Eh 0046 1] Processor ID : 00 +[02Fh 0047 1]

[PATCH v2 0/5] hw/smbios: add core_count2 to smbios table type 4

2022-07-31 Thread Julia Suvorova
The SMBIOS 3.0 specification provides the ability to reflect over 255 cores. The 64-bit entry point has been used for a while, but structure type 4 has not been updated before, so the dmidecode output looked like this (-smp 280): Handle 0x0400, DMI type 4, 42 bytes Processor Information

[PATCH v2 1/5] hw/smbios: add core_count2 to smbios table type 4

2022-07-31 Thread Julia Suvorova
In order to use the increased number of cpus, we need to bring smbios tables in line with the SMBIOS 3.0 specification. This allows us to introduce core_count2 which acts as a duplicate of core_count if we have fewer cores than 256, and contains the actual core number per socket if we have more. c

Re: [PATCH] linux-user: Implement faccessat2

2022-07-31 Thread Richard Henderson
On 7/29/22 13:14, Richard Henderson wrote: -ret = get_errno(access(path(p), arg2)); -unlock_user(p, arg1, 0); -return ret; +return do_faccessat2(AT_FDCWD, arg1, arg2, 0); Oops, dropped path(). Should perhaps be incorporated into the helper, because newer targets