[libvirt] [PATCH v8 07/11] qemu/cgroup: add /dev/sev in shared devices list

Brijesh Singh posted 9 patches 7 years, 8 months ago
There is a newer version of this series
[libvirt] [PATCH v8 07/11] qemu/cgroup: add /dev/sev in shared devices list
Posted by Brijesh Singh 7 years, 8 months ago
QEMU uses /dev/sev device while creating the SEV guest, lets add /dev/sev
in the list of devices allowed to be accessed by the QEMU.

Signed-off-by: Brijesh Singh <<brijesh.singh@amd.com>>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
---
 docs/drvqemu.html.in               | 1 +
 src/qemu/qemu.conf                 | 2 +-
 src/qemu/qemu_cgroup.c             | 2 +-
 src/qemu/test_libvirtd_qemu.aug.in | 1 +
 4 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/docs/drvqemu.html.in b/docs/drvqemu.html.in
index cbd159d..7c33a18 100644
--- a/docs/drvqemu.html.in
+++ b/docs/drvqemu.html.in
@@ -397,6 +397,7 @@ chmod o+x /path/to/directory
 /dev/random, /dev/urandom,
 /dev/ptmx, /dev/kvm, /dev/kqemu,
 /dev/rtc, /dev/hpet, /dev/net/tun
+/dev/sev
 </pre>
 
     <p>
diff --git a/src/qemu/qemu.conf b/src/qemu/qemu.conf
index c8e1a62..3a733b3 100644
--- a/src/qemu/qemu.conf
+++ b/src/qemu/qemu.conf
@@ -485,7 +485,7 @@
 #    "/dev/null", "/dev/full", "/dev/zero",
 #    "/dev/random", "/dev/urandom",
 #    "/dev/ptmx", "/dev/kvm", "/dev/kqemu",
-#    "/dev/rtc","/dev/hpet"
+#    "/dev/rtc","/dev/hpet", "/dev/sev"
 #]
 #
 # RDMA migration requires the following extra files to be added to the list:
diff --git a/src/qemu/qemu_cgroup.c b/src/qemu/qemu_cgroup.c
index 546a4c8..21dcb3c 100644
--- a/src/qemu/qemu_cgroup.c
+++ b/src/qemu/qemu_cgroup.c
@@ -47,7 +47,7 @@ const char *const defaultDeviceACL[] = {
     "/dev/null", "/dev/full", "/dev/zero",
     "/dev/random", "/dev/urandom",
     "/dev/ptmx", "/dev/kvm", "/dev/kqemu",
-    "/dev/rtc", "/dev/hpet",
+    "/dev/rtc", "/dev/hpet", "/dev/sev",
     NULL,
 };
 #define DEVICE_PTY_MAJOR 136
diff --git a/src/qemu/test_libvirtd_qemu.aug.in b/src/qemu/test_libvirtd_qemu.aug.in
index 912161c..f127726 100644
--- a/src/qemu/test_libvirtd_qemu.aug.in
+++ b/src/qemu/test_libvirtd_qemu.aug.in
@@ -62,6 +62,7 @@ module Test_libvirtd_qemu =
     { "8" = "/dev/kqemu" }
     { "9" = "/dev/rtc" }
     { "10" = "/dev/hpet" }
+    { "11" = "/dev/sev" }
 }
 { "save_image_format" = "raw" }
 { "dump_image_format" = "raw" }
-- 
2.7.4

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list
Re: [libvirt] [PATCH v8 07/11] qemu/cgroup: add /dev/sev in shared devices list
Posted by Erik Skultety 7 years, 8 months ago
On Wed, Jun 06, 2018 at 12:50:13PM -0500, Brijesh Singh wrote:
> QEMU uses /dev/sev device while creating the SEV guest, lets add /dev/sev
> in the list of devices allowed to be accessed by the QEMU.
>
> Signed-off-by: Brijesh Singh <<brijesh.singh@amd.com>>
> Reviewed-by: Erik Skultety <eskultet@redhat.com>
> ---
>  docs/drvqemu.html.in               | 1 +
>  src/qemu/qemu.conf                 | 2 +-
>  src/qemu/qemu_cgroup.c             | 2 +-
>  src/qemu/test_libvirtd_qemu.aug.in | 1 +
>  4 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/docs/drvqemu.html.in b/docs/drvqemu.html.in
> index cbd159d..7c33a18 100644
> --- a/docs/drvqemu.html.in
> +++ b/docs/drvqemu.html.in
> @@ -397,6 +397,7 @@ chmod o+x /path/to/directory
>  /dev/random, /dev/urandom,
>  /dev/ptmx, /dev/kvm, /dev/kqemu,
>  /dev/rtc, /dev/hpet, /dev/net/tun

missing comma at the end of the line...

> +/dev/sev
>  </pre>

Reviewed-by: Erik Skultety <eskultet@redhat.com>

--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list