You need to sign in or sign up before continuing.
  1. 14 12月, 2018 1 次提交
  2. 19 10月, 2018 1 次提交
  3. 02 7月, 2018 1 次提交
  4. 09 2月, 2018 1 次提交
  5. 06 12月, 2017 1 次提交
    • D
      smbios: support setting OEM strings table · 2d6dcbf9
      Daniel P. Berrange 提交于
      The cloud-init program currently allows fetching of its data by repurposing of
      the 'system' type 'serial' field. This is a clear abuse of the serial field that
      would clash with other valid usage a virt management app might have for that
      field.
      
      Fortunately the SMBIOS defines an "OEM Strings" table whose puporse is to allow
      exposing of arbitrary vendor specific strings to the operating system. This is
      perfect for use with cloud-init, or as a way to pass arguments to OS installers
      such as anaconda.
      
      This patch makes it easier to support this with QEMU. e.g.
      
        $QEMU -smbios type=11,value=Hello,value=World,value=Tricky,,value=test
      
      Which results in the guest seeing dmidecode data
      
        Handle 0x0E00, DMI type 11, 5 bytes
        OEM Strings
                String 1: Hello
                String 2: World
                String 3: Tricky,value=test
      
      It is suggested that any app wanting to make use of this OEM strings capability
      for accepting data from the host mgmt layer should use its name as a string
      prefix. e.g. to expose OEM strings targetting both cloud init and anaconda in
      parallel the mgmt app could set
      
        $QEMU -smbios type=11,value=cloud-init:ds=nocloud-net;s=http://10.10.0.1:8000/,\
              value=anaconda:method=http://dl.fedoraproject.org/pub/fedora/linux/releases/25/x86_64/os
      
      which would appear as
      
        Handle 0x0E00, DMI type 11, 5 bytes
        OEM Strings
                String 1: cloud-init:ds=nocloud-net;s=http://10.10.0.1:8000/
                String 2: anaconda:method=http://dl.fedoraproject.org/pub/fedora/linux/releases/25/x86_64/os
      
      Use of such string prefixes means the app won't have to care which string slot
      its data appears in.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      2d6dcbf9
  6. 17 1月, 2017 1 次提交
  7. 29 9月, 2016 1 次提交
  8. 23 9月, 2016 2 次提交
    • F
      vl: Switch qemu_uuid to QemuUUID · 9c5ce8db
      Fam Zheng 提交于
      Update all qemu_uuid users as well, especially get rid of the duplicated
      low level g_strdup_printf, sscanf and snprintf calls with QEMU UUID API.
      
      Since qemu_uuid_parse is quite tangled with qemu_uuid, its switching to
      QemuUUID is done here too to keep everything in sync and avoid code
      churn.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NJeff Cody <jcody@redhat.com>
      Message-Id: <1474432046-325-10-git-send-email-famz@redhat.com>
      9c5ce8db
    • F
      util: Add UUID API · cea25275
      Fam Zheng 提交于
      A number of different places across the code base use CONFIG_UUID. Some
      of them are soft dependency, some are not built if libuuid is not
      available, some come with dummy fallback, some throws runtime error.
      
      It is hard to maintain, and hard to reason for users.
      
      Since UUID is a simple standard with only a small number of operations,
      it is cleaner to have a central support in libqemuutil. This patch adds
      qemu_uuid_* functions that all uuid users in the code base can
      rely on. Except for qemu_uuid_generate which is new code, all other
      functions are just copy from existing fallbacks from other files.
      
      Note that qemu_uuid_parse is moved without updating the function
      signature to use QemuUUID, to keep this patch simple.
      Signed-off-by: NFam Zheng <famz@redhat.com>
      Reviewed-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NJeff Cody <jcody@redhat.com>
      Message-Id: <1474432046-325-2-git-send-email-famz@redhat.com>
      cea25275
  9. 24 6月, 2016 2 次提交
  10. 23 3月, 2016 1 次提交
    • M
      include/qemu/osdep.h: Don't include qapi/error.h · da34e65c
      Markus Armbruster 提交于
      Commit 57cb38b3 included qapi/error.h into qemu/osdep.h to get the
      Error typedef.  Since then, we've moved to include qemu/osdep.h
      everywhere.  Its file comment explains: "To avoid getting into
      possible circular include dependencies, this file should not include
      any other QEMU headers, with the exceptions of config-host.h,
      compiler.h, os-posix.h and os-win32.h, all of which are doing a
      similar job to this file and are under similar constraints."
      qapi/error.h doesn't do a similar job, and it doesn't adhere to
      similar constraints: it includes qapi-types.h.  That's in excess of
      100KiB of crap most .c files don't actually need.
      
      Add the typedef to qemu/typedefs.h, and include that instead of
      qapi/error.h.  Include qapi/error.h in .c files that need it and don't
      get it now.  Include qapi-types.h in qom/object.h for uint16List.
      
      Update scripts/clean-includes accordingly.  Update it further to match
      reality: replace config.h by config-target.h, add sysemu/os-posix.h,
      sysemu/os-win32.h.  Update the list of includes in the qemu/osdep.h
      comment quoted above similarly.
      
      This reduces the number of objects depending on qapi/error.h from "all
      of them" to less than a third.  Unfortunately, the number depending on
      qapi-types.h shrinks only a little.  More work is needed for that one.
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      [Fix compilation without the spice devel packages. - Paolo]
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      da34e65c
  11. 17 3月, 2016 1 次提交
  12. 29 1月, 2016 1 次提交
    • P
      hw: Clean up includes · 0430891c
      Peter Maydell 提交于
      Clean up includes so that osdep.h is included first and headers
      which it implies are not included manually.
      
      This commit was created with scripts/clean-includes.
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Message-id: 1453832250-766-38-git-send-email-peter.maydell@linaro.org
      0430891c
  13. 13 1月, 2016 1 次提交
    • M
      Use error_fatal to simplify obvious fatal errors · 007b0657
      Markus Armbruster 提交于
      Done with this Coccinelle semantic patch:
      
          @@
          type T;
          identifier FUN, RET;
          expression list ARGS;
          expression ERR, EC;
          @@
          (
          -    T RET = FUN(ARGS, &ERR);
          +    T RET = FUN(ARGS, &error_fatal);
          |
          -    RET = FUN(ARGS, &ERR);
          +    RET = FUN(ARGS, &error_fatal);
          |
          -    FUN(ARGS, &ERR);
          +    FUN(ARGS, &error_fatal);
          )
          -    if (ERR != NULL) {
          -        error_report_err(ERR);
          -        exit(EC);
          -    }
      
      This is actually a more elegant version of my initial semantic patch
      by courtesy of Eduardo.
      
      It leaves dead Error * variables behind, cleaned up manually.
      
      Cc: qemu-arm@nongnu.org
      Cc: "Michael S. Tsirkin" <mst@redhat.com>
      Cc: Eduardo Habkost <ehabkost@redhat.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Signed-off-by: NMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: NEduardo Habkost <ehabkost@redhat.com>
      007b0657
  14. 07 9月, 2015 1 次提交
  15. 13 8月, 2015 2 次提交
  16. 19 3月, 2015 1 次提交
  17. 18 2月, 2015 1 次提交
  18. 27 1月, 2015 2 次提交
  19. 13 11月, 2014 1 次提交
  20. 02 11月, 2014 2 次提交
    • E
      smbios: Encode UUID according to SMBIOS specification · caad057b
      Eduardo Habkost 提交于
      Differently from older versions, SMBIOS version 2.6 is explicit about
      the encoding of UUID fields:
      
      > Although RFC 4122 recommends network byte order for all fields, the PC
      > industry (including the ACPI, UEFI, and Microsoft specifications) has
      > consistently used little-endian byte encoding for the first three fields:
      > time_low, time_mid, time_hi_and_version. The same encoding, also known as
      > wire format, should also be used for the SMBIOS representation of the UUID.
      >
      > The UUID {00112233-4455-6677-8899-AABBCCDDEEFF} would thus be represented
      > as 33 22 11 00 55 44 77 66 88 99 AA BB CC DD EE FF.
      
      The dmidecode tool implements this and decodes the above "wire format"
      when SMBIOS version >= 2.6. We moved from SMBIOS version 2.4 to 2.8 when
      we started building the SMBIOS entry point inside QEMU, on commit
      c97294ec.
      
      Change smbios_build_type_1_table() to encode the UUID as specified.
      
      To make sure we won't change the guest-visible UUID when upgrading to a
      newer QEMU version, keep the old behavior on pc-*-2.1 and older.
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      caad057b
    • E
      smbios: Fix assertion on socket count calculation · 7dfddd7f
      Eduardo Habkost 提交于
      QEMU currently allows the number of VCPUs to not be a multiple of the
      number of threads per socket, but the smbios socket count calculation
      introduced by commit c97294ec doesn't
      take that into account, triggering an assertion. e.g.:
      
        $ ./x86_64-softmmu/qemu-system-x86_64 -smp 4,sockets=2,cores=6,threads=1
        qemu-system-x86_64: /home/ehabkost/rh/proj/virt/qemu/hw/i386/smbios.c:825: smbios_get_tables: Assertion `smbios_smp_sockets >= 1' failed.
        Aborted (core dumped)
      
      Socket count calculation doesn't belong to smbios.c and should
      eventually be moved to the main SMP topology configuration code. But
      while we don't move the code, at least make it correct by rounding up
      the division.
      
      Cc: Gabriel Somlo <somlo@cmu.edu>
      Cc: qemu-stable@nongnu.org
      Signed-off-by: NEduardo Habkost <ehabkost@redhat.com>
      Reviewed-By: NIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: NMichael S. Tsirkin <mst@redhat.com>
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      
      7dfddd7f
  21. 10 6月, 2014 1 次提交
  22. 21 5月, 2014 3 次提交
  23. 05 5月, 2014 4 次提交
  24. 10 12月, 2013 1 次提交
  25. 29 9月, 2013 5 次提交
  26. 14 6月, 2013 1 次提交