- 13 3月, 2018 1 次提交
-
-
由 Ján Tomko 提交于
Since data.count is not a pointer, but an integer, compare it against an integer value instead of using the implicit "boolean" conversion that is customarily used for pointers. Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 07 3月, 2018 1 次提交
-
-
由 Ján Tomko 提交于
If the user tries to define a domain that has <controller type='usb' model='none'/> and also some USB devices, we report an error: error: internal error: No free USB ports Which is technically still correct for a domain with no USB ports. Change it to: USB is disabled for this domain, but USB devices are present in the domain XML https://bugzilla.redhat.com/show_bug.cgi?id=1347550Signed-off-by: NJán Tomko <jtomko@redhat.com>
-
- 22 2月, 2018 1 次提交
-
-
由 John Ferlan 提交于
Rather than having the caller check, if the input @addrs is NULL (e.g. priv->usbaddrs), then just return 0. This also removes the need for ATTRIBUTE_NONNULL which only really helped if someone passed a NULL as a parameter not if the passed parameter is NULL. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 20 2月, 2018 2 次提交
-
-
由 Daniel P. Berrangé 提交于
GCC 8 became more fussy about detecting switch fallthroughs. First it doesn't like it if you have a fallthrough attribute that is not before a case statement. e.g. FOO: BAR: WIZZ: ATTRIBUTE_FALLTHROUGH; Is unacceptable as there's no final case statement, so while FOO & BAR are falling through, WIZZ is not falling through. IOW, GCC wants us to write FOO: BAR: ATTRIBUTE_FALLTHROUGH; WIZZ: Second, it will report risk of fallthrough even if you have a case statement for every single enum value, but only if the switch is nested inside another switch and the outer case statement has no final break. This is is arguably valid because despite the fact that we have cast from "int" to the enum typedef, nothing guarantees that the variable we're switching on only contains values that have corresponding switch labels. e.g. int domstate = 87539319; switch ((virDomainState)domstate) { ... } will not match enum value, but also not raise any kind of compiler warning. So it is right to complain about risk of fallthrough if no default: is present. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
由 Daniel P. Berrangé 提交于
The controller model is slightly unusual in that the default value is -1, not 0. As a result the default value is not covered by any of the existing enum cases. This in turn means that any switch() statements that think they have covered all cases, will in fact not match the default value at all. In the qemuDomainDeviceCalculatePCIConnectFlags() method this has caused a serious mistake where we fallthrough from the SCSI controller case, to the VirtioSerial controller case, and from the USB controller case to the IDE controller case. By adding explicit enum constant starting at -1, we can ensure switches remember to handle the default case. Reviewed-by: NJohn Ferlan <jferlan@redhat.com> Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 09 2月, 2018 1 次提交
-
-
由 Daniel P. Berrangé 提交于
Currently the QEMU driver will call directly into the network driver impl to modify resolve the atual type of NICs with type=network. It has todo this before it has allocated the actual NIC. This introduces a callback system to allow us to decouple the QEMU driver from the network driver. This is a short term step, as it ought to be possible to achieve the same end goal by simply querying XML via the public network API. The QEMU code in question though, has no virConnectPtr conveniently available at this time. Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
-
- 01 2月, 2018 6 次提交
-
-
由 John Ferlan 提交于
Now that the controller model is updated during post parse callback, this code no longer needs to fetch the model based on the capabilities and can just return the model directly if the controller is found. Removal of @qemuCaps cascades through various callers which are now updated to not pass the capabilities.
-
由 John Ferlan 提交于
Now that post parse processing handles setting the SCSI controller model, there's no need to call qemuDomainGetSCSIControllerModel to get the "default controller" when building the command line controller string or when assigning the spaprvio address since the controller model value will already be filled in.
-
由 John Ferlan 提交于
During post parse processing, let's force setting the controller model to default value if not already set for defined controllers (e.g. the non implicit ones).
-
由 John Ferlan 提交于
Rename and rework qemuDomainSetSCSIControllerModel since we're really not setting the SCSI controller model. Instead the code is either returning the existing SCSI controller model value, the default value based on the capabilities, or -1 with the error set.
-
由 John Ferlan 提交于
Rather than repeat multiple steps in order to find the SCSI controller model, let's combine them into one helper that will return either the model from the definition or the default model based on the capabilities. This patch adds an extra check/error that the controller that's being found actually exists. This just clarifies that the error was because the controller doesn't exist rather than the more generic error that we were unable to determine the model from qemuDomainSetSCSIControllerModel when a -1 was passed in and the capabilities were unable to find one.
-
由 John Ferlan 提交于
Rather than one function serving two purposes, let's split out the else condition which is checking whether the model can be used during command line building based on the capabilities. Signed-off-by: NJohn Ferlan <jferlan@redhat.com>
-
- 21 1月, 2018 1 次提交
-
-
由 Laine Stump 提交于
Commit 10c73bf1 fixed a bug that I had introduced back in commit 70249927 - if a vhost-scsi device had no manually assigned PCI address, one wouldn't be assigned automatically. There was a slight problem with the logic of the fix though - in the case of domains with pcie-root (e.g. those with a q35 machinetype), qemuDomainDeviceCalculatePCIConnectFlags() will attempt to determine if the host-side PCI device is Express or legacy by examining sysfs based on the host-side PCI address stored in hostdev->source.subsys.u.pci.addr, but that part of the union is only valid for PCI hostdevs, *not* for SCSI hostdevs. So we end up trying to read sysfs for some probably-non-existent device, which fails, and the function virPCIDeviceIsPCIExpress() returns failure (-1). By coincidence, the return value is being examined as a boolean, and since -1 is true, we still end up assigning the vhost-scsi device to an Express slot, but that is just by chance (and could fail in the case that the gibberish in the "hostside PCI address" was the address of a real device that happened to be legacy PCI). Since (according to Paolo Bonzini) vhost-scsi devices appear just like virtio-scsi devices in the guest, they should follow the same rules as virtio devices when deciding whether they should be placed in an Express or a legacy slot. That's accomplished in this patch by returning early with virtioFlags, rather than erroneously using hostdev->source.subsys.u.pci.addr. It also adds a test case for PCIe to assure it doesn't get broken in the future.
-
- 14 12月, 2017 1 次提交
-
-
由 John Ferlan 提交于
Commit id '70249927' neglected to cover this case because the test had taken the "shortcut" to already add the <address>; however, when the PCI address assignment code was adjusted by commit id '70249927' the vhost-scsi (VIR_DOMAIN_HOSTDEV_SUBSYS_TYPE_SCSI_HOST) wasn't covered thus returning a 0 for pciFlags. So I altered the tests too to make sure it doesn't happen again. Previously the qemuxml2xmloutdata was a softlink to the source qemuxml2argvdata, so I unlinked and recreated the output file to force generation of the adddress. Without the test changes, an address generation returns: libvirt: Domain Config error : internal error: Cannot automatically add a new PCI bus for a device with connect flags 00 if an address was supplied in the test, a restart of libvirtd or edit of a guest would display the following opaque message: warning : qemuDomainCollectPCIAddress:1237 : qemuDomainDeviceCalculatePCIConnectFlags() thinks that the device with PCI address 0000:00:09.0 should not have a PCI address where the address is related to the guest PCI address provided.
-
- 28 11月, 2017 5 次提交
-
-
由 Pino Toscano 提交于
Introduce specific a target types with two models for the console devices (sclp and sclplm) used in s390 and s390x guests, so isa-serial is no more used for them. This makes <serial> usable on s390 and s390x guests, with at most only a single sclpconsole and one sclplmconsole devices usable in a single guest (due to limitations in QEMU, which will enforce already at runtime). Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1449265Signed-off-by: NPino Toscano <ptoscano@redhat.com> Reviewed-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Andrea Bolognani 提交于
We can finally introduce a specific target model for the pl011 device used by mach-virt guests, which means isa-serial will no longer show up to confuse users. We make sure migration works in both directions by interpreting the isa-serial target type, or the lack of target type, appropriately when parsing the guest XML, and skipping the newly-introduced type when formatting if for migration. We also verify that pl011 is not used for non-mach-virt guests and add a bunch of test cases. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=151292Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Andrea Bolognani 提交于
The existing implementation set the address type for all serial devices to spapr-vio, which made it impossible to use other devices such as usb-serial and pci-serial; moreover, some decisions were made based on the address type rather than the device type. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1512934Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Andrea Bolognani 提交于
We can finally introduce a specific target model for the spapr-vty device used by pSeries guests, which means isa-serial will no longer show up to confuse users. We make sure migration works in both directions by interpreting the isa-serial target type, or the lack of target type, appropriately when parsing the guest XML, and skipping the newly-introduced type when formatting if for migration. We also verify that spapr-vty is not used for non-pSeries guests and add a bunch of test cases. This commit is best viewed with 'git show -w'. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1511421Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
由 Andrea Bolognani 提交于
This is the first step in getting rid of the assumption that isa-serial is the default target type for serial devices. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
- 19 10月, 2017 2 次提交
-
-
由 Peter Krempa 提交于
The code can't fail so having error handling is pointless.
-
由 Ján Tomko 提交于
Split out the common code responsible for reserving/assigning PCI/CCW addresses for virtio disks into a helper function for reuse by other virtio devices.
-
- 16 10月, 2017 1 次提交
-
-
由 Ján Tomko 提交于
Somewhere around commit 9ff9d9f5 reserving entire PCI slots was eliminated, as demonstrated by commit 6cc20142. Reserve the functions required by the implicit devices: 00:01.0 ISA Bridge 00:01.1 IDE Controller 00:01.2 USB Controller (unless USB is disabled) 00:01.3 Bridge https://bugzilla.redhat.com/show_bug.cgi?id=1460143
-
- 11 10月, 2017 1 次提交
-
-
由 Ján Tomko 提交于
The address is restricted to 0:0:1.2 only for the piix3-uhci controller at index 0. https://bugzilla.redhat.com/show_bug.cgi?id=1460602
-
- 05 9月, 2017 1 次提交
-
-
由 Cole Robinson 提交于
Will be needed for future patches to pull the default video type setting out of XML parsing routines. Signed-off-by: NCole Robinson <crobinso@redhat.com>
-
- 28 8月, 2017 1 次提交
-
-
由 Andrea Bolognani 提交于
We can't retrieve the isolation group of a device that's not present in the system. However, it's very common for VFs to be created late in the boot, so they might not be present yet when libvirtd starts, which would cause the guests using them to disappear. Moreover, for other architectures and even ppc64 before isolation groups were introduced, it's considered perfectly fine to configure a guest to use a device that's not yet (or no longer) available to the host, with the obvious caveat that such a guest won't be able to start before the device is available. In order to be consistent, when a device's isolation group can't be determined fall back to not isolating it rather than erroring out or, worse, making the guest disappear. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1484254Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
- 25 8月, 2017 1 次提交
-
-
由 Andrea Bolognani 提交于
This is more user-friendly because the error will be displayed directly instead of being buried in the log. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
-
- 25 7月, 2017 1 次提交
-
-
由 Andrea Bolognani 提交于
The original name didn't hint at the fact that PHBs are a pSeries-specific concept. Suggested-by: NPeter Krempa <pkrempa@redhat.com> Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
- 18 7月, 2017 2 次提交
-
-
由 Andrea Bolognani 提交于
All the pieces are now in place, so we can finally start using isolation groups to achieve our initial goal, which is separating hostdevs from emulated PCI devices while keeping hostdevs that belong to the same host IOMMU group together. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1280542Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NLaine Stump <laine@laine.org>
-
由 Andrea Bolognani 提交于
Isolation groups will eventually allow us to make sure certain devices, eg. PCI hostdevs, are assigned to guest PCI buses in a way that guarantees improved isolation, error detection and recovery for machine types and hypervisors that support it, eg. pSeries guest on QEMU. This patch merely defines storage for the new information we're going to need later on and makes sure it is passed from the hypervisor driver (QEMU / bhyve) down to the generic PCI address allocation code. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NLaine Stump <laine@laine.org>
-
- 15 7月, 2017 4 次提交
-
-
由 Andrea Bolognani 提交于
When looking for slots suitable for a PCI device, libvirt might need to add an extra PCI controller: for pSeries guests, we want that extra controller to be a PHB (pci-root) rather than a PCI bridge. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NLaine Stump <laine@laine.org>
-
由 Andrea Bolognani 提交于
PCI bus has to be numbered sequentially, and no index can be missing, so libvirt will fill in the blanks automatically for the user. Up until now, it has done so using either pci-bridge, for machine types based on legacy PCI, or pcie-root-port, for machine types based on PCI Express. Neither choice is good for pSeries guests, where PHBs (pci-root) should be used instead. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NLaine Stump <laine@laine.org>
-
由 Andrea Bolognani 提交于
pSeries guests will soon need the new information; luckily, we can figure it out automatically most of the time, so users won't have to worry about it. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NLaine Stump <laine@laine.org>
-
由 Andrea Bolognani 提交于
This function was private to the QEMU driver and was, accordingly, called qemuDomainPCIBusFullyReserved(). However the function is really not QEMU-specific at all, so it makes sense to move it closer to the virDomainPCIAddressBus struct it operates on. Signed-off-by: NAndrea Bolognani <abologna@redhat.com> Reviewed-by: NLaine Stump <laine@laine.org>
-
- 13 6月, 2017 1 次提交
-
-
由 Andrea Bolognani 提交于
Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
-
- 28 4月, 2017 2 次提交
-
-
由 Pavel Hrdina 提交于
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1438682Signed-off-by: NPavel Hrdina <phrdina@redhat.com> Acked-by: NAndrea Bolognani <abologna@redhat.com>
-
由 Peter Krempa 提交于
Rather than freeing the list before starting a new VM clear it after stopping the old instance when the data becomes invalid.
-
- 18 4月, 2017 1 次提交
-
-
由 Pavel Hrdina 提交于
Introduce new wrapper functions without *Machine* in the function name that take the whole virDomainDef structure as argument and call the existing functions with *Machine* in the function name. Change the arguments of existing functions to *machine* and *arch* because they don't need the whole virDomainDef structure and they could be used in places where we don't have virDomainDef. Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
-
- 27 3月, 2017 1 次提交
-
-
由 Erik Skultety 提交于
So far, the official support is for x86_64 arch guests so unless a different device API than vfio-pci is available let's only turn on support for PCI address assignment. Once a different device API is introduced, we can enable another address type easily. Signed-off-by: NErik Skultety <eskultet@redhat.com>
-
- 17 3月, 2017 1 次提交
-
-
由 Andrea Bolognani 提交于
ioh3420 is emulated Intel hardware, so it always looked quite out of place in aarch64/virt guests. Even for x86/q35 guests, the recently-introduced pcie-root-port is a better choice because, unlike ioh3420, it doesn't require IO space (a fairly constrained resource) to work. If pcie-root-port is available in QEMU, use it; ioh3420 is still used as fallback for when pcie-root-port is not available. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1408808
-
- 12 3月, 2017 1 次提交
-
-
由 Fabian Freyer 提交于
bhyve supports 'gop' video device that allows clients to connect to VMs using VNC clients. This commit adds support for that to the bhyve driver: - Introducr 'gop' video device type - Add capabilities probing for the 'fbuf' device that's responsible for graphics - Update command builder routines to let users configure domain's VNC via gop graphics. Signed-off-by: NRoman Bogorodskiy <bogorodskiy@gmail.com>
-