From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Jan Beulich <JBeulich@suse.com>, roger.pau@citrix.com
Cc: elena.ufimtseva@oracle.com, wei.liu2@citrix.com,
ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com,
andrew.cooper3@citrix.com, ian.jackson@eu.citrix.com,
xen-devel@lists.xen.org
Subject: Re: [PATCH v3 2/4] x86/compat: Test both PV and PVH guests for compat mode
Date: Fri, 24 Jul 2015 13:54:58 -0400 [thread overview]
Message-ID: <55B27BF2.1080902@oracle.com> (raw)
In-Reply-To: <55B111500200007800094A51@prv-mh.provo.novell.com>
On 07/23/2015 10:07 AM, Jan Beulich wrote:
>>>> On 11.07.15 at 00:20, <boris.ostrovsky@oracle.com> wrote:
>> Add is_pvh_32bit_domain() macro and use it alongside is_pv_32bit_domain()
>> where necessary.
>>
>> Since PVH guests cannot change execution mode, has_32bit_shinfo is a good
>> indicator of whether the guest is PVH and 32-bit.
>>
>> Signed-off-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> Relative to what is in the tree right now this is fine, but ...
>
>> @@ -771,7 +771,7 @@ int arch_set_info_guest(
>>
>> /* The context is a compat-mode one if the target domain is compat-mode;
>> * we expect the tools to DTRT even in compat-mode callers. */
>> - compat = is_pv_32bit_domain(d);
>> + compat = is_pv_32bit_domain(d) || is_pvh_32bit_domain(d);
> ... won't this and ...
>
>> @@ -1203,7 +1204,7 @@ void arch_get_info_guest(struct vcpu *v, vcpu_guest_context_u c)
>> {
>> unsigned int i;
>> const struct domain *d = v->domain;
>> - bool_t compat = is_pv_32bit_domain(d);
>> + bool_t compat = is_pv_32bit_domain(d) || is_pvh_32bit_domain(d);
> ... this get in the way of what we called "no-pm" on yesterday's call?
I made no effort to make this workable for "no-dm" case. This will
probably need to be adjusted when that code gets in. IIRC this new code
has a flag (or something along those lines) that will allow us to
distinguish PVH-"classic" vs. "no-dm".
> I would assume that for the transitional period both ought to be able
> to co-exist.
Yes, but I suspect this will not be the only place where we will need to
have different code paths for the two approaches. hvm_set_cr0(), for
example, doesn't allow PVH guests to switch modes.
> Plus - is this in line with what the tools are doing? Aren't they
> assuming !PV <=> native format context? I.e. don't you need
> to treat differently v->domain == current->domain and its
> opposite? Roger btw. raised a similar question on IRC earlier
> today...
Not sure I understand this. You mean for copying 64-bit guest's info
into 32-bit dom0?
-boris
next prev parent reply other threads:[~2015-07-24 17:54 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-10 22:20 [PATCH v3 0/4] 32-bit domU PVH support Boris Ostrovsky
2015-07-10 22:20 ` [PATCH v3 1/4] x86/pvh: Set 32b PVH guest mode in XEN_DOMCTL_set_address_size Boris Ostrovsky
2015-07-23 13:59 ` Jan Beulich
2015-07-10 22:20 ` [PATCH v3 2/4] x86/compat: Test both PV and PVH guests for compat mode Boris Ostrovsky
2015-07-23 14:07 ` Jan Beulich
2015-07-23 14:13 ` Ian Campbell
2015-07-23 14:23 ` Jan Beulich
2015-07-24 17:54 ` Boris Ostrovsky [this message]
2015-08-11 9:19 ` Jan Beulich
2015-08-11 17:21 ` Boris Ostrovsky
2015-08-12 6:23 ` Jan Beulich
2015-08-12 15:02 ` Boris Ostrovsky
2015-07-10 22:20 ` [PATCH v3 3/4] x86/pvh: Handle hypercalls for 32b PVH guests Boris Ostrovsky
2015-07-23 14:21 ` Jan Beulich
2015-07-24 18:35 ` Boris Ostrovsky
2015-08-11 9:32 ` Jan Beulich
2015-07-10 22:20 ` [PATCH v3 4/4] libxc/x86/pvh: Allow creation of " Boris Ostrovsky
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=55B27BF2.1080902@oracle.com \
--to=boris.ostrovsky@oracle.com \
--cc=JBeulich@suse.com \
--cc=andrew.cooper3@citrix.com \
--cc=elena.ufimtseva@oracle.com \
--cc=ian.campbell@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=roger.pau@citrix.com \
--cc=stefano.stabellini@eu.citrix.com \
--cc=wei.liu2@citrix.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 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.