2c2
< * Copyright (c) 2015 ARM Limited
---
> * Copyright (c) 2015-2016 ARM Limited
49c49,70
< class KvmGicParams;
---
> /**
> * KVM in-kernel GIC abstraction
> *
> * This class defines a high-level interface to the KVM in-kernel GIC
> * model. It exposes an API that is similar to that of
> * software-emulated GIC models in gem5.
> */
> class KvmKernelGicV2
> {
> public:
> /**
> * Instantiate a KVM in-kernel GIC model.
> *
> * This constructor instantiates an in-kernel GIC model and wires
> * it up to the virtual memory system.
> *
> * @param vm KVM VM representing this system
> * @param cpu_addr GIC CPU interface base address
> * @param dist_addr GIC distributor base address
> */
> KvmKernelGicV2(KvmVM &vm, Addr cpu_addr, Addr dist_addr);
> virtual ~KvmKernelGicV2();
50a72,138
> KvmKernelGicV2(const KvmKernelGicV2 &other) = delete;
> KvmKernelGicV2(const KvmKernelGicV2 &&other) = delete;
> KvmKernelGicV2 &operator=(const KvmKernelGicV2 &&rhs) = delete;
> KvmKernelGicV2 &operator=(const KvmKernelGicV2 &rhs) = delete;
>
> public:
> /**
> * @{
> * @name In-kernel GIC API
> */
>
> /**
> * Raise a shared peripheral interrupt
> *
> * @param spi SPI number
> */
> void setSPI(unsigned spi);
> /**
> * Clear a shared peripheral interrupt
> *
> * @param spi SPI number
> */
> void clearSPI(unsigned spi);
>
> /**
> * Raise a private peripheral interrupt
> *
> * @param vcpu KVM virtual CPU number
> * @parma ppi PPI interrupt number
> */
> void setPPI(unsigned vcpu, unsigned ppi);
>
> /**
> * Clear a private peripheral interrupt
> *
> * @param vcpu KVM virtual CPU number
> * @parma ppi PPI interrupt number
> */
> void clearPPI(unsigned vcpu, unsigned ppi);
>
> /** Address range for the CPU interfaces */
> const AddrRange cpuRange;
> /** Address range for the distributor interface */
> const AddrRange distRange;
>
> /* @} */
>
> protected:
> /**
> * Update the kernel's VGIC interrupt state
> *
> * @param type Interrupt type (KVM_ARM_IRQ_TYPE_PPI/KVM_ARM_IRQ_TYPE_SPI)
> * @param vcpu CPU id within KVM (ignored for SPIs)
> * @param irq Interrupt number
> * @param high True to signal an interrupt, false to clear it.
> */
> void setIntState(unsigned type, unsigned vcpu, unsigned irq, bool high);
>
> /** KVM VM in the parent system */
> KvmVM &vm;
>
> /** Kernel interface to the GIC */
> KvmDevice kdev;
> };
>
> struct KvmGicParams;
>
83c171
< void unserialize(CheckpointIn &cp) override;
---
> void unserialize(CheckpointIn &cp) override;
108,117d195
< /**
< * Update the kernel's VGIC interrupt state
< *
< * @param type Interrupt type (KVM_ARM_IRQ_TYPE_PPI/KVM_ARM_IRQ_TYPE_SPI)
< * @param vcpu CPU id within KVM (ignored for SPIs)
< * @param irq Interrupt number
< * @param high True to signal an interrupt, false to clear it.
< */
< void setIntState(uint8_t type, uint8_t vcpu, uint16_t irq, bool high);
<
120,123d197
< /** VM for this system */
< KvmVM &vm;
< /** Kernel interface to the GIC */
< KvmDevice kdev;
125,128c199,201
< /** Address range for the distributor interface */
< const AddrRange distRange;
< /** Address range for the CPU interfaces */
< const AddrRange cpuRange;
---
> /** Kernel GIC device */
> KvmKernelGicV2 kernelGic;
>