Skip to content
  • Philippe Mathieu-Daudé's avatar
    8d0bceba
    hw/nvram: Always register FW_CFG_DATA_GENERATOR_INTERFACE · 8d0bceba
    Philippe Mathieu-Daudé authored
    
    
    While the FW_CFG_DATA_GENERATOR_INTERFACE is only consumed
    by a device only available using system-mode (fw_cfg), it is
    implemented by a crypto component (tls-cipher-suites) which
    is always available when crypto is used.
    
    Commit 69699f30 introduced the following error in the
    qemu-storage-daemon binary:
    
      $ echo -e \
        '{"execute": "qmp_capabilities"}\r\n{"execute": "qom-list-types"}\r\n{"execute": "quit"}\r\n' \
        | storage-daemon/qemu-storage-daemon --chardev stdio,id=qmp0  --monitor qmp0
      {"QMP": {"version": {"qemu": {"micro": 50, "minor": 1, "major": 5}, "package": ""}, "capabilities": ["oob"]}}
      {"return": {}}
      missing interface 'fw_cfg-data-generator' for object 'tls-creds'
      Aborted (core dumped)
    
    Since QOM dependencies are resolved at runtime, this issue
    could not be triggered at linktime, and we don't have test
    running the qemu-storage-daemon binary.
    
    Fix by always registering the QOM interface.
    
    Reported-by: default avatarKevin Wolf <kwolf@redhat.com>
    Fixes: 69699f30 ("crypto/tls-cipher-suites: Produce fw_cfg consumable blob")
    Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
    Reviewed-by: default avatarLaszlo Ersek <lersek@redhat.com>
    Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    Message-Id: <20201006111909.2302081-2-philmd@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    8d0bceba
    hw/nvram: Always register FW_CFG_DATA_GENERATOR_INTERFACE
    Philippe Mathieu-Daudé authored
    
    
    While the FW_CFG_DATA_GENERATOR_INTERFACE is only consumed
    by a device only available using system-mode (fw_cfg), it is
    implemented by a crypto component (tls-cipher-suites) which
    is always available when crypto is used.
    
    Commit 69699f30 introduced the following error in the
    qemu-storage-daemon binary:
    
      $ echo -e \
        '{"execute": "qmp_capabilities"}\r\n{"execute": "qom-list-types"}\r\n{"execute": "quit"}\r\n' \
        | storage-daemon/qemu-storage-daemon --chardev stdio,id=qmp0  --monitor qmp0
      {"QMP": {"version": {"qemu": {"micro": 50, "minor": 1, "major": 5}, "package": ""}, "capabilities": ["oob"]}}
      {"return": {}}
      missing interface 'fw_cfg-data-generator' for object 'tls-creds'
      Aborted (core dumped)
    
    Since QOM dependencies are resolved at runtime, this issue
    could not be triggered at linktime, and we don't have test
    running the qemu-storage-daemon binary.
    
    Fix by always registering the QOM interface.
    
    Reported-by: default avatarKevin Wolf <kwolf@redhat.com>
    Fixes: 69699f30 ("crypto/tls-cipher-suites: Produce fw_cfg consumable blob")
    Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
    Reviewed-by: default avatarLaszlo Ersek <lersek@redhat.com>
    Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
    Message-Id: <20201006111909.2302081-2-philmd@redhat.com>
    Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Loading