mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
Last round of s390x patches for 2.7:
- A large update of the s390x PCI code, bringing it in line with the architecture - Fixes and improvements in the ipl (boot) code - Refactoring in the css code -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAABAgAGBQJXg1MjAAoJEN7Pa5PG8C+vOpIP/A0s4oGk056YHN8APCCPEnhD jQIH7GxMZXsCvBb0w7mcvk0EYqoGBOplWZ9mOzHGr8wzQhL56quOOY3Esidj8yVD Nulwg4bPtd4SQJoaV0CndZq9Vn6JtWsyS05ncq23VnasrMLPzzAPltI7EuV8OynY zgpb/B6KM1vk/wN9brci2WGKTaeTeAD9FmHTuPTiYJDZEZL8FjjQkE0sHmCwNm9Z w0dlwEfRyFPwNtvYYMQmlU8jl9MlizOi/FKIU5G2FtsGlwgyMYPoayAuv455iIm9 a7wb4Sb2VdWeLWzB9E0bqzMJ+mmH+nwxMtMzFw5XYw2uBLbLh0J3PxB1UUDwab12 BJMJc4QRzTNfjddwVD2Yi8xg9da0AEOoynHogK4r2z3mlBaloNBHIm63Dkjmrvfw 2W/FQ67RdcQah54Du62ZezSoyjfxVhCUF0tHfh+PqjhXeC8L8dPvKug/vLp2bgVS JZfz0ObjGrYGJ3JLIPKobEif4teXPmxiOEzYhCnIUE6ZHFnjlrOdWUiVEpA8laMR jQn1amp0UkbaPXnNjcS35swnSYHHOGpI3N0cJ5E/xM+uRLZ2W569ceIfAhCRb2Su oGRQTE8vnSyni+H4SoAXqSttGbXX8ST5mR2BCnvX+vNzUYd/azV+CKckcdgfJtXR Q+6YDC9Y8SLL/pJFzSfg =/+SU -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20160711' into staging Last round of s390x patches for 2.7: - A large update of the s390x PCI code, bringing it in line with the architecture - Fixes and improvements in the ipl (boot) code - Refactoring in the css code # gpg: Signature made Mon 11 Jul 2016 09:04:51 BST # gpg: using RSA key 0xDECF6B93C6F02FAF # gpg: Good signature from "Cornelia Huck <huckc@linux.vnet.ibm.com>" # gpg: aka "Cornelia Huck <cornelia.huck@de.ibm.com>" # Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0 18CE DECF 6B93 C6F0 2FAF * remotes/cohuck/tags/s390x-20160711: (25 commits) s390x/pci: make hot-unplug handler smoother s390x/pci: replace fid with idx in msg data of msix s390x/pci: fix stpcifc_service_call s390x/pci: refactor list_pci s390x/pci: refactor s390_pci_find_dev_by_idx s390x/pci: add checkings in CLP_SET_PCI_FN s390x/pci: enable zpci hot-plug/hot-unplug s390x/pci: enable uid-checking s390x/pci: introduce S390PCIBusDevice qdev s390x/pci: introduce S390PCIIOMMU s390x/pci: introduce S390PCIBus s390x/pci: enforce zPCI state checking s390x/pci: refactor s390_pci_find_dev_by_fh s390x/pci: unify FH_ macros s390x/pci: write fid in CLP_QUERY_PCI_FN s390x/pci: acceleration for getting S390pciState s390x/pci: fix failures of dma map/unmap s390x/css: Unplug handler of virtual css bridge s390x/css: Factor out virtual css bridge and bus s390x/css: use define for "virtual-css-bridge" literal ... Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
f1ef557866
23 changed files with 1251 additions and 458 deletions
Binary file not shown.
|
@ -43,6 +43,16 @@ struct IplBlockFcp {
|
|||
} __attribute__ ((packed));
|
||||
typedef struct IplBlockFcp IplBlockFcp;
|
||||
|
||||
struct IplBlockQemuScsi {
|
||||
uint32_t lun;
|
||||
uint16_t target;
|
||||
uint16_t channel;
|
||||
uint8_t reserved0[77];
|
||||
uint8_t ssid;
|
||||
uint16_t devno;
|
||||
} __attribute__ ((packed));
|
||||
typedef struct IplBlockQemuScsi IplBlockQemuScsi;
|
||||
|
||||
struct IplParameterBlock {
|
||||
uint32_t len;
|
||||
uint8_t reserved0[3];
|
||||
|
@ -55,6 +65,7 @@ struct IplParameterBlock {
|
|||
union {
|
||||
IplBlockCcw ccw;
|
||||
IplBlockFcp fcp;
|
||||
IplBlockQemuScsi scsi;
|
||||
};
|
||||
} __attribute__ ((packed));
|
||||
typedef struct IplParameterBlock IplParameterBlock;
|
||||
|
@ -63,6 +74,7 @@ extern IplParameterBlock iplb __attribute__((__aligned__(PAGE_SIZE)));
|
|||
|
||||
#define S390_IPL_TYPE_FCP 0x00
|
||||
#define S390_IPL_TYPE_CCW 0x02
|
||||
#define S390_IPL_TYPE_QEMU_SCSI 0xff
|
||||
|
||||
static inline bool store_iplb(IplParameterBlock *iplb)
|
||||
{
|
||||
|
|
|
@ -84,6 +84,18 @@ static void virtio_setup(void)
|
|||
debug_print_int("ssid ", blk_schid.ssid);
|
||||
found = find_dev(&schib, dev_no);
|
||||
break;
|
||||
case S390_IPL_TYPE_QEMU_SCSI:
|
||||
{
|
||||
VDev *vdev = virtio_get_device();
|
||||
|
||||
vdev->scsi_device_selected = true;
|
||||
vdev->selected_scsi_device.channel = iplb.scsi.channel;
|
||||
vdev->selected_scsi_device.target = iplb.scsi.target;
|
||||
vdev->selected_scsi_device.lun = iplb.scsi.lun;
|
||||
blk_schid.ssid = iplb.scsi.ssid & 0x3;
|
||||
found = find_dev(&schib, iplb.scsi.devno);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
panic("List-directed IPL not supported yet!\n");
|
||||
}
|
||||
|
|
|
@ -204,6 +204,17 @@ static void virtio_scsi_locate_device(VDev *vdev)
|
|||
debug_print_int("config.scsi.max_target ", vdev->config.scsi.max_target);
|
||||
debug_print_int("config.scsi.max_lun ", vdev->config.scsi.max_lun);
|
||||
|
||||
if (vdev->scsi_device_selected) {
|
||||
sdev->channel = vdev->selected_scsi_device.channel;
|
||||
sdev->target = vdev->selected_scsi_device.target;
|
||||
sdev->lun = vdev->selected_scsi_device.lun;
|
||||
|
||||
IPL_check(sdev->channel == 0, "non-zero channel requested");
|
||||
IPL_check(sdev->target <= vdev->config.scsi.max_target, "target# high");
|
||||
IPL_check(sdev->lun <= vdev->config.scsi.max_lun, "LUN# high");
|
||||
return;
|
||||
}
|
||||
|
||||
for (target = 0; target <= vdev->config.scsi.max_target; target++) {
|
||||
sdev->channel = channel;
|
||||
sdev->target = target; /* sdev->lun will be 0 here */
|
||||
|
|
|
@ -274,6 +274,8 @@ struct VDev {
|
|||
uint64_t scsi_last_block;
|
||||
uint32_t scsi_dev_cyls;
|
||||
uint8_t scsi_dev_heads;
|
||||
bool scsi_device_selected;
|
||||
ScsiDevice selected_scsi_device;
|
||||
};
|
||||
typedef struct VDev VDev;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue