From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Stefano Stabellini <sstabellini@kernel.org>,
Eduardo Habkost <ehabkost@redhat.com>,
Sergio Lopez <slp@redhat.com>, Paul Durrant <paul@xen.org>,
"Michael S. Tsirkin" <mst@redhat.com>,
imammedo@redhat.com, Gerd Hoffmann <kraxel@redhat.com>,
Marcel Apfelbaum <marcel.apfelbaum@gmail.com>,
xen-devel@lists.xenproject.org,
Anthony Perard <anthony.perard@citrix.com>,
Paolo Bonzini <pbonzini@redhat.com>,
philmd@redhat.com, Richard Henderson <rth@twiddle.net>
Subject: [PATCH v3 2/4] microvm: drop max-ram-below-4g support
Date: Fri, 29 May 2020 09:39:55 +0200 [thread overview]
Message-ID: <20200529073957.8018-3-kraxel@redhat.com> (raw)
In-Reply-To: <20200529073957.8018-1-kraxel@redhat.com>
Not useful for microvm and allows users to shoot themself
into the foot (make ram + mmio overlap).
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
hw/i386/microvm.c | 19 -------------------
1 file changed, 19 deletions(-)
diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c
index 44f940813b07..5e931975a06d 100644
--- a/hw/i386/microvm.c
+++ b/hw/i386/microvm.c
@@ -173,25 +173,6 @@ static void microvm_memory_init(MicrovmMachineState *mms)
ram_addr_t lowmem = 0xc0000000; /* 3G */
int i;
- /*
- * Handle the machine opt max-ram-below-4g. It is basically doing
- * min(qemu limit, user limit).
- */
- if (!x86ms->max_ram_below_4g) {
- x86ms->max_ram_below_4g = 4 * GiB;
- }
- if (lowmem > x86ms->max_ram_below_4g) {
- lowmem = x86ms->max_ram_below_4g;
- if (machine->ram_size - lowmem > lowmem &&
- lowmem & (1 * GiB - 1)) {
- warn_report("There is possibly poor performance as the ram size "
- " (0x%" PRIx64 ") is more then twice the size of"
- " max-ram-below-4g (%"PRIu64") and"
- " max-ram-below-4g is not a multiple of 1G.",
- (uint64_t)machine->ram_size, x86ms->max_ram_below_4g);
- }
- }
-
if (machine->ram_size > lowmem) {
x86ms->above_4g_mem_size = machine->ram_size - lowmem;
x86ms->below_4g_mem_size = lowmem;
--
2.18.4
WARNING: multiple messages have this Message-ID (diff)
From: Gerd Hoffmann <kraxel@redhat.com>
To: qemu-devel@nongnu.org
Cc: Stefano Stabellini <sstabellini@kernel.org>,
Eduardo Habkost <ehabkost@redhat.com>,
Sergio Lopez <slp@redhat.com>, Paul Durrant <paul@xen.org>,
"Michael S. Tsirkin" <mst@redhat.com>,
imammedo@redhat.com, Gerd Hoffmann <kraxel@redhat.com>,
xen-devel@lists.xenproject.org,
Anthony Perard <anthony.perard@citrix.com>,
Paolo Bonzini <pbonzini@redhat.com>,
philmd@redhat.com, Richard Henderson <rth@twiddle.net>
Subject: [PATCH v3 2/4] microvm: drop max-ram-below-4g support
Date: Fri, 29 May 2020 09:39:55 +0200 [thread overview]
Message-ID: <20200529073957.8018-3-kraxel@redhat.com> (raw)
In-Reply-To: <20200529073957.8018-1-kraxel@redhat.com>
Not useful for microvm and allows users to shoot themself
into the foot (make ram + mmio overlap).
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Igor Mammedov <imammedo@redhat.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
---
hw/i386/microvm.c | 19 -------------------
1 file changed, 19 deletions(-)
diff --git a/hw/i386/microvm.c b/hw/i386/microvm.c
index 44f940813b07..5e931975a06d 100644
--- a/hw/i386/microvm.c
+++ b/hw/i386/microvm.c
@@ -173,25 +173,6 @@ static void microvm_memory_init(MicrovmMachineState *mms)
ram_addr_t lowmem = 0xc0000000; /* 3G */
int i;
- /*
- * Handle the machine opt max-ram-below-4g. It is basically doing
- * min(qemu limit, user limit).
- */
- if (!x86ms->max_ram_below_4g) {
- x86ms->max_ram_below_4g = 4 * GiB;
- }
- if (lowmem > x86ms->max_ram_below_4g) {
- lowmem = x86ms->max_ram_below_4g;
- if (machine->ram_size - lowmem > lowmem &&
- lowmem & (1 * GiB - 1)) {
- warn_report("There is possibly poor performance as the ram size "
- " (0x%" PRIx64 ") is more then twice the size of"
- " max-ram-below-4g (%"PRIu64") and"
- " max-ram-below-4g is not a multiple of 1G.",
- (uint64_t)machine->ram_size, x86ms->max_ram_below_4g);
- }
- }
-
if (machine->ram_size > lowmem) {
x86ms->above_4g_mem_size = machine->ram_size - lowmem;
x86ms->below_4g_mem_size = lowmem;
--
2.18.4
next prev parent reply other threads:[~2020-05-29 7:40 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-29 7:39 [PATCH v3 0/4] microvm: memory config tweaks Gerd Hoffmann
2020-05-29 7:39 ` Gerd Hoffmann
2020-05-29 7:39 ` [PATCH v3 1/4] microvm: use 3G split unconditionally Gerd Hoffmann
2020-05-29 7:39 ` Gerd Hoffmann
2020-05-29 7:39 ` Gerd Hoffmann [this message]
2020-05-29 7:39 ` [PATCH v3 2/4] microvm: drop max-ram-below-4g support Gerd Hoffmann
2020-05-29 7:39 ` [PATCH v3 3/4] x86: move max-ram-below-4g to pc Gerd Hoffmann
2020-05-29 7:39 ` Gerd Hoffmann
2020-05-29 7:44 ` Paul Durrant
2020-05-29 7:44 ` Paul Durrant
2020-05-29 7:39 ` [PATCH v3 4/4] microvm: move virtio base to 0xfeb00000 Gerd Hoffmann
2020-05-29 7:39 ` Gerd Hoffmann
2020-06-08 13:33 ` Michael S. Tsirkin
2020-06-08 13:33 ` Michael S. Tsirkin
2020-06-02 5:30 ` [PATCH v3 0/4] microvm: memory config tweaks Michael S. Tsirkin
2020-06-02 5:30 ` Michael S. Tsirkin
2020-06-08 13:25 ` Gerd Hoffmann
2020-06-08 13:25 ` Gerd Hoffmann
2020-06-17 12:25 ` Gerd Hoffmann
2020-06-17 12:25 ` Gerd Hoffmann
2020-06-08 13:31 ` Michael S. Tsirkin
2020-06-08 13:31 ` Michael S. Tsirkin
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=20200529073957.8018-3-kraxel@redhat.com \
--to=kraxel@redhat.com \
--cc=anthony.perard@citrix.com \
--cc=ehabkost@redhat.com \
--cc=imammedo@redhat.com \
--cc=marcel.apfelbaum@gmail.com \
--cc=mst@redhat.com \
--cc=paul@xen.org \
--cc=pbonzini@redhat.com \
--cc=philmd@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=slp@redhat.com \
--cc=sstabellini@kernel.org \
--cc=xen-devel@lists.xenproject.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.