Re: [PATCH 2/2] hw/nvme: move device-scoped functions

2021-02-10 Thread Klaus Jensen
On Feb 11 11:55, Minwoo Im wrote: > On 21-02-09 12:08:26, Klaus Jensen wrote: > > From: Klaus Jensen > > > > Move a bunch of functions that are internal to a device out of the > > shared header. > > May I ask why? I think some kind of these helpers can stick onto the > header. I just thought

Re: [RFC PATCH 3/3] hw/block/nvme: add nvme_inject_state HMP command

2021-02-10 Thread Klaus Jensen
On Feb 11 13:24, Keith Busch wrote: > On Thu, Feb 11, 2021 at 12:38:48PM +0900, Minwoo Im wrote: > > On 21-02-11 12:00:11, Keith Busch wrote: > > > But I would prefer to see advanced retry tied to real errors that can be > > > retried, like if we got an EBUSY or EAGAIN errno or something like

Re: [RFC PATCH V2 02/11] hw/block/nvme: open code for volatile write cache

2021-02-10 Thread Sai Pavan Boddu
Hi Minwoo, Please ignore this mail, I see a fix already floating around in the list. Regards, Sai Pavan On Thu, Feb 11, 2021 at 12:15:57PM +0530, Sai Pavan Boddu wrote: > Hi Minwoo, > > On Sun, Jan 17, 2021 at 11:53:32PM +0900, Minwoo Im wrote: > > Volatile Write Cache(VWC) feature is set in

Re: [RFC PATCH V2 02/11] hw/block/nvme: open code for volatile write cache

2021-02-10 Thread Sai Pavan Boddu
Hi Minwoo, On Sun, Jan 17, 2021 at 11:53:32PM +0900, Minwoo Im wrote: > Volatile Write Cache(VWC) feature is set in nvme_ns_setup() in the > initial time. This feature is related to block device backed, but this > feature is controlled in controller level via Set/Get Features command. > > This

Re: [RFC PATCH 3/3] hw/block/nvme: add nvme_inject_state HMP command

2021-02-10 Thread Minwoo Im
On 21-02-11 13:24:22, Keith Busch wrote: > On Thu, Feb 11, 2021 at 12:38:48PM +0900, Minwoo Im wrote: > > On 21-02-11 12:00:11, Keith Busch wrote: > > > But I would prefer to see advanced retry tied to real errors that can be > > > retried, like if we got an EBUSY or EAGAIN errno or something like

Re: [RFC PATCH 3/3] hw/block/nvme: add nvme_inject_state HMP command

2021-02-10 Thread Warner Losh
On Wed, Feb 10, 2021, 9:26 PM Keith Busch wrote: > On Thu, Feb 11, 2021 at 12:38:48PM +0900, Minwoo Im wrote: > > On 21-02-11 12:00:11, Keith Busch wrote: > > > But I would prefer to see advanced retry tied to real errors that can > be > > > retried, like if we got an EBUSY or EAGAIN errno or

Re: [RFC PATCH 3/3] hw/block/nvme: add nvme_inject_state HMP command

2021-02-10 Thread Keith Busch
On Thu, Feb 11, 2021 at 12:38:48PM +0900, Minwoo Im wrote: > On 21-02-11 12:00:11, Keith Busch wrote: > > But I would prefer to see advanced retry tied to real errors that can be > > retried, like if we got an EBUSY or EAGAIN errno or something like that. > > I have seen a thread [1] about ACRE.

Re: [RFC PATCH 1/3] hw/block/nvme: set NVME_DNR in a single place

2021-02-10 Thread Minwoo Im
On 21-02-10 21:19:43, Klaus Jensen wrote: > On Feb 11 04:52, Minwoo Im wrote: > > @@ -945,6 +945,11 @@ static void nvme_post_cqes(void *opaque) > > static void nvme_enqueue_req_completion(NvmeCQueue *cq, NvmeRequest *req) > > { > > assert(cq->cqid == req->sq->cqid); > > + > > +if

Re: [RFC PATCH 3/3] hw/block/nvme: add nvme_inject_state HMP command

2021-02-10 Thread Minwoo Im
On 21-02-11 12:00:11, Keith Busch wrote: > On Thu, Feb 11, 2021 at 04:52:52AM +0900, Minwoo Im wrote: > > nvme_inject_state command is to give a controller state to be. > > Human Monitor Interface(HMP) supports users to make controller to a > > specified state of: > > > > normal:

Re: [PATCH 2/2] hw/block/nvme: add write uncorrectable command

2021-02-10 Thread Keith Busch
On Wed, Feb 10, 2021 at 08:06:46AM +0100, Klaus Jensen wrote: > From: Gollu Appalanaidu > > Add support for marking blocks invalid with the Write Uncorrectable > command. Block status is tracked in a (non-persistent) bitmap that is > checked on all reads and written to on all writes. This is

Re: [RFC PATCH 3/3] hw/block/nvme: add nvme_inject_state HMP command

2021-02-10 Thread Minwoo Im
On 21-02-10 21:33:50, Klaus Jensen wrote: > On Feb 11 04:52, Minwoo Im wrote: > > nvme_inject_state command is to give a controller state to be. > > Human Monitor Interface(HMP) supports users to make controller to a > > specified state of: > > > > normal: Normal state (no

Re: [RFC PATCH 3/3] hw/block/nvme: add nvme_inject_state HMP command

2021-02-10 Thread Keith Busch
On Thu, Feb 11, 2021 at 04:52:52AM +0900, Minwoo Im wrote: > nvme_inject_state command is to give a controller state to be. > Human Monitor Interface(HMP) supports users to make controller to a > specified state of: > > normal: Normal state (no injection) >

Re: [PATCH 2/2] hw/nvme: move device-scoped functions

2021-02-10 Thread Minwoo Im
On 21-02-09 12:08:26, Klaus Jensen wrote: > From: Klaus Jensen > > Move a bunch of functions that are internal to a device out of the > shared header. May I ask why? I think some kind of these helpers can stick onto the header.

Re: [PATCH 1/2] hw/nvme: move nvme emulation out of hw/block

2021-02-10 Thread Minwoo Im
On 21-02-09 12:08:25, Klaus Jensen wrote: > From: Klaus Jensen > > With the introduction of the nvme-subsystem device we are really > cluttering up the hw/block directory. > > As suggested by Philippe previously, move the nvme emulation to > hw/nvme. > > Suggested-by: Philippe Mathieu-Daudé >

Re: [PATCH] hw/block/nvme: drain namespaces on sq deletion

2021-02-10 Thread Minwoo Im
On 21-01-27 14:15:05, Klaus Jensen wrote: > From: Klaus Jensen > > For most commands, when issuing an AIO, the BlockAIOCB is stored in the > NvmeRequest aiocb pointer when the AIO is issued. The purpose of storing > this is to allow the AIO to be cancelled when deleting submission > queues (it

Re: [PATCH v3 1/2] qemu-nbd: Use SOMAXCONN for socket listen() backlog

2021-02-10 Thread Eric Blake
On 2/10/21 10:58 AM, Nir Soffer wrote: > On Tue, Feb 9, 2021 at 5:28 PM Eric Blake wrote: >> >> Our default of a backlog of 1 connection is rather puny; it gets in >> the way when we are explicitly allowing multiple clients (such as >> qemu-nbd -e N [--shared], or nbd-server-start with its

Re: [PATCH v2] hw/block: nvme: Fix a build error in nvme_get_feature()

2021-02-10 Thread Peter Maydell
On Wed, 10 Feb 2021 at 10:23, Bin Meng wrote: > > From: Bin Meng > > Current QEMU HEAD nvme.c does not compile: > > hw/block/nvme.c:3242:9: error: ‘result’ may be used uninitialized in this > function [-Werror=maybe-uninitialized] > trace_pci_nvme_getfeat_vwcache(result ? "enabled" :

Re: [PATCH] hw/sd: sdhci: Do not transfer any data when command fails

2021-02-10 Thread Alistair Francis
On Tue, Feb 9, 2021 at 2:55 AM Bin Meng wrote: > > At the end of sdhci_send_command(), it starts a data transfer if > the command register indicates a data is associated. However the > data transfer should only be initiated when the command execution > has succeeded. > > Cc:

Re: [PATCH v3 2/2] qemu-nbd: Permit --shared=0 for unlimited clients

2021-02-10 Thread Nir Soffer
On Tue, Feb 9, 2021 at 5:28 PM Eric Blake wrote: > > This gives us better feature parity with QMP nbd-server-start, where > max-connections defaults to 0 for unlimited. Sound useful > Signed-off-by: Eric Blake > --- > docs/tools/qemu-nbd.rst | 4 ++-- > qemu-nbd.c | 7 +++ >

Re: [PATCH] hw/block/nvme: drain namespaces on sq deletion

2021-02-10 Thread Klaus Jensen
On Jan 27 14:15, Klaus Jensen wrote: > From: Klaus Jensen > > For most commands, when issuing an AIO, the BlockAIOCB is stored in the > NvmeRequest aiocb pointer when the AIO is issued. The purpose of storing > this is to allow the AIO to be cancelled when deleting submission > queues (it is

Re: [PATCH v2] hw/block/nvme: use locally assigned QEMU IEEE OUI

2021-02-10 Thread Klaus Jensen
On Feb 9 12:10, Philippe Mathieu-Daudé wrote: > On 2/9/21 11:45 AM, Klaus Jensen wrote: > > From: Gollu Appalanaidu > > > > Commit 6eb7a071292a ("hw/block/nvme: change controller pci id") changed > > the controller to use a Red Hat assigned PCI Device and Vendor ID, but > > did not change the

Re: [PATCH] hw/block/nvme: improve invalid zasl value reporting

2021-02-10 Thread Klaus Jensen
On Feb 8 09:25, Klaus Jensen wrote: > From: Klaus Jensen > > The Zone Append Size Limit (ZASL) must be at least 4096 bytes, so > improve the user experience by adding an early parameter check in > nvme_check_constraints. > > When ZASL is still too small due to the host configuring the device

Re: [PATCH v3] hw/block: nvme: Fix a build error in nvme_get_feature()

2021-02-10 Thread Klaus Jensen
On Feb 10 19:22, Bin Meng wrote: > From: Bin Meng > > Current QEMU HEAD nvme.c does not compile with the default GCC 5.4 > on a Ubuntu 16.04 host: > > hw/block/nvme.c:3242:9: error: ‘result’ may be used uninitialized in this > function [-Werror=maybe-uninitialized] >

Re: [RFC PATCH 2/3] hw/block/nvme: support command retry delay

2021-02-10 Thread Klaus Jensen
On Feb 11 04:52, Minwoo Im wrote: > Set CRDT1(Command Retry Delay Time 1) in the Identify controller data > structure to milliseconds units of 100ms by the given value of > 'cmd-retry-delay' parameter which is newly added. If > cmd-retry-delay=1000, it will be set CRDT1 to 10. This patch only >

Re: [RFC PATCH 3/3] hw/block/nvme: add nvme_inject_state HMP command

2021-02-10 Thread Klaus Jensen
On Feb 11 04:52, Minwoo Im wrote: > nvme_inject_state command is to give a controller state to be. > Human Monitor Interface(HMP) supports users to make controller to a > specified state of: > > normal: Normal state (no injection) > cmd-interrupted:Commands

[RFC PATCH 2/3] hw/block/nvme: support command retry delay

2021-02-10 Thread Minwoo Im
Set CRDT1(Command Retry Delay Time 1) in the Identify controller data structure to milliseconds units of 100ms by the given value of 'cmd-retry-delay' parameter which is newly added. If cmd-retry-delay=1000, it will be set CRDT1 to 10. This patch only considers the CRDT1 without CRDT2 and 3 for

[RFC PATCH 3/3] hw/block/nvme: add nvme_inject_state HMP command

2021-02-10 Thread Minwoo Im
nvme_inject_state command is to give a controller state to be. Human Monitor Interface(HMP) supports users to make controller to a specified state of: normal: Normal state (no injection) cmd-interrupted:Commands will be interrupted internally This patch is

[RFC PATCH 0/3] support command retry

2021-02-10 Thread Minwoo Im
Hello, This series is RFC about supporting command retry feature in NVMe device model. The background to propose this feature is that in kernel development and testing, retry scheme has not been able to be covered in QEMU NVMe model device. If we are able to control the retry scheme fromt he

[RFC PATCH 1/3] hw/block/nvme: set NVME_DNR in a single place

2021-02-10 Thread Minwoo Im
Set NVME_DNR in the CQ entry status field right before writing the CQ entry: in nvme_post_cqes(). We have put NVME_DNR for all CQ entry status for all error cases. This patch is a former patch to support command retry feature. Signed-off-by: Minwoo Im --- hw/block/nvme.c | 192

Re: [PULL v4 00/27] Block patches

2021-02-10 Thread Peter Maydell
On Wed, 10 Feb 2021 at 09:26, Stefan Hajnoczi wrote: > > The following changes since commit 1214d55d1c41fbab3a9973a05085b8760647e411: > > Merge remote-tracking branch 'remotes/nvme/tags/nvme-next-pull-request' > into staging (2021-02-09 13:24:37 +) > > are available in the Git repository

Re: [PATCH 3/7] block/qcow2: use compressed write cache

2021-02-10 Thread Max Reitz
On 29.01.21 17:50, Vladimir Sementsov-Ogievskiy wrote: Introduce a new option: compressed-cache-size, with default to 64 clusters (to be not less than 64 default max-workers for backup job). Signed-off-by: Vladimir Sementsov-Ogievskiy --- qapi/block-core.json | 8 +++- block/qcow2.h

Re: [PATCH 1/2] file-posix: Use OFD lock only if the filesystem supports the lock

2021-02-10 Thread Kevin Wolf
Hi Masa, Am 10.02.2021 um 17:43 hat Masayoshi Mizuma geschrieben: > Hi Kevin, > > The filesystem team found a locking issue in the filesystem. > Your comments were very helpful! I really appriciate it. > > Thanks, > Masa I'm glad that I could help you to find the root cause. Thanks for

Re: [RFC PATCH v2 0/4] Allow changing bs->file on reopen

2021-02-10 Thread Kevin Wolf
Am 08.02.2021 um 19:44 hat Alberto Garcia geschrieben: > Hi, > > this series allows changing bs->file using x-blockdev-reopen. Read > here for more details: > >https://lists.gnu.org/archive/html/qemu-block/2021-01/msg00437.html > > Version 2 of the series introduces a very significant

Re: [PATCH 2/7] block/qcow2: introduce cache for compressed writes

2021-02-10 Thread Max Reitz
On 29.01.21 17:50, Vladimir Sementsov-Ogievskiy wrote: Compressed writes and O_DIRECT are not friends: they works too slow, because compressed writes does many small unaligned to 512 writes. Let's introduce an internal cache, so that compressed writes may work well when O_DIRECT is on.

Re: [RFC PATCH v2 2/4] iotests: Update 245 to support replacing files with x-blockdev-reopen

2021-02-10 Thread Kevin Wolf
Am 08.02.2021 um 19:44 hat Alberto Garcia geschrieben: > Signed-off-by: Alberto Garcia > +def test_insert_throttle_filter(self): > +hd0_opts = hd_opts(0) > +result = self.vm.qmp('blockdev-add', conv_keys = False, **hd0_opts) > +self.assert_qmp(result, 'return', {}) >

Re: [PATCH v3 1/2] qemu-nbd: Use SOMAXCONN for socket listen() backlog

2021-02-10 Thread Nir Soffer
On Tue, Feb 9, 2021 at 5:28 PM Eric Blake wrote: > > Our default of a backlog of 1 connection is rather puny; it gets in > the way when we are explicitly allowing multiple clients (such as > qemu-nbd -e N [--shared], or nbd-server-start with its default > "max-connections":0 for unlimited), but

[PATCH v2 2/2] migration: dirty-bitmap: Allow control of bitmap persistance

2021-02-10 Thread Peter Krempa
Bitmap's source persistance is transported over the migration stream and the destination mirrors it. In some cases the destination might want to persist bitmaps which are not persistent on the source (e.g. the result of merge of bitmaps from a number of layers on the source when migrating into a

[PATCH v2 0/2] migration: dirty-bitmap: Allow control of bitmap persistence

2021-02-10 Thread Peter Krempa
See 2/2 for explanation. Peter Krempa (2): migration: dirty-bitmap: Convert alias map inner members to a struct migration: dirty-bitmap: Allow control of bitmap persistance migration/block-dirty-bitmap.c | 73 +- qapi/migration.json| 20 +-

[PATCH v2 1/2] migration: dirty-bitmap: Convert alias map inner members to a struct

2021-02-10 Thread Peter Krempa
Currently the alias mapping hash stores just strings of the target objects internally. In further patches we'll be adding another member which will need to be stored in the map so convert the members to a struct. Signed-off-by: Peter Krempa Reviewed-by: Eric Blake Reviewed-by: Vladimir

Re: [RFC PATCH v2 1/4] block: Allow changing bs->file on reopen

2021-02-10 Thread Kevin Wolf
Am 08.02.2021 um 19:44 hat Alberto Garcia geschrieben: > When the x-blockdev-reopen was added it allowed reconfiguring the > graph by replacing backing files, but changing the 'file' option was > forbidden. Because of this restriction some operations are not > possible, notably inserting and

Re: [PATCH 1/7] qemu/queue: add some useful QLIST_ and QTAILQ_ macros

2021-02-10 Thread Max Reitz
On 29.01.21 17:50, Vladimir Sementsov-Ogievskiy wrote: Add QLIST_FOREACH_FUNC_SAFE(), QTAILQ_FOREACH_FUNC_SAFE() and QTAILQ_POP_HEAD(), to be used in following commit. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/qemu/queue.h | 14 ++ 1 file changed, 14 insertions(+)

Re: [PATCH 1/2] file-posix: Use OFD lock only if the filesystem supports the lock

2021-02-10 Thread Masayoshi Mizuma
On Fri, Nov 20, 2020 at 04:42:28PM +0100, Kevin Wolf wrote: > Am 20.11.2020 um 00:56 hat Masayoshi Mizuma geschrieben: > > On Thu, Nov 19, 2020 at 11:44:42AM +0100, Kevin Wolf wrote: > > > Am 18.11.2020 um 20:48 hat Masayoshi Mizuma geschrieben: > > > > On Wed, Nov 18, 2020 at 02:10:36PM -0500,

[PATCH V2 7/7] hw/block/nvme: support Identify NS Attached Controller List

2021-02-10 Thread Minwoo Im
Support Identify command for Namespace attached controller list. This command handler will traverse the controller instances in the given subsystem to figure out whether the specified nsid is attached to the controllers or not. The 4096bytes Identify data will return with the first entry

[PATCH V2 4/7] hw/block/nvme: support allocated namespace type

2021-02-10 Thread Minwoo Im
>From NVMe spec 1.4b "6.1.5. NSID and Namespace Relationships" defines valid namespace types: - Unallocated: Not exists in the NVMe subsystem - Allocated: Exists in the NVMe subsystem - Inactive: Not attached to the controller - Active: Attached to the controller

[PATCH V2 5/7] hw/block/nvme: refactor nvme_select_ns_iocs

2021-02-10 Thread Minwoo Im
This patch has no functional changes. This patch just refactored nvme_select_ns_iocs() to iterate the attached namespaces of the controlller and make it invoke __nvme_select_ns_iocs(). Signed-off-by: Minwoo Im --- hw/block/nvme.c | 36 +--- 1 file changed, 21

[PATCH V2 6/7] hw/block/nvme: support namespace attachment command

2021-02-10 Thread Minwoo Im
This patch supports Namespace Attachment command for the pre-defined nvme-ns device nodes. Of course, attach/detach namespace should only be supported in case 'subsys' is given. This is because if we detach a namespace from a controller, somebody needs to manage the detached, but allocated

[PATCH V2 2/7] hw/block/nvme: fix namespaces array to 1-based

2021-02-10 Thread Minwoo Im
subsys->namespaces array used to be sized to NVME_SUBSYS_MAX_NAMESPACES. But subsys->namespaces are being accessed with 1-based namespace id which means the very first array entry will always be empty(NULL). Signed-off-by: Minwoo Im --- hw/block/nvme-subsys.h | 2 +- 1 file changed, 1

[PATCH V2 3/7] hw/block/nvme: fix allocated namespace list to 256

2021-02-10 Thread Minwoo Im
Expand allocated namespace list (subsys->namespaces) to have 256 entries which is a value lager than at least NVME_MAX_NAMESPACES which is for attached namespace list in a controller. Allocated namespace list should at least larger than attached namespace list. n->num_namespaces =

[PATCH V2 1/7] hw/block/nvme: support namespace detach

2021-02-10 Thread Minwoo Im
Given that now we have nvme-subsys device supported, we can manage namespace allocated, but not attached: detached. This patch introduced a parameter for nvme-ns device named 'detached'. This parameter indicates whether the given namespace device is detached from a entire NVMe subsystem('subsys'

[PATCH V2 0/6] hw/block/nvme: support namespace attachment

2021-02-10 Thread Minwoo Im
Hello, This series supports namespace attachment: attach and detach. This is the second version series with a fix a bug on choosing a controller to attach for a namespace in the attach command handler. Since V1: - Fix to take 'ctrl' which is given from the command rather than 'n'. (Klaus)

Re: [PATCH 2/2] hw/block/nvme: add write uncorrectable command

2021-02-10 Thread Minwoo Im
> > It might be nitpick, 'nlb' would easily represent the value which is > > defined itself in the spec which is zero-based. Can we have this like: > > > > uint32_t nlb = le16_to_cpu(rw->nlb); > > > > bitmap_clear(ns->uncorrectable, slba, nlb + 1); > > > > > I do not disagree, but

Re: [PATCH v2 36/36] block: refactor bdrv_node_check_perm()

2021-02-10 Thread Kevin Wolf
Am 27.11.2020 um 15:45 hat Vladimir Sementsov-Ogievskiy geschrieben: > Now, bdrv_node_check_perm() is called only with fresh cumulative > permissions, so its actually "refresh_perm". > > Move permission calculation to the function. Also, drop unreachable > error message. > > Add also Virtuozzo

Re: [PATCH] iotests: Consistent $IMGOPTS boundary matching

2021-02-10 Thread Eric Blake
On 2/10/21 3:51 AM, Max Reitz wrote: > To disallow certain refcount_bits values, some _unsupported_imgopts > invocations look like "refcount_bits=1[^0-9]", i.e. they match an > integer boundary with [^0-9]. This expression does not match the end of > the string, though, so it breaks down when

Re: [PATCH v2 34/36] block: refactor bdrv_child_set_perm_safe() transaction action

2021-02-10 Thread Kevin Wolf
Am 27.11.2020 um 15:45 hat Vladimir Sementsov-Ogievskiy geschrieben: > Old interfaces dropped, nobody directly calls > bdrv_child_set_perm_abort() and bdrv_child_set_perm_commit(), so we can > use personal state structure for the action and stop exploiting > BdrvChild structure. Also, drop "_safe"

Re: [PATCH v2 30/36] block: bdrv_reopen_multiple: refresh permissions on updated graph

2021-02-10 Thread Kevin Wolf
Am 08.02.2021 um 12:21 hat Vladimir Sementsov-Ogievskiy geschrieben: > > Come to think of it, the AioContext handling is probably wrong already > > before your series. reopen_commit for one node could move the whole tree > > to a different context and then the later nodes would all be processed >

Re: [PATCH 0/7] qcow2: compressed write cache

2021-02-10 Thread Vladimir Sementsov-Ogievskiy
10.02.2021 15:35, Kevin Wolf wrote: Am 29.01.2021 um 17:50 hat Vladimir Sementsov-Ogievskiy geschrieben: Hi all! I know, I have several series waiting for a resend, but I had to switch to another task spawned from our customer's bug. Original problem: we use O_DIRECT for all vm images in our

Re: [PATCH v2 30/36] block: bdrv_reopen_multiple: refresh permissions on updated graph

2021-02-10 Thread Kevin Wolf
Am 08.02.2021 um 12:21 hat Vladimir Sementsov-Ogievskiy geschrieben: > 05.02.2021 20:57, Kevin Wolf wrote: > > Am 27.11.2020 um 15:45 hat Vladimir Sementsov-Ogievskiy geschrieben: > > > Move bdrv_reopen_multiple to new paradigm of permission update: > > > first update graph relations, then do

Re: [PATCH] iotests/210: Fix reference output

2021-02-10 Thread Kevin Wolf
Am 09.02.2021 um 19:19 hat Max Reitz geschrieben: > Commit 69b55e03f has changed an error message, adjust the reference > output to account for it. > > Fixes: 69b55e03f7e65a36eb954d0b7d4698b258df2708 >("block: refactor bdrv_check_request: add errp") > Signed-off-by: Max Reitz

Re: [PATCH] hw/block: nvme: Fix a build error in nvme_process_sq()

2021-02-10 Thread Peter Maydell
On Wed, 10 Feb 2021 at 11:37, Klaus Jensen wrote: > > On Feb 10 11:01, Peter Maydell wrote: > > On Wed, 10 Feb 2021 at 10:31, Klaus Jensen wrote: > > > On Feb 10 18:24, Bin Meng wrote: > > > > I am using the default GCC 5.4 on a Ubuntu 16.04 host. > > > > > > > > > > Alright. I'm actually not

Re: [PATCH 0/7] qcow2: compressed write cache

2021-02-10 Thread Kevin Wolf
Am 29.01.2021 um 17:50 hat Vladimir Sementsov-Ogievskiy geschrieben: > Hi all! > > I know, I have several series waiting for a resend, but I had to switch > to another task spawned from our customer's bug. > > Original problem: we use O_DIRECT for all vm images in our product, it's > the policy.

Re: [PATCH 2/2] hw/block/nvme: add write uncorrectable command

2021-02-10 Thread Klaus Jensen
On Feb 10 20:14, Minwoo Im wrote: > On 21-02-10 08:06:46, Klaus Jensen wrote: > > From: Gollu Appalanaidu > > > > Add support for marking blocks invalid with the Write Uncorrectable > > command. Block status is tracked in a (non-persistent) bitmap that is > > checked on all reads and written to

Re: [PATCH] hw/block: nvme: Fix a build error in nvme_process_sq()

2021-02-10 Thread Klaus Jensen
On Feb 10 11:01, Peter Maydell wrote: > On Wed, 10 Feb 2021 at 10:31, Klaus Jensen wrote: > > On Feb 10 18:24, Bin Meng wrote: > > > I am using the default GCC 5.4 on a Ubuntu 16.04 host. > > > > > > > Alright. I'm actually not sure why newer compilers does not report this. > > The warning looks

Re: [PATCH v2] hw/block: nvme: Fix a build error in nvme_get_feature()

2021-02-10 Thread Daniel P . Berrangé
On Wed, Feb 10, 2021 at 11:22:19AM +, Daniel P. Berrangé wrote: > On Wed, Feb 10, 2021 at 12:15:45PM +0100, Philippe Mathieu-Daudé wrote: > > On 2/10/21 12:12 PM, Philippe Mathieu-Daudé wrote: > > > Hi Bin, > > > > > > On 2/10/21 11:23 AM, Bin Meng wrote: > > >> From: Bin Meng > > >> > > >>

Re: [PATCH v2] hw/block: nvme: Fix a build error in nvme_get_feature()

2021-02-10 Thread Thomas Huth
On 10/02/2021 12.15, Bin Meng wrote: Hi Philippe, On Wed, Feb 10, 2021 at 7:12 PM Philippe Mathieu-Daudé wrote: Hi Bin, On 2/10/21 11:23 AM, Bin Meng wrote: From: Bin Meng Current QEMU HEAD nvme.c does not compile: hw/block/nvme.c:3242:9: error: ‘result’ may be used uninitialized in

Re: [PATCH v2] hw/block: nvme: Fix a build error in nvme_get_feature()

2021-02-10 Thread Daniel P . Berrangé
On Wed, Feb 10, 2021 at 12:15:45PM +0100, Philippe Mathieu-Daudé wrote: > On 2/10/21 12:12 PM, Philippe Mathieu-Daudé wrote: > > Hi Bin, > > > > On 2/10/21 11:23 AM, Bin Meng wrote: > >> From: Bin Meng > >> > >> Current QEMU HEAD nvme.c does not compile: > >> > >> hw/block/nvme.c:3242:9:

[PATCH v3] hw/block: nvme: Fix a build error in nvme_get_feature()

2021-02-10 Thread Bin Meng
From: Bin Meng Current QEMU HEAD nvme.c does not compile with the default GCC 5.4 on a Ubuntu 16.04 host: hw/block/nvme.c:3242:9: error: ‘result’ may be used uninitialized in this function [-Werror=maybe-uninitialized] trace_pci_nvme_getfeat_vwcache(result ? "enabled" : "disabled");

Re: [PATCH v2] hw/block: nvme: Fix a build error in nvme_get_feature()

2021-02-10 Thread Bin Meng
Hi Philippe, On Wed, Feb 10, 2021 at 7:15 PM Philippe Mathieu-Daudé wrote: > > On 2/10/21 12:12 PM, Philippe Mathieu-Daudé wrote: > > Hi Bin, > > > > On 2/10/21 11:23 AM, Bin Meng wrote: > >> From: Bin Meng > >> > >> Current QEMU HEAD nvme.c does not compile: > >> > >> hw/block/nvme.c:3242:9:

Re: [PATCH v2] hw/block: nvme: Fix a build error in nvme_get_feature()

2021-02-10 Thread Philippe Mathieu-Daudé
On 2/10/21 12:12 PM, Philippe Mathieu-Daudé wrote: > Hi Bin, > > On 2/10/21 11:23 AM, Bin Meng wrote: >> From: Bin Meng >> >> Current QEMU HEAD nvme.c does not compile: >> >> hw/block/nvme.c:3242:9: error: ‘result’ may be used uninitialized in this >> function [-Werror=maybe-uninitialized] >>

Re: [PATCH v2] hw/block: nvme: Fix a build error in nvme_get_feature()

2021-02-10 Thread Bin Meng
Hi Philippe, On Wed, Feb 10, 2021 at 7:12 PM Philippe Mathieu-Daudé wrote: > > Hi Bin, > > On 2/10/21 11:23 AM, Bin Meng wrote: > > From: Bin Meng > > > > Current QEMU HEAD nvme.c does not compile: > > > > hw/block/nvme.c:3242:9: error: ‘result’ may be used uninitialized in this > > function

Re: [PATCH 2/2] hw/block/nvme: add write uncorrectable command

2021-02-10 Thread Minwoo Im
On 21-02-10 08:06:46, Klaus Jensen wrote: > From: Gollu Appalanaidu > > Add support for marking blocks invalid with the Write Uncorrectable > command. Block status is tracked in a (non-persistent) bitmap that is > checked on all reads and written to on all writes. This is potentially >

Re: [PATCH v2] hw/block: nvme: Fix a build error in nvme_get_feature()

2021-02-10 Thread Philippe Mathieu-Daudé
Hi Bin, On 2/10/21 11:23 AM, Bin Meng wrote: > From: Bin Meng > > Current QEMU HEAD nvme.c does not compile: > > hw/block/nvme.c:3242:9: error: ‘result’ may be used uninitialized in this > function [-Werror=maybe-uninitialized] > trace_pci_nvme_getfeat_vwcache(result ? "enabled" :

Re: [PATCH 1/2] hw/block/nvme: add oncs device parameter

2021-02-10 Thread Minwoo Im
On 21-02-10 08:06:45, Klaus Jensen wrote: > From: Gollu Appalanaidu > > Add the 'oncs' nvme device parameter to allow optional features to be > enabled/disabled explicitly. Since most of these are optional commands, > make the CSE log pages dynamic to account for the value of ONCS. > >

Re: [PATCH] hw/block: nvme: Fix a build error in nvme_process_sq()

2021-02-10 Thread Peter Maydell
On Wed, 10 Feb 2021 at 10:31, Klaus Jensen wrote: > On Feb 10 18:24, Bin Meng wrote: > > I am using the default GCC 5.4 on a Ubuntu 16.04 host. > > > > Alright. I'm actually not sure why newer compilers does not report this. > The warning looks reasonable. It's not actually ever possible for

Re: [PATCH v2] hw/block: nvme: Fix a build error in nvme_get_feature()

2021-02-10 Thread Minwoo Im
On 21-02-10 18:23:17, Bin Meng wrote: > From: Bin Meng > > Current QEMU HEAD nvme.c does not compile: > > hw/block/nvme.c:3242:9: error: ‘result’ may be used uninitialized in this > function [-Werror=maybe-uninitialized] > trace_pci_nvme_getfeat_vwcache(result ? "enabled" :

Re: [PATCH v2] hw/block: nvme: Fix a build error in nvme_get_feature()

2021-02-10 Thread Klaus Jensen
CC qemu-trivial. On Feb 10 18:23, Bin Meng wrote: > From: Bin Meng > > Current QEMU HEAD nvme.c does not compile: > > hw/block/nvme.c:3242:9: error: ‘result’ may be used uninitialized in this > function [-Werror=maybe-uninitialized] > trace_pci_nvme_getfeat_vwcache(result ?

Re: [PATCH] hw/block: nvme: Fix a build error in nvme_process_sq()

2021-02-10 Thread Klaus Jensen
On Feb 10 18:24, Bin Meng wrote: > On Wed, Feb 10, 2021 at 6:23 PM Klaus Jensen wrote: > > > > On Feb 10 18:15, Bin Meng wrote: > > > On Wed, Feb 10, 2021 at 5:54 PM Bin Meng wrote: > > > > > > > > From: Bin Meng > > > > > > > > Current QEMU HEAD nvme.c does not compile: > > > > > > > >

Re: [PATCH] hw/block: nvme: Fix a build error in nvme_process_sq()

2021-02-10 Thread Bin Meng
On Wed, Feb 10, 2021 at 6:23 PM Klaus Jensen wrote: > > On Feb 10 18:15, Bin Meng wrote: > > On Wed, Feb 10, 2021 at 5:54 PM Bin Meng wrote: > > > > > > From: Bin Meng > > > > > > Current QEMU HEAD nvme.c does not compile: > > > > > > hw/block/nvme.c: In function ‘nvme_process_sq’: > > > >

Re: [PATCH] hw/block: nvme: Fix a build error in nvme_process_sq()

2021-02-10 Thread Klaus Jensen
On Feb 10 18:15, Bin Meng wrote: > On Wed, Feb 10, 2021 at 5:54 PM Bin Meng wrote: > > > > From: Bin Meng > > > > Current QEMU HEAD nvme.c does not compile: > > > > hw/block/nvme.c: In function ‘nvme_process_sq’: > > Not sure why compiler reports this error happens in nvme_process_sq()? >

[PATCH v2] hw/block: nvme: Fix a build error in nvme_get_feature()

2021-02-10 Thread Bin Meng
From: Bin Meng Current QEMU HEAD nvme.c does not compile: hw/block/nvme.c:3242:9: error: ‘result’ may be used uninitialized in this function [-Werror=maybe-uninitialized] trace_pci_nvme_getfeat_vwcache(result ? "enabled" : "disabled"); ^ hw/block/nvme.c:3150:14: note:

Re: [PATCH] hw/block: nvme: Fix a build error in nvme_process_sq()

2021-02-10 Thread Bin Meng
On Wed, Feb 10, 2021 at 5:54 PM Bin Meng wrote: > > From: Bin Meng > > Current QEMU HEAD nvme.c does not compile: > > hw/block/nvme.c: In function ‘nvme_process_sq’: Not sure why compiler reports this error happens in nvme_process_sq()? But it should be in nvme_get_feature(). I will update

Re: [PATCH 0/7] qcow2: compressed write cache

2021-02-10 Thread Vladimir Sementsov-Ogievskiy
10.02.2021 13:00, Max Reitz wrote: On 09.02.21 19:51, Vladimir Sementsov-Ogievskiy wrote: 09.02.2021 21:41, Denis V. Lunev wrote: On 2/9/21 9:36 PM, Vladimir Sementsov-Ogievskiy wrote: 09.02.2021 19:39, Vladimir Sementsov-Ogievskiy wrote: 09.02.2021 17:47, Max Reitz wrote: On 09.02.21

[PATCH] hw/block: nvme: Fix a build error in nvme_process_sq()

2021-02-10 Thread Bin Meng
From: Bin Meng Current QEMU HEAD nvme.c does not compile: hw/block/nvme.c: In function ‘nvme_process_sq’: hw/block/nvme.c:3242:9: error: ‘result’ may be used uninitialized in this function [-Werror=maybe-uninitialized] trace_pci_nvme_getfeat_vwcache(result ? "enabled" :

[PULL v4 27/27] docs: fix Parallels Image "dirty bitmap" section

2021-02-10 Thread Stefan Hajnoczi
From: "Denis V. Lunev" Original specification says that l1 table size if 64 * l1_size, which is obviously wrong. The size of the l1 entry is 64 _bits_, not bytes. Thus 64 is to be replaces with 8 as specification says about bytes. There is also minor tweak, field name is renamed from l1 to

[PULL v4 25/27] multi-process: Retrieve PCI info from remote process

2021-02-10 Thread Stefan Hajnoczi
From: Jagannathan Raman Retrieve PCI configuration info about the remote device and configure the Proxy PCI object based on the returned information Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi Message-id:

[PULL v4 19/27] multi-process: introduce proxy object

2021-02-10 Thread Stefan Hajnoczi
From: Elena Ufimtseva Defines a PCI Device proxy object as a child of TYPE_PCI_DEVICE. Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Reviewed-by: Stefan Hajnoczi Message-id:

Re: [PATCH 0/7] qcow2: compressed write cache

2021-02-10 Thread Max Reitz
On 09.02.21 17:52, Denis V. Lunev wrote: On 2/9/21 5:47 PM, Max Reitz wrote: On 09.02.21 15:10, Vladimir Sementsov-Ogievskiy wrote: 09.02.2021 16:25, Max Reitz wrote: On 29.01.21 17:50, Vladimir Sementsov-Ogievskiy wrote: Hi all! I know, I have several series waiting for a resend, but I had

Re: [PATCH 0/7] qcow2: compressed write cache

2021-02-10 Thread Max Reitz
On 09.02.21 19:51, Vladimir Sementsov-Ogievskiy wrote: 09.02.2021 21:41, Denis V. Lunev wrote: On 2/9/21 9:36 PM, Vladimir Sementsov-Ogievskiy wrote: 09.02.2021 19:39, Vladimir Sementsov-Ogievskiy wrote: 09.02.2021 17:47, Max Reitz wrote: On 09.02.21 15:10, Vladimir Sementsov-Ogievskiy

[PATCH] iotests: Consistent $IMGOPTS boundary matching

2021-02-10 Thread Max Reitz
To disallow certain refcount_bits values, some _unsupported_imgopts invocations look like "refcount_bits=1[^0-9]", i.e. they match an integer boundary with [^0-9]. This expression does not match the end of the string, though, so it breaks down when refcount_bits is the last option (which it tends

[PULL v4 26/27] multi-process: perform device reset in the remote process

2021-02-10 Thread Stefan Hajnoczi
From: Elena Ufimtseva Perform device reset in the remote process when QEMU performs device reset. This is required to reset the internal state (like registers, etc...) of emulated devices Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman

[PULL v4 17/27] multi-process: Associate fd of a PCIDevice with its object

2021-02-10 Thread Stefan Hajnoczi
From: Jagannathan Raman Associate the file descriptor for a PCIDevice in remote process with DeviceState object. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan Hajnoczi Message-id:

[PULL v4 24/27] multi-process: create IOHUB object to handle irq

2021-02-10 Thread Stefan Hajnoczi
From: Jagannathan Raman IOHUB object is added to manage PCI IRQs. It uses KVM_IRQFD ioctl to create irqfd to injecting PCI interrupts to the guest. IOHUB object forwards the irqfd to the remote process. Remote process uses this fd to directly send interrupts to the guest, bypassing QEMU.

[PULL v4 11/27] multi-process: setup PCI host bridge for remote device

2021-02-10 Thread Stefan Hajnoczi
From: Jagannathan Raman PCI host bridge is setup for the remote device process. It is implemented using remote-pcihost object. It is an extension of the PCI host bridge setup by QEMU. Remote-pcihost configures a PCI bus which could be used by the remote PCI device to latch on to. Signed-off-by:

[PULL v4 23/27] multi-process: Synchronize remote memory

2021-02-10 Thread Stefan Hajnoczi
From: Jagannathan Raman Add ProxyMemoryListener object which is used to keep the view of the RAM in sync between QEMU and remote process. A MemoryListener is registered for system-memory AddressSpace. The listener sends SYNC_SYSMEM message to the remote process when memory listener commits the

[PULL v4 09/27] memory: alloc RAM from file at offset

2021-02-10 Thread Stefan Hajnoczi
From: Jagannathan Raman Allow RAM MemoryRegion to be created from an offset in a file, instead of allocating at offset of 0 by default. This is needed to synchronize RAM between QEMU & remote process. Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Signed-off-by: Elena

[PULL v4 22/27] multi-process: PCI BAR read/write handling for proxy & remote endpoints

2021-02-10 Thread Stefan Hajnoczi
From: Jagannathan Raman Proxy device object implements handler for PCI BAR writes and reads. The handler uses BAR_WRITE/BAR_READ message to communicate to the remote process with the BAR address and value to be written/read. The remote process implements handler for BAR_WRITE/BAR_READ message.

[PULL v4 21/27] multi-process: Forward PCI config space acceses to the remote process

2021-02-10 Thread Stefan Hajnoczi
From: Elena Ufimtseva The Proxy Object sends the PCI config space accesses as messages to the remote process over the communication channel Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Reviewed-by: Stefan Hajnoczi Message-id:

[PULL v4 20/27] multi-process: add proxy communication functions

2021-02-10 Thread Stefan Hajnoczi
From: Elena Ufimtseva Signed-off-by: Elena Ufimtseva Signed-off-by: Jagannathan Raman Signed-off-by: John G Johnson Reviewed-by: Stefan Hajnoczi Message-id: d54edb4176361eed86b903e8f27058363b6c83b3.1611938319.git.jag.ra...@oracle.com Signed-off-by: Stefan Hajnoczi ---

[PULL v4 18/27] multi-process: setup memory manager for remote device

2021-02-10 Thread Stefan Hajnoczi
From: Jagannathan Raman SyncSysMemMsg message format is defined. It is used to send file descriptors of the RAM regions to remote device. RAM on the remote device is configured with a set of file descriptors. Old RAM regions are deleted and new regions, each with an fd, is added to the RAM.

[PULL v4 16/27] multi-process: Initialize message handler in remote device

2021-02-10 Thread Stefan Hajnoczi
From: Jagannathan Raman Initializes the message handler function in the remote process. It is called whenever there's an event pending on QIOChannel that registers this function. Signed-off-by: Elena Ufimtseva Signed-off-by: John G Johnson Signed-off-by: Jagannathan Raman Reviewed-by: Stefan

[PULL v4 06/27] get_maintainer: update repo URL to GitLab

2021-02-10 Thread Stefan Hajnoczi
qemu.org is running out of bandwidth and the QEMU project is moving towards a gating CI on GitLab. Use the GitLab repos instead of qemu.org (they will become mirrors). Signed-off-by: Stefan Hajnoczi Reviewed-by: Wainer dos Santos Moschetta Reviewed-by: Thomas Huth Reviewed-by: Philippe

  1   2   >