Discussion of the implementations of VIRTIO specification
 help / color / mirror / Atom feed
* [virtio-dev] Re: [RFC/PATCH 0/1] virtio_mmio: hypervisor specific interfaces for MMIO
       [not found] <1588240976-10213-1-git-send-email-vatsa@codeaurora.org>
@ 2020-04-30 10:07 ` Michael S. Tsirkin
  2020-04-30 10:56   ` Jason Wang
       [not found] ` <1588240976-10213-2-git-send-email-vatsa@codeaurora.org>
  1 sibling, 1 reply; 4+ messages in thread
From: Michael S. Tsirkin @ 2020-04-30 10:07 UTC (permalink / raw)
  To: Srivatsa Vaddagiri
  Cc: konrad.wilk, jasowang, jan.kiszka, will, stefano.stabellini,
	iommu, virtualization, virtio-dev, tsoni, pratikp,
	christoffer.dall, alex.bennee, linux-kernel

On Thu, Apr 30, 2020 at 03:32:55PM +0530, Srivatsa Vaddagiri wrote:
> The Type-1 hypervisor we are dealing with does not allow for MMIO transport. 

How about PCI then?

-- 
MST


---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [virtio-dev] Re: [RFC/PATCH 0/1] virtio_mmio: hypervisor specific interfaces for MMIO
  2020-04-30 10:07 ` [virtio-dev] Re: [RFC/PATCH 0/1] virtio_mmio: hypervisor specific interfaces for MMIO Michael S. Tsirkin
@ 2020-04-30 10:56   ` Jason Wang
  0 siblings, 0 replies; 4+ messages in thread
From: Jason Wang @ 2020-04-30 10:56 UTC (permalink / raw)
  To: Michael S. Tsirkin, Srivatsa Vaddagiri
  Cc: konrad.wilk, jan.kiszka, will, stefano.stabellini, iommu,
	virtualization, virtio-dev, tsoni, pratikp, christoffer.dall,
	alex.bennee, linux-kernel


On 2020/4/30 下午6:07, Michael S. Tsirkin wrote:
> On Thu, Apr 30, 2020 at 03:32:55PM +0530, Srivatsa Vaddagiri wrote:
>> The Type-1 hypervisor we are dealing with does not allow for MMIO transport.
> How about PCI then?


Or maybe you can use virtio-vdpa.

Thanks



---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [virtio-dev] Re: [RFC/PATCH 1/1] virtio: Introduce MMIO ops
       [not found]         ` <20200430111156.GI5097@quicinc.com>
@ 2020-04-30 12:59           ` Jan Kiszka
       [not found]             ` <20200430133321.GC3204@quicinc.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Jan Kiszka @ 2020-04-30 12:59 UTC (permalink / raw)
  To: Srivatsa Vaddagiri, Will Deacon
  Cc: konrad.wilk, mst, jasowang, stefano.stabellini, iommu,
	virtualization, virtio-dev, tsoni, pratikp, christoffer.dall,
	alex.bennee, linux-kernel

On 30.04.20 13:11, Srivatsa Vaddagiri wrote:
> * Will Deacon <will@kernel.org> [2020-04-30 11:41:50]:
> 
>> On Thu, Apr 30, 2020 at 04:04:46PM +0530, Srivatsa Vaddagiri wrote:
>>> If CONFIG_VIRTIO_MMIO_OPS is defined, then I expect this to be unconditionally
>>> set to 'magic_qcom_ops' that uses hypervisor-supported interface for IO (for
>>> example: message_queue_send() and message_queue_recevie() hypercalls).
>>
>> Hmm, but then how would such a kernel work as a guest under all the
>> spec-compliant hypervisors out there?
> 
> Ok I see your point and yes for better binary compatibility, the ops have to be
> set based on runtime detection of hypervisor capabilities.
> 
>>> Ok. I guess the other option is to standardize on a new virtio transport (like
>>> ivshmem2-virtio)?
>>
>> I haven't looked at that, but I suppose it depends on what your hypervisor
>> folks are willing to accomodate.
> 
> I believe ivshmem2_virtio requires hypervisor to support PCI device emulation
> (for life-cycle management of VMs), which our hypervisor may not support. A
> simple shared memory and doorbell or message-queue based transport will work for
> us.

As written in our private conversation, a mapping of the ivshmem2 device 
discovery to platform mechanism (device tree etc.) and maybe even the 
register access for doorbell and life-cycle management to something 
hypercall-like would be imaginable. What would count more from virtio 
perspective is a common mapping on a shared memory transport.

That said, I also warned about all the features that PCI already defined 
(such as message-based interrupts) which you may have to add when going 
a different way for the shared memory device.

Jan

-- 
Siemens AG, Corporate Technology, CT RDA IOT SES-DE
Corporate Competence Center Embedded Linux

---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [virtio-dev] Re: [RFC/PATCH 1/1] virtio: Introduce MMIO ops
       [not found]             ` <20200430133321.GC3204@quicinc.com>
@ 2020-04-30 19:34               ` Michael S. Tsirkin
  0 siblings, 0 replies; 4+ messages in thread
From: Michael S. Tsirkin @ 2020-04-30 19:34 UTC (permalink / raw)
  To: Srivatsa Vaddagiri
  Cc: Jan Kiszka, Will Deacon, konrad.wilk, jasowang,
	stefano.stabellini, iommu, virtualization, virtio-dev, tsoni,
	pratikp, christoffer.dall, alex.bennee, linux-kernel

On Thu, Apr 30, 2020 at 07:03:21PM +0530, Srivatsa Vaddagiri wrote:
> * Jan Kiszka <jan.kiszka@siemens.com> [2020-04-30 14:59:50]:
> 
> > >I believe ivshmem2_virtio requires hypervisor to support PCI device emulation
> > >(for life-cycle management of VMs), which our hypervisor may not support.

PCI is mostly just 2 registers. One sets the affected device, one the data to read/write.

> A
> > >simple shared memory and doorbell or message-queue based transport will work for
> > >us.
> > 
> > As written in our private conversation, a mapping of the ivshmem2 device
> > discovery to platform mechanism (device tree etc.) and maybe even the
> > register access for doorbell and life-cycle management to something
> > hypercall-like would be imaginable. What would count more from virtio
> > perspective is a common mapping on a shared memory transport.
> 
> Yes that sounds simpler for us.
> 
> > That said, I also warned about all the features that PCI already defined
> > (such as message-based interrupts) which you may have to add when going a
> > different way for the shared memory device.
> 
> Is it really required to present this shared memory as belonging to a PCI
> device?

But then you will go on and add MSI, and NUMA, and security, and and and ...

> I would expect the device-tree to indicate the presence of this shared
> memory region, which we should be able to present to ivshmem2 as shared memory
> region to use (along with some handles for doorbell or message queue use).
> 
> I understand the usefulness of modeling the shared memory as part of device so
> that hypervisor can send events related to peers going down or coming up. In our
> case, there will be other means to discover those events and avoiding this
> requirement on hypervisor (to emulate PCI) will simplify the solution for us.
> 
> Any idea when we can expect virtio over ivshmem2 to become available?!

Check out the virtio spec. Right at the beginning it states:

	These devices are
	found in virtual environments, yet by design they look like physical devices to the guest within
	the virtual machine - and this document treats them as such. This similarity allows the guest to
	use standard drivers and discovery mechanisms


> -- 
> QUALCOMM INDIA, on behalf of Qualcomm Innovation Center, Inc. is a member
> of Code Aurora Forum, hosted by The Linux Foundation


---------------------------------------------------------------------
To unsubscribe, e-mail: virtio-dev-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: virtio-dev-help@lists.oasis-open.org


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-04-30 19:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <1588240976-10213-1-git-send-email-vatsa@codeaurora.org>
2020-04-30 10:07 ` [virtio-dev] Re: [RFC/PATCH 0/1] virtio_mmio: hypervisor specific interfaces for MMIO Michael S. Tsirkin
2020-04-30 10:56   ` Jason Wang
     [not found] ` <1588240976-10213-2-git-send-email-vatsa@codeaurora.org>
     [not found]   ` <20200430101431.GD19932@willie-the-truck>
     [not found]     ` <20200430103446.GH5097@quicinc.com>
     [not found]       ` <20200430104149.GG19932@willie-the-truck>
     [not found]         ` <20200430111156.GI5097@quicinc.com>
2020-04-30 12:59           ` [virtio-dev] Re: [RFC/PATCH 1/1] virtio: Introduce MMIO ops Jan Kiszka
     [not found]             ` <20200430133321.GC3204@quicinc.com>
2020-04-30 19:34               ` Michael S. Tsirkin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox