All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Liu <wei.liu2@citrix.com>
To: Julien Grall <julien.grall@arm.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>,
	Wei Liu <wei.liu2@citrix.com>,
	George Dunlap <George.Dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>, Tim Deegan <tim@xen.org>,
	Jan Beulich <JBeulich@suse.com>,
	xen-devel <xen-devel@lists.xenproject.org>
Subject: Re: [PATCH 05/34] xen: is_hvm_domain should evaluate to 0 when !CONFIG_HVM
Date: Wed, 22 Aug 2018 16:20:09 +0100	[thread overview]
Message-ID: <20180822152009.klgirnzahomze4ho@citrix.com> (raw)
In-Reply-To: <97c3ad0f-d138-3216-1dc9-f178ed95bb59@arm.com>

On Wed, Aug 22, 2018 at 04:11:45PM +0100, Julien Grall wrote:
> Hi Wei,
> 
> On 21/08/18 21:08, Wei Liu wrote:
> > On Tue, Aug 21, 2018 at 11:59:26AM -0700, Stefano Stabellini wrote:
> > > On Tue, 21 Aug 2018, Julien Grall wrote:
> > > > On 08/21/2018 07:49 PM, Wei Liu wrote:
> > > > > On Tue, Aug 21, 2018 at 07:33:56PM +0100, Julien Grall wrote:
> > > > > > Hi Wei,
> > > > > > 
> > > > > > On 08/21/2018 05:31 PM, Wei Liu wrote:
> > > > > > > On Mon, Aug 20, 2018 at 05:51:28AM -0600, Jan Beulich wrote:
> > > > > > > > > > > On 17.08.18 at 17:12, <wei.liu2@citrix.com> wrote:
> > > > > > > > > Since it is defined in common header file, introduce CONFIG_HVM to
> > > > > > > > > Arm to avoid breakage.
> > > > > > > > > 
> > > > > > > > > Signed-off-by: Wei Liu <wei.liu2@citrix.com>
> > > > > > > > > ---
> > > > > > > > >     xen/arch/arm/Kconfig    | 3 +++
> > > > > > > > >     xen/include/xen/sched.h | 6 ++++++
> > > > > > > > >     2 files changed, 9 insertions(+)
> > > > > > > > > ,
> > > > > > > > > diff --git a/xen/arch/arm/Kconfig b/xen/arch/arm/Kconfig
> > > > > > > > > index 586bc62..c0e969e 100644
> > > > > > > > > --- a/xen/arch/arm/Kconfig
> > > > > > > > > +++ b/xen/arch/arm/Kconfig
> > > > > > > > > @@ -52,6 +52,9 @@ config HAS_ITS
> > > > > > > > >             prompt "GICv3 ITS MSI controller support" if EXPERT = "y"
> > > > > > > > >             depends on GICV3 && !NEW_VGIC
> > > > > > > > > +config HVM
> > > > > > > > > +        def_bool y
> > > > > > > > 
> > > > > > > > I'm not convinced this is a good idea, but I'll let the ARM
> > > > > > > > maintainers
> > > > > > > > judge.
> > > > > > > 
> > > > > > > Andrew discovered that hvm flag is not set by toolstack so ARM guests
> > > > > > > are PV guests to Xen. I think the addition here can be omitted.
> > > > > > > 
> > > > > > > However I would still like to hear from ARM maintainers what guest type
> > > > > > > should be set for ARM, because sooner or later I will need to change PV
> > > > > > > code as well.
> > > > > > > 
> > > > > > > Grepping for is_{hvm,pv}_* in arch/arm yields no result, but then there
> > > > > > > is common code that we need to take care of.
> > > > > > 
> > > > > > Using PV was more a convenience at the time because was not there. The
> > > > > > plan
> > > > > > is to switch to PVH (see RFC [1]).
> > > > > > 
> > > > > > I will try to find some times this week to rework the patch based on the
> > > > > > comments.
> > > > > > 
> > > > > > Cheers,
> > > > > > 
> > > > > > [1] https://lists.xen.org/archives/html/xen-devel/2018-06/msg01537.html
> > > > > 
> > > > > Yes, switching to PVH in toolstack is ideal.
> > > > > 
> > > > > The problem we discuss here is in the hypervisor. Hypervisor only has
> > > > > HVM and PV. What type should ARM guests be? I think with the move to use
> > > > > PVH in toolstack, the type in hypervisor should be HVM (as oppose to PV
> > > > > now)?
> > > > 
> > > > Arm guest are much closer to HVM than PV. So the hypervisor should use HVM
> > > > here.
> > > +1
> > 
> > OK. In that case, what do you guys think about introducing CONFIG_HVM to
> > ARM?
> 
> I am ok with that. Note, you will need my patch series "tools/libxl: Switch
> Arm guest type to PVH" [1] to make it work on Arm.
> 
> Cheers,
> 
> [1]
> https://lists.xenproject.org/archives/html/xen-devel/2018-08/msg01902.html

It is very subtle.  This patch and your series can be applied
independently of each other.

My patch to introduce CONFIG_HVM for ARM doesn't actually switch the
guest type inside hypervisor to HVM. It is more about preserving
relevant code paths in arch agnostic code for ARM. As it turns out this
patch won't have any effect on ARM because up until now ARM guests have
all taken the PV paths.

With your series applied, ARM guests will start taking HVM paths, which
will always happen with or without this patch.  But your patch is
probably prerequisite to make CONFIG_PV work in the future.

Wei.

> 
> -- 
> Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel

  reply	other threads:[~2018-08-22 15:20 UTC|newest]

Thread overview: 130+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-17 15:12 [PATCH 00/34] Make CONFIG_HVM work Wei Liu
2018-08-17 15:12 ` [PATCH 01/34] x86: fix building !CONFIG_LOCK_PROFILE Wei Liu
2018-08-17 15:37   ` Wei Liu
2018-08-17 15:12 ` [PATCH 02/34] x86/vvmx: make get_shadow_eptp static function Wei Liu
2018-08-22  2:48   ` Tian, Kevin
2018-08-17 15:12 ` [PATCH 03/34] x86: HVM_FEP should depend on HVM Wei Liu
2018-08-21  8:06   ` Roger Pau Monné
2018-08-17 15:12 ` [PATCH 04/34] x86/mm: don't reference hvm_funcs directly Wei Liu
2018-08-20  9:28   ` Andrew Cooper
2018-08-20 10:21     ` Wei Liu
2018-08-17 15:12 ` [PATCH 05/34] xen: is_hvm_domain should evaluate to 0 when !CONFIG_HVM Wei Liu
2018-08-19 16:48   ` Andrew Cooper
2018-08-20  9:06     ` Wei Liu
2018-08-20  9:23       ` Andrew Cooper
2018-08-20  9:45         ` Wei Liu
2018-08-20 11:51   ` Jan Beulich
2018-08-21 16:31     ` Wei Liu
2018-08-21 18:33       ` Julien Grall
2018-08-21 18:49         ` Wei Liu
2018-08-21 18:50           ` Julien Grall
2018-08-21 18:59             ` Stefano Stabellini
2018-08-21 20:08               ` Wei Liu
2018-08-22 15:11                 ` Julien Grall
2018-08-22 15:20                   ` Wei Liu [this message]
2018-08-17 15:12 ` [PATCH 06/34] x86: fix two unused variable errors " Wei Liu
2018-08-21  8:09   ` Roger Pau Monné
2018-08-21  8:11     ` Andrew Cooper
2018-08-17 15:12 ` [PATCH 07/34] x86: only call memory_type_changed for HVM guests Wei Liu
2018-08-20 11:57   ` Jan Beulich
2018-08-22 16:12     ` Wei Liu
2018-08-17 15:12 ` [PATCH 08/34] x86: enclose hvm_op and dm_op in CONFIG_HVM in PV hypercall table Wei Liu
2018-08-20 11:59   ` Jan Beulich
2018-08-20 13:09     ` Wei Liu
2018-08-17 15:12 ` [PATCH 09/34] x86: guard HAS_VPCI with CONFIG_HVM Wei Liu
2018-08-20 12:03   ` Jan Beulich
2018-08-17 15:12 ` [PATCH 10/34] x86: stub out has_* testing for emulation flags Wei Liu
2018-08-20 12:37   ` Jan Beulich
2018-08-22 16:43     ` Wei Liu
2018-08-17 15:12 ` [PATCH 11/34] xen/pt: io.c contains HVM only code Wei Liu
2018-08-20 12:41   ` Jan Beulich
2018-08-17 15:12 ` [PATCH 12/34] x86/pt: only call some functions for HVM guests Wei Liu
2018-08-20 12:48   ` Jan Beulich
2018-08-22 17:08     ` Wei Liu
2018-08-17 15:12 ` [PATCH 13/34] x86/pt: split out HVM functions from vtd.c Wei Liu
2018-08-20 12:05   ` Jan Beulich
2018-08-21 10:30     ` Wei Liu
2018-08-17 15:12 ` [PATCH 14/34] x86/pt: add HVM check to XEN_DOMCTL_unbind_pt_irq Wei Liu
2018-08-20 12:51   ` Jan Beulich
2018-08-17 15:12 ` [PATCH 15/34] x86/nestedhvm: make it build with !CONFIG_HVM Wei Liu
2018-08-20 12:57   ` Jan Beulich
2018-08-17 15:12 ` [PATCH 16/34] x86/hvm: enclose hvm_enabled and hvm_funcs in CONFIG_HVM Wei Liu
2018-08-20 13:04   ` Jan Beulich
2018-08-24 16:25     ` Wei Liu
2018-08-17 15:12 ` [PATCH 17/34] x86/vmce: enclose HVM load / save code " Wei Liu
2018-08-20 13:04   ` Jan Beulich
2018-08-17 15:12 ` [PATCH 18/34] x86/amd: skip OSVW function calls if !CONFIG_HVM Wei Liu
2018-08-20 13:06   ` Jan Beulich
2018-08-17 15:12 ` [PATCH 19/34] x86: check HVM before trying to get ioreq server Wei Liu
2018-08-20 13:08   ` Jan Beulich
2018-08-17 15:12 ` [PATCH 20/34] x86/mtrr: move is_var_mtrr_overlapped Wei Liu
2018-08-21  7:58   ` Jan Beulich
2018-08-21 14:12     ` Wei Liu
2018-08-17 15:12 ` [PATCH 21/34] x86/mm: p2m_flush and nvcpu_flush are HVM only Wei Liu
2018-08-21  8:01   ` Jan Beulich
2018-08-22 14:14     ` Wei Liu
2018-08-24 17:19       ` Wei Liu
2018-08-17 15:12 ` [PATCH 22/34] x86/mm: put HVM only code under CONFIG_HVM Wei Liu
2018-08-19 16:27   ` Razvan Cojocaru
2018-08-24 16:25     ` Wei Liu
2018-08-21  8:07   ` Jan Beulich
2018-08-22 14:14     ` Wei Liu
2018-08-24 17:05     ` Wei Liu
2018-08-17 15:12 ` [PATCH 23/34] x86/oprofile: put SVM " Wei Liu
2018-08-21  8:12   ` Jan Beulich
2018-08-17 15:12 ` [PATCH 24/34] x86/mem_access: put HVM only function " Wei Liu
2018-08-19 16:36   ` Razvan Cojocaru
2018-08-17 15:12 ` [PATCH 25/34] x86/mm/shadow: make it build with !CONFIG_HVM Wei Liu
2018-08-21  8:27   ` Jan Beulich
2018-08-24 20:40     ` Wei Liu
2018-08-26 11:04     ` Wei Liu
2018-08-27  7:46       ` Jan Beulich
2018-08-27  9:12         ` Wei Liu
2018-08-21  8:29   ` Roger Pau Monné
2018-08-21  8:41     ` Jan Beulich
2018-08-24 20:39     ` Wei Liu
2018-08-21  8:41   ` Jan Beulich
2018-08-24 20:26     ` Wei Liu
2018-08-24  6:56   ` Tim Deegan
2018-08-17 15:12 ` [PATCH 26/34] x86/mm/shadow: split out HVM only code Wei Liu
2018-08-21 11:36   ` Jan Beulich
2018-08-24  6:57   ` Tim Deegan
2018-08-17 15:12 ` [PATCH 27/34] x86: make hvm_inject_* functions build when !CONFIG_HVM Wei Liu
2018-08-21  8:37   ` Roger Pau Monné
2018-08-24 16:27     ` Wei Liu
2018-08-21 11:39   ` Jan Beulich
2018-08-17 15:12 ` [PATCH 28/34] x86/vm_event: put vm_event_fill_regs under CONFIG_HVM Wei Liu
2018-08-19 16:41   ` Razvan Cojocaru
2018-08-21 10:45     ` Wei Liu
2018-08-21 11:00       ` Razvan Cojocaru
2018-08-17 15:12 ` [PATCH 29/34] x86/mm: put paging_update_nestedmode " Wei Liu
2018-08-21 11:41   ` Jan Beulich
2018-08-24 16:28     ` Wei Liu
2018-08-17 15:12 ` [PATCH 30/34] x86: PIT emulation is common to PV and HVM Wei Liu
2018-08-21  8:03   ` Roger Pau Monné
2018-08-21 11:43   ` Jan Beulich
2018-08-17 15:12 ` [PATCH 31/34] xen: refuse to create HVM guests when !CONFIG_HVM Wei Liu
2018-08-20 12:59   ` Andrew Cooper
2018-08-21 10:41     ` Wei Liu
2018-08-21 18:35       ` Julien Grall
2018-08-21 11:46   ` Jan Beulich
2018-08-17 15:12 ` [PATCH 32/34] x86: expose CONFIG_HVM Wei Liu
2018-08-21 11:48   ` Jan Beulich
2018-08-21 12:49     ` Andrew Cooper
2018-08-21 12:57       ` Jan Beulich
2018-08-17 15:12 ` [PATCH 33/34] x86/pvshim: disable HVM for PV shim Wei Liu
2018-08-21  8:40   ` Roger Pau Monné
2018-08-17 15:12 ` [PATCH 34/34] RFC x86: introduce directio virt cap Wei Liu
2018-08-21  8:32   ` Roger Pau Monné
2018-08-21 10:25     ` Wei Liu
2018-08-21 10:40       ` Roger Pau Monné
2018-08-21 10:43         ` Wei Liu
2018-08-21 11:52   ` Jan Beulich
2018-08-21 13:43     ` Wei Liu
2018-08-21 15:40       ` Jan Beulich
2018-08-21 16:02         ` Wei Liu
2018-08-21 16:11           ` Jan Beulich
2018-08-17 15:55 ` [PATCH 00/34] Make CONFIG_HVM work Konrad Rzeszutek Wilk
2018-08-17 16:00   ` Wei Liu
2018-08-20  9:13 ` Andrew Cooper
2018-08-20  9:16   ` Wei Liu

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=20180822152009.klgirnzahomze4ho@citrix.com \
    --to=wei.liu2@citrix.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=julien.grall@arm.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=xen-devel@lists.xenproject.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.