* [patch 0/5] misc qemu-kvm cleanups
@ 2011-08-01 15:27 Marcelo Tosatti
2011-08-01 15:27 ` [patch 1/5] qemu-kvm: remove hpagesize variable declaration Marcelo Tosatti
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: Marcelo Tosatti @ 2011-08-01 15:27 UTC (permalink / raw)
To: kvm
See individual patches for details.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [patch 1/5] qemu-kvm: remove hpagesize variable declaration
2011-08-01 15:27 [patch 0/5] misc qemu-kvm cleanups Marcelo Tosatti
@ 2011-08-01 15:27 ` Marcelo Tosatti
2011-08-01 15:27 ` [patch 2/5] piix_pci: remove kvm.h include Marcelo Tosatti
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Marcelo Tosatti @ 2011-08-01 15:27 UTC (permalink / raw)
To: kvm; +Cc: Marcelo Tosatti
[-- Attachment #1: remove-hpagesize-decl --]
[-- Type: text/plain, Size: 401 bytes --]
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Index: qemu-kvm/sysemu.h
===================================================================
--- qemu-kvm.orig/sysemu.h
+++ qemu-kvm/sysemu.h
@@ -123,7 +123,6 @@ extern int semihosting_enabled;
extern int old_param;
extern int boot_menu;
extern QEMUClock *rtc_clock;
-extern long hpagesize;
#define MAX_NODES 64
extern int nb_numa_nodes;
^ permalink raw reply [flat|nested] 9+ messages in thread
* [patch 2/5] piix_pci: remove kvm.h include
2011-08-01 15:27 [patch 0/5] misc qemu-kvm cleanups Marcelo Tosatti
2011-08-01 15:27 ` [patch 1/5] qemu-kvm: remove hpagesize variable declaration Marcelo Tosatti
@ 2011-08-01 15:27 ` Marcelo Tosatti
2011-08-01 15:27 ` [patch 3/5] qemu-kvm: remove unused kvm_nested variable Marcelo Tosatti
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: Marcelo Tosatti @ 2011-08-01 15:27 UTC (permalink / raw)
To: kvm; +Cc: Marcelo Tosatti
[-- Attachment #1: piix-pci-kvm-header --]
[-- Type: text/plain, Size: 345 bytes --]
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Index: qemu-kvm/hw/piix_pci.c
===================================================================
--- qemu-kvm.orig/hw/piix_pci.c
+++ qemu-kvm/hw/piix_pci.c
@@ -30,7 +30,6 @@
#include "sysbus.h"
#include "range.h"
#include "xen.h"
-#include "kvm.h"
/*
* I440FX chipset data sheet.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [patch 3/5] qemu-kvm: remove unused kvm_nested variable
2011-08-01 15:27 [patch 0/5] misc qemu-kvm cleanups Marcelo Tosatti
2011-08-01 15:27 ` [patch 1/5] qemu-kvm: remove hpagesize variable declaration Marcelo Tosatti
2011-08-01 15:27 ` [patch 2/5] piix_pci: remove kvm.h include Marcelo Tosatti
@ 2011-08-01 15:27 ` Marcelo Tosatti
2011-08-01 15:27 ` [patch 4/5] pc: drop unnecessary memory un-assignment Marcelo Tosatti
2011-08-01 15:27 ` [patch 5/5] kvm-tpr-opt: delete CPUState field Marcelo Tosatti
4 siblings, 0 replies; 9+ messages in thread
From: Marcelo Tosatti @ 2011-08-01 15:27 UTC (permalink / raw)
To: kvm; +Cc: Marcelo Tosatti
[-- Attachment #1: kvm-nested --]
[-- Type: text/plain, Size: 360 bytes --]
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Index: qemu-kvm/qemu-kvm.c
===================================================================
--- qemu-kvm.orig/qemu-kvm.c
+++ qemu-kvm/qemu-kvm.c
@@ -31,7 +31,6 @@
int kvm_irqchip = 1;
int kvm_pit = 1;
int kvm_pit_reinject = 1;
-int kvm_nested = 0;
#define ALIGN(x, y) (((x)+(y)-1) & ~((y)-1))
^ permalink raw reply [flat|nested] 9+ messages in thread
* [patch 4/5] pc: drop unnecessary memory un-assignment
2011-08-01 15:27 [patch 0/5] misc qemu-kvm cleanups Marcelo Tosatti
` (2 preceding siblings ...)
2011-08-01 15:27 ` [patch 3/5] qemu-kvm: remove unused kvm_nested variable Marcelo Tosatti
@ 2011-08-01 15:27 ` Marcelo Tosatti
2011-08-02 11:28 ` Avi Kivity
2011-08-01 15:27 ` [patch 5/5] kvm-tpr-opt: delete CPUState field Marcelo Tosatti
4 siblings, 1 reply; 9+ messages in thread
From: Marcelo Tosatti @ 2011-08-01 15:27 UTC (permalink / raw)
To: kvm; +Cc: Marcelo Tosatti
[-- Attachment #1: pc-0xd000-unassigned --]
[-- Type: text/plain, Size: 1219 bytes --]
As noted by the original commit. Probably kept in qemu-kvm
due to a mismerge.
commit 7d0adcd6d57149d4e9ec66f3a1c171df2bea2775
Author: aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>
Date: Fri Oct 24 13:12:42 2008 +0000
hw/pc: don't register the memory hole as unassigned twice
Since revision 5228, we don't register the memory hole (0xa00000 to
0xfffff) anymore. As a consequence, we don't need to register it again
as unassigned.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Index: qemu-kvm/hw/pc.c
===================================================================
--- qemu-kvm.orig/hw/pc.c
+++ qemu-kvm/hw/pc.c
@@ -1013,8 +1013,6 @@ void pc_memory_init(const char *kernel_f
isa_bios_size = bios_size;
if (isa_bios_size > (128 * 1024))
isa_bios_size = 128 * 1024;
- cpu_register_physical_memory(0xd0000, (192 * 1024) - isa_bios_size,
- IO_MEM_UNASSIGNED);
cpu_register_physical_memory(0x100000 - isa_bios_size,
isa_bios_size,
(bios_offset + bios_size - isa_bios_size) | IO_MEM_ROM);
^ permalink raw reply [flat|nested] 9+ messages in thread
* [patch 5/5] kvm-tpr-opt: delete CPUState field
2011-08-01 15:27 [patch 0/5] misc qemu-kvm cleanups Marcelo Tosatti
` (3 preceding siblings ...)
2011-08-01 15:27 ` [patch 4/5] pc: drop unnecessary memory un-assignment Marcelo Tosatti
@ 2011-08-01 15:27 ` Marcelo Tosatti
2011-08-02 12:37 ` Avi Kivity
4 siblings, 1 reply; 9+ messages in thread
From: Marcelo Tosatti @ 2011-08-01 15:27 UTC (permalink / raw)
To: kvm; +Cc: Marcelo Tosatti
[-- Attachment #1: kvmtpr-remove-cpustate-field --]
[-- Type: text/plain, Size: 3095 bytes --]
The information can be inferred from CPU_PUT_FULL_STATE and
bios_enabled.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Index: qemu-kvm/kvm-tpr-opt.c
===================================================================
--- qemu-kvm.orig/kvm-tpr-opt.c
+++ qemu-kvm/kvm-tpr-opt.c
@@ -218,7 +218,7 @@ static int get_pcr_cpu(CPUState *env)
return (int)b;
}
-int kvm_tpr_enable_vapic(CPUState *env)
+static int tpr_enable_vapic(CPUState *env)
{
static uint8_t one = 1;
int pcr_cpu = get_pcr_cpu(env);
@@ -228,11 +228,17 @@ int kvm_tpr_enable_vapic(CPUState *env)
kvm_enable_vapic(env, vapic_phys + (pcr_cpu << 7));
cpu_physical_memory_write_rom(vapic_phys + (pcr_cpu << 7) + 4, &one, 1);
- env->kvm_vcpu_update_vapic = 0;
bios_enabled = 1;
return 1;
}
+void kvm_tpr_enable_vapic(CPUState *env)
+{
+ if (!bios_enabled)
+ return;
+ tpr_enable_vapic(env);
+}
+
static void patch_call(CPUState *env, uint64_t rip, uint32_t target)
{
uint32_t offset;
@@ -293,7 +299,7 @@ void kvm_tpr_access_report(CPUState *env
return;
if (!bios_is_mapped(env, rip))
return;
- if (!kvm_tpr_enable_vapic(env))
+ if (!tpr_enable_vapic(env))
return;
patch_instruction(env, rip);
}
@@ -326,13 +332,6 @@ static int tpr_load(QEMUFile *f, void *s
qemu_get_be32s(f, &vapic_phys);
qemu_get_be32s(f, &vbios_desc_phys);
- if (bios_enabled) {
- CPUState *env = first_cpu->next_cpu;
-
- for (env = first_cpu; env != NULL; env = env->next_cpu)
- env->kvm_vcpu_update_vapic = 1;
- }
-
return 0;
}
@@ -367,7 +366,7 @@ static void vtpr_ioport_write(void *opaq
}
bios_enabled = 1;
update_vbios_real_tpr();
- kvm_tpr_enable_vapic(env);
+ tpr_enable_vapic(env);
}
static void kvm_tpr_opt_setup(void)
Index: qemu-kvm/qemu-kvm.h
===================================================================
--- qemu-kvm.orig/qemu-kvm.h
+++ qemu-kvm/qemu-kvm.h
@@ -265,6 +265,6 @@ extern int kvm_pit_reinject;
extern unsigned int kvm_shadow_memory;
int kvm_handle_tpr_access(CPUState *env);
-int kvm_tpr_enable_vapic(CPUState *env);
+void kvm_tpr_enable_vapic(CPUState *env);
#endif
Index: qemu-kvm/target-i386/cpu.h
===================================================================
--- qemu-kvm.orig/target-i386/cpu.h
+++ qemu-kvm/target-i386/cpu.h
@@ -759,8 +759,6 @@ typedef struct CPUX86State {
uint16_t fptag_vmstate;
uint16_t fpregs_format_vmstate;
- int kvm_vcpu_update_vapic;
-
uint64_t xstate_bv;
XMMReg ymmh_regs[CPU_NB_REGS];
Index: qemu-kvm/target-i386/kvm.c
===================================================================
--- qemu-kvm.orig/target-i386/kvm.c
+++ qemu-kvm/target-i386/kvm.c
@@ -1451,9 +1451,7 @@ int kvm_arch_put_registers(CPUState *env
return ret;
}
if (level == KVM_PUT_FULL_STATE) {
- if (env->kvm_vcpu_update_vapic) {
- kvm_tpr_enable_vapic(env);
- }
+ kvm_tpr_enable_vapic(env);
}
/* must be last */
ret = kvm_guest_debug_workarounds(env);
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch 4/5] pc: drop unnecessary memory un-assignment
2011-08-01 15:27 ` [patch 4/5] pc: drop unnecessary memory un-assignment Marcelo Tosatti
@ 2011-08-02 11:28 ` Avi Kivity
2011-08-02 11:40 ` Avi Kivity
0 siblings, 1 reply; 9+ messages in thread
From: Avi Kivity @ 2011-08-02 11:28 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: kvm
On 08/01/2011 06:27 PM, Marcelo Tosatti wrote:
> As noted by the original commit. Probably kept in qemu-kvm
> due to a mismerge.
>
> commit 7d0adcd6d57149d4e9ec66f3a1c171df2bea2775
> Author: aurel32<aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>
> Date: Fri Oct 24 13:12:42 2008 +0000
>
> hw/pc: don't register the memory hole as unassigned twice
>
> Since revision 5228, we don't register the memory hole (0xa00000 to
> 0xfffff) anymore. As a consequence, we don't need to register it again
> as unassigned.
>
> Signed-off-by: Aurelien Jarno<aurelien@aurel32.net>
>
> Signed-off-by: Marcelo Tosatti<mtosatti@redhat.com>
>
> Index: qemu-kvm/hw/pc.c
> ===================================================================
> --- qemu-kvm.orig/hw/pc.c
> +++ qemu-kvm/hw/pc.c
> @@ -1013,8 +1013,6 @@ void pc_memory_init(const char *kernel_f
> isa_bios_size = bios_size;
> if (isa_bios_size> (128 * 1024))
> isa_bios_size = 128 * 1024;
> - cpu_register_physical_memory(0xd0000, (192 * 1024) - isa_bios_size,
> - IO_MEM_UNASSIGNED);
> cpu_register_physical_memory(0x100000 - isa_bios_size,
> isa_bios_size,
> (bios_offset + bios_size - isa_bios_size) | IO_MEM_ROM);
>
>
I noticed the same thing on the large upstream merge - this code is now
gone.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch 4/5] pc: drop unnecessary memory un-assignment
2011-08-02 11:28 ` Avi Kivity
@ 2011-08-02 11:40 ` Avi Kivity
0 siblings, 0 replies; 9+ messages in thread
From: Avi Kivity @ 2011-08-02 11:40 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: kvm
On 08/02/2011 02:28 PM, Avi Kivity wrote:
>
> I noticed the same thing on the large upstream merge - this code is
> now gone.
>
last upstream merge.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [patch 5/5] kvm-tpr-opt: delete CPUState field
2011-08-01 15:27 ` [patch 5/5] kvm-tpr-opt: delete CPUState field Marcelo Tosatti
@ 2011-08-02 12:37 ` Avi Kivity
0 siblings, 0 replies; 9+ messages in thread
From: Avi Kivity @ 2011-08-02 12:37 UTC (permalink / raw)
To: Marcelo Tosatti; +Cc: kvm
On 08/01/2011 06:27 PM, Marcelo Tosatti wrote:
> The information can be inferred from CPU_PUT_FULL_STATE and
> bios_enabled.
>
Looks good.
--
error compiling committee.c: too many arguments to function
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2011-08-02 12:37 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-01 15:27 [patch 0/5] misc qemu-kvm cleanups Marcelo Tosatti
2011-08-01 15:27 ` [patch 1/5] qemu-kvm: remove hpagesize variable declaration Marcelo Tosatti
2011-08-01 15:27 ` [patch 2/5] piix_pci: remove kvm.h include Marcelo Tosatti
2011-08-01 15:27 ` [patch 3/5] qemu-kvm: remove unused kvm_nested variable Marcelo Tosatti
2011-08-01 15:27 ` [patch 4/5] pc: drop unnecessary memory un-assignment Marcelo Tosatti
2011-08-02 11:28 ` Avi Kivity
2011-08-02 11:40 ` Avi Kivity
2011-08-01 15:27 ` [patch 5/5] kvm-tpr-opt: delete CPUState field Marcelo Tosatti
2011-08-02 12:37 ` Avi Kivity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox