xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Kevin Tian <kevin.tian@intel.com>,
	SuraveeSuthikulpanit <suravee.suthikulpanit@amd.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Eddie Dong <eddie.dong@intel.com>,
	Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>,
	Jun Nakajima <jun.nakajima@intel.com>,
	xen-devel@lists.xenproject.org,
	Boris Ostrovsky <boris.ostrovsky@oracle.com>
Subject: Re: [PATCH v6 1/2] xen/pvh: use a custom IO bitmap for PVH hardware domains
Date: Fri, 15 May 2015 09:34:00 +0200	[thread overview]
Message-ID: <5555A168.9050108@citrix.com> (raw)
In-Reply-To: <5555AFFD020000780007A5E1@mail.emea.novell.com>

El 15/05/15 a les 8.36, Jan Beulich ha escrit:
>>>> On 14.05.15 at 17:27, <roger.pau@citrix.com> wrote:
>> El 13/05/15 a les 11.53, Jan Beulich ha escrit:
>>>>>> On 11.05.15 at 16:57, <roger.pau@citrix.com> wrote:
>>>> --- a/xen/common/domain.c
>>>> +++ b/xen/common/domain.c
>>>> @@ -42,6 +42,7 @@
>>>>  #include <xsm/xsm.h>
>>>>  #include <xen/trace.h>
>>>>  #include <xen/tmem.h>
>>>> +#include <asm/setup.h>
>>>>  
>>>>  /* Linux config option: propageted to domain0 */
>>>>  /* xen_processor_pmbits: xen control Cx, Px, ... */
>>>> @@ -219,6 +220,7 @@ static int late_hwdom_init(struct domain *d)
>>>>      rangeset_swap(d->iomem_caps, dom0->iomem_caps);
>>>>  #ifdef CONFIG_X86
>>>>      rangeset_swap(d->arch.ioport_caps, dom0->arch.ioport_caps);
>>>> +    setup_io_bitmap(d);
>>>>  #endif
>>>
>>> Considering that rangesets are getting swapped rather than
>>> copied, I think you also need to reset Dom0's I/O bitmap here
>>> to the ordinary, non-hardware domain one.
>>
>> Yes. Would it be fine to memset it and just call setup_io_bitmap on it
>> again, or would you prefer to exchange it with the static one and free it?
> 
> Following how the rangesets are being treated, simply swapping
> the two I/O bitmaps would seem to be the right approach here.

AFAICT this requires adding a new hook in hvm_function_table in order to
implement setting the io bitmap for SVM and VMX. I don't have a problem
with that, but it's going to need a separate patch.

Roger.

  reply	other threads:[~2015-05-15  7:34 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-11 14:57 [PATCH v6 0/3] xen/pvh: use a custom IO bitmap for PVH hardware domains Roger Pau Monne
2015-05-11 14:57 ` [PATCH v6 1/2] " Roger Pau Monne
2015-05-13  9:53   ` Jan Beulich
2015-05-14 15:27     ` Roger Pau Monné
2015-05-15  6:36       ` Jan Beulich
2015-05-15  7:34         ` Roger Pau Monné [this message]
2015-05-15  7:42           ` Jan Beulich
2015-05-15 20:09             ` Daniel De Graaf
2015-05-18  7:12               ` Jan Beulich
2015-05-11 14:57 ` [PATCH v6 2/2] xen/pvh: trap access to sensitive IO ports Roger Pau Monne

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=5555A168.9050108@citrix.com \
    --to=roger.pau@citrix.com \
    --cc=Aravind.Gopalakrishnan@amd.com \
    --cc=JBeulich@suse.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=boris.ostrovsky@oracle.com \
    --cc=eddie.dong@intel.com \
    --cc=jun.nakajima@intel.com \
    --cc=kevin.tian@intel.com \
    --cc=suravee.suthikulpanit@amd.com \
    --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 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).