- 24 2月, 2011 3 次提交
-
-
由 Jiri Denemark 提交于
This is done for two reasons: - we are getting very close to 64 flags which is the maximum we can use with unsigned long long - by using LL constants in enum we already violates C99 constraint that enum values have to fit into int
-
由 Jiri Denemark 提交于
Three new functions (qemuCapsSet, qemuCapsClear, and qemuCapsGet) were introduced replacing direct bit operations.
-
由 Jiri Denemark 提交于
The new names comply more with the fact that they are all members of enum qemuCapsFlags.
-
- 22 2月, 2011 5 次提交
-
-
由 Markus Groß 提交于
-
由 Markus Groß 提交于
-
由 Markus Groß 提交于
-
由 Markus Groß 提交于
-
由 Markus Groß 提交于
-
- 18 2月, 2011 2 次提交
-
-
由 Laine Stump 提交于
This fixes https://bugzilla.redhat.com/show_bug.cgi?id=609463 The problem was that, since a bridge always acquires the MAC address of the connected interface with the numerically lowest MAC, as guests are started and stopped, it was possible for the MAC address to change over time, and this change in the network was being detected by Windows 7 (it sees the MAC of the default route change), so on each reboot it would bring up a dialog box asking about this "new network". The solution is to create a dummy tap interface with a MAC guaranteed to be lower than any guest interface's MAC, and attach that tap to the bridge as soon as it's created. Since all guest MAC addresses start with 0xFE, we can just generate a MAC with the standard "0x52, 0x54, 0" prefix, and it's guaranteed to always win (physical interfaces are never connected to these bridges, so we don't need to worry about competing numerically with them). Note that the dummy tap is never set to IFF_UP state - that's not necessary in order for the bridge to take its MAC, and not setting it to UP eliminates the clutter of having an (eg) "virbr0-nic" displayed in the output of the ifconfig command. I chose to not auto-generate the MAC address in the network XML parser, as there are likely to be consumers of that API that don't need or want to have a MAC address associated with the bridge. Instead, in bridge_driver.c when the network is being defined, if there is no MAC, one is generated. To account for virtual network configs that already exist when upgrading from an older version of libvirt, I've added a %post script to the specfile that searches for all network definitions in both the config directory (/etc/libvirt/qemu/networks) and the state directory (/var/lib/libvirt/network) that are missing a mac address, generates a random address, and adds it to the config (and a matching address to the state file, if there is one). docs/formatnetwork.html.in: document <mac address.../> docs/schemas/network.rng: add nac address to schema libvirt.spec.in: %post script to update existing networks src/conf/network_conf.[ch]: parse and format <mac address.../> src/libvirt_private.syms: export a couple private symbols we need src/network/bridge_driver.c: auto-generate mac address when needed, create dummy interface if mac address is present. tests/networkxml2xmlin/isolated-network.xml tests/networkxml2xmlin/routed-network.xml tests/networkxml2xmlout/isolated-network.xml tests/networkxml2xmlout/routed-network.xml: add mac address to some tests
-
由 Laine Stump 提交于
This is in response to: https://bugzilla.redhat.com/show_bug.cgi?id=629662 Explanation qemu's virtio-net-pci driver allows setting the algorithm used for tx packets to either "bh" or "timer". This is done by adding ",tx=bh" or ",tx=timer" to the "-device virtio-net-pci" commandline option. 'bh' stands for 'bottom half'; when this is set, packet tx is all done in an iothread in the bottom half of the driver. (In libvirt, this option is called the more descriptive "iothread".) 'timer' means that tx work is done in qemu, and if there is more tx data than can be sent at the present time, a timer is set before qemu moves on to do other things; when the timer fires, another attempt is made to send more data. (libvirt retains the name "timer" for this option.) The resulting difference, according to the qemu developer who added the option is: bh makes tx more asynchronous and reduces latency, but potentially causes more processor bandwidth contention since the cpu doing the tx isn't necessarily the cpu where the guest generated the packets. Solution This patch provides a libvirt domain xml knob to change the option on the qemu commandline, by adding a new attribute "txmode" to the <driver> element that can be placed inside any <interface> element in a domain definition. It's use would be something like this: <interface ...> ... <model type='virtio'/> <driver txmode='iothread'/> ... </interface> I chose to put this setting as an attribute to <driver> rather than as a sub-element to <tune> because it is specific to the virtio-net driver, not something that is generally usable by all network drivers. (note that this is the same placement as the "driver name=..." attribute used to choose kernel vs. userland backend for the virtio-net driver.) Actually adding the tx=xxx option to the qemu commandline is only done if the version of qemu being used advertises it in the output of qemu -device virtio-net-pci,? If a particular txmode is requested in the XML, and the option isn't listed in that help output, an UNSUPPORTED_CONFIG error is logged, and the domain fails to start.
-
- 16 2月, 2011 1 次提交
-
-
由 Jiri Denemark 提交于
Since we fake host CPU we should also fake host arch instead of taking the real architecture tests are running on.
-
- 11 2月, 2011 1 次提交
-
-
由 Wen Congyang 提交于
QEMUD_CMD_FLAG_PCI_MULTIBUS should be set in the function qemuCapsExtractVersionInfo() The flag QEMUD_CMD_FLAG_PCI_MULTIBUS is used in the function qemuBuildDeviceAddressStr(). All callers get qemuCmdFlags by the function qemuCapsExtractVersionInfo() except that testCompareXMLToArgvFiles() in qemuxml2argvtest.c. So we should set QEMUD_CMD_FLAG_PCI_MULTIBUS in the function qemuCapsExtractVersionInfo() instead of qemuBuildCommandLine() because the function qemuBuildCommandLine() does not be called when we attach a pci device. tests: set QEMUD_CMD_FLAG_PCI_MULTIBUS in testCompareXMLToArgvFiles() set QEMUD_CMD_FLAG_PCI_MULTIBUS before calling qemuBuildCommandLine() as the flags is not set by qemuCapsExtractVersionInfo(). Signed-off-by: NWen Congyang <wency@cn.fujitsu.com>
-
- 09 2月, 2011 1 次提交
-
-
由 Gui Jianfeng 提交于
Implement blkio tunable XML configuration and parsing. Reviewed-by: N"Nikunj A. Dadhania" <nikunj@linux.vnet.ibm.com> Signed-off-by: NGui Jianfeng <guijianfeng@cn.fujitsu.com>
-
- 05 2月, 2011 2 次提交
-
-
由 Eric Blake 提交于
qemu 0.13.0 (at least as built for Fedora 14, and also backported to RHEL 6.0 qemu) supported an older syntax for a spicevmc channel; it's not as flexible (it has an implicit name and hides the chardev aspect), but now that we support spicevmc, we might as well target both variants. * src/qemu/qemu_capabilities.h (QEMUD_CMD_FLAG_DEVICE_SPICEVMC): New flag. * src/qemu/qemu_capabilities.c (qemuCapsParseDeviceStr): Set it correctly. * src/qemu/qemu_command.h (qemuBuildVirtioSerialPortDevStr): Drop declaration. * src/qemu/qemu_command.c (qemuBuildVirtioSerialPortDevStr): Alter signature, check flag. (qemuBuildCommandLine): Adjust caller and check flag. * tests/qemuhelptest.c (mymain): Update test. * tests/qemuxml2argvtest.c (mymain): New test. * tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc-old.xml: New file. * tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc-old.args: Likewise.
-
由 Eric Blake 提交于
Adds <smartcard mode='passthrough' type='spicevmc'/>, which uses the new <channel name='smartcard'/> of <graphics type='spice'>. * docs/schemas/domain.rng: Support new XML. * docs/formatdomain.html.in: Document it. * src/conf/domain_conf.h (virDomainGraphicsSpiceChannelName): New enum value. (virDomainChrSpicevmcName): New enum. (virDomainChrSourceDef): Distinguish spicevmc types. * src/conf/domain_conf.c (virDomainGraphicsSpiceChannelName): Add smartcard. (virDomainSmartcardDefParseXML): Parse it. (virDomainChrDefParseXML, virDomainSmartcardDefParseXML): Set spicevmc name. (virDomainChrSpicevmc): New enum conversion functions. * src/libvirt_private.syms: Export new functions. * src/qemu/qemu_command.c (qemuBuildChrChardevStr): Conditionalize name. * tests/qemuxml2argvtest.c (domain): New test. * tests/qemuxml2argvdata/qemuxml2argv-smartcard-passthrough-spicevmc.args: New file. * tests/qemuxml2argvdata/qemuxml2argv-smartcard-passthrough-spicevmc.xml: Likewise.
-
- 04 2月, 2011 4 次提交
-
-
由 Daniel P. Berrange 提交于
Inspired by https://bugzilla.redhat.com/show_bug.cgi?id=615757 Add a new character device backend for virtio serial channels that activates the QEMU spice agent on the main channel using the vdagent spicevmc connection. The <target> must be type='virtio', and supports an optional name that specifies how the guest will see the channel (for now, name must be com.redhat.spice.0). <channel type='spicevmc'> <target type='virtio'/> <address type='virtio-serial' controller='1' bus='0' port='3'/> </channel> * docs/schemas/domain.rng: Support new XML. * docs/formatdomain.html.in: Document it. * src/conf/domain_conf.h (virDomainChrType): New enum value. * src/conf/domain_conf.c (virDomainChr): Add spicevmc. (virDomainChrDefParseXML, virDomainChrSourceDefParseXML) (virDomainChrDefParseTargetXML): Parse and enforce proper use. (virDomainChrSourceDefFormat, virDomainChrDefFormat): Format. * src/qemu/qemu_command.c (qemuBuildChrChardevStr) (qemuBuildCommandLine): Add qemu support. * tests/qemuxml2argvtest.c (domain): New test. * tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc.xml: New file. * tests/qemuxml2argvdata/qemuxml2argv-channel-spicevmc.args: Likewise. Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Eric Blake 提交于
* src/qemu/qemu_command.c (qemuBuildCommandLine): Emit smartcard options. (qemuAssignDeviceAliases): Assign an alias for smartcards. (qemuBuildControllerDevStr): Manage the usb-ccid controller. * tests/qemuxml2argvtest.c (mymain): Add new tests. * tests/qemuxml2argvdata/qemuxml2argv-smartcard-host.args: New file. * tests/qemuxml2argvdata/qemuxml2argv-smartcard-host-certificates.args: Likewise. * tests/qemuxml2argvdata/qemuxml2argv-smartcard-passthrough.args: Likewise. * tests/qemuxml2argvdata/qemuxml2argv-smartcard-controller.args: Likewise.
-
由 Eric Blake 提交于
Qemu smartcard/spicevmc support exists on branches (such as http://cgit.freedesktop.org/~alon/qemu/commit/?h=usb_ccid.v15&id=024a37b) but is not yet upstream. The added -help output matches a scratch build that will be close to the RHEL 6.1 qemu-kvm. * src/qemu/qemu_capabilities.h (QEMUD_CMD_FLAG_CCID_EMULATED) (QEMUD_CMD_FLAG_CCID_PASSTHRU, QEMUD_CMD_FLAG_CHARDEV_SPICEVMC): New flags. * src/qemu/qemu_capabilities.c (qemuCapsComputeCmdFlags) (qemuCapsParseDeviceStr): Check for smartcard capabilities. (qemuCapsExtractVersionInfo): Tweak comment. * tests/qemuhelptest.c (mymain): New test. * tests/qemuhelpdata/qemu-kvm-0.12.1.2-rhel61: New file. * tests/qemuhelpdata/qemu-kvm-0.12.1.2-rhel61-device: Likewise.
-
由 Eric Blake 提交于
Assuming a hypervisor that supports multiple smartcard devices in the guest, this would be a valid XML description: <devices> <smartcard mode='host'/> <smartcard mode='host-certificates'> <certificate>/path/to/cert1</certificate> <certificate>/path/to/cert2</certificate> <certificate>/path/to/cert3</certificate> </smartcard> <smartcard mode='passthrough' type='tcp'> <source mode='bind' host='127.0.0.1' service='2001'/> <protocol type='raw'/> </smartcard> </devices> (As of this commit, the qemu hypervisor will be the first implementation, but it only supports one smartcard.) * docs/formatdomain.html.in (Smartcard devices): New section. * docs/schemas/domain.rng (smartcard): New define, used in devices. * tests/qemuxml2argvdata/qemuxml2argv-smartcard-host.xml: New file to test schema. * tests/qemuxml2argvdata/qemuxml2argv-smartcard-host-certificates.xml: Likewise. * tests/qemuxml2argvdata/qemuxml2argv-smartcard-passthrough-tcp.xml: Likewise. * tests/qemuxml2argvdata/qemuxml2argv-smartcard-controller.xml: Likewise.
-
- 01 2月, 2011 1 次提交
-
-
由 Juerg Haefliger 提交于
This patch teaches testutil how to read multi-line input files with backspace-newline line continuation markers. The patch also breaks up all the single-line arguments test input files into multi-line files with lines shorter than 80 characters.
-
- 30 1月, 2011 1 次提交
-
-
由 Eric Blake 提交于
* src/fdstream.c (virFDStreamOpenFile, virFDStreamCreateFile): Use VIR_FORCE_CLOSE instead of close. * tests/commandtest.c (mymain): Likewise. * tools/virsh.c (editFile): Use virCommand instead of system. * src/util/util.c (__virExec): Special case preservation of std file descriptors to child.
-
- 29 1月, 2011 3 次提交
-
-
由 Matthias Bolte 提交于
Use it in all places where a memory or storage request size is converted to a larger granularity. This avoids requesting too small memory or storage sizes that could result from the truncation done by a simple division. This extends the round up fix in 6002e040 to the whole codebase. Instead of reporting errors for odd values in the VMX code round them up. Update the QEMU Argv tests accordingly as the original memory size 219200 isn't a even multiple of 1024 and is rounded up to 215 megabyte now. Change it to 219100 and 219136. Use two different values intentionally to make sure that rounding up works. Update virsh.pod accordingly, as rounding down and rejecting are replaced by rounding up.
-
由 Eric Blake 提交于
qemu allows the user to choose what io storage api should be used, either the default (threads) or native (linux aio) which in the latter case can result in better performance. Based on a patch originally by Matthias Dahl. Red Hat Bugzilla #591703 Signed-off-by: NEric Blake <eblake@redhat.com>
-
由 Matthias Dahl 提交于
Signed-off-by: NEric Blake <eblake@redhat.com>
-
- 28 1月, 2011 3 次提交
-
-
由 Eric Blake 提交于
* src/qemu/qemu_command.c (qemuBuildChrChardevStr): Alter the chardev alias. (qemuBuildCommandLine): Output an id for the chardev counterpart. * tests/qemuxml2argvdata/*: Update tests to match. Reported by Daniel P. Berrange.
-
由 Jiri Denemark 提交于
As noticed by Eric, commit 8e28c5d4, which fixed generation of virtio-serial port numbers, forgot to adjust test files which resulted in make check failure.
-
由 Eric Blake 提交于
Regression introduced in commit e6b68d74 (Nov 2010). Prior to that point, handlesAlloc was always a multiple of EVENT_ALLOC_EXTENT (10), and was an int (so even if the subtraction had been able to wrap, a negative value would be less than the count not try to free the handles array). But after that point, VIR_RESIZE_N made handlesAlloc grow geometrically (with a pattern of 10, 20, 30, 45 for the handles array) but still freed in multiples of EVENT_ALLOC_EXTENT; and the count changed to size_t. Which means that after 31 handles have been created, then 30 handles destroyed, handlesAlloc is 5 while handlesCount is 1, and since (size_t)(1 - 5) is indeed greater than 1, this then tried to free 10 elements, which had the awful effect of nuking the handles array while there were still live handles. Nuking live handles puts libvirtd in an inconsistent state, and was easily reproducible by starting and then stopping 60 faqemu guests. * daemon/event.c (virEventCleanupTimeouts, virEventCleanupHandles): Avoid integer wrap-around causing us to delete the entire array while entries are still active. * tests/eventtest.c (mymain): Expose the bug.
-
- 25 1月, 2011 1 次提交
-
-
由 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 v5: Comment spelling fixes
-
- 22 1月, 2011 1 次提交
-
-
由 Cole Robinson 提交于
QEMU supports serving VNC over a unix domain socket rather than traditional TCP host/port. This is specified with: <graphics type='vnc' socket='/foo/bar/baz'/> This provides better security access control than VNC listening on 127.0.0.1, but will cause issues with tools that rely on the lax security (virt-manager in fedora runs as regular user by default, and wouldn't be able to access a socket owned by 'qemu' or 'root'). Also not currently supported by any clients, though I have patches for virt-manager, and virt-viewer should be simple to update. v2: schema: Make listen vs. socket a <choice>
-
- 18 1月, 2011 2 次提交
-
-
由 Eric Blake 提交于
https://bugzilla.redhat.com/show_bug.cgi?id=620363 When using -incoming stdio or -incoming exec:, qemu keeps the stdin fd open long after the migration is complete. Not to mention that exec:cat is horribly inefficient, by doubling the I/O and going through a popen interface in qemu. The new -incoming fd: of qemu 0.12.0 closes the fd after using it, and allows us to bypass an intermediary cat process for less I/O. * src/qemu/qemu_command.h (qemuBuildCommandLine): Add parameter. * src/qemu/qemu_command.c (qemuBuildCommandLine): Support migration via fd: when possible. Consolidate migration handling into one spot, now that it is more complex. * src/qemu/qemu_driver.c (qemudStartVMDaemon): Update caller. * tests/qemuxml2argvtest.c (mymain): Likewise. * tests/qemuxml2argvdata/qemuxml2argv-restore-v2-fd.args: New file. * tests/qemuxml2argvdata/qemuxml2argv-restore-v2-fd.xml: Likewise.
-
由 Jiri Denemark 提交于
-
- 16 1月, 2011 1 次提交
-
-
由 Matthias Bolte 提交于
Before the security driver was refactored in d6623003 seclabeltest and secaatest were basically the same. seclabeltest was meant for SELinux and secaatest for AppArmor. Both tests exited early when the specific security driver backend wasn't enabled. With the new security manager trying to initialize a disabled security driver backend is an error that can't be distinguished from other errors anymore. Therefore, the updated seclabeltest just asks for the first available backend as this will always work even with SELinux and AppArmor backend being disabled due to the new Nop backend. Remove the obsolete secaatest and compile and run the seclabeltest unconditional. This fixes make check on systems that support AppArmor.
-
- 15 1月, 2011 2 次提交
-
-
由 Eric Blake 提交于
* src/conf/domain_conf.h (virDomainChrDeviceType): Drop monitor. * src/conf/domain_conf.c (virDomainChrDevice) (virDomainChrDefParseTargetXML, virDomainChrDefFormat): Drop monitor support. * src/qemu/qemu_command.h (qemuBuildCommandLine): Alter signature. * src/qemu/qemu_monitor.h (qemuMonitorOpen): Likewise. * src/qemu/qemu_domain.h (_qemuDomainObjPrivate): Change type of monConfig. * src/qemu/qemu_domain.c (qemuDomainObjPrivateFree) (qemuDomainObjPrivateXMLFormat, qemuDomainObjPrivateXMLParse): Adjust to type change. * src/qemu/qemu_command.c (qemuBuildCommandLine): Likewise. * src/qemu/qemu_driver.c (qemuPrepareMonitorChr) (qemudStartVMDaemon, qemuDomainXMLToNative, qemuConnectMonitor) (qemudShutdownVMDaemon): Likewise. * src/qemu/qemu_hotplug.c (qemuDomainAttachNetDevice): Likewise. * src/qemu/qemu_monitor.c (qemuMonitorOpen): Likewise. * tests/qemuxml2argvtest.c (testCompareXMLToArgvFiles): Likewise.
-
由 Eric Blake 提交于
This opens up the possibility of reusing the smaller ChrSourceDef for both qemu monitor and a passthrough smartcard device. * src/conf/domain_conf.h (_virDomainChrDef): Factor host details... (_virDomainChrSourceDef): ...into new struct. (virDomainChrSourceDefFree): New prototype. * src/conf/domain_conf.c (virDomainChrDefFree) (virDomainChrDefParseXML, virDomainChrDefFormat): Split... (virDomainChrSourceDefClear, virDomainChrSourceDefFree) (virDomainChrSourceDefParseXML, virDomainChrSourceDefFormat): ...into new functions. (virDomainChrDefParseTargetXML): Update clients to reflect type split. * src/vmx/vmx.c (virVMXParseSerial, virVMXParseParallel) (virVMXFormatSerial, virVMXFormatParallel): Likewise. * src/xen/xen_driver.c (xenUnifiedDomainOpenConsole): Likewise. * src/xen/xend_internal.c (xenDaemonParseSxprChar) (xenDaemonFormatSxprChr): Likewise. * src/vbox/vbox_tmpl.c (vboxDomainDumpXML, vboxAttachSerial) (vboxAttachParallel): Likewise. * src/security/security_dac.c (virSecurityDACSetChardevLabel) (virSecurityDACSetChardevCallback) (virSecurityDACRestoreChardevLabel) (virSecurityDACRestoreChardevCallback): Likewise. * src/security/security_selinux.c (SELinuxSetSecurityChardevLabel) (SELinuxSetSecurityChardevCallback) (SELinuxRestoreSecurityChardevLabel) (SELinuxSetSecurityChardevCallback): Likewise. * src/security/virt-aa-helper.c (get_files): Likewise. * src/lxc/lxc_driver.c (lxcVmStart, lxcDomainOpenConsole): Likewise. * src/uml/uml_conf.c (umlBuildCommandLineChr): Likewise. * src/uml/uml_driver.c (umlIdentifyOneChrPTY, umlIdentifyChrPTY) (umlDomainOpenConsole): Likewise. * src/qemu/qemu_command.c (qemuBuildChrChardevStr) (qemuBuildChrArgStr, qemuBuildCommandLine) (qemuParseCommandLineChr): Likewise. * src/qemu/qemu_domain.c (qemuDomainObjPrivateXMLFormat) (qemuDomainObjPrivateXMLParse): Likewise. * src/qemu/qemu_cgroup.c (qemuSetupChardevCgroup): Likewise. * src/qemu/qemu_hotplug.c (qemuDomainAttachNetDevice): Likewise. * src/qemu/qemu_driver.c (qemudFindCharDevicePTYsMonitor) (qemudFindCharDevicePTYs, qemuPrepareChardevDevice) (qemuPrepareMonitorChr, qemudShutdownVMDaemon) (qemuDomainOpenConsole): Likewise. * src/qemu/qemu_command.h (qemuBuildChrChardevStr) (qemuBuildChrArgStr): Delete, now that they are static. * src/libvirt_private.syms (domain_conf.h): New exports. * cfg.mk (useless_free_options): Update list. * tests/qemuxml2argvtest.c (testCompareXMLToArgvFiles): Update tests.
-
- 14 1月, 2011 1 次提交
-
-
由 Eric Blake 提交于
* src/qemu/qemu_capabilities.h (qemuCapsParseDeviceStr): New prototype. * src/qemu/qemu_capabilities.c (qemuCapsParsePCIDeviceStrs) Rename and split... (qemuCapsExtractDeviceStr, qemuCapsParseDeviceStr): ...to make it easier to add and test device-specific checks. (qemuCapsExtractVersionInfo): Update caller. * tests/qemuhelptest.c (testHelpStrParsing): Also test parsing of device-related flags. (mymain): Update expected flags. * tests/qemuhelpdata/qemu-0.12.1-device: New file. * tests/qemuhelpdata/qemu-kvm-0.12.1.2-rhel60-device: New file. * tests/qemuhelpdata/qemu-kvm-0.12.3-device: New file. * tests/qemuhelpdata/qemu-kvm-0.13.0-device: New file.
-
- 13 1月, 2011 1 次提交
-
-
由 Eric Blake 提交于
Commit 870dba07 (Mar 2008) added builddir/src to PATH to pick up virsh. Later, virsh was moved to tools; commit db68d6b1 (Oct 2009) noticed this, but only added the new location rather than deleting the old location. * tests/Makefile.am (path_add): Drop now-useless directory. Suggested by Daniel P. Berrange.
-
- 11 1月, 2011 2 次提交
-
-
由 Richard W.M. Jones 提交于
Skip IB700 when assigning PCI slots. Note: the I6300ESB watchdog _is_ a PCI device. To test this: I applied this patch to libvirt-0.8.3-2.fc14 (rebasing it slightly: qemu_command.c didn't exist in that version) and installed this on my machine, then tested that I could successfully add an ib700 watchdog device to a guest, start the guest, and the ib700 was available to the guest. I also added an i6300esb (PCI) watchdog to another guest, and verified that libvirt assigned a PCI device to it, that the guest could be started, and that i6300esb was present in the guest. Note that if you previously had a domain with a ib700 watchdog, it would have had an <address type='pci' .../> clause added to it in the libvirt configuration. This patch does not attempt to remove this. You cannot start such a domain -- qemu gives an error if you try. With this patch you are able to remove the bogus address element without libvirt adding it back. Signed-off-by: NRichard W.M. Jones <rjones@redhat.com>
-
由 Daniel P. Berrange 提交于
The current security driver usage requires horrible code like if (driver->securityDriver && driver->securityDriver->domainSetSecurityHostdevLabel && driver->securityDriver->domainSetSecurityHostdevLabel(driver->securityDriver, vm, hostdev) < 0) This pair of checks for NULL clutters up the code, making the driver calls 2 lines longer than they really need to be. The goal of the patchset is to change the calling convention to simply if (virSecurityManagerSetHostdevLabel(driver->securityDriver, vm, hostdev) < 0) The first check for 'driver->securityDriver' being NULL is removed by introducing a 'no op' security driver that will always be present if no real driver is enabled. This guarentees driver->securityDriver != NULL. The second check for 'driver->securityDriver->domainSetSecurityHostdevLabel' being non-NULL is hidden in a new abstraction called virSecurityManager. This separates the driver callbacks, from main internal API. The addition of a virSecurityManager object, that is separate from the virSecurityDriver struct also allows for security drivers to carry state / configuration information directly. Thus the DAC/Stack drivers from src/qemu which used to pull config from 'struct qemud_driver' can now be moved into the 'src/security' directory and store their config directly. * src/qemu/qemu_conf.h, src/qemu/qemu_driver.c: Update to use new virSecurityManager APIs * src/qemu/qemu_security_dac.c, src/qemu/qemu_security_dac.h src/qemu/qemu_security_stacked.c, src/qemu/qemu_security_stacked.h: Move into src/security directory * src/security/security_stack.c, src/security/security_stack.h, src/security/security_dac.c, src/security/security_dac.h: Generic versions of previous QEMU specific drivers * src/security/security_apparmor.c, src/security/security_apparmor.h, src/security/security_driver.c, src/security/security_driver.h, src/security/security_selinux.c, src/security/security_selinux.h: Update to take virSecurityManagerPtr object as the first param in all callbacks * src/security/security_nop.c, src/security/security_nop.h: Stub implementation of all security driver APIs. * src/security/security_manager.h, src/security/security_manager.c: New internal API for invoking security drivers * src/libvirt.c: Add missing debug for security APIs
-
- 07 1月, 2011 2 次提交
-
-
由 Diego Elio Pettenò 提交于
This avoids throwing the tests off if LD_LIBRARY_PATH or LD_PRELOAD or other variables are set. Signed-off-by: NDiego Elio Pettenò <flameeyes@gmail.com>
-
由 Matthias Bolte 提交于
Update test suite accordingly.
-