From: Tim Deegan <tim@xen.org>
To: Razvan Cojocaru <rzvncj@gmail.com>
Cc: Andrew Cooper <Andrew.Cooper3@citrix.com>,
Ian Campbell <Ian.Campbell@citrix.com>,
"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [PATCH] libxc: Add xc_domain_hvm_get_mtrr_type() call
Date: Wed, 19 Dec 2012 17:46:27 +0000 [thread overview]
Message-ID: <20121219174627.GA67643@ocelot.phlegethon.org> (raw)
In-Reply-To: <50D1EB56.40400@gmail.com>
At 18:29 +0200 on 19 Dec (1355941750), Razvan Cojocaru wrote:
> >>Ah - I see your concern. Yes - it might well be different. Is this
> >>information passed in an HVM save record? It does not appear to be
> >>associated with the MTRR HVM save record.
> >
> >No , this is the internal state not the save record but Razvan is
> >implementing the same logic in libxc which must necessarily be based on
> >the hvm saved state only and not the internal emulation state.
>
> Exactly, and all I need extra an extra variable in the save record (or
> simply a single bit in a safe place in one of the existing ones),
> telling me if the MTRRs are overlapped or not. The CPUID code is just a
> part of the logic that finds this out in the hypervisor; and
> specifically it is a part that's better _left_in_ the hypervisor. That
> is in fact what I was trying to say a few messages ago, when I called
> the cpuid_eax() function the tricky part. :)
>
> Do we agree that a bool_t overlapped should be added to struct
> hvm_hw_mtrr for this case?
Sorry, no. The 'overlapped' bit is a piece of xen implementation, and
not an architectural state of the VM, so it doesn't belong in the save
record. It's trivial to recalculate in a user-space tool, and the
result can be cached (since you can also get a mem-event on MSR writes,
you don't have to pull all this MTRR state out of the giuest except when
the MTRRs have been changed).
I'll take a proper look at this thread tomorrow and see if I can suggest
anything more helpful.
Tim.
next prev parent reply other threads:[~2012-12-19 17:46 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-17 11:38 [PATCH] libxc: Add xc_domain_hvm_get_mtrr_type() call Razvan Cojocaru
2012-12-18 17:04 ` Ian Campbell
2012-12-18 17:24 ` Razvan Cojocaru
2012-12-19 10:14 ` Ian Campbell
2012-12-19 10:42 ` Razvan Cojocaru
2012-12-19 11:28 ` Ian Campbell
2012-12-19 11:49 ` Razvan Cojocaru
2012-12-19 12:00 ` Razvan Cojocaru
2012-12-19 14:57 ` Razvan Cojocaru
2012-12-19 15:00 ` Ian Campbell
2012-12-19 15:10 ` Razvan Cojocaru
2012-12-19 15:27 ` Andrew Cooper
2012-12-19 15:54 ` Ian Campbell
2012-12-19 16:11 ` Andrew Cooper
2012-12-19 16:15 ` Ian Campbell
2012-12-19 16:29 ` Razvan Cojocaru
2012-12-19 17:46 ` Tim Deegan [this message]
2012-12-19 19:35 ` Razvan Cojocaru
2012-12-20 11:57 ` Tim Deegan
2012-12-20 13:40 ` Razvan Cojocaru
2012-12-19 15:43 ` Razvan Cojocaru
2012-12-20 11:54 ` Tim Deegan
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=20121219174627.GA67643@ocelot.phlegethon.org \
--to=tim@xen.org \
--cc=Andrew.Cooper3@citrix.com \
--cc=Ian.Campbell@citrix.com \
--cc=rzvncj@gmail.com \
--cc=xen-devel@lists.xen.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).