1. 14 12月, 2018 1 次提交
  2. 19 10月, 2018 1 次提交
  3. 02 7月, 2018 1 次提交
  4. 09 2月, 2018 3 次提交
  5. 18 12月, 2017 1 次提交
  6. 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
  7. 17 1月, 2017 2 次提交
  8. 29 9月, 2016 1 次提交
  9. 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
  10. 24 6月, 2016 2 次提交
  11. 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
  12. 17 3月, 2016 1 次提交
  13. 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
  14. 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
  15. 07 9月, 2015 1 次提交
  16. 13 8月, 2015 1 次提交
反馈
建议
客服 返回
顶部