|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT PATCHv4 31/43] plat/kvm: Parse command line from device tree for Arm64
Hi Wei, On 06/07/18 10:03, Wei Chen wrote: QEMU/KVM can pass parameters to virtual machine through command line. For Arm64, this command line has been stored in device tree. We should parse it from device tree for further usage. I don't think this code is KVM specific :). Signed-off-by: Wei Chen <Wei.Chen@xxxxxxx> --- plat/kvm/arm/setup.c | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/plat/kvm/arm/setup.c b/plat/kvm/arm/setup.c index 892a0a9..a881152 100644 --- a/plat/kvm/arm/setup.c +++ b/plat/kvm/arm/setup.c @@ -36,6 +36,9 @@ #include <uk/assert.h> #include <uk/essentials.h>+#define MAX_CMDLINE_SIZE 1024+static char cmdline[MAX_CMDLINE_SIZE]; + void *_libkvmplat_dtb;static void _init_dtb(void *dtb_pointer) I don't think you need to copy the command line in an internal buffer. Device-Tree string are null terminated and AFAICT you keep the DT around for ever. So how about turning cmdline to a pointer?
Cheers, -- Julien Grall _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |