* [PATCH] KVM: i8259: Make ICW1 conform to spec
@ 2010-08-30 14:46 Avi Kivity
2010-08-30 14:57 ` Avi Kivity
0 siblings, 1 reply; 2+ messages in thread
From: Avi Kivity @ 2010-08-30 14:46 UTC (permalink / raw)
To: Marcelo Tosatti, kvm, Paolo Bonzini
ICW is not a full reset, instead it resets a limited number of registers
in the PIC. Change ICW1 emulation to only reset those registers.
Signed-off-by: Avi Kivity <avi@redhat.com>
---
arch/x86/kvm/i8259.c | 16 ++++++++++------
1 files changed, 10 insertions(+), 6 deletions(-)
diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c
index 8d10c06..a82876f 100644
--- a/arch/x86/kvm/i8259.c
+++ b/arch/x86/kvm/i8259.c
@@ -305,13 +305,17 @@ static void pic_ioport_write(void *opaque, u32 addr, u32 val)
addr &= 1;
if (addr == 0) {
if (val & 0x10) {
- kvm_pic_reset(s); /* init */
- /*
- * deassert a pending interrupt
- */
- pic_irq_request(s->pics_state->kvm, 0);
- s->init_state = 1;
s->init4 = val & 1;
+ s->last_irr = 0;
+ s->imr = 0;
+ s->priority_add = 0;
+ s->special_mask = 0;
+ s->read_reg_select = 0;
+ if (!s->init4) {
+ s->special_fully_nested_mode = 0;
+ s->auto_eoi = 0;
+ }
+ s->init_state = 1;
if (val & 0x02)
printk(KERN_ERR "single mode not supported");
if (val & 0x08)
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] KVM: i8259: Make ICW1 conform to spec
2010-08-30 14:46 [PATCH] KVM: i8259: Make ICW1 conform to spec Avi Kivity
@ 2010-08-30 14:57 ` Avi Kivity
0 siblings, 0 replies; 2+ messages in thread
From: Avi Kivity @ 2010-08-30 14:57 UTC (permalink / raw)
To: Marcelo Tosatti, kvm, Paolo Bonzini
On 08/30/2010 05:46 PM, Avi Kivity wrote:
> ICW is not a full reset, instead it resets a limited number of registers
> in the PIC. Change ICW1 emulation to only reset those registers.
>
The non-atomic-injection branch seems to be happy with this.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-30 14:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-08-30 14:46 [PATCH] KVM: i8259: Make ICW1 conform to spec Avi Kivity
2010-08-30 14:57 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).