RE: [PATCH v6 4/6] KVM: Add reset/restore rtc_status support

2013-03-28 Thread Zhang, Yang Z
Paolo Bonzini wrote on 2013-03-26: > Il 22/03/2013 06:24, Yang Zhang ha scritto: >> +vector = ioapic->redirtbl[RTC_GSI].fields.vector; >> +kvm_for_each_vcpu(i, vcpu, ioapic->kvm) { >> +if (kvm_apic_pending_eoi(vcpu, vector)) { >> +pending_eoi++; >> +

RE: [PATCH v6 4/6] KVM: Add reset/restore rtc_status support

2013-03-28 Thread Zhang, Yang Z
Paolo Bonzini wrote on 2013-03-26: > Il 22/03/2013 06:24, Yang Zhang ha scritto: >> +static void rtc_irq_restore(struct kvm_ioapic *ioapic) >> +{ >> +struct kvm_vcpu *vcpu; >> +int vector, i, pending_eoi = 0; >> + >> +if (RTC_GSI != 8) > > Please set it to -1U if not x86, and do > >

Re: [PATCH v6 4/6] KVM: Add reset/restore rtc_status support

2013-03-26 Thread Paolo Bonzini
Il 22/03/2013 06:24, Yang Zhang ha scritto: > + vector = ioapic->redirtbl[RTC_GSI].fields.vector; > + kvm_for_each_vcpu(i, vcpu, ioapic->kvm) { > + if (kvm_apic_pending_eoi(vcpu, vector)) { > + pending_eoi++; > + set_bit(vcpu->vcpu_id, ioa

Re: [PATCH v6 4/6] KVM: Add reset/restore rtc_status support

2013-03-26 Thread Paolo Bonzini
Il 22/03/2013 06:24, Yang Zhang ha scritto: > +static void rtc_irq_restore(struct kvm_ioapic *ioapic) > +{ > + struct kvm_vcpu *vcpu; > + int vector, i, pending_eoi = 0; > + > + if (RTC_GSI != 8) Please set it to -1U if not x86, and do if (RTC_GSI >= IOAPIC_NUM_PINS) return;