All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jan Beulich" <JBeulich@suse.com>
To: George Dunlap <george.dunlap@eu.citrix.com>,
	Mukesh Rathor <mukesh.rathor@oracle.com>
Cc: "xen-devel@lists.xen.org" <xen-devel@lists.xen.org>
Subject: Re: [V1 PATCH 3/3] pvh: disallow PHYSDEVOP_pirq_eoi_gmfn_v2/v1
Date: Tue, 04 Mar 2014 07:44:09 +0000	[thread overview]
Message-ID: <531592590200007800120BC8@nat28.tlf.novell.com> (raw)
In-Reply-To: <531475EE.8070309@eu.citrix.com>

>>> On 03.03.14 at 13:30, George Dunlap <george.dunlap@eu.citrix.com> wrote:
> On 02/28/2014 08:09 AM, Jan Beulich wrote:
>>>>> On 28.02.14 at 04:06, Mukesh Rathor <mukesh.rathor@oracle.com> wrote:
>>> So, sigh, in conclusion, what would you prefer:
>>>
>>>    a. add this new check to hvm_physdev_op.
>>>    b. leave the new check here.
>>>    c. add this check to hvm_physdev_op, and move the existing pvh checks
>>>       from do_physdev_op to hvm_physdev_op also.
>>
> 
>>   From a formal pov, all PVH special casing
>> should go away from hvm_physdev_op _and_ do_physdev_op,
>> with the possibly exception of things that are really unsuitable
>> for PVH (in which case it would be more clean to have a distinct
>> pvh_physdev_op). Temporary workarounds like the one here
>> should obviously(!?) go where other temporary workarounds
>> are - with what we have, that's hvm_physdev_op(). As I think
>> Tim said elsewhere - sprinkling around arbitrary PVH checks is
>> just not acceptable. I begin to regret that I gave my okay for
>> all these fixme-s and stuff to go in (with it yet to be seen when
>> their elimination would start), because I'm getting the feeling
>> that you take this as an excuse to add further such stuff.
>>
>> So to answer your question above: The way to go depends on
>> the long term intended behavior: If there is anything that will
>> need special casing no matter what, option d) is likely going to
>> be the cleanest one - introduce pvh_physdev_op(). But each
>> exception there either needs a proper rationale, or a proper
>> fixme annotation. And such special casing should be done with
>> future code changes in mind, i.e. considering the cost of
>> maintaining all of {do,hvm,pvh}_physdev_op() when new
>> (sub-)ops get added.
> 
> [Moving back to the main list]
> 
> So is the main reason that the checks in do_physdev_op() exist just that 
> some of the commands have not yet been implemented for PVH?
> 
> If so, I'd much rather have the checks in do_physdev_op().  I think 
> long-term, I'd prefer to have them in do_physdev_op() (as Mukesh has 
> done here) even if they're going to stay, rather than having an extra 
> function in another file with a whitelist / blacklist.  Yes, having the 
> checks in do_physdev_op() is a bit ugly, but it should make it clear in 
> one place which paths are valid for which kinds of guests.

I perhaps wouldn't mind that approach, if there wasn't already a
hvm_physdev_op() wrapper. What I first of all want is that things
get done consistently, so that one doesn't have to go guess why
similar things where done one way once, and then another way the
second time.

But there's restriction to this: Long term special cases I think would
be fine to get placed in the generic routine. Temporary workarounds
otoh seem better placed in a (temporary) wrapper, centralizing the
resulting ugliness.

Jan

  reply	other threads:[~2014-03-04  7:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-25  1:03 [V1 PATCH 0/3] pvh: misc bug fixes Mukesh Rathor
2014-02-25  1:03 ` [V1 PATCH 1/3] pvh: early return from hvm_hap_nested_page_fault Mukesh Rathor
2014-02-25  1:03   ` [V1 PATCH 2/3] pvh: fix pirq path for pvh Mukesh Rathor
2014-02-25  1:03     ` [V1 PATCH 3/3] pvh: disallow PHYSDEVOP_pirq_eoi_gmfn_v2/v1 Mukesh Rathor
     [not found]       ` <530C7362020000780011F0F0@nat28.tlf.novell.com>
     [not found]         ` <530C7663020000780011F104@nat28.tlf.novell.com>
     [not found]           ` <20140225152514.GA4322@konrad-lan.dumpdata.com>
     [not found]             ` <530CD069020000780011F3D1@nat28.tlf.novell.com>
     [not found]               ` <20140225123314.334b7fec@mantra.us.oracle.com>
     [not found]                 ` <530DC4A6020000780011F6C0@nat28.tlf.novell.com>
     [not found]                   ` <20140227190649.47d4eb7a@mantra.us.oracle.com>
     [not found]                     ` <5310524802000078001201B8@nat28.tlf.novell.com>
2014-03-03 12:30                       ` George Dunlap
2014-03-04  7:44                         ` Jan Beulich [this message]
2014-02-25  9:28     ` [V1 PATCH 2/3] pvh: fix pirq path for pvh Jan Beulich
2014-02-25 20:44       ` Mukesh Rathor
2014-02-26  9:44         ` Jan Beulich
2014-02-25  9:26   ` [V1 PATCH 1/3] pvh: early return from hvm_hap_nested_page_fault Jan Beulich
2014-02-27 10:56   ` Tim Deegan
2014-02-28  2:25     ` Mukesh Rathor

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=531592590200007800120BC8@nat28.tlf.novell.com \
    --to=jbeulich@suse.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=mukesh.rathor@oracle.com \
    --cc=xen-devel@lists.xen.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.