1. 26 8月, 2019 4 次提交
  2. 19 6月, 2019 1 次提交
  3. 14 12月, 2018 3 次提交
    • D
      Enforce a standard header file guard symbol name · 568a4172
      Daniel P. Berrangé 提交于
      Require that all headers are guarded by a symbol named
      
        LIBVIRT_$FILENAME
      
      where $FILENAME is the uppercased filename, with all characters
      outside a-z changed into '_'.
      
      Note we do not use a leading __ because that is technically a
      namespace reserved for the toolchain.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      568a4172
    • D
      Fix many mistakes & inconsistencies in header file layout · 4cfd7090
      Daniel P. Berrangé 提交于
      This introduces a syntax-check script that validates header files use a
      common layout:
      
        /*
         ...copyright header...
         */
        <one blank line>
        #ifndef SYMBOL
        # define SYMBOL
        ....content....
        #endif /* SYMBOL */
      
      For any file ending priv.h, before the #ifndef, we will require a
      guard to prevent bogus imports:
      
        #ifndef SYMBOL_ALLOW
        # error ....
        #endif /* SYMBOL_ALLOW */
        <one blank line>
      
      The many mistakes this script identifies are then fixed.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      4cfd7090
    • D
      Remove all Author(s): lines from source file headers · 60046283
      Daniel P. Berrangé 提交于
      In many files there are header comments that contain an Author:
      statement, supposedly reflecting who originally wrote the code.
      In a large collaborative project like libvirt, any non-trivial
      file will have been modified by a large number of different
      contributors. IOW, the Author: comments are quickly out of date,
      omitting people who have made significant contribitions.
      
      In some places Author: lines have been added despite the person
      merely being responsible for creating the file by moving existing
      code out of another file. IOW, the Author: lines give an incorrect
      record of authorship.
      
      With this all in mind, the comments are useless as a means to identify
      who to talk to about code in a particular file. Contributors will always
      be better off using 'git log' and 'git blame' if they need to  find the
      author of a particular bit of code.
      
      This commit thus deletes all Author: comments from the source and adds
      a rule to prevent them reappearing.
      
      The Copyright headers are similarly misleading and inaccurate, however,
      we cannot delete these as they have legal meaning, despite being largely
      inaccurate. In addition only the copyright holder is permitted to change
      their respective copyright statement.
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      60046283
  4. 06 9月, 2018 1 次提交
  5. 22 6月, 2016 1 次提交
    • P
      qemu: agent: Make setting of vcpus more robust · b1aa91e1
      Peter Krempa 提交于
      Documentation for the "guest-set-vcpus" command describes a proper
      algorithm how to set vcpus. This patch makes the following changes:
      
      - state of cpus that has not changed is not updated
      - if the command was partially successful the command is re-tried with
        the rest of the arguments to get a proper error message
      - code is more robust against malicious guest agent
      - fix testsuite to the new semantics
      b1aa91e1
  6. 12 1月, 2016 1 次提交
    • M
      qemu: change qemuFindAgentConfig return type · d5762cc0
      Michal Privoznik 提交于
      While this is no functional change, whole channel definition is
      going to be needed very soon. Moreover, while touching this obey
      const correctness rule in qemuAgentOpen() - so far it was passed
      regular pointer to channel config even though the function is
      expected to not change pointee at all. Pass const pointer
      instead.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      d5762cc0
  7. 21 5月, 2015 1 次提交
  8. 07 5月, 2015 1 次提交
    • M
      processSerialChangedEvent: Close agent monitor early · 2af51483
      Michal Privoznik 提交于
      https://bugzilla.redhat.com/show_bug.cgi?id=890648
      
      So, imagine you've issued an API that involves guest agent. For
      instance, you want to query guest's IP addresses. So the API acquires
      QUERY_JOB, locks the guest agent and issues the agent command.
      However, for some reason, guest agent replies to initial ping
      correctly, but then crashes tragically while executing real command
      (in this case guest-network-get-interfaces). Since initial ping went
      well, libvirt thinks guest agent is accessible and awaits reply to the
      real command. But it will never come. What will is a monitor event.
      Our handler (processSerialChangedEvent) will try to acquire
      MODIFY_JOB, which will fail obviously because the other thread that's
      executing the API already holds a job. So the event handler exits
      early, and the QUERY_JOB is never released nor ended.
      
      The way how to solve this is to put flag somewhere in the monitor
      internals. The flag is called @running and agent commands are issued
      iff the flag is set. The flag itself is set when we connect to the
      agent socket. And unset whenever we see DISCONNECT event from the
      agent. Moreover, we must wake up all the threads waiting for the
      agent. This is done by signalizing the condition they're waiting on.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      2af51483
  9. 17 3月, 2015 1 次提交
    • N
      domifaddr: Implement the API for qemu · 0977b8aa
      Nehal J Wani 提交于
      By querying the qemu guest agent with the QMP command
      "guest-network-get-interfaces" and converting the received JSON
      output to structured objects.
      
      Although "ifconfig" is deprecated, IP aliases created by "ifconfig"
      are supported by this API. The legacy syntax of an IP alias is:
      "<ifname>:<alias-name>". Since we want all aliases to be clubbed
      under parent interface, simply stripping ":<alias-name>" suffices.
      Note that IP aliases formed by "ip" aren't visible to "ifconfig",
      and aliases created by "ip" do not have any specific name. But
      we are lucky, as qemu guest agent detects aliases created by both.
      
      src/qemu/qemu_agent.h:
        * Define qemuAgentGetInterfaces
      
      src/qemu/qemu_agent.c:
        * Implement qemuAgentGetInterface
      
      src/qemu/qemu_driver.c:
        * New function qemuGetDHCPInterfaces
        * New function qemuDomainInterfaceAddresses
      
      src/remote_protocol-sructs:
        * Define new structs
      
      tests/qemuagenttest.c:
        * Add new test: testQemuAgentGetInterfaces
          Test cases for IP aliases, 0 or multiple ipv4/ipv6 address(es)
      Signed-off-by: NNehal J Wani <nehaljw.kkd1@gmail.com>
      0977b8aa
  10. 24 11月, 2014 1 次提交
  11. 15 5月, 2014 1 次提交
  12. 13 5月, 2014 1 次提交
  13. 31 7月, 2013 1 次提交
  14. 07 6月, 2013 1 次提交
  15. 16 1月, 2013 1 次提交
  16. 28 11月, 2012 1 次提交
    • M
      qemu: Implement virDomainFSTrim · 6092fea9
      Michal Privoznik 提交于
      using qemu guest agent. As said in previous patch,
      @mountPoint must be NULL and @flags zero because
      qemu guest agent doesn't support these arguments
      yet. If qemu learns them, we can start supporting
      them as well.
      6092fea9
  17. 21 9月, 2012 1 次提交
  18. 04 9月, 2012 1 次提交
    • J
      qemu: Fix reboot with guest agent · 03c42a45
      Jiri Denemark 提交于
      When reboot using qemu guest agent was requested, qemu driver kept
      waiting for SHUTDOWN event from qemu. However, such event is never
      emitted during guest reboot and qemu driver would keep waiting forever.
      03c42a45
  19. 23 8月, 2012 1 次提交
  20. 07 8月, 2012 1 次提交
  21. 23 7月, 2012 1 次提交
    • O
      Desert the FSF address in copyright · f9ce7dad
      Osier Yang 提交于
      Per the FSF address could be changed from time to time, and GNU
      recommends the following now: (http://www.gnu.org/licenses/gpl-howto.html)
      
        You should have received a copy of the GNU General Public License
        along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
      
      This patch removes the explicit FSF address, and uses above instead
      (of course, with inserting 'Lesser' before 'General').
      
      Except a bunch of files for security driver, all others are changed
      automatically, the copyright for securify files are not complete,
      that's why to do it manually:
      
        src/security/security_selinux.h
        src/security/security_driver.h
        src/security/security_selinux.c
        src/security/security_apparmor.h
        src/security/security_apparmor.c
        src/security/security_driver.c
      f9ce7dad
  22. 16 6月, 2012 1 次提交
    • M
      qemu_agent: Wait for events instead of agent response · d97a234c
      Michal Privoznik 提交于
      With latest changes to qemu-ga success on some commands is not reported
      anymore, e.g. guest-shutdown or guest-suspend-*. However, errors are
      still being reported. Therefore, we need to find different source of
      indication if operation was successful. Events.
      d97a234c
  23. 15 2月, 2012 1 次提交
  24. 25 1月, 2012 1 次提交
  25. 24 1月, 2012 1 次提交
    • D
      QEMU guest agent support · c160ce33
      Daniel P. Berrange 提交于
      There is now a standard QEMU guest agent that can be installed
      and given a virtio serial channel
      
          <channel type='unix'>
            <source mode='bind' path='/var/lib/libvirt/qemu/f16x86_64.agent'/>
            <target type='virtio' name='org.qemu.guest_agent.0'/>
          </channel>
      
      The protocol that runs over the guest agent is JSON based and
      very similar to the JSON monitor. We can't use exactly the same
      code because there are some odd differences in the way messages
      and errors are structured. The qemu_agent.c file is based on
      a combination and simplification of qemu_monitor.c and
      qemu_monitor_json.c
      
      * src/qemu/qemu_agent.c, src/qemu/qemu_agent.h: Support for
        talking to the agent for shutdown
      * src/qemu/qemu_domain.c, src/qemu/qemu_domain.h: Add thread
        helpers for talking to the agent
      * src/qemu/qemu_process.c: Connect to agent whenever starting
        a guest
      * src/qemu/qemu_monitor_json.c: Make variable static
      c160ce33