* [PATCH] i386/pc: Drop pc_machine_kvm_type()
@ 2023-10-07 6:58 Xiaoyao Li
2023-10-18 13:27 ` Michael S. Tsirkin
2024-01-25 10:35 ` Paolo Bonzini
0 siblings, 2 replies; 5+ messages in thread
From: Xiaoyao Li @ 2023-10-07 6:58 UTC (permalink / raw)
To: Paolo Bonzini, Richard Henderson, Eduardo Habkost,
Michael S. Tsirkin, Marcel Apfelbaum
Cc: qemu-devel, David Hildenbrand, David Woodhouse, Xiaoyao Li
pc_machine_kvm_type() was introduced by commit e21be724eaf5 ("i386/xen:
add pc_machine_kvm_type to initialize XEN_EMULATE mode") to do Xen
specific initialization by utilizing kvm_type method.
commit eeedfe6c6316 ("hw/xen: Simplify emulated Xen platform init")
moves the Xen specific initialization to pc_basic_device_init().
There is no need to keep the PC specific kvm_type() implementation
anymore. So we'll fallback to kvm_arch_get_default_type(), which
simply returns 0.
Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Reviewed-by: Isaku Yamahata <isaku.yamahata@intel.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Acked-by: David Woodhouse <dwmw@amazon.co.uk>
---
hw/i386/pc.c | 5 -----
include/hw/i386/pc.h | 3 ---
2 files changed, 8 deletions(-)
diff --git a/hw/i386/pc.c b/hw/i386/pc.c
index aad7e8ccd1d7..41783b137b9a 100644
--- a/hw/i386/pc.c
+++ b/hw/i386/pc.c
@@ -1730,11 +1730,6 @@ static void pc_machine_initfn(Object *obj)
cxl_machine_init(obj, &pcms->cxl_devices_state);
}
-int pc_machine_kvm_type(MachineState *machine, const char *kvm_type)
-{
- return 0;
-}
-
static void pc_machine_reset(MachineState *machine, ShutdownCause reason)
{
CPUState *cs;
diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
index bec38cb92cf7..ad7149cb10b5 100644
--- a/include/hw/i386/pc.h
+++ b/include/hw/i386/pc.h
@@ -305,15 +305,12 @@ extern const size_t pc_compat_1_5_len;
extern GlobalProperty pc_compat_1_4[];
extern const size_t pc_compat_1_4_len;
-int pc_machine_kvm_type(MachineState *machine, const char *vm_type);
-
#define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \
static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \
{ \
MachineClass *mc = MACHINE_CLASS(oc); \
optsfn(mc); \
mc->init = initfn; \
- mc->kvm_type = pc_machine_kvm_type; \
} \
static const TypeInfo pc_machine_type_##suffix = { \
.name = namestr TYPE_MACHINE_SUFFIX, \
base-commit: 2f3913f4b2ad74baeb5a6f1d36efbd9ecdf1057d
--
2.34.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] i386/pc: Drop pc_machine_kvm_type()
2023-10-07 6:58 [PATCH] i386/pc: Drop pc_machine_kvm_type() Xiaoyao Li
@ 2023-10-18 13:27 ` Michael S. Tsirkin
2023-10-19 1:54 ` Xiaoyao Li
2024-01-25 2:21 ` Xiaoyao Li
2024-01-25 10:35 ` Paolo Bonzini
1 sibling, 2 replies; 5+ messages in thread
From: Michael S. Tsirkin @ 2023-10-18 13:27 UTC (permalink / raw)
To: Xiaoyao Li
Cc: Paolo Bonzini, Richard Henderson, Eduardo Habkost,
Marcel Apfelbaum, qemu-devel, David Hildenbrand, David Woodhouse
On Sat, Oct 07, 2023 at 02:58:19AM -0400, Xiaoyao Li wrote:
> pc_machine_kvm_type() was introduced by commit e21be724eaf5 ("i386/xen:
> add pc_machine_kvm_type to initialize XEN_EMULATE mode") to do Xen
> specific initialization by utilizing kvm_type method.
>
> commit eeedfe6c6316 ("hw/xen: Simplify emulated Xen platform init")
> moves the Xen specific initialization to pc_basic_device_init().
>
> There is no need to keep the PC specific kvm_type() implementation
> anymore. So we'll fallback to kvm_arch_get_default_type(), which
> simply returns 0.
>
> Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
> Reviewed-by: Isaku Yamahata <isaku.yamahata@intel.com>
> Reviewed-by: David Hildenbrand <david@redhat.com>
> Acked-by: David Woodhouse <dwmw@amazon.co.uk>
Seems ok
Acked-by: Michael S. Tsirkin <mst@redhat.com>
kvm thing so please merge through that tree.
> ---
> hw/i386/pc.c | 5 -----
> include/hw/i386/pc.h | 3 ---
> 2 files changed, 8 deletions(-)
>
> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
> index aad7e8ccd1d7..41783b137b9a 100644
> --- a/hw/i386/pc.c
> +++ b/hw/i386/pc.c
> @@ -1730,11 +1730,6 @@ static void pc_machine_initfn(Object *obj)
> cxl_machine_init(obj, &pcms->cxl_devices_state);
> }
>
> -int pc_machine_kvm_type(MachineState *machine, const char *kvm_type)
> -{
> - return 0;
> -}
> -
> static void pc_machine_reset(MachineState *machine, ShutdownCause reason)
> {
> CPUState *cs;
> diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
> index bec38cb92cf7..ad7149cb10b5 100644
> --- a/include/hw/i386/pc.h
> +++ b/include/hw/i386/pc.h
> @@ -305,15 +305,12 @@ extern const size_t pc_compat_1_5_len;
> extern GlobalProperty pc_compat_1_4[];
> extern const size_t pc_compat_1_4_len;
>
> -int pc_machine_kvm_type(MachineState *machine, const char *vm_type);
> -
> #define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \
> static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \
> { \
> MachineClass *mc = MACHINE_CLASS(oc); \
> optsfn(mc); \
> mc->init = initfn; \
> - mc->kvm_type = pc_machine_kvm_type; \
> } \
> static const TypeInfo pc_machine_type_##suffix = { \
> .name = namestr TYPE_MACHINE_SUFFIX, \
>
> base-commit: 2f3913f4b2ad74baeb5a6f1d36efbd9ecdf1057d
> --
> 2.34.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] i386/pc: Drop pc_machine_kvm_type()
2023-10-18 13:27 ` Michael S. Tsirkin
@ 2023-10-19 1:54 ` Xiaoyao Li
2024-01-25 2:21 ` Xiaoyao Li
1 sibling, 0 replies; 5+ messages in thread
From: Xiaoyao Li @ 2023-10-19 1:54 UTC (permalink / raw)
To: Michael S. Tsirkin, Paolo Bonzini
Cc: Richard Henderson, Eduardo Habkost, Marcel Apfelbaum, qemu-devel,
David Hildenbrand, David Woodhouse
On 10/18/2023 9:27 PM, Michael S. Tsirkin wrote:
> On Sat, Oct 07, 2023 at 02:58:19AM -0400, Xiaoyao Li wrote:
>> pc_machine_kvm_type() was introduced by commit e21be724eaf5 ("i386/xen:
>> add pc_machine_kvm_type to initialize XEN_EMULATE mode") to do Xen
>> specific initialization by utilizing kvm_type method.
>>
>> commit eeedfe6c6316 ("hw/xen: Simplify emulated Xen platform init")
>> moves the Xen specific initialization to pc_basic_device_init().
>>
>> There is no need to keep the PC specific kvm_type() implementation
>> anymore. So we'll fallback to kvm_arch_get_default_type(), which
>> simply returns 0.
>>
>> Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
>> Reviewed-by: Isaku Yamahata <isaku.yamahata@intel.com>
>> Reviewed-by: David Hildenbrand <david@redhat.com>
>> Acked-by: David Woodhouse <dwmw@amazon.co.uk>
>
> Seems ok
>
> Acked-by: Michael S. Tsirkin <mst@redhat.com>
Thanks, Michael!
> kvm thing so please merge through that tree.
Paolo, would you please handle it?
>
>> ---
>> hw/i386/pc.c | 5 -----
>> include/hw/i386/pc.h | 3 ---
>> 2 files changed, 8 deletions(-)
>>
>> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
>> index aad7e8ccd1d7..41783b137b9a 100644
>> --- a/hw/i386/pc.c
>> +++ b/hw/i386/pc.c
>> @@ -1730,11 +1730,6 @@ static void pc_machine_initfn(Object *obj)
>> cxl_machine_init(obj, &pcms->cxl_devices_state);
>> }
>>
>> -int pc_machine_kvm_type(MachineState *machine, const char *kvm_type)
>> -{
>> - return 0;
>> -}
>> -
>> static void pc_machine_reset(MachineState *machine, ShutdownCause reason)
>> {
>> CPUState *cs;
>> diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
>> index bec38cb92cf7..ad7149cb10b5 100644
>> --- a/include/hw/i386/pc.h
>> +++ b/include/hw/i386/pc.h
>> @@ -305,15 +305,12 @@ extern const size_t pc_compat_1_5_len;
>> extern GlobalProperty pc_compat_1_4[];
>> extern const size_t pc_compat_1_4_len;
>>
>> -int pc_machine_kvm_type(MachineState *machine, const char *vm_type);
>> -
>> #define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \
>> static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \
>> { \
>> MachineClass *mc = MACHINE_CLASS(oc); \
>> optsfn(mc); \
>> mc->init = initfn; \
>> - mc->kvm_type = pc_machine_kvm_type; \
>> } \
>> static const TypeInfo pc_machine_type_##suffix = { \
>> .name = namestr TYPE_MACHINE_SUFFIX, \
>>
>> base-commit: 2f3913f4b2ad74baeb5a6f1d36efbd9ecdf1057d
>> --
>> 2.34.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] i386/pc: Drop pc_machine_kvm_type()
2023-10-18 13:27 ` Michael S. Tsirkin
2023-10-19 1:54 ` Xiaoyao Li
@ 2024-01-25 2:21 ` Xiaoyao Li
1 sibling, 0 replies; 5+ messages in thread
From: Xiaoyao Li @ 2024-01-25 2:21 UTC (permalink / raw)
To: Paolo Bonzini
Cc: Richard Henderson, Eduardo Habkost, Marcel Apfelbaum, qemu-devel,
David Hildenbrand, David Woodhouse, Michael S. Tsirkin
On 10/18/2023 9:27 PM, Michael S. Tsirkin wrote:
> On Sat, Oct 07, 2023 at 02:58:19AM -0400, Xiaoyao Li wrote:
>> pc_machine_kvm_type() was introduced by commit e21be724eaf5 ("i386/xen:
>> add pc_machine_kvm_type to initialize XEN_EMULATE mode") to do Xen
>> specific initialization by utilizing kvm_type method.
>>
>> commit eeedfe6c6316 ("hw/xen: Simplify emulated Xen platform init")
>> moves the Xen specific initialization to pc_basic_device_init().
>>
>> There is no need to keep the PC specific kvm_type() implementation
>> anymore. So we'll fallback to kvm_arch_get_default_type(), which
>> simply returns 0.
>>
>> Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
>> Reviewed-by: Isaku Yamahata <isaku.yamahata@intel.com>
>> Reviewed-by: David Hildenbrand <david@redhat.com>
>> Acked-by: David Woodhouse <dwmw@amazon.co.uk>
>
> Seems ok
>
> Acked-by: Michael S. Tsirkin <mst@redhat.com>
>
> kvm thing so please merge through that tree.
Ping.
>
>> ---
>> hw/i386/pc.c | 5 -----
>> include/hw/i386/pc.h | 3 ---
>> 2 files changed, 8 deletions(-)
>>
>> diff --git a/hw/i386/pc.c b/hw/i386/pc.c
>> index aad7e8ccd1d7..41783b137b9a 100644
>> --- a/hw/i386/pc.c
>> +++ b/hw/i386/pc.c
>> @@ -1730,11 +1730,6 @@ static void pc_machine_initfn(Object *obj)
>> cxl_machine_init(obj, &pcms->cxl_devices_state);
>> }
>>
>> -int pc_machine_kvm_type(MachineState *machine, const char *kvm_type)
>> -{
>> - return 0;
>> -}
>> -
>> static void pc_machine_reset(MachineState *machine, ShutdownCause reason)
>> {
>> CPUState *cs;
>> diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h
>> index bec38cb92cf7..ad7149cb10b5 100644
>> --- a/include/hw/i386/pc.h
>> +++ b/include/hw/i386/pc.h
>> @@ -305,15 +305,12 @@ extern const size_t pc_compat_1_5_len;
>> extern GlobalProperty pc_compat_1_4[];
>> extern const size_t pc_compat_1_4_len;
>>
>> -int pc_machine_kvm_type(MachineState *machine, const char *vm_type);
>> -
>> #define DEFINE_PC_MACHINE(suffix, namestr, initfn, optsfn) \
>> static void pc_machine_##suffix##_class_init(ObjectClass *oc, void *data) \
>> { \
>> MachineClass *mc = MACHINE_CLASS(oc); \
>> optsfn(mc); \
>> mc->init = initfn; \
>> - mc->kvm_type = pc_machine_kvm_type; \
>> } \
>> static const TypeInfo pc_machine_type_##suffix = { \
>> .name = namestr TYPE_MACHINE_SUFFIX, \
>>
>> base-commit: 2f3913f4b2ad74baeb5a6f1d36efbd9ecdf1057d
>> --
>> 2.34.1
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] i386/pc: Drop pc_machine_kvm_type()
2023-10-07 6:58 [PATCH] i386/pc: Drop pc_machine_kvm_type() Xiaoyao Li
2023-10-18 13:27 ` Michael S. Tsirkin
@ 2024-01-25 10:35 ` Paolo Bonzini
1 sibling, 0 replies; 5+ messages in thread
From: Paolo Bonzini @ 2024-01-25 10:35 UTC (permalink / raw)
To: Xiaoyao Li
Cc: Richard Henderson, Eduardo Habkost, Michael S . Tsirkin,
Marcel Apfelbaum, qemu-devel, David Hildenbrand, David Woodhouse
Queued, thanks.
Paolo
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-01-25 10:36 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-07 6:58 [PATCH] i386/pc: Drop pc_machine_kvm_type() Xiaoyao Li
2023-10-18 13:27 ` Michael S. Tsirkin
2023-10-19 1:54 ` Xiaoyao Li
2024-01-25 2:21 ` Xiaoyao Li
2024-01-25 10:35 ` Paolo Bonzini
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).