qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v2] Add option to mlock qemu and guest memory


From: Satoru Moriya
Subject: Re: [Qemu-devel] [PATCH v2] Add option to mlock qemu and guest memory
Date: Thu, 21 Mar 2013 19:08:16 +0000

Hi Jan,

Thank you for reviewing.

On 03/21/2013 05:08 AM, Jan Kiszka wrote:
> On 2013-02-14 21:21, Satoru Moriya wrote:
>> @@ -31,6 +31,7 @@ void os_set_proc_name(const char *s);  void 
>> os_setup_signal_handling(void);  void os_daemonize(void);  void 
>> os_setup_post(void);
>> +void os_mlock(void);
>>  
>>  typedef struct timeval qemu_timeval;  #define qemu_gettimeofday(tp) 
>> gettimeofday(tp, NULL) diff --git a/include/sysemu/os-win32.h 
>> b/include/sysemu/os-win32.h index bf9edeb..a74ca13 100644
>> --- a/include/sysemu/os-win32.h
>> +++ b/include/sysemu/os-win32.h
>> @@ -80,6 +80,7 @@ static inline void os_daemonize(void) {}  static 
>> inline void os_setup_post(void) {}  void os_set_line_buffering(void);  
>> static inline void os_set_proc_name(const char *dummy) {}
>> +static inline void os_mlock(void) {}
> 
> Let's  return an error code from os_mlock, a permanent failure like 
> -ENOSYS on Win32, the result of mlock() on POSIX. Requesting to lock 
> the memory should not silently fail on Windows.

OK. I'll update it.
 
>> diff --git a/vl.c b/vl.c
>> index 1355f69..c16c8ad 100644
>> --- a/vl.c
>> +++ b/vl.c
>> @@ -491,6 +491,18 @@ static QemuOptsList qemu_object_opts = {
>>      },
>>  };
>>  
>> +static QemuOptsList qemu_realtime_opts = {
>> +    .name = "realtime",
>> +    .head = QTAILQ_HEAD_INITIALIZER(qemu_realtime_opts.head),
>> +    .desc = {
>> +        {
>> +            .name = "mlock",
>> +            .type = QEMU_OPT_BOOL,
>> +        },
>> +        { /* end of list */ }
>> +    },
>> +};
>> +
>>  const char *qemu_get_vm_name(void)
>>  {
>>      return qemu_name;
>> @@ -1384,6 +1396,17 @@ static void smp_parse(const char *optarg)
>>          max_cpus = smp_cpus;
>>  }
>>  
>> +static void configure_realtime(QemuOpts *opts) {
>> +    bool is_mlock;
> 
> "enable_mlock" or just "mlock".

will do.

Regards,
Satoru


reply via email to

[Prev in Thread] Current Thread [Next in Thread]