Re: [PATCH v3 1/2] s390x/pci: add support for guests that request direct mapping

2025-01-27 Thread Thomas Huth
On 27/01/2025 21.45, Matthew Rosato wrote:   #include "hw/s390x/s390-pci-bus.h" @@ -1008,17 +1009,25 @@ static int reg_ioat(CPUS390XState *env, S390PCIBusDevice *pbdev, ZpciFib fib,   }     /* currently we only support designation type 1 with translation */ -    if (!(dt == ZPCI_IOT

Re: [PATCH v3 1/2] s390x/pci: add support for guests that request direct mapping

2025-01-27 Thread Matthew Rosato
>> >> static void s390_pci_iommu_free(S390pciState *s, PCIBus *bus, int32_t devfn) >> @@ -1488,6 +1518,8 @@ static const Property s390_pci_device_properties[] = { >> DEFINE_PROP_BOOL("interpret", S390PCIBusDevice, interp, true), >> DEFINE_PROP_BOOL("forwarding-assist", S390PCIBusDevi

Re: [PATCH v3 1/2] s390x/pci: add support for guests that request direct mapping

2025-01-27 Thread Matthew Rosato
>>   #include "hw/s390x/s390-pci-bus.h" >> @@ -1008,17 +1009,25 @@ static int reg_ioat(CPUS390XState *env, >> S390PCIBusDevice *pbdev, ZpciFib fib, >>   } >>     /* currently we only support designation type 1 with translation */ >> -    if (!(dt == ZPCI_IOTA_RTTO && t)) { >> +    if (t

Re: [PATCH v3 1/2] s390x/pci: add support for guests that request direct mapping

2025-01-27 Thread Matthew Rosato
>>   +void s390_pci_iommu_dm_enable(S390PCIIOMMU *iommu) >> +{ >> +    MachineState *ms = MACHINE(qdev_get_machine()); >> +    S390CcwMachineState *s390ms = S390_CCW_MACHINE(ms); >> + >> +    /* >> + * For direct-mapping we must map the entire guest address space.  >> Rather >> + * than

Re: [PATCH v3 1/2] s390x/pci: add support for guests that request direct mapping

2025-01-27 Thread Niklas Schnelle
On Fri, 2025-01-24 at 15:21 -0500, Matthew Rosato wrote: > When receiving a guest mpcifc(4) or mpcifc(6) instruction without the T > bit set, treat this as a request to perform direct mapping instead of > address translation. In order to facilitate this, pin the entirety of > guest memory into the

Re: [PATCH v3 1/2] s390x/pci: add support for guests that request direct mapping

2025-01-27 Thread Thomas Huth
On 24/01/2025 21.21, Matthew Rosato wrote: When receiving a guest mpcifc(4) or mpcifc(6) instruction without the T bit set, treat this as a request to perform direct mapping instead of address translation. In order to facilitate this, pin the entirety of guest memory into the host iommu. Pinnin

Re: [PATCH v3 1/2] s390x/pci: add support for guests that request direct mapping

2025-01-27 Thread David Hildenbrand
On 24.01.25 21:21, Matthew Rosato wrote: When receiving a guest mpcifc(4) or mpcifc(6) instruction without the T bit set, treat this as a request to perform direct mapping instead of address translation. In order to facilitate this, pin the entirety of guest memory into the host iommu. Pinning

[PATCH v3 1/2] s390x/pci: add support for guests that request direct mapping

2025-01-24 Thread Matthew Rosato
When receiving a guest mpcifc(4) or mpcifc(6) instruction without the T bit set, treat this as a request to perform direct mapping instead of address translation. In order to facilitate this, pin the entirety of guest memory into the host iommu. Pinning for the direct mapping case is handled via