mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
libxl: Add "grant_usage" parameter for virtio disk devices
Allow administrators to control whether Xen grant mappings for the virtio disk devices should be used. By default (when new parameter is not specified), the existing behavior is retained (we enable grants if backend-domid != 0). Signed-off-by: Oleksandr Tyshchenko <oleksandr_tyshchenko@epam.com> Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
This commit is contained in:
1 parent
f93629b18b
commit
1eb013ef97
10 files changed
+555
-444
No files matched your search
@@ -1885,6 +1885,9 @@ x.ActiveDisk = C.GoString(xc.active_disk)
|
||||
x.HiddenDisk = C.GoString(xc.hidden_disk)
|
||||
if err := x.Trusted.fromC(&xc.trusted);err != nil {
|
||||
return fmt.Errorf("converting field Trusted: %v", err)
|
||||
}
|
||||
if err := x.GrantUsage.fromC(&xc.grant_usage);err != nil {
|
||||
return fmt.Errorf("converting field GrantUsage: %v", err)
|
||||
}
|
||||
|
||||
return nil}
|
||||
@@ -1933,6 +1936,9 @@ if x.HiddenDisk != "" {
|
||||
xc.hidden_disk = C.CString(x.HiddenDisk)}
|
||||
if err := x.Trusted.toC(&xc.trusted); err != nil {
|
||||
return fmt.Errorf("converting field Trusted: %v", err)
|
||||
}
|
||||
if err := x.GrantUsage.toC(&xc.grant_usage); err != nil {
|
||||
return fmt.Errorf("converting field GrantUsage: %v", err)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
||||
@@ -741,6 +741,7 @@ ColoExport string
|
||||
ActiveDisk string
|
||||
HiddenDisk string
|
||||
Trusted Defbool
|
||||
GrantUsage Defbool
|
||||
}
|
||||
|
||||
type DeviceNic struct {
|
||||
|
||||