From 1894df02811f6b79ea3ffbf1084599d96f316173 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Wed, 29 Oct 2014 13:00:04 +0100 Subject: scsi: Rename scsi_*_length() to scsi_*_xfer(), add scsi_cdb_length() scsi_cdb_length() does not return the length of the cdb, but the transfersize encoded in the cdb. So rename it to scsi_cdb_xfer() and also rename all other related functions to end with _xfer. We can then add a new scsi_cdb_length() which actually does return the length of the cdb. With that DEBUG_SCSI can now display the correct CDB buffer. Signed-off-by: Hannes Reinecke Signed-off-by: Paolo Bonzini --- include/hw/scsi/scsi.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include/hw') diff --git a/include/hw/scsi/scsi.h b/include/hw/scsi/scsi.h index 6bc841ab8b..fd48177fa6 100644 --- a/include/hw/scsi/scsi.h +++ b/include/hw/scsi/scsi.h @@ -239,8 +239,9 @@ extern const struct SCSISense sense_code_SPACE_ALLOC_FAILED; #define SENSE_CODE(x) sense_code_ ## x -uint32_t scsi_data_cdb_length(uint8_t *buf); -uint32_t scsi_cdb_length(uint8_t *buf); +uint32_t scsi_data_cdb_xfer(uint8_t *buf); +uint32_t scsi_cdb_xfer(uint8_t *buf); +int scsi_cdb_length(uint8_t *buf); int scsi_sense_valid(SCSISense sense); int scsi_build_sense(uint8_t *in_buf, int in_len, uint8_t *buf, int len, bool fixed); -- cgit v1.2.3 From e23d04984a78490d8aaa5c45724a3a334933331f Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Wed, 29 Oct 2014 13:00:08 +0100 Subject: megasas: add MegaRAID SAS 2108 emulation The 2108 chip supports MSI and MSI-X, so update the emulation to support both chips. Signed-off-by: Hannes Reinecke [Make VMStateDescription const. - Paolo] Signed-off-by: Paolo Bonzini --- include/hw/pci/pci_ids.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/hw') diff --git a/include/hw/pci/pci_ids.h b/include/hw/pci/pci_ids.h index e597070ab8..321d622b78 100644 --- a/include/hw/pci/pci_ids.h +++ b/include/hw/pci/pci_ids.h @@ -56,6 +56,7 @@ #define PCI_DEVICE_ID_LSI_53C810 0x0001 #define PCI_DEVICE_ID_LSI_53C895A 0x0012 #define PCI_DEVICE_ID_LSI_SAS1078 0x0060 +#define PCI_DEVICE_ID_LSI_SAS0079 0x0079 #define PCI_VENDOR_ID_DEC 0x1011 #define PCI_DEVICE_ID_DEC_21154 0x0026 -- cgit v1.2.3 From 8d72db68fe7b45c7e01f815c4ac3e6c7ac0e26c1 Mon Sep 17 00:00:00 2001 From: Hannes Reinecke Date: Wed, 29 Oct 2014 13:00:11 +0100 Subject: megasas: Clear unit attention on initial reset The EFI firmware doesn't handle unit attentions properly, so we need to clear the Power On/Reset unit attention upon initial reset. Signed-off-by: Hannes Reinecke Signed-off-by: Paolo Bonzini --- include/hw/scsi/scsi.h | 1 + 1 file changed, 1 insertion(+) (limited to 'include/hw') diff --git a/include/hw/scsi/scsi.h b/include/hw/scsi/scsi.h index fd48177fa6..f4aabfd0e7 100644 --- a/include/hw/scsi/scsi.h +++ b/include/hw/scsi/scsi.h @@ -272,6 +272,7 @@ void scsi_req_retry(SCSIRequest *req); void scsi_device_purge_requests(SCSIDevice *sdev, SCSISense sense); void scsi_device_set_ua(SCSIDevice *sdev, SCSISense sense); void scsi_device_report_change(SCSIDevice *dev, SCSISense sense); +void scsi_device_unit_attention_reported(SCSIDevice *dev); int scsi_device_get_sense(SCSIDevice *dev, uint8_t *buf, int len, bool fixed); SCSIDevice *scsi_device_find(SCSIBus *bus, int channel, int target, int lun); -- cgit v1.2.3 From b154537ad07598377ebf98252fb7d2aff127983b Mon Sep 17 00:00:00 2001 From: "Dr. David Alan Gilbert" Date: Fri, 3 Oct 2014 17:33:37 -0400 Subject: -machine vmport=off: Allow disabling of VMWare ioport emulation This is a pc & q35 only machine opt. VMWare apparently doesn't like running under QEMU due to our incomplete emulation of it's special IO Port. This adds a pc & q35 property to allow it to be turned off. Signed-off-by: Dr. David Alan Gilbert Signed-off-by: Don Slutz Signed-off-by: Paolo Bonzini --- include/hw/i386/pc.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include/hw') diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index c4ee520e20..2545268a6c 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -35,11 +35,13 @@ struct PCMachineState { HotplugHandler *acpi_dev; uint64_t max_ram_below_4g; + bool vmport; }; #define PC_MACHINE_ACPI_DEVICE_PROP "acpi-device" #define PC_MACHINE_MEMHP_REGION_SIZE "hotplug-memory-region-size" #define PC_MACHINE_MAX_RAM_BELOW_4G "max-ram-below-4g" +#define PC_MACHINE_VMPORT "vmport" /** * PCMachineClass: -- cgit v1.2.3 From fb7b5c0df6e3c501973ce4d57eb2b1d4344a519d Mon Sep 17 00:00:00 2001 From: Paolo Bonzini Date: Tue, 17 Sep 2013 15:09:15 +0200 Subject: scsi: devirtualize unrealize of SCSI devices All implementations are the same. Signed-off-by: Paolo Bonzini --- include/hw/scsi/scsi.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include/hw') diff --git a/include/hw/scsi/scsi.h b/include/hw/scsi/scsi.h index f4aabfd0e7..cdaf0f8eb7 100644 --- a/include/hw/scsi/scsi.h +++ b/include/hw/scsi/scsi.h @@ -84,7 +84,6 @@ struct SCSIRequest { typedef struct SCSIDeviceClass { DeviceClass parent_class; void (*realize)(SCSIDevice *dev, Error **errp); - void (*unrealize)(SCSIDevice *dev, Error **errp); int (*parse_cdb)(SCSIDevice *dev, SCSICommand *cmd, uint8_t *buf, void *hba_private); SCSIRequest *(*alloc_req)(SCSIDevice *s, uint32_t tag, uint32_t lun, -- cgit v1.2.3