From: "Alex Bennée" <alex.bennee@linaro.org>
To: Greg Bellows <greg.bellows@linaro.org>
Cc: peter.maydell@linaro.org, qemu-devel@nongnu.org,
christoffer.dall@linaro.org
Subject: Re: [Qemu-devel] [PATCH 2/5] target-arm: Add feature parsing to virt
Date: Tue, 20 Jan 2015 16:58:35 +0000 [thread overview]
Message-ID: <87y4ox75j8.fsf@linaro.org> (raw)
In-Reply-To: <1421706621-23731-3-git-send-email-greg.bellows@linaro.org>
Greg Bellows <greg.bellows@linaro.org> writes:
> Added machvirt parsing of feature keywords added to the -cpu command line
> option. Parsing occurs during machine initialization.
>
> Signed-off-by: Greg Bellows <greg.bellows@linaro.org>
> ---
> hw/arm/virt.c | 21 +++++++++++++++++++--
> 1 file changed, 19 insertions(+), 2 deletions(-)
>
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index 2353440..cd192ae 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -573,12 +573,19 @@ static void machvirt_init(MachineState *machine)
> MemoryRegion *ram = g_new(MemoryRegion, 1);
> const char *cpu_model = machine->cpu_model;
> VirtBoardInfo *vbi;
> + char *cpuname, *features;
>
> if (!cpu_model) {
> cpu_model = "cortex-a15";
> }
>
> - vbi = find_machine_info(cpu_model);
> + /* Separate the actual CPU model name from any appended features */
> + cpuname = g_strdup(cpu_model);
> + cpuname = strtok(cpuname, ",");
> + /* Keep track of the features for later parsing */
> + features = strtok(NULL, ",");
<snip>
OK having read the strtok man page a bit more closely the second time
I'm happy this doesn't leak. My more-gliby request is a matter of
personal taste.
--
Alex Bennée
next prev parent reply other threads:[~2015-01-20 16:58 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-19 22:30 [Qemu-devel] [PATCH 0/5] target-arm: ARM64: Adding EL1 AARCH32 guest support Greg Bellows
2015-01-19 22:30 ` [Qemu-devel] [PATCH 1/5] target-arm: Add ARM CPU feature parsing Greg Bellows
2015-01-20 14:19 ` Alex Bennée
2015-01-20 14:49 ` Greg Bellows
2015-01-21 10:57 ` Alex Bennée
2015-01-20 15:22 ` Igor Mammedov
2015-01-20 15:34 ` Peter Maydell
2015-01-20 15:59 ` Igor Mammedov
2015-01-20 16:08 ` Peter Maydell
2015-01-20 16:25 ` Igor Mammedov
2015-01-20 22:45 ` Greg Bellows
2015-01-21 11:33 ` Igor Mammedov
2015-01-20 15:34 ` Greg Bellows
2015-01-20 16:02 ` Eduardo Habkost
2015-01-20 16:05 ` Igor Mammedov
2015-01-19 22:30 ` [Qemu-devel] [PATCH 2/5] target-arm: Add feature parsing to virt Greg Bellows
2015-01-20 16:58 ` Alex Bennée [this message]
2015-01-19 22:30 ` [Qemu-devel] [PATCH 3/5] target-arm: Add 32/64-bit register sync Greg Bellows
2015-01-19 22:30 ` [Qemu-devel] [PATCH 4/5] target-arm: Add AArch32 guest support to KVM64 Greg Bellows
2015-01-20 16:57 ` Alex Bennée
2015-01-20 20:03 ` Greg Bellows
2015-01-21 10:54 ` Alex Bennée
2015-01-21 10:56 ` Peter Maydell
2015-01-19 22:30 ` [Qemu-devel] [PATCH 5/5] target-arm: Adjust kernel load address for Image Greg Bellows
2015-01-20 10:21 ` [Qemu-devel] [PATCH 0/5] target-arm: ARM64: Adding EL1 AARCH32 guest support Sergey Fedorov
2015-01-20 10:26 ` Peter Maydell
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=87y4ox75j8.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=christoffer.dall@linaro.org \
--cc=greg.bellows@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@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 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.