From: Anthony Liguori <anthony@codemonkey.ws>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 3/3] [x86] SYSENTER/SYSEXIT IA-32e implementation v3
Date: Fri, 22 Aug 2008 12:24:06 -0500 [thread overview]
Message-ID: <48AEF636.9030901@codemonkey.ws> (raw)
In-Reply-To: <48AEC1A3.1010502@suse.de>
Alexander Graf wrote:
> On Intel CPUs, sysenter and sysexit are valid in 64-bit mode. This patch
> makes both 64-bit aware and enables them for Intel CPUs.
>
> Changes since v1: Add cpu save/load for 64-bit wide sysenter variables
>
> Signed-off-by: Alexander Graf <agraf@suse.de>
>
>
> Index: qemu/target-i386/machine.c
> ===================================================================
> --- qemu.orig/target-i386/machine.c
> +++ qemu/target-i386/machine.c
> @@ -88,9 +88,9 @@ void cpu_save(QEMUFile *f, void *opaque)
> cpu_put_seg(f, &env->gdt);
> cpu_put_seg(f, &env->idt);
>
> - qemu_put_be32s(f, &env->sysenter_cs);
> - qemu_put_be32s(f, &env->sysenter_esp);
> - qemu_put_be32s(f, &env->sysenter_eip);
> + qemu_put_bels(f, &env->sysenter_cs);
> + qemu_put_bels(f, &env->sysenter_esp);
> + qemu_put_bels(f, &env->sysenter_eip);
What exactly is be1s? Don't you mean be64s?
>
> qemu_put_betls(f, &env->cr[0]);
> qemu_put_betls(f, &env->cr[2]);
> @@ -169,7 +169,7 @@ int cpu_load(QEMUFile *f, void *opaque,
> int32_t a20_mask;
>
> if (version_id != 3 && version_id != 4 && version_id != 5
> - && version_id != 6)
> + && version_id != 6 && version_id != 7)
> return -EINVAL;
> for(i = 0; i < CPU_NB_REGS; i++)
> qemu_get_betls(f, &env->regs[i]);
> @@ -244,8 +244,13 @@ int cpu_load(QEMUFile *f, void *opaque,
> cpu_get_seg(f, &env->idt);
>
> qemu_get_be32s(f, &env->sysenter_cs);
> - qemu_get_be32s(f, &env->sysenter_esp);
> - qemu_get_be32s(f, &env->sysenter_eip);
> + if (version_id >= 7) {
> + qemu_get_bels(f, &env->sysenter_esp);
> + qemu_get_bels(f, &env->sysenter_eip);
>
Same here. This doesn't compile, does it?
> + } else {
> + qemu_get_be32s(f, &env->sysenter_esp);
> + qemu_get_be32s(f, &env->sysenter_eip);
> + }
>
> qemu_get_betls(f, &env->cr[0]);
> qemu_get_betls(f, &env->cr[2]);
Regards,
Anthony Liguori
next prev parent reply other threads:[~2008-08-22 17:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-22 13:39 [Qemu-devel] [PATCH 3/3] [x86] SYSENTER/SYSEXIT IA-32e implementation v3 Alexander Graf
2008-08-22 17:24 ` Anthony Liguori [this message]
2008-08-22 17:33 ` Alexander Graf
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=48AEF636.9030901@codemonkey.ws \
--to=anthony@codemonkey.ws \
--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.