On Sat, Jul 01, 2023 at 04:01:18PM +0900, Akihiko Odaki wrote:
> The function number must be lower than the next function number
> advertised with ARI. Add a check to enforce this.
>
> I suggested this change at:
>
On Sat, Jul 01, 2023 at 04:01:21PM +0900, Akihiko Odaki wrote:
> The next function numbers are expected to form a linked list ending with
> 0.
>
> Fixes: 3a977deebe ("Intrdocue igb device emulation")
> Signed-off-by: Akihiko Odaki
> ---
> hw/net/igb_core.h | 3 +++
> hw/net/igb.c | 4 +---
On Sat, Jul 01, 2023 at 04:01:22PM +0900, Akihiko Odaki wrote:
> The function number must be lower than the next function number
> advertised with ARI.
>
> Signed-off-by: Akihiko Odaki
I don't get this logic at all - where is the limitation coming from?
All I see in the spec is:
Next
On 2023/07/01 23:31, Ani Sinha wrote:
On 01-Jul-2023, at 12:31 PM, Akihiko Odaki wrote:
The next function numbers are expected to form a linked list ending with
0.
Fixes: 2503461691 ("pcie: Add some SR/IOV API documentation in
docs/pcie_sriov.txt")
Signed-off-by: Akihiko Odaki
---
According to the 82371FB documentation (82371FB.pdf, 2.3.9. BMIBA—BUS
MASTER INTERFACE BASE ADDRESS REGISTER, April 1997), the register is
32bit wide. To properly reset it to default values, all 32bit need to be
cleared. Bit #0 "Resource Type Indicator (RTE)" needs to be enabled.
The initial
Sat, 1 Jul 2023 15:34:40 +0200 (CEST) BALATON Zoltan :
> If all 32 bits should be writtern does this need pci_set_long instead of
> pci_set_word?
Thanks for spotting. After a number of experiments I used the wrong variant.
Olaf
pgpqRNZ3DILTu.pgp
Description: Digitale Signatur von OpenPGP
> On 01-Jul-2023, at 12:31 PM, Akihiko Odaki wrote:
>
> The next function numbers are expected to form a linked list ending with
> 0.
>
> Fixes: 2503461691 ("pcie: Add some SR/IOV API documentation in
> docs/pcie_sriov.txt")
> Signed-off-by: Akihiko Odaki
> ---
> docs/pcie_sriov.txt | 5
On Sat, 1 Jul 2023, Olaf Hering wrote:
According to the 82371FB documentation (82371FB.pdf, 2.3.9. BMIBA—BUS
MASTER INTERFACE BASE ADDRESS REGISTER, April 1997), the register is
32bit wide. To properly reset it to default values, all 32bit need to be
cleared. Bit #1 "Resource Type Indicator
According to the 82371FB documentation (82371FB.pdf, 2.3.9. BMIBA—BUS
MASTER INTERFACE BASE ADDRESS REGISTER, April 1997), the register is
32bit wide. To properly reset it to default values, all 32bit need to be
cleared. Bit #1 "Resource Type Indicator (RTE)" needs to be enabled.
The initial
Write a pattern to the first cluster. Corrupt the data_off field and check
if the field was repaired on image opening and the pattern has not changed.
Signed-off-by: Alexander Ivanov
---
tests/qemu-iotests/tests/parallels-checks | 15 +++
Images repairing in parallels_open() was added, thus parallels tests fail.
Access to an image leads to repairing the image. Further image check don't
detect any corruption. Remove reads after image creation in test 131.
Signed-off-by: Alexander Ivanov
---
tests/qemu-iotests/131 | 6 ++
Write a pattern to the last cluster, extend the image by 1 claster, repair
and check that the last cluster still has the same pattern.
Signed-off-by: Alexander Ivanov
---
tests/qemu-iotests/tests/parallels-checks | 27 +++
tests/qemu-iotests/tests/parallels-checks.out | 22
In this test cluster size is 64k, but modern tools generate images with
cluster size 1M. Calculate cluster size using track field from image header.
Signed-off-by: Alexander Ivanov
---
tests/qemu-iotests/131 | 5 -
tests/qemu-iotests/131.out | 44 +++---
This patchset should be applied on top of [PATCH v7 0/8] parallels: Add
duplication check, repair at open, fix bugs
Add out-of-image, leak and BAT entries duplication checks tests.
Old parallels images check test (131): Refactor, fix cluster size and fix
after repairing was added to
Fill the image with a pattern to generate entries in the BAT, set the first
BAT entry outside the image, try to read the corrupted image. At the image
opening it should be repaired, check for zeroes in the first cluster.
Signed-off-by: Alexander Ivanov
---
Fill a parallels image with a pattern and write another pattern to the
second cluster. Corrupt the image and check if the pattern changes. Repair
the image and check the patterns on guest and host sides.
Signed-off-by: Alexander Ivanov
---
tests/qemu-iotests/tests/parallels-checks | 32
Replace hardcoded numbers by variables.
Signed-off-by: Alexander Ivanov
---
tests/qemu-iotests/131 | 29 -
1 file changed, 16 insertions(+), 13 deletions(-)
diff --git a/tests/qemu-iotests/131 b/tests/qemu-iotests/131
index a847692b4c..601546c84c 100755
---
Fix incorrect data end calculation in parallels_open().
Check if data_end greater than the file size.
Add change_info argument to parallels_check_leak().
Add checking and repairing duplicate offsets in BAT
Image repairing in parallels_open().
v7:
3: Renamed "change_info" argument to
bdrv_co_getlength() should be used in coroutine context. Replace
bdrv_getlength() by bdrv_co_getlength() in parallels_check_outside_image().
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/parallels.c
Repair an image at opening if the image is unclean or out-of-image
corruption was detected.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 70 +--
1 file changed, 38 insertions(+), 32 deletions(-)
diff --git a/block/parallels.c
data_off field of the parallels image header can be corrupted. Check if
this field greater than the header + BAT size and less than file size.
Change checking code in parallels_open() accordingly.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 98
In the on of the next patches we need to repair leaks without changing
leaks and leaks_fixed info in res. Also we don't want to print any warning
about leaks. Add "explicit" argument to skip info changing if the argument
is false.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 19
Initially data_end is set to the data_off image header field and must not be
greater than the file size.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/block/parallels.c b/block/parallels.c
index 86bc3bfcb8..40a26908db 100644
---
In the next patch we will need the offset of the data area for host cluster
index calculation. Add this field and setting up code.
Signed-off-by: Alexander Ivanov
---
block/parallels.c | 7 ---
block/parallels.h | 1 +
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git
The BDRVParallelsState structure contains data_end field that is measured
in sectors. In parallels_open() initially this field is set by data_off
field from parallels image header.
According to the parallels format documentation, data_off field contains
an offset, in sectors, from the start of
Cluster offsets must be unique among all the BAT entries. Find duplicate
offsets in the BAT and fix it by copying the content of the relevant
cluster to a newly allocated cluster and set the new cluster offset to the
duplicated entry.
Add host_cluster_index() helper to deduplicate the code.
When
The next function numbers are expected to form a linked list ending with
0.
Fixes: 44c2c09488 ("hw/nvme: Add support for SR-IOV")
Signed-off-by: Akihiko Odaki
---
hw/nvme/ctrl.c | 7 ++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/hw/nvme/ctrl.c b/hw/nvme/ctrl.c
index
The next function numbers are expected to form a linked list ending with
0.
Fixes: 2503461691 ("pcie: Add some SR/IOV API documentation in
docs/pcie_sriov.txt")
Signed-off-by: Akihiko Odaki
---
docs/pcie_sriov.txt | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git
The function number must be lower than the next function number
advertised with ARI.
Signed-off-by: Akihiko Odaki
---
hw/pci/pci.c | 15 +++
1 file changed, 15 insertions(+)
diff --git a/hw/pci/pci.c b/hw/pci/pci.c
index e2eb4c3b4a..568665ee42 100644
--- a/hw/pci/pci.c
+++
The next function numbers are expected to form a linked list ending with
0.
Fixes: 3a977deebe ("Intrdocue igb device emulation")
Signed-off-by: Akihiko Odaki
---
hw/net/igb_core.h | 3 +++
hw/net/igb.c | 4 +---
hw/net/igbvf.c| 5 -
3 files changed, 8 insertions(+), 4 deletions(-)
The function number must be lower than the next function number
advertised with ARI. Add a check to enforce this.
I suggested this change at:
https://lore.kernel.org/qemu-devel/bf351f8b-1c8a-8a7a-7f44-17c9ba18f...@daynix.com/
Implementing this change, I found the devices implementing ARI do not
31 matches
Mail list logo