mirror of
https://github.com/xemu-project/xemu.git
synced 2025-02-01 09:42:58 +00:00
Last round of s390x fixes for 2.5:
- The bios should be built for the first z machine, so that newer instructions don't creep in. - Silence annoying message when running make check. - Fix a problem with the pci iommu exposed by recent changes. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQIcBAABAgAGBQJWXWF+AAoJEN7Pa5PG8C+vGboP/3HPOv/khkfJI4EVwheXg+av tSCOxizp0oPg02kDfOvmBl0czVL7UQN8cR6sLcEvXADJIvHqiryX8PA+1FOVpZwx m0ZJTb3Vt2biPbhgMf9l0d+xOAo1EQSSxeys84Z22xwNA7wCGZQN9ysBmyjCBiKh Oq/9D5qLGlmLb4Oz3Cb25Tw0Qhj4g7xdoNJOvfYycK8eDPxGhhSBKSm8QwKhOZY/ o+SB4Mj/86P8UrWa037DMpYY893RRBX9YfJTEQrNG8el47rXeU8PMo79AYFtuj78 Ps71pxMnb/UpNq5vy5Oz6qyFsqJtzfuFhDbLYHIanw1zBW8tKhHDFGd56Gz0syWe E8wyB6Q4hP/xYX2ozT+z+uq8/W7BGY33vk1e5jU6WWaoBypVt0gPZ4KM+g5F86JH ixsZFpJtijLg0CUmhubdFeiiH2j9xA99ICdqlcwdoMpK8GwPPza5tJ6LxJglU+nq 4FOaEdkx6B3c4crwvWcWLFU3lZuQ3TVm5HcapAcq2tqO0jw7WP1gDm6c2KGrof6H OdPYnPARH5OboEMzcFsEVCjmY5SGhmk39FqYpa92lFfhD+jKgMqXTWR3n96HWTAu rNGhacPibiyohLrm0wVO1rk8kajhNK18dQA1+gYVO6DU9O0ODgS1Oozbc83PfwE7 EIiGY4Hc9y3wB/aPTrco =xIKz -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20151201' into staging Last round of s390x fixes for 2.5: - The bios should be built for the first z machine, so that newer instructions don't creep in. - Silence annoying message when running make check. - Fix a problem with the pci iommu exposed by recent changes. # gpg: Signature made Tue 01 Dec 2015 08:59:42 GMT using RSA key ID C6F02FAF # gpg: Good signature from "Cornelia Huck <huckc@linux.vnet.ibm.com>" # gpg: aka "Cornelia Huck <cornelia.huck@de.ibm.com>" * remotes/cohuck/tags/s390x-20151201: s390x/pci: fix up IOMMU size s390x: no deprecation warning while testing pc-bios/s390-ccw: rebuild image pc-bios/s390-ccw: build for z900 Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
e3d58827fe
@ -308,7 +308,7 @@ static IOMMUTLBEntry s390_translate_iommu(MemoryRegion *iommu, hwaddr addr,
|
||||
{
|
||||
uint64_t pte;
|
||||
uint32_t flags;
|
||||
S390PCIBusDevice *pbdev = container_of(iommu, S390PCIBusDevice, mr);
|
||||
S390PCIBusDevice *pbdev = container_of(iommu, S390PCIBusDevice, iommu_mr);
|
||||
S390pciState *s;
|
||||
IOMMUTLBEntry ret = {
|
||||
.target_as = &address_space_memory,
|
||||
@ -454,14 +454,32 @@ static const MemoryRegionOps s390_msi_ctrl_ops = {
|
||||
.endianness = DEVICE_LITTLE_ENDIAN,
|
||||
};
|
||||
|
||||
void s390_pcihost_iommu_configure(S390PCIBusDevice *pbdev, bool enable)
|
||||
{
|
||||
pbdev->configured = false;
|
||||
|
||||
if (enable) {
|
||||
uint64_t size = pbdev->pal - pbdev->pba + 1;
|
||||
memory_region_init_iommu(&pbdev->iommu_mr, OBJECT(&pbdev->mr),
|
||||
&s390_iommu_ops, "iommu-s390", size);
|
||||
memory_region_add_subregion(&pbdev->mr, pbdev->pba, &pbdev->iommu_mr);
|
||||
} else {
|
||||
memory_region_del_subregion(&pbdev->mr, &pbdev->iommu_mr);
|
||||
}
|
||||
|
||||
pbdev->configured = true;
|
||||
}
|
||||
|
||||
static void s390_pcihost_init_as(S390pciState *s)
|
||||
{
|
||||
int i;
|
||||
S390PCIBusDevice *pbdev;
|
||||
|
||||
for (i = 0; i < PCI_SLOT_MAX; i++) {
|
||||
memory_region_init_iommu(&s->pbdev[i].mr, OBJECT(s),
|
||||
&s390_iommu_ops, "iommu-s390", UINT64_MAX);
|
||||
address_space_init(&s->pbdev[i].as, &s->pbdev[i].mr, "iommu-pci");
|
||||
pbdev = &s->pbdev[i];
|
||||
memory_region_init(&pbdev->mr, OBJECT(s),
|
||||
"iommu-root-s390", UINT64_MAX);
|
||||
address_space_init(&pbdev->as, &pbdev->mr, "iommu-pci");
|
||||
}
|
||||
|
||||
memory_region_init_io(&s->msix_notify_mr, OBJECT(s),
|
||||
|
@ -231,6 +231,7 @@ typedef struct S390PCIBusDevice {
|
||||
AdapterRoutes routes;
|
||||
AddressSpace as;
|
||||
MemoryRegion mr;
|
||||
MemoryRegion iommu_mr;
|
||||
} S390PCIBusDevice;
|
||||
|
||||
typedef struct S390pciState {
|
||||
@ -244,6 +245,7 @@ typedef struct S390pciState {
|
||||
int chsc_sei_nt2_get_event(void *res);
|
||||
int chsc_sei_nt2_have_event(void);
|
||||
void s390_pci_sclp_configure(int configure, SCCB *sccb);
|
||||
void s390_pcihost_iommu_configure(S390PCIBusDevice *pbdev, bool enable);
|
||||
S390PCIBusDevice *s390_pci_find_dev_by_idx(uint32_t idx);
|
||||
S390PCIBusDevice *s390_pci_find_dev_by_fh(uint32_t fh);
|
||||
S390PCIBusDevice *s390_pci_find_dev_by_fid(uint32_t fid);
|
||||
|
@ -528,7 +528,7 @@ int rpcit_service_call(S390CPU *cpu, uint8_t r1, uint8_t r2)
|
||||
goto out;
|
||||
}
|
||||
|
||||
mr = pci_device_iommu_address_space(pbdev->pdev)->root;
|
||||
mr = &pbdev->iommu_mr;
|
||||
while (start < end) {
|
||||
entry = mr->iommu_ops->translate(mr, start, 0);
|
||||
|
||||
@ -689,6 +689,9 @@ static int reg_ioat(CPUS390XState *env, S390PCIBusDevice *pbdev, ZpciFib fib)
|
||||
pbdev->pba = pba;
|
||||
pbdev->pal = pal;
|
||||
pbdev->g_iota = g_iota;
|
||||
|
||||
s390_pcihost_iommu_configure(pbdev, true);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -697,6 +700,8 @@ static void dereg_ioat(S390PCIBusDevice *pbdev)
|
||||
pbdev->pba = 0;
|
||||
pbdev->pal = 0;
|
||||
pbdev->g_iota = 0;
|
||||
|
||||
s390_pcihost_iommu_configure(pbdev, false);
|
||||
}
|
||||
|
||||
int mpcifc_service_call(S390CPU *cpu, uint8_t r1, uint64_t fiba, uint8_t ar)
|
||||
|
@ -33,6 +33,7 @@
|
||||
#include "hw/virtio/virtio.h"
|
||||
#include "sysemu/kvm.h"
|
||||
#include "exec/address-spaces.h"
|
||||
#include "sysemu/qtest.h"
|
||||
|
||||
#include "hw/s390x/s390-virtio-bus.h"
|
||||
#include "hw/s390x/sclp.h"
|
||||
@ -268,9 +269,11 @@ static void s390_init(MachineState *machine)
|
||||
hwaddr virtio_region_len;
|
||||
hwaddr virtio_region_start;
|
||||
|
||||
error_printf("WARNING\n"
|
||||
"The s390-virtio machine (non-ccw) is deprecated.\n"
|
||||
"It will be removed in 2.6. Please use s390-ccw-virtio\n");
|
||||
if (!qtest_enabled()) {
|
||||
error_printf("WARNING\n"
|
||||
"The s390-virtio machine (non-ccw) is deprecated.\n"
|
||||
"It will be removed in 2.6. Please use s390-ccw-virtio\n");
|
||||
}
|
||||
|
||||
if (machine->ram_slots) {
|
||||
error_report("Memory hotplug not supported by the selected machine.");
|
||||
|
Binary file not shown.
@ -10,7 +10,7 @@ $(call set-vpath, $(SRC_PATH)/pc-bios/s390-ccw)
|
||||
.PHONY : all clean build-all
|
||||
|
||||
OBJECTS = start.o main.o bootmap.o sclp-ascii.o virtio.o
|
||||
CFLAGS += -fPIE -fno-stack-protector -ffreestanding
|
||||
CFLAGS += -fPIE -fno-stack-protector -ffreestanding -march=z900
|
||||
CFLAGS += -fno-delete-null-pointer-checks -msoft-float
|
||||
LDFLAGS += -Wl,-pie -nostdlib
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user