xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Oleksandr Grytsov <al1img@gmail.com>
To: Ian Jackson <ian.jackson@citrix.com>
Cc: "xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>,
	Oleksandr Grytsov <oleksandr_grytsov@epam.com>,
	"wl@xen.org" <wl@xen.org>
Subject: Re: [Xen-devel] [PATCH v1 1/2] libxl: introduce new backend type VINPUT
Date: Mon, 18 Nov 2019 13:40:58 +0200	[thread overview]
Message-ID: <CACvf2oVaR+N9Zgoty3DK6oKqeRcR0gpRnitnvbOUmxFJydD3FQ@mail.gmail.com> (raw)
In-Reply-To: <24014.65525.944108.509444@mariner.uk.xensource.com>

On Fri, Nov 15, 2019 at 9:43 PM Ian Jackson <ian.jackson@citrix.com> wrote:
>
> Oleksandr Grytsov writes ("Re: [PATCH v1 1/2] libxl: introduce new backend type VINPUT"):
> > 1. Move QEMU_BACKEND macro to libxl__device_type structure as function
> >     and let the device to decide it has QEMU backend:
> >
> > struct libxl__device_type {
> >     ...
> >     device_qemu_backend_fn_t qemu_backend
> > }
> >
> > In this case, introducing new device type for VKBD is not needed. The VKBD
> > device will check backend type XS entry to define which backend is running.
>
> Sorry for the delay replying.  In your earlier mails I had trouble
> figuring out what you meant but this little vignette makes it clear to
> me.
>
> I think the problem you are trying to solve is this: in your case
> QEMU_BACKEND needs to depend on the visible vkb_backend field, but the
> device->backend_kind is set unconditionally to just VKB ?

Exactly.

>
> Could you solve this problem by inventing a new backend_kind, and
> writing your own function libxl__device_from_vkb, and putting
> *different* values into backend_kind ?  I think that is what
> backend_kind is for.  See for example various console functions and
> also libxl__device_from_disk.
>

This what was done in this patch. VINPUT backend type was introduced.
Probably the name should be changed but have no idea which backend
kind is more suitable for this purpose.

Also bakcend-type xenstore entry was removed as redundant in this case.
As the PV backend expects device kind VINPUT.

> > 2. Use string type for VKBD backend_type field instead of enum. It will be
> > empty for QEMU and generic for "user space" backends.
>
> This seems worse.
>
> > On Mon, Oct 28, 2019 at 4:06 PM Oleksandr Grytsov <al1img@gmail.com> wrote:
> > > On Wed, Oct 16, 2019 at 4:26 PM Oleksandr Grytsov <al1img@gmail.com> wrote:
> > > > [Ian:]
> > > > > [Oleksandr:]
> > > > > > [Ian:]
> > > > > > > I also don't understand why the "user space" kbd backend seems to be
> > > > > > > "linux" in the enum.
> > > > > >
> > > > > > I agree this is not so good name. But I don't know how to call
> > > > > > backends which are not running
> > > > > > inside QEMU in general.
> > > > >
> > > > > I think this would be useable on freebsd ?  "linux" definitely seems
> > > > > wrong.  I see it hasn't been in a release so it is not too late to
> > > > > rename it, subject to discussion with Juergen as RM.
> ...
> > > > > Maybe "linux" should be "troops"...
> > > >
> > > > It doesn't look as generic solution. If some user implements own backend
> > > > it should add new entry into backend type enum.
>
> Would you be prepared to change it to *something* else ?
>
> AFAICT from the code it just uses what would the `usual' xenstore pv
> control plane path for a device called "vkb" ?
>

I guess yes.

> So maybe we could call it "pv" ?

Do you mean LIBXL_VKB_BACKEND_PV?

> Is there a protocol doc I should be
> looking at that defines this vkb interface ?
>

This PV backend utilizes the protocol described in kbdif.h

> Sorry still to be so confused.
>
> Regards,
> Ian.



-- 
Best Regards,
Oleksandr Grytsov.

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

  reply	other threads:[~2019-11-18 11:41 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-08 14:10 [Xen-devel] [PATCH v1 0/2] Remove backend xen store entry on domain destroy Oleksandr Grytsov
2019-10-08 14:10 ` [Xen-devel] [PATCH v1 1/2] libxl: introduce new backend type VINPUT Oleksandr Grytsov
2019-10-11 14:58   ` Ian Jackson
2019-10-11 15:57     ` Oleksandr Grytsov
2019-10-11 17:03       ` Ian Jackson
2019-10-16 13:26         ` Oleksandr Grytsov
2019-10-28 14:06           ` Oleksandr Grytsov
2019-11-04 14:52             ` Oleksandr Grytsov
2019-11-15 19:43               ` Ian Jackson
2019-11-18 11:40                 ` Oleksandr Grytsov [this message]
2019-11-18 17:48                   ` Ian Jackson
2019-11-18 17:55   ` [Xen-devel] [PATCH for-4.13 " Ian Jackson
2019-11-19 12:40     ` Oleksandr Grytsov
2019-11-20 16:04       ` Ian Jackson
2019-10-08 14:10 ` [Xen-devel] [PATCH v1 2/2] libxl: add removing XS backend path for PV devices on domain destroy Oleksandr Grytsov
2019-10-11 15:07   ` Ian Jackson
2019-10-11 15:32     ` Roger Pau Monné
2019-10-11 15:55       ` Ian Jackson
2019-10-15 15:39         ` Roger Pau Monné
2019-10-16 10:39           ` Oleksandr Grytsov

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=CACvf2oVaR+N9Zgoty3DK6oKqeRcR0gpRnitnvbOUmxFJydD3FQ@mail.gmail.com \
    --to=al1img@gmail.com \
    --cc=ian.jackson@citrix.com \
    --cc=oleksandr_grytsov@epam.com \
    --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 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).