From: "Roger Pau Monné" <roger.pau@citrix.com>
To: Jan Beulich <JBeulich@suse.com>
Cc: Kevin Tian <kevin.tian@intel.com>,
Suravee Suthikulpanit <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 RFC] xen/pvh: use a custom IO bitmap for PVH hardware domains
Date: Tue, 14 Apr 2015 12:45:19 +0200 [thread overview]
Message-ID: <552CEFBF.2070701@citrix.com> (raw)
In-Reply-To: <552D089C0200007800071D59@mail.emea.novell.com>
Hello,
El 14/04/15 a les 12.31, Jan Beulich ha escrit:
>>>> On 14.04.15 at 12:01, <roger.pau@citrix.com> wrote:
>> I have one question about the current IO port handling for PVH guests
>> (DomU and Dom0). There's some code right now in vmx_vmexit_handler
>> (EXIT_REASON_IO_INSTRUCTION) that's kind PVH specific:
>>
>> if ( exit_qualification & 0x10 )
>> {
>> /* INS, OUTS */
>> if ( unlikely(is_pvh_vcpu(v)) /* PVH fixme */ ||
>> !handle_mmio() )
>> hvm_inject_hw_exception(TRAP_gp_fault, 0);
>> }
>> else
>> {
>> /* IN, OUT */
>> uint16_t port = (exit_qualification >> 16) & 0xFFFF;
>> int bytes = (exit_qualification & 0x07) + 1;
>> int dir = (exit_qualification & 0x08) ? IOREQ_READ : IOREQ_WRITE;
>>
>> if ( handle_pio(port, bytes, dir) )
>> update_guest_eip(); /* Safe: IN, OUT */
>> }
>>
>> Is there any need for DomUs to access the IO ports? I know that FreeBSD
>> will poke at some of them during boot to scan for devices, but I'm not
>> sure if we could just make them noops in the PVH case and simply return
>> garbage.
>
> The PVH special case quoted above is there only to prevent
> reaching handle_mmio().
Injecting a GP seems like a little bit too much for trapped INS/OUTS, I
would rather just drop/ignore them if possible.
> The non-string "else" path was enabled
> solely on the basis that it was possible to be made work without
> much extra effort. And while (without pass-through) it shouldn't
> be needed for PVH DomU-s, it also should do no harm.
Ack.
next prev parent reply other threads:[~2015-04-14 10:45 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-08 12:57 [PATCH RFC] xen/pvh: use a custom IO bitmap for PVH hardware domains Roger Pau Monne
2015-04-09 10:55 ` Andrew Cooper
2015-04-14 8:11 ` Jan Beulich
2015-04-10 1:43 ` Tian, Kevin
2015-04-10 11:07 ` Roger Pau Monné
2015-04-14 7:57 ` Jan Beulich
2015-04-14 8:06 ` Jan Beulich
2015-04-14 10:01 ` Roger Pau Monné
2015-04-14 10:05 ` Andrew Cooper
2015-04-14 10:31 ` Jan Beulich
2015-04-14 10:45 ` Roger Pau Monné [this message]
2015-04-14 11:40 ` Jan Beulich
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=552CEFBF.2070701@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 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.