From: Ani Sinha <anisinha@redhat.com>
To: David Hildenbrand <david@redhat.com>
Cc: "Michael S. Tsirkin" <mst@redhat.com>,
"Marcel Apfelbaum" <marcel.apfelbaum@gmail.com>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Richard Henderson" <richard.henderson@linaro.org>,
"Eduardo Habkost" <eduardo@habkost.net>,
"Igor Mammedov" <imammedo@redhat.com>,
"Xiao Guangrong" <xiaoguangrong.eric@gmail.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Yanan Wang" <wangyanan55@huawei.com>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [PATCH] mem/x86: add processor address space check for VM memory
Date: Mon, 18 Sep 2023 15:37:35 +0530 [thread overview]
Message-ID: <CAK3XEhOQCudb0VsBHFfubbcRredLMuSQCTA6fhbg99f7W9y5PA@mail.gmail.com> (raw)
In-Reply-To: <143a437c-be99-d6d8-732f-e9544e2d9b35@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1338 bytes --]
On Mon, 18 Sept, 2023, 3:03 pm David Hildenbrand, <david@redhat.com> wrote:
> >>
> >>>> /*
> >>>> * The 64bit pci hole starts after "above 4G RAM" and
> >>>> * potentially the space reserved for memory hotplug.
> >>>> */
> >>>>
> >>>> There is the
> >>>> ROUND_UP(hole64_start, 1 * GiB);
> >>>> in there that is not really required for the !hole64 case. It
> >>>> shouldn't matter much in practice I think (besides an aligned value
> >>>> showing up in the error message).
> >>>>
> >>>> We could factor out most of that calculation into a
> >>>> separate function, skipping that alignment to make that
> >>>> clearer.
> >>> Yeah this whole memory segmentation is quite complicated and might
> benefit from a qemu doc or a refactoring.
> >>
> >> Absolutely. Do you have time to work on that (including the updated
> fix?).
> >
> > Other than the fix you proposed I am not sure if we need to fix anything
> else atm. Seems physical address space bound checks are already in place.
> > Re: doc, maybe. I will add it to my TODO list.
>
> Will you send a proper patch, ideally not using pc_pci_hole64_start()
> but instead the same logic without the final alignment to 1 GiB?
>
I'll send. No problem. Could you answer my other question please ?
> I can also do it, but might take a bit longer.
>
> --
> Cheers,
>
> David / dhildenb
>
>
[-- Attachment #2: Type: text/html, Size: 2171 bytes --]
next prev parent reply other threads:[~2023-09-18 10:08 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-08 9:50 [PATCH] mem/x86: add processor address space check for VM memory Ani Sinha
2023-09-08 10:28 ` David Hildenbrand
2023-09-08 14:12 ` Ani Sinha
2023-09-08 14:16 ` David Hildenbrand
2023-09-08 15:13 ` Ani Sinha
2023-09-08 16:02 ` David Hildenbrand
2023-09-08 16:04 ` David Hildenbrand
2023-09-12 10:41 ` Ani Sinha
2023-09-12 15:34 ` David Hildenbrand
2023-09-14 5:53 ` Ani Sinha
2023-09-14 8:37 ` David Hildenbrand
2023-09-14 11:21 ` Ani Sinha
2023-09-14 11:49 ` David Hildenbrand
2023-09-15 10:38 ` Ani Sinha
2023-09-18 9:33 ` David Hildenbrand
2023-09-18 10:07 ` Ani Sinha [this message]
2023-09-18 10:09 ` David Hildenbrand
2023-09-18 10:11 ` Ani Sinha
2023-09-18 10:14 ` Ani Sinha
2023-09-18 10:19 ` David Hildenbrand
2023-09-18 10:54 ` Ani Sinha
2023-09-18 10:58 ` David Hildenbrand
2023-09-18 11:00 ` Ani Sinha
2023-09-18 11:02 ` Ani Sinha
2023-09-18 11:02 ` David Hildenbrand
2023-09-18 11:04 ` Ani Sinha
2023-09-14 17:11 ` Ani Sinha
2023-09-16 5:17 ` Ani Sinha
2023-09-08 16:04 ` Philippe Mathieu-Daudé
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=CAK3XEhOQCudb0VsBHFfubbcRredLMuSQCTA6fhbg99f7W9y5PA@mail.gmail.com \
--to=anisinha@redhat.com \
--cc=david@redhat.com \
--cc=eduardo@habkost.net \
--cc=imammedo@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=wangyanan55@huawei.com \
--cc=xiaoguangrong.eric@gmail.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).