[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC][patch 3/6] KVM: s390: Add GISA support
From: |
Heiko Carstens |
Subject: |
Re: [Qemu-devel] [RFC][patch 3/6] KVM: s390: Add GISA support |
Date: |
Thu, 4 Sep 2014 16:19:42 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Sep 04, 2014 at 12:52:26PM +0200, address@hidden wrote:
> +void kvm_s390_gisa_register_alert(struct kvm *kvm, u32 gisc)
> +{
> + int bito = BITS_PER_BYTE * 7 + gisc;
> +
> + set_bit(bito ^ (BITS_PER_LONG - 1), &kvm->arch.iam);
> +}
Just a very minor nit: you could also use set_bit_inv() & friends.
> +static inline u64 kvm_s390_get_base_disp_rxy(struct kvm_vcpu *vcpu)
> +{
> + u32 x2 = (vcpu->arch.sie_block->ipa & 0x000f);
> + u32 base2 = vcpu->arch.sie_block->ipb >> 28;
> + u32 disp2 = ((vcpu->arch.sie_block->ipb & 0x0fff0000) >> 16) +
> + ((vcpu->arch.sie_block->ipb & 0xff00) << 4);
> +
> + return (base2 ? vcpu->run->s.regs.gprs[base2] : 0) +
> + (x2 ? vcpu->run->s.regs.gprs[x2] : 0) + (u64)disp2;
> +}
Not very readable ;) However.. for the RXY instruction format the 20 bit
displacement is usually signed and not unsigned like your code seems to
treat it.
- Re: [Qemu-devel] [RFC][patch 0/6] pci pass-through support for qemu/KVM on s390, (continued)
[Qemu-devel] [RFC][patch 1/6] s390: cio: chsc function to register GIB, frank . blaschka, 2014/09/04
[Qemu-devel] [RFC][patch 4/6] KVM: s390: Add PCI pass-through support, frank . blaschka, 2014/09/04
[Qemu-devel] [RFC][patch 2/6] s390: pci: export pci functions for pass-through usage, frank . blaschka, 2014/09/04
[Qemu-devel] [RFC][patch 3/6] KVM: s390: Add GISA support, frank . blaschka, 2014/09/04
[Qemu-devel] [RFC][patch 6/6] s390: Add PCI pass-through device support, frank . blaschka, 2014/09/04
[Qemu-devel] [RFC][patch 5/6] s390: Add PCI bus support, frank . blaschka, 2014/09/04
Re: [Qemu-devel] [RFC][patch 0/6] pci pass-through support for qemu/KVM on s390, Alexander Graf, 2014/09/05