]> git.ipfire.org Git - thirdparty/libvirt.git/commit
schemas: Introduce disk type NVMe
authorMichal Privoznik <mprivozn@redhat.com>
Mon, 3 Jun 2019 08:46:18 +0000 (10:46 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Tue, 17 Dec 2019 09:04:43 +0000 (10:04 +0100)
commite1b022890e0a14e57bf13ae9cbbcfa95e57ad7e4
tree1fcbdcc7e1cb69ad87d04e4cb48d927e9c8a9202
parent1ee471960be2a342672f650e6cc682df2d1def18
schemas: Introduce disk type NVMe

There is this class of PCI devices that act like disks: NVMe.
Therefore, they are both PCI devices and disks. While we already
have <hostdev/> (and can assign a NVMe device to a domain
successfully) we don't have disk representation. There are three
problems with PCI assignment in case of a NVMe device:

1) domains with <hostdev/> can't be migrated

2) NVMe device is assigned whole, there's no way to assign only a
   namespace

3) Because hypervisors see <hostdev/> they don't put block layer
   on top of it - users don't get all the fancy features like
   snapshots

NVMe namespaces are way of splitting one continuous NVDIMM memory
into smaller ones, effectively creating smaller NVMe-s (which can
then be partitioned, LVMed, etc.)

Because of all of this the following XML was chosen to model a
NVMe device:

  <disk type='nvme' device='disk'>
    <driver name='qemu' type='raw'/>
    <source type='pci' managed='yes' namespace='1'>
      <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
    </source>
    <target dev='vda' bus='virtio'/>
  </disk>

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
docs/formatdomain.html.in
docs/schemas/domaincommon.rng
tests/qemuxml2argvdata/disk-nvme.xml [new file with mode: 0644]