From: Cornelia Huck <cohuck@redhat.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: Tony Krowiak <akrowiak@linux.ibm.com>,
Pierre Morel <pmorel@linux.ibm.com>,
Cornelia Huck <cohuck@redhat.com>,
qemu-devel@nongnu.org, Halil Pasic <pasic@linux.ibm.com>,
Christian Borntraeger <borntraeger@de.ibm.com>,
qemu-s390x@nongnu.org
Subject: [Qemu-devel] [PULL for-4.1 2/4] s390x/cpumodel: Set up CPU model for AQIC interception
Date: Tue, 9 Jul 2019 14:25:44 +0200 [thread overview]
Message-ID: <20190709122546.12373-3-cohuck@redhat.com> (raw)
In-Reply-To: <20190709122546.12373-1-cohuck@redhat.com>
From: Pierre Morel <pmorel@linux.ibm.com>
Let's add support for the AP-Queue interruption facility to the CPU
model.
The S390_FEAT_AP_QUEUE_INTERRUPT_CONTROL, CPU facility indicates
whether the PQAP instruction with the AQIC command is available
to the guest.
This feature will be enabled only if the AP instructions are
available on the linux host and AQIC facility is installed on
the host.
This feature must be turned on from userspace to intercept AP
instructions on the KVM guest. The QEMU command line to turn
this feature on looks something like this:
qemu-system-s390x ... -cpu xxx,apqi=on ...
or
... -cpu host
Right now AP pass-through devices do not support migration,
which means that we do not have to take care of migrating
the interrupt data:
virsh migrate apguest --live qemu+ssh://root@target.lan/system
error: Requested operation is not valid: domain has assigned non-USB host devices
Signed-off-by: Pierre Morel <pmorel@linux.ibm.com>
Reviewed-by: Tony Krowiak <akrowiak@linux.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Reviewed-by: Halil Pasic <pasic@linux.ibm.com>
Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
[rebase to newest qemu and fixup description]
Message-Id: <20190705153249.12525-1-borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
target/s390x/cpu_features_def.inc.h | 1 +
target/s390x/cpu_models.c | 1 +
target/s390x/gen-features.c | 1 +
3 files changed, 3 insertions(+)
diff --git a/target/s390x/cpu_features_def.inc.h b/target/s390x/cpu_features_def.inc.h
index c20c780f2ea7..ef190e2fc783 100644
--- a/target/s390x/cpu_features_def.inc.h
+++ b/target/s390x/cpu_features_def.inc.h
@@ -77,6 +77,7 @@ DEF_FEAT(SEMAPHORE_ASSIST, "sema", STFL, 59, "Semaphore-assist facility")
DEF_FEAT(TIME_SLICE_INSTRUMENTATION, "tsi", STFL, 60, "Time-slice Instrumentation facility")
DEF_FEAT(MISC_INSTRUCTION_EXT3, "minste3", STFL, 61, "Miscellaneous-Instruction-Extensions Facility 3")
DEF_FEAT(RUNTIME_INSTRUMENTATION, "ri", STFL, 64, "CPU runtime-instrumentation facility")
+DEF_FEAT(AP_QUEUE_INTERRUPT_CONTROL, "apqi", STFL, 65, "AP-Queue interruption facility")
DEF_FEAT(ZPCI, "zpci", STFL, 69, "z/PCI facility")
DEF_FEAT(ADAPTER_EVENT_NOTIFICATION, "aen", STFL, 71, "General-purpose-adapter-event-notification facility")
DEF_FEAT(ADAPTER_INT_SUPPRESSION, "ais", STFL, 72, "General-purpose-adapter-interruption-suppression facility")
diff --git a/target/s390x/cpu_models.c b/target/s390x/cpu_models.c
index 2cb09c078055..1d16d7d5e794 100644
--- a/target/s390x/cpu_models.c
+++ b/target/s390x/cpu_models.c
@@ -818,6 +818,7 @@ static void check_consistency(const S390CPUModel *model)
{ S390_FEAT_PTFF_QTOUE, S390_FEAT_MULTIPLE_EPOCH },
{ S390_FEAT_PTFF_STOE, S390_FEAT_MULTIPLE_EPOCH },
{ S390_FEAT_PTFF_STOUE, S390_FEAT_MULTIPLE_EPOCH },
+ { S390_FEAT_AP_QUEUE_INTERRUPT_CONTROL, S390_FEAT_AP },
};
int i;
diff --git a/target/s390x/gen-features.c b/target/s390x/gen-features.c
index af06be3e3b98..9f216219ff53 100644
--- a/target/s390x/gen-features.c
+++ b/target/s390x/gen-features.c
@@ -519,6 +519,7 @@ static uint16_t full_GEN12_GA1[] = {
S390_FEAT_EDAT_2,
S390_FEAT_SIDE_EFFECT_ACCESS_ESOP2,
S390_FEAT_AP_QUERY_CONFIG_INFO,
+ S390_FEAT_AP_QUEUE_INTERRUPT_CONTROL,
S390_FEAT_AP_FACILITIES_TEST,
S390_FEAT_AP,
};
--
2.20.1
next prev parent reply other threads:[~2019-07-09 12:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-09 12:25 [Qemu-devel] [PULL for-4.1 0/4] s390x patches for -rc0 Cornelia Huck
2019-07-09 12:25 ` [Qemu-devel] [PULL for-4.1 1/4] vfio-ccw: Test vfio_set_irq_signaling() return value Cornelia Huck
2019-07-09 12:25 ` Cornelia Huck [this message]
2019-07-09 12:25 ` [Qemu-devel] [PULL for-4.1 3/4] s390: cpumodel: fix description for the new vector facility Cornelia Huck
2019-07-09 12:25 ` [Qemu-devel] [PULL for-4.1 4/4] s390x/tcg: move fallthrough annotation Cornelia Huck
2019-07-09 13:15 ` [Qemu-devel] [PULL for-4.1 0/4] s390x patches for -rc0 Peter Maydell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190709122546.12373-3-cohuck@redhat.com \
--to=cohuck@redhat.com \
--cc=akrowiak@linux.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=pasic@linux.ibm.com \
--cc=peter.maydell@linaro.org \
--cc=pmorel@linux.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).