- 27 5月, 2010 1 次提交
-
-
由 Alex Williamson 提交于
This allows libvirt to open the PCI device sysfs config file prior to dropping privileges so qemu can access the full config space. Without this, a de-privileged qemu can only access the first 64 bytes of config space. * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Detect support for pci-assign.configfd option. Use this option when formatting PCI device string if possible * src/qemu/qemu_driver.c: Pre-open PCI sysfs config file and pass to QEMU
-
- 26 5月, 2010 1 次提交
-
-
由 Stefan Berger 提交于
This patch parses the following two XML descriptions, one for 802.1Qbg and one for 802.1Qbh, and stores the data internally. The actual triggering of the switch setup protocol has not been implemented here but the relevant code to do that should go into the functions associatePortProfileId() and disassociatePortProfileId(). <interface type='direct'> <source dev='eth0.100' mode='vepa'/> <model type='virtio'/> <virtualport type='802.1Qbg'> <parameters managerid='12' typeid='0x123456' typeidversion='1' instanceid='fa9b7fff-b0a0-4893-8e0e-beef4ff18f8f'/> </virtualport> <filterref filter='clean-traffic'/> </interface> <interface type='direct'> <source dev='eth0.100' mode='vepa'/> <model type='virtio'/> <virtualport type='802.1Qbh'> <parameters profileid='my_profile'/> </virtualport> </interface> I'd suggest to use this patch as a base for triggering the setup protocol with the 802.1Qb{g|h} switch. Several rounds of changes were made to this patch. The following is a list of these changes. - Renamed structure virVirtualPortProfileDef to virVirtualPortProfileParams as per Daniel Berrange's request - Addressing Daniel Berrange's comments: - removing macvtap.h's dependency on domain_conf.h by moving the virVirtualPortProfileDef structure into macvtap.h and not passing virtDomainNetDefPtr to any functions in macvtap.c - Addressed most of Chris Wright's comments: - indicating error in case virtualport XML node cannot be parsed properly - parsing hex and decimal numbers using virStrToLong_ui() with parameter '0' for base - tgifname (target interface name) variable wasn't necessary to pass to openMacvtapTap function anymore - assigning the virtual port data structure to the virDomainNetDef only if it was previously parsed - make sure that the error code returned by openMacvtapTap() is a negative n in case the associatePortProfileId() function failed. - renaming vsi in the XML to virtualport - replace all occurrences of vsi in the source as well - removing mode and MAC address parameters from the functions that will communicate with the hareware diretctly or indirectly - moving the associate and disassociate functions to the end of the file for subsequent patches to easier make them generally available for export - passing the macvtap interface name rather than the link device since this otherwise gives funny side effects when using netlink messages where IFLA_IFNAME and IFLA_ADDRESS are specified and the link dev all of a sudden gets the MAC address of the macvtap interface. - Removing rc = -1 error indications in the case of 802.1Qbg|h setup in case we wanted to use hook scripts for the setup and so the setup doesn't fail here. - if instance ID UUID is not supplied it will automatically be generated - adapted schema to make instance ID UUID optional - added test case - parser and XML generator have been separated into their own functions so they can be re-used elsewhere (passthrough case for example) - Adapted XML parser and generator support the above shown type (802.1Qbg, 802.1Qbh). - Adapted schema to above XML - Adapted test XML to above XML - Passing through the VM's UUID which seems to be necessary for 802.1Qbh -- sorry no host UUID - adding virtual function ID to association function, in case it's necessary to use (for SR-IOV)
-
- 25 5月, 2010 1 次提交
-
-
由 Cole Robinson 提交于
Currently all host audio backends are disabled if a VM is using VNC, in favor of the QEMU VNC audio extension. Unfortunately no released VNC client supports this extension, so users have no way of getting audio to work if using VNC. Add a new config option in qemu.conf which allows changing libvirt's behavior, but keep the default intact. v2: Fix doc typos, change name to vnc_allow_host_audio
-
- 21 5月, 2010 5 次提交
-
-
由 Jim Meyering 提交于
Run this command: git grep -l VIR_DEBUG|xargs perl -pi -e \ 's/(VIR_DEBUG0?)\s*\(_\((".*?")\)/$1($2/'
-
由 Jim Meyering 提交于
Run this: git grep -l 'VIR_ERROR\s*("'|xargs perl -pi -e \ 's/(VIR_ERROR)\s*\((".*?"),/$1(_($2),/'
-
由 Jim Meyering 提交于
Change VIR_ERROR("%s", "..." to VIR_ERROR0("..." and Change VIR_ERROR("%s", _("...") to VIR_ERROR0(_("...") Use this command: git grep -E -l 'VIR_ERROR\("%s", (_\()?"'|xargs perl -pi -e \ 's/VIR_ERROR\("%s", (_\()?"/VIR_ERROR0($1"/'
-
由 Chris Wright 提交于
* src/qemu/qemu_conf.c (qemudParseHelpStr): Fix errors that made it impossible to diagnose invalid minor and micro version number components. Signed-off-by: NChris Wright <chrisw@redhat.com>
-
由 Jim Meyering 提交于
* src/qemu/qemu_conf.c (QEMU_VERSION_STR_1, QEMU_VERSION_STR_2): Define these instead of... (QEMU_VERSION_STR): ... this. Remove definition. (qemudParseHelpStr): Check first for the new, shorter prefix, "QEMU emulator version", and then for the old one, "QEMU PC emulator version" when trying to parse the version number. Based on a patch by Chris Wright.
-
- 20 5月, 2010 1 次提交
-
-
由 Alex Williamson 提交于
There doesn't seem to be anything specific to tap devices for this array of file descriptors which need to stay open of the guest to use. Rename then for others to make use of. Signed-off-by: NAlex Williamson <alex.williamson@redhat.com> Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
- 19 5月, 2010 1 次提交
-
-
由 Jim Meyering 提交于
Approximately 60 messages were marked. Since these diagnostics are intended solely for developers and maintainers, encouraging translation is deemed to be counterproductive: http://thread.gmane.org/gmane.comp.emulators.libvirt/25050/focus=25052 Run this command: git grep -l VIR_WARN|xargs perl -pi -e \ 's/(VIR_WARN0?)\s*\(_\((".*?")\)/$1($2/'
-
- 29 4月, 2010 1 次提交
-
-
由 Chris Lalancette 提交于
qemuDomainPCIAddressSetFree was freeing up the hash table for the pci addresses, but not freeing up the addr structure. Looking over the callers of this function, it seems like they expect it to also free up the structure, so do that here. Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
- 24 4月, 2010 1 次提交
-
-
由 Matthias Bolte 提交于
Cygwin has mntent.h but lacks getmntent_r. Update preprocessor checks to catch this combination.
-
- 22 4月, 2010 4 次提交
-
-
由 Jiri Denemark 提交于
Adds ability to provide a preferred CPU model for CPUID data decoding. Such model would be considered as the best possible model (if it's supported by hypervisor) regardless on number of features which have to be added or removed for describing required CPU.
-
由 Jiri Denemark 提交于
So far, when CPUID data were converted into CPU model and features, the features can only be added to the model. As a result, when a guest asked for something like "qemu64,-svm" it would get a qemu32 plus a bunch of additional features instead. This patch adds support for removing feature from the base model. Selection algorithm remains the same: the best CPU model is the model which requires lowest number of features to be added/removed from it.
-
由 Jiri Denemark 提交于
Qemu committed a patch which list some CPU names in [] when asked for supported CPUs (qemu -cpu ?). Yet, it needs such CPUs to be passed without those square braces. When probing for supported CPU models, we can just strip the square braces and pretend we have never seen them.
-
-
- 16 4月, 2010 3 次提交
-
-
由 Daniel P. Berrange 提交于
Disk devices in QEMU have two parts, the guest device and the host backend driver. Historically these two parts have had the same "unique" name. With the switch to using -device though, they now have separate names. Thus when changing CDROM media, for guests using -device syntax, we need to prepend the QEMU_DRIVE_HOST_PREFIX constant * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Add helper function qemuDeviceDriveHostAlias() for building a host backend alias * src/qemu/qemu_driver.c: Use qemuDeviceDriveHostAlias() to determine the host backend alias for performing eject/change commands in the monitor
-
由 Daniel P. Berrange 提交于
The device_add command was added in JSON mode in a way I didn't expect. Instead of passing the normal device string to the JSON command: { "execute": "device_add", "arguments": { "device": "ne2k_pci,id=nic.1,netdev=net.1" } } We need to split up the device string into a full JSON object { "execute": "device_add", "arguments": { "driver": "ne2k_pci", "id": "nic.1", "netdev": "net.1" } } * src/qemu/qemu_conf.h, src/qemu/qemu_conf.c: Rename the qemuCommandLineParseKeywords method to qemuParseKeywords and export it to monitor * src/qemu/qemu_monitor_json.c: Split up device string into a JSON object for device_add command
-
由 Daniel P. Berrange 提交于
Instead of reporting VIR_ERR_INTERNAL_ERROR use the more specific VIR_ERR_CONFIG_UNSUPPORTED * src/qemu/qemu_conf.c: Report VIR_ERR_CONFIG_UNSUPPORTED for unsupported video adapters
-
- 15 4月, 2010 1 次提交
-
-
由 Stefan Berger 提交于
To avoid race-conditions, the tear down of a filter has to happen before the tap interface disappears and another tap interface with the same name can re-appear. This patch tries to fix this. In one place, where communication with the qemu monitor may fail, I am only tearing the filters down after knowing that the function did not fail. I am also moving the tear down functions into an include file for other drivers to reuse.
-
- 09 4月, 2010 1 次提交
-
-
由 David Allan 提交于
* Dan Kenigsberg requested explicit support for the qemu default disk error policy which is enospace
-
- 08 4月, 2010 2 次提交
-
-
由 Jiri Denemark 提交于
There's no sense in advertising cpuselection capability when host CPU is not properly detected and advertised in host capabilities.
-
由 Jiri Denemark 提交于
When qemu libvirt driver doesn't support guest CPU selection with given qemu binary, guests requiring specific CPU should fail to start instead of being silently supplied with a default CPU.
-
- 07 4月, 2010 1 次提交
-
-
由 Matthias Bolte 提交于
Also rename ReportError to macvtapError.
-
- 06 4月, 2010 1 次提交
-
-
由 Matthias Bolte 提交于
-
- 05 4月, 2010 1 次提交
-
-
由 Chris Lalancette 提交于
Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
- 02 4月, 2010 1 次提交
-
-
由 Laine Stump 提交于
The clock timer XML is being updated in the following ways (based on further off-list discussion that was missed during the initial implementation): 1) 'wallclock' is changed to 'track', and the possible values are 'boot' (corresponds to old 'host'), 'guest', and 'wall'. 2) 'mode' has an additional value 'smpsafe' 3) when tickpolicy='catchup', there can be an optional sub-element of timer called 'catchup': <catchup threshold=123 slew=120 limit=10000/> Those three values are all longs, always optional, and if they are present, they are positive. Internally, 0 indicates "unspecified". * docs/schemas/domain.rng: updated RNG definition to account for changes * src/conf/domain_conf.h: change the C struct and enums to match changes. * src/conf/domain_conf.c: timer parse and format functions changed to handle the new selections and new element. * src/libvirt_private.syms: *TimerWallclock* changes to *TimerTrack* * src/qemu/qemu_conf.c: again, account for Wallclock --> Track change.
-
- 31 3月, 2010 1 次提交
-
-
由 Eric Blake 提交于
virStrToLong* guarantees (via strtol) that the end pointer will be set to the point at which parsing stopped (even on failure, this point is the start of the input string). * src/esx/esx_driver.c (esxGetVersion): Remove pointless conditional. * src/qemu/qemu_conf.c (qemuParseCommandLinePCI) (qemuParseCommandLineUSB, qemuParseCommandLineSmp): Likewise. * src/qemu/qemu_monitor_text.c (qemuMonitorTextGetMigrationStatus): Likewise.
-
- 30 3月, 2010 2 次提交
-
-
由 Laine Stump 提交于
Since the timers are defined to cover all possible config cases for several different hypervisors, many of these possibilities generate an error on qemu. Here is what is currently supported: RTC: If the -rtc commandline option is available, allow setting "clock=host" or "clock=vm" based on the rtc timer clock='host|guest' value. Also add "driftfix=slew" if the tickpolicy is 'catchup', or add nothing if tickpolicy is 'delay'. (Other tickpolicies will raise an error). If -rtc isn't available, but -rtc-td-hack is, add that option if the tickpolicy is 'catchup', add -rtc-td-hack, if it is 'delay' add nothing, and if it's anything else, raise an error. PIT: If -no-kvm-pit-reinjection is available, and tickpolicy is 'delay', add that option. if tickpolicy is 'catchup', do nothing. Anything else --> raise an error. If -no-kvm-pit-reinjection *isn't* available, but -tdf is, when tickpolicy is 'catchup' add -tdf. If it's 'delay', do nothing. Anything else --> raise an error. If neither of those commandline options is available, and tickpolicy is anything other than 'delay' (or unspecified), raise an error. HPET: If -no-hpet flag is available and present='no', add -no-hpet. If -no-hpet is not available, and present='yes', raise an error. If present is unspecified, the default is to do whatever this particular qemu does by default, so don't raise an error. All other timer types are unsupported by QEMU, so they will raise an error. * src/qemu/qemu_conf.c: extend qemuBuildClockArgStr() to generate the command line arguments for the new options
-
由 Laine Stump 提交于
* src/qemu/qemu_conf.h: define 4 new flags * src/qemu/qemu_conf.c: check the help text of qemu for presence of features indicated by each flag. * tests/qemuhelptest.c: add appropriate flags into the masks for each test
-
- 27 3月, 2010 3 次提交
-
-
由 David Allan 提交于
* Fixes per feedback from Dan and Daniel * Added test datafiles * Re-disabled JSON flags * Added code to print the error policy attribute when generating XML * Re-add empty tag
-
由 Stefan Berger 提交于
Add support for Qemu to have firewall rules applied and removed on VM startup and shutdown respectively. This patch also provides support for the updating of a filter that causes all VMs that reference the filter to have their ebtables/iptables rules updated. Signed-off-by: NStefan Berger <stefanb@us.ibm.com>
-
由 Stefan Berger 提交于
To find out where the net type 'direct' needs to be handled I introduced the 'enum virDomainNetType' in the virDomainNetDef structure and let the compiler tell me where the case statement is missing. Then I added the unhandled device statement to the UML driver. * src/conf/domain_conf.h: change _virDomainNetDef type from int to virDomainNetType enum * src/conf/domain_conf.c src/lxc/lxc_driver.c src/qemu/qemu_conf.c src/uml/uml_conf.c: make sure all enum cases are properly handled in switches
-
- 23 3月, 2010 1 次提交
-
-
由 Jim Meyering 提交于
Before, this function would blindly accept an invalid def->dst and then abuse the idx=-1 it would get from virDiskNameToIndex, when passing it invalid strings like "xvda:disk" and "sda1". Now, this function returns -1 upon failure. * src/conf/domain_conf.c (virDomainDiskDefAssignAddress): as above. Update callers. * src/conf/domain_conf.h: Update prototype. * src/qemu/qemu_conf.c: Update callers.
-
- 19 3月, 2010 1 次提交
-
-
由 Laine Stump 提交于
Attempt to turn on vhost-net mode for devices of type NETWORK, BRIDGE, and DIRECT (macvtap). * src/qemu/qemu_conf.h: add vhostfd to qemuBuildHostNetStr prototype add qemudOpenVhostNet prototype new flag to set when :,vhost=" found in qemu help * src/qemu/qemu_conf.c: * set QEMUD_CMD_FLAG_VNET_HOST is ",vhost=" found in qemu help - qemudOpenVhostNet - opens /dev/vhost-net to pass to qemu if everything is in place to use it. - qemuBuildHostNetStr - add vhostfd to commandline if it's not empty (higher levels decide whether or not to fill it in) - qemudBuildCommandLine - if /dev/vhost-net is successfully opened, add its fd to tapfds array so it isn't closed on qemu exec, and populate vhostfd_name to be passed in to commandline builder. * src/qemu/qemu_driver.c: add filler 0 for new arg to qemuBuildHostNetStr, along with a note that this must be implemented in order for hot-plug of vhost-net virtio devices to work properly (once qemu "netdev_add" monitor command is implemented).
-
- 16 3月, 2010 1 次提交
-
-
由 Daniel Veillard 提交于
* src/qemu/qemu_conf.c: add the ",readonly=on" for read-only disks and also parse it back in qemuParseCommandLineDisk() * tests/qemuxml2argvtest.c tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-disk.args tests/qemuxml2argvdata/qemuxml2argv-disk-drive-readonly-disk.xml: add a specific regression test
-
- 09 3月, 2010 1 次提交
-
-
由 Laine Stump 提交于
A few more non-literal format strings in error log messages have crept in. Fix them in the standard way - turn the format string into "%s" with the original string as the arg.
-
- 02 3月, 2010 3 次提交
-
-
由 Rolf Eike Beer 提交于
A number of the error messages raised when parsing USB devices refered to PCI devices by mistake * src/qemu/qemu_conf.c: s/PCI/USB/ in qemuParseCommandLineUSB()
-
由 Daniel P. Berrange 提交于
Allow an arbitrary timezone with QEMU by setting the $TZ environment variable when launching QEMU * src/qemu/qemu_conf.c: Set TZ environment variable if a timezone is requested * tests/qemuxml2argvtest.c: Add test case for timezones * tests/qemuxml2argvdata/qemuxml2argv-clock-france.xml, tests/qemuxml2argvdata/qemuxml2argv-clock-france.args: Data for timezone tests
-
由 Daniel P. Berrange 提交于
This allows QEMU guests to be started with an arbitrary clock offset The test case can't actually be enabled, since QEMU argv expects an absolute timestring, and this will obviously change every time the test runs :-( Hopefully QEMU will allow a relative time offset in the future. * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Use the -rtc arg if available to support variable clock offset mode * tests/qemuhelptest.c: Add QEMUD_CMD_FLAG_RTC for qemu 0.12.1 * qemuxml2argvdata/qemuxml2argv-clock-variable.args, qemuxml2argvdata/qemuxml2argv-clock-variable.xml, qemuxml2argvtest.c: Test case, except we can't actually enable it yet.
-