From: Avi Kivity <avi@redhat.com>
To: Matteo Signorini <signorinimatteo@gmail.com>
Cc: kvm@vger.kernel.org
Subject: Re: problem with vm-exit exit code
Date: Tue, 19 Jan 2010 12:46:43 +0200 [thread overview]
Message-ID: <4B558D93.4050101@redhat.com> (raw)
In-Reply-To: <bdf5bab31001181509r7dbecc7dp449f1ee85f3eae31@mail.gmail.com>
On 01/19/2010 01:09 AM, Matteo Signorini wrote:
> Hi guys,
>
> I would like to intercept the vm-exit whenever the guest executes a
> lidt/sidt instruction.
> I know that lidt/sidt instructions cause a vm-exit if and only if
> these condition are satisfied:
>
> -commands are executed in vmx non-root environment
> -the "descriptor-table exiting" field of the secondary vm-execution
> control structure is enabled
>
> The first condition is satisfied because the guest OS executes the
> lidt/sidt in the boot routine so we are in the vmx non-root
> environment.
> To satisfy the second condition, I set up the 31th bit in the primary
> vm-execution control to 1 to enable the secondary vm-execution
> control,
> then I set up the 2nd bit of the secondary vm-execution control to 1
> to enable the "descriptor-table exiting".
>
> The problem is that I never get the exit_code=46 (that should
> correspond to the IDTR access as shown in the Intel developer's
> manual).
> What I get is exit_code=0 and then the VM freezes.
>
> I wonder why I get 0 as exit reason instead of 46?
>
> Qemu gives me the following error message:
> "kvm: unhandled exit 7
> kvm_run returned -22"
>
> The unhandled exit code correspond to the 7th vm-instruction error
> number referred to: "VM-Entry with invalid control field(s)"
>
Did you check whether your processor supports descriptor-table exiting?
The 'vmxcap' script can help determine that.
--
error compiling committee.c: too many arguments to function
prev parent reply other threads:[~2010-01-19 10:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-01-18 23:09 problem with vm-exit exit code Matteo Signorini
2010-01-19 10:46 ` Avi Kivity [this message]
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=4B558D93.4050101@redhat.com \
--to=avi@redhat.com \
--cc=kvm@vger.kernel.org \
--cc=signorinimatteo@gmail.com \
/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.