[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/1] s390x/s390-virtio-ccw: Fix build on systems without KVM
From: |
Christian Borntraeger |
Subject: |
Re: [PATCH 1/1] s390x/s390-virtio-ccw: Fix build on systems without KVM |
Date: |
Mon, 6 Apr 2020 11:27:13 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 |
On 06.04.20 11:04, Cornelia Huck wrote:
> On Mon, 6 Apr 2020 03:59:31 -0400
> Christian Borntraeger <address@hidden> wrote:
>
>> linux/kvm.h is not available on all platforms. Let us move
>> s390_machine_inject_pv_error into pv.c as it uses KVM structures.
>>
>> Fixes: 49fc3220175e ("s390x: protvirt: Support unpack facility")
>> Reported-by: Bruce Rogers <address@hidden>
>> Signed-off-by: Christian Borntraeger <address@hidden>
>> ---
>> hw/s390x/ipl.h | 1 +
>> hw/s390x/pv.c | 11 +++++++++++
>> hw/s390x/s390-virtio-ccw.c | 10 ----------
>> include/hw/s390x/pv.h | 3 +++
>> 4 files changed, 15 insertions(+), 10 deletions(-)
>>
>> diff --git a/hw/s390x/ipl.h b/hw/s390x/ipl.h
>> index 89b3044d7a..53cc9eb5ac 100644
>> --- a/hw/s390x/ipl.h
>> +++ b/hw/s390x/ipl.h
>> @@ -14,6 +14,7 @@
>> #define HW_S390_IPL_H
>>
>> #include "cpu.h"
>> +#include "exec/address-spaces.h"
>
> Hm, what is now requiring including this? (No objection, but I don't
> see it.)
ipl.h has
static inline bool ipl_valid_pv_header(IplParameterBlock *iplb)
{
[..]
if (!address_space_access_valid(&address_space_memory,
and if included alone this fails to build without the include.
>
>> #include "hw/qdev-core.h"
>>
>> struct IPLBlockPVComp {
>
> (...)
>
>> diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c
>> index b268907395..0e8b0c63a1 100644
>> --- a/hw/s390x/s390-virtio-ccw.c
>> +++ b/hw/s390x/s390-virtio-ccw.c
>> @@ -45,7 +45,6 @@
>> #include "sysemu/sysemu.h"
>> #include "sysemu/balloon.h"
>> #include "hw/s390x/pv.h"
>> -#include <linux/kvm.h>
>
> In hindsight, that should have been obvious :)
Yes, it is. It was added pretty late (v10 I think).
>> #include "migration/blocker.h"
>>
>> static Error *pv_mig_blocker;
>