xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Sheng Yang <sheng@linux.intel.com>
To: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: xen-devel <xen-devel@lists.xensource.com>,
	Ian Campbell <Ian.Campbell@citrix.com>,
	"Yaozu (Eddie) Dong" <eddie.dong@intel.com>,
	linux-kernel@vger.kernel.org, Ian Pratt <Ian.Pratt@eu.citrix.com>,
	Keir Fraser <keir.fraser@eu.citrix.com>
Subject: Re: [Xen-devel] [PATCH][v9 4/6] xen/hvm: Xen PV extension of HVM initialization
Date: Mon, 15 Mar 2010 09:45:09 +0800	[thread overview]
Message-ID: <201003150945.09548.sheng@linux.intel.com> (raw)
In-Reply-To: <4B9AA5A9.20609@goop.org>

On Saturday 13 March 2010 04:35:53 Jeremy Fitzhardinge wrote:
> On 03/11/2010 06:57 PM, Sheng Yang wrote:
> > The PV extended HVM(once known as Hybrid) is started from real mode like
> > HVM guest, but also with a component based PV feature selection(e.g. PV
> > halt, PV timer, event channel, then PV drivers). So guest can takes the
> > advantages of both H/W virtualization and Para-Virtualization.
> >
> > This patch introduced the PV extension of HVM guest initialization.
> >
> > Guest would detect the capability using CPUID 0x40000002.edx, then call
> > HVMOP_enable_pv hypercall to enable pv support in hypervisor.
> >
> > Signed-off-by: Sheng Yang<sheng@linux.intel.com>
> > Signed-off-by: Yaozu (Eddie) Dong<eddie.dong@intel.com>
> > ---
> >   arch/x86/include/asm/xen/cpuid.h      |    5 +
> >   arch/x86/include/asm/xen/hypervisor.h |   12 +++
> >   arch/x86/xen/Kconfig                  |    4 +
> >   arch/x86/xen/Makefile                 |    1 +
> >   arch/x86/xen/hvmpv.c                  |  135
> > +++++++++++++++++++++++++++++++++ include/xen/interface/hvm/hvm_op.h    |
> >    8 ++
> >   6 files changed, 165 insertions(+), 0 deletions(-)
> >   create mode 100644 arch/x86/xen/hvmpv.c
> >
> > diff --git a/arch/x86/include/asm/xen/cpuid.h
> > b/arch/x86/include/asm/xen/cpuid.h index 8787f03..b3a0b3a 100644
> > --- a/arch/x86/include/asm/xen/cpuid.h
> > +++ b/arch/x86/include/asm/xen/cpuid.h
> > @@ -65,4 +65,9 @@
> >   #define _XEN_CPUID_FEAT1_MMU_PT_UPDATE_PRESERVE_AD 0
> >   #define XEN_CPUID_FEAT1_MMU_PT_UPDATE_PRESERVE_AD  (1u<<0)
> >
> > +#define _XEN_CPUID_FEAT2_HVM_PV 0
> > +#define XEN_CPUID_FEAT2_HVM_PV (1u<<0)
> > +#define _XEN_CPUID_FEAT2_HVM_PV_CLOCK 1
> > +#define XEN_CPUID_FEAT2_HVM_PV_CLOCK (1u<<1)
> > +
> >   #endif /* __XEN_PUBLIC_ARCH_X86_CPUID_H__ */
> > diff --git a/arch/x86/include/asm/xen/hypervisor.h
> > b/arch/x86/include/asm/xen/hypervisor.h index d5b7e90..7569f64 100644
> > --- a/arch/x86/include/asm/xen/hypervisor.h
> > +++ b/arch/x86/include/asm/xen/hypervisor.h
> > @@ -55,6 +55,18 @@ extern enum xen_domain_type xen_domain_type;
> >   #define xen_hvm_domain()	(xen_domain()&&			\
> >   				 xen_domain_type == XEN_HVM_DOMAIN)
> >
> > +#ifdef CONFIG_XEN_HVM_PV
> > +
> > +#define XEN_HVM_PV_CLOCK_ENABLED   (1u<<  0)
> 
> Why is this flag needed?  As far as I understand it, there's no real
> underlying hypervisor change needed to make HVM access to pv clock
> possible; its just a field in the shared_info's vcpu struct after all.
> Even if you enable this feature unconditionally, the user can still
> control whether the Xen clocksource is used with the "clocksource="
> kernel command-line parameter.

But we should make sure Xen have ability to support such kind of operation. 
The CPUID would show if Xen have such ability, and if it does, the feature 
would be enabled unconditionally. Guest kernel always enable all features it 
can do unconditionally, but Xen should offer the support for them.
 
> Also, there's nothing about this which is 64-bit specific is there?

64 bit things are mostly evtchn/interrupt related. I think no such limit here. 
But I think it's better to do it step by step, so leave it after evtchn 
solution settled.

-- 
regards
Yang, Sheng

  reply	other threads:[~2010-03-15  1:45 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-12  2:57 [PATCH][v9 0/6] PV extension of HVM (Hybrid) for Xen Sheng Yang
2010-03-12  2:57 ` [PATCH][v9 1/6] xen: add support for hvm_op Sheng Yang
2010-03-12  2:57 ` [PATCH][v9 2/6] xen: Import cpuid.h from Xen Sheng Yang
2010-03-12  2:57 ` [PATCH][v9 3/6] xen: Make pv drivers only work with xen_pv_domain() Sheng Yang
2010-03-12  2:57 ` [PATCH][v9 4/6] xen/hvm: Xen PV extension of HVM initialization Sheng Yang
2010-03-12 20:35   ` [Xen-devel] " Jeremy Fitzhardinge
2010-03-15  1:45     ` Sheng Yang [this message]
2010-03-15 12:04       ` Stefano Stabellini
2010-03-15 22:59         ` Jeremy Fitzhardinge
2010-03-16  1:51           ` Sheng Yang
2010-03-16 17:12             ` Jeremy Fitzhardinge
2010-03-16 17:20               ` Ian Campbell
2010-03-16 17:29                 ` Jeremy Fitzhardinge
2010-03-12  2:57 ` [PATCH][v9 5/6] x86/xen: The entrance for PV extension of HVM Sheng Yang
2010-03-12  2:57 ` [PATCH][v9 6/6] xen: Enable PV clocksource for HVM Sheng Yang
2010-03-12 20:37   ` Jeremy Fitzhardinge

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=201003150945.09548.sheng@linux.intel.com \
    --to=sheng@linux.intel.com \
    --cc=Ian.Campbell@citrix.com \
    --cc=Ian.Pratt@eu.citrix.com \
    --cc=eddie.dong@intel.com \
    --cc=jeremy@goop.org \
    --cc=keir.fraser@eu.citrix.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xen-devel@lists.xensource.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 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).