forked from qemu/qemu
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
{hmp, hw/pvrdma}: Expose device internals via monitor interface
Allow interrogating device internals through HMP interface. The exposed indicators can be used for troubleshooting by developers or sysadmin. There is no need to expose these attributes to a management system (e.x. libvirt) because (1) most of them are not "device-management' related info and (2) there is no guarantee the interface is stable. Signed-off-by: Yuval Shaia <[email protected]> Acked-by: Dr. David Alan Gilbert <[email protected]> Acked-by: Markus Armbruster <[email protected]> Message-Id: <[email protected]> Reviewed-by: Marcel Apfelbaum <[email protected]> Signed-off-by: Marcel Apfelbaum <[email protected]>
- Loading branch information
1 parent
c2dd117
commit f4b2c02
Showing
9 changed files
with
193 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
ifeq ($(CONFIG_PVRDMA),y) | ||
obj-$(CONFIG_PCI) += rdma_utils.o rdma_backend.o rdma_rm.o | ||
obj-$(CONFIG_PCI) += rdma_utils.o rdma_backend.o rdma_rm.o rdma.o | ||
obj-$(CONFIG_PCI) += vmw/pvrdma_dev_ring.o vmw/pvrdma_cmd.o \ | ||
vmw/pvrdma_qp_ops.o vmw/pvrdma_main.o | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* RDMA device interface | ||
* | ||
* Copyright (C) 2018 Oracle | ||
* Copyright (C) 2018 Red Hat Inc | ||
* | ||
* Authors: | ||
* Yuval Shaia <[email protected]> | ||
* | ||
* This work is licensed under the terms of the GNU GPL, version 2 or later. | ||
* See the COPYING file in the top-level directory. | ||
* | ||
*/ | ||
|
||
#include "qemu/osdep.h" | ||
#include "hw/rdma/rdma.h" | ||
#include "qemu/module.h" | ||
|
||
static const TypeInfo rdma_hmp_info = { | ||
.name = INTERFACE_RDMA_PROVIDER, | ||
.parent = TYPE_INTERFACE, | ||
.class_size = sizeof(RdmaProviderClass), | ||
}; | ||
|
||
static void rdma_register_types(void) | ||
{ | ||
type_register_static(&rdma_hmp_info); | ||
} | ||
|
||
type_init(rdma_register_types) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
* RDMA device interface | ||
* | ||
* Copyright (C) 2019 Oracle | ||
* Copyright (C) 2019 Red Hat Inc | ||
* | ||
* Authors: | ||
* Yuval Shaia <[email protected]> | ||
* | ||
* This work is licensed under the terms of the GNU GPL, version 2 or later. | ||
* See the COPYING file in the top-level directory. | ||
* | ||
*/ | ||
|
||
#ifndef RDMA_H | ||
#define RDMA_H | ||
|
||
#include "qom/object.h" | ||
|
||
#define INTERFACE_RDMA_PROVIDER "rdma" | ||
|
||
#define INTERFACE_RDMA_PROVIDER_CLASS(klass) \ | ||
OBJECT_CLASS_CHECK(RdmaProviderClass, (klass), \ | ||
INTERFACE_RDMA_PROVIDER) | ||
#define RDMA_PROVIDER_GET_CLASS(obj) \ | ||
OBJECT_GET_CLASS(RdmaProviderClass, (obj), \ | ||
INTERFACE_RDMA_PROVIDER) | ||
#define RDMA_PROVIDER(obj) \ | ||
INTERFACE_CHECK(RdmaProvider, (obj), \ | ||
INTERFACE_RDMA_PROVIDER) | ||
|
||
typedef struct RdmaProvider RdmaProvider; | ||
|
||
typedef struct RdmaProviderClass { | ||
InterfaceClass parent; | ||
|
||
void (*print_statistics)(Monitor *mon, RdmaProvider *obj); | ||
} RdmaProviderClass; | ||
|
||
#endif |