xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] x86: command line option adjustments
@ 2014-07-30 16:04 Jan Beulich
  2014-07-30 16:07 ` [PATCH 1/3] x86/ACPI: " Jan Beulich
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Jan Beulich @ 2014-07-30 16:04 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Campbell, Keir Fraser, Ian Jackson, Tim Deegan

Mostly improving their documentation (it's doc day today), but also
some other related adjustments.

1: x86/ACPI: command line option adjustments
2: x86/APIC: command line option adjustments
3: x86/HVM: command line option adjustments

Signed-off-by: Jan Beulich <jbeulich@suse.com>

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 1/3] x86/ACPI: command line option adjustments
  2014-07-30 16:04 [PATCH 0/3] x86: command line option adjustments Jan Beulich
@ 2014-07-30 16:07 ` Jan Beulich
  2014-07-30 16:08 ` [PATCH 2/3] x86/APIC: " Jan Beulich
  2014-07-30 16:09 ` [PATCH 3/3] x86/HVM: " Jan Beulich
  2 siblings, 0 replies; 8+ messages in thread
From: Jan Beulich @ 2014-07-30 16:07 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Campbell, Keir Fraser, Ian Jackson, Tim Deegan

[-- Attachment #1: Type: text/plain, Size: 3587 bytes --]

Improving their documentation, and converting one option to boolean
since it has only boolean meaning.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/docs/misc/xen-command-line.markdown
+++ b/docs/misc/xen-command-line.markdown
@@ -111,20 +111,28 @@ Specify which ACPI MADT table to parse f
 than one is present.
 
 ### acpi\_pstate\_strict
-> `= <integer>`
+> `= <boolean>`
+
+> Default: `false`
+
+Enforce checking that P-state transitions by the ACPI cpufreq driver
+actually result in the nominated frequency to be established. A warning
+message will be logged if that isn't the case.
 
 ### acpi\_skip\_timer\_override
 > `= <boolean>`
 
 Instruct Xen to ignore timer-interrupt override.
 
-Because responsibility for ACPI processing is shared between Xen and
-the domain 0 kernel this option is automatically propagated to the
-domain 0 command line
-
 ### acpi\_sleep
 > `= s3_bios | s3_mode`
 
+`s3_bios` instructs Xen to invoke video BIOS initialization during S3
+resume.
+
+`s3_mode` instructs Xen to set up the boot time (option `vga=`) video
+mode during S3 resume.
+
 ### allowsuperpage
 > `= <boolean>`
 
@@ -970,7 +978,7 @@ This option can be specified more than o
 > `= <integer>`
 
 ### reboot
-> `= t[riple] | k[bd] | n[o] [, [w]arm | [c]old]`
+> `= t[riple] | k[bd] | a[cpi] | p[ci] | n[o] [, [w]arm | [c]old]`
 
 Default: `0`
 
@@ -980,12 +988,16 @@ Specify the host reboot method.
 
 `cold` instructs Xen to set the cold reboot flag.
 
+`no` instructs Xen to not automatically reboot after panics or crashes.
+
 `triple` instructs Xen to reboot the host by causing a triple fault.
 
 `kbd` instructs Xen to reboot the host via the keyboard controller.
 
 `acpi` instructs Xen to reboot the host using RESET_REG in the ACPI FADT.
 
+`pci` instructs Xen to reboot the host using PCI reset register (port CF9).
+
 ### sched
 > `= credit | credit2 | sedf | arinc653`
 
--- a/xen/arch/x86/acpi/cpufreq/cpufreq.c
+++ b/xen/arch/x86/acpi/cpufreq/cpufreq.c
@@ -57,8 +57,8 @@ struct acpi_cpufreq_data *cpufreq_drv_da
 
 static struct cpufreq_driver acpi_cpufreq_driver;
 
-static unsigned int __read_mostly acpi_pstate_strict;
-integer_param("acpi_pstate_strict", acpi_pstate_strict);
+static bool_t __read_mostly acpi_pstate_strict;
+boolean_param("acpi_pstate_strict", acpi_pstate_strict);
 
 static int check_est_cpu(unsigned int cpuid)
 {
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -73,7 +73,6 @@ boolean_param("dom0pvh", opt_dom0pvh);
 /* **** Linux config option: propagated to domain0. */
 /* "acpi=off":    Sisables both ACPI table parsing and interpreter. */
 /* "acpi=force":  Override the disable blacklist.                   */
-/* "acpi=strict": Disables out-of-spec workarounds.                 */
 /* "acpi=ht":     Limit ACPI just to boot-time to enable HT.        */
 /* "acpi=noirq":  Disables ACPI interrupt routing.                  */
 static void parse_acpi_param(char *s);
--- a/xen/arch/x86/shutdown.c
+++ b/xen/arch/x86/shutdown.c
@@ -37,9 +37,10 @@ enum reboot_type {
 static int reboot_mode;
 
 /*
- * reboot=b[ios] | t[riple] | k[bd] | n[o] [, [w]arm | [c]old]
+ * reboot=t[riple] | k[bd] | a[cpi] | p[ci] | n[o] [, [w]arm | [c]old]
  * warm   Don't set the cold reboot flag
  * cold   Set the cold reboot flag
+ * no     Suppress automatic reboot after panics or crashes
  * triple Force a triple fault (init)
  * kbd    Use the keyboard controller. cold reset (default)
  * acpi   Use the RESET_REG in the FADT




[-- Attachment #2: docs-cmdline-ACPI.patch --]
[-- Type: text/plain, Size: 3626 bytes --]

x86/ACPI: command line option adjustments

Improving their documentation, and converting one option to boolean
since it has only boolean meaning.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/docs/misc/xen-command-line.markdown
+++ b/docs/misc/xen-command-line.markdown
@@ -111,20 +111,28 @@ Specify which ACPI MADT table to parse f
 than one is present.
 
 ### acpi\_pstate\_strict
-> `= <integer>`
+> `= <boolean>`
+
+> Default: `false`
+
+Enforce checking that P-state transitions by the ACPI cpufreq driver
+actually result in the nominated frequency to be established. A warning
+message will be logged if that isn't the case.
 
 ### acpi\_skip\_timer\_override
 > `= <boolean>`
 
 Instruct Xen to ignore timer-interrupt override.
 
-Because responsibility for ACPI processing is shared between Xen and
-the domain 0 kernel this option is automatically propagated to the
-domain 0 command line
-
 ### acpi\_sleep
 > `= s3_bios | s3_mode`
 
+`s3_bios` instructs Xen to invoke video BIOS initialization during S3
+resume.
+
+`s3_mode` instructs Xen to set up the boot time (option `vga=`) video
+mode during S3 resume.
+
 ### allowsuperpage
 > `= <boolean>`
 
@@ -970,7 +978,7 @@ This option can be specified more than o
 > `= <integer>`
 
 ### reboot
-> `= t[riple] | k[bd] | n[o] [, [w]arm | [c]old]`
+> `= t[riple] | k[bd] | a[cpi] | p[ci] | n[o] [, [w]arm | [c]old]`
 
 Default: `0`
 
@@ -980,12 +988,16 @@ Specify the host reboot method.
 
 `cold` instructs Xen to set the cold reboot flag.
 
+`no` instructs Xen to not automatically reboot after panics or crashes.
+
 `triple` instructs Xen to reboot the host by causing a triple fault.
 
 `kbd` instructs Xen to reboot the host via the keyboard controller.
 
 `acpi` instructs Xen to reboot the host using RESET_REG in the ACPI FADT.
 
+`pci` instructs Xen to reboot the host using PCI reset register (port CF9).
+
 ### sched
 > `= credit | credit2 | sedf | arinc653`
 
--- a/xen/arch/x86/acpi/cpufreq/cpufreq.c
+++ b/xen/arch/x86/acpi/cpufreq/cpufreq.c
@@ -57,8 +57,8 @@ struct acpi_cpufreq_data *cpufreq_drv_da
 
 static struct cpufreq_driver acpi_cpufreq_driver;
 
-static unsigned int __read_mostly acpi_pstate_strict;
-integer_param("acpi_pstate_strict", acpi_pstate_strict);
+static bool_t __read_mostly acpi_pstate_strict;
+boolean_param("acpi_pstate_strict", acpi_pstate_strict);
 
 static int check_est_cpu(unsigned int cpuid)
 {
--- a/xen/arch/x86/setup.c
+++ b/xen/arch/x86/setup.c
@@ -73,7 +73,6 @@ boolean_param("dom0pvh", opt_dom0pvh);
 /* **** Linux config option: propagated to domain0. */
 /* "acpi=off":    Sisables both ACPI table parsing and interpreter. */
 /* "acpi=force":  Override the disable blacklist.                   */
-/* "acpi=strict": Disables out-of-spec workarounds.                 */
 /* "acpi=ht":     Limit ACPI just to boot-time to enable HT.        */
 /* "acpi=noirq":  Disables ACPI interrupt routing.                  */
 static void parse_acpi_param(char *s);
--- a/xen/arch/x86/shutdown.c
+++ b/xen/arch/x86/shutdown.c
@@ -37,9 +37,10 @@ enum reboot_type {
 static int reboot_mode;
 
 /*
- * reboot=b[ios] | t[riple] | k[bd] | n[o] [, [w]arm | [c]old]
+ * reboot=t[riple] | k[bd] | a[cpi] | p[ci] | n[o] [, [w]arm | [c]old]
  * warm   Don't set the cold reboot flag
  * cold   Set the cold reboot flag
+ * no     Suppress automatic reboot after panics or crashes
  * triple Force a triple fault (init)
  * kbd    Use the keyboard controller. cold reset (default)
  * acpi   Use the RESET_REG in the FADT

[-- Attachment #3: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 2/3] x86/APIC: command line option adjustments
  2014-07-30 16:04 [PATCH 0/3] x86: command line option adjustments Jan Beulich
  2014-07-30 16:07 ` [PATCH 1/3] x86/ACPI: " Jan Beulich
@ 2014-07-30 16:08 ` Jan Beulich
  2014-07-30 16:09 ` [PATCH 3/3] x86/HVM: " Jan Beulich
  2 siblings, 0 replies; 8+ messages in thread
From: Jan Beulich @ 2014-07-30 16:08 UTC (permalink / raw)
  To: xen-devel; +Cc: Ian Campbell, Keir Fraser, Ian Jackson, Tim Deegan

[-- Attachment #1: Type: text/plain, Size: 1919 bytes --]

Improving their documentation, and converting one option to boolean
since it has only boolean meaning.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/docs/misc/xen-command-line.markdown
+++ b/docs/misc/xen-command-line.markdown
@@ -674,6 +674,10 @@ debug hypervisor only).
 > `= <integer>`
 
 ### ioapic\_ack
+> `= old | new`
+
+> Default: `new` unless directed-EOI is supported
+
 ### iommu
 > `= List of [ <boolean> | force | required | intremap | qinval | snoop | sharept | dom0-passthrough | dom0-strict | amd-iommu-perdev-intremap | workaround_bios_bug | verbose | debug ]`
 
@@ -789,10 +793,10 @@ Force the use of `[<seg>:]<bus>:<device>
 ACPI table.
 
 ### lapic
+> `= <boolean>`
 
 Force the use of use of the local APIC on a uniprocessor system, even
-if left disabled by the BIOS.  This option will accept any value at
-all.
+if left disabled by the BIOS.
 
 ### lapic\_timer\_c2\_ok
 > `= <boolean>`
@@ -834,6 +838,9 @@ uses.  The limit only applies to the hig
 ### max\_gsi\_irqs
 > `= <integer>`
 
+Specifies the number of interrupts to be use for pin (IO-APIC or legacy PIC)
+based interrupts. Any higher IRQs will be available for use via PCI MSI.
+
 ### maxcpus
 > `= <integer>`
 
@@ -918,7 +925,7 @@ IRQ routing issues.
 > Default: `false`
 
 Ignore the local APIC on a uniprocessor system, even if enabled by the
-BIOS.  This option will accept value.
+BIOS.
 
 ### no-real-mode (x86)
 > `= <boolean>`
--- a/xen/arch/x86/apic.c
+++ b/xen/arch/x86/apic.c
@@ -813,12 +813,7 @@ static void __init lapic_disable(char *s
     setup_clear_cpu_cap(X86_FEATURE_APIC);
 }
 custom_param("nolapic", lapic_disable);
-
-static void __init lapic_enable(char *str)
-{
-    enable_local_apic = 1;
-}
-custom_param("lapic", lapic_enable);
+boolean_param("lapic", enable_local_apic);
 
 static void __init apic_set_verbosity(char *str)
 {




[-- Attachment #2: docs-cmdline-APIC.patch --]
[-- Type: text/plain, Size: 1958 bytes --]

x86/APIC: command line option adjustments

Improving their documentation, and converting one option to boolean
since it has only boolean meaning.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/docs/misc/xen-command-line.markdown
+++ b/docs/misc/xen-command-line.markdown
@@ -674,6 +674,10 @@ debug hypervisor only).
 > `= <integer>`
 
 ### ioapic\_ack
+> `= old | new`
+
+> Default: `new` unless directed-EOI is supported
+
 ### iommu
 > `= List of [ <boolean> | force | required | intremap | qinval | snoop | sharept | dom0-passthrough | dom0-strict | amd-iommu-perdev-intremap | workaround_bios_bug | verbose | debug ]`
 
@@ -789,10 +793,10 @@ Force the use of `[<seg>:]<bus>:<device>
 ACPI table.
 
 ### lapic
+> `= <boolean>`
 
 Force the use of use of the local APIC on a uniprocessor system, even
-if left disabled by the BIOS.  This option will accept any value at
-all.
+if left disabled by the BIOS.
 
 ### lapic\_timer\_c2\_ok
 > `= <boolean>`
@@ -834,6 +838,9 @@ uses.  The limit only applies to the hig
 ### max\_gsi\_irqs
 > `= <integer>`
 
+Specifies the number of interrupts to be use for pin (IO-APIC or legacy PIC)
+based interrupts. Any higher IRQs will be available for use via PCI MSI.
+
 ### maxcpus
 > `= <integer>`
 
@@ -918,7 +925,7 @@ IRQ routing issues.
 > Default: `false`
 
 Ignore the local APIC on a uniprocessor system, even if enabled by the
-BIOS.  This option will accept value.
+BIOS.
 
 ### no-real-mode (x86)
 > `= <boolean>`
--- a/xen/arch/x86/apic.c
+++ b/xen/arch/x86/apic.c
@@ -813,12 +813,7 @@ static void __init lapic_disable(char *s
     setup_clear_cpu_cap(X86_FEATURE_APIC);
 }
 custom_param("nolapic", lapic_disable);
-
-static void __init lapic_enable(char *str)
-{
-    enable_local_apic = 1;
-}
-custom_param("lapic", lapic_enable);
+boolean_param("lapic", enable_local_apic);
 
 static void __init apic_set_verbosity(char *str)
 {

[-- Attachment #3: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [PATCH 3/3] x86/HVM: command line option adjustments
  2014-07-30 16:04 [PATCH 0/3] x86: command line option adjustments Jan Beulich
  2014-07-30 16:07 ` [PATCH 1/3] x86/ACPI: " Jan Beulich
  2014-07-30 16:08 ` [PATCH 2/3] x86/APIC: " Jan Beulich
@ 2014-07-30 16:09 ` Jan Beulich
  2014-07-30 16:55   ` Boris Ostrovsky
  2 siblings, 1 reply; 8+ messages in thread
From: Jan Beulich @ 2014-07-30 16:09 UTC (permalink / raw)
  To: xen-devel
  Cc: Kevin Tian, Keir Fraser, Jun Nakajima, Eddie Dong, Ian Jackson,
	Tim Deegan, Ian Campbell, Aravind Gopalakrishnan,
	suravee.suthikulpanit, Boris Ostrovsky

[-- Attachment #1: Type: text/plain, Size: 4982 bytes --]

Adding actual descriptions for them, hiding the hvm_debug= one from
non-debug builds (the option was recognized but didn't take any effect
so far), and adjusting some debug level specifiers to their purpose.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/docs/misc/xen-command-line.markdown
+++ b/docs/misc/xen-command-line.markdown
@@ -661,9 +661,33 @@ supported only when compiled with XSM\_E
 ### hvm\_debug
 > `= <integer>`
 
+The specified value is a bit mask with the individual bits having the
+following meaning:
+
+Bit  0 - debug level 0 (unused at present)
+Bit  1 - debug level 1 (Control Register logging)
+Bit  2 - debug level 2 (VMX logging of MSR restores when context switching)
+Bit  3 - debug level 3 (unused at present)
+Bit  4 - I/O operation logging
+Bit  5 - vMMU logging
+Bit  6 - vLAPIC general logging
+Bit  7 - vLAPIC timer logging
+Bit  8 - vLAPIC interrupt logging
+Bit  9 - vIOAPIC logging
+Bit 10 - hypercall logging
+Bit 11 - MSR operation logging
+
+Recognized in debug builds of the hypervisor only.
+
 ### hvm\_port80
 > `= <boolean>`
 
+> Default: `true`
+
+Specify whether guests are to be given access to physical port 80
+(often used for debugging purposes), to override the DMI based
+detection of systems known to misbehave upon accesses to that port.
+
 ### highmem-start
 > `= <size>`
 
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -70,8 +70,10 @@
 
 bool_t __read_mostly hvm_enabled;
 
+#ifdef DBG_LEVEL_0
 unsigned int opt_hvm_debug_level __read_mostly;
 integer_param("hvm_debug", opt_hvm_debug_level);
+#endif
 
 struct hvm_function_table hvm_funcs __read_mostly;
 
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -1692,7 +1692,7 @@ static int svm_msr_read_intercept(unsign
         goto gpf;
     }
 
-    HVM_DBG_LOG(DBG_LEVEL_1, "returns: ecx=%x, msr_value=%"PRIx64,
+    HVM_DBG_LOG(DBG_LEVEL_MSR, "returns: ecx=%x, msr_value=%"PRIx64,
                 msr, *msr_content);
     return X86EMUL_OKAY;
 
--- a/xen/arch/x86/hvm/vmx/vmcs.c
+++ b/xen/arch/x86/hvm/vmx/vmcs.c
@@ -721,7 +721,7 @@ void vmx_disable_intercept_for_msr(struc
             clear_bit(msr, msr_bitmap + 0xc00/BYTES_PER_LONG); /* write-high */
     }
     else
-        HVM_DBG_LOG(DBG_LEVEL_0,
+        HVM_DBG_LOG(DBG_LEVEL_MSR,
                    "msr %x is out of the control range"
                    "0x00000000-0x00001fff and 0xc0000000-0xc0001fff"
                    "RDMSR or WRMSR will cause a VM exit", msr); 
@@ -757,7 +757,7 @@ void vmx_enable_intercept_for_msr(struct
             set_bit(msr, msr_bitmap + 0xc00/BYTES_PER_LONG); /* write-high */
     }
     else
-        HVM_DBG_LOG(DBG_LEVEL_0,
+        HVM_DBG_LOG(DBG_LEVEL_MSR,
                    "msr %x is out of the control range"
                    "0x00000000-0x00001fff and 0xc0000000-0xc0001fff"
                    "RDMSR or WRMSR will cause a VM exit", msr); 
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -199,7 +199,7 @@ long_mode_do_msr_read(unsigned int msr, 
         return HNDL_unhandled;
     }
 
-    HVM_DBG_LOG(DBG_LEVEL_0, "msr %#x content %#"PRIx64, msr, *msr_content);
+    HVM_DBG_LOG(DBG_LEVEL_MSR, "msr %#x content %#"PRIx64, msr, *msr_content);
 
     return HNDL_done;
 }
@@ -211,7 +211,7 @@ long_mode_do_msr_write(unsigned int msr,
     struct vmx_msr_state *guest_msr_state = &v->arch.hvm_vmx.msr_state;
     struct vmx_msr_state *host_msr_state = &this_cpu(host_msr_state);
 
-    HVM_DBG_LOG(DBG_LEVEL_0, "msr %#x content %#"PRIx64, msr, msr_content);
+    HVM_DBG_LOG(DBG_LEVEL_MSR, "msr %#x content %#"PRIx64, msr, msr_content);
 
     switch ( msr )
     {
@@ -254,7 +254,7 @@ long_mode_do_msr_write(unsigned int msr,
     return HNDL_done;
 
  uncanonical_address:
-    HVM_DBG_LOG(DBG_LEVEL_0, "Not cano address of msr write %x", msr);
+    HVM_DBG_LOG(DBG_LEVEL_MSR, "Not cano address of msr write %x", msr);
     hvm_inject_hw_exception(TRAP_gp_fault, 0);
     return HNDL_exception_raised;
 }
@@ -2046,7 +2046,7 @@ static int is_last_branch_msr(u32 ecx)
 
 static int vmx_msr_read_intercept(unsigned int msr, uint64_t *msr_content)
 {
-    HVM_DBG_LOG(DBG_LEVEL_1, "ecx=%#x", msr);
+    HVM_DBG_LOG(DBG_LEVEL_MSR, "ecx=%#x", msr);
 
     switch ( msr )
     {
@@ -2111,7 +2111,7 @@ static int vmx_msr_read_intercept(unsign
     }
 
 done:
-    HVM_DBG_LOG(DBG_LEVEL_1, "returns: ecx=%#x, msr_value=%#"PRIx64,
+    HVM_DBG_LOG(DBG_LEVEL_MSR, "returns: ecx=%#x, msr_value=%#"PRIx64,
                 msr, *msr_content);
     return X86EMUL_OKAY;
 
@@ -2229,7 +2229,7 @@ static int vmx_msr_write_intercept(unsig
 {
     struct vcpu *v = current;
 
-    HVM_DBG_LOG(DBG_LEVEL_1, "ecx=%#x, msr_value=%#"PRIx64, msr, msr_content);
+    HVM_DBG_LOG(DBG_LEVEL_MSR, "ecx=%#x, msr_value=%#"PRIx64, msr, msr_content);
 
     switch ( msr )
     {



[-- Attachment #2: docs-cmdline-HVM.patch --]
[-- Type: text/plain, Size: 5022 bytes --]

x86/HVM: command line option adjustments

Adding actual descriptions for them, hiding the hvm_debug= one from
non-debug builds (the option was recognized but didn't take any effect
so far), and adjusting some debug level specifiers to their purpose.

Signed-off-by: Jan Beulich <jbeulich@suse.com>

--- a/docs/misc/xen-command-line.markdown
+++ b/docs/misc/xen-command-line.markdown
@@ -661,9 +661,33 @@ supported only when compiled with XSM\_E
 ### hvm\_debug
 > `= <integer>`
 
+The specified value is a bit mask with the individual bits having the
+following meaning:
+
+Bit  0 - debug level 0 (unused at present)
+Bit  1 - debug level 1 (Control Register logging)
+Bit  2 - debug level 2 (VMX logging of MSR restores when context switching)
+Bit  3 - debug level 3 (unused at present)
+Bit  4 - I/O operation logging
+Bit  5 - vMMU logging
+Bit  6 - vLAPIC general logging
+Bit  7 - vLAPIC timer logging
+Bit  8 - vLAPIC interrupt logging
+Bit  9 - vIOAPIC logging
+Bit 10 - hypercall logging
+Bit 11 - MSR operation logging
+
+Recognized in debug builds of the hypervisor only.
+
 ### hvm\_port80
 > `= <boolean>`
 
+> Default: `true`
+
+Specify whether guests are to be given access to physical port 80
+(often used for debugging purposes), to override the DMI based
+detection of systems known to misbehave upon accesses to that port.
+
 ### highmem-start
 > `= <size>`
 
--- a/xen/arch/x86/hvm/hvm.c
+++ b/xen/arch/x86/hvm/hvm.c
@@ -70,8 +70,10 @@
 
 bool_t __read_mostly hvm_enabled;
 
+#ifdef DBG_LEVEL_0
 unsigned int opt_hvm_debug_level __read_mostly;
 integer_param("hvm_debug", opt_hvm_debug_level);
+#endif
 
 struct hvm_function_table hvm_funcs __read_mostly;
 
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -1692,7 +1692,7 @@ static int svm_msr_read_intercept(unsign
         goto gpf;
     }
 
-    HVM_DBG_LOG(DBG_LEVEL_1, "returns: ecx=%x, msr_value=%"PRIx64,
+    HVM_DBG_LOG(DBG_LEVEL_MSR, "returns: ecx=%x, msr_value=%"PRIx64,
                 msr, *msr_content);
     return X86EMUL_OKAY;
 
--- a/xen/arch/x86/hvm/vmx/vmcs.c
+++ b/xen/arch/x86/hvm/vmx/vmcs.c
@@ -721,7 +721,7 @@ void vmx_disable_intercept_for_msr(struc
             clear_bit(msr, msr_bitmap + 0xc00/BYTES_PER_LONG); /* write-high */
     }
     else
-        HVM_DBG_LOG(DBG_LEVEL_0,
+        HVM_DBG_LOG(DBG_LEVEL_MSR,
                    "msr %x is out of the control range"
                    "0x00000000-0x00001fff and 0xc0000000-0xc0001fff"
                    "RDMSR or WRMSR will cause a VM exit", msr); 
@@ -757,7 +757,7 @@ void vmx_enable_intercept_for_msr(struct
             set_bit(msr, msr_bitmap + 0xc00/BYTES_PER_LONG); /* write-high */
     }
     else
-        HVM_DBG_LOG(DBG_LEVEL_0,
+        HVM_DBG_LOG(DBG_LEVEL_MSR,
                    "msr %x is out of the control range"
                    "0x00000000-0x00001fff and 0xc0000000-0xc0001fff"
                    "RDMSR or WRMSR will cause a VM exit", msr); 
--- a/xen/arch/x86/hvm/vmx/vmx.c
+++ b/xen/arch/x86/hvm/vmx/vmx.c
@@ -199,7 +199,7 @@ long_mode_do_msr_read(unsigned int msr, 
         return HNDL_unhandled;
     }
 
-    HVM_DBG_LOG(DBG_LEVEL_0, "msr %#x content %#"PRIx64, msr, *msr_content);
+    HVM_DBG_LOG(DBG_LEVEL_MSR, "msr %#x content %#"PRIx64, msr, *msr_content);
 
     return HNDL_done;
 }
@@ -211,7 +211,7 @@ long_mode_do_msr_write(unsigned int msr,
     struct vmx_msr_state *guest_msr_state = &v->arch.hvm_vmx.msr_state;
     struct vmx_msr_state *host_msr_state = &this_cpu(host_msr_state);
 
-    HVM_DBG_LOG(DBG_LEVEL_0, "msr %#x content %#"PRIx64, msr, msr_content);
+    HVM_DBG_LOG(DBG_LEVEL_MSR, "msr %#x content %#"PRIx64, msr, msr_content);
 
     switch ( msr )
     {
@@ -254,7 +254,7 @@ long_mode_do_msr_write(unsigned int msr,
     return HNDL_done;
 
  uncanonical_address:
-    HVM_DBG_LOG(DBG_LEVEL_0, "Not cano address of msr write %x", msr);
+    HVM_DBG_LOG(DBG_LEVEL_MSR, "Not cano address of msr write %x", msr);
     hvm_inject_hw_exception(TRAP_gp_fault, 0);
     return HNDL_exception_raised;
 }
@@ -2046,7 +2046,7 @@ static int is_last_branch_msr(u32 ecx)
 
 static int vmx_msr_read_intercept(unsigned int msr, uint64_t *msr_content)
 {
-    HVM_DBG_LOG(DBG_LEVEL_1, "ecx=%#x", msr);
+    HVM_DBG_LOG(DBG_LEVEL_MSR, "ecx=%#x", msr);
 
     switch ( msr )
     {
@@ -2111,7 +2111,7 @@ static int vmx_msr_read_intercept(unsign
     }
 
 done:
-    HVM_DBG_LOG(DBG_LEVEL_1, "returns: ecx=%#x, msr_value=%#"PRIx64,
+    HVM_DBG_LOG(DBG_LEVEL_MSR, "returns: ecx=%#x, msr_value=%#"PRIx64,
                 msr, *msr_content);
     return X86EMUL_OKAY;
 
@@ -2229,7 +2229,7 @@ static int vmx_msr_write_intercept(unsig
 {
     struct vcpu *v = current;
 
-    HVM_DBG_LOG(DBG_LEVEL_1, "ecx=%#x, msr_value=%#"PRIx64, msr, msr_content);
+    HVM_DBG_LOG(DBG_LEVEL_MSR, "ecx=%#x, msr_value=%#"PRIx64, msr, msr_content);
 
     switch ( msr )
     {

[-- Attachment #3: Type: text/plain, Size: 126 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] x86/HVM: command line option adjustments
  2014-07-30 16:09 ` [PATCH 3/3] x86/HVM: " Jan Beulich
@ 2014-07-30 16:55   ` Boris Ostrovsky
  2014-07-31 22:55     ` Tian, Kevin
  2014-08-01  6:31     ` Jan Beulich
  0 siblings, 2 replies; 8+ messages in thread
From: Boris Ostrovsky @ 2014-07-30 16:55 UTC (permalink / raw)
  To: Jan Beulich, xen-devel
  Cc: Kevin Tian, Keir Fraser, Jun Nakajima, Eddie Dong, Ian Jackson,
	Tim Deegan, Ian Campbell, Aravind Gopalakrishnan,
	suravee.suthikulpanit

On 07/30/2014 12:09 PM, Jan Beulich wrote:
>   
> --- a/xen/arch/x86/hvm/hvm.c
> +++ b/xen/arch/x86/hvm/hvm.c
> @@ -70,8 +70,10 @@
>   
>   bool_t __read_mostly hvm_enabled;
>   
> +#ifdef DBG_LEVEL_0
>   unsigned int opt_hvm_debug_level __read_mostly;
>   integer_param("hvm_debug", opt_hvm_debug_level);
> +#endif


Do you think "#ifndef NDEBUG" might be better given that it is what 
defines DBG_LEVEL_0 (and all other DBG_LEVELs)?


-boris

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] x86/HVM: command line option adjustments
  2014-07-30 16:55   ` Boris Ostrovsky
@ 2014-07-31 22:55     ` Tian, Kevin
  2014-08-01  6:31     ` Jan Beulich
  1 sibling, 0 replies; 8+ messages in thread
From: Tian, Kevin @ 2014-07-31 22:55 UTC (permalink / raw)
  To: Boris Ostrovsky, Jan Beulich, xen-devel
  Cc: Keir Fraser, Nakajima, Jun, Dong, Eddie, Ian Jackson, Tim Deegan,
	Ian Campbell, Aravind Gopalakrishnan,
	suravee.suthikulpanit@amd.com

> From: Boris Ostrovsky [mailto:boris.ostrovsky@oracle.com]
> Sent: Wednesday, July 30, 2014 9:56 AM
> 
> On 07/30/2014 12:09 PM, Jan Beulich wrote:
> >
> > --- a/xen/arch/x86/hvm/hvm.c
> > +++ b/xen/arch/x86/hvm/hvm.c
> > @@ -70,8 +70,10 @@
> >
> >   bool_t __read_mostly hvm_enabled;
> >
> > +#ifdef DBG_LEVEL_0
> >   unsigned int opt_hvm_debug_level __read_mostly;
> >   integer_param("hvm_debug", opt_hvm_debug_level);
> > +#endif
> 
> 
> Do you think "#ifndef NDEBUG" might be better given that it is what
> defines DBG_LEVEL_0 (and all other DBG_LEVELs)?
> 

Agree.

Thanks
Kevin

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] x86/HVM: command line option adjustments
  2014-07-30 16:55   ` Boris Ostrovsky
  2014-07-31 22:55     ` Tian, Kevin
@ 2014-08-01  6:31     ` Jan Beulich
  2014-08-01 23:23       ` Tian, Kevin
  1 sibling, 1 reply; 8+ messages in thread
From: Jan Beulich @ 2014-08-01  6:31 UTC (permalink / raw)
  To: Boris Ostrovsky
  Cc: Kevin Tian, Keir Fraser, Jun Nakajima, Eddie Dong, Ian Jackson,
	Tim Deegan, Ian Campbell, Aravind Gopalakrishnan,
	suravee.suthikulpanit, xen-devel

>>> On 30.07.14 at 18:55, <boris.ostrovsky@oracle.com> wrote:
> On 07/30/2014 12:09 PM, Jan Beulich wrote:
>>   
>> --- a/xen/arch/x86/hvm/hvm.c
>> +++ b/xen/arch/x86/hvm/hvm.c
>> @@ -70,8 +70,10 @@
>>   
>>   bool_t __read_mostly hvm_enabled;
>>   
>> +#ifdef DBG_LEVEL_0
>>   unsigned int opt_hvm_debug_level __read_mostly;
>>   integer_param("hvm_debug", opt_hvm_debug_level);
>> +#endif
> 
> 
> Do you think "#ifndef NDEBUG" might be better given that it is what 
> defines DBG_LEVEL_0 (and all other DBG_LEVELs)?

No, specifically not: If someone wants to alter the behavior to e.g.
include the option (and the effect it takes) in a non-debug build, the
way it's done this requires code modification in _exactly one place_.

Jan

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] x86/HVM: command line option adjustments
  2014-08-01  6:31     ` Jan Beulich
@ 2014-08-01 23:23       ` Tian, Kevin
  0 siblings, 0 replies; 8+ messages in thread
From: Tian, Kevin @ 2014-08-01 23:23 UTC (permalink / raw)
  To: Jan Beulich, Boris Ostrovsky
  Cc: Keir Fraser, Nakajima, Jun, Dong, Eddie, Ian Jackson, Tim Deegan,
	Ian Campbell, Aravind Gopalakrishnan,
	suravee.suthikulpanit@amd.com, xen-devel

> From: Jan Beulich [mailto:JBeulich@suse.com]
> Sent: Thursday, July 31, 2014 11:31 PM
> 
> >>> On 30.07.14 at 18:55, <boris.ostrovsky@oracle.com> wrote:
> > On 07/30/2014 12:09 PM, Jan Beulich wrote:
> >>
> >> --- a/xen/arch/x86/hvm/hvm.c
> >> +++ b/xen/arch/x86/hvm/hvm.c
> >> @@ -70,8 +70,10 @@
> >>
> >>   bool_t __read_mostly hvm_enabled;
> >>
> >> +#ifdef DBG_LEVEL_0
> >>   unsigned int opt_hvm_debug_level __read_mostly;
> >>   integer_param("hvm_debug", opt_hvm_debug_level);
> >> +#endif
> >
> >
> > Do you think "#ifndef NDEBUG" might be better given that it is what
> > defines DBG_LEVEL_0 (and all other DBG_LEVELs)?
> 
> No, specifically not: If someone wants to alter the behavior to e.g.
> include the option (and the effect it takes) in a non-debug build, the
> way it's done this requires code modification in _exactly one place_.
> 
> Jan

Acked-by: Kevin Tian <kevin.tian@intel.com>

Thanks
Kevin

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-08-01 23:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-30 16:04 [PATCH 0/3] x86: command line option adjustments Jan Beulich
2014-07-30 16:07 ` [PATCH 1/3] x86/ACPI: " Jan Beulich
2014-07-30 16:08 ` [PATCH 2/3] x86/APIC: " Jan Beulich
2014-07-30 16:09 ` [PATCH 3/3] x86/HVM: " Jan Beulich
2014-07-30 16:55   ` Boris Ostrovsky
2014-07-31 22:55     ` Tian, Kevin
2014-08-01  6:31     ` Jan Beulich
2014-08-01 23:23       ` Tian, Kevin

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).