Skip to content
  • Chuck Zmudzinski's avatar
    be9c61da
    xen/pass-through: merge emulated bits correctly · be9c61da
    Chuck Zmudzinski authored
    In xen_pt_config_reg_init(), there is an error in the merging of the
    emulated data with the host value. With the current Qemu, instead of
    merging the emulated bits with the host bits as defined by emu_mask,
    the emulated bits are merged with the host bits as defined by the
    inverse of emu_mask. In some cases, depending on the data in the
    registers on the host, the way the registers are setup, and the
    initial values of the emulated bits, the end result will be that
    the register is initialized with the wrong value.
    
    To correct this error, use the XEN_PT_MERGE_VALUE macro to help ensure
    the merge is done correctly.
    
    This correction is needed to resolve Qemu project issue #1061, which
    describes the failure of Xen HVM Linux guests to boot in certain
    configurations with passed through PCI devices, that is, when this error
    disables instead of enables the PCI_STATUS_CAP_LIST bit of the
    PCI_STATUS register of a passed through PCI device, which in turn
    disables the MSI-X capability of the device in Linux guests with the end
    result being that the Linux guest never completes the boot process.
    
    Fixes: 2e87512e ("xen/pt: Sync up the dev.config and data values")
    Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1061
    Buglink: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=988333
    
    
    
    Signed-off-by: default avatarChuck Zmudzinski <brchuckz@aol.com>
    Reviewed-by: default avatarAnthony PERARD <anthony.perard@citrix.com>
    Message-Id: <e4392535d8e5266063dc5461d0f1d301e3dd5951.1656522217.git.brchuckz@aol.com>
    Signed-off-by: default avatarAnthony PERARD <anthony.perard@citrix.com>
    be9c61da
    xen/pass-through: merge emulated bits correctly
    Chuck Zmudzinski authored
    In xen_pt_config_reg_init(), there is an error in the merging of the
    emulated data with the host value. With the current Qemu, instead of
    merging the emulated bits with the host bits as defined by emu_mask,
    the emulated bits are merged with the host bits as defined by the
    inverse of emu_mask. In some cases, depending on the data in the
    registers on the host, the way the registers are setup, and the
    initial values of the emulated bits, the end result will be that
    the register is initialized with the wrong value.
    
    To correct this error, use the XEN_PT_MERGE_VALUE macro to help ensure
    the merge is done correctly.
    
    This correction is needed to resolve Qemu project issue #1061, which
    describes the failure of Xen HVM Linux guests to boot in certain
    configurations with passed through PCI devices, that is, when this error
    disables instead of enables the PCI_STATUS_CAP_LIST bit of the
    PCI_STATUS register of a passed through PCI device, which in turn
    disables the MSI-X capability of the device in Linux guests with the end
    result being that the Linux guest never completes the boot process.
    
    Fixes: 2e87512e ("xen/pt: Sync up the dev.config and data values")
    Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1061
    Buglink: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=988333
    
    
    
    Signed-off-by: default avatarChuck Zmudzinski <brchuckz@aol.com>
    Reviewed-by: default avatarAnthony PERARD <anthony.perard@citrix.com>
    Message-Id: <e4392535d8e5266063dc5461d0f1d301e3dd5951.1656522217.git.brchuckz@aol.com>
    Signed-off-by: default avatarAnthony PERARD <anthony.perard@citrix.com>
Loading