1. 11 7月, 2016 21 次提交
    • P
      qemu: Add cpu ID to the vCPU pid list in the status XML · 3f57ce4a
      Peter Krempa 提交于
      Note the vcpu ID so that once we allow non-contiguous vCPU topologies it
      will be possible to pair thread id's with the vcpus.
      3f57ce4a
    • P
      qemu: domain: Extract formating and parsing of vCPU thread ids · b91335af
      Peter Krempa 提交于
      Further patches will be adding index and modifying the source variables
      so this will make it more clear.
      b91335af
    • P
      qemu: domain: Add vcpu private data structure · 2540c932
      Peter Krempa 提交于
      Members will be added in follow-up patches.
      2540c932
    • P
      conf: Add private data for virDomainVcpuDef · 5fe0b6b0
      Peter Krempa 提交于
      Allow to store driver specific data on a per-vcpu basis.
      
      Move of the virDomainDef*Vcpus* functions was necessary as
      virDomainXMLOptionPtr was declared below this block and I didn't want to
      split the function headers.
      5fe0b6b0
    • P
      conf: convert def->vcpus to a array of pointers · 990b06de
      Peter Krempa 提交于
      990b06de
    • P
      tests: qemuxml2xml: Format status XML header dynamically · 7615917a
      Peter Krempa 提交于
      Status XML tests were done by prepending a constant string to an
      existing XML. With the planned changes the header will depend on data
      present in the definition rather than just on the data that was parsed.
      
      The first dynamic element in the header will be the vcpu thread list.
      Reuse and rename qemuXML2XMLPreFormatCallback for gathering the relevant
      data when checking the active XML parsing and formating and pass the
      bitmap to a newly crated header generator.
      7615917a
    • P
      conf: Don't report errors from virDomainDefGetVcpu · 9cc931f0
      Peter Krempa 提交于
      Most callers make sure that it's never called with an out of range vCPU.
      Every other caller reports a different error explicitly. Drop the error
      reporting and clean up some dead code paths.
      9cc931f0
    • P
      c7d5dd39
    • P
      conf: Extract code formatting vCPU info · 54f875dc
      Peter Krempa 提交于
      54f875dc
    • P
      conf: Annotate that private data for objects are not copied · dfe0f423
      Peter Krempa 提交于
      Our copy functions format and parse XML thus are not able to copy data.
      Annotate the private data pointers that this is happening.
      dfe0f423
    • N
      virsh: Introduce vshReadlineParse for improved auto-completion · 3987eba9
      Nishith Shah 提交于
      The new function works as expected, and matches the current level of
      autocomplete offered, along with several other improvements like quotes
      handling, multiple command completion and space handling. Now, it is easy
      to introduce options completer here.
      Signed-off-by: NNishith Shah <nishithshah.2211@gmail.com>
      3987eba9
    • N
      virsh: Add option to suppress error in various functions · aceb6308
      Nishith Shah 提交于
      A bool 'report' has been introduced in various functions, which when set
      to true will produce the error it is suppposed to produce, and when
      false, will suppress the error. These functions are used in the next
      patch for auto-completion.
      Signed-off-by: NNishith Shah <nishithshah.2211@gmail.com>
      aceb6308
    • N
      virsh: Fix variable types in readline generators · d7079ec9
      Nishith Shah 提交于
      Use unsigned int for array indexes and size_t for length variables.
      Signed-off-by: NNishith Shah <nishithshah.2211@gmail.com>
      d7079ec9
    • N
      virsh: Break vshCmddefOptParse into helper functions · 2432521e
      Nishith Shah 提交于
      Decompose vshCmddefOptParse into two helper functions, vshCmddefOptFill
      and vshCmddefCheckInternals.
      
      vshCmddefCheckInternals checks if the internal command definitions are
      correct or not.
      
      vshCmddefOptFill keeps track of the required options and mandatory
      arguments through opts_required and opts_need_arg.
      Signed-off-by: NNishith Shah <nishithshah.2211@gmail.com>
      2432521e
    • F
      bhyve: implement virConnectGetDomainCapabilities · 32916b16
      Fabian Freyer 提交于
      32916b16
    • R
      bhyve: fix bhyveargv2xml custom loader test · 9bbb3676
      Roman Bogorodskiy 提交于
      Before pushing this test, I changed the appropriate args file
      to pet test-wrap-argv.pl, but forgot to change the xml file, so
      update it accordingly.
      9bbb3676
    • F
      bhyve: add tests for bhyveParseCommandLineString · dd23c382
      Fabian Freyer 提交于
      dd23c382
    • F
      bhyve: implement argument parser for loader · 9f22b347
      Fabian Freyer 提交于
      A simple getopt-based argument parser is added for the /usr/sbin/bhyveload
      command, loosely based on its argument parser.
      
      The boot disk is guessed by iterating over all
      disks and matching their sources. If any non-default arguments are found,
      def->os.bootloaderArgs is set accordingly, and the bootloader is treated as a
      custom bootloader.
      
      Custom bootloader are supported by setting the def->os.bootloader and
      def->os.bootloaderArgs accordingly
      
      grub-bhyve is also treated as a custom bootloader. Since we don't get the
      device map in the native format anyways, we can't reconstruct the complete
      boot order. While it is possible to check what type the grub boot disk is by
      checking if the --root argument is "cd" or "hd0,msdos1", and then just use the
      first disk found, implementing the grub-bhyve argument parser as-is in the
      grub-bhyve source would mean adding a dependency to argp or duplicating lots
      of the code of argp. Therefore it's not really worth implementing that now.
      Signed-off-by: NFabian Freyer <fabian.freyer@physik.tu-berlin.de>
      9f22b347
    • F
      bhyve: implement bhyve argument parser · 8151b300
      Fabian Freyer 提交于
      A simpe getopt-based argument parser is added for the /usr/sbin/bhyve command,
      loosely based on its argument parser, which reads the following from the bhyve
      command line string:
      
      * vm name
      * number of vcpus
      * memory size
      * the time offset (UTC or localtime)
      * features:
        * acpi
        * ioapic: While this flag is deprecated in FreeBSD r257423, keep checking for
          it for backwards compatibiility.
      * the domain UUID; if not explicitely given, one will be generated.
      * lpc devices: for now only the com1 and com2 are supported. It is required for
         these to be /dev/nmdm[\d+][AB], and the slave devices are automatically
         inferred from these to be the corresponding end of the virtual null-modem
         cable: /dev/nmdm<N>A <-> /dev/nmdm<N>B
      * PCI devices:
        * Disks: these are numbered in the order they are found, for virtio and ahci
          disks separately. The destination is set to sdX or vdX with X='a'+index;
          therefore only 'z'-'a' disks are supported.
          Disks are considered to be block devices if the path
          starts with /dev, otherwise they are considered to be files.
        * Networks: only tap devices are supported. Since it isn't possible to tell
          the type of the network, VIR_DOMAIN_NET_TYPE_ETHERNET is assumed, since it
          is the most generic. If no mac is specified, one will be generated.
      Signed-off-by: NFabian Freyer <fabian.freyer@physik.tu-berlin.de>
      8151b300
    • F
      bhyve: implement virConnectDomainXMLFromNative · 01163b1b
      Fabian Freyer 提交于
      First, remove escaped newlines and split up the string into an argv-list for
      the bhyve and loader commands, respectively. This is done by iterating over the
      string splitting it by newlines, and then re-iterating over each line,
      splitting it by spaces.
      
      Since this code reuses part of the code of qemu_parse_command.c
      (in bhyveCommandLine2argv), add the appropriate copyright notices.
      Signed-off-by: NFabian Freyer <fabian.freyer@physik.tu-berlin.de>
      01163b1b
    • F
      gnulib: add getopt module · b436a8ae
      Fabian Freyer 提交于
      Unconditionally use gnulib's getopt module. This is needed by the bhyve driver
      to provide a reentrant interface for getopt.
      
      Several gnulib headers rely on features.h being included by ctype.h to provide
      __GNUC_PREREQ, but on systems without glibc, this is not provided. In these
      cases __GNUC_PREREQ gets redefined to 0, which causes build errors from checks
      in src/internal.h.
      Therefore, define __GNUC_PREREQ as early as possible. config-post.h is probably
      the first header that is included, before any other headers.
      b436a8ae
  2. 09 7月, 2016 4 次提交
  3. 08 7月, 2016 2 次提交
  4. 07 7月, 2016 13 次提交