[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qemu-s390x] [PATCH v1 4/5] s390x/vfio: ap: Intercepting AP Queue In
From: |
Cornelia Huck |
Subject: |
Re: [qemu-s390x] [PATCH v1 4/5] s390x/vfio: ap: Intercepting AP Queue Interrupt Control |
Date: |
Wed, 7 Nov 2018 13:40:53 +0100 |
On Fri, 2 Nov 2018 11:30:20 +0100
Pierre Morel <address@hidden> wrote:
> From: Pierre Morel <address@hidden>
Meta: you may want to rewrite your authorship to the shorter address.
>
> We intercept the PQAP(AQIC) instruction.
>
> Until we implement AQIC we return a PGM_OPERATION.
>
> Signed-off-by: Pierre Morel <address@hidden>
> ---
> hw/vfio/ap.c | 10 ++++++++++
> include/hw/s390x/ap-device.h | 9 +++++++++
> target/s390x/kvm.c | 20 ++++++++++++++++++++
> 3 files changed, 39 insertions(+)
>
> diff --git a/hw/vfio/ap.c b/hw/vfio/ap.c
> index 3962bb74e5..d8d9cadc46 100644
> --- a/hw/vfio/ap.c
> +++ b/hw/vfio/ap.c
> @@ -38,6 +38,16 @@ typedef struct VFIOAPDevice {
> #define VFIO_AP_DEVICE(obj) \
> OBJECT_CHECK(VFIOAPDevice, (obj), VFIO_AP_DEVICE_TYPE)
>
> +/*
> + * ap_pqap
> + * @env: environment pointing to registers
> + * return value: Code Condition
> + */
> +int ap_pqap(CPUS390XState *env)
> +{
> + return -PGM_OPERATION;
> +}
I'm not sure whether it makes sense to add such a skeleton handler
here; perhaps we should merge with the next patch that actually does
something for AQCI?
> +
> static void vfio_ap_compute_needs_reset(VFIODevice *vdev)
> {
> vdev->needs_reset = false;
> diff --git a/include/hw/s390x/ap-device.h b/include/hw/s390x/ap-device.h
> index 765e9082a3..a83ea096c7 100644
> --- a/include/hw/s390x/ap-device.h
> +++ b/include/hw/s390x/ap-device.h
> @@ -19,4 +19,13 @@ typedef struct APDevice {
> #define AP_DEVICE(obj) \
> OBJECT_CHECK(APDevice, (obj), AP_DEVICE_TYPE)
>
> +#define AP_DEVICE_GET_CLASS(obj) \
> + OBJECT_GET_CLASS(APDeviceClass, (obj), AP_DEVICE_TYPE)
> +
> +#define AP_DEVICE_CLASS(klass) \
> + OBJECT_CLASS_CHECK(APDeviceClass, (klass), AP_DEVICE_TYPE)
Looks like an unrelated change -- does that maybe belong into the next
patch?
> +
> +#include "cpu.h"
> +int ap_pqap(CPUS390XState *env);
> +
> #endif /* HW_S390X_AP_DEVICE_H */
The wiring up looks reasonable.
- [qemu-s390x] [PATCH v1 0/5] s390x/vfio: VFIO-AP interrupt control interception, Pierre Morel, 2018/11/02
- [qemu-s390x] [PATCH v1 2/5] s390x/cpumodel: Set up CPU model for AQIC interception, Pierre Morel, 2018/11/02
- [qemu-s390x] [PATCH v1 3/5] s390x/vfio: ap: Definition for AP Adapter type, Pierre Morel, 2018/11/02
- [qemu-s390x] [PATCH v1 1/5] s390x/vfio: ap: Linux uapi VFIO place holder, Pierre Morel, 2018/11/02
- [qemu-s390x] [PATCH v1 4/5] s390x/vfio: ap: Intercepting AP Queue Interrupt Control, Pierre Morel, 2018/11/02
- Re: [qemu-s390x] [PATCH v1 4/5] s390x/vfio: ap: Intercepting AP Queue Interrupt Control,
Cornelia Huck <=
- [qemu-s390x] [PATCH v1 5/5] s390x/vfio: ap: Implementing AP Queue Interrupt Control, Pierre Morel, 2018/11/02
- Re: [qemu-s390x] [PATCH v1 0/5] s390x/vfio: VFIO-AP interrupt control interception, David Hildenbrand, 2018/11/02