- 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>
-
- 18 5月, 2010 1 次提交
-
-
由 Eric Blake 提交于
(gdb) p/x QEMUD_CMD_FLAG_VNET_HOST $7 = 0xffffffff80000000 Oops - that meant we were incorrectly setting QEMU_CMD_FLAG_RTC_TD_HACK for qemu-kvm-0.12.3 (and probably botching a few other settings as well). Fixes Red Hat BZ#592070 * src/qemu/qemu_conf.h (QEMUD_CMD_FLAG_VNET_HOST): Avoid sign extension. * tests/qemuhelpdata/qemu-kvm-0.12.3: New file. * tests/qemuhelptest.c (mymain): Add another case.
-
- 16 4月, 2010 2 次提交
-
-
由 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
-
- 05 4月, 2010 1 次提交
-
-
由 Chris Lalancette 提交于
Signed-off-by: NChris Lalancette <clalance@redhat.com>
-
- 04 4月, 2010 1 次提交
-
-
由 Daniel Veillard 提交于
The images are saved in /var/lib/libvirt/qemu/save/ and named $domainname.save . The directory is created appropriately at daemon startup. When a domain is started while a saved image is available, libvirt will try to load this saved image, and start the domain as usual in case of failure. In any case the saved image is discarded once the domain is created. * src/qemu/qemu_conf.h: adds an extra save path to the driver config * src/qemu/qemu_driver.c: implement the 3 new operations and handling of the image directory
-
- 30 3月, 2010 1 次提交
-
-
由 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
-
- 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).
-
- 10 3月, 2010 1 次提交
-
-
由 Eric Blake 提交于
* global: patch created by running: for f in $(git ls-files '*.[ch]') ; do cppi $f > $f.t && mv $f.t $f done
-
- 08 3月, 2010 1 次提交
-
-
由 Eric Blake 提交于
Prior to this patch, there was an inconsistent mix between GNU and C99. For consistency, and potential portability to other compilers, stick with the C99 vararg macro syntax. * src/conf/cpu_conf.c (virCPUReportError): Use C99 rather than GNU vararg macro syntax. * src/conf/domain_conf.c (virDomainReportError): Likewise. * src/conf/domain_event.c (eventReportError): Likewise. * src/conf/interface_conf.c (virInterfaceReportError): Likewise. * src/conf/network_conf.c (virNetworkReportError): Likewise. * src/conf/node_device_conf.h (virNodeDeviceReportError): Likewise. * src/conf/secret_conf.h (virSecretReportError): Likewise. * src/conf/storage_conf.h (virStorageReportError): Likewise. * src/esx/esx_device_monitor.c (ESX_ERROR): Use C99 rather than GNU vararg macro syntax. * src/esx/esx_driver.c (ESX_ERROR): Likewise. * src/esx/esx_interface_driver.c (ESX_ERROR): Likewise. * src/esx/esx_network_driver.c (ESX_ERROR): Likewise. * src/esx/esx_secret_driver.c (ESX_ERROR): Likewise. * src/esx/esx_storage_driver.c (ESX_ERROR): Likewise. * src/esx/esx_util.c (ESX_ERROR): Likewise. * src/esx/esx_vi.c (ESX_VI_ERROR): Likewise. * src/esx/esx_vi_methods.c (ESX_VI_ERROR): Likewise. * src/esx/esx_vi_types.c (ESX_VI_ERROR): Likewise. * src/esx/esx_vmx.c (ESX_ERROR): Likewise. * src/util/hostusb.c (usbReportError): Use C99 rather than GNU vararg macro syntax. * src/util/json.c (virJSONError): Likewise. * src/util/macvtap.c (ReportError): Likewise. * src/util/pci.c (pciReportError): Likewise. * src/util/stats_linux.c (virStatsError): Likewise. * src/util/util.c (virUtilError): Likewise. * src/util/xml.c (virXMLError): Likewise. * src/xen/proxy_internal.c (virProxyError): Use C99 rather than GNU vararg macro syntax. * src/xen/sexpr.c (virSexprError): Likewise. * src/xen/xen_driver.c (xenUnifiedError): Likewise. * src/xen/xen_hypervisor.c (virXenError): Likewise. * src/xen/xen_inotify.c (virXenInotifyError): Likewise. * src/xen/xend_internal.c (virXendError): Likewise. * src/xen/xm_internal.c (xenXMError): Likewise. * src/xen/xs_internal.c (virXenStoreError): Likewise. * src/cpu/cpu.h (virCPUReportError): Use C99 rather than GNU vararg macro syntax. * src/datatypes.c (virLibConnError): Likewise. * src/interface/netcf_driver.c (interfaceReportError): Likewise. * src/libvirt.c (virLibStreamError): Likewise. * src/lxc/lxc_conf.h (lxcError): Likewise. * src/network/bridge_driver.c (networkReportError): Likewise. * src/nodeinfo.c (nodeReportError): Likewise. * src/opennebula/one_conf.h (oneError): Likewise. * src/openvz/openvz_conf.h (openvzError): Likewise. * src/phyp/phyp_driver.c (PHYP_ERROR): Likewise. * src/qemu/qemu_conf.h (qemuReportError): Likewise. * src/remote/remote_driver.c (errorf): Likewise. * src/security/security_driver.h (virSecurityReportError): Likewise. * src/test/test_driver.c (testError): Likewise. * src/uml/uml_conf.h (umlReportError): Likewise. * src/vbox/vbox_driver.c (vboxError): Likewise. * src/vbox/vbox_tmpl.c (vboxError): Likewise.
-
- 02 3月, 2010 1 次提交
-
-
由 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.
-
- 26 2月, 2010 1 次提交
-
-
由 Cole Robinson 提交于
-
- 19 2月, 2010 3 次提交
-
-
由 Stefan Berger 提交于
This patch adds the mac_filter support to the macvtap device.
-
由 Stefan Berger 提交于
This patch sets or unsets the IFF_VNET_HDR flag depending on what device is used in the VM. The manipulation of the flag is done in the open function and is only fatal if the IFF_VNET_HDR flag could not be cleared although it has to be (or if an ioctl generally fails). In that case the macvtap tap is closed again and the macvtap interface torn. * src/qemu/qemu_conf.c src/qemu/qemu_conf.h: pass qemuCmdFlags to qemudPhysIfaceConnect() * src/util/macvtap.c src/util/macvtap.h: add vnet_hdr boolean to openMacvtapTap(), and private function configMacvtapTap() * src/qemu/qemu_driver.c: add extra qemuCmdFlags when calling qemudPhysIfaceConnect()
-
由 Matthew Booth 提交于
Support virtio-serial controller and virtio channel in QEMU backend. Will output the following for virtio-serial controller: -device virtio-serial-pci,id=virtio-serial0,bus=pci.0,addr=0x4,max_ports=16,vectors=4 and the following for a virtio channel: -chardev pty,id=channel0 \ -device virtserialport,bus=virtio-serial0.0,chardev=channel0,name=org.linux-kvm.port.0 * src/qemu/qemu_conf.c: Add argument output for virtio * tests/qemuxml2argvtest.c tests/qemuxml2argvdata/qemuxml2argv-channel-virtio.args: Add test for QEMU command line generation
-
- 16 2月, 2010 1 次提交
-
-
由 Stefan Berger 提交于
This part adds support for qemu making a macvtap tap device available via file descriptor passed to qemu command line. This also attempts to tear down the macvtap device when a VM terminates. This includes support for attachment and detachment to/from running VM. * src/qemu/qemu_conf.[ch] src/qemu/qemu_driver.c: add support in the QEmu driver
-
- 11 2月, 2010 1 次提交
-
-
由 Daniel P. Berrange 提交于
With QEMU >= 0.12 the host and guest side of disks no longer have the same naming convention. Specifically the host side will now get a 'drive-' prefix added to its name. The 'info blockstats' monitor command returns the host side name, so it is neccessary to strip this off when looking up stats since libvirt stores the guest side name ! * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Move 'drive-' prefix string to a defined constant * src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_text.c: Strip off 'drive-' prefix (if found) when looking up disk stats
-
- 10 2月, 2010 3 次提交
-
-
由 Daniel P. Berrange 提交于
Use the ATTRIBUTE_NONNULL annotation to mark some virConnectPtr args as mandatory non-null so the compiler can warn of mistakes * src/conf/domain_event.h: All virConnectPtr args must be non-null * src/qemu/qemu_conf.h: qemudBuildCommandLine and qemudNetworkIfaceConnect() must be given non-null connection * tests/qemuxml2argvtest.c: Provide a non-null (dummy) connection to qemudBuildCommandLine()
-
由 Daniel P. Berrange 提交于
The QEMU flags are commonly stored as a signed or unsigned int, allowing only 31 flags. This limit is rather close, so to aid future patches, change it to a 64-bit int * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h, src/qemu/qemu_driver.c, tests/qemuargv2xmltest.c, tests/qemuhelptest.c, tests/qemuxml2argvtest.c: Use 'unsigned long long' for QEMU flags
-
由 Daniel P. Berrange 提交于
-
- 09 2月, 2010 1 次提交
-
-
由 Matthias Bolte 提交于
-
- 03 2月, 2010 6 次提交
-
-
由 Daniel P. Berrange 提交于
To allow devices to be hot(un-)plugged it is neccessary to ensure they all have a unique device aliases. This fixes the hotplug methods to assign device aliases before invoking the monitor commands which need them * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Expose methods for assigning device aliases for disks, host devices and controllers * src/qemu/qemu_driver.c: Assign device aliases when hotplugging all types of device * tests/qemuxml2argvdata/qemuxml2argv-hostdev-pci-address-device.args, tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-address-device.args: Update for changed hostdev naming scheme
-
由 Daniel P. Berrange 提交于
This patch re-arranges the QEMU device alias assignment code to make it easier to call into the same codeblock when performing device hotplug. The new code has the ability to skip over already assigned names to facilitate hotplug * src/qemu/qemu_driver.c: Call qemuAssignDeviceNetAlias() instead of qemuAssignNetNames * src/qemu/qemu_conf.h: Export qemuAssignDeviceNetAlias() instead of qemuAssignNetNames * src/qemu/qemu_driver.c: Merge the legacy disk/network alias assignment code into the main methods
-
由 Daniel P. Berrange 提交于
The current way of assigning names to the host network backend and NIC device in QEMU was over complicated, by varying naming scheme based on the NIC model and backend type. This simplifies the naming to simply be 'net0' and 'hostnet0', allowing code to easily determine the host network name and vlan based off the primary device alias name 'net0'. This in turn allows removal of alot of QEMU specific code from the XML parser, and makes it easier to assign new unique names for NICs that are hotplugged * src/conf/domain_conf.c, src/conf/domain_conf.h: Remove hostnet_name and vlan fields from virNetworkDefPtr * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h, src/qemu/qemu_driver.c: Use a single network alias naming scheme regardless of NIC type or backend type. Determine VLANs from the alias name. * tests/qemuxml2argvdata/qemuxml2argv-net-eth-names.args, tests/qemuxml2argvdata/qemuxml2argv-net-virtio-device.args, tests/qemuxml2argvdata/qemuxml2argv-net-virtio-netdev.args: Update for new simpler naming scheme
-
由 Daniel P. Berrange 提交于
The QEMU 0.12.x tree has the -netdev command line argument, but not corresponding monitor command. We can't enable the former, without the latter since it will break hotplug/unplug. * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Disable -netdev usage until 0.13 at earliest * tests/qemuxml2argvtest.c: Add test for -netdev syntax * tests/qemuxml2argvdata/qemuxml2argv-net-virtio-netdev.args, tests/qemuxml2argvdata/qemuxml2argv-net-virtio-netdev.xml: Test data files for -netdev syntax
-
由 Daniel P. Berrange 提交于
PCI disk, disk controllers, net devices and host devices need to have PCI addresses assigned before they are hot-plugged * src/qemu/qemu_conf.c: Add APIs for ensuring a device has an address and releasing unused addresses * src/qemu/qemu_driver.c: Ensure all devices have addresses when hotplugging.
-
由 Daniel P. Berrange 提交于
The current QEMU code allocates PCI addresses incrementally starting at 4. This is not satisfactory because the user may have given some addresses in their XML config, which need to be skipped over when allocating addresses to remaining devices. It is thus neccessary to maintain a list of already allocated PCI addresses and then only allocate ones that remain unused. This is also required for domain device hotplug to work properly later. * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Add APIs for creating list of existing PCI addresses, and allocating new addresses. Refactor address assignment to use this code * src/qemu/qemu_driver.c: Pull PCI address assignment up into the qemuStartVMDaemon() method, as a prelude to moving it into the 'define' method. Update list of allocated addresses when connecting to a running VM at daemon startup. * tests/qemuxml2argvtest.c, tests/qemuargv2xmltest.c, tests/qemuxml2xmltest.c: Remove USB product test since all passthrough is done based on address * tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-product.args, tests/qemuxml2argvdata/qemuxml2argv-hostdev-usb-product.xml: Kil unused data files
-
- 02 2月, 2010 2 次提交
-
-
由 Daniel P. Berrange 提交于
To allow for better code reuse from hotplug methods, the code for generating PCI/USB hostdev arg values is split out into separate methods * qemu/qemu_conf.h, qemu/qemu_conf.c: Introduce new APis for qemuBuildPCIHostdevPCIDevStr, qemuBuildUSBHostdevUsbDevStr and qemuBuildUSBHostdevDevStr
-
由 Daniel P. Berrange 提交于
All the helper functions for building command line arguments now return a 'char *', instead of acepting a 'char **' or virBufferPtr argument * qemu/qemu_conf.c: Standardize syntax for building args * qemu/qemu_conf.h: Export all functions for building args * qemu/qemu_driver.c: Update for changed syntax for building NIC/hostnet args
-
- 21 1月, 2010 2 次提交
-
-
由 Daniel P. Berrange 提交于
This new security driver is responsible for managing UID/GID changes to the QEMU process, and any files/disks/devices assigned to it. * qemu/qemu_conf.h: Add flag for disabling automatic file permission changes * qemu/qemu_security_dac.h, qemu/qemu_security_dac.c: New DAC driver for QEMU guests * Makefile.am: Add new files
-
由 Daniel P. Berrange 提交于
* qemu/qemu_conf.h: Add securityPrimaryDriver and securitySecondaryDriver fields to 'struct qemud_driver' * Makefile.am: Add new files * qemu/qemu_security_stacked.c, qemu/qemu_security_stacked.h: A simple stacked security driver
-
- 20 1月, 2010 1 次提交
-
-
由 Jiri Denemark 提交于
Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 19 1月, 2010 1 次提交
-
-
由 Jiri Denemark 提交于
QEMU's command line equivalent for the following domain XML fragment <vcpus>2</vcpus> <cpu ...> ... <topology sockets='1' cores='2', threads='1'/> </cpu> is -smp 2,sockets=1,cores=2,threads=1 This syntax was introduced in QEMU-0.12. Version 2 changes: - -smp argument build split into a separate function - always add ",sockets=S,cores=C,threads=T" to -smp if qemu supports it - use qemuParseCommandLineKeywords for command line parsing Version 3 changes: - ADD_ARG_LIT => ADD_ARG and line reordering in qemudBuildCommandLine - rebased Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
-
- 18 1月, 2010 2 次提交
-
-
由 Daniel P. Berrange 提交于
Not all QEMU builds default to SDL graphics for their display. Newer QEMU now has an explicit -sdl flag, which we can use to explicitly request SDL intead of relying on the default. This protects libvirt against unexpected changes in graphics default * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Probe for -sdl flag and use it if it is found * tests/qemuhelptest.c: Add SDL flag to tests
-
由 Daniel P. Berrange 提交于
Probe for the new -device flag and if available set the -nodefaults flag, instead of using -net none, -serial none or -parallel none. Other device types will be converted to use -device in later patches. The -nodefaults flag will help avoid unwelcome surprises from future QEMU releases * src/qemu/qemu_conf.c: Probe for -device. Add -nodefaults flag. Remove -net none, -serial none or -parallel none * src/qemu/qemu_conf.h: Define QEMU_CMD_FLAG_DEVICE * tests/qemuhelpdata/qemu-0.12.1: New data file for 0.12.1 QEMU * tests/qemuhelptest.c: Test feature extraction from 0.12.1 QEMU
-
- 16 1月, 2010 1 次提交
-
-
由 Daniel P. Berrange 提交于
To enable it to be called from multiple locations, split out the code for building the -drive arg string. This will be needed by later patches which do drive hotplug, the conversion to use -device, and the conversion to controller/bus/unit addressing * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Add qemuBuildDriveStr for building -drive arg string
-
- 07 1月, 2010 1 次提交
-
-
由 Adam Litke 提交于
The behavior for the qemu balloon device has changed. Formerly, a virtio balloon device was provided by default. Now, '-balloon virtio' must be specified on the command line to enable it. This patch causes libvirt to add '-balloon virtio' to the command line whenever the -balloon option is available. * src/qemu/qemu_conf.c src/qemu/qemu_conf.h: check for the new flag and add "-baloon vitio" to qemu command when needed * tests/qemuhelptest.c: add the new flag for detection
-
- 22 12月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
* src/qemu/qemu_conf.h: Remove QEMU_CMD_FLAG_0_12 and just leave the lone JSON flag * src/qemu/qemu_conf.c: Enable JSON on QEMU 0.13 or later, but leave it disabled for now
-
- 18 12月, 2009 1 次提交
-
-
由 Jiri Denemark 提交于
* src/qemu/qemu_conf.c src/qemu/qemu_conf.h src/qemu/qemu_driver.c: add the new entry point, extend capabilities and code to interract with qemu
-
- 08 12月, 2009 1 次提交
-
-
由 Daniel P. Berrange 提交于
Initial support for the new QEMU monitor protocol using JSON as the data encoding format instead of plain text * po/POTFILES.in: Add src/qemu/qemu_monitor_json.c * src/qemu/qemu_conf.c, src/qemu/qemu_conf.h: Hack to turn on QMP mode. Replace with a version number check on >= 0.12 later * src/qemu/qemu_monitor.c: Delegate to json monitor if enabled * src/qemu/qemu_monitor_json.c, src/qemu/qemu_monitor_json.h: Add impl of QMP protocol * src/Makefile.am: Add src/qemu/qemu_monitor_json.{c,h}
-