All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Beulich <JBeulich@suse.com>
To: "Roger Pau Monné" <roger.pau@citrix.com>
Cc: "Stefano Stabellini" <sstabellini@kernel.org>,
	"Wei Liu" <wl@xen.org>,
	"Konrad Rzeszutek Wilk" <konrad.wilk@oracle.com>,
	"George Dunlap" <George.Dunlap@eu.citrix.com>,
	AndrewCooper <andrew.cooper3@citrix.com>,
	"Ian Jackson" <ian.jackson@eu.citrix.com>,
	"Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>,
	TimDeegan <tim@xen.org>, "Julien Grall" <julien.grall@arm.com>,
	"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	"Daniel De Graaf" <dgdegra@tycho.nsa.gov>
Subject: Re: [Xen-devel] [PATCH v5 5/6] xen/x86: add PHYSDEVOP_msi_control
Date: Fri, 19 Jul 2019 09:43:26 +0000	[thread overview]
Message-ID: <b7d4e591-a5e3-94f1-6870-f0b6e7e9daf7@suse.com> (raw)
In-Reply-To: <20190719090202.vzeernrydawwnzan@Air-de-Roger.citrite.net>

On 19.07.2019 11:02, Roger Pau Monné  wrote:
> On Fri, Jul 19, 2019 at 08:04:45AM +0000, Jan Beulich wrote:
>> On 18.07.2019 18:52, Roger Pau Monné  wrote:
>>> On Thu, Jul 18, 2019 at 03:17:27PM +0000, Jan Beulich wrote:
>>>> On 18.07.2019 15:46, Roger Pau Monné  wrote:
>>>>> In fact I don't think INTx should be enabled when MSI(-X) is disabled,
>>>>> QEMU already traps writes to the command register, and it will manage
>>>>> INTx enabling/disabling by itself. I think the only check required is
>>>>> that MSI(-X) cannot be enabled if INTx is also enabled. In the same
>>>>> way both MSI caspabilities cannot be enabled simultaneously. The
>>>>> function should not explicitly disable any of the other capabilities,
>>>>> and just return -EBUSY if the caller attempts for example to enable
>>>>> MSI while INTx or MSI-X is enabled.
>>>>
>>>> You do realize that pci_intx() only ever gets called for Xen
>>>> internally used interrupts, i.e. mainly the serial console one?
>>>
>>> You will have to bear with me because I'm not sure I understand why
>>> it does matter. Do you mean to point out that dom0 is the one in full
>>> control of INTx, and thus Xen shouldn't care of whether INTx and
>>> MSI(-X) are enabled at the same time?
>>>
>>> I still think that at least a warning should be printed if a caller
>>> tries to enable MSI(-X) while INTx is also enabled, but unless there's
>>> a reason to have both MSI(-X) and INTx enabled at the same time (maybe
>>> a quirk for some hardware issue?) it shouldn't be allowed on this new
>>> interface.
>>
>> I don't mind improvements to the current situation (i.e. such a
>> warning may indeed make sense); I merely stated how things currently
>> are. INTx treatment was completely left aside when MSI support was
>> introduced into Xen.
> 
> In order to give Marek a more concise reply, would you agree to return
> -EBUSY (or some error code) and print a warning message if the caller
> attempts to enable MSI(-X) while INTx is also enabled?

As to returning an error - I think so, yes. I'm less sure about logging
a message.

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

  reply	other threads:[~2019-07-19  9:44 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-17  1:00 [Xen-devel] [PATCH v5 0/6] Fix PCI passthrough for HVM with stubdomain Marek Marczykowski-Górecki
2019-07-17  1:00 ` [Xen-devel] [PATCH v5 1/6] libxl: do not attach xen-pciback to HVM domain, if stubdomain is in use Marek Marczykowski-Górecki
2019-07-17  1:00 ` [Xen-devel] [PATCH v5 2/6] libxl: attach PCI device to qemu only after setting pciback/pcifront Marek Marczykowski-Górecki
2019-07-17  1:00 ` [Xen-devel] [PATCH v5 3/6] libxl: don't try to manipulate json config for stubdomain Marek Marczykowski-Górecki
2019-07-17  1:00 ` [Xen-devel] [PATCH v5 4/6] xen/x86: Allow stubdom access to irq created for msi Marek Marczykowski-Górecki
2019-07-17  9:54   ` Roger Pau Monné
2019-07-17 15:09     ` Marek Marczykowski-Górecki
2019-07-18  9:29       ` Roger Pau Monné
2019-07-18 15:12         ` Marek Marczykowski-Górecki
2019-07-18 16:55           ` Roger Pau Monné
2019-07-20 16:48   ` Julien Grall
2019-07-20 21:21     ` Marek Marczykowski-Górecki
2019-07-21 18:05       ` Julien Grall
2019-07-22  8:45         ` Roger Pau Monné
2019-07-22  9:06           ` Julien Grall
2019-07-22  9:16             ` Julien Grall
2019-07-17  1:00 ` [Xen-devel] [PATCH v5 5/6] xen/x86: add PHYSDEVOP_msi_control Marek Marczykowski-Górecki
2019-07-17 10:18   ` Roger Pau Monné
2019-07-17 23:54     ` Marek Marczykowski-Górecki
2019-07-18 13:46       ` Roger Pau Monné
2019-07-18 15:17         ` Jan Beulich
2019-07-18 16:52           ` Roger Pau Monné
2019-07-19  8:04             ` Jan Beulich
2019-07-19  9:02               ` Roger Pau Monné
2019-07-19  9:43                 ` Jan Beulich [this message]
2019-08-05 13:44                   ` Marek Marczykowski-Górecki
2019-08-06  7:56                     ` Jan Beulich
2019-08-06  9:46                       ` Marek Marczykowski-Górecki
2019-08-06 10:33                         ` Jan Beulich
2019-08-06 10:53                           ` Marek Marczykowski-Górecki
2019-08-06 12:05                             ` Jan Beulich
2019-08-06 12:43                               ` Marek Marczykowski-Górecki
2019-08-06 13:19                                 ` Jan Beulich
2019-08-06 13:41                                 ` Roger Pau Monné
2019-07-19 10:40   ` Jan Beulich
2019-07-17  1:00 ` [Xen-devel] [PATCH v5 6/6] tools/libxc: add wrapper for PHYSDEVOP_msi_control Marek Marczykowski-Górecki
2019-07-17 10:21   ` Roger Pau Monné
2019-07-18  0:12     ` Marek Marczykowski-Górecki
2019-07-18 13:53       ` Roger Pau Monné

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=b7d4e591-a5e3-94f1-6870-f0b6e7e9daf7@suse.com \
    --to=jbeulich@suse.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=andrew.cooper3@citrix.com \
    --cc=dgdegra@tycho.nsa.gov \
    --cc=ian.jackson@eu.citrix.com \
    --cc=julien.grall@arm.com \
    --cc=konrad.wilk@oracle.com \
    --cc=marmarek@invisiblethingslab.com \
    --cc=roger.pau@citrix.com \
    --cc=sstabellini@kernel.org \
    --cc=tim@xen.org \
    --cc=wl@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.