From: Alexey Kardashevskiy <aik@ozlabs.ru>
To: Alexander Graf <agraf@suse.de>, qemu-devel@nongnu.org
Cc: qemu-ppc@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 8/9] spapr_iommu: Introduce page_shift in sPAPRTCETable
Date: Thu, 22 May 2014 20:46:58 +1000 [thread overview]
Message-ID: <537DD5A2.20606@ozlabs.ru> (raw)
In-Reply-To: <537DD533.3040405@suse.de>
On 05/22/2014 08:45 PM, Alexander Graf wrote:
>
> On 22.05.14 12:24, Alexey Kardashevskiy wrote:
>> On 05/22/2014 08:09 PM, Alexander Graf wrote:
>>> On 22.05.14 01:45, Alexey Kardashevskiy wrote:
>>>> On 05/22/2014 08:11 AM, Alexander Graf wrote:
>>>>> On 21.05.14 16:21, Alexey Kardashevskiy wrote:
>>>>>> At the moment only 4K pages are supported by sPAPRTCETable. Since sPAPR
>>>>>> spec allows other page sizes and we are going to implement them, we need
>>>>>> page size to be configrable.
>>>>>>
>>>>>> This adds @page_shift into sPAPRTCETable and replaces
>>>>>> SPAPR_TCE_PAGE_SHIFT
>>>>>> with it whereever it is possible.
>>>>>>
>>>>>> This removes SPAPR_TCE_PAGE_MASK as it is no longer used.
>>>>>>
>>>>>> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
>
> [...]
>
>>>>>> diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
>>>>>> index fdd4c07..c9850d4 100644
>>>>>> --- a/hw/ppc/spapr_pci.c
>>>>>> +++ b/hw/ppc/spapr_pci.c
>>>>>> @@ -656,6 +656,7 @@ static void spapr_phb_finish_realize(sPAPRPHBState
>>>>>> *sphb, Error **errp)
>>>>>> sPAPRTCETable *tcet;
>>>>>> tcet = spapr_tce_new_table(DEVICE(sphb), sphb->dma_liobn,
>>>>>> + SPAPR_TCE_PAGE_SHIFT,
>>>>>> 0x40000000 >> SPAPR_TCE_PAGE_SHIFT);
>>>>>> if (!tcet) {
>>>>>> error_setg(errp, "Unable to create TCE table for %s",
>>>>>> diff --git a/hw/ppc/spapr_vio.c b/hw/ppc/spapr_vio.c
>>>>>> index b84e481..d7e9e6a 100644
>>>>>> --- a/hw/ppc/spapr_vio.c
>>>>>> +++ b/hw/ppc/spapr_vio.c
>>>>>> @@ -457,6 +457,7 @@ static int spapr_vio_busdev_init(DeviceState *qdev)
>>>>>> if (pc->rtce_window_size) {
>>>>>> uint32_t liobn = SPAPR_VIO_BASE_LIOBN | dev->reg;
>>>>>> dev->tcet = spapr_tce_new_table(qdev, liobn,
>>>>>> + SPAPR_TCE_PAGE_SHIFT,
>>>>> I don't quite understand who defines what the TCE page size is for a
>>>>> given
>>>>> device. Can you try to explain this to me?
>>>> If it is default window (for PCI) or window for VIO - it is 4K. If it is a
>>>> dynamic DMA window - page size is a parameter of RTAS call which creates
>>>> the window.
>>> Could we change that default size for non-dynamic windows somehow? 4k is
>>> really fine grained.
>> No, this is hardcoded in a million places and old distros. Normally it is
>> maximum 1GB or 2MB table, not too bad. And with DDW support, we can make
>> the default one really small (64MB?) and lose even less.
>>
>> SPAPR:
>> R1–7.3.31–4. For the Dynamic DMA Windows (DDW) option: The platform must
>> provide a default DMA window
>> for each PE, and all of the following must be true:
>> a. The window is defined by the “ibm,dma-window” property in the OF device
>> tree.
>> b. The window is defined with 4 KB I/O pages.
>> c. The window is located entirely below 4 GB.
>
> Cool, would be interesting to see how that affects performance. I like most
> of this patch set btw, I think it should be good to go in in the next round.
10Gbit ethernet is ok but 40Gbit seems to suffer from this limitation.
--
Alexey
next prev parent reply other threads:[~2014-05-22 10:47 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-21 14:21 [Qemu-devel] [PATCH 0/9] spapr_pci: Prepare for VFIO Alexey Kardashevskiy
2014-05-21 14:21 ` [Qemu-devel] [PATCH 1/9] spapr: Enable dynamic change of the supported hypercalls list Alexey Kardashevskiy
2014-05-21 14:26 ` Alexander Graf
2014-05-21 15:21 ` [Qemu-devel] [PATCH v2] " Alexey Kardashevskiy
2014-05-22 10:47 ` Alexander Graf
2014-05-22 11:01 ` Alexey Kardashevskiy
2014-05-22 11:02 ` Alexander Graf
2014-05-21 14:21 ` [Qemu-devel] [PATCH 2/9] spapr_iommu: Enable multiple TCE requests Alexey Kardashevskiy
2014-05-21 14:37 ` Alexander Graf
2014-05-21 15:23 ` [Qemu-devel] [PATCH v2] " Alexey Kardashevskiy
2014-05-21 16:03 ` Alexey Kardashevskiy
2014-05-21 21:54 ` Alexander Graf
2014-05-21 14:21 ` [Qemu-devel] [PATCH 3/9] spapr_pci: Introduce a finish_realize() callback Alexey Kardashevskiy
2014-05-21 14:21 ` [Qemu-devel] [PATCH 4/9] spapr_pci: spapr_iommu: Make DMA window a subregion Alexey Kardashevskiy
2014-05-21 14:21 ` [Qemu-devel] [PATCH 5/9] spapr_pci: Allow multiple TCE tables per PHB Alexey Kardashevskiy
2014-05-21 14:21 ` [Qemu-devel] [PATCH 6/9] spapr_iommu: Convert old qdev_init_nofail() to object_property_set_bool Alexey Kardashevskiy
2014-05-21 14:21 ` [Qemu-devel] [PATCH 7/9] spapr_iommu: Get rid of window_size in sPAPRTCETable Alexey Kardashevskiy
2014-05-21 22:05 ` Alexander Graf
2014-05-21 14:21 ` [Qemu-devel] [PATCH 8/9] spapr_iommu: Introduce page_shift " Alexey Kardashevskiy
2014-05-21 22:11 ` Alexander Graf
2014-05-21 23:45 ` Alexey Kardashevskiy
2014-05-22 10:09 ` Alexander Graf
2014-05-22 10:24 ` Alexey Kardashevskiy
2014-05-22 10:45 ` Alexander Graf
2014-05-22 10:46 ` Alexey Kardashevskiy [this message]
2014-05-22 10:48 ` Alexander Graf
2014-05-22 10:55 ` Alexey Kardashevskiy
2014-05-22 4:25 ` Alexey Kardashevskiy
2014-05-22 7:11 ` Alexander Graf
2014-05-21 14:21 ` [Qemu-devel] [PATCH 9/9] spapr_iommu: Introduce bus_offset " Alexey Kardashevskiy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=537DD5A2.20606@ozlabs.ru \
--to=aik@ozlabs.ru \
--cc=agraf@suse.de \
--cc=qemu-devel@nongnu.org \
--cc=qemu-ppc@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).