[libvirt] [PATCH v2 0/5] Prevent losing IPv6 routes due to forwarding
by Cédric Bosdonnat
Hi Laine, all,
Here is the v2 of my series. The changes are:
* Add a commit to create a virNetDevGetName() function
* Fix Laine's comments
Cédric Bosdonnat (5):
util: extract the request sending code from virNetlinkCommand()
util: add virNetlinkDumpCommand()
bridge_driver.c: more uses of SYSCTL_PATH
util: add virNetDevGetName() function
network: check accept_ra before enabling ipv6 forwarding
src/libvirt_private.syms | 3 +
src/network/bridge_driver.c | 25 ++++---
src/util/virnetdev.c | 19 ++++++
src/util/virnetdev.h | 2 +
src/util/virnetdevip.c | 158 ++++++++++++++++++++++++++++++++++++++++++++
src/util/virnetdevip.h | 1 +
src/util/virnetlink.c | 145 ++++++++++++++++++++++++++++++----------
src/util/virnetlink.h | 9 +++
8 files changed, 319 insertions(+), 43 deletions(-)
--
2.11.0
7 years, 6 months
[libvirt] [PATCH v2 0/3] libxl: nestedhvm support
by Wim Ten Have
From: Wim ten Have <wim.ten.have(a)oracle.com>
This patch enhances host-passthrough capability to advertise the
required vendor CPU virtualization feature which will be used to
enable 'nestedhvm' in the libxl driver.
Wim ten Have (3):
libxl: set nestedhvm for mode host-passthrough
xenconfig: add conversions for xen-xl
xlconfigtest: add tests for 'nestedhvm' support
src/libxl/libxl_conf.c | 47 +++++++++++++--
src/libxl/libxl_conf.h | 2 +-
src/libxl/libxl_domain.c | 2 +-
src/xenconfig/xen_xl.c | 67 ++++++++++++++++++++++
.../test-fullvirt-nestedhvm-disabled.cfg | 26 +++++++++
.../test-fullvirt-nestedhvm-disabled.xml | 62 ++++++++++++++++++++
.../test-fullvirt-nestedhvm-undefined.cfg | 25 ++++++++
.../test-fullvirt-nestedhvm-undefined.xml | 58 +++++++++++++++++++
tests/xlconfigdata/test-fullvirt-nestedhvm.cfg | 26 +++++++++
tests/xlconfigdata/test-fullvirt-nestedhvm.xml | 59 +++++++++++++++++++
tests/xlconfigtest.c | 3 +
11 files changed, 370 insertions(+), 7 deletions(-)
create mode 100644 tests/xlconfigdata/test-fullvirt-nestedhvm-disabled.cfg
create mode 100644 tests/xlconfigdata/test-fullvirt-nestedhvm-disabled.xml
create mode 100644 tests/xlconfigdata/test-fullvirt-nestedhvm-undefined.cfg
create mode 100644 tests/xlconfigdata/test-fullvirt-nestedhvm-undefined.xml
create mode 100644 tests/xlconfigdata/test-fullvirt-nestedhvm.cfg
create mode 100644 tests/xlconfigdata/test-fullvirt-nestedhvm.xml
--
2.9.3
7 years, 7 months
[libvirt] [RFC PATCH 00/11] Add mdev reporting capability to the nodedev driver
by Erik Skultety
This series enables the node device driver to report information about the
existing mediated devices on the host. There is no device creation involved
yet. The information reported by the node device driver is split into two
parts, one that is reported within the physical parent's capabilities
(the generic stuff that comes from the mdev types' sysfs attributes, note the
'description' attribute which is verbatim - raw,unstructured string) and the
other that is reported within the mdev child device and merely contains the
mdev type id, which the device was instantiated from, and the iommu group
number.
Basically, the format of the XML I went for is as follows:
PCI parent:
<device>
<name>pci_0000_06_00_0</name>
<path>/sys/devices/.../0000:06:00.0</path>
<parent>pci_0000_05_08_0</parent>
...
<capability type='pci'>
...
<capability type='mdev'>
<type id='nvidia-11'>
<name>GRID M60-0B</name>
<description>num_heads=2, frl_config=45, framebuffer=512M, max_resolution=2560x1600, max_instance=16</description>
<device_api>vfio-pci</device_api>
<available_instances>16</available_instances>
</type>
...
</capability>
<iommuGroup number='20'>
<address domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
</iommuGroup>
...
</capability>
</device>
mdev child:
<device>
<name>mdev_ef1212ff_ff23_4534_ffcd_01ff12017801</name>
<path>/sys/devices/.../ef1212ff-ff23-4534-ffcd-01ff12017801</path>
<parent>pci_0000_06_00_0</parent>
<driver>
<name>vfio_mdev</name>
</driver>
<capability type='mdev'>
<type id='nvidia-18'/>
<iommuGroup number='63'/>
</capability>
</device>
Also, since we didn't have any node device driver documentation, I created a
stub (comments are very welcome, you can shred it to pieces ;)) focusing on the
PCI devices and then adding the mdev part into that. As I said, it's still a
stub that needs lots of work on it, namely adding USBs and SCSI devices, but I
figured that the fact some parts are missing should not be a show stopper for
the nodedev-mdev patches.
Thanks,
Erik
Erik Skultety (11):
nodedev: Fix guideline violations in nodedev modules
nodedev: Make use of the compile-time missing enum in switch error
conf: nodedev: Split virNodeDeviceDefFormat into more functions
nodedev: udevProcessPCI: Drop syspath variable
docs: Use our XSLT template to generate list of supported pool types
nodedev: Introduce the mdev capability to the nodedev driver structure
nodedev: Fill in the mdev info for the parent PCI device
nodedev: Introduce udevProcessMediatedDevice
nodedev: Format the mdev capability of the PCI parent device
docs: Provide a nodedev driver stub documentation
docs: Document the mediated devices within the nodedev driver
docs/drivers.html.in | 6 +-
docs/drvnodedev.html.in | 275 +++++++++++++
docs/storage.html.in | 62 +--
include/libvirt/libvirt-nodedev.h | 1 +
src/conf/node_device_conf.c | 625 ++++++++++++++++++------------
src/conf/node_device_conf.h | 21 +-
src/conf/virnodedeviceobj.c | 3 +-
src/libvirt-nodedev.c | 1 +
src/libvirt_private.syms | 1 +
src/node_device/node_device_driver.c | 30 +-
src/node_device/node_device_driver.h | 82 ++--
src/node_device/node_device_hal.c | 9 +
src/node_device/node_device_linux_sysfs.c | 1 +
src/node_device/node_device_linux_sysfs.h | 9 +-
src/node_device/node_device_udev.c | 456 ++++++++++++++++------
tools/virsh-nodedev.c | 2 +
16 files changed, 1110 insertions(+), 474 deletions(-)
create mode 100644 docs/drvnodedev.html.in
--
2.12.2
7 years, 7 months
[libvirt] [PATCH v2 0/2] Use the shared keycodemap database
by Daniel P. Berrange
Changed in v2:
- Fixed make syntax-check errors
- Auto-generate man pages listing value key codes for use with
the virDomainSendKey API / virsh send-key command
Daniel P. Berrange (2):
util: switch over to use keycodemapdb GIT submodule
Add ability to generate man page describing key code names & values
.gitignore | 3 +-
.gitmodules | 3 +
libvirt.spec.in | 1 +
mingw-libvirt.spec.in | 2 +
src/Makefile.am | 81 ++++++--
src/keycodemapdb | 1 +
src/util/keymaps.csv | 464 ------------------------------------------
src/util/virkeycode-mapgen.py | 97 ---------
src/util/virkeycode.c | 94 ++++-----
tests/virkeycodetest.c | 5 +
tools/virsh.pod | 20 ++
11 files changed, 148 insertions(+), 623 deletions(-)
create mode 160000 src/keycodemapdb
delete mode 100644 src/util/keymaps.csv
delete mode 100755 src/util/virkeycode-mapgen.py
--
2.9.3
7 years, 7 months
[libvirt] [PATCH] virConfSaveValue: protect against a NULL pointer reference
by Wim Ten Have
From: Wim ten Have <wim.ten.have(a)oracle.com>
This patch protects against a NULL pointer dereference leading to a SEGV
under xlconfigtest per DO_TEST("channel-pty");
VIR_TEST_OOM=1 VIR_TEST_RANGE=29 ./tests/xlconfigtest
Wim ten Have (1):
virConfSaveValue: protect against a NULL pointer reference
src/util/virconf.c | 18 ++++++++++--------
1 file changed, 10 insertions(+), 8 deletions(-)
--
2.9.3
7 years, 7 months
[libvirt] [PATCH] virpci: Enable GEN4 card Link speed (16GT/s)
by Shivaprasad G Bhat
This enables GEN4 link speed (16GT/s) property to be fetched properly and thus
allows the detach/reattach/dumpxml to work.
Signed-off-by: Shivaprasad G Bhat <sbhat(a)linux.vnet.ibm.com>
---
Verified on Mellanox MT27800 Family ConnectX-5 IB card.
# lspci -kvvvs 0001:01:00.4
0001:01:00.4 Infiniband controller: Mellanox Technologies MT27800 Family [ConnectX-5 Virtual Function]
Subsystem: IBM MT28800 Family [ConnectX-5 Virtual Function]
Control: I/O- Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0
Region 0: [virtual] Memory at 21000e000000 (64-bit, prefetchable) [size=32M]
Capabilities: [60] Express (v2) Endpoint, MSI 00
DevCap: MaxPayload 512 bytes, PhantFunc 0, Latency L0s unlimited, L1 unlimited
ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset+
DevCtl: Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop- FLReset-
MaxPayload 128 bytes, MaxReadReq 128 bytes
DevSta: CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr- TransPend-
LnkCap: Port #0, Speed 16GT/s, Width x16, ASPM not supported, Exit Latency L0s unlimited, L1 unlimited
ClockPM- Surprise- LLActRep- BwNot- ASPMOptComp+
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- CommClk-
ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
LnkSta: Speed unknown, Width x0, TrErr- Train- SlotClk- DLActive- BWMgmt- ABWMgmt-
DevCap2: Completion Timeout: Range ABCD, TimeoutDis+, LTR-, OBFF Not Supported
DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled
LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-, EqualizationPhase1-
EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
Capabilities: [48] Vital Product Data
Product Name: PCIe4 2-port 100Gb EDR Adapter x16
Read-only fields:
[PN] Part number: 00WT174
[EC] Engineering changes: P40094
[VF] Vendor specific: 00WT176
[SN] Serial number: YA50YF6AL00B
[Z0] Unknown: 49 42 4d 30 30 30 30 30 30 30 30 30 32
[VC] Vendor specific: EC64
[MN] Manufacture ID: 36 34 31 58 34 38 31 31 37 34 30 30 33 34 20
[VH] Vendor specific: 2CF2
[VK] Vendor specific: ipzSeries
[RV] Reserved: checksum good, 0 byte(s) reserved
End
Capabilities: [9c] MSI-X: Enable+ Count=12 Masked-
Vector table: BAR=0 offset=00002000
PBA: BAR=0 offset=00003000
Kernel driver in use: mlx5_core
Kernel modules: mlx5_core
Before fix :
# virsh nodedev-dumpxml pci_0001_01_00_4
<device>
<name>pci_0001_01_00_4</name>
<path>/sys/devices/pci0001:00/0001:00:00.0/0001:01:00.4</path>
<parent>pci_0001_00_00_0</parent>
<driver>
<name>vfio-pci</name>
</driver>
<capability type='pci'>
<domain>1</domain>
<bus>1</bus>
<slot>0</slot>
<function>4</function>
<product id='0x1018'>MT27800 Family [ConnectX-5 Virtual Function]</product>
<vendor id='0x15b3'>Mellanox Technologies</vendor>
<capability type='phys_function'>
<address domain='0x0001' bus='0x01' slot='0x00' function='0x0'/>
</capability>
<iommuGroup number='10'>
<address domain='0x0001' bus='0x01' slot='0x00' function='0x4'/>
</iommuGroup>
<numa node='0'/>
<pci-express>
<link validity='cap' port='0' speed='(null)' width='16'/>
<link validity='sta' width='0'/>
</pci-express>
</capability>
</device>
# virsh nodedev-detach pci_0001_01_00_4
error: Failed to detach device pci_0001_01_00_4
error: malformed 'speed' attribute: (null)
After Fix:
# ./run tools/virsh nodedev-dumpxml pci_0001_01_00_4
<device>
<name>pci_0001_01_00_4</name>
<path>/sys/devices/pci0001:00/0001:00:00.0/0001:01:00.4</path>
<parent>pci_0001_00_00_0</parent>
<driver>
<name>mlx5_core</name>
</driver>
<capability type='pci'>
<domain>1</domain>
<bus>1</bus>
<slot>0</slot>
<function>4</function>
<product id='0x1018'>MT27800 Family [ConnectX-5 Virtual Function]</product>
<vendor id='0x15b3'>Mellanox Technologies</vendor>
<capability type='phys_function'>
<address domain='0x0001' bus='0x01' slot='0x00' function='0x0'/>
</capability>
<iommuGroup number='10'>
<address domain='0x0001' bus='0x01' slot='0x00' function='0x4'/>
</iommuGroup>
<numa node='0'/>
<pci-express>
<link validity='cap' port='0' speed='16' width='16'/>
<link validity='sta' width='0'/>
</pci-express>
</capability>
</device>
# ./run tools/virsh nodedev-detach pci_0001_01_00_4
Device pci_0001_01_00_4 detached
---
src/util/virpci.c | 4 ++--
src/util/virpci.h | 1 +
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/util/virpci.c b/src/util/virpci.c
index 3c1e13b..1e0d903 100644
--- a/src/util/virpci.c
+++ b/src/util/virpci.c
@@ -53,7 +53,7 @@ VIR_LOG_INIT("util.pci");
#define PCI_ADDR_LEN 13 /* "XXXX:XX:XX.X" */
VIR_ENUM_IMPL(virPCIELinkSpeed, VIR_PCIE_LINK_SPEED_LAST,
- "", "2.5", "5", "8")
+ "", "2.5", "5", "8", "16")
VIR_ENUM_IMPL(virPCIStubDriver, VIR_PCI_STUB_DRIVER_LAST,
"none",
@@ -147,7 +147,7 @@ struct _virPCIDeviceList {
#define PCI_EXP_DEVCAP 0x4 /* Device capabilities */
#define PCI_EXP_DEVCAP_FLR (1<<28) /* Function Level Reset */
#define PCI_EXP_LNKCAP 0xc /* Link Capabilities */
-#define PCI_EXP_LNKCAP_SPEED 0x0000f /* Maximum Link Speed */
+#define PCI_EXP_LNKCAP_SPEED 0x0001f /* Maximum Link Speed */
#define PCI_EXP_LNKCAP_WIDTH 0x003f0 /* Maximum Link Width */
#define PCI_EXP_LNKSTA 0x12 /* Link Status */
#define PCI_EXP_LNKSTA_SPEED 0x000f /* Negotiated Link Speed */
diff --git a/src/util/virpci.h b/src/util/virpci.h
index a5e8d00..50e8b3c 100644
--- a/src/util/virpci.h
+++ b/src/util/virpci.h
@@ -58,6 +58,7 @@ typedef enum {
VIR_PCIE_LINK_SPEED_25,
VIR_PCIE_LINK_SPEED_5,
VIR_PCIE_LINK_SPEED_8,
+ VIR_PCIE_LINK_SPEED_16,
VIR_PCIE_LINK_SPEED_LAST
} virPCIELinkSpeed;
7 years, 7 months
[libvirt] [PATCH] xenFormatXLDomainDisks: avoid double free on OOM testing
by Wim Ten Have
From: Wim ten Have <wim.ten.have(a)oracle.com>
This patch fixes a double free that exposed under OOM testing
xlconfigtest per DO_TEST("new-disk");
VIR_TEST_OOM=1 VIR_TEST_RANGE=5 ./tests/xlconfigtest
Wim ten Have (1):
xenFormatXLDomainDisks: avoid double free on OOM testing
src/xenconfig/xen_xl.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
--
2.9.3
7 years, 7 months
[libvirt] [PATCH 0/9] Support more options for intel-iommu
by Ján Tomko
https://bugzilla.redhat.com/show_bug.cgi?id=1427005
Ján Tomko (9):
conf: add <irqchip mode> to <features>
qemu: format kernel_irqchip on the command line
Split out virDomainIOMMUDefFormat
conf: add <driver intremap> to <iommu>
qemu: allow conditional device property probing
qemu: refactor qemuBuildIOMMUCommandLine
qemu: format intremap= on intel-iommu command line
conf: add caching attribute to iommu device
qemu: format caching-mode on iommu command line
docs/formatdomain.html.in | 41 +++++++-
docs/schemas/domaincommon.rng | 30 ++++++
src/conf/domain_conf.c | 103 +++++++++++++++++--
src/conf/domain_conf.h | 15 +++
src/libvirt_private.syms | 1 +
src/qemu/qemu_capabilities.c | 111 +++++++++++++++------
src/qemu/qemu_capabilities.h | 3 +
src/qemu/qemu_command.c | 53 ++++++++--
tests/qemucapabilitiesdata/caps_1.5.3.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_1.6.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_1.7.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.1.1.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_2.4.0.x86_64.replies | 22 ++--
tests/qemucapabilitiesdata/caps_2.4.0.x86_64.xml | 1 +
.../qemucapabilitiesdata/caps_2.5.0.x86_64.replies | 24 +++--
tests/qemucapabilitiesdata/caps_2.5.0.x86_64.xml | 1 +
.../caps_2.6.0-gicv2.aarch64.xml | 1 +
.../caps_2.6.0-gicv3.aarch64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.6.0.ppc64le.xml | 1 +
.../qemucapabilitiesdata/caps_2.6.0.x86_64.replies | 24 +++--
tests/qemucapabilitiesdata/caps_2.6.0.x86_64.xml | 1 +
tests/qemucapabilitiesdata/caps_2.7.0.s390x.xml | 1 +
.../qemucapabilitiesdata/caps_2.7.0.x86_64.replies | 28 ++++--
tests/qemucapabilitiesdata/caps_2.7.0.x86_64.xml | 2 +
tests/qemucapabilitiesdata/caps_2.8.0.s390x.xml | 1 +
.../qemucapabilitiesdata/caps_2.8.0.x86_64.replies | 37 +++++--
tests/qemucapabilitiesdata/caps_2.8.0.x86_64.xml | 2 +
.../qemucapabilitiesdata/caps_2.9.0.x86_64.replies | 49 +++++++--
tests/qemucapabilitiesdata/caps_2.9.0.x86_64.xml | 3 +
.../qemuxml2argv-intel-iommu-caching.args | 19 ++++
.../qemuxml2argv-intel-iommu-caching.xml | 28 ++++++
.../qemuxml2argv-intel-iommu-irqchip.args | 19 ++++
.../qemuxml2argv-intel-iommu-irqchip.xml | 31 ++++++
tests/qemuxml2argvtest.c | 10 ++
.../qemuxml2xmlout-intel-iommu-caching.xml | 28 ++++++
.../qemuxml2xmlout-intel-iommu-irqchip.xml | 31 ++++++
tests/qemuxml2xmltest.c | 4 +
37 files changed, 641 insertions(+), 89 deletions(-)
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-caching.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-caching.xml
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-irqchip.args
create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-intel-iommu-irqchip.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-intel-iommu-caching.xml
create mode 100644 tests/qemuxml2xmloutdata/qemuxml2xmlout-intel-iommu-irqchip.xml
--
2.10.2
7 years, 7 months