[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC 5/7] s390x/pci: fence off instructions for n
From: |
Christian Borntraeger |
Subject: |
Re: [Qemu-devel] [PATCH RFC 5/7] s390x/pci: fence off instructions for non-pci |
Date: |
Fri, 7 Jul 2017 14:55:23 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.1.0 |
On 07/07/2017 02:21 PM, Cornelia Huck wrote:
> If a guest running on a non-pci build issues a pci instruction,
> throw them an exception.
>
> Signed-off-by: Cornelia Huck <address@hidden>
> ---
> target/s390x/kvm.c | 24 ++++++++++++++++++++++++
> 1 file changed, 24 insertions(+)
>
> diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
> index a3d00196f4..c5c7c27a21 100644
> --- a/target/s390x/kvm.c
> +++ b/target/s390x/kvm.c
> @@ -1160,6 +1160,9 @@ static int kvm_clp_service_call(S390CPU *cpu, struct
> kvm_run *run)
> {
> uint8_t r2 = (run->s390_sieic.ipb & 0x000f0000) >> 16;
>
> +#ifndef CONFIG_PCI
> + return -1;
> +#endif
Instead of this ifdefing, can you use the cpu model to decide if the instruction
should be available? We need to do this anyway for proper handling.
You can then fence off the PCI bits in the CPU model for
CONFIG_PCI == off.
- [Qemu-devel] [PATCH RFC 0/7] s390x: zPCI detangling, Cornelia Huck, 2017/07/07
- [Qemu-devel] [PATCH RFC 2/7] s390x: chsc nt2 events are pci-only, Cornelia Huck, 2017/07/07
- [Qemu-devel] [PATCH RFC 1/7] kvm: remove hard dependency on pci, Cornelia Huck, 2017/07/07
- [Qemu-devel] [PATCH RFC 3/7] s390x/sclp: properly guard pci-specific functions, Cornelia Huck, 2017/07/07
- [Qemu-devel] [PATCH RFC 4/7] s390x/ccw: create s390 phb conditionally, Cornelia Huck, 2017/07/07
- [Qemu-devel] [PATCH RFC 5/7] s390x/pci: fence off instructions for non-pci, Cornelia Huck, 2017/07/07
- [Qemu-devel] [PATCH RFC 7/7] s390x: refine pci dependencies, Cornelia Huck, 2017/07/07
- [Qemu-devel] [PATCH RFC 6/7] s390x/kvm: msi route fixup for non-pci, Cornelia Huck, 2017/07/07