diff --git a/docs/formatdomaincaps.html.in b/docs/formatdomaincaps.html.in
index bcd2b3354b..bc99d37856 100644
--- a/docs/formatdomaincaps.html.in
+++ b/docs/formatdomaincaps.html.in
@@ -450,6 +450,41 @@
element.
+
+
+ RNG device capabilities are exposed under the
+ rng
element. For instance:
+
+
+<domainCapabilities>
+ ...
+ <devices>
+ <rng supported='yes'>
+ <enum name='model'>
+ <value>virtio</value>
+ <value>virtio-transitional</value>
+ <value>virtio-non-transitional</value>
+ </enum>
+ <enum name='backendModel'>
+ <value>random</value>
+ <value>egd</value>
+ </enum>
+ </rng>
+ ...
+ </devices>
+</domainCapabilities>
+
+
+
+ model
+ - Options for the
model
attribute of the
+ <rng> element.
+ backendModel
+ - Options for the
model
attribute of the
+ <rng><backend> element.
+
+
+
One more set of XML elements describe the supported features and
diff --git a/docs/schemas/domaincaps.rng b/docs/schemas/domaincaps.rng
index e629d6431f..3525c0eeef 100644
--- a/docs/schemas/domaincaps.rng
+++ b/docs/schemas/domaincaps.rng
@@ -155,6 +155,9 @@
+
+
+
@@ -186,6 +189,13 @@
+
+
+
+
+
+
+
diff --git a/src/conf/domain_capabilities.c b/src/conf/domain_capabilities.c
index 2e7e1c206b..94c651befb 100644
--- a/src/conf/domain_capabilities.c
+++ b/src/conf/domain_capabilities.c
@@ -547,6 +547,19 @@ virDomainCapsDeviceHostdevFormat(virBufferPtr buf,
}
+static void
+virDomainCapsDeviceRNGFormat(virBufferPtr buf,
+ virDomainCapsDeviceRNGPtr const rng)
+{
+ FORMAT_PROLOGUE(rng);
+
+ ENUM_PROCESS(rng, model, virDomainRNGModelTypeToString);
+ ENUM_PROCESS(rng, backendModel, virDomainRNGBackendTypeToString);
+
+ FORMAT_EPILOGUE(rng);
+}
+
+
/**
* virDomainCapsFeatureGICFormat:
* @buf: target buffer
@@ -625,6 +638,7 @@ virDomainCapsFormat(virDomainCapsPtr const caps)
virDomainCapsDeviceGraphicsFormat(&buf, &caps->graphics);
virDomainCapsDeviceVideoFormat(&buf, &caps->video);
virDomainCapsDeviceHostdevFormat(&buf, &caps->hostdev);
+ virDomainCapsDeviceRNGFormat(&buf, &caps->rng);
virBufferAdjustIndent(&buf, -2);
virBufferAddLit(&buf, "\n");
diff --git a/src/conf/domain_capabilities.h b/src/conf/domain_capabilities.h
index 96ab59cae9..e0302a0649 100644
--- a/src/conf/domain_capabilities.h
+++ b/src/conf/domain_capabilities.h
@@ -98,6 +98,14 @@ struct _virDomainCapsDeviceHostdev {
/* add new fields here */
};
+typedef struct _virDomainCapsDeviceRNG virDomainCapsDeviceRNG;
+typedef virDomainCapsDeviceRNG *virDomainCapsDeviceRNGPtr;
+struct _virDomainCapsDeviceRNG {
+ virTristateBool supported;
+ virDomainCapsEnum model; /* virDomainRNGModel */
+ virDomainCapsEnum backendModel; /* virDomainRNGBackend */
+};
+
typedef struct _virDomainCapsFeatureGIC virDomainCapsFeatureGIC;
typedef virDomainCapsFeatureGIC *virDomainCapsFeatureGICPtr;
struct _virDomainCapsFeatureGIC {
@@ -167,6 +175,7 @@ struct _virDomainCaps {
virDomainCapsDeviceGraphics graphics;
virDomainCapsDeviceVideo video;
virDomainCapsDeviceHostdev hostdev;
+ virDomainCapsDeviceRNG rng;
/* add new domain devices here */
virDomainCapsFeatureGIC gic;