1. 12 6月, 2018 1 次提交
  2. 06 6月, 2018 2 次提交
    • S
      qemu: Add swtpm to emulator cgroup · 3f1a7070
      Stefan Berger 提交于
      Add the external swtpm to the emulator cgroup so that upper limits of CPU
      usage can be enforced on the emulated TPM.
      
      To enable this we need to have the swtpm write its process id (pid) into a
      file. We then read it from the file to configure the emulator cgroup.
      
      The PID file is created in /var/run/libvirt/qemu/swtpm:
      
      [root@localhost swtpm]# ls -lZ /var/run/libvirt/qemu/swtpm/
      total 4
      -rw-r--r--. 1 tss  tss  system_u:object_r:qemu_var_run_t:s0          5 Apr 10 12:26 1-testvm-swtpm.pid
      srw-rw----. 1 qemu qemu system_u:object_r:svirt_image_t:s0:c597,c632 0 Apr 10 12:26 1-testvm-swtpm.sock
      
      The swtpm command line now looks as follows:
      
      root@localhost testvm]# ps auxZ | grep swtpm | grep socket | grep -v grep
      system_u:system_r:virtd_t:s0:c597,c632 tss 18697 0.0  0.0 28172 3892 ?       Ss   16:46   0:00 /usr/bin/swtpm socket --daemon --ctrl type=unixio,path=/var/run/libvirt/qemu/swtpm/1-testvm-swtpm.sock,mode=0600 --tpmstate dir=/var/lib/libvirt/swtpm/485d0004-a48f-436a-8457-8a3b73e28568/tpm1.2/ --log file=/var/log/swtpm/libvirt/qemu/testvm-swtpm.log --pid file=/var/run/libvirt/qemu/swtpm/1-testvm-swtpm.pid
      Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      3f1a7070
    • S
      conf: Add support for external swtpm TPM emulator to domain XML · 33af0b2b
      Stefan Berger 提交于
      This patch adds support for an external swtpm TPM emulator. The XML for
      this type of TPM looks as follows:
      
       <tpm model='tpm-tis'>
         <backend type='emulator'/>
       </tpm>
      
      The XML will currently only define a TPM 1.2.
      
      Extend the documentation.
      
      Add a test case testing the XML parser and formatter.
      Signed-off-by: NStefan Berger <stefanb@linux.vnet.ibm.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      33af0b2b
  3. 11 5月, 2018 1 次提交
  4. 05 4月, 2018 1 次提交
    • M
      qemu_cgroup: Handle device mapper targets properly · 6dd84f68
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=1557769
      
      Problem with device mapper targets is that there can be several
      other devices 'hidden' behind them. For instance, /dev/dm-1 can
      consist of /dev/sda, /dev/sdb and /dev/sdc. Therefore, when
      setting up devices CGroup and namespaces we have to take this
      into account.
      
      This bug was exposed after Linux kernel was fixed. Initially,
      kernel used different functions for getting block device in
      open() and ioctl(). While CGroup permissions were checked in the
      former case, due to a bug in kernel they were not checked in the
      latter case. This changed with the upstream commit of
      519049afead4f7c3e6446028c41e99fde958cc04 (v4.16-rc5~11^2~4).
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      6dd84f68
  5. 31 1月, 2018 1 次提交
  6. 04 1月, 2018 1 次提交
  7. 25 11月, 2017 1 次提交
  8. 17 10月, 2017 1 次提交
    • P
      util: storagefile: Add helpers to check presence of backing store · 0a294a8e
      Peter Krempa 提交于
      Add helpers that will simplify checking if a backing file is valid or
      whether it has backing store. The helper virStorageSourceIsBacking
      returns true if the given virStorageSource is a valid backing store
      member. virStorageSourceHasBacking returns true if the virStorageSource
      has a backing store child.
      
      Adding these functions creates a central points for further refactors.
      0a294a8e
  9. 26 7月, 2017 1 次提交
  10. 25 7月, 2017 1 次提交
  11. 15 3月, 2017 1 次提交
  12. 23 2月, 2017 1 次提交
    • M
      qemu_cgroup: Only try to allow devices if devices CGroup's available · 3cddd63a
      Michal Privoznik 提交于
      When a domain needs an access to some device (be it a disk, RNG,
      chardev, whatever), we have to allow it in the devices CGroup (if
      it is available), because by default we disallow all the devices.
      But some of the functions that are responsible for setting up
      devices CGroup are lacking check whether there is any CGroup
      available. Thus users might be unable to hotplug some devices:
      
        virsh # attach-device fedora rng.xml
        error: Failed to attach device from rng.xml
        error: internal error: Controller 'devices' is not mounted
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      3cddd63a
  13. 20 2月, 2017 7 次提交
  14. 15 12月, 2016 1 次提交
  15. 25 11月, 2016 3 次提交
  16. 23 11月, 2016 2 次提交
  17. 12 11月, 2016 1 次提交
  18. 22 10月, 2016 1 次提交
  19. 14 9月, 2016 1 次提交
  20. 13 9月, 2016 1 次提交
  21. 07 9月, 2016 1 次提交
  22. 11 7月, 2016 1 次提交
  23. 23 5月, 2016 1 次提交
  24. 19 5月, 2016 1 次提交
  25. 11 4月, 2016 1 次提交
  26. 01 3月, 2016 2 次提交
  27. 18 2月, 2016 1 次提交
  28. 17 2月, 2016 2 次提交