[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v4 7/9] s390x/pci: fence off instructions for no
From: |
David Hildenbrand |
Subject: |
Re: [Qemu-devel] [PATCH v4 7/9] s390x/pci: fence off instructions for non-pci |
Date: |
Mon, 7 Aug 2017 16:17:49 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.1 |
On 07.08.2017 11:52, Cornelia Huck wrote:
> On Fri, 4 Aug 2017 15:17:25 +0200
> David Hildenbrand <address@hidden> wrote:
>
>> On 04.08.2017 13:29, Cornelia Huck wrote:
>>> If a guest running on a machine without zpci issues a pci instruction,
>>> throw them an exception.
>>>
>>> Reviewed-by: Thomas Huth <address@hidden>
>>> Signed-off-by: Cornelia Huck <address@hidden>
>>> ---
>>> target/s390x/kvm.c | 54
>>> +++++++++++++++++++++++++++++++++++++++++-------------
>>> 1 file changed, 41 insertions(+), 13 deletions(-)
>>>
>>> diff --git a/target/s390x/kvm.c b/target/s390x/kvm.c
>>> index bc62bba5b7..9de165d8b1 100644
>>> --- a/target/s390x/kvm.c
>>> +++ b/target/s390x/kvm.c
>>> @@ -1191,7 +1191,11 @@ static int kvm_clp_service_call(S390CPU *cpu, struct
>>> kvm_run *run)
>>> {
>>> uint8_t r2 = (run->s390_sieic.ipb & 0x000f0000) >> 16;
>>>
>>> - return clp_service_call(cpu, r2);
>>> + if (s390_has_feat(S390_FEAT_ZPCI)) {
>>> + return clp_service_call(cpu, r2);
>>> + } else {
>>> + return -1;
>>> + }
>>
>> I am a fan of dropping these else case and returning directly. But that
>> is just my opinion.
>>
>> (applies to all changes in this patch)
>>
>>
>
> You are not the first to say that :)
so ... at least 2 vs. 1? ;)
Nevermind, doesn't really matter.
>
> I do prefer this way around, though, and if there aren't strong
> objections, I'll keep it like this.
>
--
Thanks,
David
- Re: [Qemu-devel] [PATCH v4 5/9] s390x/ccw: create s390 phb conditionally, (continued)
[Qemu-devel] [PATCH v4 9/9] s390x: refine pci dependencies, Cornelia Huck, 2017/08/04
[Qemu-devel] [PATCH v4 3/9] s390x: chsc nt2 events are pci-only, Cornelia Huck, 2017/08/04
[Qemu-devel] [PATCH v4 1/9] kvm: remove hard dependency on pci, Cornelia Huck, 2017/08/04
[Qemu-devel] [PATCH v4 6/9] s390x/sclp: properly guard pci-specific functions, Cornelia Huck, 2017/08/04
[Qemu-devel] [PATCH v4 7/9] s390x/pci: fence off instructions for non-pci, Cornelia Huck, 2017/08/04
[Qemu-devel] [PATCH v4 2/9] s390x/pci: add stubs, Cornelia Huck, 2017/08/04
Re: [Qemu-devel] [PATCH v4 0/9] s390x: zPCI detangling, Cornelia Huck, 2017/08/04