diff options
author | Avi Kivity <avi@redhat.com> | 2012-08-05 06:25:10 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-08-05 06:25:10 -0400 |
commit | fe56097b23b1303b894eefd91582e4a64247d03f (patch) | |
tree | 4b3ab60eb19e8cfe2884e2da66dd4e4e25ae2274 /arch/x86/kvm | |
parent | e115676e042f4d9268c6b6d8cb7dc962aa6cfd7d (diff) | |
parent | e7882d6c40874a5b5033ca85f7508a602a60b662 (diff) |
Merge remote-tracking branch 'upstream' into next
- bring back critical fixes (esp. aa67f6096c19bc)
- provide an updated base for development
* upstream: (4334 commits)
missed mnt_drop_write() in do_dentry_open()
UBIFS: nuke pdflush from comments
gfs2: nuke pdflush from comments
drbd: nuke pdflush from comments
nilfs2: nuke write_super from comments
hfs: nuke write_super from comments
vfs: nuke pdflush from comments
jbd/jbd2: nuke write_super from comments
btrfs: nuke pdflush from comments
btrfs: nuke write_super from comments
ext4: nuke pdflush from comments
ext4: nuke write_super from comments
ext3: nuke write_super from comments
Documentation: fix the VM knobs descritpion WRT pdflush
Documentation: get rid of write_super
vfs: kill write_super and sync_supers
ACPI processor: Fix tick_broadcast_mask online/offline regression
ACPI: Only count valid srat memory structures
ACPI: Untangle a return statement for better readability
Linux 3.6-rc1
...
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r-- | arch/x86/kvm/i8259.c | 17 | ||||
-rw-r--r-- | arch/x86/kvm/vmx.c | 20 | ||||
-rw-r--r-- | arch/x86/kvm/x86.c | 4 |
3 files changed, 34 insertions, 7 deletions
diff --git a/arch/x86/kvm/i8259.c b/arch/x86/kvm/i8259.c index 1df8fb9e1d5d..e498b18f010c 100644 --- a/arch/x86/kvm/i8259.c +++ b/arch/x86/kvm/i8259.c | |||
@@ -316,6 +316,11 @@ static void pic_ioport_write(void *opaque, u32 addr, u32 val) | |||
316 | addr &= 1; | 316 | addr &= 1; |
317 | if (addr == 0) { | 317 | if (addr == 0) { |
318 | if (val & 0x10) { | 318 | if (val & 0x10) { |
319 | u8 edge_irr = s->irr & ~s->elcr; | ||
320 | int i; | ||
321 | bool found; | ||
322 | struct kvm_vcpu *vcpu; | ||
323 | |||
319 | s->init4 = val & 1; | 324 | s->init4 = val & 1; |
320 | s->last_irr = 0; | 325 | s->last_irr = 0; |
321 | s->irr &= s->elcr; | 326 | s->irr &= s->elcr; |
@@ -333,6 +338,18 @@ static void pic_ioport_write(void *opaque, u32 addr, u32 val) | |||
333 | if (val & 0x08) | 338 | if (val & 0x08) |
334 | pr_pic_unimpl( | 339 | pr_pic_unimpl( |
335 | "level sensitive irq not supported"); | 340 | "level sensitive irq not supported"); |
341 | |||
342 | kvm_for_each_vcpu(i, vcpu, s->pics_state->kvm) | ||
343 | if (kvm_apic_accept_pic_intr(vcpu)) { | ||
344 | found = true; | ||
345 | break; | ||
346 | } | ||
347 | |||
348 | |||
349 | if (found) | ||
350 | for (irq = 0; irq < PIC_NUM_PINS/2; irq++) | ||
351 | if (edge_irr & (1 << irq)) | ||
352 | pic_clear_isr(s, irq); | ||
336 | } else if (val & 0x08) { | 353 | } else if (val & 0x08) { |
337 | if (val & 0x04) | 354 | if (val & 0x04) |
338 | s->poll = 1; | 355 | s->poll = 1; |
diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c index 2300e5319ed9..d6e4cbc42b8e 100644 --- a/arch/x86/kvm/vmx.c +++ b/arch/x86/kvm/vmx.c | |||
@@ -1488,13 +1488,6 @@ static void __vmx_load_host_state(struct vcpu_vmx *vmx) | |||
1488 | loadsegment(ds, vmx->host_state.ds_sel); | 1488 | loadsegment(ds, vmx->host_state.ds_sel); |
1489 | loadsegment(es, vmx->host_state.es_sel); | 1489 | loadsegment(es, vmx->host_state.es_sel); |
1490 | } | 1490 | } |
1491 | #else | ||
1492 | /* | ||
1493 | * The sysexit path does not restore ds/es, so we must set them to | ||
1494 | * a reasonable value ourselves. | ||
1495 | */ | ||
1496 | loadsegment(ds, __USER_DS); | ||
1497 | loadsegment(es, __USER_DS); | ||
1498 | #endif | 1491 | #endif |
1499 | reload_tss(); | 1492 | reload_tss(); |
1500 | #ifdef CONFIG_X86_64 | 1493 | #ifdef CONFIG_X86_64 |
@@ -6370,6 +6363,19 @@ static void __noclone vmx_vcpu_run(struct kvm_vcpu *vcpu) | |||
6370 | #endif | 6363 | #endif |
6371 | ); | 6364 | ); |
6372 | 6365 | ||
6366 | #ifndef CONFIG_X86_64 | ||
6367 | /* | ||
6368 | * The sysexit path does not restore ds/es, so we must set them to | ||
6369 | * a reasonable value ourselves. | ||
6370 | * | ||
6371 | * We can't defer this to vmx_load_host_state() since that function | ||
6372 | * may be executed in interrupt context, which saves and restore segments | ||
6373 | * around it, nullifying its effect. | ||
6374 | */ | ||
6375 | loadsegment(ds, __USER_DS); | ||
6376 | loadsegment(es, __USER_DS); | ||
6377 | #endif | ||
6378 | |||
6373 | vcpu->arch.regs_avail = ~((1 << VCPU_REGS_RIP) | (1 << VCPU_REGS_RSP) | 6379 | vcpu->arch.regs_avail = ~((1 << VCPU_REGS_RIP) | (1 << VCPU_REGS_RSP) |
6374 | | (1 << VCPU_EXREG_RFLAGS) | 6380 | | (1 << VCPU_EXREG_RFLAGS) |
6375 | | (1 << VCPU_EXREG_CPL) | 6381 | | (1 << VCPU_EXREG_CPL) |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index a87c82aa3196..3ca90d74711d 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -925,6 +925,10 @@ static void kvm_write_wall_clock(struct kvm *kvm, gpa_t wall_clock) | |||
925 | */ | 925 | */ |
926 | getboottime(&boot); | 926 | getboottime(&boot); |
927 | 927 | ||
928 | if (kvm->arch.kvmclock_offset) { | ||
929 | struct timespec ts = ns_to_timespec(kvm->arch.kvmclock_offset); | ||
930 | boot = timespec_sub(boot, ts); | ||
931 | } | ||
928 | wc.sec = boot.tv_sec; | 932 | wc.sec = boot.tv_sec; |
929 | wc.nsec = boot.tv_nsec; | 933 | wc.nsec = boot.tv_nsec; |
930 | wc.version = version; | 934 | wc.version = version; |