[libvirt] [PATCH v4] qemu: sound: Support intel 'ich6' model
by Cole Robinson
In QEMU, the card itself is a PCI device, but it requires a codec
(either -device hda-output or -device hda-duplex) to actually output
sound. Specifying <sound model='ich6'/> gives us -device intel-hda
-device hda-duplex I think it's important that a simple <sound model='ich6'/>
sets up a useful codec, to have consistent behavior with all other sound cards.
This is basically Dan's proposal of
<sound model='ich6'>
<codec type='output' slot='0'/>
<codec type='duplex' slot='3'/>
</sound>
without the codec bits implemented.
The important thing is to keep a consistent API here, we don't want some
<sound> devs require tweaking codecs but not others. Steps I see to
accomplishing this:
- every <sound> device has a <codec type='default'/> (unless codecs are
manually specified)
- <codec type='none'/> is required to specify 'no codecs'
- new audio settings like mic=on|off could then be exposed in
<sound> or <codec> in a consistent manner for all sound models
v2:
Use model='ich6'
v3:
Use feature detection, from eblake
Set codec id, bus, and cad values
v4:
intel-hda isn't supported if -device isn't available
Signed-off-by: Cole Robinson <crobinso(a)redhat.com>
---
docs/formatdomain.html.in | 5 +-
docs/schemas/domain.rng | 1 +
src/conf/domain_conf.c | 3 +-
src/conf/domain_conf.h | 1 +
src/qemu/qemu_capabilities.c | 5 ++
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 56 +++++++++++++++++++-
.../qemuxml2argv-sound-device.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-sound-device.xml | 1 +
tests/qemuxml2argvtest.c | 2 +-
10 files changed, 70 insertions(+), 7 deletions(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 859f3fd..e7f65ad 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -1880,8 +1880,9 @@ qemu-kvm -net nic,model=? /dev/null
The <code>sound</code> element has one mandatory attribute,
<code>model</code>, which specifies what real sound device is emulated.
Valid values are specific to the underlying hypervisor, though typical
- choices are 'es1370', 'sb16', and 'ac97'
- (<span class="since">'ac97' only since 0.6.0</span>)
+ choices are 'es1370', 'sb16', 'ac97', and 'ich6'
+ (<span class="since">
+ 'ac97' only since 0.6.0, 'ich6' only since 0.8.8</span>)
</dd>
</dl>
diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng
index d4756e6..b2f8e00 100644
--- a/docs/schemas/domain.rng
+++ b/docs/schemas/domain.rng
@@ -1530,6 +1530,7 @@
<value>es1370</value>
<value>pcspk</value>
<value>ac97</value>
+ <value>ich6</value>
</choice>
</attribute>
<optional>
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 699fee7..d5445a4 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -231,7 +231,8 @@ VIR_ENUM_IMPL(virDomainSoundModel, VIR_DOMAIN_SOUND_MODEL_LAST,
"sb16",
"es1370",
"pcspk",
- "ac97")
+ "ac97",
+ "ich6")
VIR_ENUM_IMPL(virDomainMemballoonModel, VIR_DOMAIN_MEMBALLOON_MODEL_LAST,
"virtio",
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 3b00ba0..fc69627 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -480,6 +480,7 @@ enum virDomainSoundModel {
VIR_DOMAIN_SOUND_MODEL_ES1370,
VIR_DOMAIN_SOUND_MODEL_PCSPK,
VIR_DOMAIN_SOUND_MODEL_AC97,
+ VIR_DOMAIN_SOUND_MODEL_ICH6,
VIR_DOMAIN_SOUND_MODEL_LAST
};
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index faf7d44..02865e4 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -1079,6 +1079,11 @@ cleanup:
int
qemuCapsParseDeviceStr(const char *str, unsigned long long *flags)
{
+ /* Which devices exist. */
+ if (strstr(str, "name \"hda-duplex\""))
+ *flags |= QEMUD_CMD_FLAG_HDA_DUPLEX;
+
+ /* Features of given devices. */
if (strstr(str, "pci-assign.configfd"))
*flags |= QEMUD_CMD_FLAG_PCI_CONFIGFD;
if (strstr(str, "virtio-blk-pci.bootindex"))
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index e9e2da0..9148d90 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -84,6 +84,7 @@ enum qemuCapsFlags {
QEMUD_CMD_FLAG_VGA_NONE = (1LL << 47), /* The 'none' arg for '-vga' */
QEMUD_CMD_FLAG_MIGRATE_QEMU_FD = (1LL << 48), /* -incoming fd:n */
QEMUD_CMD_FLAG_BOOTINDEX = (1LL << 49), /* -device bootindex property */
+ QEMUD_CMD_FLAG_HDA_DUPLEX = (1LL << 50), /* -device hda-duplex */
};
virCapsPtr qemuCapsInit(virCapsPtr old_caps);
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index c20f031..44a57d8 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -1774,11 +1774,13 @@ qemuBuildSoundDevStr(virDomainSoundDefPtr sound)
goto error;
}
- /* Hack for 2 wierdly unusal devices name in QEMU */
+ /* Hack for wierdly unusal devices name in QEMU */
if (STREQ(model, "es1370"))
model = "ES1370";
else if (STREQ(model, "ac97"))
model = "AC97";
+ else if (STREQ(model, "ich6"))
+ model = "intel-hda";
virBufferVSprintf(&buf, "%s", model);
virBufferVSprintf(&buf, ",id=%s", sound->info.alias);
@@ -1797,6 +1799,29 @@ error:
return NULL;
}
+static char *
+qemuBuildSoundCodecStr(virDomainSoundDefPtr sound,
+ const char *codec)
+{
+ virBuffer buf = VIR_BUFFER_INITIALIZER;
+ int cad = 0;
+
+ virBufferVSprintf(&buf, "%s", codec);
+ virBufferVSprintf(&buf, ",id=%s-codec%d", sound->info.alias, cad);
+ virBufferVSprintf(&buf, ",bus=%s.0", sound->info.alias);
+ virBufferVSprintf(&buf, ",cad=%d", cad);
+
+ if (virBufferError(&buf)) {
+ virReportOOMError();
+ goto error;
+ }
+
+ return virBufferContentAndReset(&buf);
+
+error:
+ virBufferFreeAndReset(&buf);
+ return NULL;
+}
static char *
qemuBuildVideoDevStr(virDomainVideoDefPtr video)
@@ -3817,11 +3842,29 @@ qemuBuildCommandLine(virConnectPtr conn,
virCommandAddArgList(cmd, "-soundhw", "pcspk", NULL);
} else {
virCommandAddArg(cmd, "-device");
-
if (!(str = qemuBuildSoundDevStr(sound)))
goto error;
virCommandAddArg(cmd, str);
+
+ if (sound->model == VIR_DOMAIN_SOUND_MODEL_ICH6) {
+ char *codecstr = NULL;
+ if (!(qemuCmdFlags & QEMUD_CMD_FLAG_HDA_DUPLEX)) {
+ qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("this QEMU binary lacks hda support"));
+ goto error;
+ }
+
+ virCommandAddArg(cmd, "-device");
+ if (!(codecstr = qemuBuildSoundCodecStr(sound,
+ "hda-duplex"))) {
+ goto error;
+ }
+
+ virCommandAddArg(cmd, codecstr);
+ VIR_FREE(codecstr);
+ }
+
VIR_FREE(str);
}
}
@@ -3840,6 +3883,13 @@ qemuBuildCommandLine(virConnectPtr conn,
"%s", _("invalid sound model"));
goto error;
}
+
+ if (sound->model == VIR_DOMAIN_SOUND_MODEL_ICH6) {
+ qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("this QEMU binary lacks hda support"));
+ goto error;
+ }
+
strncat(modstr, model, size);
size -= strlen(model);
if (i < (def->nsounds - 1))
@@ -5675,6 +5725,8 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr caps,
type = VIR_DOMAIN_SOUND_MODEL_ES1370;
} else if (STRPREFIX(start, "ac97")) {
type = VIR_DOMAIN_SOUND_MODEL_AC97;
+ } else if (STRPREFIX(start, "hda")) {
+ type = VIR_DOMAIN_SOUND_MODEL_ICH6;
}
if (type != -1) {
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-sound-device.args b/tests/qemuxml2argvdata/qemuxml2argv-sound-device.args
index 6b2e697..4c5172f 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-sound-device.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-sound-device.args
@@ -1 +1 @@
-LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -usb -soundhw pcspk -device ES1370,id=sound1,bus=pci.0,addr=0x2 -device sb16,id=sound2 -device AC97,id=sound3,bus=pci.0,addr=0x3 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -usb -soundhw pcspk -device ES1370,id=sound1,bus=pci.0,addr=0x2 -device sb16,id=sound2 -device AC97,id=sound3,bus=pci.0,addr=0x3 -device intel-hda,id=sound4,bus=pci.0,addr=0x4 -device hda-duplex,id=sound4-codec0,bus=sound4.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-sound-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-sound-device.xml
index c725346..fbca4fe 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-sound-device.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-sound-device.xml
@@ -22,6 +22,7 @@
<sound model='es1370'/>
<sound model='sb16'/>
<sound model='ac97'/>
+ <sound model='ich6'/>
<memballoon model='virtio'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index a7270ec..0c0693b 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -418,7 +418,7 @@ mymain(int argc, char **argv)
QEMUD_CMD_FLAG_NODEFCONFIG, false);
DO_TEST("sound", 0, false);
DO_TEST("sound-device", QEMUD_CMD_FLAG_DEVICE |
- QEMUD_CMD_FLAG_NODEFCONFIG, false);
+ QEMUD_CMD_FLAG_NODEFCONFIG | QEMUD_CMD_FLAG_HDA_DUPLEX, false);
DO_TEST("fs9p", QEMUD_CMD_FLAG_DEVICE |
QEMUD_CMD_FLAG_NODEFCONFIG | QEMUD_CMD_FLAG_FSDEV, false);
--
1.7.3.2
13 years, 10 months
[libvirt] [PATCH] Fix leak of mutex attributes in POSIX threads impl
by Daniel P. Berrange
* src/util/threads-pthread.c: Fix mutex leak
---
src/util/threads-pthread.c | 8 ++++++--
1 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/src/util/threads-pthread.c b/src/util/threads-pthread.c
index ea71589..f812045 100644
--- a/src/util/threads-pthread.c
+++ b/src/util/threads-pthread.c
@@ -47,7 +47,9 @@ int virMutexInit(virMutexPtr m)
pthread_mutexattr_t attr;
pthread_mutexattr_init(&attr);
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_NORMAL);
- if ((ret = pthread_mutex_init(&m->lock, &attr)) != 0) {
+ ret = pthread_mutex_init(&m->lock, &attr);
+ pthread_mutexattr_destroy(&attr);
+ if (ret != 0) {
errno = ret;
return -1;
}
@@ -60,7 +62,9 @@ int virMutexInitRecursive(virMutexPtr m)
pthread_mutexattr_t attr;
pthread_mutexattr_init(&attr);
pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
- if ((ret = pthread_mutex_init(&m->lock, &attr)) != 0) {
+ ret = pthread_mutex_init(&m->lock, &attr);
+ pthread_mutexattr_destroy(&attr);
+ if (ret != 0) {
errno = ret;
return -1;
}
--
1.7.3.4
13 years, 10 months
[libvirt] [v1] remote: Add extra parameter client_pki_dir for URI
by Osier Yang
This new parameter allows user specifies directory in which the client
cerficate, client key, CA certificate reside (the directory path must
be absolute), instead of hardcoding it in remote driver. But the hardcoded
locations are still kept, and attempt to use them if the required files
can not be found in the location user specified. e.g.
[root@Osier client]# virsh -c qemu+tls://$hostname/system?client_pki_dir\
> =/tmp/pki/client
Welcome to virsh, the virtualization interactive terminal.
Type: 'help' for help with commands
'quit' to quit
virsh # quit
[root@Osier client]# pwd
/tmp/pki/client
[root@Osier client]# ls
cacert.pem clientcert.pem client.info clientkey.pem
[root@Osier client]# mv cacert.pem ..
mv: overwrite `../cacert.pem'? y
[root@Osier client]# virsh -c qemu+tls://10.66.93.111/system?client_pki_dir\
> =/tmp/pki/client
19:11:23.844: 7589: warning : initialize_gnutls:1186 : /tmp/pki/client/cacert.pem
doesn't exist, try to use: /etc/pki/CA/cacert.pem
Welcome to virsh, the virtualization interactive terminal.
Type: 'help' for help with commands
'quit' to quit
virsh #
* src/remote/remote_driver.c
---
src/remote/remote_driver.c | 87 ++++++++++++++++++++++++++++++++++++++------
1 files changed, 75 insertions(+), 12 deletions(-)
diff --git a/src/remote/remote_driver.c b/src/remote/remote_driver.c
index ea119c6..7053e45 100644
--- a/src/remote/remote_driver.c
+++ b/src/remote/remote_driver.c
@@ -268,7 +268,7 @@ void remoteDomainEventQueueFlush(int timer, void *opaque);
static char *get_transport_from_scheme (char *scheme);
/* GnuTLS functions used by remoteOpen. */
-static int initialize_gnutls(void);
+static int initialize_gnutls(char *client_pki_dir);
static gnutls_session_t negotiate_gnutls_on_connection (virConnectPtr conn, struct private_data *priv, int no_verify);
#ifdef WITH_LIBVIRTD
@@ -430,6 +430,7 @@ doRemoteOpen (virConnectPtr conn,
char *port = NULL, *authtype = NULL, *username = NULL;
int no_verify = 0, no_tty = 0;
char **cmd_argv = NULL;
+ char *client_pki_dir = NULL;
/* Return code from this function, and the private data. */
int retcode = VIR_DRV_OPEN_ERROR;
@@ -509,9 +510,14 @@ doRemoteOpen (virConnectPtr conn,
priv->debugLog = stdout;
else
priv->debugLog = stderr;
- } else
+ } else if (STRCASEEQ(var->name, "client_pki_dir")) {
+ client_pki_dir = strdup(var->value);
+ if (!client_pki_dir) goto out_of_memory;
+ var->ignore = 1;
+ } else {
DEBUG("passing through variable '%s' ('%s') to remote end",
var->name, var->value);
+ }
}
/* Construct the original name. */
@@ -577,7 +583,7 @@ doRemoteOpen (virConnectPtr conn,
/* Connect to the remote service. */
switch (transport) {
case trans_tls:
- if (initialize_gnutls() == -1) goto failed;
+ if (initialize_gnutls(client_pki_dir) == -1) goto failed;
priv->uses_tls = 1;
priv->is_secure = 1;
@@ -947,6 +953,7 @@ doRemoteOpen (virConnectPtr conn,
}
VIR_FREE(cmd_argv);
}
+ VIR_FREE(client_pki_dir);
return retcode;
@@ -1139,11 +1146,14 @@ static void remote_debug_gnutls_log(int level, const char* str) {
}
static int
-initialize_gnutls(void)
+initialize_gnutls(char *client_pki_dir)
{
static int initialized = 0;
int err;
char *gnutlsdebug;
+ char *libvirt_cacert = NULL;
+ char *libvirt_clientkey = NULL;
+ char *libvirt_clientcert = NULL;
if (initialized) return 0;
@@ -1166,18 +1176,64 @@ initialize_gnutls(void)
return -1;
}
+ if (client_pki_dir) {
+ if((virAsprintf(&libvirt_cacert, "%s/%s", client_pki_dir,
+ "cacert.pem")) < 0)
+ goto out_of_memory;
+
+ if (!virFileExists(libvirt_cacert)) {
+ VIR_WARN(_("%s doesn't exist, try to use: %s"),
+ libvirt_cacert, LIBVIRT_CACERT);
+
+ libvirt_cacert = strdup(LIBVIRT_CACERT);
+ if (!libvirt_cacert) goto out_of_memory;
+ }
+
+ if((virAsprintf(&libvirt_clientkey, "%s/%s", client_pki_dir,
+ "clientkey.pem")) < 0)
+ goto out_of_memory;
+
+ if (!virFileExists(libvirt_clientkey)) {
+ VIR_WARN(_("%s doesn't exist, try to use: %s"),
+ libvirt_clientkey, LIBVIRT_CLIENTKEY);
+
+ libvirt_clientkey = strdup(LIBVIRT_CLIENTKEY);
+ if (!libvirt_clientkey) goto out_of_memory;
+ }
+
+ if((virAsprintf(&libvirt_clientcert, "%s/%s", client_pki_dir,
+ "clientcert.pem")) < 0)
+ goto out_of_memory;
- if (check_cert_file("CA certificate", LIBVIRT_CACERT) < 0)
+ if (!virFileExists(libvirt_clientcert)) {
+ VIR_WARN(_("%s doesn't exist, try to use: %s"),
+ libvirt_clientcert, LIBVIRT_CLIENTCERT);
+
+ libvirt_clientcert = strdup(LIBVIRT_CLIENTCERT);
+ if (!libvirt_clientcert) goto out_of_memory;
+ }
+ } else {
+ libvirt_cacert = strdup(LIBVIRT_CACERT);
+ if (!libvirt_cacert) goto out_of_memory;
+
+ libvirt_clientkey = strdup(LIBVIRT_CLIENTKEY);
+ if (!libvirt_cacert) goto out_of_memory;
+
+ libvirt_clientcert = strdup(LIBVIRT_CLIENTCERT);
+ if (!libvirt_cacert) goto out_of_memory;
+ }
+
+ if (check_cert_file("CA certificate", libvirt_cacert) < 0)
return -1;
- if (check_cert_file("client key", LIBVIRT_CLIENTKEY) < 0)
+ if (check_cert_file("client key", libvirt_clientkey) < 0)
return -1;
- if (check_cert_file("client certificate", LIBVIRT_CLIENTCERT) < 0)
+ if (check_cert_file("client certificate", libvirt_clientcert) < 0)
return -1;
/* Set the trusted CA cert. */
- DEBUG("loading CA file %s", LIBVIRT_CACERT);
+ DEBUG("loading CA file %s", libvirt_cacert);
err =
- gnutls_certificate_set_x509_trust_file (x509_cred, LIBVIRT_CACERT,
+ gnutls_certificate_set_x509_trust_file (x509_cred, libvirt_cacert,
GNUTLS_X509_FMT_PEM);
if (err < 0) {
remoteError(VIR_ERR_GNUTLS_ERROR,
@@ -1188,11 +1244,11 @@ initialize_gnutls(void)
/* Set the client certificate and private key. */
DEBUG("loading client cert and key from files %s and %s",
- LIBVIRT_CLIENTCERT, LIBVIRT_CLIENTKEY);
+ libvirt_clientcert, libvirt_clientkey);
err =
gnutls_certificate_set_x509_key_file (x509_cred,
- LIBVIRT_CLIENTCERT,
- LIBVIRT_CLIENTKEY,
+ libvirt_clientcert,
+ libvirt_clientkey,
GNUTLS_X509_FMT_PEM);
if (err < 0) {
remoteError(VIR_ERR_GNUTLS_ERROR,
@@ -1202,7 +1258,14 @@ initialize_gnutls(void)
}
initialized = 1;
+ VIR_FREE(libvirt_cacert);
+ VIR_FREE(libvirt_clientkey);
+ VIR_FREE(libvirt_clientcert);
return 0;
+
+out_of_memory:
+ virReportOOMError();
+ return -1;
}
static int verify_certificate (virConnectPtr conn, struct private_data *priv, gnutls_session_t session);
--
1.7.3.2
13 years, 10 months
[libvirt] [PATCH v3] qemu: sound: Support intel 'ich6' model
by Cole Robinson
In QEMU, the card itself is a PCI device, but it requires a codec
(either -device hda-output or -device hda-duplex) to actually output
sound. Specifying <sound model='ich6'/> gives us -device intel-hda
-device hda-duplex I think it's important that a simple <sound model='ich6'/>
sets up a useful codec, to have consistent behavior with all other sound cards.
This is basically Dan's proposal of
<sound model='ich6'>
<codec type='output' slot='0'/>
<codec type='duplex' slot='3'/>
</sound>
without the codec bits implemented.
The important thing is to keep a consistent API here, we don't want some
<sound> devs require tweaking codecs but not others. Steps I see to
accomplishing this:
- every <sound> device has a <codec type='default'/> (unless codecs are
manually specified)
- <codec type='none'/> is required to specify 'no codecs'
- new audio settings like mic=on|off could then be exposed in
<sound> or <codec> in a consistent manner for all sound models
One difference from danpb's suggestion is that the codec id takes the form
${soundid}-codec-${cad}, rather than codec${soundid}${cad}, just for
readability.
Also, QEMU seems to set the bus name as ${soundid}.0. Is that expected? Or
should it just be ${soundid}?
v2:
Use feature detection, from eblake
Set codec id, bus, and cad values
Signed-off-by: Cole Robinson <crobinso(a)redhat.com>
---
docs/formatdomain.html.in | 5 +-
docs/schemas/domain.rng | 1 +
src/conf/domain_conf.c | 3 +-
src/conf/domain_conf.h | 1 +
src/qemu/qemu_capabilities.c | 5 ++
src/qemu/qemu_capabilities.h | 1 +
src/qemu/qemu_command.c | 61 ++++++++++++++++++--
.../qemuxml2argv-sound-device.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-sound-device.xml | 1 +
tests/qemuxml2argvdata/qemuxml2argv-sound.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-sound.xml | 1 +
tests/qemuxml2argvtest.c | 2 +-
12 files changed, 74 insertions(+), 11 deletions(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index 859f3fd..e7f65ad 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -1880,8 +1880,9 @@ qemu-kvm -net nic,model=? /dev/null
The <code>sound</code> element has one mandatory attribute,
<code>model</code>, which specifies what real sound device is emulated.
Valid values are specific to the underlying hypervisor, though typical
- choices are 'es1370', 'sb16', and 'ac97'
- (<span class="since">'ac97' only since 0.6.0</span>)
+ choices are 'es1370', 'sb16', 'ac97', and 'ich6'
+ (<span class="since">
+ 'ac97' only since 0.6.0, 'ich6' only since 0.8.8</span>)
</dd>
</dl>
diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng
index d4756e6..b2f8e00 100644
--- a/docs/schemas/domain.rng
+++ b/docs/schemas/domain.rng
@@ -1530,6 +1530,7 @@
<value>es1370</value>
<value>pcspk</value>
<value>ac97</value>
+ <value>ich6</value>
</choice>
</attribute>
<optional>
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index 699fee7..d5445a4 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -231,7 +231,8 @@ VIR_ENUM_IMPL(virDomainSoundModel, VIR_DOMAIN_SOUND_MODEL_LAST,
"sb16",
"es1370",
"pcspk",
- "ac97")
+ "ac97",
+ "ich6")
VIR_ENUM_IMPL(virDomainMemballoonModel, VIR_DOMAIN_MEMBALLOON_MODEL_LAST,
"virtio",
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 3b00ba0..fc69627 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -480,6 +480,7 @@ enum virDomainSoundModel {
VIR_DOMAIN_SOUND_MODEL_ES1370,
VIR_DOMAIN_SOUND_MODEL_PCSPK,
VIR_DOMAIN_SOUND_MODEL_AC97,
+ VIR_DOMAIN_SOUND_MODEL_ICH6,
VIR_DOMAIN_SOUND_MODEL_LAST
};
diff --git a/src/qemu/qemu_capabilities.c b/src/qemu/qemu_capabilities.c
index faf7d44..02865e4 100644
--- a/src/qemu/qemu_capabilities.c
+++ b/src/qemu/qemu_capabilities.c
@@ -1079,6 +1079,11 @@ cleanup:
int
qemuCapsParseDeviceStr(const char *str, unsigned long long *flags)
{
+ /* Which devices exist. */
+ if (strstr(str, "name \"hda-duplex\""))
+ *flags |= QEMUD_CMD_FLAG_HDA_DUPLEX;
+
+ /* Features of given devices. */
if (strstr(str, "pci-assign.configfd"))
*flags |= QEMUD_CMD_FLAG_PCI_CONFIGFD;
if (strstr(str, "virtio-blk-pci.bootindex"))
diff --git a/src/qemu/qemu_capabilities.h b/src/qemu/qemu_capabilities.h
index e9e2da0..9148d90 100644
--- a/src/qemu/qemu_capabilities.h
+++ b/src/qemu/qemu_capabilities.h
@@ -84,6 +84,7 @@ enum qemuCapsFlags {
QEMUD_CMD_FLAG_VGA_NONE = (1LL << 47), /* The 'none' arg for '-vga' */
QEMUD_CMD_FLAG_MIGRATE_QEMU_FD = (1LL << 48), /* -incoming fd:n */
QEMUD_CMD_FLAG_BOOTINDEX = (1LL << 49), /* -device bootindex property */
+ QEMUD_CMD_FLAG_HDA_DUPLEX = (1LL << 50), /* -device hda-duplex */
};
virCapsPtr qemuCapsInit(virCapsPtr old_caps);
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index c20f031..627ec43 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -1774,11 +1774,13 @@ qemuBuildSoundDevStr(virDomainSoundDefPtr sound)
goto error;
}
- /* Hack for 2 wierdly unusal devices name in QEMU */
+ /* Hack for wierdly unusal devices name in QEMU */
if (STREQ(model, "es1370"))
model = "ES1370";
else if (STREQ(model, "ac97"))
model = "AC97";
+ else if (STREQ(model, "ich6"))
+ model = "intel-hda";
virBufferVSprintf(&buf, "%s", model);
virBufferVSprintf(&buf, ",id=%s", sound->info.alias);
@@ -1797,6 +1799,29 @@ error:
return NULL;
}
+static char *
+qemuBuildSoundCodecStr(virDomainSoundDefPtr sound,
+ const char *codec)
+{
+ virBuffer buf = VIR_BUFFER_INITIALIZER;
+ int cad = 0;
+
+ virBufferVSprintf(&buf, "%s", codec);
+ virBufferVSprintf(&buf, ",id=%s-codec%d", sound->info.alias, cad);
+ virBufferVSprintf(&buf, ",bus=%s.0", sound->info.alias);
+ virBufferVSprintf(&buf, ",cad=%d", cad);
+
+ if (virBufferError(&buf)) {
+ virReportOOMError();
+ goto error;
+ }
+
+ return virBufferContentAndReset(&buf);
+
+error:
+ virBufferFreeAndReset(&buf);
+ return NULL;
+}
static char *
qemuBuildVideoDevStr(virDomainVideoDefPtr video)
@@ -3817,11 +3842,29 @@ qemuBuildCommandLine(virConnectPtr conn,
virCommandAddArgList(cmd, "-soundhw", "pcspk", NULL);
} else {
virCommandAddArg(cmd, "-device");
-
if (!(str = qemuBuildSoundDevStr(sound)))
goto error;
virCommandAddArg(cmd, str);
+
+ if (sound->model == VIR_DOMAIN_SOUND_MODEL_ICH6) {
+ char *codecstr = NULL;
+ if (!(qemuCmdFlags & QEMUD_CMD_FLAG_HDA_DUPLEX)) {
+ qemuReportError(VIR_ERR_CONFIG_UNSUPPORTED, "%s",
+ _("this QEMU binary lacks hda support"));
+ goto error;
+ }
+
+ virCommandAddArg(cmd, "-device");
+ if (!(codecstr = qemuBuildSoundCodecStr(sound,
+ "hda-duplex"))) {
+ goto error;
+ }
+
+ virCommandAddArg(cmd, codecstr);
+ VIR_FREE(codecstr);
+ }
+
VIR_FREE(str);
}
}
@@ -3833,13 +3876,19 @@ qemuBuildCommandLine(virConnectPtr conn,
for (i = 0 ; i < def->nsounds && size > 0 ; i++) {
virDomainSoundDefPtr sound = def->sounds[i];
- const char *model = virDomainSoundModelTypeToString(sound->model);
- if (!model) {
- VIR_FREE(modstr);
+ const char *model = "hda";
+
+ if (sound->model != VIR_DOMAIN_SOUND_MODEL_ICH6 &&
+ !(model = virDomainSoundModelTypeToString(sound->model))) {
qemuReportError(VIR_ERR_INTERNAL_ERROR,
"%s", _("invalid sound model"));
+ }
+
+ if (!model) {
+ VIR_FREE(modstr);
goto error;
}
+
strncat(modstr, model, size);
size -= strlen(model);
if (i < (def->nsounds - 1))
@@ -5675,6 +5724,8 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr caps,
type = VIR_DOMAIN_SOUND_MODEL_ES1370;
} else if (STRPREFIX(start, "ac97")) {
type = VIR_DOMAIN_SOUND_MODEL_AC97;
+ } else if (STRPREFIX(start, "hda")) {
+ type = VIR_DOMAIN_SOUND_MODEL_ICH6;
}
if (type != -1) {
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-sound-device.args b/tests/qemuxml2argvdata/qemuxml2argv-sound-device.args
index 6b2e697..4c5172f 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-sound-device.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-sound-device.args
@@ -1 +1 @@
-LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -usb -soundhw pcspk -device ES1370,id=sound1,bus=pci.0,addr=0x2 -device sb16,id=sound2 -device AC97,id=sound3,bus=pci.0,addr=0x3 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -usb -soundhw pcspk -device ES1370,id=sound1,bus=pci.0,addr=0x2 -device sb16,id=sound2 -device AC97,id=sound3,bus=pci.0,addr=0x3 -device intel-hda,id=sound4,bus=pci.0,addr=0x4 -device hda-duplex,id=sound4-codec0,bus=sound4.0,cad=0 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-sound-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-sound-device.xml
index c725346..fbca4fe 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-sound-device.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-sound-device.xml
@@ -22,6 +22,7 @@
<sound model='es1370'/>
<sound model='sb16'/>
<sound model='ac97'/>
+ <sound model='ich6'/>
<memballoon model='virtio'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-sound.args b/tests/qemuxml2argvdata/qemuxml2argv-sound.args
index 8cb2da2..0db62c3 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-sound.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-sound.args
@@ -1 +1 @@
-LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -soundhw pcspk,es1370,sb16,ac97
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -soundhw pcspk,es1370,sb16,ac97,hda
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-sound.xml b/tests/qemuxml2argvdata/qemuxml2argv-sound.xml
index d34e0b3..78bfe3d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-sound.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-sound.xml
@@ -24,6 +24,7 @@
<sound model='es1370'/>
<sound model='sb16'/>
<sound model='ac97'/>
+ <sound model='ich6'/>
<memballoon model='virtio'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
index a7270ec..0c0693b 100644
--- a/tests/qemuxml2argvtest.c
+++ b/tests/qemuxml2argvtest.c
@@ -418,7 +418,7 @@ mymain(int argc, char **argv)
QEMUD_CMD_FLAG_NODEFCONFIG, false);
DO_TEST("sound", 0, false);
DO_TEST("sound-device", QEMUD_CMD_FLAG_DEVICE |
- QEMUD_CMD_FLAG_NODEFCONFIG, false);
+ QEMUD_CMD_FLAG_NODEFCONFIG | QEMUD_CMD_FLAG_HDA_DUPLEX, false);
DO_TEST("fs9p", QEMUD_CMD_FLAG_DEVICE |
QEMUD_CMD_FLAG_NODEFCONFIG | QEMUD_CMD_FLAG_FSDEV, false);
--
1.7.3.2
13 years, 10 months
[libvirt] [PATCH] storage: Round up capacity for LVM volume creation
by Osier Yang
If vol->capacity is odd, the capacity will be rounded down
by devision, this patch is to round it up instead of rounding
down, to be safer in case of one writes to the volume with the
size he used to create.
* src/storage/storage_backend_logical.c
---
src/storage/storage_backend_logical.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_backend_logical.c
index 203fe5d..2057692 100644
--- a/src/storage/storage_backend_logical.c
+++ b/src/storage/storage_backend_logical.c
@@ -604,7 +604,10 @@ virStorageBackendLogicalCreateVol(virConnectPtr conn,
cmdargv = cmdargvsnap;
}
- snprintf(size, sizeof(size)-1, "%lluK", vol->capacity/1024);
+ unsigned long long int capacity;
+ capacity = vol->capacity/1024 + (vol->capacity%1024 > 0 ? 1 : 0);
+
+ snprintf(size, sizeof(size)-1, "%lluK", capacity);
size[sizeof(size)-1] = '\0';
vol->type = VIR_STORAGE_VOL_BLOCK;
--
1.7.3.2
13 years, 10 months
[libvirt] [PATCH 0/3] Add blkio cgroup support
by Gui Jianfeng
Hi
This patchset adds blkio cgroup support for qemu.
[PATCH 1/3] cgroup: Enable cgroup hierarchy for blkio cgroup
[PATCH 2/3] cgroup: implement blkio.weight tuning API.
[PATCH 3/3] qemu: Implement blkio tunable XML configuration and parsing.
Will post a patchset to implement virsh command "blkiotune" to tune blkio
cgroup parameter later on.
---
conf/domain_conf.c | 17 ++++++++++++++++-
conf/domain_conf.h | 4 ++++
libvirt_private.syms | 2 ++
qemu/qemu_cgroup.c | 16 +++++++++++++++-
qemu/qemu_conf.c | 3 ++-
util/cgroup.c | 38 +++++++++++++++++++++++++++++++++++++-
util/cgroup.h | 4 ++++
7 files changed, 80 insertions(+), 4 deletions(-)
Thanks
Gui
13 years, 10 months
[libvirt] [PATCH] build: fix 'make check' with older git
by Eric Blake
* .gnulib: Update to latest, for maintainer-makefile fix.
Reported by Matthias Bolte.
---
Pushing under the build-breaker rule, as I confirmed the breakage
when trying 'make check' on Ubuntu 10.10.
* .gnulib 54c0573...2f41af6 (1):
> maintainer-makefile: work with older git for submodule check
.gnulib | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/.gnulib b/.gnulib
index 54c0573..2f41af6 160000
--- a/.gnulib
+++ b/.gnulib
@@ -1 +1 @@
-Subproject commit 54c0573c2f6200b8b9c88a026c7bc8cfe44e0403
+Subproject commit 2f41af65087fb2460779bc4e7fb62453f79ebae3
--
1.7.3.4
13 years, 10 months
[libvirt] [PATCH v2] qemu: sound: Support intel 'ich6' model
by Cole Robinson
In QEMU, the card itself is a PCI device, but it requires a codec
(either -device hda-output or -device hda-duplex) to actually output
sound. We set up an hda-duplex codec by default: I think it's important
that a simple <sound model='ich6'/> sets up a useful codec, to have
consistent behavior with all other sound cards.
This is basically Dan's proposal of
<sound model='ich6'>
<codec type='output' slot='0'/>
<codec type='duplex' slot='3'/>
</sound>
without the codec bits implemented.
The important thing is to keep a consistent API here, we don't want some
<sound> models to require tweaking codecs but not others. Steps I see to
accomplishing this when someone gets around to it:
- every <sound> device has a <codec type='default'/> (unless codecs are
manually specified)
- <codec type='none'/> is required to specify 'no codecs'
- new audio settings like mic=on|off could then be exposed in
<sound> or <codec> in a consistent manner for all sound models
Signed-off-by: Cole Robinson <crobinso(a)redhat.com>
---
docs/formatdomain.html.in | 5 ++-
docs/schemas/domain.rng | 1 +
src/conf/domain_conf.c | 3 +-
src/conf/domain_conf.h | 1 +
src/qemu/qemu_command.c | 24 ++++++++++++++++---
.../qemuxml2argv-sound-device.args | 2 +-
.../qemuxml2argvdata/qemuxml2argv-sound-device.xml | 1 +
tests/qemuxml2argvdata/qemuxml2argv-sound.args | 2 +-
tests/qemuxml2argvdata/qemuxml2argv-sound.xml | 1 +
9 files changed, 31 insertions(+), 9 deletions(-)
diff --git a/docs/formatdomain.html.in b/docs/formatdomain.html.in
index e9fcea1..b9b83c2 100644
--- a/docs/formatdomain.html.in
+++ b/docs/formatdomain.html.in
@@ -1663,8 +1663,9 @@ qemu-kvm -net nic,model=? /dev/null
The <code>sound</code> element has one mandatory attribute,
<code>model</code>, which specifies what real sound device is emulated.
Valid values are specific to the underlying hypervisor, though typical
- choices are 'es1370', 'sb16', and 'ac97'
- (<span class="since">'ac97' only since 0.6.0</span>)
+ choices are 'es1370', 'sb16', 'ac97', and 'ich6'
+ (<span class="since">
+ 'ac97' only since 0.6.0, 'ich6' only since 0.8.8</span>)
</dd>
</dl>
diff --git a/docs/schemas/domain.rng b/docs/schemas/domain.rng
index 9c1e9bb..ae0defe 100644
--- a/docs/schemas/domain.rng
+++ b/docs/schemas/domain.rng
@@ -1496,6 +1496,7 @@
<value>es1370</value>
<value>pcspk</value>
<value>ac97</value>
+ <value>ich6</value>
</choice>
</attribute>
<optional>
diff --git a/src/conf/domain_conf.c b/src/conf/domain_conf.c
index e5b89a2..3aabdf9 100644
--- a/src/conf/domain_conf.c
+++ b/src/conf/domain_conf.c
@@ -225,7 +225,8 @@ VIR_ENUM_IMPL(virDomainSoundModel, VIR_DOMAIN_SOUND_MODEL_LAST,
"sb16",
"es1370",
"pcspk",
- "ac97")
+ "ac97",
+ "ich6")
VIR_ENUM_IMPL(virDomainMemballoonModel, VIR_DOMAIN_MEMBALLOON_MODEL_LAST,
"virtio",
diff --git a/src/conf/domain_conf.h b/src/conf/domain_conf.h
index 81409f8..924ce89 100644
--- a/src/conf/domain_conf.h
+++ b/src/conf/domain_conf.h
@@ -458,6 +458,7 @@ enum virDomainSoundModel {
VIR_DOMAIN_SOUND_MODEL_ES1370,
VIR_DOMAIN_SOUND_MODEL_PCSPK,
VIR_DOMAIN_SOUND_MODEL_AC97,
+ VIR_DOMAIN_SOUND_MODEL_ICH6,
VIR_DOMAIN_SOUND_MODEL_LAST
};
diff --git a/src/qemu/qemu_command.c b/src/qemu/qemu_command.c
index a0075a4..2024221 100644
--- a/src/qemu/qemu_command.c
+++ b/src/qemu/qemu_command.c
@@ -1727,11 +1727,13 @@ qemuBuildSoundDevStr(virDomainSoundDefPtr sound)
goto error;
}
- /* Hack for 2 wierdly unusal devices name in QEMU */
+ /* Hack for wierdly unusal devices name in QEMU */
if (STREQ(model, "es1370"))
model = "ES1370";
else if (STREQ(model, "ac97"))
model = "AC97";
+ else if (STREQ(model, "ich6"))
+ model = "intel-hda";
virBufferVSprintf(&buf, "%s", model);
virBufferVSprintf(&buf, ",id=%s", sound->info.alias);
@@ -3751,6 +3753,12 @@ qemuBuildCommandLine(virConnectPtr conn,
goto error;
virCommandAddArg(cmd, str);
+
+ if (sound->model == VIR_DOMAIN_SOUND_MODEL_ICH6) {
+ virCommandAddArgList(cmd,
+ "-device", "hda-duplex", NULL);
+ }
+
VIR_FREE(str);
}
}
@@ -3762,13 +3770,19 @@ qemuBuildCommandLine(virConnectPtr conn,
for (i = 0 ; i < def->nsounds && size > 0 ; i++) {
virDomainSoundDefPtr sound = def->sounds[i];
- const char *model = virDomainSoundModelTypeToString(sound->model);
- if (!model) {
- VIR_FREE(modstr);
+ const char *model = "hda";
+
+ if (sound->model != VIR_DOMAIN_SOUND_MODEL_ICH6 &&
+ !(model = virDomainSoundModelTypeToString(sound->model))) {
qemuReportError(VIR_ERR_INTERNAL_ERROR,
"%s", _("invalid sound model"));
+ }
+
+ if (!model) {
+ VIR_FREE(modstr);
goto error;
}
+
strncat(modstr, model, size);
size -= strlen(model);
if (i < (def->nsounds - 1))
@@ -5530,6 +5544,8 @@ virDomainDefPtr qemuParseCommandLine(virCapsPtr caps,
type = VIR_DOMAIN_SOUND_MODEL_ES1370;
} else if (STRPREFIX(start, "ac97")) {
type = VIR_DOMAIN_SOUND_MODEL_AC97;
+ } else if (STRPREFIX(start, "hda")) {
+ type = VIR_DOMAIN_SOUND_MODEL_ICH6;
}
if (type != -1) {
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-sound-device.args b/tests/qemuxml2argvdata/qemuxml2argv-sound-device.args
index 6b2e697..1b20dfc 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-sound-device.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-sound-device.args
@@ -1 +1 @@
-LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -usb -soundhw pcspk -device ES1370,id=sound1,bus=pci.0,addr=0x2 -device sb16,id=sound2 -device AC97,id=sound3,bus=pci.0,addr=0x3 -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x4
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -nodefconfig -nodefaults -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -usb -soundhw pcspk -device ES1370,id=sound1,bus=pci.0,addr=0x2 -device sb16,id=sound2 -device AC97,id=sound3,bus=pci.0,addr=0x3 -device intel-hda,id=sound4,bus=pci.0,addr=0x4 -device hda-duplex -device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x5
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-sound-device.xml b/tests/qemuxml2argvdata/qemuxml2argv-sound-device.xml
index c725346..fbca4fe 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-sound-device.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-sound-device.xml
@@ -22,6 +22,7 @@
<sound model='es1370'/>
<sound model='sb16'/>
<sound model='ac97'/>
+ <sound model='ich6'/>
<memballoon model='virtio'/>
</devices>
</domain>
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-sound.args b/tests/qemuxml2argvdata/qemuxml2argv-sound.args
index 8cb2da2..0db62c3 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-sound.args
+++ b/tests/qemuxml2argvdata/qemuxml2argv-sound.args
@@ -1 +1 @@
-LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -soundhw pcspk,es1370,sb16,ac97
+LC_ALL=C PATH=/bin HOME=/home/test USER=test LOGNAME=test /usr/bin/qemu -S -M pc -m 214 -smp 1 -nographic -monitor unix:/tmp/test-monitor,server,nowait -no-acpi -boot c -hda /dev/HostVG/QEMUGuest1 -net none -serial none -parallel none -usb -soundhw pcspk,es1370,sb16,ac97,hda
diff --git a/tests/qemuxml2argvdata/qemuxml2argv-sound.xml b/tests/qemuxml2argvdata/qemuxml2argv-sound.xml
index d34e0b3..78bfe3d 100644
--- a/tests/qemuxml2argvdata/qemuxml2argv-sound.xml
+++ b/tests/qemuxml2argvdata/qemuxml2argv-sound.xml
@@ -24,6 +24,7 @@
<sound model='es1370'/>
<sound model='sb16'/>
<sound model='ac97'/>
+ <sound model='ich6'/>
<memballoon model='virtio'/>
</devices>
</domain>
--
1.7.3.3
13 years, 10 months
[libvirt] [PATCH 0/3] Yet another attempt at cleaning libvirtd error logging
by Daniel P. Berrange
THe previous changes
commit 04bd0360f32ec628ecf7943b3fd1468d6eb2dde5
Author: Daniel P. Berrange <berrange(a)redhat.com>
Date: Thu Nov 18 13:14:08 2010 +0000
Log all errors at level INFO to stop polluting syslog
commit abff683f78ffd01df5005fb7a457c0b38b8eb6e1
Author: Matthias Bolte <matthias.bolte(a)googlemail.com>
Date: Tue Nov 30 14:10:42 2010 +0100
Log client errors in libvirtd at debug priority
Are both sub-optimal since they result in all errors in libvirtd
becoming hidden. THis includes errors that are not related to
public APIs a remote client app is invoking. This has made
debugging / troubleshooting significantly more difficult.
This reverts both those patches, and applies a tightly
targetted filter at a couple of error codes we don't
want to see
13 years, 10 months