mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 09:13:55 -06:00
* amd_iommu: fix clang failure on non-KVM targets
* target/i386/hvf: fix advertised 1G page support * megasas: fix CDB length -----BEGIN PGP SIGNATURE----- iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmdIokMUHHBib256aW5p QHJlZGhhdC5jb20ACgkQv/vSX3jHroOpbAf/dxoD/vCFfuMPanIbP4quQGWFTKAo x4qlis07s730EWoNzdT42eER+GWcZiT4LhSwAt3EPqjANpnNwcoOGsc5hlJp8emI /UbJII90AKLhoJV2gj1xGbRwN1vBJmuBrUQSrLC+5tEr5gFLdHixnlH4pjXGfuF6 9eAutgxjRzMiYczsPCev5gbtnvetodP2u9okeQwpQd7N9siCbKx+pB6a67KdvOYn tmH0se4ai5w9J4Xnagus/goA5VK5dli6ukvYhLps/LQHj2r7XT6AcPMO7KwFlJkW INW0qEzYqa95iH5pNW2lgmJcCn3rp7g1WFVCCocpecp1WpsweVyzMRhGsA== =DHEO -----END PGP SIGNATURE----- Merge tag 'for-upstream' of https://gitlab.com/bonzini/qemu into staging * amd_iommu: fix clang failure on non-KVM targets * target/i386/hvf: fix advertised 1G page support * megasas: fix CDB length # -----BEGIN PGP SIGNATURE----- # # iQFIBAABCAAyFiEE8TM4V0tmI4mGbHaCv/vSX3jHroMFAmdIokMUHHBib256aW5p # QHJlZGhhdC5jb20ACgkQv/vSX3jHroOpbAf/dxoD/vCFfuMPanIbP4quQGWFTKAo # x4qlis07s730EWoNzdT42eER+GWcZiT4LhSwAt3EPqjANpnNwcoOGsc5hlJp8emI # /UbJII90AKLhoJV2gj1xGbRwN1vBJmuBrUQSrLC+5tEr5gFLdHixnlH4pjXGfuF6 # 9eAutgxjRzMiYczsPCev5gbtnvetodP2u9okeQwpQd7N9siCbKx+pB6a67KdvOYn # tmH0se4ai5w9J4Xnagus/goA5VK5dli6ukvYhLps/LQHj2r7XT6AcPMO7KwFlJkW # INW0qEzYqa95iH5pNW2lgmJcCn3rp7g1WFVCCocpecp1WpsweVyzMRhGsA== # =DHEO # -----END PGP SIGNATURE----- # gpg: Signature made Thu 28 Nov 2024 17:02:59 GMT # gpg: using RSA key F13338574B662389866C7682BFFBD25F78C7AE83 # gpg: issuer "pbonzini@redhat.com" # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full] # gpg: aka "Paolo Bonzini <pbonzini@redhat.com>" [full] # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1 # Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83 * tag 'for-upstream' of https://gitlab.com/bonzini/qemu: scsi: megasas: Internal cdbs have 16-byte length hvf: complete 1G page support amd_iommu: Fix kvm_enable_x2apic link error with clang in non-KVM builds Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
72b88908d1
3 changed files with 27 additions and 25 deletions
|
@ -1657,9 +1657,11 @@ static void amdvi_sysbus_realize(DeviceState *dev, Error **errp)
|
|||
error_report("AMD IOMMU with x2APIC confguration requires xtsup=on");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if (s->xtsup && kvm_irqchip_is_split() && !kvm_enable_x2apic()) {
|
||||
error_report("AMD IOMMU xtsup=on requires support on the KVM side");
|
||||
exit(EXIT_FAILURE);
|
||||
if (s->xtsup) {
|
||||
if (kvm_irqchip_is_split() && !kvm_enable_x2apic()) {
|
||||
error_report("AMD IOMMU xtsup=on requires support on the KVM side");
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
pci_setup_iommu(bus, &amdvi_iommu_ops, s);
|
||||
|
|
|
@ -1781,7 +1781,7 @@ static int megasas_handle_io(MegasasState *s, MegasasCmd *cmd, int frame_cmd)
|
|||
uint8_t cdb[16];
|
||||
int len;
|
||||
struct SCSIDevice *sdev = NULL;
|
||||
int target_id, lun_id, cdb_len;
|
||||
int target_id, lun_id;
|
||||
|
||||
lba_count = le32_to_cpu(cmd->frame->io.header.data_len);
|
||||
lba_start_lo = le32_to_cpu(cmd->frame->io.lba_lo);
|
||||
|
@ -1790,7 +1790,6 @@ static int megasas_handle_io(MegasasState *s, MegasasCmd *cmd, int frame_cmd)
|
|||
|
||||
target_id = cmd->frame->header.target_id;
|
||||
lun_id = cmd->frame->header.lun_id;
|
||||
cdb_len = cmd->frame->header.cdb_len;
|
||||
|
||||
if (target_id < MFI_MAX_LD && lun_id == 0) {
|
||||
sdev = scsi_device_find(&s->bus, 0, target_id, lun_id);
|
||||
|
@ -1805,15 +1804,6 @@ static int megasas_handle_io(MegasasState *s, MegasasCmd *cmd, int frame_cmd)
|
|||
return MFI_STAT_DEVICE_NOT_FOUND;
|
||||
}
|
||||
|
||||
if (cdb_len > 16) {
|
||||
trace_megasas_scsi_invalid_cdb_len(
|
||||
mfi_frame_desc(frame_cmd), 1, target_id, lun_id, cdb_len);
|
||||
megasas_write_sense(cmd, SENSE_CODE(INVALID_OPCODE));
|
||||
cmd->frame->header.scsi_status = CHECK_CONDITION;
|
||||
s->event_count++;
|
||||
return MFI_STAT_SCSI_DONE_WITH_ERROR;
|
||||
}
|
||||
|
||||
cmd->iov_size = lba_count * sdev->blocksize;
|
||||
if (megasas_map_sgl(s, cmd, &cmd->frame->io.sgl)) {
|
||||
megasas_write_sense(cmd, SENSE_CODE(TARGET_FAILURE));
|
||||
|
@ -1824,7 +1814,7 @@ static int megasas_handle_io(MegasasState *s, MegasasCmd *cmd, int frame_cmd)
|
|||
|
||||
megasas_encode_lba(cdb, lba_start, lba_count, is_write);
|
||||
cmd->req = scsi_req_new(sdev, cmd->index,
|
||||
lun_id, cdb, cdb_len, cmd);
|
||||
lun_id, cdb, sizeof(cdb), cmd);
|
||||
if (!cmd->req) {
|
||||
trace_megasas_scsi_req_alloc_failed(
|
||||
mfi_frame_desc(frame_cmd), target_id, lun_id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue