Hi Klaus,
On 6/25/20 8:23 PM, Klaus Jensen wrote:
> On Jun 25 17:48, Philippe Mathieu-Daudé wrote:
>> Simplify the NVMe emulated device by aligning the I/O BAR to 4 KiB.
>>
>> Signed-off-by: Philippe Mathieu-Daudé
>> ---
>> include/block/nvme.h | 3 +++
>> hw/block/nvme.c | 5 ++---
>> 2 fi
Waiting on a process for which we have a pipe will stall if the process
outputs more data than fits into the OS-provided buffer. We must use
communicate() before wait(), and in fact, communicate() perfectly
replaces wait() already.
We have to drop the stderr=subprocess.STDOUT parameter from
subpr
This migration parameter allows mapping block node names and bitmap
names to aliases for the purpose of block dirty bitmap migration.
This way, management tools can use different node and bitmap names on
the source and destination and pass the mapping of how bitmaps are to be
transferred to qemu (
Signed-off-by: Max Reitz
---
tests/qemu-iotests/iotests.py | 4
1 file changed, 4 insertions(+)
diff --git a/tests/qemu-iotests/iotests.py b/tests/qemu-iotests/iotests.py
index ef739dd1e3..32f262db5a 100644
--- a/tests/qemu-iotests/iotests.py
+++ b/tests/qemu-iotests/iotests.py
@@ -799,6 +7
The created structure is not really a proper QAPI object, so we cannot
and will not free its members. Strings therein should therefore not be
duplicated, or we will leak them.
Signed-off-by: Max Reitz
---
migration/migration.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --gi
On Jun 30 10:35, Philippe Mathieu-Daudé wrote:
> Hi Klaus,
>
> On 6/25/20 8:23 PM, Klaus Jensen wrote:
> > On Jun 25 17:48, Philippe Mathieu-Daudé wrote:
> >> Simplify the NVMe emulated device by aligning the I/O BAR to 4 KiB.
> >>
> >> Signed-off-by: Philippe Mathieu-Daudé
> >> ---
> >> include
RFC v1: https://lists.nongnu.org/archive/html/qemu-block/2020-05/msg00912.html
RFC v2: https://lists.nongnu.org/archive/html/qemu-block/2020-05/msg00915.html
Branch: https://github.com/XanClic/qemu.git migration-bitmap-mapping-v1
Branch: https://git.xanclic.moe/XanClic/qemu.git migration-bitmap-ma
Signed-off-by: Max Reitz
---
tests/qemu-iotests/300 | 487 +
tests/qemu-iotests/300.out | 5 +
tests/qemu-iotests/group | 1 +
3 files changed, 493 insertions(+)
create mode 100755 tests/qemu-iotests/300
create mode 100644 tests/qemu-iotests/300.out
On 29.06.20 12:12, Maxim Levitsky wrote:
> On Thu, 2020-06-25 at 14:55 +0200, Max Reitz wrote:
>> Similar to _require_working_luks for bash tests, these functions can be
>> used to check whether our luks driver can actually create images.
>>
>> Signed-off-by: Max Reitz
>> ---
>> tests/qemu-iotest
On 29.06.20 14:03, Maxim Levitsky wrote:
> On Thu, 2020-06-25 at 14:55 +0200, Max Reitz wrote:
>> Whenever running an iotest for the luks format, we should check whether
>> luks actually really works.
>>
>> Tests that try to create luks-encrypted qcow2 images should do the same.
>>
>> Signed-off-by
On 29.06.20 14:05, Maxim Levitsky wrote:
> On Thu, 2020-06-25 at 14:55 +0200, Max Reitz wrote:
>> From: Maxim Levitsky
>>
>> This commit adds two tests, which test the new amend interface
>> of both luks raw images and qcow2 luks encrypted images.
>>
>> Signed-off-by: Maxim Levitsky
>> Reviewed-b
On Tue, 2020-06-30 at 10:56 +0200, Max Reitz wrote:
> On 29.06.20 14:05, Maxim Levitsky wrote:
> > On Thu, 2020-06-25 at 14:55 +0200, Max Reitz wrote:
> > > From: Maxim Levitsky
> > >
> > > This commit adds two tests, which test the new amend interface
> > > of both luks raw images and qcow2 luks
On 17.06.20 16:00, Alberto Garcia wrote:
> When resizing an image with qcow2_co_truncate() using the falloc or
> full preallocation modes the code assumes that both the old and new
> sizes are cluster-aligned.
>
> There are two problems with this:
>
> 1) The calculation of how many clusters are
On 6/30/20 10:46 AM, Klaus Jensen wrote:
> On Jun 30 10:35, Philippe Mathieu-Daudé wrote:
>> Hi Klaus,
>>
>> On 6/25/20 8:23 PM, Klaus Jensen wrote:
>>> On Jun 25 17:48, Philippe Mathieu-Daudé wrote:
Simplify the NVMe emulated device by aligning the I/O BAR to 4 KiB.
Signed-off-by: P
On 6/30/20 6:31 AM, Klaus Jensen wrote:
> From: Klaus Jensen
>
> Add new fields from NVM Express v1.4.
>
> Signed-off-by: Klaus Jensen
> ---
> hw/block/nvme.c | 3 +-
> include/block/nvme.h | 195 +--
> 2 files changed, 172 insertions(+), 26 delet
On 6/26/20 7:43 PM, Philippe Mathieu-Daudé wrote:
> On 6/26/20 6:40 PM, Philippe Mathieu-Daudé wrote:
>> As a defense, assert if the requested address is out of the card area.
>>
>> Suggested-by: Peter Maydell
>> Signed-off-by: Philippe Mathieu-Daudé
>> ---
>> hw/sd/sd.c | 18 ++
Move all zone transition rules to a single state machine that also
manages zone resources.
Signed-off-by: Klaus Jensen
---
hw/block/nvme-ns.c | 17 ++-
hw/block/nvme-ns.h | 7 ++
hw/block/nvme.c| 304 -
3 files changed, 242 insertions(+), 86 del
Allow the controller to release active resources by transitioning zones
to the full state.
Signed-off-by: Klaus Jensen
---
hw/block/nvme-ns.h| 2 +
hw/block/nvme.c | 171 ++
hw/block/trace-events | 4 +
include/block/nvme.h | 10 +++
4 file
From: Klaus Jensen
Implement support for TP 4056 ("Namespace Types"). This adds the 'iocs'
(I/O Command Set) device parameter to the nvme-ns device.
Signed-off-by: Klaus Jensen
---
block/nvme.c | 6 +-
hw/block/nvme-ns.c| 24 +++--
hw/block/nvme-ns.h| 11 +-
hw/block/nvme.
From: Klaus Jensen
Hi all,
This series adds support for TP 4056 ("Namespace Types") and TP 4053
("Zoned Namespaces") and is an alternative implementation to the one
submitted by Dmitry[1].
While I don't want this to end up as a discussion about the merits of
each version, I want to point out a
Add the Zone Append command.
Signed-off-by: Klaus Jensen
---
hw/block/nvme.c | 106 ++
hw/block/nvme.h | 3 ++
hw/block/trace-events | 2 +
3 files changed, 111 insertions(+)
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index a4527ad9840
Add the Zone Management Receive command.
Signed-off-by: Klaus Jensen
---
hw/block/nvme-ns.c| 33 +--
hw/block/nvme-ns.h| 9 ++-
hw/block/nvme.c | 130 ++
hw/block/nvme.h | 6 ++
hw/block/trace-events | 1 +
include/block/
Add the Zone Management Send command.
Signed-off-by: Klaus Jensen
---
hw/block/nvme.c | 461 ++
hw/block/nvme.h | 4 +
hw/block/trace-events | 12 ++
3 files changed, 477 insertions(+)
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 7e
This adds basic read and write for zoned namespaces.
A zoned namespace is created by setting the iocs parameter to 0x2 and
supplying a zero-sized blockdev for zone info persistent state
(zns.zoneinfo parameter) and the zns.zcap parameter to specify the
individual zone capacities. The namespace dev
Add new fields, types and data structures for TP 4053 ("Zoned Namespaces").
Signed-off-by: Klaus Jensen
---
include/block/nvme.h | 186 +--
1 file changed, 180 insertions(+), 6 deletions(-)
diff --git a/include/block/nvme.h b/include/block/nvme.h
index 63
Allow the controller to release open resources by transitioning
implicitly and explicitly opened zones to closed. This is done using a
naive "least recently opened" strategy. Some workloads may behave very
badly with this, but for the purpose of testing how software deals with
this it is acceptable
Patches 5 & 6 fix CVE-2020-13253.
The rest are (accumulated) cleanups.
Since v5: Fix incorrect use of sd_addr_to_wpnum() in sd_reset()
Missing review:
[PATCH 01/15] MAINTAINERS: Cc qemu-block mailing list
[PATCH 03/15] hw/sd/sdcard: Move some definitions to use them
[PATCH 04/15] hw/sd/sdcard: Us
Add more descriptive comments to keep a clear separation
between static property vs runtime changeable.
Suggested-by: Peter Maydell
Reviewed-by: Peter Maydell
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/hw/sd/sd.c
Only SCSD cards support Class 6 (Block Oriented Write Protection)
commands.
"SD Specifications Part 1 Physical Layer Simplified Spec. v3.01"
4.3.14 Command Functional Difference in Card Capacity Types
* Write Protected Group
SDHC and SDXC do not support write-protected groups. Issuing
From: Philippe Mathieu-Daudé
We forgot to include the qemu-block mailing list while adding
this section in commit 076a0fc32a7. Fix this.
Suggested-by: Paolo Bonzini
Signed-off-by: Philippe Mathieu-Daudé
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAIN
Add the rrl and frl device parameters. The parameters specify the number
of seconds before the device may perform an internal operation to
"clear" the Reset Zone Recommended and Finish Zone Recommended
attributes respectively.
When the attibutes are set is governed by the rrld and frld parameters
From: Philippe Mathieu-Daudé
I/O request length can not be negative.
Signed-off-by: Philippe Mathieu-Daudé
---
v4: Use uint32_t (pm215)
---
hw/sd/sd.c | 2 +-
hw/sd/trace-events | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 2238ba0
From: Philippe Mathieu-Daudé
To make the next commit easier to review, clean this code first.
Reviewed-by: Peter Maydell
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 24
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
i
Having 'base address' and 'relative offset' displayed
separately is more helpful than the absolute address.
Reviewed-by: Peter Maydell
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 8
hw/sd/trace-events | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff -
Reorder initialization code, constant values first.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 32
1 file changed, 16 insertions(+), 16 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 871c30a67f..22392e5084 100644
--- a/hw/sd/sd.c
+++ b/hw/sd
Move some definitions to use them earlier.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index cac8d7d828..4816b4a462 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -80,6 +80,12 @@ enum S
Replace the following different uses of the same value by
the same HWBLOCK_SIZE definition:
- 512 (magic value)
- 0x200 (magic value)
- 1 << HWBLOCK_SHIFT
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 17 +
1 file changed, 9 insertions(+), 8 deletions(-)
diff --gi
Only move the state machine to ReceivingData if there is no
pending error. This avoids later OOB access while processing
commands queued.
"SD Specifications Part 1 Physical Layer Simplified Spec. v3.01"
4.3.3 Data Read
Read command is rejected if BLOCK_LEN_ERROR or ADDRESS_ERROR
occurred
We don't need to check if sd->blk is set twice.
Reviewed-by: Peter Maydell
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 7f973f6763..e1bba887b2 100644
--- a/hw/sd/sd.c
+++ b/hw/sd
As a defense, assert if the requested address is out of the card area.
Suggested-by: Peter Maydell
Signed-off-by: Philippe Mathieu-Daudé
---
v6: call sd_addr_to_wpnum on 'size - 1' in reset()
---
hw/sd/sd.c | 18 ++
1 file changed, 10 insertions(+), 8 deletions(-)
diff --git a/
Some ACMD were incorrectly displayed. Fix by remembering if we
are processing a ACMD (with current_cmd_is_acmd) and add the
sd_current_cmd_name() helper, which display to correct name
regardless it is a CMD or ACMD.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 17 ++---
1 f
On 28.06.20 13:02, Alberto Garcia wrote:
> qcow2_get_cluster_offset() takes an (unaligned) guest offset and
> returns the (aligned) offset of the corresponding cluster in the qcow2
> image.
>
> In practice none of the callers need to know where the cluster starts
> so this patch makes the function
CRC functions don't modify the buffer argument,
make it const.
Reviewed-by: Alistair Francis
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 0fd672357c..2238ba066d 100644
--- a/hw/sd/s
cmd_valid_while_locked() only needs to read SDRequest->cmd,
pass it directly and make it const.
Reviewed-by: Peter Maydell
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index ba4d0e059
On Jun 18 06:34, Dmitry Fomichev wrote:
> A few trace events are defined that are relevant to implementing
> Namespace Types (NVMe TP 4056).
>
> Signed-off-by: Dmitry Fomichev
Reviewed-by: Klaus Jensen
> ---
> hw/block/trace-events | 11 +++
> 1 file changed, 11 insertions(+)
>
> dif
On Tue 30 Jun 2020 12:19:42 PM CEST, Max Reitz wrote:
>> @@ -537,8 +542,6 @@ int qcow2_get_cluster_offset(BlockDriverState *bs,
>> uint64_t offset,
>> bytes_needed = bytes_available;
>> }
>>
>> -*cluster_offset = 0;
>> -
>
> You drop this line without replacement now. That mea
* Max Reitz (mre...@redhat.com) wrote:
> The created structure is not really a proper QAPI object, so we cannot
> and will not free its members. Strings therein should therefore not be
> duplicated, or we will leak them.
>
> Signed-off-by: Max Reitz
> ---
> migration/migration.c | 4 ++--
> 1 f
Improvements for the I/O BAR structure:
- correct pmrmsc register size (Klaus)
- pack structures
- align to 4KB
Philippe Mathieu-Daudé (4):
hw/block/nvme: Update specification URL
hw/block/nvme: Use QEMU_PACKED on hardware/packet structures
hw/block/nvme: Fix pmrmsc register size
hw/block/
The Persistent Memory Region Controller Memory Space Control
register is 64-bit wide. See 'Figure 68: Register Definition'
of the 'NVM Express Base Specification Revision 1.4'.
Fixes: 6cf9413229 ("introduce PMR support from NVMe 1.4 spec")
Reported-by: Klaus Jensen
Signed-off-by: Philippe Mathieu
These structures either describe hardware registers, or
commands ('packets') to send to the hardware. To forbid
the compiler to optimize and change fields alignment,
mark the structures as packed.
Signed-off-by: Philippe Mathieu-Daudé
---
include/block/nvme.h | 38 +++
At some point the URL changed, update it to avoid other
developers to search for it.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/block/nvme.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 1aee042d4c..6628d0a4ba 100644
--- a/hw/block/
Simplify the NVMe emulated device by aligning the I/O BAR to 4 KiB.
Reviewed-by: Klaus Jensen
Signed-off-by: Philippe Mathieu-Daudé
---
v2: Do not include 'cmd_set_specfic' (Klaus)
---
include/block/nvme.h | 2 ++
hw/block/nvme.c | 5 ++---
2 files changed, 4 insertions(+), 3 deletions(-)
On 28.06.20 13:02, Alberto Garcia wrote:
> When writing to a qcow2 file there are two functions that take a
> virtual offset and return a host offset, possibly allocating new
> clusters if necessary:
>
>- handle_copied() looks for normal data clusters that are already
> allocated and have
Patchew URL: https://patchew.org/QEMU/20200630100342.27625-1-f4...@amsat.org/
Hi,
This series failed the docker-quick@centos7 build test. Please find the testing
commands and
their output below. If you have Docker installed, you can probably reproduce it
locally.
=== TEST SCRIPT BEGIN ===
#!/
On Jun 30 12:37, Philippe Mathieu-Daudé wrote:
> At some point the URL changed, update it to avoid other
> developers to search for it.
>
> Signed-off-by: Philippe Mathieu-Daudé
Reviewed-by: Klaus Jensen
> ---
> hw/block/nvme.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff
On Jun 30 12:37, Philippe Mathieu-Daudé wrote:
> The Persistent Memory Region Controller Memory Space Control
> register is 64-bit wide. See 'Figure 68: Register Definition'
> of the 'NVM Express Base Specification Revision 1.4'.
>
> Fixes: 6cf9413229 ("introduce PMR support from NVMe 1.4 spec")
>
* Max Reitz (mre...@redhat.com) wrote:
> This migration parameter allows mapping block node names and bitmap
> names to aliases for the purpose of block dirty bitmap migration.
>
> This way, management tools can use different node and bitmap names on
> the source and destination and pass the mappi
On Jun 30 12:37, Philippe Mathieu-Daudé wrote:
> These structures either describe hardware registers, or
> commands ('packets') to send to the hardware. To forbid
> the compiler to optimize and change fields alignment,
> mark the structures as packed.
>
> Signed-off-by: Philippe Mathieu-Daudé
Re
At some point the URL changed, update it to avoid other
developers to search for it.
Reviewed-by: Klaus Jensen
Signed-off-by: Philippe Mathieu-Daudé
---
hw/block/nvme.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/block/nvme.c b/hw/block/nvme.c
index 1aee042d4c..6628d0
Simplify the NVMe emulated device by aligning the I/O BAR to 4 KiB.
Reviewed-by: Klaus Jensen
Signed-off-by: Philippe Mathieu-Daudé
---
include/block/nvme.h | 2 ++
hw/block/nvme.c | 5 ++---
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/include/block/nvme.h b/include/bloc
Improvements for the I/O BAR structure:
- correct pmrmsc register size (Klaus)
- pack structures
- align to 4KB
Since v2:
- Added Klaus' tags with correct address
$ git backport-diff -u v2
Key:
[] : patches are identical
[] : number of functional differences between upstream/downstream pa
These structures either describe hardware registers, or
commands ('packets') to send to the hardware. To forbid
the compiler to optimize and change fields alignment,
mark the structures as packed.
Reviewed-by: Klaus Jensen
Signed-off-by: Philippe Mathieu-Daudé
---
include/block/nvme.h | 38
The Persistent Memory Region Controller Memory Space Control
register is 64-bit wide. See 'Figure 68: Register Definition'
of the 'NVM Express Base Specification Revision 1.4'.
Fixes: 6cf9413229 ("introduce PMR support from NVMe 1.4 spec")
Reported-by: Klaus Jensen
Reviewed-by: Klaus Jensen
Sign
On Jun 18 06:34, Dmitry Fomichev wrote:
> From: Niklas Cassel
>
> Namespace Types introduce a new command set, "I/O Command Sets",
> that allows the host to retrieve the command sets associated with
> a namespace. Introduce support for the command set, and enable
> detection for the NVM Command S
On Jun 18 06:34, Dmitry Fomichev wrote:
> Define values and structures that are needed to support Zoned
> Namespace Command Set (NVMe TP 4053) in PCI NVMe controller emulator.
>
> All new protocol definitions are located in include/block/nvme.h
> and everything added that is specific to this imple
On Jun 30 13:44, Klaus Jensen wrote:
> On Jun 18 06:34, Dmitry Fomichev wrote:
> > Define values and structures that are needed to support Zoned
> > Namespace Command Set (NVMe TP 4053) in PCI NVMe controller emulator.
> >
> > All new protocol definitions are located in include/block/nvme.h
> > an
On Jun 18 06:34, Dmitry Fomichev wrote:
> The Zoned Namespace Command Set / Namespace Types implementation that
> is being introduced in this series adds a good number of trace events.
> Combine all tracepoint definitions into a separate patch to make
> reviewing more convenient.
>
> Signed-off-by
On Jun 18 06:34, Dmitry Fomichev wrote:
> The driver has been changed to advertise NVM Command Set when "zoned"
> driver property is not set (default) and Zoned Namespace Command Set
> otherwise.
>
> Handlers for three new NVMe commands introduced in Zoned Namespace
> Command Set specification are
From: Philippe Mathieu-Daudé
We forgot to include the qemu-block mailing list while adding
this section in commit 076a0fc32a7. Fix this.
Suggested-by: Paolo Bonzini
Signed-off-by: Philippe Mathieu-Daudé
---
MAINTAINERS | 1 +
1 file changed, 1 insertion(+)
diff --git a/MAINTAINERS b/MAINTAIN
Patches 5 & 6 fix CVE-2020-13253.
The rest are (accumulated) cleanups.
Since v6: Handle -ENOMEDIUM error
Since v5: Fix incorrect use of sd_addr_to_wpnum() in sd_reset()
Missing review:
[PATCH 01/15] MAINTAINERS: Cc qemu-block mailing list
[PATCH 03/15] hw/sd/sdcard: Move some definitions to use t
From: Philippe Mathieu-Daudé
To make the next commit easier to review, clean this code first.
Reviewed-by: Peter Maydell
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 24
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
i
Replace the following different uses of the same value by
the same HWBLOCK_SIZE definition:
- 512 (magic value)
- 0x200 (magic value)
- 1 << HWBLOCK_SHIFT
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 17 +
1 file changed, 9 insertions(+), 8 deletions(-)
diff --gi
As we have no interest in the underlying block geometry,
directly call blk_getlength(). We have to care about machines
creating SD card with not drive attached (probably incorrect
API use). Simply emit a warning when such Frankenstein cards
of zero size are reset.
Signed-off-by: Philippe Mathieu-D
Move some definitions to use them earlier.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 12 ++--
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index cac8d7d828..4816b4a462 100644
--- a/hw/sd/sd.c
+++ b/hw/sd/sd.c
@@ -80,6 +80,12 @@ enum S
As a defense, assert if the requested address is out of the card area.
Suggested-by: Peter Maydell
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 16 +---
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 548745614e..5d1b314a32 10064
Add more descriptive comments to keep a clear separation
between static property vs runtime changeable.
Suggested-by: Peter Maydell
Reviewed-by: Peter Maydell
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/hw/sd/sd.c
Only move the state machine to ReceivingData if there is no
pending error. This avoids later OOB access while processing
commands queued.
"SD Specifications Part 1 Physical Layer Simplified Spec. v3.01"
4.3.3 Data Read
Read command is rejected if BLOCK_LEN_ERROR or ADDRESS_ERROR
occurred
Avoid setting 'sect' variable just once (its name is confuse
anyway). Directly set 'sd->wpgrps_size'. Special case when
size is zero.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 078
We don't need to check if sd->blk is set twice.
Reviewed-by: Peter Maydell
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 10 +-
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 304fa4143a..8ef6715665 100644
--- a/hw/sd/sd.c
+++ b/hw/sd
CRC functions don't modify the buffer argument,
make it const.
Reviewed-by: Alistair Francis
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 2946fe3040..364a6d1fcd 100644
--- a/hw/sd/s
Only SCSD cards support Class 6 (Block Oriented Write Protection)
commands.
"SD Specifications Part 1 Physical Layer Simplified Spec. v3.01"
4.3.14 Command Functional Difference in Card Capacity Types
* Write Protected Group
SDHC and SDXC do not support write-protected groups. Issuing
Move sd->size initialization earlier to make the following
patches easier to review.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 871c30a67f..078b0e81ee 100644
--- a/hw/sd/sd.c
+++ b/hw/
cmd_valid_while_locked() only needs to read SDRequest->cmd,
pass it directly and make it const.
Reviewed-by: Peter Maydell
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 723e66bbf
From: Philippe Mathieu-Daudé
I/O request length can not be negative.
Signed-off-by: Philippe Mathieu-Daudé
---
v4: Use uint32_t (pm215)
---
hw/sd/sd.c | 2 +-
hw/sd/trace-events | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/hw/sd/sd.c b/hw/sd/sd.c
index 364a6d1
Having 'base address' and 'relative offset' displayed
separately is more helpful than the absolute address.
Reviewed-by: Peter Maydell
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 8
hw/sd/trace-events | 4 ++--
2 files changed, 6 insertions(+), 6 deletions(-)
diff -
Some ACMD were incorrectly displayed. Fix by remembering if we
are processing a ACMD (with current_cmd_is_acmd) and add the
sd_current_cmd_name() helper, which display to correct name
regardless it is a CMD or ACMD.
Signed-off-by: Philippe Mathieu-Daudé
---
hw/sd/sd.c | 17 ++---
1 f
On 6/30/20 2:59 PM, Niklas Cassel wrote:
> On Tue, Jun 30, 2020 at 12:01:29PM +0200, Klaus Jensen wrote:
>> From: Klaus Jensen
>>
>> Hi all,
>
> Hello Klaus,
>
>>
>> This series adds support for TP 4056 ("Namespace Types") and TP 4053
>> ("Zoned Namespaces") and is an alternative implementation
On Mon, Jun 29, 2020 at 07:12:47PM -0700, Alistair Francis wrote:
> On Wed, Jun 17, 2020 at 2:47 PM Dmitry Fomichev
> wrote:
> >
> > From: Niklas Cassel
> >
> > Define the structures and constants required to implement
> > Namespace Types support.
> >
> > Signed-off-by: Niklas Cassel
> > Signed
On Tue, Jun 30, 2020 at 12:01:29PM +0200, Klaus Jensen wrote:
> From: Klaus Jensen
>
> Hi all,
Hello Klaus,
>
> This series adds support for TP 4056 ("Namespace Types") and TP 4053
> ("Zoned Namespaces") and is an alternative implementation to the one
> submitted by Dmitry[1].
>
> While I don
On 6/30/20 4:04 AM, Philippe Mathieu-Daudé wrote:
> The Persistent Memory Region Controller Memory Space Control
> register is 64-bit wide. See 'Figure 68: Register Definition'
> of the 'NVM Express Base Specification Revision 1.4'.
>
> Fixes: 6cf9413229 ("introduce PMR support from NVMe 1.4 spec"
On 6/30/20 5:10 PM, Andrzej Jakowski wrote:
> On 6/30/20 4:04 AM, Philippe Mathieu-Daudé wrote:
>> The Persistent Memory Region Controller Memory Space Control
>> register is 64-bit wide. See 'Figure 68: Register Definition'
>> of the 'NVM Express Base Specification Revision 1.4'.
>>
>> Fixes: 6cf9
On Tue, Jun 30, 2020 at 04:09:46PM +0200, Philippe Mathieu-Daudé wrote:
> What I see doable for the following days is:
> - hw/block/nvme: Fix I/O BAR structure [3]
> - hw/block/nvme: handle transient dma errors
> - hw/block/nvme: bump to v1.3
These look like sensible patches to rebase future work
On Tue, Jun 30, 2020 at 06:57:16AM +0200, Klaus Jensen wrote:
> On Jun 18 06:34, Dmitry Fomichev wrote:
> > From: Niklas Cassel
> >
> > Define the structures and constants required to implement
> > Namespace Types support.
> >
> > Signed-off-by: Niklas Cassel
> > Signed-off-by: Dmitry Fomichev
On Jun 30 17:16, Philippe Mathieu-Daudé wrote:
> On 6/30/20 5:10 PM, Andrzej Jakowski wrote:
> > On 6/30/20 4:04 AM, Philippe Mathieu-Daudé wrote:
> >> The Persistent Memory Region Controller Memory Space Control
> >> register is 64-bit wide. See 'Figure 68: Register Definition'
> >> of the 'NVM Ex
On Tue, Jun 30, 2020 at 10:02:15AM +, Niklas Cassel wrote:
> On Mon, Jun 29, 2020 at 07:12:47PM -0700, Alistair Francis wrote:
> > On Wed, Jun 17, 2020 at 2:47 PM Dmitry Fomichev
> > wrote:
> > > +uint16_tctrlid;
> >
> > Shouldn't this be CNTID?
>
> From the NVMe spec:
> https://nvm
Hi,
This series is mostly code rearrangement (cleanups) to be
able to split the hardware code from the block driver code,
to be able to use multiple queues on the same hardware, or
multiple block drivers on the same hardware.
Missing review: 1, 2, 5, 6, 8, 12.
Since v1:
- rebased
- use SCALE_MS
Avoid further processing if TRACE_NVME_SUBMIT_COMMAND_RAW is
not enabled. This is an untested intend of performance optimization.
Signed-off-by: Philippe Mathieu-Daudé
---
block/nvme.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/block/nvme.c b/block/nvme.c
index 2f5e3c2adf..8c30a5fee2
Use self-explicit SCALE_MS definition instead of magic value.
Signed-off-by: Philippe Mathieu-Daudé
---
block/nvme.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/block/nvme.c b/block/nvme.c
index 374e268915..2f5e3c2adf 100644
--- a/block/nvme.c
+++ b/block/nvme.c
@@ -715,7
Use definitions instead of '0' or '1' indexes. Also this will
be useful when using multi-queues later.
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Philippe Mathieu-Daudé
---
block/nvme.c | 33 +++--
1 file changed, 19 insertions(+), 14 deletions(-)
diff --git a/bloc
As nvme_create_queue_pair() is allowed to fail, replace the
alloc() calls by try_alloc() to avoid aborting QEMU.
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Philippe Mathieu-Daudé
---
block/nvme.c | 12 ++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/block/nvme.c b/b
1 - 100 of 117 matches
Mail list logo