Pull request

-----BEGIN PGP SIGNATURE-----
 
 iQGzBAABCAAdFiEE4ndqq6COJv9aG0oJUrHW6VHQzgcFAmKVB7AACgkQUrHW6VHQ
 zgeKeQwAkIQ6MXRFPoY5DWY7rvtF4uldmPFkRhFZaU31WNjT2NWs4MrPbaD+4c24
 XE6KXX4KBjqa6rTlcF7Q775PWRelmLME3c6n1ovNG4/C1WqPeaivnctqTa0iwDFT
 QnA5Xd0kL9LQkCpeCrSAe6IWQC4Yd3YhFQwfbQR5YDlAljVkcl6AvRQ4H83k93bP
 q8lrNns+m03W/K+7OS+Ul4doqMJ+tLhyN1dhT2OMdyg96aEZR4xnkKvi/IscZ8MX
 2lpxnkM1KYlQGiyV6dnM+j3kskC1xQrokF3ZbW63g/yt5Iu6fo2OjjDw6yF89PbI
 EzS2PI0lF0m18uf5PSwuvYbiE+5wnmU41JAfG8Sl705ek5XB0KcfgYACG+fgAUMM
 B4zlTYCfcaxcQddRQNoYQTC3q/+QlJjwCnmMpH+WsOX/8+WIBsrTPCvowsomsGHd
 GdljJz3tDU9y3eaZhRmC9bsKE9qXk4+HnpILC/MnlDuBHsDLkprskY2T5pm5xnvb
 CdvaCmTc
 =sgBE
 -----END PGP SIGNATURE-----

Merge tag 'vmbus-maint-20220530' of https://github.com/maciejsszmigiero/qemu into staging

Pull request

# -----BEGIN PGP SIGNATURE-----
#
# iQGzBAABCAAdFiEE4ndqq6COJv9aG0oJUrHW6VHQzgcFAmKVB7AACgkQUrHW6VHQ
# zgeKeQwAkIQ6MXRFPoY5DWY7rvtF4uldmPFkRhFZaU31WNjT2NWs4MrPbaD+4c24
# XE6KXX4KBjqa6rTlcF7Q775PWRelmLME3c6n1ovNG4/C1WqPeaivnctqTa0iwDFT
# QnA5Xd0kL9LQkCpeCrSAe6IWQC4Yd3YhFQwfbQR5YDlAljVkcl6AvRQ4H83k93bP
# q8lrNns+m03W/K+7OS+Ul4doqMJ+tLhyN1dhT2OMdyg96aEZR4xnkKvi/IscZ8MX
# 2lpxnkM1KYlQGiyV6dnM+j3kskC1xQrokF3ZbW63g/yt5Iu6fo2OjjDw6yF89PbI
# EzS2PI0lF0m18uf5PSwuvYbiE+5wnmU41JAfG8Sl705ek5XB0KcfgYACG+fgAUMM
# B4zlTYCfcaxcQddRQNoYQTC3q/+QlJjwCnmMpH+WsOX/8+WIBsrTPCvowsomsGHd
# GdljJz3tDU9y3eaZhRmC9bsKE9qXk4+HnpILC/MnlDuBHsDLkprskY2T5pm5xnvb
# CdvaCmTc
# =sgBE
# -----END PGP SIGNATURE-----
# gpg: Signature made Mon 30 May 2022 11:06:40 AM PDT
# gpg:                using RSA key E2776AABA08E26FF5A1B4A0952B1D6E951D0CE07
# gpg: Good signature from "Maciej S. Szmigiero <mail@maciej.szmigiero.name>" [unknown]
# gpg: WARNING: This key is not certified with a trusted signature!
# gpg:          There is no indication that the signature belongs to the owner.
# Primary key fingerprint: 727A 0D4D DB9E D9F6 039B  ECEF 847F 5E37 90CE 0977
#      Subkey fingerprint: E277 6AAB A08E 26FF 5A1B  4A09 52B1 D6E9 51D0 CE07

* tag 'vmbus-maint-20220530' of https://github.com/maciejsszmigiero/qemu:
  hw/hyperv/vmbus: Remove unused vmbus_load/save_req()
  MAINTAINERS: Add myself as the maintainer for Hyper-V VMBus

Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
Richard Henderson 2022-05-30 12:40:36 -07:00
commit 7077fcb9b6
3 changed files with 6 additions and 102 deletions

View file

@ -1777,6 +1777,12 @@ F: include/hw/block/fdc.h
F: tests/qtest/fdc-test.c
T: git https://gitlab.com/jsnow/qemu.git ide
Hyper-V VMBus
M: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
S: Odd Fixes
F: hw/hyperv/vmbus.c
F: include/hw/hyperv/vmbus*.h
OMAP
M: Peter Maydell <peter.maydell@linaro.org>
L: qemu-arm@nongnu.org

View file

@ -1273,105 +1273,6 @@ void vmbus_free_req(void *req)
g_free(req);
}
static const VMStateDescription vmstate_sgent = {
.name = "vmbus/sgentry",
.version_id = 0,
.minimum_version_id = 0,
.fields = (VMStateField[]) {
VMSTATE_UINT64(base, ScatterGatherEntry),
VMSTATE_UINT64(len, ScatterGatherEntry),
VMSTATE_END_OF_LIST()
}
};
typedef struct VMBusChanReqSave {
uint16_t chan_idx;
uint16_t pkt_type;
uint32_t msglen;
void *msg;
uint64_t transaction_id;
bool need_comp;
uint32_t num;
ScatterGatherEntry *sgl;
} VMBusChanReqSave;
static const VMStateDescription vmstate_vmbus_chan_req = {
.name = "vmbus/vmbus_chan_req",
.version_id = 0,
.minimum_version_id = 0,
.fields = (VMStateField[]) {
VMSTATE_UINT16(chan_idx, VMBusChanReqSave),
VMSTATE_UINT16(pkt_type, VMBusChanReqSave),
VMSTATE_UINT32(msglen, VMBusChanReqSave),
VMSTATE_VBUFFER_ALLOC_UINT32(msg, VMBusChanReqSave, 0, NULL, msglen),
VMSTATE_UINT64(transaction_id, VMBusChanReqSave),
VMSTATE_BOOL(need_comp, VMBusChanReqSave),
VMSTATE_UINT32(num, VMBusChanReqSave),
VMSTATE_STRUCT_VARRAY_POINTER_UINT32(sgl, VMBusChanReqSave, num,
vmstate_sgent, ScatterGatherEntry),
VMSTATE_END_OF_LIST()
}
};
void vmbus_save_req(QEMUFile *f, VMBusChanReq *req)
{
VMBusChanReqSave req_save;
req_save.chan_idx = req->chan->subchan_idx;
req_save.pkt_type = req->pkt_type;
req_save.msglen = req->msglen;
req_save.msg = req->msg;
req_save.transaction_id = req->transaction_id;
req_save.need_comp = req->need_comp;
req_save.num = req->sgl.nsg;
req_save.sgl = g_memdup(req->sgl.sg,
req_save.num * sizeof(ScatterGatherEntry));
vmstate_save_state(f, &vmstate_vmbus_chan_req, &req_save, NULL);
g_free(req_save.sgl);
}
void *vmbus_load_req(QEMUFile *f, VMBusDevice *dev, uint32_t size)
{
VMBusChanReqSave req_save;
VMBusChanReq *req = NULL;
VMBusChannel *chan = NULL;
uint32_t i;
vmstate_load_state(f, &vmstate_vmbus_chan_req, &req_save, 0);
if (req_save.chan_idx >= dev->num_channels) {
error_report("%s: %u(chan_idx) > %u(num_channels)", __func__,
req_save.chan_idx, dev->num_channels);
goto out;
}
chan = &dev->channels[req_save.chan_idx];
if (vmbus_channel_reserve(chan, 0, req_save.msglen)) {
goto out;
}
req = vmbus_alloc_req(chan, size, req_save.pkt_type, req_save.msglen,
req_save.transaction_id, req_save.need_comp);
if (req_save.msglen) {
memcpy(req->msg, req_save.msg, req_save.msglen);
}
for (i = 0; i < req_save.num; i++) {
qemu_sglist_add(&req->sgl, req_save.sgl[i].base, req_save.sgl[i].len);
}
out:
if (req_save.msglen) {
g_free(req_save.msg);
}
if (req_save.num) {
g_free(req_save.sgl);
}
return req;
}
static void channel_event_cb(EventNotifier *e)
{
VMBusChannel *chan = container_of(e, VMBusChannel, notifier);

View file

@ -223,7 +223,4 @@ int vmbus_map_sgl(VMBusChanReq *req, DMADirection dir, struct iovec *iov,
void vmbus_unmap_sgl(VMBusChanReq *req, DMADirection dir, struct iovec *iov,
unsigned iov_cnt, size_t accessed);
void vmbus_save_req(QEMUFile *f, VMBusChanReq *req);
void *vmbus_load_req(QEMUFile *f, VMBusDevice *dev, uint32_t size);
#endif