KVM: Redesign kvm_io_bus_ API to pass VCPU structure to the callbacks.
This is needed in e.g. ARM vGIC emulation, where the MMIO handling depends on the VCPU that does the access. Signed-off-by: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Acked-by: Paolo Bonzini <pbonzini@redhat.com> Acked-by: Christoffer Dall <christoffer.dall@linaro.org> Reviewed-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Cette révision appartient à :

révisé par
Marc Zyngier

Parent
1a74847885
révision
e32edf4fd0
@@ -443,7 +443,8 @@ static inline int pit_in_range(gpa_t addr)
|
||||
(addr < KVM_PIT_BASE_ADDRESS + KVM_PIT_MEM_LENGTH));
|
||||
}
|
||||
|
||||
static int pit_ioport_write(struct kvm_io_device *this,
|
||||
static int pit_ioport_write(struct kvm_vcpu *vcpu,
|
||||
struct kvm_io_device *this,
|
||||
gpa_t addr, int len, const void *data)
|
||||
{
|
||||
struct kvm_pit *pit = dev_to_pit(this);
|
||||
@@ -519,7 +520,8 @@ static int pit_ioport_write(struct kvm_io_device *this,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int pit_ioport_read(struct kvm_io_device *this,
|
||||
static int pit_ioport_read(struct kvm_vcpu *vcpu,
|
||||
struct kvm_io_device *this,
|
||||
gpa_t addr, int len, void *data)
|
||||
{
|
||||
struct kvm_pit *pit = dev_to_pit(this);
|
||||
@@ -589,7 +591,8 @@ static int pit_ioport_read(struct kvm_io_device *this,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int speaker_ioport_write(struct kvm_io_device *this,
|
||||
static int speaker_ioport_write(struct kvm_vcpu *vcpu,
|
||||
struct kvm_io_device *this,
|
||||
gpa_t addr, int len, const void *data)
|
||||
{
|
||||
struct kvm_pit *pit = speaker_to_pit(this);
|
||||
@@ -606,8 +609,9 @@ static int speaker_ioport_write(struct kvm_io_device *this,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int speaker_ioport_read(struct kvm_io_device *this,
|
||||
gpa_t addr, int len, void *data)
|
||||
static int speaker_ioport_read(struct kvm_vcpu *vcpu,
|
||||
struct kvm_io_device *this,
|
||||
gpa_t addr, int len, void *data)
|
||||
{
|
||||
struct kvm_pit *pit = speaker_to_pit(this);
|
||||
struct kvm_kpit_state *pit_state = &pit->pit_state;
|
||||
|
Référencer dans un nouveau ticket
Bloquer un utilisateur