* [Qemu-devel] [PATCH 1/1] main loop: remove useless code
@ 2017-12-02 7:41 FelixYao
2017-12-02 11:52 ` Peter Maydell
0 siblings, 1 reply; 3+ messages in thread
From: FelixYao @ 2017-12-02 7:41 UTC (permalink / raw)
To: pbonzini; +Cc: qemu-devel, FelixYao
hi Paolo Bonzini:
Those codes seem useless, Could it be removed?
Signed-off-by: FelixYao <felix.yzg@gmail.com>
---
vl.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/vl.c b/vl.c
index 1ad1c04..5bed4c2 100644
--- a/vl.c
+++ b/vl.c
@@ -2995,10 +2995,6 @@ static void set_memory_options(uint64_t *ram_slots, ram_addr_t *maxram_size,
sz = QEMU_ALIGN_UP(sz, 8192);
ram_size = sz;
- if (ram_size != sz) {
- error_report("ram size too large");
- exit(EXIT_FAILURE);
- }
/* store value for the future use */
qemu_opt_set_number(opts, "size", ram_size, &error_abort);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH 1/1] main loop: remove useless code
2017-12-02 7:41 [Qemu-devel] [PATCH 1/1] main loop: remove useless code FelixYao
@ 2017-12-02 11:52 ` Peter Maydell
2017-12-04 2:08 ` felix yao
0 siblings, 1 reply; 3+ messages in thread
From: Peter Maydell @ 2017-12-02 11:52 UTC (permalink / raw)
To: FelixYao; +Cc: Paolo Bonzini, QEMU Developers
On 2 December 2017 at 07:41, FelixYao <felix.yzg@gmail.com> wrote:
> hi Paolo Bonzini:
>
> Those codes seem useless, Could it be removed?
>
> Signed-off-by: FelixYao <felix.yzg@gmail.com>
> ---
> vl.c | 4 ----
> 1 file changed, 4 deletions(-)
>
> diff --git a/vl.c b/vl.c
> index 1ad1c04..5bed4c2 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -2995,10 +2995,6 @@ static void set_memory_options(uint64_t *ram_slots, ram_addr_t *maxram_size,
>
> sz = QEMU_ALIGN_UP(sz, 8192);
> ram_size = sz;
> - if (ram_size != sz) {
> - error_report("ram size too large");
> - exit(EXIT_FAILURE);
> - }
ram_size is a ramaddr_t, which may be a 32-bit variable, whereas
sz is a uint64_t. This check is making sure that the ram size
specified can actually fit in a ramaddr_t.
thanks
-- PMM
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Qemu-devel] [PATCH 1/1] main loop: remove useless code
2017-12-02 11:52 ` Peter Maydell
@ 2017-12-04 2:08 ` felix yao
0 siblings, 0 replies; 3+ messages in thread
From: felix yao @ 2017-12-04 2:08 UTC (permalink / raw)
To: Peter Maydell; +Cc: Paolo Bonzini, QEMU Developers
Hi Peter Maydell:
Got it, thank you very much!
2017-12-02 19:52 GMT+08:00 Peter Maydell <peter.maydell@linaro.org>:
> On 2 December 2017 at 07:41, FelixYao <felix.yzg@gmail.com> wrote:
> > hi Paolo Bonzini:
> >
> > Those codes seem useless, Could it be removed?
> >
> > Signed-off-by: FelixYao <felix.yzg@gmail.com>
> > ---
> > vl.c | 4 ----
> > 1 file changed, 4 deletions(-)
> >
> > diff --git a/vl.c b/vl.c
> > index 1ad1c04..5bed4c2 100644
> > --- a/vl.c
> > +++ b/vl.c
> > @@ -2995,10 +2995,6 @@ static void set_memory_options(uint64_t
> *ram_slots, ram_addr_t *maxram_size,
> >
> > sz = QEMU_ALIGN_UP(sz, 8192);
> > ram_size = sz;
> > - if (ram_size != sz) {
> > - error_report("ram size too large");
> > - exit(EXIT_FAILURE);
> > - }
>
> ram_size is a ramaddr_t, which may be a 32-bit variable, whereas
> sz is a uint64_t. This check is making sure that the ram size
> specified can actually fit in a ramaddr_t.
>
> thanks
> -- PMM
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-12-04 2:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-02 7:41 [Qemu-devel] [PATCH 1/1] main loop: remove useless code FelixYao
2017-12-02 11:52 ` Peter Maydell
2017-12-04 2:08 ` felix yao
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.