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:
Oleksandr Tyshchenko authored and Jan Beulich committed 2024-02-19 12:46:07 +01:00
1 parent f93629b18b
commit 1eb013ef97
10 files changed
+555 -444

No files matched your search

+6
View File
@@ -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
+1
View File
@@ -741,6 +741,7 @@ ColoExport string
ActiveDisk string
HiddenDisk string
Trusted Defbool
GrantUsage Defbool
}
type DeviceNic struct {
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.