On 15.01.24 16:31, Anthony PERARD wrote:
On Thu, Jan 04, 2024 at 10:00:43AM +0100, Juergen Gross wrote:
Add a 9pfs device to Xenstore stubdom in order to allow it to do e.g.
logging into a dom0 file.

Use the following parameters for the new device:

- tag = "xen"

Is it ok to have here tag "xen" when the default tag is "Xen" ?

It is okay, but I agree it should be "Xen".

I'll change it.


diff --git a/tools/include/libxl.h b/tools/include/libxl.h
index 907aa0a330..00693264f7 100644
--- a/tools/include/libxl.h
+++ b/tools/include/libxl.h
@@ -2060,6 +2067,16 @@ int libxl_console_add_xenstore(libxl_ctx *ctx, uint32_t 
domid, uint32_t backend,
                                 const libxl_asyncop_how *ao_how)
                                 LIBXL_EXTERNAL_CALLERS_ONLY;
+/* libxl_p9_add_xenstore writes the Xenstore entries for a domain's
+ * primary 9pfs device based on domid, backend type and device parameters.
+ */
+int libxl_p9_add_xenstore(libxl_ctx *ctx, uint32_t domid, uint32_t backend,
+                          libxl_p9_type type, char *tag, char *path,
+                          char *security_model, unsigned int max_space,
+                          unsigned int max_files, unsigned int max_open_files,
+                          bool auto_delete, const libxl_asyncop_how *ao_how)

Could we simply pass a "libxl_device_p9*" instead of all these
parameters? It would also mean that we can update the list of parameters
without having to change the function prototype.

Fine with me.

These functions tend to be called "libxl_device_*_add()", is it possible
to follow the same schema? In particular, I don't see anything xenstore
specific in the function.

It was meant to be similar to libxl_console_add_xenstore(), which just writes
the Xenstore contents of the device.

I think you are right that libxl_device_9pfs_add() is a better name.


Juergen

Attachment: OpenPGP_0xB0DE9DD628BF132F.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to