> `go build` wants to add the current go version to go.mod as the
> minimum every time we run `make` in the directory. Add 1.11 (the
> earliest Go version that supports modules) there to make it happy.
>
> Signed-off-by: George Dunlap
Reviewed-by: Nick Rosbrook
> ...rather than duplicating the path in several places.
>
> Signed-off-by: George Dunlap
Reviewed-by: Nick Rosbrook
> Signed-off-by: George Dunlap
Reviewed-by: Nick Rosbrook
> > Signed-off-by: George Dunlap
> Reviewed-by: Nick Rosbrook
Oh, I just noticed your commit message calls the variable
"XEN_PKG_DIR", but it's actually named "GOXL_PKG_DIR."
during a parallel build; but that shouldn't be an issue, since
> tools/golang/xenlight should never be built until after tools/libxl
> has completed building anyway.
>
> Signed-off-by: George Dunlap
For the golang side:
Reviewed-by: Nick Rosbrook
> Signed-off-by: George Dunlap
Reviewed-by: Nick Rosbrook
On Tue, May 26, 2020 at 5:31 AM George Dunlap wrote:
>
>
>
> > On May 23, 2020, at 5:48 PM, Nick Rosbrook wrote:
> >
> >>> Signed-off-by: George Dunlap
> >> Reviewed-by: Nick Rosbrook
> >
> > Oh, I just noticed your commit message calls t
> With golang, you don’t really distribute package binaries; you only
> distribute source files.
>
> However, we don’t want to wait until someone tries to clone the package to
> see if we’ve broken the build; so the current makefile does a “build test” of
> the package files.
>
> Before golang
> diff --git a/tools/golang/xenlight/Makefile b/tools/golang/xenlight/Makefile
> index 8ab4cb5665..f8d8047524 100644
> --- a/tools/golang/xenlight/Makefile
> +++ b/tools/golang/xenlight/Makefile
> @@ -14,17 +14,8 @@ LIBXL_SRC_DIR = ../../libxl
> .PHONY: all
> all: build
>
> -.PHONY: package
> -
the source
> files.
>
> Signed-off-by: George Dunlap
If you want to just make that change on check-in,
Reviewed-by: Nick Rosbrook
> The simplest short-term way to fix this would be to remove the `go fmt` call
> from `gengotypes.py`. It’s actually relatively unusual for generated code to
> look pretty (or even be looked at). We could also consider adding in some
> “manual” formatting in gengotypes.py, like indentation, so
On Mon, Jun 08, 2020 at 11:39:43AM +, George Dunlap wrote:
>
> > On Jun 6, 2020, at 5:10 PM, Nick Rosbrook wrote:
> >
> > Since the golang bindings are now set to be re-generated whenever a
> > change is made to tools/libxl/libxl_types.idl, the call to go fmt in
&
> > Out of curiosity, would it be totally out of the question to require
> > having gofmt installed (not for 4.14, but in the future)? I ask because
> > I haven't seen it discussed one way or the other.
>
> I think I’d like to try to avoid it, unless / until we have a “core
> component” written i
Hello,
When writing a patch to tools/configure.ac, re-running autogen.sh
resulted in a diff with unexpected changes. Specifically, these additions:
diff --git a/configure b/configure
index 8af54e8a5a..9da3970cef 100755
--- a/configure
+++ b/configure
@@ -644,6 +644,7 @@ infodi
On Fri, Jun 12, 2020 at 8:15 AM Andrew Cooper wrote:
>
> On 12/06/2020 12:59, George Dunlap wrote:
> >
> >> On Jun 12, 2020, at 12:00 PM, Andrew Cooper
> >> wrote:
> >>
> >> Hello,
> >>
> >> I've just done a libxl build and got things such as:
> >>
> >> --- a/tools/golang/xenlight/helpers.gen.go
Currently, no minimum go compiler version is required by the configure
scripts. However, the go bindings actually will not build with some
older versions of go. Add a check for a minimum go version of 1.11.1 in
accordance with tools/golang/xenlight/go.mod.
Signed-off-by: Nick Rosbrook
---
m4
On Fri, Jun 12, 2020 at 05:40:21PM +0100, Ian Jackson wrote:
> Nick Rosbrook writes ("[PATCH for-4.14] tools: check go compiler version if
> present"):
> > Currently, no minimum go compiler version is required by the configure
> > scripts. However, the go bindings
> Ideally at some point maybe we would make this clearer but not now.
Okay, sounds good.
> Have you tested the situations you describe ? That might be a better
> way of checking that it's right than the code inspection which is
> obviously failing for me now...
Yes, I have tested the following
with different versions of python will now yield
the same result.
Signed-off-by: Nick Rosbrook
---
Andrew reported this in [1], so I intend this as a build fix for 4.14.
[1] https://lists.xenproject.org/archives/html/xen-devel/2020-06/msg00881.html
---
tools/golang/xenlight/gengotypes.py | 2
index 09a3bb67e2..45f2cba3d2 100644
> --- a/tools/golang/xenlight/types.gen.go
> +++ b/tools/golang/xenlight/types.gen.go
> @@ -1008,6 +1008,7 @@ CapHap bool
> CapShadow bool
> CapIommuHapPtShare bool
> CapVmtrace bool
> +CapVpmu bool
> }
For the golang re-gen,
Acked-by: Nick Rosbrook
Thanks,
NR
r := x.Vpmu.toC(&xc.vpmu); err != nil {
> +return fmt.Errorf("converting field Vpmu: %v", err)
> +}
>
> return nil
> }
> diff --git a/tools/golang/xenlight/types.gen.go
> b/tools/golang/xenlight/types.gen.go
> index 45f2cba3d2..b2e8bd1a85 100644
> --- a/tools/golang/xenlight/types.gen.go
> +++ b/tools/golang/xenlight/types.gen.go
> @@ -521,6 +521,7 @@ MsrRelaxed Defbool
> }
> Altp2M Altp2MMode
> VmtraceBufKb int
> +Vpmu Defbool
> }
>
> type DomainBuildInfoTypeUnion interface {
For the golang re-gen,
Acked-by: Nick Rosbrook
Thanks,
NR
gt; @@ -479,6 +480,7 @@ BlkdevStart string
> VnumaNodes []VnodeInfo
> MaxGrantFrames uint32
> MaxMaptrackFrames uint32
> +MaxGrantVersion int
> DeviceModelVersion DeviceModelVersion
> DeviceModelStubdomain Defbool
> StubdomainMemkb uint64
> --
> Anthony PERARD
>
Acked-by: Nick Rosbrook
Thanks for catching that.
-NR
nlight) $(LDLIBS_libxentoollog)
> -L$(XEN_libxenlight) -L$(XEN_libxentoollog) $(APPEND_LDFLAGS)" $(GO) build -x
>
> .PHONY: install
> install: build
> --
> 2.31.1
>
>
Acked-by: Nick Rosbrook
Thanks,
NR
On Thu, Jul 01, 2021 at 02:09:47PM +, George Dunlap wrote:
>
>
> > On Jun 21, 2021, at 5:11 PM, Nick Rosbrook wrote:
> >
> > On Fri, Jun 18, 2021 at 11:00:26AM +, George Dunlap wrote:
> >>
> >>
> >>> On May 24, 2021, at 9:36 P
On Tue, May 04, 2021 at 04:43:27PM +0100, Anthony PERARD wrote:
> On Tue, Mar 02, 2021 at 08:46:17PM -0500, Nick Rosbrook wrote:
> > diff --git a/tools/libs/light/libxl_types.idl
> > b/tools/libs/light/libxl_types.idl
> > index 5b85a7419f..550af7a1c7 100644
>
On Tue, May 04, 2021 at 04:02:55PM +0100, Anthony PERARD wrote:
> On Tue, Mar 02, 2021 at 08:46:18PM -0500, Nick Rosbrook wrote:
> > +def libxl_func_define_device_add(func):
> > +s = ''
> > +
> > +return_type = func.return_type.typename
&g
On Tue, May 04, 2021 at 04:46:52PM +0100, Anthony PERARD wrote:
> On Tue, Mar 02, 2021 at 08:46:12PM -0500, Nick Rosbrook wrote:
> > At a Xen Summit design session for the golang bindings (see [1]), we
> > agreed that it would be beneficial to expand the libxl IDL with function
package to boot domains with various configurations.
These patches address several things (e.g. bug fixes, code style,
conveniences, new wrapper functions), but are all work towards the final
goal of allowing a package user to manage a full domain life cycle.
Nick Rosbrook (12):
golang/xenlight
-by: Nick Rosbrook
---
tools/golang/xenlight/helpers.gen.go | 6 ++
tools/golang/xenlight/types.gen.go | 5 +
2 files changed, 11 insertions(+)
diff --git a/tools/golang/xenlight/helpers.gen.go
b/tools/golang/xenlight/helpers.gen.go
index 4c60d27a9c..b454b12d52 100644
--- a/tools/golang
ss the C memory, and explicity set the last entry to nil so the C
memory will be zeroed out, and (2) dereferencing csl in the
unsafe.Pointer conversion.
Signed-off-by: Nick Rosbrook
---
tools/golang/xenlight/xenlight.go | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/golang/
fields
to nil first, and then proceeds to check if the Go string is non-empty.
And, commit the new generated code.
Signed-off-by: Nick Rosbrook
---
tools/golang/xenlight/gengotypes.py | 1 +
tools/golang/xenlight/helpers.gen.go | 160 +++
2 files changed, 161 insertions
g/git-http/xen.git/tools/golang/xenlight?tab=doc#DeviceUsbdev
Signed-off-by: Nick Rosbrook
---
tools/golang/xenlight/gengotypes.py | 6 +--
tools/golang/xenlight/types.gen.go | 58 ++---
2 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/tools/golan
NOT using pointers
in these fields, update code generation to set keyed union fields to
pointers of their implementing structs.
Signed-off-by: Nick Rosbrook
---
tools/golang/xenlight/gengotypes.py | 4 +--
tools/golang/xenlight/helpers.gen.go | 44 ++--
2 files changed, 24
tools/golang/xenlight. There is no functional change.
Signed-off-by: Nick Rosbrook
---
tools/golang/xenlight/xenlight.go | 154 +++---
1 file changed, 77 insertions(+), 77 deletions(-)
diff --git a/tools/golang/xenlight/xenlight.go
b/tools/golang/xenlight/xenlight.go
ind
ments, e.g. xtl_log, add an xtl_log_wrap function to the cgo preamble
that accepts an already formatted string, and handle the formatting in
Go.
Signed-off-by: Nick Rosbrook
---
tools/golang/xenlight/xenlight.go | 45 +++
1 file changed, 45 insertions(+)
diff --g
x27;s xentoollog_logger. Future configuration
options can be created by adding an appropriate field to the
contextOptions struct and creating a With function to return
a ContextOption
Signed-off-by: Nick Rosbrook
---
tools/golang/xenlight/xenlight.go | 44 +--
1 file change
Add a wrapper around libxl_domain_destroy.
Signed-off-by: Nick Rosbrook
---
tools/golang/xenlight/xenlight.go | 10 ++
1 file changed, 10 insertions(+)
diff --git a/tools/golang/xenlight/xenlight.go
b/tools/golang/xenlight/xenlight.go
index 65f93abe32..1e0ed109e4 100644
--- a/tools
Add a warpper around libxl_send_trigger.
Signed-off-by: Nick Rosbrook
---
tools/golang/xenlight/xenlight.go | 11 +++
1 file changed, 11 insertions(+)
diff --git a/tools/golang/xenlight/xenlight.go
b/tools/golang/xenlight/xenlight.go
index 1e0ed109e4..d153feb851 100644
--- a/tools
to the provided
channel.
With this, callers should be able to manage a full domain life cycle.
Add to the comment of DomainCreateNew so that package uses know they
should use this method in conjunction with DomainCreateNew.
Signed-off-by: Nick Rosbrook
---
tools/golang/xenlight/xenlight.go | 83
#x27; xenlight.go
from tools/golang/xenlight.
Signed-off-by: Nick Rosbrook
---
tools/golang/xenlight/xenlight.go | 46 +++
1 file changed, 23 insertions(+), 23 deletions(-)
diff --git a/tools/golang/xenlight/xenlight.go
b/tools/golang/xenlight/xenlight.go
index
On Mon, May 24, 2021 at 4:37 PM Nick Rosbrook wrote:
>
> The primary goal of this patch series is to allow users of the xenlight
> package to manage a full domain life cycle. In particular, it provides
> support for receiving domain death events so that domain shutdown,
> reboo
On Fri, Jun 18, 2021 at 02:44:15PM +, George Dunlap wrote:
>
>
> > On May 24, 2021, at 9:36 PM, Nick Rosbrook wrote:
> >
> > Add a ContextOption type to support functional options in NewContext.
> > Then, add a variadic ContextOption parameter to NewContex
On Fri, Jun 18, 2021 at 01:17:07PM +, George Dunlap wrote:
>
>
> > On May 24, 2021, at 9:36 PM, Nick Rosbrook wrote:
> >
> > Add some logging methods to Context to provide easy use of the
> > Contenxt's xentoollog_logger. These are not exported, but the L
On Fri, Jun 18, 2021 at 01:21:40PM +, George Dunlap wrote:
>
>
> > On Jun 18, 2021, at 2:17 PM, George Dunlap wrote:
> >
> >
> >
> >> On May 24, 2021, at 9:36 PM, Nick Rosbrook wrote:
> >>
> >> Add some logging meth
On Fri, Jun 18, 2021 at 03:13:03PM +, George Dunlap wrote:
>
>
> > On May 24, 2021, at 9:36 PM, Nick Rosbrook wrote:
> >
> > There are several locations where the return code from calling into C is
> > negated when being converted to Error. This results in
On Fri, Jun 18, 2021 at 04:18:44PM +, George Dunlap wrote:
>
>
> > On Jun 18, 2021, at 4:08 PM, Nick Rosbrook wrote:
> >
> > On Fri, Jun 18, 2021 at 02:44:15PM +, George Dunlap wrote:
> >>
> >>
> >>> On May 24, 2021, at 9:36 PM,
On Fri, Jun 18, 2021 at 11:00:26AM +, George Dunlap wrote:
>
>
> > On May 24, 2021, at 9:36 PM, Nick Rosbrook wrote:
> >
> > In gengotypes.py, the toC functions only set C string fields when
> > the Go strings are non-empty. However, to prevent segfaults i
On Mon, Jun 21, 2021 at 03:53:39PM +, George Dunlap wrote:
>
>
> > On May 24, 2021, at 9:36 PM, Nick Rosbrook wrote:
> >
> > The primary goal of this patch series is to allow users of the xenlight
> > package to manage a full domain life cycle. In particula
On Fri, Jun 18, 2021 at 07:31:46PM +, George Dunlap wrote:
>
>
> > On Jun 18, 2021, at 7:28 PM, George Dunlap wrote:
> >
> >
> >
> >> On May 24, 2021, at 9:36 PM, Nick Rosbrook wrote:
> >>
> >> Add a helper function to wait for
I am no longer an employee at AIS. Use my personal email address
instead.
Signed-off-by: Nick Rosbrook
---
MAINTAINERS | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/MAINTAINERS b/MAINTAINERS
index 4a2884dfa7..feea7d14cf 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -302,7
exception when calling the relevant `fromC` method.
>
> Allocate structures before attempting to fill them in.
>
> Fixes: 453713b1750 ("golang/xenlight: Add host-related functionality")
> Reported-by: Tobias Fitschen
> Signed-off-by: George Dunlap
> Tested-by: Tobias Fi
No functional change.
>
> Signed-off-by: George Dunlap
Acked-by: Nick Rosbrook
Thanks,
Nick
On Fri, Apr 19, 2024 at 10:00 AM George Dunlap wrote:
>
> Signed-off-by: George Dunlap
> ---
> CC: Nick Rosbrook
> CC: Anthony PERARD
> ---
> tools/golang/xenlight/Makefile | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/tools/golang/xenlight/Makefile b/
On Wed, Dec 6, 2023 at 9:36 AM Jason Andryuk wrote:
> FYI, these IDL changes will require golang binding regeneration.
> (Maybe we shouldn't have generated code checked in...)
The generated code needs to be checked in for it to work as a go module.
-Nick
On Wed, Dec 6, 2023 at 1:53 PM Jason Andryuk wrote:
>
> On Wed, Dec 6, 2023 at 12:44 PM Nick Rosbrook wrote:
> >
> > On Wed, Dec 6, 2023 at 9:36 AM Jason Andryuk wrote:
> > > FYI, these IDL changes will require golang binding regeneration.
> > > (Maybe we s
rrant
The Go binding re-generation looks fine to me.
Acked-by: Nick Rosbrook
/msg01352.html
Nick Rosbrook (7):
libxl: remove extra whitespace from gentypes.py
libxl: add Function class to IDL
libxl: add PASS_BY_CONST_REFERENCE to idl
libxl: add DeviceFunction classes to IDL
libxl: add device function definitions to libxl_types.idl
libxl: implement device add
No functional change, just remove the extra whitespace from gentypes.py.
Signed-off-by: Nick Rosbrook
---
tools/libs/light/gentypes.py | 14 +++---
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/tools/libs/light/gentypes.py b/tools/libs/light/gentypes.py
index 9a45e45acc
functions returned.
Signed-off-by: Nick Rosbrook
---
tools/golang/xenlight/gengotypes.py | 2 +-
tools/libs/light/gentypes.py| 2 +-
tools/libs/light/idl.py | 36 -
3 files changed, 37 insertions(+), 3 deletions(-)
diff --git a/tools/golang
Currently, there is only support for PASS_BY_{REFERENCE,VALUE} in the IDL.
As a piece of adding function support, add logic for PASS_BY_CONST_REFERENCE
so that function generation code can use Type.make_arg() for function
signatures that require const reference parameters.
Signed-off-by: Nick
d the base class. DeviceRemoveFunction
adds the option of specifying 'custom_remove' parameter when custom remove
functions are needed. DeviceDestroyFunction is a child of DeviceRemoveFunction
to inherit the custom_remove attribute.
Signed-off-by: Nick Rosbrook
---
tools/libs/li
generate the code from gentypes.py.
Signed-off-by: Nick Rosbrook
---
tools/libs/light/libxl_types.idl | 202 +++
1 file changed, 202 insertions(+)
diff --git a/tools/libs/light/libxl_types.idl b/tools/libs/light/libxl_types.idl
index 5b85a7419f..550af7a1c7 100644
--- a
out to a .c file, but
are invoked to ensure there is no build regression introduced. A later
commit will replace the existing macros with this generated code.
Signed-off-by: Nick Rosbrook
---
tools/libs/light/gentypes.py | 91 +++-
1 file changed, 90 insertions(+), 1
Allow the gentypes.py script to write generated function output to
_libxl_types.c, and remove the LIBXL_DEFINE_DEVICE* macro calls in the
appropriate locations.
Signed-off-by: Nick Rosbrook
---
Note: This commit does not build; there is more work to be done,
particularly around accessing
On Wed, Mar 03, 2021 at 09:48:02AM +, Ian Jackson wrote:
> Nick Rosbrook writes ("[RFC v2 0/7] add function support to IDL"):
> > At a Xen Summit design session for the golang bindings (see [1]), we
> > agreed that it would be beneficial to expand the libxl IDL with
On Wed, Mar 3, 2021 at 8:41 AM Nick Rosbrook wrote:
>
> On Wed, Mar 03, 2021 at 09:48:02AM +, Ian Jackson wrote:
> > Nick Rosbrook writes ("[RFC v2 0/7] add function support to IDL"):
> > > At a Xen Summit design session for the golang bindings (see [1]), w
package to boot domains with various configurations.
These patches address several things (e.g. bug fixes, code style,
conveniences, new wrapper functions), but are all work towards the final
goal of allowing a package user to manage a full domain life cycle.
Nick Rosbrook (12):
golang/xenlight
-by: Nick Rosbrook
---
tools/golang/xenlight/helpers.gen.go | 6 ++
tools/golang/xenlight/types.gen.go | 5 +
2 files changed, 11 insertions(+)
diff --git a/tools/golang/xenlight/helpers.gen.go
b/tools/golang/xenlight/helpers.gen.go
index 4c60d27a9c..b454b12d52 100644
--- a/tools/golang
ss the C memory, and explicity set the last entry to nil so the C
memory will be zeroed out, and (2) dereferencing csl in the
unsafe.Pointer conversion.
Signed-off-by: Nick Rosbrook
---
tools/golang/xenlight/xenlight.go | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/tools/golang/
g/git-http/xen.git/tools/golang/xenlight?tab=doc#DeviceUsbdev
Signed-off-by: Nick Rosbrook
---
tools/golang/xenlight/gengotypes.py | 6 +--
tools/golang/xenlight/types.gen.go | 58 ++---
2 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/tools/golan
fields
to nil first, and then proceeds to check if the Go string is non-empty.
And, commit the new generated code.
Signed-off-by: Nick Rosbrook
---
tools/golang/xenlight/gengotypes.py | 1 +
tools/golang/xenlight/helpers.gen.go | 160 +++
2 files changed, 161 insertions
NOT using pointers
in these fields, update code generation to set keyed union fields to
pointers of their implementing structs.
Signed-off-by: Nick Rosbrook
---
tools/golang/xenlight/gengotypes.py | 4 +--
tools/golang/xenlight/helpers.gen.go | 44 ++--
2 files changed, 24
tools/golang/xenlight. There is no functional change.
Signed-off-by: Nick Rosbrook
---
tools/golang/xenlight/xenlight.go | 154 +++---
1 file changed, 77 insertions(+), 77 deletions(-)
diff --git a/tools/golang/xenlight/xenlight.go
b/tools/golang/xenlight/xenlight.go
ind
ments, e.g. xtl_log, add an xtl_log_wrap function to the cgo preamble
that accepts an already formatted string, and handle the formatting in
Go.
Signed-off-by: Nick Rosbrook
---
tools/golang/xenlight/xenlight.go | 45 +++
1 file changed, 45 insertions(+)
diff --g
x27;s xentoollog_logger. Future configuration
options can be created by adding an appropriate field to the
contextOptions struct and creating a With function to return
a ContextOption
Signed-off-by: Nick Rosbrook
---
tools/golang/xenlight/xenlight.go | 44 +--
1 file change
Add a wrapper around libxl_domain_destroy.
Signed-off-by: Nick Rosbrook
---
tools/golang/xenlight/xenlight.go | 10 ++
1 file changed, 10 insertions(+)
diff --git a/tools/golang/xenlight/xenlight.go
b/tools/golang/xenlight/xenlight.go
index 65f93abe32..1e0ed109e4 100644
--- a/tools
#x27; xenlight.go
from tools/golang/xenlight.
Signed-off-by: Nick Rosbrook
---
tools/golang/xenlight/xenlight.go | 46 +++
1 file changed, 23 insertions(+), 23 deletions(-)
diff --git a/tools/golang/xenlight/xenlight.go
b/tools/golang/xenlight/xenlight.go
index
to the provided
channel.
With this, callers should be able to manage a full domain life cycle.
Add to the comment of DomainCreateNew so that package uses know they
should use this method in conjunction with DomainCreateNew.
Signed-off-by: Nick Rosbrook
---
tools/golang/xenlight/xenlight.go | 83
Add a warpper around libxl_send_trigger.
Signed-off-by: Nick Rosbrook
---
tools/golang/xenlight/xenlight.go | 11 +++
1 file changed, 11 insertions(+)
diff --git a/tools/golang/xenlight/xenlight.go
b/tools/golang/xenlight/xenlight.go
index 1e0ed109e4..d153feb851 100644
--- a/tools
201 - 279 of 279 matches
Mail list logo