From: Ronald Rojas <ronladred@gmail.com>
Cc: Ronald Rojas <ronladred@gmail.com>,
wei.liu2@citrix.com, ian.jackson@eu.citrix.com,
george.dunlap@citrix.com, xen-devel@lists.xen.org
Subject: [PATCH v4 12/14] golang/xenlight: Created boilerplate code for device related structs
Date: Thu, 16 Mar 2017 15:08:48 -0400 [thread overview]
Message-ID: <1489691330-17695-12-git-send-email-ronladred@gmail.com> (raw)
In-Reply-To: <1489691330-17695-1-git-send-email-ronladred@gmail.com>
Created boilerplate struct and toC methods for the
following structs:
- KeyValueList
- DomainBuildInfo
- DeviceNic
- DevicePci
- DeviceRdm
- DeviceDtdev
- DeviceVfb
- DeviceVkb
- DeviceVtpm
- DeviceChannel
- DeviceUsbctrl
- DeviceUsbdev
Signed-off-by: Ronald Rojas <ronladred@gmail.com>
---
This specific patch constains mostly boilerplate code
that will be implemented in patches later down the road.
CC: xen-devel@lists.xen.org
CC: george.dunlap@citrix.com
CC: ian.jackson@eu.citrix.com
CC: wei.liu2@citrix.com
---
---
tools/golang/xenlight/xenlight.go | 162 ++++++++++++++++++++++++++++++++++++++
1 file changed, 162 insertions(+)
diff --git a/tools/golang/xenlight/xenlight.go b/tools/golang/xenlight/xenlight.go
index d520f74..8b5ca38 100644
--- a/tools/golang/xenlight/xenlight.go
+++ b/tools/golang/xenlight/xenlight.go
@@ -1137,3 +1137,165 @@ func (Ctx *Context) PrimaryConsoleGetTty(domid uint32) (path string, err error)
path = C.GoString(cpath)
return
}
+
+type Defbool string
+
+type KeyValueList []string
+
+type ckeyvaluelist struct {
+ clist C.libxl_key_value_list
+}
+
+func (clist ckeyvaluelist) toGo(glist KeyValueList) {
+ return
+}
+
+type DomainCreateInfo struct {
+ Type DomainType
+ Hap Defbool
+ Oos Defbool
+ ssidref uint32
+ ssid_label string
+ name string
+ uuid Uuid
+ Xsdata KeyValueList
+ Platformdata KeyValueList
+ Poolid uint32
+ PoolName string
+ RunHotplugScripts Defbool
+ Pvh Defbool
+ DriverDomain Defbool
+}
+
+func (dci DomainCreateInfo) toC() (cci C.libxl_domain_create_info) {
+
+ return
+}
+
+type TscMode int
+
+const (
+ TscModeDefault = TscMode(C.LIBXL_TSC_MODE_DEFAULT)
+ TscModeAlwaysEmulate = TscMode(C.LIBXL_TSC_MODE_ALWAYS_EMULATE)
+ TscModeNative = TscMode(C.LIBXL_TSC_MODE_NATIVE)
+ TscModeNativeParavirt = TscMode(C.LIBXL_TSC_MODE_NATIVE_PARAVIRT)
+)
+
+func (tm TscMode) String() (str string) {
+ cstr := C.libxl_tsc_mode_to_string(C.libxl_tsc_mode(tm))
+ str = C.GoString(cstr)
+
+ return
+}
+
+type CpuidPolicy struct {
+ //FIXME: Implement struct
+}
+
+//FIXME Create toGo function for CpuidPolicy
+
+type DomainBuildInfo struct {
+ MaxVcpus int
+ AvailVcpus Bitmap
+ Cpumap Bitmap
+ Nodemap Bitmap
+ VcpuHardAffinity []Bitmap
+ VcpuSoftAffinity []Bitmap
+ NumaPlacement Defbool
+ TscMode TscMode
+ MaxMemkb MemKB
+ TargetMemkb MemKB
+ VideoMemkb MemKB
+ ShadowMemkb MemKB
+ RtcTimeoffset uint32
+ ExecSsidref uint32
+ ExecSsidLabel string
+ localTime Defbool
+ DisableMigrate Defbool
+ Cpuid []CpuidPolicy
+ blkdevStart string
+}
+
+func (gdbi DomainBuildInfo) toC() (cdbi C.libxl_domain_build_info) {
+ return
+}
+
+type DeviceNic struct {
+ //FIXME: complete struct
+}
+
+func (gdn DeviceNic) toC() (cdn C.libxl_device_nic) {
+ return
+}
+
+type DevicePci struct {
+ //FIXME: complete struct
+}
+
+func (gdp DevicePci) toC() (cdp C.libxl_device_pci) {
+ return
+}
+
+type DeviceRdm struct {
+ //FIXME: complete struct
+}
+
+func (gdr DeviceRdm) toC() (cdr C.libxl_device_rdm) {
+ return
+}
+
+type DeviceDtdev struct {
+ //FIXME: complete struct
+}
+
+func (gdd DeviceDtdev) toC() (cdd C.libxl_device_dtdev) {
+ return
+}
+
+type DeviceVfb struct {
+ //FIXME: complete struct
+}
+
+func (gdv DeviceVfb) toC() (cdv C.libxl_device_vfb) {
+ return
+}
+
+type DeviceVkb struct {
+ //FIXME: complete struct
+}
+
+func (gdv DeviceVkb) toC() (cdv C.libxl_device_vkb) {
+ return
+}
+
+type DeviceVtpm struct {
+ //FIXME: complete struct
+}
+
+func (gdv DeviceVtpm) toC() (cdv C.libxl_device_vtpm) {
+ return
+}
+
+type DeviceChannel struct {
+ //FIXME: complete struct
+}
+
+func (gdc DeviceChannel) toC() (cdc C.libxl_device_channel) {
+ return
+}
+
+type DeviceUsbctrl struct {
+ //FIXME: complete struct
+}
+
+func (gdu DeviceUsbctrl) toC() (cdu C.libxl_device_usbctrl) {
+ return
+}
+
+type DeviceUsbdev struct {
+ //FIXME: complete struct
+}
+
+func (gdu DeviceUsbdev) toC() (cdu C.libxl_device_usbdev) {
+ return
+}
--
2.7.3
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel
next prev parent reply other threads:[~2017-03-16 19:08 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-16 19:08 [PATCH v4 01/14] golang/xenlight: Create stub package Ronald Rojas
2017-03-16 19:08 ` [PATCH v4 02/14] golang/xenlight: Add error constants and standard handling Ronald Rojas
2017-03-20 15:41 ` George Dunlap
2017-03-16 19:08 ` [PATCH v4 03/14] golang/xenlight: Add host-related functionality Ronald Rojas
2017-03-20 15:50 ` George Dunlap
2017-03-16 19:08 ` [PATCH v4 04/14] golang/xenlight: Implement libxl_domain_info and libxl_domain_unpause Ronald Rojas
2017-03-20 15:57 ` George Dunlap
2017-03-16 19:08 ` [PATCH v4 05/14] golang/xenlight: Add tests host related functionality functions Ronald Rojas
2017-03-20 17:49 ` George Dunlap
2017-03-20 18:15 ` Ian Jackson
2017-04-04 16:44 ` George Dunlap
2017-03-16 19:08 ` [PATCH v4 06/14] golang/xenlight: Implement libxl_bitmap and helper operations Ronald Rojas
2017-03-16 19:08 ` [PATCH v4 08/14] golang/xenlight: Implement cpupool operations Ronald Rojas
2017-03-16 19:08 ` [PATCH v4 09/14] golang/xenlight: Implement Domain operations Ronald Rojas
2017-04-05 10:23 ` George Dunlap
2017-03-16 19:08 ` [PATCH v4 10/14] golang/xenlight: Implement Vcpuinfo and ListVcpu Ronald Rojas
2017-03-16 19:08 ` [PATCH v4 11/14] golang/xenlight: Implement get console path operations Ronald Rojas
2017-04-05 11:04 ` George Dunlap
2017-03-16 19:08 ` Ronald Rojas [this message]
2017-04-05 11:13 ` [PATCH v4 12/14] golang/xenlight: Created boilerplate code for device related structs George Dunlap
2017-03-16 19:08 ` [PATCH v4 13/14] golang/xenlight: Implement ActionOnShutdown and DomainConfig Ronald Rojas
2017-03-16 19:08 ` [PATCH v4 14/14] golang/xenlight: Implement domain create/destroy operations Ronald Rojas
2017-03-20 14:45 ` [PATCH v4 01/14] golang/xenlight: Create stub package George Dunlap
2017-03-23 15:36 ` Ronald Rojas
2017-03-20 17:51 ` George Dunlap
2017-03-23 15:37 ` Ronald Rojas
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=1489691330-17695-12-git-send-email-ronladred@gmail.com \
--to=ronladred@gmail.com \
--cc=george.dunlap@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=wei.liu2@citrix.com \
--cc=xen-devel@lists.xen.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).