From: Avi Kivity <avi@qumranet.com>
To: Marcelo Tosatti <mtosatti@redhat.com>
Cc: kvm-devel <kvm@vger.kernel.org>
Subject: Re: RFC: cache_regs in kvm_emulate_pio
Date: Sun, 22 Jun 2008 08:16:19 +0300 [thread overview]
Message-ID: <485DE023.4060006@qumranet.com> (raw)
In-Reply-To: <20080621194639.GA15032@dmt.cnet>
Marcelo Tosatti wrote:
> On Sat, Jun 21, 2008 at 10:04:18AM +0300, Avi Kivity wrote:
>
>>> /*
>>> * Sync the rsp and rip registers into the vcpu structure. This allows
>>> * registers to be accessed by indexing vcpu->arch.regs.
>>> */
>>>
>>> But I think it just refers to the interface in general, so that nobody
>>> would try to access RSP or RIP (and RAX in AMD's case) before calling
>>> ->cache_regs().
>>>
>>>
>> It refers to the fact that sometimes you don't know which registers you
>> refer to, e.g. in the emulator.
>>
>
> How's this?
>
>
Looks good, but we can aim higher. The cache_regs() API was always
confusing (I usually swap the two parts). If we replace all ->regs
access with accessors, we can make it completely transparent.
It will be tricky in the emulator, but worthwhile, no?
--
Do not meddle in the internals of kernels, for they are subtle and quick to panic.
next prev parent reply other threads:[~2008-06-22 5:16 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-21 19:46 RFC: cache_regs in kvm_emulate_pio Marcelo Tosatti
2008-06-22 5:16 ` Avi Kivity [this message]
2008-06-22 18:05 ` Marcelo Tosatti
2008-06-24 19:33 ` Marcelo Tosatti
2008-06-26 9:18 ` Avi Kivity
2008-06-26 14:52 ` Marcelo Tosatti
2008-06-26 22:15 ` Marcelo Tosatti
2008-06-27 2:28 ` Marcelo Tosatti
-- strict thread matches above, loose matches on Subject: below --
2008-06-19 23:31 Marcelo Tosatti
2008-06-20 20:30 ` Avi Kivity
2008-06-20 21:24 ` Marcelo Tosatti
2008-06-21 7:04 ` Avi Kivity
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=485DE023.4060006@qumranet.com \
--to=avi@qumranet.com \
--cc=kvm@vger.kernel.org \
--cc=mtosatti@redhat.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.