OSDN Git Service

hw/cxl: Correctly handle variable sized mailbox input payloads.
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Wed, 17 Aug 2022 14:57:59 +0000 (15:57 +0100)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 17 Aug 2022 17:08:11 +0000 (13:08 -0400)
commit4f41b4e445d09651988df36615c3a64853d5bc4a
tree5d9d3cf549dc30f554b40819e39af1a5365da19e
parent66a2356485895f82b14585bda8e04bd190841fc0
hw/cxl: Correctly handle variable sized mailbox input payloads.

A placeholder of ~0 is used to indicate variable payload size.
Whilst the checks for output payload correctly took this into
account, those for input payload did not.

This results in failure of the Set LSA command.

Fixes: 464e14ac43 ("hw/cxl/device: Implement basic mailbox (8.2.8.4)")
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Message-Id: <20220817145759.32603-4-Jonathan.Cameron@huawei.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
hw/cxl/cxl-mailbox-utils.c