1. 18 1月, 2018 10 次提交
  2. 12 1月, 2018 1 次提交
  3. 11 1月, 2018 2 次提交
  4. 10 1月, 2018 1 次提交
    • J
      cputest: Fix cpu-cpuid.py diff command · 5ea187bc
      Jiri Denemark 提交于
      The cpuidMap in cpu-cpuid.py was created for converting old data files
      (with QEMU's feature-words bits) to the new model-expansion based data.
      When I added tests for CPU live update based on disabled/enabled feature
      lists I shamelessly used the existing cpuidMap for generating the
      *-{enabled,disabled}.xml data files. Thus any new CPUID bits which are
      not present in the original cpuidMap would be ignored. The correct thing
      to do is to use cpu_map.xml.
      
      All data files were fixed by running the following command:
      
          ./cpu-cpuid.py diff *.json
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      Reviewed-by: NPavel Hrdina <phrdina@redhat.com>
      5ea187bc
  5. 08 1月, 2018 3 次提交
  6. 06 1月, 2018 2 次提交
  7. 04 1月, 2018 6 次提交
    • P
      qemu: capabilities: force update if the microcode version does not match · b527589d
      Paolo Bonzini 提交于
      A microcode update can cause the CPUID bits to change; an example
      from the past was the update that disabled TSX on several Haswell
      and Broadwell machines.
      
      Therefore, place microcode version in the virQEMUCaps struct and
      XML, and rebuild the cache if the versions do not match.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NJiri Denemark <jdenemar@redhat.com>
      b527589d
    • J
      conf: Use existing SCSI hostdev model to create new · c52dbafe
      John Ferlan 提交于
      In virDomainDefMaybeAddHostdevSCSIcontroller when we add a new
      controller because someone neglected to add one or we're adding
      one because the existing one is full, we should copy over the
      model number from the existing controller since whatever we
      create should at least have the same characteristics as the one
      we cannot use because it's full.
      
      NB: This affects the existing hostdev-scsi-autogen-address test
      which would add a default ('lsi') SCSI controller for the various
      scsi_host's that would create a controller for the hostdev.
      c52dbafe
    • M
      tests: virnetdaemontest: Enable testing for 'auth_pending' · 27e2e855
      Marc Hartmayer 提交于
      Enable testing for 'auth_pending' in the virnetdaemon test case.
      Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com>
      Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      27e2e855
    • M
      rpc: virnetserver: Fix race on srv->nclients_unauth · 94bbbcee
      Marc Hartmayer 提交于
      There is a race between virNetServerProcessClients (main thread) and
      remoteDispatchAuthList/remoteDispatchAuthPolkit/remoteSASLFinish (worker
      thread) that can lead to decrementing srv->nclients_unauth when it's
      zero. Since virNetServerCheckLimits relies on the value
      srv->nclients_unauth the underrun causes libvirtd to stop accepting
      new connections forever.
      
      Example race scenario (assuming libvirtd is using policykit and the
      client is privileged):
        1. The client calls the RPC remoteDispatchAuthList =>
           remoteDispatchAuthList is executed on a worker thread (Thread
           T1). We're assuming now the execution stops for some time before
           the line 'virNetServerClientSetAuth(client, 0)'
        2. The client closes the connection irregularly. This causes the
           event loop to wake up and virNetServerProcessClient to be
           called (on the main thread T0). During the
           virNetServerProcessClients the srv lock is hold. The condition
           virNetServerClientNeedAuth(client) will be checked and as the
           authentication is not finished right now
           virNetServerTrackCompletedAuthLocked(srv) will be called =>
           --srv->nclients_unauth => 0
        3. The Thread T1 continues, marks the client as authenticated, and
           calls virNetServerTrackCompletedAuthLocked(srv) =>
           --srv->nclients_unauth => --0 => wrap around as nclient_unauth is
           unsigned
        4. virNetServerCheckLimits(srv) will disable the services forever
      
      To fix it, add an auth_pending field to the client struct so that it
      is now possible to determine if the authentication process has already
      been handled for this client.
      
      Setting the authentication method to none for the client in
      virNetServerProcessClients is not a proper way to indicate that the
      counter has been decremented, as this would imply that the client is
      authenticated.
      
      Additionally, adjust the existing test cases for this new field.
      Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com>
      Reviewed-by: NBoris Fiuczynski <fiuczy@linux.vnet.ibm.com>
      94bbbcee
    • M
      tests: virnetserverclienttest: Fix memory leak @client · 4ec8baf3
      Marc Hartmayer 提交于
      Direct leak of 104 byte(s) in 1 object(s) allocated from:
          #0 0x7f904bfbe12b  (/lib64/liblsan.so.0+0xe12b)
          #1 0x7f904ba0ad67 in virAlloc ../../src/util/viralloc.c:144
          #2 0x7f904bbc11a4 in virNetMessageNew ../../src/rpc/virnetmessage.c:42
          #3 0x7f904bbb8e77 in virNetServerClientNewInternal ../../src/rpc/virnetserverclient.c:392
          #4 0x7f904bbb9921 in virNetServerClientNew ../../src/rpc/virnetserverclient.c:440
          #5 0x402ce5 in testIdentity ../../tests/virnetserverclienttest.c:55
          #6 0x403bed in virTestRun ../../tests/testutils.c:180
          #7 0x402c1e in mymain ../../tests/virnetserverclienttest.c:146
          #8 0x404c80 in virTestMain ../../tests/testutils.c:1119
          #9 0x4030d5 in main ../../tests/virnetserverclienttest.c:152
          #10 0x7f9047f7f889 in __libc_start_main (/lib64/libc.so.6+0x20889)
      
      Indirect leak of 4 byte(s) in 1 object(s) allocated from:
          #0 0x7f904bfbe12b  (/lib64/liblsan.so.0+0xe12b)
          #1 0x7f904ba0adc7 in virAllocN ../../src/util/viralloc.c:191
          #2 0x7f904bbb8ec7 in virNetServerClientNewInternal ../../src/rpc/virnetserverclient.c:395
          #3 0x7f904bbb9921 in virNetServerClientNew ../../src/rpc/virnetserverclient.c:440
          #4 0x402ce5 in testIdentity ../../tests/virnetserverclienttest.c:55
          #5 0x403bed in virTestRun ../../tests/testutils.c:180
          #6 0x402c1e in mymain ../../tests/virnetserverclienttest.c:146
          #7 0x404c80 in virTestMain ../../tests/testutils.c:1119
          #8 0x4030d5 in main ../../tests/virnetserverclienttest.c:152
          #9 0x7f9047f7f889 in __libc_start_main (/lib64/libc.so.6+0x20889)
      
      SUMMARY: LeakSanitizer: 108 byte(s) leaked in 2 allocation(s).
      Signed-off-by: NMarc Hartmayer <mhartmay@linux.vnet.ibm.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      4ec8baf3
    • M
      virstringtest: Fix alignment of backslashes · 474c7a2f
      Michal Privoznik 提交于
      We don't try to right align the backslashes anymore.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      474c7a2f
  8. 03 1月, 2018 2 次提交
  9. 02 1月, 2018 1 次提交
  10. 14 12月, 2017 2 次提交
    • P
      conf: Add infrastructure for disk source private data XML · aed3d038
      Peter Krempa 提交于
      VM drivers may need to store additional private data to the status XML
      so that it can be restored after libvirtd restart. Since not everything
      is needed add a callback infrastructure, where VM drivers can add only
      stuff they need.
      
      Note that the private data is formatted as a <privateData> sub-element
      of the <disk> or <backingStore> <source> sub-element. This is done since
      storing it out of band (in the VM private data) would require a complex
      matching process to allow to put the data into correct place.
      aed3d038
    • J
      qemu: Need to assign PCI address to vhost-scsi · 10c73bf1
      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.
      10c73bf1
  11. 13 12月, 2017 1 次提交
  12. 12 12月, 2017 1 次提交
    • M
      fillQemuCaps: Don't leak machine string · fb8c0ea8
      Michal Privoznik 提交于
      ==25251== 5 bytes in 1 blocks are definitely lost in loss record 7 of 81
      ==25251==    at 0x4C2BEDF: malloc (vg_replace_malloc.c:299)
      ==25251==    by 0x967E379: strdup (in /lib64/libc-2.25.so)
      ==25251==    by 0x5366F9F: virStrdup (virstring.c:941)
      ==25251==    by 0x538BF1D: virDomainCapsNew (domain_capabilities.c:121)
      ==25251==    by 0x10EACE: test_virDomainCapsFormat (domaincapstest.c:295)
      ==25251==    by 0x10FBD2: virTestRun (testutils.c:180)
      ==25251==    by 0x10F192: mymain (domaincapstest.c:457)
      ==25251==    by 0x111C7F: virTestMain (testutils.c:1119)
      ==25251==    by 0x10FA3C: main (domaincapstest.c:528)
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      fb8c0ea8
  13. 09 12月, 2017 1 次提交
  14. 07 12月, 2017 3 次提交
  15. 05 12月, 2017 4 次提交