From: Avi Kivity <avi@redhat.com>
To: kvm-ia64@vger.kernel.org
Subject: Re: [patch] fix kvm_arch_vcpu_ioctl_[gs]et_regs()
Date: Wed, 10 Dec 2008 09:00:27 +0000 [thread overview]
Message-ID: <493F852B.8030806@redhat.com> (raw)
In-Reply-To: <493E906C.8030800@sgi.com>
Jes Sorensen wrote:
> Hi,
>
> This patch makes these two macros do something sensible on ia64 and
> work the way qemu expects to use them. The old versions clearly couldn't
> have worked since the get_regs() call expected pointers in the kvm_regs
> struct which were never copied in.
>
> Fix kvm_arch_vcpu_ioctl_[gs]et_regs() to do something meaningful on
> ia64. Old versions could never have worked since they required
> pointers to be set in the ioctl payload which were never being set by
> the ioctl handler for get_regs.
>
> This version doesn't support copying the KVM kernel stack in/out of
> the kernel. This should be implemented in a seperate ioctl call if
> ever needed.
>
>
> struct kvm_regs {
> - char *saved_guest;
> - char *saved_stack;
> struct saved_vpd vpd;
> /*Arch-regs*/
> int mp_state;
> @@ -233,6 +231,8 @@
> unsigned long fp_psr; /*used for lazy float register */
> unsigned long saved_gp;
> /*for phycial emulation */
> +
> + union context saved_guest;
> };
>
>
This makes several tons of sense, but breaks backwards compatibility.
If I understand correctly, get/set was never used so this shouldn't matter?
I suggest reserving some space at the end of kvm_regs in case further
state needs to be added.
Please add a KVM_CAP_ entry to advertise the fixup. This way userspace
can determine that it's compiling or running on an old kernel and error
out gracefully.
--
error compiling committee.c: too many arguments to function
next prev parent reply other threads:[~2008-12-10 9:00 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-12-09 15:36 [patch] fix kvm_arch_vcpu_ioctl_[gs]et_regs() Jes Sorensen
2008-12-10 2:39 ` Zhang, Xiantao
2008-12-10 8:28 ` Jes Sorensen
2008-12-10 8:36 ` Zhang, Xiantao
2008-12-10 8:39 ` Jes Sorensen
2008-12-10 8:44 ` Zhang, Xiantao
2008-12-10 9:00 ` Avi Kivity [this message]
2008-12-10 9:20 ` Zhang, Xiantao
2008-12-10 9:55 ` Jes Sorensen
2008-12-12 14:44 ` Jes Sorensen
2008-12-13 15:54 ` Zhang, Xiantao
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=493F852B.8030806@redhat.com \
--to=avi@redhat.com \
--cc=kvm-ia64@vger.kernel.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.