From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Jan Beulich" Subject: Re: [PATCH RFC v1 11/13] xen/libxl: allow creating HVM guests without a device model Date: Tue, 23 Jun 2015 10:41:07 +0100 Message-ID: <558945D302000078000880A3@mail.emea.novell.com> References: <1434989487-74940-1-git-send-email-roger.pau@citrix.com> <1434989487-74940-12-git-send-email-roger.pau@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1Z7Kha-0000o6-W4 for xen-devel@lists.xenproject.org; Tue, 23 Jun 2015 09:41:11 +0000 In-Reply-To: <1434989487-74940-12-git-send-email-roger.pau@citrix.com> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Roger Pau Monne Cc: Elena Ufimtseva , Wei Liu , Ian Campbell , Stefano Stabellini , Andrew Cooper , Ian Jackson , xen-devel@lists.xenproject.org, Boris Ostrovsky List-Id: xen-devel@lists.xenproject.org >>> On 22.06.15 at 18:11, wrote: > --- a/xen/arch/x86/hvm/hvm.c > +++ b/xen/arch/x86/hvm/hvm.c > @@ -343,7 +343,7 @@ u64 hvm_get_guest_tsc_adjust(struct vcpu *v) > void hvm_migrate_timers(struct vcpu *v) > { > /* PVH doesn't use rtc and emulated timers, it uses pvclock mechanism. */ > - if ( is_pvh_vcpu(v) ) > + if ( is_pvh_vcpu(v) || v->domain->arch.hvm_domain.no_emu ) Why would you need to keep the is-PVH check when you have ... > @@ -1485,9 +1485,10 @@ int hvm_domain_initialise(struct domain *d) > else > d->arch.hvm_domain.io_bitmap = hvm_io_bitmap; > > - if ( is_pvh_domain(d) ) > + if ( is_pvh_domain(d) || domcr_flags & DOMCRF_noemu ) > { > register_portio_handler(d, 0, 0x10003, handle_pvh_io); > + d->arch.hvm_domain.no_emu = TRUE; ... this (which of course shouldn't use TRUE). > @@ -2327,6 +2328,9 @@ int hvm_vcpu_initialise(struct vcpu *v) > return 0; > } > > + if ( d->arch.hvm_domain.no_emu ) > + return 0; > + > rc = setup_compat_arg_xlat(v); /* teardown: free_compat_arg_xlat() */ How are you going to get away without an argument translation area? Jan