From: Prasad Singamsetty <prasad.singamsetty@oracle.com>
To: Peter Xu <peterx@redhat.com>
Cc: Alex Williamson <alex.williamson@redhat.com>,
"Dr. David Alan Gilbert" <dgilbert@redhat.com>,
qemu-devel@nongnu.org, pbonzini@redhat.com,
Sunit Jain <sunit.jain@oracle.com>,
ehabkost@redhat.com, rth@twiddle.net
Subject: Re: [Qemu-devel] host physical address width issues/questions for x86_64
Date: Wed, 18 Oct 2017 10:19:31 -0700 [thread overview]
Message-ID: <2c478fc6-bb9a-3ac3-1f5d-c853b13dc8a1@oracle.com> (raw)
In-Reply-To: <20171017035604.GJ4166@pxdev.xzpeter.org>
On 10/16/2017 8:56 PM, Peter Xu wrote:
> On Mon, Oct 16, 2017 at 10:02:25AM -0700, Prasad Singamsetty wrote:
>>
>>
>> On 10/14/2017 8:53 PM, Peter Xu wrote:
>>> On Fri, Oct 13, 2017 at 11:14:03AM -0600, Alex Williamson wrote:
>>>> On Fri, 13 Oct 2017 18:01:44 +0100
>>>> "Dr. David Alan Gilbert" <dgilbert@redhat.com> wrote:
>>>>
>>>>> * Prasad Singamsetty (prasad.singamsetty@oracle.com) wrote:
>>>>>> Hi,
>>>>>>
>>>>>> I am new to the alias. I have some questions on this subject
>>>>>> and seek some clarifications from the experts in the team.
>>>>>> I ran into a couple of issues when I tried with large configuration
>>>>>> ( >= 1TB memory, > 255 CPUs) for x86_64 guest machine.
>>>>>>
>>>>>> 1. QEMU uses the default value of 40 (TCG_PHYS_ADDR_BITS) for address
>>>>>> width if user has not specified phys-bits or host-phys-bits=true
>>>>>> property. The default value is obviously not sufficient and
>>>>>> causing guest kernel to crash if configured with >= 1TB
>>>>>> memory. Depending on the linux kernel version in the guest the
>>>>>> panic was in different code paths. The workaround is for the
>>>>>> user to specify the phys-bits property or set the property
>>>>>> host-phys-bits=true.
>>>>>>
>>>>>> QUESTIONS:
>>>> ...
>>>>>> 2. host_address_width in DMAR table structure
>>>>>>
>>>>>> In this case, the default value is set to 39
>>>>>> (VTD_HOST_ADDRESS_WIDTH - 1). With interrupt remapping
>>>>>> enabled for the intel iommu and the guest is configured
>>>>>> with > 255 cpus and >= 1TB memory, the guest kernel hangs
>>>>>> during boot up. This need to be fixed.
>>>>>>
>>>>>> QUESTION:
>>>>>> The question here again is can we fix this to use the
>>>>>> real address width from the host as the default?
>>>>>
>>>>> I don't know DMAR stuff; chatting to Alex (cc'd) it does sound
>>>>> like that's an ommission that should be fixed.
>>>>
>>>> [CC +Peter]
>>>>
>>>> On physical hardware VT-d supports either 39 or 48 bit address widths
>>>> and generally you'd expect a sufficiently capable IOMMU to be matched
>>>> with the CPU. Seems QEMU has only implemented a lower bit width and
>>>> it should probably be forcing phys bits of the VM to 39 to match until
>>>> the extended width can be implemented. Thanks,
>>>>
>>>> Alex
>>>
>>> There were patches that tried to enable 48 bits GAW but it was
>>> not accepted somehow:
>>>
>>> https://lists.gnu.org/archive/html/qemu-devel/2016-12/msg01886.html
>>>
>>> Would this help in any way?
>>>
>>
>> Thanks Alex for the patch info. Just curious why the patch was not
>> accepted. Any way, I will try it.
>
> I don't sure I know the reason. Anyway, it originated from one of
> Fam's request for some NVMe tests. If it can really help for your use
> case as well, please feel free to revive those patches, or let me know
> so that I can respin. Thanks,
>
Thanks Peter. I will start with your patch and see if I can get
it to work first.
A quick question. Looking at the code, it doesn't look like there
is a way to disable dma remapping. User may have a case where he
is interested only in interrupt remapping (for > 255 cpus) and
not DMA remapping. Is that scenario considered before?
Thanks.
--Prasad
next prev parent reply other threads:[~2017-10-18 17:19 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-13 16:17 [Qemu-devel] host physical address width issues/questions for x86_64 Prasad Singamsetty
2017-10-13 17:01 ` Dr. David Alan Gilbert
2017-10-13 17:14 ` Alex Williamson
2017-10-15 3:53 ` Peter Xu
2017-10-16 17:02 ` Prasad Singamsetty
2017-10-17 3:56 ` Peter Xu
2017-10-18 5:59 ` Fam Zheng
2017-10-18 17:19 ` Prasad Singamsetty [this message]
2017-10-19 3:33 ` Peter Xu
2017-10-20 22:54 ` Prasad Singamsetty
2017-10-23 6:37 ` Peter Xu
2017-10-23 17:23 ` Prasad Singamsetty
2017-10-26 8:30 ` Peter Xu
2017-10-26 15:04 ` Michael S. Tsirkin
2017-10-16 17:11 ` Prasad Singamsetty
2017-10-16 16:59 ` Prasad Singamsetty
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=2c478fc6-bb9a-3ac3-1f5d-c853b13dc8a1@oracle.com \
--to=prasad.singamsetty@oracle.com \
--cc=alex.williamson@redhat.com \
--cc=dgilbert@redhat.com \
--cc=ehabkost@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=sunit.jain@oracle.com \
/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).