search for: set_backend

Displaying 20 results from an estimated 65 matches for "set_backend".

Did you mean: get_backend
2015 Jun 29
1
Re: [PATCH v2 6/9] tests: Add tests using a captive daemon process.
...> --- > [...]> +sub run_tests { > + my $g = Sys::Guestfs->new(); > + my $tmpdir = $g->get_tmpdir; > + my $verbose = $g->get_verbose; On this throw-away handle we could check whether the unix backend is built in (unlike in RHEL, for example): eval { $g->set_backend ("unix:/idontexist"); }; if ($@) { warn "$0: skipping test because the 'unix' backend not available\n"; exit 77; }; Thanks, -- Pino Toscano
2019 Sep 03
2
[RFC v3] vhost: introduce mdev based hardware vhost backend
...cmd, argp); > + } > + > + return ret; > +} > +EXPORT_SYMBOL(vhost_mdev_ioctl); I don't have a problem with this approach. A small question: would it make sense to have two fds: send vhost ioctls on one and vfio ioctls on another? We can then pass vfio fd to the vhost fd with a SET_BACKEND ioctl. What do you think? -- MST
2019 Sep 03
2
[RFC v3] vhost: introduce mdev based hardware vhost backend
...cmd, argp); > + } > + > + return ret; > +} > +EXPORT_SYMBOL(vhost_mdev_ioctl); I don't have a problem with this approach. A small question: would it make sense to have two fds: send vhost ioctls on one and vfio ioctls on another? We can then pass vfio fd to the vhost fd with a SET_BACKEND ioctl. What do you think? -- MST
2023 Apr 10
1
[PATCH v6 11/11] vhost: allow userspace to create workers
...race with ioctl calls to vhost_vq_attach_worker since we hold the dev mutex > during that ioctls. I'm not sure I understand here, but we can't assume the user of vhost_work_queue() is called in the ioctl context. See vhost_zerocopy_callback(). But since you want to limit the call before set_backend, another question comes, do we really need the dynamic attaching/creating in this case? How about a simple one ioctl that is used to build the queue to workers mapping instead? > Or we call flush from the file_operations release function > so the device is closed and can't race with ioct...
2020 Feb 20
0
buffer overflow detected in collectd using libguestfs
...l (SIGCHLD, SIG_DFL); g = guestfs_create(); if (g == NULL) { ERROR(PLUGIN_NAME " plugin: failed to create libguestfs handle"); goto cont; //exit(EXIT_FAILURE); } guestfs_set_trace(g,1); //guestfs_set_verbose(g,1); if ( 0 != guestfs_set_backend (g, "direct") ) { ERROR(PLUGIN_NAME " plugin: guestfs_set_backend failed"); } cnt_drives = guestfs_add_domain (g, name, GUESTFS_ADD_DOMAIN_READONLY, 1, -1); if (cnt_drives == -1) { ERROR(PLUGIN_NAME " plugin: failed to get guestfs domain h...
2019 Sep 19
3
[RFC v4 0/3] vhost: introduce mdev based hardware backend
...vhost_mdev_remove, }; So we can bind above mdev driver to the virtio-mdev compatible mdev devices when we want to use vhost-mdev. After binding above driver to the mdev device, we can setup IOMMU via VFIO and get VFIO device fd of this mdev device, and pass it to vhost fd (/dev/vhost-mdev) with a SET_BACKEND ioctl. Thanks, Tiwei > > Thanks > > > > > Yes, it is. > > > > > > Thanks > > > > > >
2019 Sep 19
3
[RFC v4 0/3] vhost: introduce mdev based hardware backend
...vhost_mdev_remove, }; So we can bind above mdev driver to the virtio-mdev compatible mdev devices when we want to use vhost-mdev. After binding above driver to the mdev device, we can setup IOMMU via VFIO and get VFIO device fd of this mdev device, and pass it to vhost fd (/dev/vhost-mdev) with a SET_BACKEND ioctl. Thanks, Tiwei > > Thanks > > > > > Yes, it is. > > > > > > Thanks > > > > > >
2019 Nov 02
4
supermin: failed to find a suitable kernel
...IMPORTANT NOTICE * * When reporting bugs, include the COMPLETE, UNEDITED * output below in your bug report. * ************************************************************ libguestfs: trace: set_verbose true libguestfs: trace: set_verbose = 0 libguestfs: trace: set_backend "direct" libguestfs: trace: set_backend = 0 libguestfs: trace: set_verbose true libguestfs: trace: set_verbose = 0 LIBGUESTFS_BACKEND=direct LIBGUESTFS_TRACE=1 LIBGUESTFS_DEBUG=1 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin SELinux: sh: 1: getenforce: not found libgue...
2019 Sep 04
0
[RFC v3] vhost: introduce mdev based hardware vhost backend
...t; > > +} > > +EXPORT_SYMBOL(vhost_mdev_ioctl); > > > I don't have a problem with this approach. A small question: > would it make sense to have two fds: send vhost ioctls > on one and vfio ioctls on another? > We can then pass vfio fd to the vhost fd with a > SET_BACKEND ioctl. > > What do you think? I like this idea! I will give it a try. So we can introduce /dev/vhost-mdev to have the vhost fd, and let userspace pass vfio fd to the vhost fd with a SET_BACKEND ioctl. Thanks a lot! Tiwei > > -- > MST
2019 Nov 05
0
Re: supermin: failed to find a suitable kernel
...> * output below in your bug report. > > > * > > > > > ********************************************************** > > ** > > > libguestfs: trace: set_verbose true > > > libguestfs: trace: set_verbose = 0 > > > libguestfs: trace: set_backend "direct" > > > libguestfs: trace: set_backend = 0 > > > libguestfs: trace: set_verbose true > > > libguestfs: trace: set_verbose = 0 > > > LIBGUESTFS_BACKEND=direct > > > LIBGUESTFS_TRACE=1 > > > LIBGUESTFS_DEBUG=1 > > > PATH=...
2019 Sep 20
1
[RFC v4 0/3] vhost: introduce mdev based hardware backend
...river to the virtio-mdev compatible > > mdev devices when we want to use vhost-mdev. > > > > After binding above driver to the mdev device, we can setup IOMMU > > via VFIO and get VFIO device fd of this mdev device, and pass it > > to vhost fd (/dev/vhost-mdev) with a SET_BACKEND ioctl. > > > Then what vhost-mdev char device did is just forwarding ioctl back to this > vfio device fd which seems a overkill. It's simpler that just do ioctl on > the device ops directly. Yes. Thanks, Tiwei > > Thanks > > > > > > Thanks, >...
2015 Jun 25
0
[PATCH v2 7/9] tests: daemon: Cleanly shut down the daemon on exit.
...diff --git a/tests/daemon/captive-daemon.pm.in b/tests/daemon/captive-daemon.pm.in index 991a9a1..19833b8 100644 --- a/tests/daemon/captive-daemon.pm.in +++ b/tests/daemon/captive-daemon.pm.in @@ -93,14 +93,15 @@ sub run_tests { # libguestfs live. $g = Sys::Guestfs->new (); $g->set_backend ("unix:" . $sockname); + $g->set_autosync (0); $g->launch; # Run the user tests. my $r = ::tests ($g); - # Close the socket. The daemon should now exit. - $g->shutdown (); - $g->close (); + # Tell the daemon to exit cleanly, and remove the so...
2019 Sep 20
0
[RFC v4 0/3] vhost: introduce mdev based hardware backend
...o we can bind above mdev driver to the virtio-mdev compatible > mdev devices when we want to use vhost-mdev. > > After binding above driver to the mdev device, we can setup IOMMU > via VFIO and get VFIO device fd of this mdev device, and pass it > to vhost fd (/dev/vhost-mdev) with a SET_BACKEND ioctl. Then what vhost-mdev char device did is just forwarding ioctl back to this vfio device fd which seems a overkill. It's simpler that just do ioctl on the device ops directly. Thanks > > Thanks, > Tiwei > >> Thanks >> >> >>>> Yes, it is. &gt...
2019 Nov 01
0
[PATCH v4] vhost: introduce mdev based hardware backend
...p. (Jason); > - Pass ring addresses as GPAs/IOVAs in vhost-mdev to avoid > meaningless HVA->GPA translations (Jason); > > RFC v3 -> RFC v4: > - Build vhost-mdev on top of the same abstraction used by > virtio-mdev (Jason); > - Introduce vhost fd and pass VFIO fd via SET_BACKEND ioctl (MST); > > RFC v2 -> RFC v3: > - Reuse vhost's ioctls instead of inventing a VFIO regions/irqs > based vhost protocol on top of vfio-mdev (Jason); > > RFC v1 -> RFC v2: > - Introduce a new VFIO device type to build a vhost protocol > on top of vfio-mdev...
2023 Apr 12
1
[PATCH v6 11/11] vhost: allow userspace to create workers
On Wed, Apr 12, 2023 at 6:15?AM Mike Christie <michael.christie at oracle.com> wrote: > > On 4/10/23 10:00 PM, Jason Wang wrote: > >>> vhost_zerocopy_callback(). But since you want to limit the call before > >>> set_backend, another question comes, do we really need the dynamic > >>> attaching/creating in this case? How about a simple one ioctl that is > >>> used to build the queue to workers mapping instead? > >> > >> > >> I didn't think we need the dynamic case....
2019 Oct 31
2
[PATCH v4] vhost: introduce mdev based hardware backend
...connect it to VFIO container/group. (Jason); - Pass ring addresses as GPAs/IOVAs in vhost-mdev to avoid meaningless HVA->GPA translations (Jason); RFC v3 -> RFC v4: - Build vhost-mdev on top of the same abstraction used by virtio-mdev (Jason); - Introduce vhost fd and pass VFIO fd via SET_BACKEND ioctl (MST); RFC v2 -> RFC v3: - Reuse vhost's ioctls instead of inventing a VFIO regions/irqs based vhost protocol on top of vfio-mdev (Jason); RFC v1 -> RFC v2: - Introduce a new VFIO device type to build a vhost protocol on top of vfio-mdev; drivers/vfio/mdev/mdev_core.c |...
2019 Oct 31
2
[PATCH v4] vhost: introduce mdev based hardware backend
...connect it to VFIO container/group. (Jason); - Pass ring addresses as GPAs/IOVAs in vhost-mdev to avoid meaningless HVA->GPA translations (Jason); RFC v3 -> RFC v4: - Build vhost-mdev on top of the same abstraction used by virtio-mdev (Jason); - Introduce vhost fd and pass VFIO fd via SET_BACKEND ioctl (MST); RFC v2 -> RFC v3: - Reuse vhost's ioctls instead of inventing a VFIO regions/irqs based vhost protocol on top of vfio-mdev (Jason); RFC v1 -> RFC v2: - Introduce a new VFIO device type to build a vhost protocol on top of vfio-mdev; drivers/vfio/mdev/mdev_core.c |...
2019 Sep 02
2
[RFC v3] vhost: introduce mdev based hardware vhost backend
...+ ret = -EINVAL; > + break; > + > + case VHOST_MDEV_SET_STATE: > + ret = vhost_set_state(vdpa, argp); > + break; So this is used to start or stop the device. This means if userspace want to drive a network device, the API is not 100% compatible. Any blocker for this? E.g for SET_BACKEND, we can pass a fd and then identify the type of backend. Another question is, how can user know the type of a device? > + case VHOST_GET_FEATURES: > + ret = vhost_get_features(vdpa, argp); > + break; > + case VHOST_SET_FEATURES: > + ret = vhost_set_features(vdpa, argp); > +...
2019 Sep 02
2
[RFC v3] vhost: introduce mdev based hardware vhost backend
...+ ret = -EINVAL; > + break; > + > + case VHOST_MDEV_SET_STATE: > + ret = vhost_set_state(vdpa, argp); > + break; So this is used to start or stop the device. This means if userspace want to drive a network device, the API is not 100% compatible. Any blocker for this? E.g for SET_BACKEND, we can pass a fd and then identify the type of backend. Another question is, how can user know the type of a device? > + case VHOST_GET_FEATURES: > + ret = vhost_get_features(vdpa, argp); > + break; > + case VHOST_SET_FEATURES: > + ret = vhost_set_features(vdpa, argp); > +...
2015 Jun 23
0
[PATCH 6/7] tests: Add tests using a captive daemon process.
...st if -S $sockname; + sleep 1; + } + die "subprocess did not create the socket, check earlier messages\n" + unless -S $sockname; + + # Create the libguestfs handle and connect to the daemon using + # libguestfs live. + $g = Sys::Guestfs->new (); + $g->set_backend ("unix:" . $sockname); + $g->launch; + + # Run the user tests. + my $r = ::tests ($g); + + # Close the socket. The daemon should now exit. + $g->shutdown (); + $g->close (); + unlink $sockname; + + waitpid ($pid, 0) or die "waitpid: $!"; + if...