qemu-s390x
[Top][All Lists]
Advanced

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

Re: [PATCH v2 03/19] accel/kvm: Convert to ram_block_discard_disable()


From: David Hildenbrand
Subject: Re: [PATCH v2 03/19] accel/kvm: Convert to ram_block_discard_disable()
Date: Wed, 20 May 2020 15:01:12 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0

On 20.05.20 15:00, Philippe Mathieu-Daudé wrote:
> Hi David,
> 
> On 5/20/20 2:31 PM, David Hildenbrand wrote:
>> Discarding memory does not work as expected. At the time this is called,
>> we cannot have anyone active that relies on discards to work properly.
>>
>> Reviewed-by: Dr. David Alan Gilbert <address@hidden>
>> Cc: Paolo Bonzini <address@hidden>
>> Signed-off-by: David Hildenbrand <address@hidden>
>> ---
>>   accel/kvm/kvm-all.c | 3 +--
>>   1 file changed, 1 insertion(+), 2 deletions(-)
>>
>> diff --git a/accel/kvm/kvm-all.c b/accel/kvm/kvm-all.c
>> index d06cc04079..7a6158fb99 100644
>> --- a/accel/kvm/kvm-all.c
>> +++ b/accel/kvm/kvm-all.c
>> @@ -40,7 +40,6 @@
>>   #include "trace.h"
>>   #include "hw/irq.h"
>>   #include "sysemu/sev.h"
>> -#include "sysemu/balloon.h"
>>   #include "qapi/visitor.h"
>>   #include "qapi/qapi-types-common.h"
>>   #include "qapi/qapi-visit-common.h"
>> @@ -2143,7 +2142,7 @@ static int kvm_init(MachineState *ms)
>>   
>>       s->sync_mmu = !!kvm_vm_check_extension(kvm_state, KVM_CAP_SYNC_MMU);
>>       if (!s->sync_mmu) {
>> -        qemu_balloon_inhibit(true);
>> +        g_assert(ram_block_discard_disable(true));
> 
> Please do not evaluate code within an assert() call.
> 

Right, thanks for pointing that out.


-- 
Thanks,

David / dhildenb




reply via email to

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